unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Vivien Kraus via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 51127@debbugs.gnu.org
Subject: bug#51127: Acknowledgement (deja-dup cannot start a backup)
Date: Thu, 14 Oct 2021 18:56:10 +0200	[thread overview]
Message-ID: <72e09b06e67e51fd8a7df050e19af8fafce15ff0.camel@planete-kraus.eu> (raw)
In-Reply-To: <357e17f6cfd3ba3199a2925178815843d67190bd.camel@planete-kraus.eu>

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

Le jeudi 14 octobre 2021 à 18:43 +0200, Vivien Kraus a écrit :
> So, I figured out the Gio backends for duplicity need a few tweaks.
> 
> You can test it by creating a stupid backup (backup any dir in /tmp).
> Now it works :)

Sorry, I forgot to run guix lint, and it said that I needed bash-
minimal as an input for wrapped programs.

> What do you think?
> 
> Vivien


[-- Attachment #2: 0003-gnu-deja-dup-let-deja-dup-find-duplicity.patch --]
[-- Type: text/x-patch, Size: 1632 bytes --]

From 5eb63be36f0173eb5b177e57dcf11616c01d8a07 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 14 Oct 2021 17:30:09 +0200
Subject: [PATCH 3/3] gnu: deja-dup: let deja-dup find duplicity

* gnome.scm (deja-dup): wrap deja-dup to set PATH
---
 gnu/packages/gnome.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 17fb2e0146..a0af7b3777 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -1773,7 +1773,14 @@ (define-public deja-dup
            (lambda _
              (substitute* "data/post-install.sh"
                (("gtk-update-icon-cache") "true"))
-             #t)))))
+             #t))
+         (add-after 'install 'wrap-program
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; Add duplicity to the search path
+             (wrap-program (string-append (assoc-ref outputs "out")
+                                          "/bin/deja-dup")
+               `("PATH" ":" prefix
+                 (,(format #f "~a/bin" (assoc-ref inputs "duplicity"))))))))))
     (inputs
      `(("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
        ("duplicity" ,duplicity)
@@ -1785,7 +1792,8 @@ (define-public deja-dup
        ("libgpg-error" ,libgpg-error)
        ("libsecret" ,libsecret)
        ("libsoup" ,libsoup)
-       ("packagekit" ,packagekit)))
+       ("packagekit" ,packagekit)
+       ("bash-minimal" ,bash-minimal)))
     (native-inputs
      `(("appstream-glib" ,appstream-glib)
        ("desktop-file-utils" ,desktop-file-utils)
-- 
2.33.0


[-- Attachment #3: 0002-gnu-duplicity-depend-on-dbus.patch --]
[-- Type: text/x-patch, Size: 1534 bytes --]

From 6e8a3455fc6d1a65debcf0b9c7e83d8832ce9671 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 14 Oct 2021 18:18:56 +0200
Subject: [PATCH 2/3] gnu: duplicity: depend on dbus

* gnu/packages/backup.scm (duplicity): add dbus ad an input
---
 gnu/packages/backup.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 407f6b7212..d1a718eab3 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -119,6 +119,7 @@ (define-public duplicity
     (inputs
      `(("librsync" ,librsync)
        ("lftp" ,lftp)
+       ("dbus" ,dbus)                   ; dbus-launch (Gio backend)
        ("gnupg" ,gnupg)                 ; gpg executable needed
        ("util-linux" ,util-linux)))     ; for setsid
     (arguments
@@ -130,7 +131,11 @@ (define-public duplicity
              (substitute* "duplicity/gpginterface.py"
                (("self.call = u'gpg'")
                 (string-append "self.call = '" (assoc-ref inputs "gnupg") "/bin/gpg'")))
-
+             (substitute* "duplicity/backends/giobackend.py"
+               (("subprocess.Popen\\(\\[u'dbus-launch'\\]")
+                (string-append "subprocess.Popen([u'"
+                               (assoc-ref inputs "dbus")
+                               "/bin/dbus-launch']")))
              (substitute* '("testing/functional/__init__.py"
                             "testing/overrides/bin/lftp")
                (("/bin/sh") (which "sh")))
-- 
2.33.0


[-- Attachment #4: 0001-gnu-duplicity-depend-on-pygobject.patch --]
[-- Type: text/x-patch, Size: 849 bytes --]

From 14576b7216b7810168dcda328048417bbb9fa9cd Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 14 Oct 2021 17:18:29 +0200
Subject: [PATCH 1/3] gnu: duplicity: depend on pygobject

* gnu/packages/backup.scm (duplicity): add missing input.
---
 gnu/packages/backup.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index a3f98c95f9..407f6b7212 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -114,7 +114,8 @@ (define-public duplicity
        ("mock" ,python-mock)))
     (propagated-inputs
      `(("lockfile" ,python-lockfile)
-       ("urllib3" ,python-urllib3)))
+       ("urllib3" ,python-urllib3)
+       ("pygobject" ,python-pygobject)))
     (inputs
      `(("librsync" ,librsync)
        ("lftp" ,lftp)
-- 
2.33.0


  reply	other threads:[~2021-10-14 16:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11  0:18 bug#51127: deja-dup cannot start a backup Vivien Kraus via Bug reports for GNU Guix
     [not found] ` <handler.51127.B.163391150031068.ack@debbugs.gnu.org>
2021-10-14 16:43   ` bug#51127: Acknowledgement (deja-dup cannot start a backup) Vivien Kraus via Bug reports for GNU Guix
2021-10-14 16:56     ` Vivien Kraus via Bug reports for GNU Guix [this message]
2021-10-16 16:12       ` Vivien Kraus via Bug reports for GNU Guix
2021-10-17 18:54         ` Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=72e09b06e67e51fd8a7df050e19af8fafce15ff0.camel@planete-kraus.eu \
    --to=bug-guix@gnu.org \
    --cc=51127@debbugs.gnu.org \
    --cc=vivien@planete-kraus.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).