[Pkg-privacy-commits] [parcimonie] 03/04: New patch: honor custom GnuPG homedir in a few places that did not so far (Closes: #835774).

Intrigeri intrigeri at moszumanska.debian.org
Sun Sep 11 11:54:57 UTC 2016


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to branch master
in repository parcimonie.

commit 7b9bd2ccd7a114b8b9591da39e54dc1d05aafb5d
Author: intrigeri <intrigeri at boum.org>
Date:   Sun Sep 11 11:25:53 2016 +0000

    New patch: honor custom GnuPG homedir in a few places that did not so far (Closes: #835774).
---
 ...PG-homedir-in-a-few-places-that-did-not-s.patch | 54 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 55 insertions(+)

diff --git a/debian/patches/Honor-custom-GnuPG-homedir-in-a-few-places-that-did-not-s.patch b/debian/patches/Honor-custom-GnuPG-homedir-in-a-few-places-that-did-not-s.patch
new file mode 100644
index 0000000..1b23768
--- /dev/null
+++ b/debian/patches/Honor-custom-GnuPG-homedir-in-a-few-places-that-did-not-s.patch
@@ -0,0 +1,54 @@
+From: intrigeri <intrigeri at boum.org>
+Date: Sun, 11 Sep 2016 11:23:30 +0000
+Subject: Honor custom GnuPG homedir in a few places that did not so far.
+
+This resulted for example in the test suite trying to start a dirmngr
+using ~/.gnupg/, while we had instructed it to use a custom GnuPG
+homedir; as a result, tests were failing for wrong reasons.
+---
+ lib/App/Parcimonie.pm                 |  8 +++++++-
+ lib/App/Parcimonie/GnuPG/Interface.pm | 10 ++++++++--
+ 2 files changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/lib/App/Parcimonie.pm b/lib/App/Parcimonie.pm
+index 71d373f..0bbcbba 100644
+--- a/lib/App/Parcimonie.pm
++++ b/lib/App/Parcimonie.pm
+@@ -174,7 +174,13 @@ sub checkGpgHasDefinedKeyserver {
+     my $gnupg2        = $arg_ref->{gnupg2};
+ 
+     if ($gnupg2) {
+-        my @output = capturex(qw{gpg-connect-agent --dirmngr keyserver /bye});
++        my @homedir_args = defined $gnupg_homedir
++            ? ('--homedir', $gnupg_homedir)
++            : ();
++        my @output = capturex(
++            'gpg-connect-agent', @homedir_args,
++            qw{--dirmngr keyserver /bye}
++        );
+         my $res = pop @output;
+         $res eq "OK\n" || croak "Agent replied: $res";
+         if (@output) {
+diff --git a/lib/App/Parcimonie/GnuPG/Interface.pm b/lib/App/Parcimonie/GnuPG/Interface.pm
+index 13bb6dc..8c53a6b 100644
+--- a/lib/App/Parcimonie/GnuPG/Interface.pm
++++ b/lib/App/Parcimonie/GnuPG/Interface.pm
+@@ -38,10 +38,16 @@ after 'BUILD' => sub {
+     my $self = shift;
+     if ($self->gnupg2) {
+         unless ($self->already_torified) {
+-            system(q{echo 'use-tor:0:1' | gpgconf --change-options dirmngr});
++            my $gnupg_homedir = defined $self->options->homedir()
++                ? $self->options->homedir()
++                : '';
++            system(
++                q{echo 'use-tor:0:1' | } .
++                "GNUPGHOME='$gnupg_homedir' gpgconf --change-options dirmngr"
++            );
+             # Passing --runtime to the previous command does not work,
+             # so we have to:
+-            systemx(qw{gpgconf --reload dirmngr});
++            system("GNUPGHOME='$gnupg_homedir' gpgconf --reload dirmngr");
+         }
+         $self->call('gpg2');
+     }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..64c9c5f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+Honor-custom-GnuPG-homedir-in-a-few-places-that-did-not-s.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/parcimonie.git



More information about the Pkg-privacy-commits mailing list