unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnutls: fix the test-suite for 32 bits systems.
@ 2013-06-27 22:01 Cyril Roelandt
  2013-06-28  9:33 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Cyril Roelandt @ 2013-06-27 22:01 UTC (permalink / raw)
  To: bug-guix

* gnu/packages/patches/gnutls-fix-tests-on-32-bits-system.patch: New file.
* gnu-system.am: Add it here...
* gnu/packages/gnutls.scm (gnutls): ... and use it here.

Thanks to Nikos Mavrogiannopoulos for providing this patch:
http://permalink.gmane.org/gmane.comp.encryption.gpg.gnutls.devel/6778
---
 gnu-system.am                                      |    1 +
 gnu/packages/gnutls.scm                            |    9 ++++-
 .../gnutls-fix-tests-on-32-bits-system.patch       |   36 ++++++++++++++++++++
 3 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/gnutls-fix-tests-on-32-bits-system.patch

diff --git a/gnu-system.am b/gnu-system.am
index 96b87e6..092b986 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -188,6 +188,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/glib-tests-prlimit.patch			\
   gnu/packages/patches/glibc-bootstrap-system.patch		\
   gnu/packages/patches/glibc-no-ld-so-cache.patch		\
+  gnu/packages/patches/gnutls-fix-tests-on-32-bits-system.patch \
   gnu/packages/patches/grub-gets-undeclared.patch		\
   gnu/packages/patches/guile-1.8-cpp-4.5.patch			\
   gnu/packages/patches/guile-default-utf8.patch			\
diff --git a/gnu/packages/gnutls.scm b/gnu/packages/gnutls.scm
index 32726f6..d636a9c 100644
--- a/gnu/packages/gnutls.scm
+++ b/gnu/packages/gnutls.scm
@@ -23,6 +23,7 @@
   #:use-module (guix build-system gnu)
   #:use-module ((gnu packages compression)
                 #:renamer (symbol-prefix-proc 'guix:))
+  #:use-module (gnu packages)
   #:use-module (gnu packages nettle)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages perl)
@@ -65,12 +66,18 @@ portable, and only require an ANSI C89 platform.")
               (base32
                "1zi2kq3vcbqdy9khl7r6pgk4hgwibniasm9k6siasdvqjijq3ymb"))))
     (build-system gnu-build-system)
+    (arguments
+      `(#:patches (list (assoc-ref %build-inputs
+                                   "patch/fix-tests"))
+        #:patch-flags '("-p0")))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
      `(("guile" ,guile-2.0)
        ("zlib" ,guix:zlib)
-       ("perl" ,perl)))
+       ("perl" ,perl)
+       ("patch/fix-tests"
+        ,(search-patch "gnutls-fix-tests-on-32-bits-system.patch"))))
     (propagated-inputs
      `(("libtasn1" ,libtasn1)
        ("nettle" ,nettle)
diff --git a/gnu/packages/patches/gnutls-fix-tests-on-32-bits-system.patch b/gnu/packages/patches/gnutls-fix-tests-on-32-bits-system.patch
new file mode 100644
index 0000000..07d6331
--- /dev/null
+++ b/gnu/packages/patches/gnutls-fix-tests-on-32-bits-system.patch
@@ -0,0 +1,36 @@
+From b12040aeab5fbaf02677571db1d8bf1995bd5ee0 Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
+Date: Sun, 2 Jun 2013 12:10:06 +0200
+Subject: [PATCH] Avoid comparing the expiration date to prevent false positive
+error in 32-bit systems.
+
+---
+ tests/cert-tests/pem-decoding |    6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/tests/cert-tests/pem-decoding b/tests/cert-tests/pem-decoding
+index fe769ec..f8c6372 100755
+--- tests/cert-tests/pem-decoding
++++ tests/cert-tests/pem-decoding
+@@ -61,7 +61,9 @@ if test "$rc" != "0"; then
+   exit $rc
+ fi
+ 
+-diff $srcdir/complex-cert.pem tmp-pem.pem
++cat $srcdir/complex-cert.pem |grep -v "Not After:" >tmp1
++cat $srcdir/tmp-pem.pem |grep -v "Not After:" >tmp2
++diff tmp1 tmp2
+ rc=$?
+ 
+ if test "$rc" != "0"; then
+@@ -69,6 +71,6 @@ if test "$rc" != "0"; then
+   exit $rc
+ fi
+ 
+-rm -f tmp-pem.pem
++rm -f tmp-pem.pem tmp1 tmp2
+ 
+ exit 0
+-- 
+1.7.1
+
-- 
1.7.10.4

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

* Re: [PATCH] gnutls: fix the test-suite for 32 bits systems.
  2013-06-27 22:01 [PATCH] gnutls: fix the test-suite for 32 bits systems Cyril Roelandt
@ 2013-06-28  9:33 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2013-06-28  9:33 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: bug-guix

Cyril Roelandt <tipecaml@gmail.com> skribis:

> * gnu/packages/patches/gnutls-fix-tests-on-32-bits-system.patch: New file.
> * gnu-system.am: Add it here...
> * gnu/packages/gnutls.scm (gnutls): ... and use it here.
>
> Thanks to Nikos Mavrogiannopoulos for providing this patch:
> http://permalink.gmane.org/gmane.comp.encryption.gpg.gnutls.devel/6778

Nice, please push!

Thanks,
Ludo’.

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

end of thread, other threads:[~2013-06-28  9:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-27 22:01 [PATCH] gnutls: fix the test-suite for 32 bits systems Cyril Roelandt
2013-06-28  9:33 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).