all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 0/1] gnupg@2.1.13: Fix expired test
@ 2016-09-19  1:50 Leo Famulari
  2016-09-19  1:50 ` [PATCH 1/1] gnu: gnupg: Fix test failure Leo Famulari
  2016-09-19  7:28 ` [PATCH 0/1] gnupg@2.1.13: Fix expired test Ricardo Wurmus
  0 siblings, 2 replies; 4+ messages in thread
From: Leo Famulari @ 2016-09-19  1:50 UTC (permalink / raw)
  To: guix-devel


GnuPG's 'tofu.test' had a hard-coded expiration date of 2016-09-17. This
patch backports the upstream fix.

https://bugs.gnupg.org/gnupg/issue2393
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=e584d6468a2e72cd01e55f46104f9f96b56c0b66

Leo Famulari (1):
  gnu: gnupg: Fix test failure.

 gnu/local.mk                                      |  1 +
 gnu/packages/gnupg.scm                            |  1 +
 gnu/packages/patches/gnupg-fix-expired-test.patch | 78 +++++++++++++++++++++++
 3 files changed, 80 insertions(+)
 create mode 100644 gnu/packages/patches/gnupg-fix-expired-test.patch

-- 
2.10.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] gnu: gnupg: Fix test failure.
  2016-09-19  1:50 [PATCH 0/1] gnupg@2.1.13: Fix expired test Leo Famulari
@ 2016-09-19  1:50 ` Leo Famulari
  2016-09-19  7:28 ` [PATCH 0/1] gnupg@2.1.13: Fix expired test Ricardo Wurmus
  1 sibling, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2016-09-19  1:50 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/patches/gnupg-fix-expired-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/gnupg.scm (gnupg): Use it.
---
 gnu/local.mk                                      |  1 +
 gnu/packages/gnupg.scm                            |  1 +
 gnu/packages/patches/gnupg-fix-expired-test.patch | 78 +++++++++++++++++++++++
 3 files changed, 80 insertions(+)
 create mode 100644 gnu/packages/patches/gnupg-fix-expired-test.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 4076121..a756638 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -541,6 +541,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gmp-faulty-test.patch			\
   %D%/packages/patches/gnome-tweak-tool-search-paths.patch	\
   %D%/packages/patches/gnucash-price-quotes-perl.patch		\
+  %D%/packages/patches/gnupg-fix-expired-test.patch		\
   %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \
   %D%/packages/patches/gobject-introspection-cc.patch		\
   %D%/packages/patches/gobject-introspection-girepository.patch	\
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index c78e9d8..0eaeb45 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -243,6 +243,7 @@ compatible to GNU Pth.")
               (method url-fetch)
               (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
                                   ".tar.bz2"))
+              (patches (search-patches "gnupg-fix-expired-test.patch"))
               (sha256
                (base32
                 "0xcn46vcb5x5qx0bc803vpzhzhnn6wfhp7x71w9n1ahx4ak877ag"))))
diff --git a/gnu/packages/patches/gnupg-fix-expired-test.patch b/gnu/packages/patches/gnupg-fix-expired-test.patch
new file mode 100644
index 0000000..ac2564f
--- /dev/null
+++ b/gnu/packages/patches/gnupg-fix-expired-test.patch
@@ -0,0 +1,78 @@
+Fix a test that has an expiration date of 2016-09-17:
+
+https://bugs.gnupg.org/gnupg/issue2393
+
+Patch adapted from upstream source repository:
+
+https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=e584d6468a2e72cd01e55f46104f9f96b56c0b66
+
+The patch has been altered by commenting out a diff that does not apply
+to the version of GnuPG that we are applying it to, 2.1.13. This is
+what the patch author refers to below with "This commit includes changes
+to the old test as well, for those who need to backport it." We keep the
+old test and comment out the new test.
+
+From e584d6468a2e72cd01e55f46104f9f96b56c0b66 Mon Sep 17 00:00:00 2001
+From: Justus Winter <justus@g10code.com>
+Date: Thu, 23 Jun 2016 17:24:23 +0200
+Subject: [PATCH] tests/openpgp: Fake the system time for the tofu test.
+
+The keys in the tofu test are set to expire on 2016-09-17.  Fake the
+system time for this test.
+
+This commit includes changes to the old test as well, for those who
+need to backport it.
+
+* tests/openpgp/gpg-agent.conf.tmpl: Drop trailing newlines.
+* tests/openpgp/tofu.scm: Fake system time.
+* tests/openpgp/tofu.test: Likewise.
+
+GnuPG-bug-id: 2393
+Signed-off-by: Justus Winter <justus@g10code.com>
+---
+ tests/openpgp/gpg-agent.conf.tmpl | 2 --
+ tests/openpgp/tofu.scm            | 4 +++-
+ tests/openpgp/tofu.test           | 3 +++
+ 3 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/tests/openpgp/gpg-agent.conf.tmpl b/tests/openpgp/gpg-agent.conf.tmpl
+index b3cb54f..70e1633 100644
+--- a/tests/openpgp/gpg-agent.conf.tmpl
++++ b/tests/openpgp/gpg-agent.conf.tmpl
+@@ -1,4 +1,2 @@
+ allow-preset-passphrase
+ no-grab
+-
+-
+#diff --git a/tests/openpgp/tofu.scm b/tests/openpgp/tofu.scm
+#index 24fa9df..38b6a0f 100755
+#--- a/tests/openpgp/tofu.scm
+#+++ b/tests/openpgp/tofu.scm
+#@@ -19,7 +19,9 @@
+# 
+# (load (with-path "defs.scm"))
+# 
+#-(define GPG `(,(tool 'gpg) --no-permission-warning)) ;; w/o --always-trust
+#+ ;; Redefine GPG without --always-trust and a fixed time.
+#+(define GPG `(,(tool 'gpg) --no-permission-warning
+#+	      --faked-system-time=1466684990))
+# (define GNUPGHOME (getenv "GNUPGHOME"))
+# (if (string=? "" GNUPGHOME)
+#     (error "GNUPGHOME not set"))
+diff --git a/tests/openpgp/tofu.test b/tests/openpgp/tofu.test
+index 18c1756..0d34af4 100755
+--- a/tests/openpgp/tofu.test
++++ b/tests/openpgp/tofu.test
+@@ -4,6 +4,9 @@
+ 
+ # set -x
+ 
++# Redefine GPG with a fixed time.
++GPG="$GPG --faked-system-time=1466684990"
++
+ KEYS="2183839A BC15C85A EE37CF96"
+ 
+ # Make sure $srcdir is set.
+-- 
+2.10.0
+
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/1] gnupg@2.1.13: Fix expired test
  2016-09-19  1:50 [PATCH 0/1] gnupg@2.1.13: Fix expired test Leo Famulari
  2016-09-19  1:50 ` [PATCH 1/1] gnu: gnupg: Fix test failure Leo Famulari
@ 2016-09-19  7:28 ` Ricardo Wurmus
  2016-09-19 20:10   ` Leo Famulari
  1 sibling, 1 reply; 4+ messages in thread
From: Ricardo Wurmus @ 2016-09-19  7:28 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel


Leo Famulari <leo@famulari.name> writes:

> GnuPG's 'tofu.test' had a hard-coded expiration date of 2016-09-17. This
> patch backports the upstream fix.
>
> https://bugs.gnupg.org/gnupg/issue2393
> https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=e584d6468a2e72cd01e55f46104f9f96b56c0b66
>
> Leo Famulari (1):
>   gnu: gnupg: Fix test failure.
>
>  gnu/local.mk                                      |  1 +
>  gnu/packages/gnupg.scm                            |  1 +
>  gnu/packages/patches/gnupg-fix-expired-test.patch | 78 +++++++++++++++++++++++
>  3 files changed, 80 insertions(+)
>  create mode 100644 gnu/packages/patches/gnupg-fix-expired-test.patch

Looks good to me!

~~ Ricardo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/1] gnupg@2.1.13: Fix expired test
  2016-09-19  7:28 ` [PATCH 0/1] gnupg@2.1.13: Fix expired test Ricardo Wurmus
@ 2016-09-19 20:10   ` Leo Famulari
  0 siblings, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2016-09-19 20:10 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

On Mon, Sep 19, 2016 at 09:28:00AM +0200, Ricardo Wurmus wrote:
> > Leo Famulari (1):
> >   gnu: gnupg: Fix test failure.
> >
> >  gnu/local.mk                                      |  1 +
> >  gnu/packages/gnupg.scm                            |  1 +
> >  gnu/packages/patches/gnupg-fix-expired-test.patch | 78 +++++++++++++++++++++++
> >  3 files changed, 80 insertions(+)
> >  create mode 100644 gnu/packages/patches/gnupg-fix-expired-test.patch
> 
> Looks good to me!

Thanks, pushed!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-19 20:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-19  1:50 [PATCH 0/1] gnupg@2.1.13: Fix expired test Leo Famulari
2016-09-19  1:50 ` [PATCH 1/1] gnu: gnupg: Fix test failure Leo Famulari
2016-09-19  7:28 ` [PATCH 0/1] gnupg@2.1.13: Fix expired test Ricardo Wurmus
2016-09-19 20:10   ` Leo Famulari

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.