GNU bug report logs -
#26118
[PATCH] gnu: password-store: Fix compatibility with GnuPG 2.1.19.
Previous Next
Reported by: Clément Lassieur <clement <at> lassieur.org>
Date: Thu, 16 Mar 2017 00:48:01 UTC
Severity: normal
Tags: patch
Done: Clément Lassieur <clement <at> lassieur.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 26118 in the body.
You can then email your comments to 26118 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#26118
; Package
guix-patches
.
(Thu, 16 Mar 2017 00:48:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Clément Lassieur <clement <at> lassieur.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 16 Mar 2017 00:48:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/patches/password-store-gnupg-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/password-utils.scm (password-store)[source]: Use it.
This fixes the tests too.
There is a discussion about this patch:
https://bugzilla.suse.com/show_bug.cgi?id=1028867. I took the one from
Andreas.
---
gnu/local.mk | 2 +
gnu/packages/password-utils.scm | 4 +-
.../patches/password-store-gnupg-compat.patch | 50 ++++++++++++++++++++++
3 files changed, 55 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/password-store-gnupg-compat.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index c1b076a5f..b3aa79ad9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -9,6 +9,7 @@
# Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno <at> openmailbox.org>
# Copyright © 2016, 2017 Ricardo Wurmus <rekado <at> elephly.net>
# Copyright © 2016 Ben Woodcroft <donttrustben <at> gmail.com>
+# Copyright © 2017 Clément Lassieur <clement <at> lassieur.org>
#
# This file is part of GNU Guix.
#
@@ -806,6 +807,7 @@ dist_patch_DATA = \
%D%/packages/patches/ots-no-include-missing-file.patch \
%D%/packages/patches/p7zip-CVE-2016-9296.patch \
%D%/packages/patches/p7zip-remove-unused-code.patch \
+ %D%/packages/patches/password-store-gnupg-compat.patch \
%D%/packages/patches/patchelf-page-size.patch \
%D%/packages/patches/patchelf-rework-for-arm.patch \
%D%/packages/patches/patchutils-xfail-gendiff-tests.patch \
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 811173cae..3f125a011 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2016 Lukas Gradl <lgradl <at> openmailbox.org>
;;; Copyright © 2016 Alex Griffin <a <at> ajgrf.com>
;;; Copyright © 2017 Leo Famulari <leo <at> famulari.name>
+;;; Copyright © 2017 Clément Lassieur <clement <at> lassieur.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -291,7 +292,8 @@ any X11 window.")
name "-" version ".tar.xz"))
(sha256
(base32
- "002mw7j0m33bw483rllzhcf41wp3ixka8yma6kqrfaj57jyw66hn"))))
+ "002mw7j0m33bw483rllzhcf41wp3ixka8yma6kqrfaj57jyw66hn"))
+ (patches (search-patches "password-store-gnupg-compat.patch"))))
(build-system gnu-build-system)
(arguments
'(#:phases
diff --git a/gnu/packages/patches/password-store-gnupg-compat.patch b/gnu/packages/patches/password-store-gnupg-compat.patch
new file mode 100644
index 000000000..972b89033
--- /dev/null
+++ b/gnu/packages/patches/password-store-gnupg-compat.patch
@@ -0,0 +1,50 @@
+Copied from upstream mailing list:
+https://lists.zx2c4.com/pipermail/password-store/2017-March/002844.html.
+
+From 8723d8e8192683891904aff321446b0fac37d1ad Mon Sep 17 00:00:00 2001
+From: Andreas Stieger <astieger <at> suse.com>
+Date: Fri, 10 Mar 2017 15:43:26 +0100
+Subject: [PATCH] Fix compatibility with GnuPG 2.2.19
+
+GnuPG 2.2.19 added a warning when no command was given.
+
+* src/password-store.sh (reencrypt_path): Add --decrypt to --list-only
+* tests/t0300-reencryption.sh (gpg_keys_from_encrypted_file): same
+
+https://bugs.gnupg.org/gnupg/msg9873
+http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=810adfd47801fc01e45fb71af9f05c91f7890cdb
+https://bugzilla.suse.com/show_bug.cgi?id=1028867
+---
+ src/password-store.sh | 2 +-
+ tests/t0300-reencryption.sh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/password-store.sh b/src/password-store.sh
+index 1ab6fb5..bad8d4f 100755
+--- a/src/password-store.sh
++++ b/src/password-store.sh
+@@ -125,7 +125,7 @@ reencrypt_path() {
+ done
+ gpg_keys="$($GPG $PASSWORD_STORE_GPG_OPTS --list-keys --with-colons "${GPG_RECIPIENTS[@]}" | sed -n 's/sub:[^:]*:[^:]*:[^:]*:\([^:]*\):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[a-zA-Z]*e[a-zA-Z]*:.*/\1/p' | LC_ALL=C sort -u)"
+ fi
+- current_keys="$($GPG $PASSWORD_STORE_GPG_OPTS -v --no-secmem-warning --no-permission-warning --list-only --keyid-format long "$passfile" 2>&1 | cut -d ' ' -f 5 | LC_ALL=C sort -u)"
++ current_keys="$($GPG $PASSWORD_STORE_GPG_OPTS -v --no-secmem-warning --no-permission-warning --decrypt --list-only --keyid-format long "$passfile" 2>&1 | cut -d ' ' -f 5 | LC_ALL=C sort -u)"
+
+ if [[ $gpg_keys != "$current_keys" ]]; then
+ echo "$passfile_display: reencrypting to ${gpg_keys//$'\n'/ }"
+diff --git a/tests/t0300-reencryption.sh b/tests/t0300-reencryption.sh
+index 9d46580..6d5811d 100755
+--- a/tests/t0300-reencryption.sh
++++ b/tests/t0300-reencryption.sh
+@@ -10,7 +10,7 @@ canonicalize_gpg_keys() {
+ $GPG --list-keys --with-colons "$@" | sed -n 's/sub:[^:]*:[^:]*:[^:]*:\([^:]*\):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[a-zA-Z]*e[a-zA-Z]*:.*/\1/p' | LC_ALL=C sort -u
+ }
+ gpg_keys_from_encrypted_file() {
+- $GPG -v --no-secmem-warning --no-permission-warning --list-only --keyid-format long "$1" 2>&1 | cut -d ' ' -f 5 | LC_ALL=C sort -u
++ $GPG -v --no-secmem-warning --no-permission-warning --decrypt --list-only --keyid-format long "$1" 2>&1 | cut -d ' ' -f 5 | LC_ALL=C sort -u
+ }
+ gpg_keys_from_group() {
+ local output="$($GPG --list-config --with-colons | sed -n "s/^cfg:group:$1:\\(.*\\)/\\1/p" | head -n 1)"
+--
+2.12.0
+
--
2.12.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26118
; Package
guix-patches
.
(Thu, 16 Mar 2017 04:48:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 26118 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, Mar 16, 2017 at 01:46:30AM +0100, Clément Lassieur wrote:
> * gnu/packages/patches/password-store-gnupg-compat.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/password-utils.scm (password-store)[source]: Use it.
Thanks!
> This fixes the tests too.
>
> There is a discussion about this patch:
> https://bugzilla.suse.com/show_bug.cgi?id=1028867. I took the one from
> Andreas.
This doesn't need to go in the commit message.
> diff --git a/gnu/packages/patches/password-store-gnupg-compat.patch b/gnu/packages/patches/password-store-gnupg-compat.patch
> new file mode 100644
> index 000000000..972b89033
> --- /dev/null
> +++ b/gnu/packages/patches/password-store-gnupg-compat.patch
> @@ -0,0 +1,50 @@
> +Copied from upstream mailing list:
> +https://lists.zx2c4.com/pipermail/password-store/2017-March/002844.html.
> +
> +From 8723d8e8192683891904aff321446b0fac37d1ad Mon Sep 17 00:00:00 2001
> +From: Andreas Stieger <astieger <at> suse.com>
> +Date: Fri, 10 Mar 2017 15:43:26 +0100
> +Subject: [PATCH] Fix compatibility with GnuPG 2.2.19
> +
> +GnuPG 2.2.19 added a warning when no command was given.
The version is 2.1.19. We should say that the patch actually restores
compatibility with GnuPG 2.1.19 and that the '2.2.19' in the commit
message is a typo.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26118
; Package
guix-patches
.
(Thu, 16 Mar 2017 09:34:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 26118 <at> debbugs.gnu.org (full text, mbox):
Leo Famulari <leo <at> famulari.name> writes:
>> This fixes the tests too.
>>
>> There is a discussion about this patch:
>> https://bugzilla.suse.com/show_bug.cgi?id=1028867. I took the one from
>> Andreas.
>
> This doesn't need to go in the commit message.
Oh I got mixed up about git send-email, sorry.
>> diff --git a/gnu/packages/patches/password-store-gnupg-compat.patch b/gnu/packages/patches/password-store-gnupg-compat.patch
>> new file mode 100644
>> index 000000000..972b89033
>> --- /dev/null
>> +++ b/gnu/packages/patches/password-store-gnupg-compat.patch
>> @@ -0,0 +1,50 @@
>> +Copied from upstream mailing list:
>> +https://lists.zx2c4.com/pipermail/password-store/2017-March/002844.html.
>> +
>> +From 8723d8e8192683891904aff321446b0fac37d1ad Mon Sep 17 00:00:00 2001
>> +From: Andreas Stieger <astieger <at> suse.com>
>> +Date: Fri, 10 Mar 2017 15:43:26 +0100
>> +Subject: [PATCH] Fix compatibility with GnuPG 2.2.19
>> +
>> +GnuPG 2.2.19 added a warning when no command was given.
>
> The version is 2.1.19. We should say that the patch actually restores
> compatibility with GnuPG 2.1.19 and that the '2.2.19' in the commit
> message is a typo.
Ok.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26118
; Package
guix-patches
.
(Thu, 16 Mar 2017 09:39:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 26118 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/patches/password-store-gnupg-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/password-utils.scm (password-store)[source]: Use it.
---
gnu/local.mk | 2 +
gnu/packages/password-utils.scm | 4 +-
.../patches/password-store-gnupg-compat.patch | 53 ++++++++++++++++++++++
3 files changed, 58 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/password-store-gnupg-compat.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index c1b076a5f..b3aa79ad9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -9,6 +9,7 @@
# Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno <at> openmailbox.org>
# Copyright © 2016, 2017 Ricardo Wurmus <rekado <at> elephly.net>
# Copyright © 2016 Ben Woodcroft <donttrustben <at> gmail.com>
+# Copyright © 2017 Clément Lassieur <clement <at> lassieur.org>
#
# This file is part of GNU Guix.
#
@@ -806,6 +807,7 @@ dist_patch_DATA = \
%D%/packages/patches/ots-no-include-missing-file.patch \
%D%/packages/patches/p7zip-CVE-2016-9296.patch \
%D%/packages/patches/p7zip-remove-unused-code.patch \
+ %D%/packages/patches/password-store-gnupg-compat.patch \
%D%/packages/patches/patchelf-page-size.patch \
%D%/packages/patches/patchelf-rework-for-arm.patch \
%D%/packages/patches/patchutils-xfail-gendiff-tests.patch \
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 811173cae..3f125a011 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2016 Lukas Gradl <lgradl <at> openmailbox.org>
;;; Copyright © 2016 Alex Griffin <a <at> ajgrf.com>
;;; Copyright © 2017 Leo Famulari <leo <at> famulari.name>
+;;; Copyright © 2017 Clément Lassieur <clement <at> lassieur.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -291,7 +292,8 @@ any X11 window.")
name "-" version ".tar.xz"))
(sha256
(base32
- "002mw7j0m33bw483rllzhcf41wp3ixka8yma6kqrfaj57jyw66hn"))))
+ "002mw7j0m33bw483rllzhcf41wp3ixka8yma6kqrfaj57jyw66hn"))
+ (patches (search-patches "password-store-gnupg-compat.patch"))))
(build-system gnu-build-system)
(arguments
'(#:phases
diff --git a/gnu/packages/patches/password-store-gnupg-compat.patch b/gnu/packages/patches/password-store-gnupg-compat.patch
new file mode 100644
index 000000000..c314ba664
--- /dev/null
+++ b/gnu/packages/patches/password-store-gnupg-compat.patch
@@ -0,0 +1,53 @@
+Copied from upstream mailing list:
+https://lists.zx2c4.com/pipermail/password-store/2017-March/002844.html.
+
+The patch actually restores compatibility with GnuPG 2.1.19, the '2.2.19' in
+the commit message is a typo.
+
+From 8723d8e8192683891904aff321446b0fac37d1ad Mon Sep 17 00:00:00 2001
+From: Andreas Stieger <astieger <at> suse.com>
+Date: Fri, 10 Mar 2017 15:43:26 +0100
+Subject: [PATCH] Fix compatibility with GnuPG 2.2.19
+
+GnuPG 2.2.19 added a warning when no command was given.
+
+* src/password-store.sh (reencrypt_path): Add --decrypt to --list-only
+* tests/t0300-reencryption.sh (gpg_keys_from_encrypted_file): same
+
+https://bugs.gnupg.org/gnupg/msg9873
+http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=810adfd47801fc01e45fb71af9f05c91f7890cdb
+https://bugzilla.suse.com/show_bug.cgi?id=1028867
+---
+ src/password-store.sh | 2 +-
+ tests/t0300-reencryption.sh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/password-store.sh b/src/password-store.sh
+index 1ab6fb5..bad8d4f 100755
+--- a/src/password-store.sh
++++ b/src/password-store.sh
+@@ -125,7 +125,7 @@ reencrypt_path() {
+ done
+ gpg_keys="$($GPG $PASSWORD_STORE_GPG_OPTS --list-keys --with-colons "${GPG_RECIPIENTS[@]}" | sed -n 's/sub:[^:]*:[^:]*:[^:]*:\([^:]*\):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[a-zA-Z]*e[a-zA-Z]*:.*/\1/p' | LC_ALL=C sort -u)"
+ fi
+- current_keys="$($GPG $PASSWORD_STORE_GPG_OPTS -v --no-secmem-warning --no-permission-warning --list-only --keyid-format long "$passfile" 2>&1 | cut -d ' ' -f 5 | LC_ALL=C sort -u)"
++ current_keys="$($GPG $PASSWORD_STORE_GPG_OPTS -v --no-secmem-warning --no-permission-warning --decrypt --list-only --keyid-format long "$passfile" 2>&1 | cut -d ' ' -f 5 | LC_ALL=C sort -u)"
+
+ if [[ $gpg_keys != "$current_keys" ]]; then
+ echo "$passfile_display: reencrypting to ${gpg_keys//$'\n'/ }"
+diff --git a/tests/t0300-reencryption.sh b/tests/t0300-reencryption.sh
+index 9d46580..6d5811d 100755
+--- a/tests/t0300-reencryption.sh
++++ b/tests/t0300-reencryption.sh
+@@ -10,7 +10,7 @@ canonicalize_gpg_keys() {
+ $GPG --list-keys --with-colons "$@" | sed -n 's/sub:[^:]*:[^:]*:[^:]*:\([^:]*\):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[a-zA-Z]*e[a-zA-Z]*:.*/\1/p' | LC_ALL=C sort -u
+ }
+ gpg_keys_from_encrypted_file() {
+- $GPG -v --no-secmem-warning --no-permission-warning --list-only --keyid-format long "$1" 2>&1 | cut -d ' ' -f 5 | LC_ALL=C sort -u
++ $GPG -v --no-secmem-warning --no-permission-warning --decrypt --list-only --keyid-format long "$1" 2>&1 | cut -d ' ' -f 5 | LC_ALL=C sort -u
+ }
+ gpg_keys_from_group() {
+ local output="$($GPG --list-config --with-colons | sed -n "s/^cfg:group:$1:\\(.*\\)/\\1/p" | head -n 1)"
+--
+2.12.0
+
--
2.12.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26118
; Package
guix-patches
.
(Thu, 16 Mar 2017 17:27:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 26118 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, Mar 16, 2017 at 10:37:43AM +0100, Clément Lassieur wrote:
> * gnu/packages/patches/password-store-gnupg-compat.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/password-utils.scm (password-store)[source]: Use it.
LGTM, thanks!
[signature.asc (application/pgp-signature, inline)]
Reply sent
to
Clément Lassieur <clement <at> lassieur.org>
:
You have taken responsibility.
(Thu, 16 Mar 2017 19:04:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Clément Lassieur <clement <at> lassieur.org>
:
bug acknowledged by developer.
(Thu, 16 Mar 2017 19:04:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 26118-done <at> debbugs.gnu.org (full text, mbox):
Leo Famulari <leo <at> famulari.name> writes:
> On Thu, Mar 16, 2017 at 10:37:43AM +0100, Clément Lassieur wrote:
>> * gnu/packages/patches/password-store-gnupg-compat.patch: New file.
>> * gnu/local.mk (dist_patch_DATA): Add it.
>> * gnu/packages/password-utils.scm (password-store)[source]: Use it.
>
> LGTM, thanks!
Thanks for the review!
Pushed as 2c715a922324e0cd1ab50c5ea0b70f12a33565d5.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 14 Apr 2017 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 70 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.