* [bug#60003] [PATCH 3/3] gnu: Add pass-import.
[not found] <40ad2d0262052c5ddac3c957391b2ac2df9fede2.1673440963.git.tobias.kortkamp@gmail.com>
@ 2023-01-11 12:44 ` Tobias Kortkamp
0 siblings, 0 replies; 5+ messages in thread
From: Tobias Kortkamp @ 2023-01-11 12:44 UTC (permalink / raw)
To: 60003; +Cc: Tobias Kortkamp
* gnu/packages/password-utils.scm (pass-import): New variable.
---
gnu/packages/password-utils.scm | 72 +++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 9fc41d9b0a..f84e80e9cb 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -38,6 +38,7 @@
;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2022 ( <paren@disroot.org>
;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2022 Tobias Kortkamp <tobias.kortkamp@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -101,6 +102,7 @@ (define-module (gnu packages password-utils)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages readline)
@@ -1493,3 +1495,73 @@ (define-public xkcdpass
license:lgpl2.0 ;finnish word list
license:lgpl2.1 ;portuguese word list
license:mpl1.1)))) ;portuguese word list
+
+(define-public pass-import
+ (package
+ (name "pass-import")
+ (version "3.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/roddhjav/pass-import"
+ "/releases/download/v" version "/pass-import-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "18vh97h3bmspwqhb9xjkapk3p8hy4rxhazrcc06f6pdz8rb6rxxp"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("import.bash")
+ (("python3")
+ (search-input-file inputs "/bin/python3")))
+ (substitute* '("setup.py")
+ (("base = '/usr'")
+ (string-append "base = '" #$output "'"))
+ (("sys\\.prefix")
+ (string-append "'" #$output "'")))))
+ (add-after 'install 'wrap-extension
+ (lambda _
+ (let ((pylib (string-append #$output "/lib/python"
+ #$(version-major+minor
+ (package-version python))
+ "/site-packages"))
+ (extension "/lib/password-store/extensions/import.bash"))
+ (wrap-program (string-append #$output extension)
+ (list "GUIX_PYTHONPATH" ":"
+ 'prefix
+ (list (getenv "GUIX_PYTHONPATH")
+ pylib))))))
+ (add-before 'check 'disable-lastpass-and-dbus-tests
+ (lambda _
+ (substitute* '("tests/imports/test_parse.py")
+ ;; requires running D-Bus session
+ (("test_import_gnome_keyring") "disabled_test_import_gnome_keyring")
+ ;; requires lastpass
+ (("test_import_lastpass") "disabled_test_import_lastpass"))
+ (substitute* '("tests/exports/test_lastpass.py")
+ (("test_import_lastpass") "disabled_test_import_lastpass")
+ (("test_lastpass_exist") "disabled_test_lastpass_exist")
+ (("test_lastpass_insert") "disabled_test_lastpass_insert")
+ (("test_lastpass_show") "disabled_test_lastpass_show")
+ (("test_lastpass_list") "disabled_test_lastpass_list")
+ (("test_lastpass_isvalid") "disabled_test_lastpass_isvalid")))))))
+ (inputs (list gnupg
+ password-store
+ python-cryptography
+ python-defusedxml
+ python-magic
+ python-pyaml
+ python-pykeepass
+ python-requests
+ python-secretstorage
+ python-zxcvbn))
+ (home-page "https://github.com/roddhjav/pass-import")
+ (synopsis
+ "Pass extension for importing data from many password managers")
+ (description
+ "This package provides a pass extension for importing data from many password
+managers. @command{pimport} can be used to export data to other password managers
+like gopass or keepassxc.")
+ (license license:gpl3+)))
--
2.38.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#60003] [PATCH 0/3] gnu: Add pass-import.
@ 2022-12-12 11:46 Tobias Kortkamp
2022-12-12 11:49 ` [bug#60003] [PATCH 3/3] " Tobias Kortkamp
0 siblings, 1 reply; 5+ messages in thread
From: Tobias Kortkamp @ 2022-12-12 11:46 UTC (permalink / raw)
To: 60003; +Cc: Tobias Kortkamp
Hi,
this add pass-import which was useful for migrating from keepassxc to
pass. python-pykeepass needed to be updated which in turn required a newer
python-construct.
Best regards,
Tobias Kortkamp (3):
gnu: python-construct: Update to 2.10.68.
gnu: python-pykeepass: Update to 4.0.3.
gnu: Add pass-import.
gnu/packages/password-utils.scm | 71 +++++++++++++++++++++++++++++++++
gnu/packages/python-crypto.scm | 6 +--
gnu/packages/python-xyz.scm | 4 +-
3 files changed, 76 insertions(+), 5 deletions(-)
base-commit: 2d989ad59793e10c6fef94d9eaa51be91469318a
--
2.38.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#60003] [PATCH 3/3] gnu: Add pass-import.
2022-12-12 11:46 [bug#60003] [PATCH 0/3] " Tobias Kortkamp
@ 2022-12-12 11:49 ` Tobias Kortkamp
2023-01-05 15:21 ` Jelle Licht
0 siblings, 1 reply; 5+ messages in thread
From: Tobias Kortkamp @ 2022-12-12 11:49 UTC (permalink / raw)
To: 60003; +Cc: Tobias Kortkamp
* gnu/packages/password-utils.scm (pass-import): New variable.
---
gnu/packages/password-utils.scm | 71 +++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index aab0a3f2a4..79781ed9e6 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -38,6 +38,7 @@
;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2022 ( <paren@disroot.org>
;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2022 Tobias Kortkamp <tobias.kortkamp@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -101,6 +102,7 @@ (define-module (gnu packages password-utils)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages readline)
@@ -1492,3 +1494,72 @@ (define-public xkcdpass
license:lgpl2.0 ;finnish word list
license:lgpl2.1 ;portuguese word list
license:mpl1.1)))) ;portuguese word list
+
+(define-public pass-import
+ (package
+ (name "pass-import")
+ (version "3.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/roddhjav/pass-import"
+ "/releases/download/" version "/pass-import-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "18vh97h3bmspwqhb9xjkapk3p8hy4rxhazrcc06f6pdz8rb6rxxp"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("import.bash")
+ (("python3")
+ #$(file-append python-wrapper "/bin/python")))
+ (substitute* '("setup.py")
+ (("base = '/usr'")
+ (string-append "base = '" #$output "'"))
+ (("sys\\.prefix")
+ (string-append "'" #$output "'")))
+ (substitute* '("tests/imports/test_parse.py")
+ ;; requires running D-Bus session
+ (("test_import_gnome_keyring") "disabled_test_import_gnome_keyring")
+ ;; requires lastpass
+ (("test_import_lastpass") "disabled_test_import_lastpass"))
+ (substitute* '("tests/exports/test_lastpass.py")
+ (("test_import_lastpass") "disabled_test_import_lastpass")
+ (("test_lastpass_exist") "disabled_test_lastpass_exist")
+ (("test_lastpass_insert") "disabled_test_lastpass_insert")
+ (("test_lastpass_show") "disabled_test_lastpass_show")
+ (("test_lastpass_list") "disabled_test_lastpass_list")
+ (("test_lastpass_isvalid") "disabled_test_lastpass_isvalid"))))
+ (add-after 'install 'wrap-extension
+ (lambda _
+ (let ((pylib (string-append #$output "/lib/python"
+ #$(version-major+minor
+ (package-version python))
+ "/site-packages"))
+ (extension (string-append #$output
+ "/lib/password-store/extensions/import.bash")))
+ (wrap-program extension
+ (list "GUIX_PYTHONPATH" ":"
+ 'prefix
+ (list (getenv "GUIX_PYTHONPATH")
+ pylib)))))))))
+ (inputs (list gnupg
+ password-store
+ python-cryptography
+ python-defusedxml
+ python-magic
+ python-pyaml
+ python-pykeepass
+ python-requests
+ python-secretstorage
+ python-zxcvbn))
+ (home-page "https://github.com/roddhjav/pass-import")
+ (synopsis
+ "Pass extension for importing data from many password managers")
+ (description
+ "This package provides a pass extension for importing data from many password
+managers. @command{pimport} can be used to export data to other password managers
+like gopass or keepassxc too.")
+ (license license:gpl3+)))
--
2.38.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#60003] [PATCH 3/3] gnu: Add pass-import.
2022-12-12 11:49 ` [bug#60003] [PATCH 3/3] " Tobias Kortkamp
@ 2023-01-05 15:21 ` Jelle Licht
2023-01-11 11:55 ` Tobias Kortkamp
0 siblings, 1 reply; 5+ messages in thread
From: Jelle Licht @ 2023-01-05 15:21 UTC (permalink / raw)
To: Tobias Kortkamp, 60003
Hello Tobias,
Tobias Kortkamp <tobias.kortkamp@gmail.com> writes:
> * gnu/packages/password-utils.scm (pass-import): New variable.
> ---
> gnu/packages/password-utils.scm | 71 +++++++++++++++++++++++++++++++++
> 1 file changed, 71 insertions(+)
>
> diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
> index aab0a3f2a4..79781ed9e6 100644
> --- a/gnu/packages/password-utils.scm
> +++ b/gnu/packages/password-utils.scm
> @@ -38,6 +38,7 @@
> ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
> ;;; Copyright © 2022 ( <paren@disroot.org>
> ;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr>
> +;;; Copyright © 2022 Tobias Kortkamp <tobias.kortkamp@gmail.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -101,6 +102,7 @@ (define-module (gnu packages password-utils)
> #:use-module (gnu packages perl)
> #:use-module (gnu packages pkg-config)
> #:use-module (gnu packages python)
> + #:use-module (gnu packages python-crypto)
> #:use-module (gnu packages python-web)
> #:use-module (gnu packages python-xyz)
> #:use-module (gnu packages readline)
> @@ -1492,3 +1494,72 @@ (define-public xkcdpass
> license:lgpl2.0 ;finnish word list
> license:lgpl2.1 ;portuguese word list
> license:mpl1.1)))) ;portuguese word list
> +
> +(define-public pass-import
> + (package
> + (name "pass-import")
> + (version "3.4")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/roddhjav/pass-import"
> + "/releases/download/" version "/pass-import-"
You missed a "v" here; could you make it "download/v" instead? That works for
me, with the provided base32 hash.
> + version ".tar.gz"))
> + (sha256
> + (base32 "18vh97h3bmspwqhb9xjkapk3p8hy4rxhazrcc06f6pdz8rb6rxxp"))))
> + (build-system python-build-system)
> + (arguments
> + (list #:phases
> + #~(modify-phases %standard-phases
> + (add-after 'unpack 'patch-paths
> + (lambda* (#:key inputs #:allow-other-keys)
> + (substitute* '("import.bash")
> + (("python3")
> + #$(file-append python-wrapper "/bin/python")))
Perhaps someone more experienced with our python-packages can still
weigh in, but wouldn't the following work here as well?
--8<---------------cut here---------------start------------->8---
(("python3")
(search-input-file inputs "/bin/python3")))
--8<---------------cut here---------------end--------------->8---
> + (substitute* '("setup.py")
> + (("base = '/usr'")
> + (string-append "base = '" #$output "'"))
> + (("sys\\.prefix")
> + (string-append "'" #$output "'")))
> + (substitute* '("tests/imports/test_parse.py")
> + ;; requires running D-Bus session
> + (("test_import_gnome_keyring") "disabled_test_import_gnome_keyring")
> + ;; requires lastpass
> + (("test_import_lastpass") "disabled_test_import_lastpass"))
> + (substitute* '("tests/exports/test_lastpass.py")
> + (("test_import_lastpass") "disabled_test_import_lastpass")
> + (("test_lastpass_exist") "disabled_test_lastpass_exist")
> + (("test_lastpass_insert") "disabled_test_lastpass_insert")
> + (("test_lastpass_show") "disabled_test_lastpass_show")
> + (("test_lastpass_list") "disabled_test_lastpass_list")
> + (("test_lastpass_isvalid") "disabled_test_lastpass_isvalid"))))
Nit: in this phase you seem to patch paths and disable tests. Consider splitting
it up into two phases.
I still run into some test failures:
--8<---------------cut here---------------start------------->8---
Ran 135 tests in 12.145s
FAILED (failures=6, errors=1, skipped=10)
Test failed: <unittest.runner.TextTestResult run=135 errors=1 failures=6>
error: Test failed: <unittest.runner.TextTestResult run=135 errors=1 failures=6>
Password-pwned-1
Password-pwned-2
Password-pwned-3
Password-pwned-4
Password-pwned-5
Password-pwned-6
Password-pwned-7
--8<---------------cut here---------------end--------------->8---
> + (add-after 'install 'wrap-extension
> + (lambda _
> + (let ((pylib (string-append #$output "/lib/python"
> + #$(version-major+minor
> + (package-version python))
> + "/site-packages"))
> + (extension (string-append #$output
> + "/lib/password-store/extensions/import.bash")))
This line seems to make `./pre-inst-env guix lint pass-import' unhappy,
as it is too wide.
> + (wrap-program extension
> + (list "GUIX_PYTHONPATH" ":"
> + 'prefix
> + (list (getenv "GUIX_PYTHONPATH")
> + pylib)))))))))
> + (inputs (list gnupg
> + password-store
> + python-cryptography
> + python-defusedxml
> + python-magic
> + python-pyaml
> + python-pykeepass
> + python-requests
> + python-secretstorage
> + python-zxcvbn))
> + (home-page "https://github.com/roddhjav/pass-import")
> + (synopsis
> + "Pass extension for importing data from many password managers")
> + (description
> + "This package provides a pass extension for importing data from many password
> +managers. @command{pimport} can be used to export data to other password managers
> +like gopass or keepassxc too.")
Consider removing superfluous 'too'.
Thanks again!
- Jelle
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#60003] [PATCH 3/3] gnu: Add pass-import.
2023-01-05 15:21 ` Jelle Licht
@ 2023-01-11 11:55 ` Tobias Kortkamp
2023-02-02 13:13 ` Jelle Licht
0 siblings, 1 reply; 5+ messages in thread
From: Tobias Kortkamp @ 2023-01-11 11:55 UTC (permalink / raw)
To: Jelle Licht; +Cc: 60003
Hi Jelle,
thanks for the review. I addressed most of the problems.
Jelle Licht <jlicht@fsfe.org> writes:
> I still run into some test failures:
>
> --8<---------------cut here---------------start------------->8---
> Ran 135 tests in 12.145s
>
> FAILED (failures=6, errors=1, skipped=10)
> Test failed: <unittest.runner.TextTestResult run=135 errors=1 failures=6>
> error: Test failed: <unittest.runner.TextTestResult run=135 errors=1 failures=6>
> Password-pwned-1
> Password-pwned-2
> Password-pwned-3
> Password-pwned-4
> Password-pwned-5
> Password-pwned-6
> Password-pwned-7
> --8<---------------cut here---------------end--------------->8---
>
Hmm, I can't reproduce this on a8b2decf287498eeb51ef23712c5bd01b60cb18b
Not sure what's going on here.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#60003] [PATCH 3/3] gnu: Add pass-import.
2023-01-11 11:55 ` Tobias Kortkamp
@ 2023-02-02 13:13 ` Jelle Licht
0 siblings, 0 replies; 5+ messages in thread
From: Jelle Licht @ 2023-02-02 13:13 UTC (permalink / raw)
To: Tobias Kortkamp; +Cc: 60003
Hi Tobias,
Tobias Kortkamp <tobias.kortkamp@gmail.com> writes:
> Hi Jelle,
>
> thanks for the review. I addressed most of the problems.
Great to hear! Any chance you could share it ;-)?
>
> Jelle Licht <jlicht@fsfe.org> writes:
>
>> I still run into some test failures:
>>
>> --8<---------------cut here---------------start------------->8---
>> Ran 135 tests in 12.145s
>>
>> FAILED (failures=6, errors=1, skipped=10)
>> Test failed: <unittest.runner.TextTestResult run=135 errors=1 failures=6>
>> error: Test failed: <unittest.runner.TextTestResult run=135 errors=1 failures=6>
>> Password-pwned-1
>> Password-pwned-2
>> Password-pwned-3
>> Password-pwned-4
>> Password-pwned-5
>> Password-pwned-6
>> Password-pwned-7
>> --8<---------------cut here---------------end--------------->8---
>>
>
> Hmm, I can't reproduce this on a8b2decf287498eeb51ef23712c5bd01b60cb18b
This should be picked up by our QA system if you send a revised patch
series, I think, so we'll be able to tell if the problem is just on my
end or not.
Kind regards,
- Jelle
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-02 13:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <40ad2d0262052c5ddac3c957391b2ac2df9fede2.1673440963.git.tobias.kortkamp@gmail.com>
2023-01-11 12:44 ` [bug#60003] [PATCH 3/3] gnu: Add pass-import Tobias Kortkamp
2022-12-12 11:46 [bug#60003] [PATCH 0/3] " Tobias Kortkamp
2022-12-12 11:49 ` [bug#60003] [PATCH 3/3] " Tobias Kortkamp
2023-01-05 15:21 ` Jelle Licht
2023-01-11 11:55 ` Tobias Kortkamp
2023-02-02 13:13 ` Jelle Licht
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).