gnu: gnu-pw-mgr: Update to 2.3.3.
[jackhill/guix/guix.git] / gnu / packages / debian.scm
CommitLineData
8e1cd1a2 1;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
07922c50 2;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
8e1cd1a2
EF
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)
b3230c28
EF
22 #:use-module (guix build-system trivial)
23 #:use-module (gnu packages base)
24 #:use-module (gnu packages compression)
298a2c1e
EF
25 #:use-module (gnu packages gnupg)
26 #:use-module (gnu packages perl)
27 #:use-module (gnu packages wget))
8e1cd1a2
EF
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
66contains the archive keys used for that.")
67 (license (list license:public-domain ; the keys
68 license:gpl2+)))) ; see debian/copyright
b3230c28
EF
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
108contains the archive keys used for that.")
109 (license (list license:public-domain ; the keys
110 license:gpl2+)))) ; see debian/copyright
298a2c1e
EF
111
112(define-public debootstrap
113 (package
114 (name "debootstrap")
fcf29a7f 115 (version "1.0.101")
298a2c1e
EF
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
fcf29a7f 123 "1p1a81s8hq73byd7256iljdls389x2q7w6srgrgfmx5bl1csnzp3"))))
298a2c1e
EF
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"))
129948dc 132 (coreutils (assoc-ref inputs "coreutils"))
298a2c1e
EF
133 (wget (assoc-ref inputs "wget"))
134 (debian (assoc-ref inputs "debian-keyring"))
135 (ubuntu (assoc-ref inputs "ubuntu-keyring")))
136 (substitute* "Makefile"
137 (("/usr") "")
138 (("-o root -g root") "")
139 (("chown root.*") "\n"))
140 (substitute* "scripts/sid"
141 (("/usr") debian))
142 (substitute* "scripts/gutsy"
143 (("/usr") ubuntu))
144 (substitute* "debootstrap"
129948dc 145 (("chroot ") (string-append coreutils "/bin/chroot "))
298a2c1e
EF
146 (("=/usr") (string-append "=" out)))
147 (substitute* "functions"
148 (("wget ") (string-append wget "/bin/wget ")))
149 #t)))
150 (add-after 'install 'install-man-file
151 (lambda* (#:key outputs #:allow-other-keys)
152 (let ((out (assoc-ref outputs "out")))
153 (install-file "debootstrap.8"
154 (string-append out "/share/man/man8"))
155 #t))))
156 #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
157 #:tests? #f)) ; no tests
158 (inputs
129948dc
KK
159 `(("coreutils" ,coreutils)
160 ("debian-keyring" ,debian-archive-keyring)
298a2c1e
EF
161 ("ubuntu-keyring" ,ubuntu-keyring)
162 ("wget" ,wget)))
163 ;; The following are required for debootstrap to work correctly
164 (propagated-inputs
165 `(("binutils" ,binutils)
166 ("gnupg" ,gnupg)
167 ("perl" ,perl)))
168 (home-page "https://anonscm.debian.org/cgit/d-i/debootstrap.git")
169 (synopsis "Bootstrap a basic Debian system")
170 (description "Debootstrap is used to create a Debian base system from
171scratch, without requiring the availability of @code{dpkg} or @code{apt}.
172It does this by downloading .deb files from a mirror site, and carefully
173unpacking them into a directory which can eventually be chrooted into.")
174 (license license:gpl2)))