summary refs log tree commit diff
path: root/gnu/packages/gnupg.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-03-09 16:35:41 +0100
committerLudovic Courtès <ludo@gnu.org>2017-03-09 16:35:41 +0100
commite90e0fad1b3ba79d81f02424e143ee6f4f736e8b (patch)
tree2c26190fd9114199b0ef79303e18a61100cab4af /gnu/packages/gnupg.scm
parent8ea0700d231a8819fc7e8332e9685f0ce15c174e (diff)
parent9ec2a4d3fec44f08a55df9f5f3d1a04b83e7fcf6 (diff)
downloadguix-e90e0fad1b3ba79d81f02424e143ee6f4f736e8b.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/gnupg.scm')
-rw-r--r--gnu/packages/gnupg.scm37
1 files changed, 29 insertions, 8 deletions
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index fb0423c606..1b59cf7ecf 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -217,14 +217,15 @@ compatible to GNU Pth.")
 (define-public gnupg
   (package
     (name "gnupg")
-    (version "2.1.18")
+    (version "2.1.19")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
                                   ".tar.bz2"))
+              (patches (search-patches "gnupg-2.1-fix-Y2038-test-failure.patch"))
               (sha256
                (base32
-                "157rrv3ly9j2k0acz43nhiba5hfl6h7048jvj55wwqjmgsmnyk6h"))))
+                "1w4vccmb5l50lm4yrz9vkdj7whbfvzx543r55362kkj1aqgyvk26"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -243,7 +244,11 @@ compatible to GNU Pth.")
        ("sqlite" ,sqlite)
        ("zlib" ,zlib)))
    (arguments
-    `(#:configure-flags '("--enable-gpg2-is-gpg")
+    `(#:configure-flags '("--enable-gpg2-is-gpg"
+                          ;; Otherwise, the test suite looks for the `gpg`
+                          ;; executable in its installation directory in
+                          ;; /gnu/store before it has been installed.
+                          "--enable-gnupg-builddir-envvar")
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'patch-paths
@@ -259,11 +264,27 @@ compatible to GNU Pth.")
               (("/usr/bin/env gpgscm")
                (string-append (getcwd) "/tests/gpgscm/gpgscm")))
             #t))
-        ;; If this variable is undefined, /bin/pwd is invoked.
-        (add-before 'check 'set-gnupg-home
-          (lambda _
-            (setenv "GNUPGHOME" (getcwd))
-            #t)))))
+        (add-before 'build 'patch-test-paths
+          (lambda* (#:key inputs #:allow-other-keys)
+            (let* ((coreutils (assoc-ref inputs "coreutils"))
+                   (cat (string-append coreutils "/bin/cat"))
+                   (pwd (string-append coreutils "/bin/pwd"))
+                   (true (string-append coreutils "/bin/true"))
+                   (false (string-append coreutils "/bin/false")))
+              (substitute* '("tests/inittests"
+                             "tests/pkits/inittests"
+                             "tests/Makefile"
+                             "tests/pkits/common.sh"
+                             "tests/pkits/Makefile"
+                            )
+               (("/bin/pwd") pwd))
+              (substitute* "common/t-exectool.c"
+                (("/bin/cat") cat))
+              (substitute* "common/t-exectool.c"
+                (("/bin/true") true))
+              (substitute* "common/t-exectool.c"
+                (("/bin/false") false))
+              #t))))))
     (home-page "https://gnupg.org/")
     (synopsis "GNU Privacy Guard")
     (description