GNU bug report logs - #43939
[PATCH 1/3] gnu: Add python-pykeepass.

Previous Next

Package: guix-patches;

Reported by: Vinicius Monego <monego <at> posteo.net>

Date: Mon, 12 Oct 2020 03:40:01 UTC

Severity: normal

Tags: patch

Done: Marius Bakke <marius <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43939 in the body.
You can then email your comments to 43939 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#43939; Package guix-patches. (Mon, 12 Oct 2020 03:40:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vinicius Monego <monego <at> posteo.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 12 Oct 2020 03:40:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH 1/3] gnu: Add python-pykeepass.
Date: Mon, 12 Oct 2020 00:38:49 -0300
* gnu/packages/python-crypto.scm (python-pykeepass): New variable.
---
v3.2.1 was released recently but it introduces a breaking change that will only be fixed in the next version of Password Safe.
See https://gitlab.gnome.org/World/PasswordSafe/-/issues/163.
 gnu/packages/python-crypto.scm | 48 ++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index f39695a850..b01f5bb173 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -61,6 +61,7 @@
   #:use-module (gnu packages swig)
   #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages xml)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (srfi srfi-1))
 
@@ -1060,6 +1061,53 @@ through the Engine interface.")
              (propagated-inputs
               `(("python2-typing" ,python2-typing))))))
 
+(define-public python-pykeepass
+  (package
+    (name "python-pykeepass")
+    (version "3.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       ;; Source tarball on PyPI doesn't include tests.
+       (uri (git-reference
+             (url "https://github.com/libkeepass/pykeepass")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1wxbfpy7467mlnfsvmh685fhfnq4fki9y7yc9cylp30r5n3hisaj"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'make-kdbx-writable
+           ;; Tests have to write to the .kdbx files in the test directory.
+           (lambda _
+             (with-directory-excursion "tests"
+               (for-each make-file-writable (find-files "."))
+               #t)))
+         (add-before 'build 'patch-requirements
+           (lambda _
+             ;; Update requirements from dependency==version
+             ;; to dependency>=version.
+             (substitute* "setup.py"
+               (("==") ">="))
+             #t)))))
+    (propagated-inputs
+     `(("python-argon2-cffi" ,python-argon2-cffi)
+       ("python-construct" ,python-construct)
+       ("python-dateutil" ,python-dateutil)
+       ("python-future" ,python-future)
+       ("python-lxml" ,python-lxml)
+       ("python-pycryptodome" ,python-pycryptodome)))
+    (home-page "https://github.com/libkeepass/pykeepass")
+    (synopsis "Python library to interact with keepass databases")
+    (description
+     "This library allows you to write entries to a KeePass database.  It
+supports KDBX3 and KDBX4.")
+    ;; There are no copyright headers in the source code.  The LICENSE file
+    ;; indicates GPL3.
+    (license license:gpl3)))
+
 (define-public python-pylibscrypt
   (package
     (name "python-pylibscrypt")
-- 
2.20.1





Information forwarded to guix-patches <at> gnu.org:
bug#43939; Package guix-patches. (Mon, 12 Oct 2020 03:43:02 GMT) Full text and rfc822 format available.

Message #8 received at 43939 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: 43939 <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH 2/3] gnu: libpwquality: Enable Python binding.
Date: Mon, 12 Oct 2020 00:42:19 -0300
* gnu/packages/password-utils.scm (libpwquality)[arguments]: Enable Python binding.
[native-inputs]: Add python-minimal-wrapper.
---
 gnu/packages/password-utils.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 85dbeef28f..e22d147468 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -28,6 +28,7 @@
 ;;; Copyright © 2020 Brice Waegeneire <brice <at> waegenei.re>
 ;;; Copyright © 2020 Jean-Baptiste Note <jean-baptiste.note <at> m4x.org>
 ;;; Copyright © 2020 Michael Rohleder <mike <at> rohleder.de>
+;;; Copyright © 2020 Vinicius Monego <monego <at> posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -381,8 +382,17 @@ them out, at the source.")
                 "13hw532fmzc5xjpy75d74rlfdlxf2a8ibb4hyy9c0s92wsgf0qsj"))))
     (build-system gnu-build-system)
     (arguments
-     ;; XXX: have RUNPATH issue.
-     '(#:configure-flags '("--disable-python-bindings")))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'set-LDFLAGS
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (setenv "LDFLAGS"
+                     (string-append
+                      "-Wl,-rpath="
+                      (assoc-ref outputs "out") "/lib"))
+             #t)))))
+    (native-inputs
+     `(("python" ,python-minimal-wrapper)))
     (inputs
      `(("cracklib" ,cracklib)))
     (synopsis "Password quality checker")
-- 
2.20.1





Information forwarded to guix-patches <at> gnu.org:
bug#43939; Package guix-patches. (Mon, 12 Oct 2020 03:43:02 GMT) Full text and rfc822 format available.

Message #11 received at 43939 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: 43939 <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH 3/3] gnu: Add passwordsafe.
Date: Mon, 12 Oct 2020 00:42:20 -0300
* gnu/packages/gnome.scm (passwordsafe): New variable.
---
 gnu/packages/gnome.scm | 54 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index bb4e64347e..e6cdb44a4d 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -10344,6 +10344,60 @@ photo-booth-like software, such as Cheese.")
 apply fancy special effects and lets you share the fun with others.")
     (license license:gpl2+)))
 
+(define-public passwordsafe
+  (package
+    (name "passwordsafe")
+    (version "3.99.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.gnome.org/World/PasswordSafe")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0pi2l4gwf8paxm858mxrcsk5nr0c0zw5ycax40mghndb6b1qmmhf"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((prog (string-append (assoc-ref outputs "out")
+                                        "/bin/gnome-passwordsafe"))
+                   (pylib (string-append (assoc-ref outputs "out")
+                                         "/lib/python"
+                                         ,(version-major+minor
+                                           (package-version python))
+                                         "/site-packages")))
+               (wrap-program prog
+                 `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
+                 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
+               #t))))))
+    (native-inputs
+     `(("desktop-file-utils" ,desktop-file-utils)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gtk+:bin" ,gtk+ "bin")
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glib" ,glib)
+       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+       ("gtk+" ,gtk+)
+       ("libhandy" ,libhandy-0.0)
+       ("libpwquality" ,libpwquality)
+       ("python-pygobject" ,python-pygobject)
+       ("python-pykeepass" ,python-pykeepass)))
+    (home-page "https://gitlab.gnome.org/World/PasswordSafe")
+    (synopsis "Password manager for the GNOME desktop")
+    (description
+     "Password Safe is a password manager which makes use of the KeePass v4
+format.  It integrates perfectly with the GNOME desktop and provides an easy
+and uncluttered interface for the management of password databases.")
+    (license license:gpl3)))
+
 (define-public sound-juicer
   (package
     (name "sound-juicer")
-- 
2.20.1





Reply sent to Marius Bakke <marius <at> gnu.org>:
You have taken responsibility. (Sun, 18 Oct 2020 21:33:02 GMT) Full text and rfc822 format available.

Notification sent to Vinicius Monego <monego <at> posteo.net>:
bug acknowledged by developer. (Sun, 18 Oct 2020 21:33:02 GMT) Full text and rfc822 format available.

Message #16 received at 43939-done <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <marius <at> gnu.org>
To: Vinicius Monego <monego <at> posteo.net>, 43939-done <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: Re: [bug#43939] [PATCH 1/3] gnu: Add python-pykeepass.
Date: Sun, 18 Oct 2020 23:32:48 +0200
[Message part 1 (text/plain, inline)]
Vinicius Monego <monego <at> posteo.net> writes:

> * gnu/packages/python-crypto.scm (python-pykeepass): New variable.

[...]

> +    ;; There are no copyright headers in the source code.  The LICENSE file
> +    ;; indicates GPL3.
> +    (license license:gpl3)))

In cases like these (when no explicit version is mentioned), we use
GPL3+.  See section 14 of the GPLv3.

I made this change and committed, thanks!
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#43939; Package guix-patches. (Sun, 18 Oct 2020 21:36:01 GMT) Full text and rfc822 format available.

Message #19 received at 43939-done <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <marius <at> gnu.org>
To: Vinicius Monego <monego <at> posteo.net>, 43939-done <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: Re: [bug#43939] [PATCH 2/3] gnu: libpwquality: Enable Python binding.
Date: Sun, 18 Oct 2020 23:35:27 +0200
[Message part 1 (text/plain, inline)]
Vinicius Monego <monego <at> posteo.net> writes:

> * gnu/packages/password-utils.scm (libpwquality)[arguments]: Enable Python binding.
> [native-inputs]: Add python-minimal-wrapper.

I changed this to 'python-wrapper' and committed.  The python-minimal
variants exists mostly to solve a bootstrap cycle.

Thanks!
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#43939; Package guix-patches. (Sun, 18 Oct 2020 21:39:01 GMT) Full text and rfc822 format available.

Message #22 received at 43939-done <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <marius <at> gnu.org>
To: Vinicius Monego <monego <at> posteo.net>, 43939-done <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: Re: [bug#43939] [PATCH 3/3] gnu: Add passwordsafe.
Date: Sun, 18 Oct 2020 23:38:07 +0200
[Message part 1 (text/plain, inline)]
Vinicius Monego <monego <at> posteo.net> writes:

> * gnu/packages/gnome.scm (passwordsafe): New variable.

[...]

> +    (license license:gpl3)))

I changed to GPL3+ since no explicit version is mentioned.

Thanks!
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 16 Nov 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 230 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.