summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2018-12-01 23:32:01 +0200
committerEfraim Flashner <efraim@flashner.co.il>2018-12-01 23:34:43 +0200
commit7111ea0d588aca0cdd8ddd204919effa2f2d8283 (patch)
tree82e226fd1a217a04c7219b914546d42886055387 /gnu
parent454e7132d6fffb5c9a5ce086ffd1b687416feb83 (diff)
gnu: debootstrap: Update build.
* gnu/packages/debian.scm (debootstrap)[arguments]: Update the substitutes during the custom 'patch-source phase. Add custom 'wrap-executable phase. [inputs]: Remove coreutils, wget. Add tzdata. [propagated-inputs]: Remove binutils, gnupg. Move perl ... [native-inputs]: ... to here. [description]: Add implementation hint.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/debian.scm44
1 files changed, 27 insertions, 17 deletions
diff --git a/gnu/packages/debian.scm b/gnu/packages/debian.scm
index 622c77b01e6..d750380fefd 100644
--- a/gnu/packages/debian.scm
+++ b/gnu/packages/debian.scm
@@ -27,8 +27,7 @@
27 #:use-module (gnu packages base) 27 #:use-module (gnu packages base)
28 #:use-module (gnu packages compression) 28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages gnupg) 29 #:use-module (gnu packages gnupg)
30 #:use-module (gnu packages perl) 30 #:use-module (gnu packages perl))
31 #:use-module (gnu packages wget))
32 31
33(define-public debian-archive-keyring 32(define-public debian-archive-keyring
34 (package 33 (package
@@ -137,46 +136,57 @@ contains the archive keys used for that.")
137 (add-after 'unpack 'patch-source 136 (add-after 'unpack 'patch-source
138 (lambda* (#:key inputs outputs #:allow-other-keys) 137 (lambda* (#:key inputs outputs #:allow-other-keys)
139 (let ((out (assoc-ref outputs "out")) 138 (let ((out (assoc-ref outputs "out"))
140 (coreutils (assoc-ref inputs "coreutils")) 139 (tzdata (assoc-ref inputs "tzdata"))
141 (wget (assoc-ref inputs "wget"))
142 (debian (assoc-ref inputs "debian-keyring")) 140 (debian (assoc-ref inputs "debian-keyring"))
143 (ubuntu (assoc-ref inputs "ubuntu-keyring"))) 141 (ubuntu (assoc-ref inputs "ubuntu-keyring")))
144 (substitute* "Makefile" 142 (substitute* "Makefile"
145 (("/usr") "") 143 (("/usr") "")
146 (("-o root -g root") "") 144 (("-o root -g root") "")
147 (("chown root.*") "\n")) 145 (("chown root.*") "\n"))
148 (substitute* "scripts/sid" 146 (substitute* '("scripts/etch"
147 "scripts/potato"
148 "scripts/sarge"
149 "scripts/sid"
150 "scripts/woody"
151 "scripts/woody.buildd")
149 (("/usr") debian)) 152 (("/usr") debian))
150 (substitute* "scripts/gutsy" 153 (substitute* "scripts/gutsy"
151 (("/usr") ubuntu)) 154 (("/usr") ubuntu))
152 (substitute* "debootstrap" 155 (substitute* "debootstrap"
153 (("chroot ") (string-append coreutils "/bin/chroot "))
154 (("=/usr") (string-append "=" out))) 156 (("=/usr") (string-append "=" out)))
155 (substitute* "functions" 157 (substitute* (find-files "scripts" ".")
156 (("wget ") (string-append wget "/bin/wget "))) 158 (("/usr/share/zoneinfo") (string-append tzdata "/share/zoneinfo")))
157 #t))) 159 #t)))
158 (add-after 'install 'install-man-file 160 (add-after 'install 'install-man-file
159 (lambda* (#:key outputs #:allow-other-keys) 161 (lambda* (#:key outputs #:allow-other-keys)
160 (let ((out (assoc-ref outputs "out"))) 162 (let ((out (assoc-ref outputs "out")))
161 (install-file "debootstrap.8" 163 (install-file "debootstrap.8"
162 (string-append out "/share/man/man8")) 164 (string-append out "/share/man/man8"))
165 #t)))
166 (add-after 'install 'wrap-executable
167 (lambda* (#:key outputs #:allow-other-keys)
168 (let ((debootstrap (string-append (assoc-ref outputs "out")
169 "/sbin/debootstrap"))
170 (path (getenv "PATH")))
171 (wrap-program debootstrap
172 `("PATH" ":" prefix (,path)))
163 #t)))) 173 #t))))
164 #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))) 174 #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
165 #:tests? #f)) ; no tests 175 #:tests? #f)) ; no tests
166 (inputs 176 (inputs
167 `(("coreutils" ,coreutils) 177 `(("debian-keyring" ,debian-archive-keyring)
168 ("debian-keyring" ,debian-archive-keyring)
169 ("ubuntu-keyring" ,ubuntu-keyring) 178 ("ubuntu-keyring" ,ubuntu-keyring)
170 ("wget" ,wget))) 179 ("tzdata" ,tzdata)))
171 ;; The following are required for debootstrap to work correctly 180 (native-inputs
172 (propagated-inputs 181 `(("perl" ,perl)))
173 `(("binutils" ,binutils)
174 ("gnupg" ,gnupg)
175 ("perl" ,perl)))
176 (home-page "https://tracker.debian.org/pkg/debootstrap") 182 (home-page "https://tracker.debian.org/pkg/debootstrap")
177 (synopsis "Bootstrap a basic Debian system") 183 (synopsis "Bootstrap a basic Debian system")
178 (description "Debootstrap is used to create a Debian base system from 184 (description "Debootstrap is used to create a Debian base system from
179scratch, without requiring the availability of @code{dpkg} or @code{apt}. 185scratch, without requiring the availability of @code{dpkg} or @code{apt}.
180It does this by downloading .deb files from a mirror site, and carefully 186It does this by downloading .deb files from a mirror site, and carefully
181unpacking them into a directory which can eventually be chrooted into.") 187unpacking them into a directory which can eventually be chrooted into.
188
189It is recommended to run @code{debootstrap --foreign --arch=...} and then
190@code{chroot} into the directory, set the PATH and run @code{debootstrap
191--second-stage} after.")
182 (license license:gpl2))) 192 (license license:gpl2)))