unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51127: deja-dup cannot start a backup
@ 2021-10-11  0:18 Vivien Kraus via Bug reports for GNU Guix
       [not found] ` <handler.51127.B.163391150031068.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Vivien Kraus via Bug reports for GNU Guix @ 2021-10-11  0:18 UTC (permalink / raw)
  To: 51127

Dear guix,

After configuring deja-dup for either SSH storage or local file
storage, I try to start the backup, but I get a popup saying:

BackendException: Could not initialize backend: No module named 'gi'

To me, it looks like a python error, but I could not find any
substantial amount of python code in deja-dup, and I could not find any
python file importing gi in the duplicity package.

Best regards,

Vivien





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#51127: Acknowledgement (deja-dup cannot start a backup)
       [not found] ` <handler.51127.B.163391150031068.ack@debbugs.gnu.org>
@ 2021-10-14 16:43   ` Vivien Kraus via Bug reports for GNU Guix
  2021-10-14 16:56     ` Vivien Kraus via Bug reports for GNU Guix
  0 siblings, 1 reply; 5+ messages in thread
From: Vivien Kraus via Bug reports for GNU Guix @ 2021-10-14 16:43 UTC (permalink / raw)
  To: 51127

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

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 :)

What do you think?

Vivien

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

From 429fdb8003a0f39a23749d15c02e2bfca9e96f15 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 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 17fb2e0146..1adb22773e 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)
-- 
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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#51127: Acknowledgement (deja-dup cannot start a backup)
  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
  2021-10-16 16:12       ` Vivien Kraus via Bug reports for GNU Guix
  0 siblings, 1 reply; 5+ messages in thread
From: Vivien Kraus via Bug reports for GNU Guix @ 2021-10-14 16:56 UTC (permalink / raw)
  To: 51127

[-- 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#51127: Acknowledgement (deja-dup cannot start a backup)
  2021-10-14 16:56     ` Vivien Kraus via Bug reports for GNU Guix
@ 2021-10-16 16:12       ` Vivien Kraus via Bug reports for GNU Guix
  2021-10-17 18:54         ` Efraim Flashner
  0 siblings, 1 reply; 5+ messages in thread
From: Vivien Kraus via Bug reports for GNU Guix @ 2021-10-16 16:12 UTC (permalink / raw)
  To: 51127

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

Le jeudi 14 octobre 2021 à 18:56 +0200, Vivien Kraus a écrit :
> 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 :)

And now with cooler ChangeLog commit messages!
> 
> > What do you think?
> > 
> > Vivien


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

From 39d4726859760ae84f2c82d6d3f811ed092bd373 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)[phases]:
Wrap deja-dup to include duplicity in PATH.
---
 gnu/packages/gnome.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 20c0be8d9d..3a3219f07a 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)
-- 
2.33.1


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

From c7325a5dfbc56e76e92017cb93914a8ed4545c35 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)[inputs]:
Add dbus as an input.

* gnu/packages/backup.scm (duplicity)[phases]:
Substitute the dbus-launch program name.
---
 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.1


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

From ecaf5368c3d82045d500e0fdb4f1ee45dfbcf185 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)[propagated-inputs]:
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.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#51127: Acknowledgement (deja-dup cannot start a backup)
  2021-10-16 16:12       ` Vivien Kraus via Bug reports for GNU Guix
@ 2021-10-17 18:54         ` Efraim Flashner
  0 siblings, 0 replies; 5+ messages in thread
From: Efraim Flashner @ 2021-10-17 18:54 UTC (permalink / raw)
  To: Vivien Kraus; +Cc: 51127-done

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

Thanks! Patches pushed.

-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-17 18:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2021-10-16 16:12       ` Vivien Kraus via Bug reports for GNU Guix
2021-10-17 18:54         ` Efraim Flashner

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).