gnu: ruby-connection-pool: Update to 2.2.2.
[jackhill/guix/guix.git] / gnu / packages / debian.scm
1 ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
2 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
3 ;;;
4 ;;; GNU Guix is free software; you can redistribute it and/or modify it
5 ;;; under the terms of the GNU General Public License as published by
6 ;;; the Free Software Foundation; either version 3 of the License, or (at
7 ;;; your option) any later version.
8 ;;;
9 ;;; GNU Guix is distributed in the hope that it will be useful, but
10 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
11 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ;;; GNU General Public License for more details.
13 ;;;
14 ;;; You should have received a copy of the GNU General Public License
15 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
16
17 (define-module (gnu packages debian)
18 #:use-module ((guix licenses) #:prefix license:)
19 #:use-module (guix download)
20 #:use-module (guix packages)
21 #:use-module (guix build-system gnu)
22 #:use-module (guix build-system trivial)
23 #:use-module (gnu packages base)
24 #:use-module (gnu packages compression)
25 #:use-module (gnu packages gnupg)
26 #:use-module (gnu packages perl)
27 #:use-module (gnu packages wget))
28
29 (define-public debian-archive-keyring
30 (package
31 (name "debian-archive-keyring")
32 (version "2017.7")
33 (source
34 (origin
35 (method url-fetch)
36 (uri (string-append "mirror://debian/pool/main/d/" name "/"
37 name "_" version ".tar.xz"))
38 (sha256
39 (base32
40 "1pdwgipfi0y4svhxlw8arhq792f1g3vlmw4raphizy7sa65vd4ca"))))
41 (build-system gnu-build-system)
42 (arguments
43 '(#:test-target "verify-results"
44 #:parallel-build? #f ; has race conditions
45 #:phases
46 (modify-phases %standard-phases
47 (delete 'configure) ; no configure script
48 (replace 'install
49 (lambda* (#:key outputs #:allow-other-keys)
50 (let* ((out (assoc-ref outputs "out"))
51 (apt (string-append out "/etc/apt/trusted.gpg.d/"))
52 (key (string-append out "/share/keyrings/")))
53 (install-file "keyrings/debian-archive-keyring.gpg" key)
54 (install-file "keyrings/debian-archive-removed-keys.gpg" key)
55 (for-each (lambda (file)
56 (install-file file apt))
57 (find-files "trusted.gpg" "\\.gpg$")))
58 #t)))))
59 (native-inputs
60 `(("gnupg" ,gnupg)
61 ("jetring" ,jetring)))
62 (home-page "https://packages.qa.debian.org/d/debian-archive-keyring.html")
63 (synopsis "GnuPG archive keys of the Debian archive")
64 (description
65 "The Debian project digitally signs its Release files. This package
66 contains the archive keys used for that.")
67 (license (list license:public-domain ; the keys
68 license:gpl2+)))) ; see debian/copyright
69
70 (define-public ubuntu-keyring
71 (package
72 (name "ubuntu-keyring")
73 (version "2018.02.28")
74 (source
75 (origin
76 (method url-fetch)
77 (uri (string-append "https://launchpad.net/ubuntu/+archive/primary/"
78 "+files/" name "_" version ".tar.gz"))
79 (sha256
80 (base32
81 "1zj3012cz7rlx9pm39wnwa0lmi1h38n6bkgbz81vnmcsvqsc9a3a"))))
82 (build-system trivial-build-system)
83 (arguments
84 `(#:modules ((guix build utils))
85 #:builder (begin
86 (use-modules (guix build utils))
87 (let* ((out (assoc-ref %outputs "out"))
88 (apt (string-append out "/etc/apt/trusted.gpg.d/"))
89 (key (string-append out "/share/keyrings/")))
90 (setenv "PATH" (string-append
91 (assoc-ref %build-inputs "gzip") "/bin:"
92 (assoc-ref %build-inputs "tar") "/bin"))
93 (invoke "tar" "xvf" (assoc-ref %build-inputs "source"))
94 (for-each (lambda (file)
95 (install-file file apt))
96 (find-files "." "ubuntu-[^am].*\\.gpg$"))
97 (for-each (lambda (file)
98 (install-file file key))
99 (find-files "." "ubuntu-[am].*\\.gpg$")))
100 #t)))
101 (native-inputs
102 `(("tar" ,tar)
103 ("gzip" ,gzip)))
104 (home-page "https://launchpad.net/ubuntu/+source/ubuntu-keyring")
105 (synopsis "GnuPG keys of the Ubuntu archive")
106 (description
107 "The Ubuntu project digitally signs its Release files. This package
108 contains the archive keys used for that.")
109 (license (list license:public-domain ; the keys
110 license:gpl2+)))) ; see debian/copyright
111
112 (define-public debootstrap
113 (package
114 (name "debootstrap")
115 (version "1.0.95")
116 (source
117 (origin
118 (method url-fetch)
119 (uri (string-append "mirror://debian/pool/main/d/" name "/"
120 name "_" version ".tar.gz"))
121 (sha256
122 (base32
123 "1xpd1yblcgwhri64hzgxhalpf5j8gqbmkrsm1fs0pbwiy0wdz0ry"))))
124 (build-system gnu-build-system)
125 (arguments
126 `(#:phases
127 (modify-phases %standard-phases
128 (delete 'configure)
129 (add-after 'unpack 'patch-source
130 (lambda* (#:key inputs outputs #:allow-other-keys)
131 (let ((out (assoc-ref outputs "out"))
132 (wget (assoc-ref inputs "wget"))
133 (debian (assoc-ref inputs "debian-keyring"))
134 (ubuntu (assoc-ref inputs "ubuntu-keyring")))
135 (substitute* "Makefile"
136 (("/usr") "")
137 (("-o root -g root") "")
138 (("chown root.*") "\n"))
139 (substitute* "scripts/sid"
140 (("/usr") debian))
141 (substitute* "scripts/gutsy"
142 (("/usr") ubuntu))
143 (substitute* "debootstrap"
144 (("=/usr") (string-append "=" out)))
145 (substitute* "functions"
146 (("wget ") (string-append wget "/bin/wget ")))
147 #t)))
148 (add-after 'install 'install-man-file
149 (lambda* (#:key outputs #:allow-other-keys)
150 (let ((out (assoc-ref outputs "out")))
151 (install-file "debootstrap.8"
152 (string-append out "/share/man/man8"))
153 #t))))
154 #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
155 #:tests? #f)) ; no tests
156 (inputs
157 `(("debian-keyring" ,debian-archive-keyring)
158 ("ubuntu-keyring" ,ubuntu-keyring)
159 ("wget" ,wget)))
160 ;; The following are required for debootstrap to work correctly
161 (propagated-inputs
162 `(("binutils" ,binutils)
163 ("gnupg" ,gnupg)
164 ("perl" ,perl)))
165 (home-page "https://anonscm.debian.org/cgit/d-i/debootstrap.git")
166 (synopsis "Bootstrap a basic Debian system")
167 (description "Debootstrap is used to create a Debian base system from
168 scratch, without requiring the availability of @code{dpkg} or @code{apt}.
169 It does this by downloading .deb files from a mirror site, and carefully
170 unpacking them into a directory which can eventually be chrooted into.")
171 (license license:gpl2)))