gnu: gtk+-2: Split binaries.
[jackhill/guix/guix.git] / gnu / packages / gnupg.scm
index 2ef1659..abce1aa 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013, 2015, 2018 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014, 2018 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
@@ -7,15 +7,16 @@
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
-;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
+;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
 ;;; Copyright © 2016 Christopher Baines <mail@cbaines.net>
 ;;; Copyright © 2016 Mike Gerwitz <mtg@gnu.org>
 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
-;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -65,6 +66,7 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages tor)
   #:use-module (gnu packages web)
+  #:use-module (gnu packages xorg)
   #:use-module (gnu packages xml)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -77,7 +79,7 @@
 (define-public libgpg-error
   (package
     (name "libgpg-error")
-    (version "1.32")
+    (version "1.36")
     (source
      (origin
       (method url-fetch)
                           version ".tar.bz2"))
       (sha256
        (base32
-        "1jj08ns4sh1hmafqp1giskvdicdz18la516va26jycy27kkwaif3"))))
+        "0z696dmhfxm2n6pmr8b857wwljq9h633yi99bhbn7h88f91rigds"))
+      (patches (search-patches "libgpg-error-gawk-compat.patch"))
+      ;; XXX: Remove this snippet with the gawk patch above.  It avoids having
+      ;; to call autoreconf for the Makefile.am change to take effect.
+      (modules '((guix build utils)))
+      (snippet
+       '(begin
+          (substitute* "src/Makefile.in"
+            (("namespace=errnos") "pkg_namespace=errnos"))
+          #t))))
     (build-system gnu-build-system)
+    (arguments
+     (if (%current-target-system)
+         `(#:modules ((ice-9 match)
+                      (guix build gnu-build-system)
+                      (guix build utils))
+           #:phases
+           (modify-phases %standard-phases
+             ;; When cross-compiling, some platform specific properties cannot
+             ;; be detected. Create a symlink to the appropriate platform
+             ;; file. See Cross-Compiling section at:
+             ;; https://github.com/gpg/libgpg-error/blob/master/README
+             (add-after 'unpack 'cross-symlinks
+               (lambda* (#:key target inputs #:allow-other-keys)
+                 (let ((triplet
+                        (match (string-take target
+                                            (string-index target #\-))
+                          ("armhf" "arm-unknown-linux-gnueabi")
+                          (x
+                           (string-append x "-unknown-linux-gnu")))))
+                   (symlink
+                    (string-append "lock-obj-pub." triplet ".h")
+                    "src/syscfg/lock-obj-pub.linux-gnu.h"))
+                 #t))))
+         '()))
+    (native-inputs `(("gettext" ,gettext-minimal)))
     (home-page "https://gnupg.org")
     (synopsis "Library of error values for GnuPG components")
     (description
@@ -101,14 +137,14 @@ Daemon and possibly more in the future.")
 (define-public libgcrypt
   (package
     (name "libgcrypt")
-    (version "1.8.4")
+    (version "1.8.5")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "09r27ywj9zplq6n9qw3mn7zmvf6y2jdmwx5d1kg8yqkj0qx18f7n"))))
+                "1hvsazms1bfd769q0ngl0r9g5i4m9mpz9jmvvrdzyzk3rfa2ljiv"))))
     (build-system gnu-build-system)
     (propagated-inputs
      `(("libgpg-error-host" ,libgpg-error)))
@@ -137,7 +173,7 @@ generation.")
 (define-public libassuan
   (package
     (name "libassuan")
-    (version "2.5.2")
+    (version "2.5.3")
     (source
      (origin
       (method url-fetch)
@@ -145,7 +181,7 @@ generation.")
                           version ".tar.bz2"))
       (sha256
        (base32
-        "1rw8nw6fx6ppxga6m4cqcp898lnlzf7vn3s5c2lzfxg3fzr1nswq"))))
+        "00p7cpvzf0q3qwcgg51r9d0vbab4qga2xi8wpk2fgd36710b1g4i"))))
     (build-system gnu-build-system)
     (propagated-inputs
      `(("libgpg-error" ,libgpg-error)
@@ -200,14 +236,13 @@ specifications are building blocks of S/MIME and TLS.")
 (define-public npth
   (package
     (name "npth")
-    (version "1.5")
+    (version "1.6")
     (source
      (origin
-      (method url-fetch)
-      (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
-      (sha256
-       (base32
-        "1hmkkp6vzyrh8v01c2ynzf9vwikyagp7p1lxhbnr4ysk3w66jji9"))))
+       (method url-fetch)
+       (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
+       (sha256
+        (base32 "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk"))))
     (build-system gnu-build-system)
     (home-page "https://www.gnupg.org")
     (synopsis "Non-preemptive thread library")
@@ -218,19 +253,21 @@ threads implementation.
 In contrast to GNU Pth is is based on the system's standard threads
 implementation.  This allows the use of libraries which are not
 compatible to GNU Pth.")
-    (license (list license:lgpl3+ license:gpl2+)))) ; dual license
+    (license (list license:lgpl3+ license:gpl2+)) ; dual license
+    (properties '((ftp-server . "ftp.gnupg.org")
+                  (ftp-directory . "/gcrypt/npth")))))
 
 (define-public gnupg
   (package
     (name "gnupg")
-    (version "2.2.12")
+    (version "2.2.19")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
                                   ".tar.bz2"))
               (sha256
                (base32
-                "1jw282iy27j1qygym52aa44zxy7ly4bdadhd628hwr4q9j5hy0yv"))))
+                "1h6yx6sdpz3lf9gdppgxqcf73baynr8gflmh43286fkgw3058994"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -368,24 +405,13 @@ libskba (working with X.509 certificates and CMS data).")
 (define-public gpgme
   (package
     (name "gpgme")
-    (version "1.12.0")
+    (version "1.13.1")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
-                          ".tar.bz2"))
+      (uri (string-append "mirror://gnupg/gpgme/gpgme-" version ".tar.bz2"))
       (sha256
-       (base32
-        "1n4c1q2ls7sqx1vpr3p5n8vbjkw6kqp8jxqa28p0x9j36wf9bp5l"))
-      ;; One test fails because the conflict keys have expired.  See
-      ;; https://dev.gnupg.org/T3815
-      (patches (list (origin
-                       (method url-fetch)
-                       (uri "https://dev.gnupg.org/rM66376f3e206a1aa791d712fb8577bb3490268f60?diff=1")
-                       (file-name "gpgme-fix-conflict-test-keys.patch")
-                       (sha256
-                        (base32
-                         "0j718iy5a9fhkrfs4gzrnm4ggi163prqf1i8lfmqczswvz88zfly")))))))
+       (base32 "0imyjfryvvjdbai454p70zcr95m94j9xnzywrlilqdw2fqi0pqy4"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("gnupg" ,gnupg)))
@@ -406,7 +432,9 @@ Because the direct use of GnuPG from an application can be a complicated
 programming task, it is suggested that all software should try to use GPGME
 instead.  This way bug fixes or improvements can be done at a central place
 and every application benefits from this.")
-    (license license:lgpl2.1+)))
+    (license license:lgpl2.1+)
+    (properties '((ftp-server . "ftp.gnupg.org")
+                  (ftp-directory . "/gcrypt/gpgme")))))
 
 (define-public qgpgme
   (package
@@ -441,7 +469,7 @@ gpgpme starting with version 1.7.")
 (define-public guile-gcrypt
   (package
     (name "guile-gcrypt")
-    (version "0.1.0")
+    (version "0.2.0")
     (home-page "https://notabug.org/cwebber/guile-gcrypt")
     (source (origin
               (method git-fetch)
@@ -450,14 +478,29 @@ gpgpme starting with version 1.7.")
                     (commit (string-append "v" version))))
               (sha256
                (base32
-                "1lhgh3105yi0ggrjsjibv4wp1ipz8s17pa820hk2wln3rc04wpvf"))
+                "1mhc5m4xygkfj7x18f8apiqpfdn9mrql0am5sk13cf5xn8x1r63z"))
               (file-name (string-append name "-" version "-checkout"))))
     (build-system gnu-build-system)
+    (arguments
+     ;; When cross-compiling, the bash script libgcrypt-config provided by
+     ;; libgcrypt must be accessible during configure phase.
+     `(,@(if (%current-target-system)
+             '(#:phases
+               (modify-phases %standard-phases
+                 (add-before 'configure 'add-libgrypt-config
+                   (lambda _
+                     (setenv "PATH" (string-append
+                                     (assoc-ref %build-inputs "libgcrypt")
+                                     "/bin:"
+                                     (getenv "PATH")))
+                     #t))))
+             '())))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("autoconf" ,autoconf)
        ("automake" ,automake)
-       ("texinfo" ,texinfo)))
+       ("texinfo" ,texinfo)
+       ("guile" ,guile-2.2)))
     (inputs
      `(("guile" ,guile-2.2)
        ("libgcrypt" ,libgcrypt)))
@@ -477,6 +520,14 @@ interface (FFI) of Guile.")
      `(("guile" ,guile-2.0)
        ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
 
+(define-public guile3.0-gcrypt
+  (package
+    (inherit guile-gcrypt)
+    (name "guile3.0-gcrypt")
+    (inputs
+     `(("guile" ,guile-next)
+       ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
+
 (define-public python-gpg
   (package
     (name "python-gpg")
@@ -552,14 +603,14 @@ decrypt messages using the OpenPGP format by making use of GPGME.")
 (define-public python-gnupg
   (package
     (name "python-gnupg")
-    (version "0.4.3")
+    (version "0.4.4")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "python-gnupg" version))
        (sha256
         (base32
-         "03dc8whhvk7ccspbk8vzfhkxli8cd9zfbss5p597g4jldgy8s59d"))))
+         "03pvjyp6q9pr8qa22i38az06ddzhvzy5kj192hxa3gbhnchg1nj5"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -627,7 +678,7 @@ signing, decryption, verification, and key-listing parsing.")
 (define-public pius
   (package
    (name "pius")
-   (version "2.2.6")
+   (version "2.2.7")
    (source (origin
             (method url-fetch)
             (uri (string-append
@@ -635,15 +686,14 @@ signing, decryption, verification, and key-listing parsing.")
                   version "/pius-" version ".tar.bz2"))
             (sha256
              (base32
-              "1893hzpx3zv724drqv48csrn0cm98xw4ymb1zmhs2jvjj1778zfj"))
-            (patches (search-patches "pius.patch"))))
+              "1nsl7czicv95j0gfz4s82ys3g3h2mwr6cq3ilid8bpz3iy7z4ipy"))))
    (build-system python-build-system)
-   (inputs `(("perl" ,perl)                ;for 'pius-party-worksheet'
+   (inputs `(("perl" ,perl)             for 'pius-party-worksheet'
              ("gpg" ,gnupg)
              ("python-six" ,python2-six)))
    (arguments
     `(#:tests? #f
-      #:python ,python-2                     ;uses the Python 2 'print' syntax
+      #:python ,python-2                uses the Python 2 'print' syntax
       #:phases
       (modify-phases %standard-phases
         (add-before
@@ -670,17 +720,17 @@ PGP keysigning parties.")
 (define-public signing-party
   (package
     (name "signing-party")
-    (version "2.7")
-    (home-page "https://salsa.debian.org/debian/signing-party")
+    (version "2.10")
+    (home-page "https://salsa.debian.org/signing-party-team/signing-party")
     (source (origin
               (method git-fetch)
               (uri (git-reference
                     (url home-page)
-                    (commit (string-append "release-" version))))
+                    (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1gx9017wag4bgc0h7kca9n3jwwdm7z77yv3viayhg62flbwkvbgb"))))
+                "0lq8nmwjmysry0n4jg6vb7bh0lagbyb9pa11ii3s41p1mhzchf2r"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("autoconf" ,autoconf-wrapper)
@@ -692,7 +742,7 @@ PGP keysigning parties.")
               ("perl-net-idn-encode" ,perl-net-idn-encode)
               ("libmd" ,libmd)))
     (arguments
-     `(#:tests? #f
+     `(#:tests? #f ; no test suite
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
@@ -845,8 +895,6 @@ software.")))
     (inputs
      `(("qtbase" ,qtbase)
        ,@(package-inputs pinentry-tty)))
-    (arguments
-     `(#:configure-flags '("CXXFLAGS=-std=gnu++11")))
   (description
    "Pinentry provides a console and a Qt GUI that allows users to enter a
 passphrase when @code{gpg} is run and needs it.")))
@@ -886,15 +934,15 @@ passphrase when @code{gpg} is run and needs it.")))
 (define-public paperkey
   (package
     (name "paperkey")
-    (version "1.5")
+    (version "1.6")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://www.jabberwocky.com/"
+              (uri (string-append "https://www.jabberwocky.com/"
                                   "software/paperkey/paperkey-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1prd2jaf4zjad3xhv160hmi5n408ssljfg7iz90jxs9w111pjwy4"))))
+                "1xq5gni6gksjkd5avg0zpd73vsr97appksfx0gx2m38s4w9zsid2"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -905,7 +953,7 @@ passphrase when @code{gpg} is run and needs it.")))
                             "checks/roundtrip-raw.sh")
                (("/bin/echo") "echo"))
              #t)))))
-    (home-page "http://www.jabberwocky.com/software/paperkey/")
+    (home-page "https://www.jabberwocky.com/software/paperkey/")
     (synopsis "Backup OpenPGP keys to paper")
     (description
      "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
@@ -915,17 +963,45 @@ bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
 them to transform your existing public key into a secret key.")
     (license license:gpl2+)))
 
+(define-public pgpdump
+  (package
+    (name "pgpdump")
+    (version "0.33")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://www.mew.org/~kazu/proj/pgpdump/pgpdump-"
+                           version ".tar.gz"))
+       (sha256
+        (base32 "1j001jra2m89n6cys3n0hs574bipjdzfxhzpnd4jfyv95mqwl7n4"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no make check
+       #:configure-flags (list "--prefix=/")
+       #:make-flags (list "CC=gcc"
+                          (string-append "DESTDIR=" (assoc-ref %outputs "out")))))
+    (inputs
+     `(("zlib" ,zlib)))
+    (home-page "https://www.mew.org/~kazu/proj/pgpdump/en/")
+    (synopsis "PGP packet visualizer")
+    (description "pgpdump displays the sequence of OpenPGP or PGP version 2
+packets from a file.
+
+The output of this command is similar to GnuPG's list packets command,
+however, pgpdump produces more detailed and easier to understand output.")
+    (license license:bsd-3)))
+
 (define-public gpa
   (package
     (name "gpa")
-    (version "0.9.10")
+    (version "0.10.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnupg/gpa/"
                                   name "-" version ".tar.bz2"))
               (sha256
                (base32
-                "09xphbi2456qynwqq5n0yh0zdmdi2ggrj3wk4hsyh5lrzlvcrff3"))))
+                "1cbpc45f8qbdkd62p12s3q2rdq6fa5xdzwmcwd3xrj55bzkspnwm"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -941,23 +1017,25 @@ them to transform your existing public key into a secret key.")
      "GPA, the GNU Privacy Assistant, is a graphical user interface for
 @uref{https://gnupg.org, GnuPG}.  It can be used to encrypt, decrypt, and sign
 files, to verify signatures, and to manage the private and public keys.")
-    (license license:gpl3+)))
+    (license license:gpl3+)
+    (properties '((ftp-server . "ftp.gnupg.org")
+                  (ftp-directory . "/gcrypt/gpa")))))
 
 (define-public parcimonie
   (package
     (name "parcimonie")
-    (version "0.10.3")
+    (version "0.11.0")
     (source (origin
               (method url-fetch)
-              (uri (string-append "https://gaffer.ptitcanardnoir.org/"
-                                  "intrigeri/files/parcimonie/App-Parcimonie-"
+              (uri (string-append "https://gaffer.boum.org/intrigeri/files/"
+                                  "parcimonie/App-Parcimonie-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1kf891117s1f3k6lxvbjdb21va9gxh29vlp9bd664ssgw266rcyb"))))
+                "14pvapvzrxh1yh8zgcj1llmc2dd8g1fgzskxlja21gmw8c88aqdk"))))
     (build-system perl-build-system)
     (inputs
-     `(("gnupg" ,gnupg-1)    ; This is the version used by perl-gnupg-interface
+     `(("gnupg" ,gnupg)
        ("perl-config-general" ,perl-config-general)
        ("perl-clone" ,perl-clone)
        ("perl-data" ,perl-data)
@@ -977,10 +1055,12 @@ files, to verify signatures, and to manage the private and public keys.")
        ("perl-moox-handlesvia" ,perl-moox-handlesvia)
        ("perl-moox-late" ,perl-moox-late)
        ("perl-moox-options" ,perl-moox-options)
+       ("perl-moox-strictconstructor" ,perl-moox-strictconstructor)
        ("perl-namespace-clean" ,perl-namespace-clean)
        ("perl-net-dbus" ,perl-net-dbus)
        ("perl-net-dbus-glib" ,perl-net-dbus-glib)
        ("perl-path-tiny" ,perl-path-tiny)
+       ("perl-strictures" ,perl-strictures-2)
        ("perl-test-most" ,perl-test-most)
        ("perl-test-trap" ,perl-test-trap)
        ("perl-time-duration" ,perl-time-duration)
@@ -992,24 +1072,29 @@ files, to verify signatures, and to manage the private and public keys.")
        ("perl-xml-parser" ,perl-xml-parser)
        ("perl-xml-twig" ,perl-xml-twig)
        ("torsocks" ,torsocks)))
+    (native-inputs
+     `(("xorg-server" ,xorg-server-for-tests)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
          ;; Needed for using gpg-connect-agent during tests.
-         (add-before 'check 'set-HOME
-           (lambda _ (setenv "HOME" "/tmp") #t))
+         (add-before 'check 'prepare-for-tests
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((xorg-server (assoc-ref inputs "xorg-server")))
+               (system (string-append xorg-server "/bin/Xvfb :1 &"))
+               (setenv "DISPLAY" ":1")
+               (setenv "HOME" "/tmp")
+               ;; These tests are known to fail
+               (delete-file "t/32-keyserver_defined_on_command_line.t")
+               (delete-file "t/33-checkGpgHasDefinedKeyserver.t")
+               ;; The applet is deprecated upstream.
+               (delete-file "t/00-load_all.t")
+               #t)))
          (add-before 'install 'fix-references
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
-               (("gpg2") "gpg")
                ;; Skip check whether dependencies are in the PATH
-               (("defined which.*") "")
-               (("call\\('parcimonie-torified-gpg'\\)")
-                (string-append "call('" (assoc-ref outputs "out")
-                               "/bin/parcimonie-torified-gpg')")))
-             (substitute* "bin/parcimonie-torified-gpg"
-               (("torsocks") (string-append (assoc-ref inputs "torsocks")
-                                            "/bin/torsocks")))
+               (("defined which.*") ""))
              #t))
          (add-after 'install 'wrap-program
            (lambda* (#:key inputs outputs #:allow-other-keys)
@@ -1020,7 +1105,7 @@ files, to verify signatures, and to manage the private and public keys.")
                  `("PERL5LIB" ":"
                    prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
                #t))))))
-    (home-page "https://gaffer.ptitcanardnoir.org/intrigeri/code/parcimonie/")
+    (home-page "https://gaffer.boum.org/intrigeri/code/parcimonie/")
     (synopsis "Incrementally refreshes a GnuPG keyring")
     (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
 that makes it hard to correlate the keyring content to an individual, and