guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: gnupg: Fix build on 32-bit architectures.


From: Marius Bakke
Subject: 01/01: gnu: gnupg: Fix build on 32-bit architectures.
Date: Thu, 22 Dec 2016 14:08:30 +0000 (UTC)

mbakke pushed a commit to branch master
in repository guix.

commit 059b3aa9c335041d947cf2b765ab3dab811cfdc5
Author: Marius Bakke <address@hidden>
Date:   Thu Dec 22 14:56:48 2016 +0100

    gnu: gnupg: Fix build on 32-bit architectures.
    
    * gnu/packages/patches/gnupg-test-segfault-on-32bit-arch.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Register it.
    * gnu/packages/gnupg.scm (gnupg)[source]: Use it.
---
 gnu/local.mk                                       |    1 +
 gnu/packages/gnupg.scm                             |    6 ++-
 .../gnupg-test-segfault-on-32bit-arch.patch        |   40 ++++++++++++++++++++
 3 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index f55d8e5..ee8f1e5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -588,6 +588,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-test-segfault-on-32bit-arch.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 096fcb9..5d5a6cd 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -220,7 +220,11 @@ compatible to GNU Pth.")
                                   ".tar.bz2"))
               (sha256
                (base32
-                "1js308b46ifx1gim0c9nivr5yxhans7iq1yvkf7zl2928gdm9p65"))))
+                "1js308b46ifx1gim0c9nivr5yxhans7iq1yvkf7zl2928gdm9p65"))
+              (patches
+               ;; This fixes a test failure on 32bit. Remove for next version.
+               ;; 
https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00869.html
+               (search-patches "gnupg-test-segfault-on-32bit-arch.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
diff --git a/gnu/packages/patches/gnupg-test-segfault-on-32bit-arch.patch 
b/gnu/packages/patches/gnupg-test-segfault-on-32bit-arch.patch
new file mode 100644
index 0000000..79bb41c
--- /dev/null
+++ b/gnu/packages/patches/gnupg-test-segfault-on-32bit-arch.patch
@@ -0,0 +1,40 @@
+This fixes a segfault on 32-bit architectures. Upstream discussion:
+
+https://lists.gnupg.org/pipermail/gnupg-devel/2016-December/032364.html
+
+Guix thread: 
https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00631.html
+
+Patch copied from upstream source repository:
+
+https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commitdiff;h=6e96cdd41a0e55b672309431062f37c4a4a9f485
+
+From 6e96cdd41a0e55b672309431062f37c4a4a9f485 Mon Sep 17 00:00:00 2001
+From: Justus Winter <address@hidden>
+Date: Wed, 21 Dec 2016 16:14:45 +0100
+Subject: [PATCH] gpgscm: Guard use of union member.
+
+* tests/gpgscm/scheme.c (opexe_5): Check that we have a file port
+before accessing filename.  Fixes a crash on 32-bit architectures.
+
+Fixes-commit: e7429b1ced0c69fa7901f888f8dc25f00fc346a4
+Signed-off-by: Justus Winter <address@hidden>
+---
+ tests/gpgscm/scheme.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
+index a5b7691..2844545 100644
+--- a/tests/gpgscm/scheme.c
++++ b/tests/gpgscm/scheme.c
+@@ -4838,7 +4838,7 @@ static pointer opexe_5(scheme *sc, enum scheme_opcodes 
op) {
+                } else {
+                     sc->nesting_stack[sc->file_i]++;
+ #if USE_TAGS && SHOW_ERROR_LINE
+-                  {
++                  if (sc->load_stack[sc->file_i].kind & port_file) {
+                     const char *filename =
+                       sc->load_stack[sc->file_i].rep.stdio.filename;
+                     int lineno =
+-- 
+2.8.0.rc3
+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]