[Pkg-gnupg-commit] [gnupg2] 01/01: Use upstream fix to avoid touching homedir during test suite

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Sep 1 21:13:48 UTC 2016


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

dkg pushed a commit to branch master
in repository gnupg2.

commit bbcd4f60e834c79454d1eaf4adf052f8ff545f99
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Thu Sep 1 15:35:49 2016 -0400

    Use upstream fix to avoid touching homedir during test suite
---
 ...-suite-failures-when-HOME-is-non-existent.patch | 37 -------------------
 ...gpg-Avoid-homedir-creation-by-list-config.patch | 43 ++++++++++++++++++++++
 debian/patches/series                              |  2 +-
 3 files changed, 44 insertions(+), 38 deletions(-)

diff --git a/debian/patches/0006-avoid-test-suite-failures-when-HOME-is-non-existent.patch b/debian/patches/0006-avoid-test-suite-failures-when-HOME-is-non-existent.patch
deleted file mode 100644
index 82ae495..0000000
--- a/debian/patches/0006-avoid-test-suite-failures-when-HOME-is-non-existent.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
-Date: Wed, 31 Aug 2016 12:34:39 -0400
-Subject: avoid test suite failures when $HOME is non-existent
-
-When $HOME doesn't exist, the test suite can't run:
-
-0 dkg at alice:~$ HOME=/does-not-exist gpg --with-colons --list-config
-gpg: Fatal: can't create directory '/does-not-exist/.gnupg':
-   No such file or directory
-2 dkg at alice:~$
-
-I'm not sure why this suddenly matters (it didn't in 2.1.14) but it's
-causing build failures on the debian buildd's now.
----
- tests/openpgp/defs.scm | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/openpgp/defs.scm b/tests/openpgp/defs.scm
-index 4a968da..549d261 100644
---- a/tests/openpgp/defs.scm
-+++ b/tests/openpgp/defs.scm
-@@ -96,6 +96,7 @@
- (define (get-config what)
-   (string-split (caddar (gpg-with-colons `(--list-config ,what))) #\;))
- 
-+(setenv "GNUPGHOME" (getcwd) #t)
- (define all-pubkey-algos (get-config "pubkeyname"))
- (define all-hash-algos (get-config "digestname"))
- (define all-cipher-algos (get-config "ciphername"))
-@@ -119,7 +120,6 @@
-       (wait-processes (list GPG GPG) (list task0 task1) #t))))
- 
- (setenv "GPG_AGENT_INFO" "" #t)
--(setenv "GNUPGHOME" (getcwd) #t)
- 
- ;;
- ;; GnuPG helper.
diff --git a/debian/patches/0006-gpg-Avoid-homedir-creation-by-list-config.patch b/debian/patches/0006-gpg-Avoid-homedir-creation-by-list-config.patch
new file mode 100644
index 0000000..9caee72
--- /dev/null
+++ b/debian/patches/0006-gpg-Avoid-homedir-creation-by-list-config.patch
@@ -0,0 +1,43 @@
+From: Werner Koch <wk at gnupg.org>
+Date: Thu, 1 Sep 2016 19:22:48 +0200
+Subject: gpg: Avoid homedir creation by --list-config
+
+* g10/gpg.c (main): Do not register a key for the list config
+commands.
+
+Signed-off-by: Werner Koch <wk at gnupg.org>
+---
+ g10/gpg.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/g10/gpg.c b/g10/gpg.c
+index e02efe4..ae2125f 100644
+--- a/g10/gpg.c
++++ b/g10/gpg.c
+@@ -2375,11 +2375,16 @@ main (int argc, char **argv)
+       {
+ 	switch( pargs.r_opt )
+ 	  {
+-	  case aCheckKeys:
+ 	  case aListConfig:
+ 	  case aListGcryptConfig:
+           case aGPGConfList:
+           case aGPGConfTest:
++            set_cmd (&cmd, pargs.r_opt);
++            /* Do not register a keyring for these commands.  */
++            default_keyring = -1;
++            break;
++
++	  case aCheckKeys:
+ 	  case aListPackets:
+ 	  case aImport:
+ 	  case aFastImport:
+@@ -3785,6 +3790,8 @@ main (int argc, char **argv)
+       case aGenRandom:
+       case aDeArmor:
+       case aEnArmor:
++      case aListConfig:
++      case aListGcryptConfig:
+ 	break;
+       case aFixTrustDB:
+       case aExportOwnerTrust:
diff --git a/debian/patches/series b/debian/patches/series
index 91d2cc4..6f96c5b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,4 +3,4 @@
 0003-avoid-regenerating-defsincdate-use-shipped-file.patch
 0004-spelling-s-achived-achieved-and-s-alternativly-alter.patch
 0005-gpg-Fix-regression-in-gpgv-s-printing-of-the-keyid.patch
-0006-avoid-test-suite-failures-when-HOME-is-non-existent.patch
+0006-gpg-Avoid-homedir-creation-by-list-config.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list