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