diff options
Diffstat (limited to 'gnu/packages/gnupg.scm')
-rw-r--r-- | gnu/packages/gnupg.scm | 274 |
1 files changed, 143 insertions, 131 deletions
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 348724e8fb..665e9e3021 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de> ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2020 Fredrik Salomonsson <plattfot@posteo.net> +;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2021 Nikita Domnitskii <nikita@domnitskii.me> ;;; ;;; This file is part of GNU Guix. @@ -80,13 +81,14 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system perl) #:use-module (guix build-system python) + #:use-module (ice-9 match) #:use-module (guix build-system meson) #:use-module (srfi srfi-1)) (define-public libgpg-error (package (name "libgpg-error") - (version "1.37") + (version "1.42") (source (origin (method url-fetch) @@ -94,32 +96,48 @@ version ".tar.bz2")) (sha256 (base32 - "0qwpx8mbc2l421a22l0l1hpzkip9jng06bbzgxwpkkvk5bvnybdk")))) + "08syj8mlarww8mh8x3s0x6hjqbnxp2lkg3hab57qqpv1dh7yf1zw")))) (build-system gnu-build-system) (arguments (if (%current-target-system) - `(#:modules ((ice-9 match) - (guix build gnu-build-system) + `(#:modules ((guix build gnu-build-system) (guix build utils)) #:phases (modify-phases %standard-phases + ;; If this is left out, some generated header + ;; files will be sprinkled with ‘\c’, which + ;; the compiler won't like. + (add-after 'unpack 'fix-gen-lock-obj.sh + (lambda _ + (substitute* "src/gen-lock-obj.sh" + (("if test -n `echo -n`") "if ! test -n `echo -n`")))) ;; When cross-compiling, some platform specific properties cannot ;; be detected. Create a symlink to the appropriate platform - ;; file. See Cross-Compiling section at: + ;; file if required. Note that these platform files depend on + ;; both the operating system and architecture! + ;; + ;; 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") - ("mips64el" "mips-unknown-linux-gnu") - (x - (string-append x "-unknown-linux-gnu"))))) - (symlink - (string-append "lock-obj-pub." triplet ".h") - "src/syscfg/lock-obj-pub.linux-gnu.h")) - #t)))) + (lambda _ + (define (link triplet source) + (symlink (string-append "lock-obj-pub." triplet ".h") + (string-append "src/syscfg/lock-obj-pub." + source ".h"))) + ,(let* ((target (%current-target-system)) + (architecture + (string-take target (string-index target #\-)))) + (cond ((target-linux? target) + (match architecture + ("armhf" + `(link "arm-unknown-linux-gnueabi" "linux-gnu")) + ("mips64el" + `(link "mips-unknown-linux-gnu" "linux-gnu")) + ;; Don't always link to the "linux-gnu" + ;; configuration, as this is not correct for + ;; all architectures. + (_ #t))) + (#t #t))))))) '())) (native-inputs `(("gettext" ,gettext-minimal))) (home-page "https://gnupg.org") @@ -136,14 +154,14 @@ Daemon and possibly more in the future.") (define-public libgcrypt (package (name "libgcrypt") - (version "1.8.5") + (version "1.8.8") (source (origin (method url-fetch) (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-" version ".tar.bz2")) (sha256 (base32 - "1hvsazms1bfd769q0ngl0r9g5i4m9mpz9jmvvrdzyzk3rfa2ljiv")))) + "1xasrh9zxhgj2n5n8dvpzbwn1mzpmlzy270xhbq2gl8xk2xy4pc9")))) (build-system gnu-build-system) (propagated-inputs `(("libgpg-error-host" ,libgpg-error))) @@ -175,7 +193,7 @@ generation.") (define-public libassuan (package (name "libassuan") - (version "2.5.4") + (version "2.5.5") (source (origin (method url-fetch) @@ -183,11 +201,10 @@ generation.") version ".tar.bz2")) (sha256 (base32 - "1w7vnnycq4z7gf4bk38pi4hrb8qrrzgfpz3cd7frwldxnfbfx060")))) + "1r1lvcp67gn5lfrj1g388sd77ca6qwnmxndirdysd71gk362z34f")))) (build-system gnu-build-system) (propagated-inputs - `(("libgpg-error" ,libgpg-error) - ("pth" ,pth))) + (list libgpg-error pth)) (home-page "https://gnupg.org") (synopsis "IPC library used by GnuPG and related software") @@ -203,7 +220,7 @@ provided.") (define-public libksba (package (name "libksba") - (version "1.5.0") + (version "1.6.0") (source (origin (method url-fetch) @@ -212,12 +229,12 @@ provided.") version ".tar.bz2")) (sha256 (base32 - "1fm0mf3wq9fmyi1rmc1vk2fafn6liiw2mgxml3g7ybbb44lz2jmf")))) + "12x40y9ihs8nw2xs2y2vjfw90mhikbm5rvabma0dh5frybk87mns")))) (build-system gnu-build-system) (propagated-inputs - `(("libgpg-error" ,libgpg-error))) + (list libgpg-error)) (native-inputs - `(("libgpg-error" ,libgpg-error))) + (list libgpg-error)) (arguments `(#:configure-flags (list ,@(if (%current-target-system) @@ -262,7 +279,7 @@ compatible to GNU Pth.") (define-public gnupg (package (name "gnupg") - (version "2.2.29") + (version "2.2.30") (source (origin (method url-fetch) (uri (string-append "mirror://gnupg/gnupg/gnupg-" version @@ -270,22 +287,22 @@ compatible to GNU Pth.") (patches (search-patches "gnupg-default-pinentry.patch")) (sha256 (base32 - "1j8cpp08zlz9a9n4g9z6352m1bvl369r94p4pjg8z0948pdprl1r")))) + "1111ry31gaxv76miqsy6l0kwxwlx8sz0jk41jhyrjwx649p6sqyc")))) (build-system gnu-build-system) (native-inputs - `(("pkg-config" ,pkg-config))) + (list pkg-config)) (inputs - `(("gnutls" ,gnutls) - ("libassuan" ,libassuan) - ("libgcrypt" ,libgcrypt) - ("libgpg-error" ,libgpg-error) - ("libksba" ,libksba) - ("npth" ,npth) - ("openldap" ,openldap) - ("pcsc-lite" ,pcsc-lite) - ("readline" ,readline) - ("sqlite" ,sqlite) - ("zlib" ,zlib))) + (list gnutls + libassuan + libgcrypt + libgpg-error + libksba + npth + openldap + pcsc-lite + readline + sqlite + zlib)) (arguments `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg` ;; executable in its installation directory in @@ -299,14 +316,12 @@ compatible to GNU Pth.") (substitute* "scd/scdaemon.c" (("\"(libpcsclite\\.so[^\"]*)\"" _ name) (string-append "\"" (assoc-ref inputs "pcsc-lite") - "/lib/" name "\""))) - #t)) + "/lib/" name "\""))))) (add-after 'build 'patch-scheme-tests (lambda _ (substitute* (find-files "tests" ".\\.scm$") (("/usr/bin/env gpgscm") - (string-append (getcwd) "/tests/gpgscm/gpgscm"))) - #t)) + (string-append (getcwd) "/tests/gpgscm/gpgscm"))))) (add-before 'build 'patch-test-paths (lambda _ (substitute* '("tests/inittests" @@ -318,8 +333,7 @@ compatible to GNU Pth.") (substitute* "common/t-exectool.c" (("/bin/cat") (which "cat")) (("/bin/true") (which "true")) - (("/bin/false") (which "false"))) - #t))))) + (("/bin/false") (which "false")))))))) (home-page "https://gnupg.org/") (synopsis "GNU Privacy Guard") (description @@ -333,6 +347,25 @@ libskba (working with X.509 certificates and CMS data).") (properties '((ftp-server . "ftp.gnupg.org") (ftp-directory . "/gcrypt/gnupg"))))) +(define-public gnupg-2.2.32 + (package + (inherit gnupg) + (version "2.2.32") + + ;; Hide this version because packages like 'emacs-pinentry' propagate the + ;; default GnuPG and "guix install gnupg emacs-pinentry" would fail with a + ;; collision error. + (properties `((hidden? . #t) + ,@(package-properties gnupg))) + + (source (origin + (inherit (package-source gnupg)) + (uri (string-append "mirror://gnupg/gnupg/gnupg-" version + ".tar.bz2")) + (sha256 + (base32 + "0506gv54z10c96z5821z9p0ksibk1pfilsmag39ffqrcz0sinmxj")))))) + (define-public gnupg-1 (package (inherit gnupg) (version "1.4.23") @@ -342,14 +375,11 @@ libskba (working with X.509 certificates and CMS data).") ".tar.bz2")) (sha256 (base32 - "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9")))) + "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9")) + (patches (search-patches "gnupg-1-build-with-gcc10.patch")))) (native-inputs '()) (inputs - `(("zlib" ,zlib) - ("bzip2" ,bzip2) - ("curl" ,curl) - ("readline" ,readline) - ("libgpg-error" ,libgpg-error))) + (list zlib bzip2 curl readline libgpg-error)) (arguments `(#:phases (modify-phases %standard-phases @@ -371,12 +401,12 @@ libskba (working with X.509 certificates and CMS data).") (base32 "1bg13l5s8x9p1v0jyv29n84bay27pflindpzjsc9gj7i4wdkrg7f")))) (build-system gnu-build-system) (native-inputs - `(("gnupg" ,gnupg))) + (list gnupg)) (propagated-inputs ;; Needs to be propagated because gpgme.h includes gpg-error.h. - `(("libgpg-error" ,libgpg-error))) + (list libgpg-error)) (inputs - `(("libassuan" ,libassuan))) + (list libassuan)) (home-page "https://www.gnupg.org/related_software/gpgme/") (synopsis "Library providing simplified access to GnuPG functionality") (description @@ -410,12 +440,15 @@ and every application benefits from this.") (chdir "lang/qt") #t))))) (native-inputs - `(("pkg-config" ,pkg-config) - ,@(package-native-inputs gpgme))) + ;; Use GnuPG 2.2.32. With 2.2.30, 'testSymmetricEncryptDecrypt' in + ;; t-encrypt.cpp fails because 'gpg' wrongfully ask for a passphrase do + ;; decrypt the cypher text. + (modify-inputs (package-native-inputs gpgme) + (replace "gnupg" gnupg-2.2.32) + (prepend pkg-config))) (inputs - `(("gpgme" ,gpgme) - ("qtbase" ,qtbase-5) - ,@(package-inputs gpgme))) + (modify-inputs (package-inputs gpgme) + (prepend gpgme qtbase-5))) (synopsis "Qt API bindings for gpgme") (description "QGpgme provides a very high level Qt API around GpgMEpp. @@ -451,17 +484,14 @@ gpgpme starting with version 1.7.") ;; When cross-compiling, the bash script 'libgcrypt-config' ;; must be accessible during the configure phase. (setenv "PATH" - (string-append (assoc-ref inputs "libgcrypt") - "/bin:" (getenv "PATH"))))))))) + (string-append + (dirname + (search-input-file inputs "bin/libgcrypt-config")) + ":" (getenv "PATH"))))))))) (native-inputs - `(("pkg-config" ,pkg-config) - ("autoconf" ,autoconf) - ("automake" ,automake) - ("texinfo" ,texinfo) - ("guile" ,guile-3.0))) + (list pkg-config autoconf automake texinfo guile-3.0)) (inputs - `(("guile" ,guile-3.0) - ("libgcrypt" ,libgcrypt))) + (list guile-3.0 libgcrypt)) (synopsis "Cryptography library for Guile using Libgcrypt") (description "Guile-Gcrypt provides a Guile interface to a subset of the @@ -475,22 +505,22 @@ interface (FFI) of Guile.") (package (inherit guile-gcrypt) (name "guile2.0-gcrypt") (native-inputs - `(("guile" ,guile-2.0) - ,@(alist-delete "guile" (package-native-inputs guile-gcrypt)))) + (modify-inputs (package-native-inputs guile-gcrypt) + (replace "guile" guile-2.0))) (inputs - `(("guile" ,guile-2.0) - ,@(alist-delete "guile" (package-inputs guile-gcrypt)))))) + (modify-inputs (package-inputs guile-gcrypt) + (replace "guile" guile-2.0))))) (define-public guile2.2-gcrypt (package (inherit guile-gcrypt) (name "guile2.2-gcrypt") (native-inputs - `(("guile" ,guile-2.2) - ,@(alist-delete "guile" (package-native-inputs guile-gcrypt)))) + (modify-inputs (package-native-inputs guile-gcrypt) + (replace "guile" guile-2.2))) (inputs - `(("guile" ,guile-2.2) - ,@(alist-delete "guile" (package-inputs guile-gcrypt)))))) + (modify-inputs (package-inputs guile-gcrypt) + (replace "guile" guile-2.2))))) (define-public python-gpg (package @@ -513,9 +543,9 @@ interface (FFI) of Guile.") #t))) #:tests? #f)) ; No test suite. (inputs - `(("gpgme" ,gpgme))) + (list gpgme)) (native-inputs - `(("swig" ,swig))) + (list swig)) (home-page (package-home-page gpgme)) (synopsis "Python bindings for GPGME GnuPG cryptography library") (description "This package provides Python bindings to the GPGME GnuPG @@ -551,9 +581,9 @@ distributed separately.") (lambda _ (invoke "make" "check")))))) (build-system python-build-system) (native-inputs - `(("gnupg" ,gnupg-1))) + (list gnupg-1)) (inputs - `(("gpgme" ,gpgme))) + (list gpgme)) (home-page "https://launchpad.net/pygpgme") (synopsis "Python module for working with OpenPGP messages") (description @@ -592,7 +622,7 @@ decrypt messages using the OpenPGP format by making use of GPGME.") (invoke "python" "test_gnupg.py" "--no-doctests"))))))) (native-inputs - `(("gnupg" ,gnupg))) + (list gnupg)) (home-page "https://pythonhosted.org/python-gnupg/index.html") (synopsis "Wrapper for the GNU Privacy Guard") (description @@ -624,14 +654,11 @@ and signature functionality from Python programs.") (delete-file "t/encrypt_symmetrically.t") #t))))) (inputs - `(("gnupg" ,gnupg-1))) + (list gnupg-1)) (propagated-inputs - `(("perl-moo" ,perl-moo) - ("perl-moox-handlesvia" ,perl-moox-handlesvia) - ("perl-moox-late" ,perl-moox-late))) + (list perl-moo perl-moox-handlesvia perl-moox-late)) (native-inputs - `(("which" ,which) - ("perl-module-install" ,perl-module-install))) + (list which perl-module-install)) (home-page "https://metacpan.org/release/GnuPG-Interface") (synopsis "Perl interface to GnuPG") (description "@code{GnuPG::Interface} and its associated modules are @@ -664,8 +691,7 @@ signing, decryption, verification, and key-listing parsing.") (add-before 'build 'set-gpg-file-name (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((gpg (string-append (assoc-ref inputs "gpg") - "/bin/gpg"))) + (let* ((gpg (search-input-file inputs "/bin/gpg"))) (substitute* "libpius/constants.py" (("/usr/bin/gpg2") gpg)) #t)))))) @@ -702,12 +728,12 @@ PGP keysigning parties.") ;; 'configure phase. `(("autoconf" ,autoconf-wrapper) ("automake" ,automake))) - (inputs `(("perl" ,perl) - ("perl-text-template" ,perl-text-template) - ("perl-mime-tools" ,perl-mime-tools) - ("perl-gnupg-interface" ,perl-gnupg-interface) - ("perl-net-idn-encode" ,perl-net-idn-encode) - ("libmd" ,libmd))) + (inputs (list perl + perl-text-template + perl-mime-tools + perl-gnupg-interface + perl-net-idn-encode + libmd)) (arguments `(#:tests? #f ; no test suite #:phases @@ -802,11 +828,10 @@ including tools for signing keys, keyring analysis, and party preparation. (arguments `(#:configure-flags '("--enable-pinentry-tty"))) (inputs - `(("ncurses" ,ncurses) - ("libassuan" ,libassuan) - ("libsecret" ,libsecret "out"))) + (list ncurses libassuan + `(,libsecret "out"))) (native-inputs - `(("pkg-config" ,pkg-config))) + (list pkg-config)) (home-page "https://gnupg.org/aegypten2/") (synopsis "GnuPG's interface to passphrase input") (description @@ -834,9 +859,8 @@ enter a passphrase when required by @code{gpg} or other software."))) (arguments `(#:configure-flags '("--enable-fallback-curses"))) (inputs - `(("gtk+" ,gtk+-2) - ("glib" ,glib) - ,@(package-inputs pinentry-tty))) + (modify-inputs (package-inputs pinentry-tty) + (prepend gtk+-2 glib))) (description "Pinentry provides a console and a GTK+ GUI that allows users to enter a passphrase when @code{gpg} is run and needs it."))) @@ -846,10 +870,8 @@ passphrase when @code{gpg} is run and needs it."))) (inherit pinentry-tty) (name "pinentry-gnome3") (inputs - `(("gtk+" ,gtk+-2) - ("gcr" ,gcr) - ("glib" ,glib) - ,@(package-inputs pinentry-tty))) + (modify-inputs (package-inputs pinentry-tty) + (prepend gtk+-2 gcr glib))) (arguments `(#:configure-flags '("--enable-pinentry-gnome3" "--enable-fallback-curses"))) @@ -865,8 +887,8 @@ software."))) (arguments `(#:configure-flags '("--enable-fallback-curses"))) (inputs - `(("qtbase" ,qtbase-5) - ,@(package-inputs pinentry-tty))) + (modify-inputs (package-inputs pinentry-tty) + (prepend qtbase-5))) (description "Pinentry provides a console and a Qt GUI that allows users to enter a passphrase when @code{gpg} is run and needs it."))) @@ -889,8 +911,8 @@ passphrase when @code{gpg} is run and needs it."))) ("gettext" ,gettext-minimal) ,@(package-native-inputs pinentry-tty))) (inputs - `(("efl" ,efl) - ,@(package-inputs pinentry-tty))) + (modify-inputs (package-inputs pinentry-tty) + (prepend efl))) (description "Pinentry provides a console and a graphical interface for @acronym{EFL, the Enlightenment Foundation Libraries} that allows users to enter a @@ -933,13 +955,8 @@ passphrase when @code{gpg} is run and needs it."))) (lambda* rest (invoke "make" "installcheck")))))) (native-inputs - `(("autoconf" ,autoconf) - ("autoconf-archive" ,autoconf-archive) - ("automake" ,automake) - ("pkg-config" ,pkg-config) - ("texinfo" ,texinfo))) - (inputs `(("guile" ,guile-3.0) - ("rofi" ,rofi))) + (list autoconf autoconf-archive automake pkg-config texinfo)) + (inputs (list guile-3.0 rofi)) (synopsis "Rofi GUI for GnuPG's passphrase input") (description "Pinentry-rofi is a simple graphical user interface for passphrase or PIN when required by @code{gpg} or other software. It is using @@ -963,12 +980,9 @@ with @code{rofi-pass} a good front end for @code{password-store}.") (base32 "1faxaydhc9lr97b2r3sylcy320bn54g4a5p727y3227mz3gg1mn1")))) (build-system meson-build-system) (native-inputs - `(("pkg-config" ,pkg-config))) + (list pkg-config)) (inputs - `(("bemenu" ,bemenu) - ("libassuan" ,libassuan) - ("libgpg-error" ,libgpg-error) - ("popt" ,popt))) + (list bemenu libassuan libgpg-error popt)) (home-page "https://github.com/t-8ch/pinentry-bemenu") (synopsis "Pinentry implementation based on @code{bemenu}") (description @@ -1029,7 +1043,7 @@ them to transform your existing public key into a secret key.") #:make-flags (list ,(string-append "CC=" (cc-for-target)) (string-append "DESTDIR=" (assoc-ref %outputs "out"))))) (inputs - `(("zlib" ,zlib))) + (list 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 @@ -1062,7 +1076,7 @@ however, pgpdump produces more detailed and easier to understand output.") `("PATH" ":" prefix (,(string-append gnupg "/bin")))) #t)))))) (native-inputs - `(("pkg-config" ,pkg-config))) + (list pkg-config)) (inputs `(("gnupg" ,gnupg) ("gpgme" ,gpgme) @@ -1131,7 +1145,7 @@ files, to verify signatures, and to manage the private and public keys.") ("perl-xml-twig" ,perl-xml-twig) ("torsocks" ,torsocks))) (native-inputs - `(("xorg-server" ,xorg-server-for-tests))) + (list xorg-server-for-tests)) (arguments `(#:phases (modify-phases %standard-phases @@ -1193,8 +1207,7 @@ over.") (delete 'configure) ; no configure script (add-before 'install 'hardlink-gnupg (lambda* (#:key inputs #:allow-other-keys) - (let ((gpg (string-append (assoc-ref inputs "gnupg") - "/bin/gpg"))) + (let ((gpg (search-input-file inputs "/bin/gpg"))) (substitute* (find-files "." "jetring-[[:alpha:]]+$") (("gpg -") (string-append gpg " -")) (("\\\"gpg\\\"") (string-append "\"" gpg "\""))) @@ -1213,8 +1226,7 @@ over.") #t)))) #:tests? #f)) ; no test phase (inputs - `(("gnupg" ,gnupg) - ("perl" ,perl))) + (list gnupg perl)) (home-page "https://joeyh.name/code/jetring/") (synopsis "GnuPG keyring maintenance using changesets") (description |