gnu: superlu-dist: Return #t from all phases.
[jackhill/guix/guix.git] / gnu / packages / gnupg.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2015, 2018 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
5 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
7 ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
8 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
11 ;;; Copyright © 2016 Christopher Baines <mail@cbaines.net>
12 ;;; Copyright © 2016 Mike Gerwitz <mtg@gnu.org>
13 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
14 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
16 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
17 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
18 ;;;
19 ;;; This file is part of GNU Guix.
20 ;;;
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
25 ;;;
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
30 ;;;
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33
34 (define-module (gnu packages gnupg)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages adns)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages curl)
41 #:use-module (gnu packages crypto)
42 #:use-module (gnu packages emacs)
43 #:use-module (gnu packages openldap)
44 #:use-module (gnu packages perl)
45 #:use-module (gnu packages perl-check)
46 #:use-module (gnu packages pth)
47 #:use-module (gnu packages python)
48 #:use-module (gnu packages qt)
49 #:use-module (gnu packages readline)
50 #:use-module (gnu packages compression)
51 #:use-module (gnu packages databases)
52 #:use-module (gnu packages gtk)
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages gnome)
55 #:use-module (gnu packages pkg-config)
56 #:use-module (gnu packages ncurses)
57 #:use-module (gnu packages security-token)
58 #:use-module (gnu packages swig)
59 #:use-module (gnu packages tls)
60 #:use-module (gnu packages tor)
61 #:use-module (gnu packages web)
62 #:use-module (gnu packages xml)
63 #:use-module (guix packages)
64 #:use-module (guix download)
65 #:use-module (guix git-download)
66 #:use-module (guix build-system gnu)
67 #:use-module (guix build-system perl)
68 #:use-module (guix build-system python))
69
70 (define-public libgpg-error
71 (package
72 (name "libgpg-error")
73 (version "1.28")
74 (source
75 (origin
76 (method url-fetch)
77 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
78 version ".tar.bz2"))
79 (sha256
80 (base32
81 "0jfsfnh9bxlxiwxws60yah4ybjw2hshmvqp31pri4m4h8ivrbnry"))
82 (patches (search-patches "libgpg-error-aarch64-logging-fix.patch"))))
83 (build-system gnu-build-system)
84 (home-page "https://gnupg.org")
85 (synopsis "Library of error values for GnuPG components")
86 (description
87 "Libgpg-error is a small library that defines common error values
88 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
89 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
90 Daemon and possibly more in the future.")
91 (license license:lgpl2.0+)
92 (properties '((ftp-server . "ftp.gnupg.org")
93 (ftp-directory . "/gcrypt/libgpg-error")))))
94
95 ;; Some packages (e.g. GPGME) require a newer libgpg-error to deal with
96 ;; error codes from recent GnuPG. Remove this in the next rebuild cycle.
97 (define-public libgpg-error-1.31
98 (package
99 (inherit libgpg-error)
100 (version "1.31")
101 (source (origin
102 (method url-fetch)
103 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
104 version ".tar.bz2"))
105 (sha256
106 (base32
107 "1vx4nw6rxh2biy3h8n96fyr86q29h8gjl6837437i51jr4isil20"))))))
108
109 (define-public libgcrypt
110 (package
111 (replacement libgcrypt/fixed)
112 (name "libgcrypt")
113 (version "1.8.2")
114 (source (origin
115 (method url-fetch)
116 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
117 version ".tar.bz2"))
118 (sha256
119 (base32
120 "01sca9m8hm6b5v8hmqsfdjhyz013869p1f0fxw9ln52qfnp4q1n8"))))
121 (build-system gnu-build-system)
122 (propagated-inputs
123 `(("libgpg-error-host" ,libgpg-error)))
124 (native-inputs
125 ;; Needed here for the 'gpg-error' program.
126 `(("libgpg-error-native" ,libgpg-error)))
127 (arguments
128 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
129 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
130 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
131 `(#:configure-flags
132 (list (string-append "--with-gpg-error-prefix="
133 (assoc-ref %build-inputs "libgpg-error-host")))))
134 (outputs '("out" "debug"))
135 (home-page "https://gnupg.org/")
136 (synopsis "Cryptographic function library")
137 (description
138 "Libgcrypt is a general-purpose cryptographic library. It provides the
139 standard cryptographic building blocks such as symmetric ciphers, hash
140 algorithms, public key algorithms, large integer functions and random number
141 generation.")
142 (license license:lgpl2.0+)
143 (properties '((ftp-server . "ftp.gnupg.org")
144 (ftp-directory . "/gcrypt/libgcrypt")))))
145
146 (define libgcrypt/fixed
147 (package
148 (inherit libgcrypt)
149 (name "libgcrypt")
150 (version "1.8.3")
151 (source (origin
152 (method url-fetch)
153 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
154 version ".tar.bz2"))
155 (sha256
156 (base32
157 "0z5gs1khzyknyfjr19k8gk4q148s6q987ya85cpn0iv70fz91v36"))))))
158
159 (define-public libassuan
160 (package
161 (name "libassuan")
162 (version "2.5.1")
163 (source
164 (origin
165 (method url-fetch)
166 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
167 version ".tar.bz2"))
168 (sha256
169 (base32
170 "0jb4nb4nrjr949gd3lw8lh4v5d6qigxaq6xwy24w5apjnhvnrya7"))))
171 (build-system gnu-build-system)
172 (propagated-inputs
173 `(("libgpg-error" ,libgpg-error)
174 ("pth" ,pth)))
175 (home-page "https://gnupg.org")
176 (synopsis
177 "IPC library used by GnuPG and related software")
178 (description
179 "Libassuan is a small library implementing the so-called Assuan
180 protocol. This protocol is used for IPC between most newer
181 GnuPG components. Both, server and client side functions are
182 provided.")
183 (license license:lgpl2.0+)
184 (properties '((ftp-server . "ftp.gnupg.org")
185 (ftp-directory . "/gcrypt/libassuan")))))
186
187 (define-public libksba
188 (package
189 (name "libksba")
190 (version "1.3.5")
191 (source
192 (origin
193 (method url-fetch)
194 (uri (string-append
195 "mirror://gnupg/libksba/libksba-"
196 version ".tar.bz2"))
197 (sha256
198 (base32
199 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
200 (build-system gnu-build-system)
201 (propagated-inputs
202 `(("libgpg-error" ,libgpg-error)))
203 (native-inputs
204 `(("libgpg-error" ,libgpg-error)))
205 (arguments
206 `(#:configure-flags
207 (list ,@(if (%current-target-system)
208 '("CC_FOR_BUILD=gcc")
209 '())
210 (string-append "--with-gpg-error-prefix="
211 (assoc-ref %build-inputs "libgpg-error")))))
212 (home-page "https://www.gnupg.org")
213 (synopsis "CMS and X.509 access library")
214 (description
215 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
216 as well as the CMS easily accessible by other applications. Both
217 specifications are building blocks of S/MIME and TLS.")
218 (license license:gpl3+)
219 (properties '((ftp-server . "ftp.gnupg.org")
220 (ftp-directory . "/gcrypt/libksba")))))
221
222 (define-public npth
223 (package
224 (name "npth")
225 (version "1.5")
226 (source
227 (origin
228 (method url-fetch)
229 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
230 (sha256
231 (base32
232 "1hmkkp6vzyrh8v01c2ynzf9vwikyagp7p1lxhbnr4ysk3w66jji9"))))
233 (build-system gnu-build-system)
234 (home-page "https://www.gnupg.org")
235 (synopsis "Non-preemptive thread library")
236 (description
237 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
238 threads implementation.
239
240 In contrast to GNU Pth is is based on the system's standard threads
241 implementation. This allows the use of libraries which are not
242 compatible to GNU Pth.")
243 (license (list license:lgpl3+ license:gpl2+)))) ; dual license
244
245 (define-public gnupg
246 (package
247 (name "gnupg")
248 (version "2.2.8")
249 (source (origin
250 (method url-fetch)
251 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
252 ".tar.bz2"))
253 (sha256
254 (base32
255 "1k8dnnfs9888yp713l7kg2jg110lw47s4krx0njna6fjrsw4qyvp"))))
256 (build-system gnu-build-system)
257 (native-inputs
258 `(("pkg-config" ,pkg-config)))
259 (inputs
260 `(("gnutls" ,gnutls)
261 ("libassuan" ,libassuan)
262 ("libgcrypt" ,libgcrypt)
263 ("libgpg-error" ,libgpg-error)
264 ("libksba" ,libksba)
265 ("npth" ,npth)
266 ("openldap" ,openldap)
267 ("pcsc-lite" ,pcsc-lite)
268 ("readline" ,readline)
269 ("sqlite" ,sqlite)
270 ("zlib" ,zlib)))
271 (arguments
272 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
273 ;; executable in its installation directory in
274 ;; /gnu/store before it has been installed.
275 "--enable-gnupg-builddir-envvar"
276 "--enable-all-tests")
277 #:phases
278 (modify-phases %standard-phases
279 (add-before 'configure 'patch-paths
280 (lambda* (#:key inputs #:allow-other-keys)
281 (substitute* "scd/scdaemon.c"
282 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
283 (string-append "\"" (assoc-ref inputs "pcsc-lite")
284 "/lib/" name "\"")))
285 #t))
286 (add-after 'build 'patch-scheme-tests
287 (lambda _
288 (substitute* (find-files "tests" ".\\.scm$")
289 (("/usr/bin/env gpgscm")
290 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
291 #t))
292 (add-before 'build 'patch-test-paths
293 (lambda _
294 (substitute* '("tests/inittests"
295 "tests/pkits/inittests"
296 "tests/Makefile"
297 "tests/pkits/common.sh"
298 "tests/pkits/Makefile")
299 (("/bin/pwd") (which "pwd")))
300 (substitute* "common/t-exectool.c"
301 (("/bin/cat") (which "cat"))
302 (("/bin/true") (which "true"))
303 (("/bin/false") (which "false")))
304 #t)))))
305 (home-page "https://gnupg.org/")
306 (synopsis "GNU Privacy Guard")
307 (description
308 "The GNU Privacy Guard is a complete implementation of the OpenPGP
309 standard. It is used to encrypt and sign data and communication. It
310 features powerful key management and the ability to access public key
311 servers. It includes several libraries: libassuan (IPC between GnuPG
312 components), libgpg-error (centralized GnuPG error values), and
313 libskba (working with X.509 certificates and CMS data).")
314 (license license:gpl3+)
315 (properties '((ftp-server . "ftp.gnupg.org")
316 (ftp-directory . "/gcrypt/gnupg")))))
317
318 (define-public gnupg-2.0
319 (package (inherit gnupg)
320 (version "2.0.30")
321 (source (origin
322 (method url-fetch)
323 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
324 ".tar.bz2"))
325 (sha256
326 (base32
327 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
328 (native-inputs '())
329 (inputs
330 `(("adns" ,adns)
331 ("bzip2" ,bzip2)
332 ("curl" ,curl)
333 ("libassuan" ,libassuan)
334 ("libgcrypt" ,libgcrypt)
335 ("libgpg-error" ,libgpg-error)
336 ("libksba" ,libksba)
337 ("pth" ,pth)
338 ("openldap" ,openldap)
339 ("zlib" ,zlib)
340 ("readline" ,readline)))
341 (arguments
342 `(#:phases
343 (modify-phases %standard-phases
344 (add-before 'configure 'patch-config-files
345 (lambda _
346 (substitute* "tests/openpgp/Makefile.in"
347 (("/bin/sh") (which "sh")))
348 #t))
349 (add-after 'install 'rename-v2-commands
350 (lambda* (#:key outputs #:allow-other-keys)
351 ;; Upstream suggests removing the trailing '2' from command names:
352 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
353 (let ((out (assoc-ref outputs "out")))
354 (with-directory-excursion (string-append out "/bin")
355 (rename-file "gpgv2" "gpgv")
356 (rename-file "gpg2" "gpg")
357
358 ;; Keep the old name around to ease transition.
359 (symlink "gpgv" "gpgv2")
360 (symlink "gpg" "gpg2")
361 #t)))))))
362 (properties `((superseded . ,gnupg)))))
363
364 (define-public gnupg-1
365 (package (inherit gnupg)
366 (version "1.4.23")
367 (source (origin
368 (method url-fetch)
369 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
370 ".tar.bz2"))
371 (sha256
372 (base32
373 "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))))
374 (native-inputs '())
375 (inputs
376 `(("zlib" ,zlib)
377 ("bzip2" ,bzip2)
378 ("curl" ,curl)
379 ("readline" ,readline)
380 ("libgpg-error" ,libgpg-error)))
381 (arguments
382 `(#:phases
383 (modify-phases %standard-phases
384 (add-after 'unpack 'patch-check-sh
385 (lambda _
386 (substitute* "checks/Makefile.in"
387 (("/bin/sh") (which "sh")))
388 #t)))))))
389
390 (define-public gpgme
391 (package
392 (name "gpgme")
393 (version "1.11.1")
394 (source
395 (origin
396 (method url-fetch)
397 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
398 ".tar.bz2"))
399 (sha256
400 (base32
401 "0vxx5xaag3rhp4g2arp5qm77gvz4kj0m3hnpvhkdvqyjfhbi26rd"))))
402 (build-system gnu-build-system)
403 (native-inputs
404 `(("gnupg" ,gnupg)))
405 (propagated-inputs
406 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
407 `(("libgpg-error" ,libgpg-error-1.31)))
408 (inputs
409 `(("libassuan" ,libassuan)))
410 (home-page "https://www.gnupg.org/related_software/gpgme/")
411 (synopsis "Library providing simplified access to GnuPG functionality")
412 (description
413 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
414 easier for applications. It provides a High-Level Crypto API for encryption,
415 decryption, signing, signature verification and key management. Currently
416 it uses GnuPG as its backend but the API isn't restricted to this engine.
417
418 Because the direct use of GnuPG from an application can be a complicated
419 programming task, it is suggested that all software should try to use GPGME
420 instead. This way bug fixes or improvements can be done at a central place
421 and every application benefits from this.")
422 (license license:lgpl2.1+)))
423
424 (define-public qgpgme
425 (package
426 (inherit gpgme)
427 (name "qgpgme")
428 (arguments
429 `(#:phases
430 (modify-phases %standard-phases
431 (add-before 'build 'chdir-and-symlink
432 (lambda* (#:key inputs #:allow-other-keys)
433 (let ((gpgme (assoc-ref inputs "gpgme")))
434 (symlink (string-append gpgme "/lib/libgpgmepp.la")
435 "lang/cpp/src/libgpgmepp.la")
436 (symlink (string-append gpgme "/lib/libgpgme.la")
437 "src/libgpgme.la"))
438 (chdir "lang/qt")
439 #t)))))
440 (native-inputs
441 `(("pkg-config" ,pkg-config)
442 ,@(package-native-inputs gpgme)))
443 (inputs
444 `(("gpgme" ,gpgme)
445 ("qtbase" ,qtbase)
446 ,@(package-inputs gpgme)))
447 (synopsis "Qt API bindings for gpgme")
448 (description "QGpgme provides a very high level Qt API around GpgMEpp.
449
450 QGpgME was originally developed as part of libkleo and incorporated into
451 gpgpme starting with version 1.7.")
452 (license license:gpl2+))) ;; Note: this differs from gpgme
453
454 (define-public python-gpg
455 (package
456 (name "python-gpg")
457 (version "1.8.0")
458 (source (origin
459 (method url-fetch)
460 (uri (pypi-uri "gpg" version))
461 (sha256
462 (base32
463 "1x74i6q713c0bckls7rdm8kgsmllf9qvy9x62jghszlhgjkyh9nd"))))
464 (build-system python-build-system)
465 (arguments
466 '(#:tests? #f)) ; No test suite.
467 (inputs
468 `(("gpgme" ,gpgme)))
469 (native-inputs
470 `(("swig" ,swig)))
471 (home-page (package-home-page gpgme))
472 (synopsis "Python bindings for GPGME GnuPG cryptography library")
473 (description "This package provides Python bindings to the GPGME GnuPG
474 cryptographic library. It is developed in the GPGME source code, and then
475 distributed separately.")
476 (license license:lgpl2.1+)))
477
478 (define-public python2-gpg
479 (package-with-python2 python-gpg))
480
481 (define-public python-pygpgme
482 (package
483 (name "python-pygpgme")
484 (version "0.3")
485 (source
486 (origin
487 (method url-fetch)
488 (uri (pypi-uri "pygpgme" version))
489 (sha256
490 (base32
491 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
492 ;; Unfortunately, we have to disable some tests due to some gpg-agent
493 ;; goofiness... see:
494 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
495 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
496 "python-pygpgme-fix-pinentry-tests.patch"))))
497 (arguments
498 `(#:phases
499 (modify-phases %standard-phases
500 (add-before 'build 'make-build
501 (lambda _
502 (zero? (system* "make" "build"))))
503 (replace 'check
504 (lambda _
505 (zero? (system* "make" "check")))))))
506 (build-system python-build-system)
507 (native-inputs
508 `(("gnupg" ,gnupg-1)))
509 (inputs
510 `(("gpgme" ,gpgme)))
511 (home-page "https://launchpad.net/pygpgme")
512 (synopsis "Python module for working with OpenPGP messages")
513 (description
514 "PyGPGME is a Python module that lets you sign, verify, encrypt and
515 decrypt messages using the OpenPGP format by making use of GPGME.")
516 (license license:lgpl2.1+)))
517
518 (define-public python2-pygpgme
519 (package-with-python2 python-pygpgme))
520
521 (define-public python-gnupg
522 (package
523 (name "python-gnupg")
524 (version "0.4.3")
525 (source
526 (origin
527 (method url-fetch)
528 (uri (pypi-uri "python-gnupg" version))
529 (sha256
530 (base32
531 "03dc8whhvk7ccspbk8vzfhkxli8cd9zfbss5p597g4jldgy8s59d"))))
532 (build-system python-build-system)
533 (arguments
534 `(#:phases
535 (modify-phases %standard-phases
536 (replace 'check
537 (lambda _
538 (substitute* "test_gnupg.py"
539 ;; Unsure why this test fails.
540 (("'test_search_keys'") "True")
541 (("def test_search_keys") "def disabled__search_keys"))
542 (setenv "USERNAME" "guixbuilder")
543 ;; The doctests are extremely slow and sometimes time out,
544 ;; so we disable them.
545 (invoke "python"
546 "test_gnupg.py" "--no-doctests"))))))
547 (native-inputs
548 `(("gnupg" ,gnupg-1)))
549 (home-page "https://packages.python.org/python-gnupg/index.html")
550 (synopsis "Wrapper for the GNU Privacy Guard")
551 (description
552 "This module allows easy access to GnuPG’s key management, encryption
553 and signature functionality from Python programs.")
554 (license license:bsd-3)))
555
556 (define-public python2-gnupg
557 (package-with-python2 python-gnupg))
558
559 (define-public perl-gnupg-interface
560 (package
561 (name "perl-gnupg-interface")
562 (version "0.52")
563 (source (origin
564 (method url-fetch)
565 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
566 "GnuPG-Interface-" version ".tar.gz"))
567 (sha256
568 (base32
569 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
570 (build-system perl-build-system)
571 (arguments
572 `(#:phases
573 (modify-phases %standard-phases
574 ;; FIXME: This test fails for unknown reasons
575 (add-after 'unpack 'delete-broken-test
576 (lambda _
577 (delete-file "t/encrypt_symmetrically.t")
578 #t)))))
579 (inputs
580 `(("gnupg" ,gnupg-1)))
581 (propagated-inputs
582 `(("perl-moo" ,perl-moo)
583 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
584 ("perl-moox-late" ,perl-moox-late)))
585 (native-inputs
586 `(("which" ,which)
587 ("perl-module-install" ,perl-module-install)))
588 (home-page "http://search.cpan.org/dist/GnuPG-Interface/")
589 (synopsis "Perl interface to GnuPG")
590 (description "@code{GnuPG::Interface} and its associated modules are
591 designed to provide an object-oriented method for interacting with GnuPG,
592 being able to perform functions such as but not limited to encrypting,
593 signing, decryption, verification, and key-listing parsing.")
594 (license license:perl-license)))
595
596 (define-public pius
597 (package
598 (name "pius")
599 (version "2.2.6")
600 (source (origin
601 (method url-fetch)
602 (uri (string-append
603 "https://github.com/jaymzh/pius/releases/download/v"
604 version "/pius-" version ".tar.bz2"))
605 (sha256
606 (base32
607 "1893hzpx3zv724drqv48csrn0cm98xw4ymb1zmhs2jvjj1778zfj"))
608 (patches (search-patches "pius.patch"))))
609 (build-system python-build-system)
610 (inputs `(("perl" ,perl) ;for 'pius-party-worksheet'
611 ("gpg" ,gnupg)
612 ("python-six" ,python2-six)))
613 (arguments
614 `(#:tests? #f
615 #:python ,python-2 ;uses the Python 2 'print' syntax
616 #:phases
617 (modify-phases %standard-phases
618 (add-before
619 'build 'set-gpg-file-name
620 (lambda* (#:key inputs outputs #:allow-other-keys)
621 (let* ((gpg (string-append (assoc-ref inputs "gpg")
622 "/bin/gpg")))
623 (substitute* "libpius/constants.py"
624 (("/usr/bin/gpg2") gpg))
625 #t))))))
626 (synopsis "Programs to simplify GnuPG key signing")
627 (description
628 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
629 parties. It is the main utility and makes it possible to quickly and easily
630 sign each UID on a set of PGP keys. It is designed to take the pain out of
631 the sign-all-the-keys part of PGP Keysigning Party while adding security
632 to the process.
633
634 pius-keyring-mgr and pius-party-worksheet help organisers of
635 PGP keysigning parties.")
636 (license license:gpl2)
637 (home-page "https://www.phildev.net/pius/index.shtml")))
638
639 (define-public signing-party
640 ;; Upstream moved from alioth.debian.org to salsa.debian.org but the
641 ;; automatic svn import did not preserve tags apparently, so there's no real
642 ;; version number.
643 (let ((commit "d6f2296325605ee96ddf9f5b156e5e3f667a6df3")
644 (revision "0"))
645 (package
646 (name "signing-party")
647 (version (git-version "2.6" revision commit))
648 (home-page "https://salsa.debian.org/stappers/pgp-tools")
649 (source (origin
650 (method git-fetch)
651 (uri (git-reference
652 (url home-page)
653 (commit commit)))
654 (sha256
655 (base32
656 "00f7zasbwcbjzd92br2j10pyjxv0aw1qb4540qfz2dxzxgmdscrz"))))
657 (build-system gnu-build-system)
658 (native-inputs
659 `(("autoconf" ,autoconf-wrapper)
660 ("automake" ,automake)))
661 (inputs `(("perl" ,perl)
662 ("perl-text-template" ,perl-text-template)
663 ("perl-mime-tools" ,perl-mime-tools)
664 ("perl-gnupg-interface" ,perl-gnupg-interface)
665 ("perl-net-idn-encode" ,perl-net-idn-encode)
666 ("libmd" ,libmd)))
667 (arguments
668 `(#:tests? #f
669 #:phases
670 (modify-phases %standard-phases
671 (replace 'configure
672 (lambda* (#:key outputs #:allow-other-keys)
673 (let ((out (assoc-ref outputs "out")))
674 (substitute* "keyanalyze/Makefile"
675 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
676 (substitute* "keyanalyze/Makefile"
677 (("\\./configure") (string-append "./configure --prefix=" out)))
678 (substitute* "gpgwrap/Makefile"
679 (("\\} clean")
680 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
681 out "/bin/gpgwrap\n")))
682 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
683 "keylookup/Makefile" "sig2dot/Makefile"
684 "springgraph/Makefile")
685 (("/usr") out))
686 (setenv "CONFIG_SHELL" (which "sh")))))
687 (replace 'install
688 (lambda* (#:key outputs #:allow-other-keys #:rest args)
689 (let ((out (assoc-ref outputs "out"))
690 (install (assoc-ref %standard-phases 'install)))
691 (apply install args)
692 (for-each
693 (lambda (dir file)
694 (copy-file (string-append dir "/" file)
695 (string-append out "/bin/" file)))
696 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
697 "gpglist" "gpg-mailkeys" "gpgparticipants")
698 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
699 "gpglist" "gpg-mailkeys" "gpgparticipants"))
700 (for-each
701 (lambda (dir file)
702 (copy-file (string-append dir "/" file)
703 (string-append out "/share/man/man1/" file)))
704 '("caff" "caff" "caff" "gpgdir"
705 "gpg-key2ps" "gpglist" "gpg-mailkeys"
706 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
707 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
708 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
709 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
710 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
711 "process_keys.1" "pgpring.1" "keyanalyze.1")))))
712 (add-after 'install 'wrap-programs
713 (lambda* (#:key outputs #:allow-other-keys)
714 (let* ((out (assoc-ref outputs "out")))
715 (wrap-program
716 (string-append out "/bin/caff")
717 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))))))))
718 (synopsis "Collection of scripts for simplifying gnupg key signing")
719 (description
720 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
721 including tools for signing keys, keyring analysis, and party preparation.
722 @enumerate
723 @item caff: CA - Fire and Forget signs and mails a key
724 @item pgp-clean: removes all non-self signatures from key
725 @item pgp-fixkey: removes broken packets from keys
726 @item gpg-mailkeys: simply mail out a signed key to its owner
727 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
728 @item gpgdir: recursive directory encryption tool
729 @item gpglist: show who signed which of your UIDs
730 @item gpgsigs: annotates list of GnuPG keys with already done signatures
731 @item gpgparticipants: create list of party participants for the organiser
732 @item gpgwrap: a passphrase wrapper
733 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
734 @item keylookup: ncurses wrapper around gpg --search
735 @item sig2dot: converts a list of GnuPG signatures to a .dot file
736 @item springgraph: creates a graph from a .dot file
737 @end enumerate")
738 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
739 ;; and caff and gpgsigs: bsd-3, see
740 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
741 (license license:gpl2))))
742
743 (define-public pinentry-tty
744 (package
745 (name "pinentry-tty")
746 (version "1.1.0")
747 (source (origin
748 (method url-fetch)
749 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
750 version ".tar.bz2"))
751 (sha256
752 (base32
753 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
754 (build-system gnu-build-system)
755 (arguments
756 `(#:configure-flags '("--enable-pinentry-tty")))
757 (inputs
758 `(("ncurses" ,ncurses)
759 ("libassuan" ,libassuan)
760 ("libsecret" ,libsecret "out")))
761 (native-inputs
762 `(("pkg-config" ,pkg-config)))
763 (home-page "https://gnupg.org/aegypten2/")
764 (synopsis "GnuPG's interface to passphrase input")
765 (description
766 "Pinentry provides a console that allows users to enter a passphrase when
767 @code{gpg} is run and needs it.")
768 (license license:gpl2+)
769 (properties '((ftp-server . "ftp.gnupg.org")
770 (ftp-directory . "/gcrypt/pinentry")
771 (upstream-name . "pinentry")))))
772
773 (define-public pinentry-emacs
774 (package
775 (inherit pinentry-tty)
776 (name "pinentry-emacs")
777 (arguments
778 `(#:configure-flags '("--enable-pinentry-emacs")))
779 (description
780 "Pinentry provides a console and an Emacs interface that allows users to
781 enter a passphrase when required by @code{gpg} or other software.")))
782
783 (define-public pinentry-gtk2
784 (package
785 (inherit pinentry-tty)
786 (name "pinentry-gtk2")
787 (inputs
788 `(("gtk+" ,gtk+-2)
789 ("glib" ,glib)
790 ,@(package-inputs pinentry-tty)))
791 (description
792 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
793 passphrase when @code{gpg} is run and needs it.")))
794
795 (define-public pinentry-gnome3
796 (package
797 (inherit pinentry-tty)
798 (name "pinentry-gnome3")
799 (inputs
800 `(("gtk+" ,gtk+-2)
801 ("gcr" ,gcr)
802 ("glib" ,glib)
803 ,@(package-inputs pinentry-tty)))
804 (arguments
805 `(#:configure-flags '("--enable-pinentry-gnome3")))
806 (description
807 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
808 that allows users to enter a passphrase when required by @code{gpg} or other
809 software.")))
810
811 (define-public pinentry-qt
812 (package
813 (inherit pinentry-tty)
814 (name "pinentry-qt")
815 (inputs
816 `(("qtbase" ,qtbase)
817 ,@(package-inputs pinentry-tty)))
818 (arguments
819 `(#:configure-flags '("CXXFLAGS=-std=gnu++11")))
820 (description
821 "Pinentry provides a console and a Qt GUI that allows users to enter a
822 passphrase when @code{gpg} is run and needs it.")))
823
824 (define-public pinentry
825 (package (inherit pinentry-gtk2)
826 (name "pinentry")))
827
828 (define-public paperkey
829 (package
830 (name "paperkey")
831 (version "1.5")
832 (source (origin
833 (method url-fetch)
834 (uri (string-append "http://www.jabberwocky.com/"
835 "software/paperkey/paperkey-"
836 version ".tar.gz"))
837 (sha256
838 (base32
839 "1prd2jaf4zjad3xhv160hmi5n408ssljfg7iz90jxs9w111pjwy4"))))
840 (build-system gnu-build-system)
841 (arguments
842 `(#:phases
843 (modify-phases %standard-phases
844 (add-before 'check 'patch-check-scripts
845 (lambda _
846 (substitute* '("checks/roundtrip.sh"
847 "checks/roundtrip-raw.sh")
848 (("/bin/echo") "echo"))
849 #t)))))
850 (home-page "http://www.jabberwocky.com/software/paperkey/")
851 (synopsis "Backup OpenPGP keys to paper")
852 (description
853 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
854 for printing with paper and ink, which have amazingly long retention
855 qualities. To reconstruct a secret key, you re-enter those
856 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
857 them to transform your existing public key into a secret key.")
858 (license license:gpl2+)))
859
860 (define-public gpa
861 (package
862 (name "gpa")
863 (version "0.9.10")
864 (source (origin
865 (method url-fetch)
866 (uri (string-append "mirror://gnupg/gpa/"
867 name "-" version ".tar.bz2"))
868 (sha256
869 (base32
870 "09xphbi2456qynwqq5n0yh0zdmdi2ggrj3wk4hsyh5lrzlvcrff3"))))
871 (build-system gnu-build-system)
872 (native-inputs
873 `(("pkg-config" ,pkg-config)))
874 (inputs
875 `(("gnupg" ,gnupg)
876 ("gpgme" ,gpgme)
877 ("libassuan" ,libassuan)
878 ("libgpg-error" ,libgpg-error)
879 ("gtk+-2" ,gtk+-2)))
880 (home-page "https://gnupg.org/software/gpa/")
881 (synopsis "Graphical user interface for GnuPG")
882 (description
883 "GPA, the GNU Privacy Assistant, is a graphical user interface for
884 @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
885 files, to verify signatures, and to manage the private and public keys.")
886 (license license:gpl3+)))
887
888 (define-public parcimonie
889 (package
890 (name "parcimonie")
891 (version "0.10.3")
892 (source (origin
893 (method url-fetch)
894 (uri (string-append "https://gaffer.ptitcanardnoir.org/"
895 "intrigeri/files/parcimonie/App-Parcimonie-"
896 version ".tar.gz"))
897 (sha256
898 (base32
899 "1kf891117s1f3k6lxvbjdb21va9gxh29vlp9bd664ssgw266rcyb"))))
900 (build-system perl-build-system)
901 (inputs
902 `(("gnupg" ,gnupg-1) ; This is the version used by perl-gnupg-interface
903 ("perl-config-general" ,perl-config-general)
904 ("perl-clone" ,perl-clone)
905 ("perl-data" ,perl-data)
906 ("perl-exporter-tiny" ,perl-exporter-tiny)
907 ("perl-file-homedir" ,perl-file-homedir)
908 ("perl-file-sharedir" ,perl-file-sharedir)
909 ("perl-file-which" ,perl-file-which)
910 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
911 ("perl-gnupg-interface" ,perl-gnupg-interface)
912 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
913 ("perl-list-moreutils" ,perl-list-moreutils)
914 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
915 ("perl-lwp-online" ,perl-lwp-online)
916 ("perl-module-build" ,perl-module-build)
917 ("perl-module-pluggable-object" ,perl-module-pluggable)
918 ("perl-moo" ,perl-moo)
919 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
920 ("perl-moox-late" ,perl-moox-late)
921 ("perl-moox-options" ,perl-moox-options)
922 ("perl-namespace-clean" ,perl-namespace-clean)
923 ("perl-net-dbus" ,perl-net-dbus)
924 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
925 ("perl-path-tiny" ,perl-path-tiny)
926 ("perl-test-most" ,perl-test-most)
927 ("perl-test-trap" ,perl-test-trap)
928 ("perl-time-duration" ,perl-time-duration)
929 ("perl-time-duration-parse" ,perl-time-duration-parse)
930 ("perl-try-tiny" ,perl-try-tiny)
931 ("perl-type-tiny" ,perl-type-tiny)
932 ("perl-types-path-tiny" ,perl-types-path-tiny)
933 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
934 ("perl-xml-parser" ,perl-xml-parser)
935 ("perl-xml-twig" ,perl-xml-twig)
936 ("torsocks" ,torsocks)))
937 (arguments
938 `(#:phases
939 (modify-phases %standard-phases
940 ;; Needed for using gpg-connect-agent during tests.
941 (add-before 'check 'set-HOME
942 (lambda _ (setenv "HOME" "/tmp") #t))
943 (add-before 'install 'fix-references
944 (lambda* (#:key inputs outputs #:allow-other-keys)
945 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
946 (("gpg2") "gpg")
947 ;; Skip check whether dependencies are in the PATH
948 (("defined which.*") "")
949 (("call\\('parcimonie-torified-gpg'\\)")
950 (string-append "call('" (assoc-ref outputs "out")
951 "/bin/parcimonie-torified-gpg')")))
952 (substitute* "bin/parcimonie-torified-gpg"
953 (("torsocks") (string-append (assoc-ref inputs "torsocks")
954 "/bin/torsocks")))
955 #t))
956 (add-after 'install 'wrap-program
957 (lambda* (#:key inputs outputs #:allow-other-keys)
958 (let* ((out (assoc-ref outputs "out"))
959 (perllib (string-append out "/lib/perl5/site_perl/"
960 ,(package-version perl))))
961 (wrap-program (string-append out "/bin/parcimonie")
962 `("PERL5LIB" ":"
963 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
964 #t))))))
965 (home-page "https://gaffer.ptitcanardnoir.org/intrigeri/code/parcimonie/")
966 (synopsis "Incrementally refreshes a GnuPG keyring")
967 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
968 that makes it hard to correlate the keyring content to an individual, and
969 makes it hard to locate an individual based on an identifying subset of her
970 keyring content. Parcimonie is a daemon that fetches one key at a time using
971 the Tor network, waits a bit, changes the Tor circuit being used, and starts
972 over.")
973 (license license:gpl1+)))
974
975 (define-public jetring
976 (package
977 (name "jetring")
978 (version "0.27")
979 (source
980 (origin
981 (method url-fetch)
982 (uri (string-append "mirror://debian/pool/main/j/" name "/"
983 name "_" version ".tar.xz"))
984 (sha256
985 (base32
986 "0jy0x5zj7v87xgyldlsx1knzp0mv10wzamblrw1b61i2m1ii4pxz"))))
987 (build-system gnu-build-system)
988 (arguments
989 '(#:phases
990 (modify-phases %standard-phases
991 (delete 'configure) ; no configure script
992 (add-before 'install 'hardlink-gnupg
993 (lambda* (#:key inputs #:allow-other-keys)
994 (let ((gpg (string-append (assoc-ref inputs "gnupg")
995 "/bin/gpg")))
996 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
997 (("gpg -") (string-append gpg " -"))
998 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
999 #t)))
1000 (replace 'install
1001 (lambda* (#:key outputs #:allow-other-keys)
1002 (let* ((out (assoc-ref outputs "out"))
1003 (man (string-append out "/share/man")))
1004 (for-each (lambda (file)
1005 (install-file file (string-append out "/bin/")))
1006 (find-files "." "jetring-[[:alpha:]]+$"))
1007 (for-each (lambda (file)
1008 (install-file file (string-append man "/man1/")))
1009 (find-files "." ".*\\.1$"))
1010 (install-file "jetring.7" (string-append man "/man7/"))
1011 #t))))
1012 #:tests? #f)) ; no test phase
1013 (inputs
1014 `(("gnupg" ,gnupg)
1015 ("perl" ,perl)))
1016 (home-page "https://joeyh.name/code/jetring/")
1017 (synopsis "GnuPG keyring maintenance using changesets")
1018 (description
1019 "Jetring is a collection of tools that allow for gpg keyrings to be
1020 maintained using changesets. It was developed with the Debian keyring in mind,
1021 and aims to solve the problem that a gpg keyring is a binary blob that's hard
1022 for multiple people to collaboratively edit.
1023
1024 With jetring, changesets can be submitted, reviewed to see exactly what they
1025 will do, applied, and used to build a keyring. The origin of every change made
1026 to the keyring is available for auditing, and gpg signatures can be used for
1027 integrity guarantees.")
1028 (license license:gpl2+)))