From: Leo Famulari <leo@famulari.name>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: gnutls 'name-constraints' test failure
Date: Sun, 17 Jul 2016 13:33:34 -0400 [thread overview]
Message-ID: <20160717173334.GA2626@jasmine> (raw)
In-Reply-To: <87shv84crp.fsf@gnu.org>
[-- Attachment #1.1: Type: text/plain, Size: 296 bytes --]
On Sun, Jul 17, 2016 at 03:25:46PM +0200, Ludovic Courtès wrote:
> Interesting failure mode.
"Interesting" is one word for it ;) It's not the first time I've seen a
test go stale.
> In the meantime grafting is a good idea. Would you like to try that?
A patch is attached for review!
[-- Attachment #1.2: 0001-gnu-gnutls-Fix-test-failure.patch --]
[-- Type: text/x-diff, Size: 4079 bytes --]
From 55512c47d6331109a82acc083ad5ea905d386be7 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Sun, 17 Jul 2016 13:07:35 -0400
Subject: [PATCH] gnu: gnutls: Fix test failure.
* gnu/packages/patches/gnutls-fix-stale-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/tls.scm (gnutls)[replacement]: New field.
(gnutls/fixed): New variable.
---
gnu/local.mk | 1 +
gnu/packages/patches/gnutls-fix-stale-test.patch | 50 ++++++++++++++++++++++++
gnu/packages/tls.scm | 8 ++++
3 files changed, 59 insertions(+)
create mode 100644 gnu/packages/patches/gnutls-fix-stale-test.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 536ecef..ef2eb0b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -533,6 +533,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/gnutls-fix-stale-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/patches/gnutls-fix-stale-test.patch b/gnu/packages/patches/gnutls-fix-stale-test.patch
new file mode 100644
index 0000000..abb547a
--- /dev/null
+++ b/gnu/packages/patches/gnutls-fix-stale-test.patch
@@ -0,0 +1,50 @@
+A certificate used in the GnuTLS test suite has expired, causing the
+test suite to fail.
+
+The effect of this patch depends on whether or not the datefudge program
+is available. If it is, then it is used to change the date in the test
+environment. If it is not, then the test is skipped.
+
+At the time this patch was added to Guix, datefudge was not available,
+so the test is skipped.
+
+Taken from upstream commit:
+https://gitlab.com/gnutls/gnutls/commit/47f25d9e08d4e102572804a2aed186b01db23c65
+
+From 47f25d9e08d4e102572804a2aed186b01db23c65 Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav@redhat.com>
+Date: Wed, 29 Jun 2016 17:31:13 +0200
+Subject: [PATCH] tests: use datefudge in name-constraints test
+
+This avoids the expiration of the used certificate to affect the test.
+---
+ tests/cert-tests/name-constraints | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/tests/cert-tests/name-constraints b/tests/cert-tests/name-constraints
+index 05d6e9b..59af00f 100755
+--- a/tests/cert-tests/name-constraints
++++ b/tests/cert-tests/name-constraints
+@@ -28,7 +28,18 @@ if ! test -z "${VALGRIND}"; then
+ fi
+ TMPFILE=tmp.$$.pem
+
+-${VALGRIND} "${CERTTOOL}" -e --infile "${srcdir}/name-constraints-ip.pem"
++export TZ="UTC"
++
++# Check for datefudge
++TSTAMP=`datefudge -s "2006-09-23" date -u +%s || true`
++if test "$TSTAMP" != "1158969600"; then
++ echo $TSTAMP
++ echo "You need datefudge to run this test"
++ exit 77
++fi
++
++datefudge -s "2016-04-22" \
++ ${VALGRIND} "${CERTTOOL}" -e --infile "${srcdir}/name-constraints-ip.pem"
+ rc=$?
+
+ if test "${rc}" != "0"; then
+--
+2.9.1
+
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index bdc1d7c..6ba1776 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -122,6 +122,7 @@ living in the same process.")
(define-public gnutls
(package
(name "gnutls")
+ (replacement gnutls/fixed)
(version "3.4.7")
(source (origin
(method url-fetch)
@@ -194,6 +195,13 @@ required structures.")
(properties '((ftp-server . "ftp.gnutls.org")
(ftp-directory . "/gcrypt/gnutls")))))
+(define-public gnutls/fixed
+ (package
+ (inherit gnutls)
+ (source (origin
+ (inherit (package-source gnutls))
+ (patches (search-patches "gnutls-fix-stale-test.patch"))))))
+
(define-public openssl
(package
(name "openssl")
--
2.9.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-07-17 17:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-16 19:04 gnutls 'name-constraints' test failure nee
2016-07-17 7:32 ` Leo Famulari
2016-07-17 11:17 ` Andreas Enge
2016-07-17 13:25 ` Ludovic Courtès
2016-07-17 17:33 ` Leo Famulari [this message]
2016-07-18 12:14 ` Ludovic Courtès
2016-07-18 16:48 ` Leo Famulari
2016-07-18 17:15 ` Leo Famulari
2016-07-19 13:02 ` Ludovic Courtès
2016-07-19 17:05 ` Leo Famulari
2016-07-20 4:04 ` Leo Famulari
2016-07-20 10:07 ` Ludovic Courtès
2016-07-18 17:30 ` Efraim Flashner
2016-07-19 13:01 ` gd on i686 Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160717173334.GA2626@jasmine \
--to=leo@famulari.name \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.