From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: gnutls 'name-constraints' test failure Date: Sun, 17 Jul 2016 13:33:34 -0400 Message-ID: <20160717173334.GA2626@jasmine> References: <578A854F.30302@cock.li> <20160717073206.GA17182@jasmine> <87shv84crp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hHWLQfXTYDoKhP50" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOpwv-0006Vi-Lg for guix-devel@gnu.org; Sun, 17 Jul 2016 13:33:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bOpwr-0004cF-5N for guix-devel@gnu.org; Sun, 17 Jul 2016 13:33:52 -0400 Content-Disposition: inline In-Reply-To: <87shv84crp.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?iso-8859-1?Q?Court=E8s?= Cc: guix-devel@gnu.org --hHWLQfXTYDoKhP50 Content-Type: multipart/mixed; boundary="MGYHOYXEY6WxJCY8" Content-Disposition: inline --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 17, 2016 at 03:25:46PM +0200, Ludovic Court=E8s 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! --MGYHOYXEY6WxJCY8 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-gnutls-Fix-test-failure.patch" Content-Transfer-Encoding: quoted-printable =46rom 55512c47d6331109a82acc083ad5ea905d386be7 Mon Sep 17 00:00:00 2001 =46rom: Leo Famulari 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 =3D \ %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/package= s/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/47f25d9e08d4e102572804a2aed186b01d= b23c65 + +From 47f25d9e08d4e102572804a2aed186b01db23c65 Mon Sep 17 00:00:00 2001 +From: Nikos Mavrogiannopoulos +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-con= straints +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=3Dtmp.$$.pem +=20 +-${VALGRIND} "${CERTTOOL}" -e --infile "${srcdir}/name-constraints-ip.pem" ++export TZ=3D"UTC" ++ ++# Check for datefudge ++TSTAMP=3D`datefudge -s "2006-09-23" date -u +%s || true` ++if test "$TSTAMP" !=3D "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=3D$? +=20 + if test "${rc}" !=3D "0"; then +--=20 +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"))))) =20 +(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") --=20 2.9.1 --MGYHOYXEY6WxJCY8-- --hHWLQfXTYDoKhP50 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXi8FuAAoJECZG+jC6yn8Ib3oQAPDcQqnPk22iWUwnkq5gXV0G d01uRE+Mr+mGF8VGbyK+aRn4VMSRT4lMrt8ARt5W8ofW4GS6gJKMaIzTbQhA60fb p0OU/3azP7JENIh2EH2G/4eqyjv8+i+XJXBhzwtNUZhxgxO3lXCT7ctEeCDOk76j 6UoZmHVsmhrYPsAPTPbhb38lzC7M9+ladTB35bMVu/iKMA6fX8a9v6m1OBiaq/uW baT0UaXna1oLoEoxf70WHO/UQBIqM8+FO4vqPZ2GYrA0IVzydE7SKG0k55bSKU9+ OW/8zAlhyri0ARM2mgvBQyU7WvlGt0SD4wFGTV9HiNUrNDd+vbN7DWZoRTMo3vgS 1URrXW4DDLaY0XTqFETn5LLPmbGOjeZ7FEq8nMLsOEPIda7e94DPFpJXppOsvLkJ WilaXPwf+uyZ4/5ifsiGudSCtapJfxwTRGeKYqUmmxfojk+rrwlWihWFOZsYJK3o rpRwThOGDoXaog/B8wzdlWb0C1FLlblt3SMiikeprdhK4BhKn8aaIQf/c+mR/w3z tlXZ8Xd910BnfxG+mvIVcGrgfRgdgxyPnY/4w+Et3TDiAoxq+xgsLm3l7VcE+NP0 P7mGd2bR87ql1EXoMWcbjC/N/XwerauWYRe1QcfQ6jrAUFb+0H15SD9IMjaiQrg/ bGzKXD6MQ679IOQiVqyJ =k6hQ -----END PGP SIGNATURE----- --hHWLQfXTYDoKhP50--