You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

358 lines
13 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
  4. ;;;
  5. ;;; This file is part of GNU Guix.
  6. ;;;
  7. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  8. ;;; under the terms of the GNU General Public License as published by
  9. ;;; the Free Software Foundation; either version 3 of the License, or (at
  10. ;;; your option) any later version.
  11. ;;;
  12. ;;; GNU Guix is distributed in the hope that it will be useful, but
  13. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ;;; GNU General Public License for more details.
  16. ;;;
  17. ;;; You should have received a copy of the GNU General Public License
  18. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  19. (define-module (gnu packages gnupg)
  20. #:use-module (guix licenses)
  21. #:use-module (gnu packages curl)
  22. #:use-module (gnu packages openldap)
  23. #:use-module (gnu packages perl)
  24. #:use-module (gnu packages pth)
  25. #:use-module (gnu packages python)
  26. #:use-module (gnu packages readline)
  27. #:use-module ((gnu packages compression)
  28. #:renamer (symbol-prefix-proc 'guix:))
  29. #:use-module (guix packages)
  30. #:use-module (guix download)
  31. #:use-module (guix build-system gnu))
  32. (define-public libgpg-error
  33. (package
  34. (name "libgpg-error")
  35. (version "1.12")
  36. (source
  37. (origin
  38. (method url-fetch)
  39. (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
  40. version ".tar.bz2"))
  41. (sha256
  42. (base32
  43. "0pz58vr12qihq2f0bypjxsb6cf6ajq5258fmfm8s6lvwm3b9xz6a"))))
  44. (build-system gnu-build-system)
  45. (home-page "http://gnupg.org")
  46. (synopsis
  47. "Libgpg-error, a small library that defines common error values for all GnuPG components")
  48. (description
  49. "Libgpg-error is a small library that defines common error values
  50. for all GnuPG components. Among these are GPG, GPGSM, GPGME,
  51. GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
  52. Daemon and possibly more in the future.")
  53. (license lgpl2.0+)))
  54. (define-public libgcrypt
  55. (package
  56. (name "libgcrypt")
  57. (version "1.5.3")
  58. (source (origin
  59. (method url-fetch)
  60. (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
  61. version ".tar.bz2"))
  62. (sha256
  63. (base32
  64. "1lar8y3lh61zl5flljpz540d78g99h4d5idfwrfw8lm3gm737xdw"))))
  65. (build-system gnu-build-system)
  66. (propagated-inputs
  67. `(("libgpg-error" ,libgpg-error)))
  68. (home-page "http://gnupg.org/")
  69. (synopsis "Cryptographic function library")
  70. (description
  71. "Libgcrypt is a general-purpose cryptographic library. It provides the
  72. standard cryptographic building blocks such as symmetric ciphers, hash
  73. algorithms, public key algorithms, large integer functions and random number
  74. generation.")
  75. (license lgpl2.0+)))
  76. (define-public libassuan
  77. (package
  78. (name "libassuan")
  79. (version "2.1.1")
  80. (source
  81. (origin
  82. (method url-fetch)
  83. (uri (string-append "mirror://gnupg/libassuan/libassuan-"
  84. version ".tar.bz2"))
  85. (sha256
  86. (base32
  87. "1783nb0b6nr9yjhb5wfh8ykc5w89f4anppz1kz9913mqg5vxdqi3"))))
  88. (build-system gnu-build-system)
  89. (propagated-inputs
  90. `(("libgpg-error" ,libgpg-error) ("pth" ,pth)))
  91. (home-page "http://gnupg.org")
  92. (synopsis
  93. "Libassuan, the IPC library used by GnuPG and related software")
  94. (description
  95. "Libassuan is a small library implementing the so-called Assuan
  96. protocol. This protocol is used for IPC between most newer
  97. GnuPG components. Both, server and client side functions are
  98. provided.")
  99. (license lgpl2.0+)))
  100. (define-public libksba
  101. (package
  102. (name "libksba")
  103. (version "1.3.0")
  104. (source
  105. (origin
  106. (method url-fetch)
  107. (uri (string-append
  108. "mirror://gnupg/libksba/libksba-"
  109. version ".tar.bz2"))
  110. (sha256
  111. (base32
  112. "0w8rfb6yhcwkwzvjafrashcygy4hd9xwwmvlnkfd1m2h0paywqas"))))
  113. (build-system gnu-build-system)
  114. (propagated-inputs
  115. `(("libgpg-error" ,libgpg-error)))
  116. (home-page "http://www.gnupg.org")
  117. (synopsis
  118. "Libksba is a CMS and X.509 access library under development")
  119. (description
  120. "KSBA (pronounced Kasbah) is a library to make X.509 certificates
  121. as well as the CMS easily accessible by other applications. Both
  122. specifications are building blocks of S/MIME and TLS.")
  123. (license gpl3+)))
  124. (define-public gnupg
  125. (package
  126. (name "gnupg")
  127. (version "2.0.22")
  128. (source
  129. (origin
  130. (method url-fetch)
  131. (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
  132. ".tar.bz2"))
  133. (sha256
  134. (base32
  135. "0lg210acj2rxq291q4cwamg9gx6gh2prb1xa93y5jhw5b6r0lza3"))))
  136. (build-system gnu-build-system)
  137. (inputs
  138. `(("bzip2" ,guix:bzip2)
  139. ("curl" ,curl)
  140. ("libassuan" ,libassuan)
  141. ("libgcrypt" ,libgcrypt)
  142. ("libgpg-error" ,libgpg-error)
  143. ("libksba" ,libksba)
  144. ("pth" ,pth)
  145. ("openldap" ,openldap)
  146. ("zlib" ,guix:zlib)
  147. ("readline" ,readline)))
  148. (arguments
  149. `(#:phases
  150. (alist-replace
  151. 'configure
  152. (lambda* (#:key #:allow-other-keys #:rest args)
  153. (let ((configure (assoc-ref %standard-phases 'configure)))
  154. (substitute* "tests/openpgp/Makefile.in"
  155. (("/bin/sh") (which "bash")))
  156. (apply configure args)))
  157. %standard-phases)))
  158. (home-page "http://gnupg.org/")
  159. (synopsis "GNU Privacy Guard")
  160. (description
  161. "The GNU Privacy Guard is a complete implementation of the OpenPGP
  162. standard. It is used to encrypt and sign data and communication. It
  163. features powerful key management and the ability to access public key
  164. servers.")
  165. (license gpl3+)))
  166. (define-public gpgme
  167. (package
  168. (name "gpgme")
  169. (version "1.4.3")
  170. (source
  171. (origin
  172. (method url-fetch)
  173. (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
  174. ".tar.bz2"))
  175. (sha256
  176. (base32
  177. "15h429h6pd67iiv580bjmwbkadpxsdppw0xrqpcm4dvm24jc271d"))))
  178. (build-system gnu-build-system)
  179. (inputs
  180. `(("gnupg" ,gnupg)
  181. ("libassuan" ,libassuan)
  182. ("libgpg-error" ,libgpg-error)))
  183. (home-page "http://www.gnupg.org/related_software/gpgme/")
  184. (synopsis "library providing simplified access to GnuPG functionality")
  185. (description
  186. "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
  187. easier for applications. It provides a High-Level Crypto API for encryption,
  188. decryption, signing, signature verification and key management. Currently
  189. it uses GnuPG as its backend but the API isn't restricted to this engine.
  190. Because the direct use of GnuPG from an application can be a complicated
  191. programming task, it is suggested that all software should try to use GPGME
  192. instead. This way bug fixes or improvements can be done at a central place
  193. and every application benefits from this.")
  194. (license lgpl2.1+)))
  195. (define-public pius
  196. (package
  197. (name "pius")
  198. (version "2.0.9")
  199. (source (origin
  200. (method url-fetch)
  201. (uri (string-append "mirror://sourceforge/pgpius/pius/"
  202. version "/pius-"
  203. version ".tar.bz2"))
  204. (sha256 (base32
  205. "1g1jly3wl4ks6h8ydkygyl2c4i7v3z91rg42005m6vm70y1d8b3d"))))
  206. (build-system gnu-build-system)
  207. (inputs `(("perl" ,perl)
  208. ("python" ,python-wrapper)
  209. ("gpg" ,gnupg)))
  210. (arguments
  211. `(#:tests? #f
  212. #:phases
  213. (alist-replace
  214. 'configure
  215. (lambda* (#:key #:allow-other-keys) #t)
  216. (alist-replace
  217. 'build
  218. (lambda* (#:key #:allow-other-keys) #t)
  219. (alist-replace
  220. 'install
  221. (lambda* (#:key inputs outputs #:allow-other-keys)
  222. (let* ((out (assoc-ref outputs "out"))
  223. (gpg (string-append (assoc-ref inputs "gpg")
  224. "/bin/gpg2")))
  225. (mkdir out)
  226. (mkdir (string-append out "/bin"))
  227. (for-each (lambda (file)
  228. (substitute* file
  229. (("/usr/bin/gpg") gpg))
  230. (copy-file file (string-append out "/bin/" file)))
  231. '("pius" "pius-keyring-mgr" "pius-party-worksheet"))))
  232. %standard-phases)))))
  233. (synopsis "Programs to simplify GnuPG key signing")
  234. (description
  235. "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
  236. parties. It is the main utility and makes it possible to quickly and easily
  237. sign each UID on a set of PGP keys. It is designed to take the pain out of
  238. the sign-all-the-keys part of PGP Keysigning Party while adding security
  239. to the process.
  240. pius-keyring-mgr and pius-party-worksheet help organisers of
  241. PGP keysigning parties.")
  242. (license gpl2)
  243. (home-page "http://www.phildev.net/pius/index.shtml")))
  244. (define-public signing-party
  245. (package
  246. (name "signing-party")
  247. (version "1.1.4")
  248. (source (origin
  249. (method url-fetch)
  250. (uri (string-append "http://ftp.debian.org/debian/pool/main/s/signing-party/signing-party_"
  251. version ".orig.tar.gz"))
  252. (sha256 (base32
  253. "188gp0prbh8qs29lq3pbf0qibfd6jq4fk7i0pfrybl8aahvm84rx"))))
  254. (build-system gnu-build-system)
  255. (inputs `(("perl" ,perl)))
  256. (arguments
  257. `(#:tests? #f
  258. #:phases
  259. (alist-replace
  260. 'unpack
  261. (lambda* (#:key #:allow-other-keys #:rest args)
  262. (let ((unpack (assoc-ref %standard-phases 'unpack)))
  263. (apply unpack args)
  264. ;; remove spurious symlink
  265. (delete-file "keyanalyze/pgpring/depcomp")))
  266. (alist-replace
  267. 'configure
  268. (lambda* (#:key outputs #:allow-other-keys)
  269. (let ((out (assoc-ref outputs "out")))
  270. (substitute* "keyanalyze/Makefile"
  271. (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
  272. (substitute* "keyanalyze/Makefile"
  273. (("./configure") (string-append "./configure --prefix=" out)))
  274. (substitute* "keyanalyze/pgpring/configure"
  275. (("/bin/sh") (which "bash")))
  276. (substitute* "gpgwrap/Makefile"
  277. (("\\} clean") (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
  278. out "/bin/gpgwrap\n")))
  279. (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
  280. "keylookup/Makefile" "sig2dot/Makefile"
  281. "springgraph/Makefile")
  282. (("/usr") out))))
  283. (alist-replace
  284. 'install
  285. (lambda* (#:key outputs #:allow-other-keys #:rest args)
  286. (let ((out (assoc-ref outputs "out"))
  287. (install (assoc-ref %standard-phases 'install)))
  288. (apply install args)
  289. (for-each
  290. (lambda (dir file)
  291. (copy-file (string-append dir "/" file)
  292. (string-append out "/bin/" file)))
  293. '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
  294. "gpglist" "gpg-mailkeys" "gpgparticipants")
  295. '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
  296. "gpglist" "gpg-mailkeys" "gpgparticipants"))
  297. (for-each
  298. (lambda (dir file)
  299. (copy-file (string-append dir "/" file)
  300. (string-append out "/share/man/man1/" file)))
  301. '("caff" "caff" "caff" "gpgdir"
  302. "gpg-key2ps" "gpglist" "gpg-mailkeys"
  303. "gpgparticipants" "gpgsigs" "gpgwrap/doc"
  304. "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
  305. '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
  306. "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
  307. "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
  308. "process_keys.1" "pgpring.1" "keyanalyze.1"))))
  309. %standard-phases)))))
  310. (synopsis "collection of scripts for simplifying gnupg key signing")
  311. (description
  312. "signing-party is a collection for all kinds of PGP/GnuPG related things,
  313. including tools for signing keys, keyring analysis, and party preparation.
  314. * caff: CA - Fire and Forget signs and mails a key
  315. * pgp-clean: removes all non-self signatures from key
  316. * pgp-fixkey: removes broken packets from keys
  317. * gpg-mailkeys: simply mail out a signed key to its owner
  318. * gpg-key2ps: generate PostScript file with fingerprint paper strips
  319. * gpgdir: recursive directory encryption tool
  320. * gpglist: show who signed which of your UIDs
  321. * gpgsigs: annotates list of GnuPG keys with already done signatures
  322. * gpgparticipants: create list of party participants for the organiser
  323. * gpgwrap: a passphrase wrapper
  324. * keyanalyze: minimum signing distance (MSD) analysis on keyrings
  325. * keylookup: ncurses wrapper around gpg --search
  326. * sig2dot: converts a list of GnuPG signatures to a .dot file
  327. * springgraph: creates a graph from a .dot file")
  328. ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
  329. ;; and caff and gpgsigs: bsd-3, see
  330. ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
  331. (license gpl2)
  332. (home-page "http://pgp-tools.alioth.debian.org/")))