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