gnu: debootstrap: Substitute chroot in 'patch-source' phase.

* gnu/packages/debian.scm (debootstrap)[arguments]: In 'patch-source' phase,
substitute chroot in the debootstrap script file.
[inputs]: Add coreutils.
This commit is contained in:
Kei Kebreau 2018-06-05 16:13:23 -04:00
parent ad3a580716
commit 129948dcbd
No known key found for this signature in database
GPG Key ID: E6A5EE3C19467A0D
1 changed files with 4 additions and 1 deletions

View File

@ -129,6 +129,7 @@ contains the archive keys used for that.")
(add-after 'unpack 'patch-source (add-after 'unpack 'patch-source
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")) (let ((out (assoc-ref outputs "out"))
(coreutils (assoc-ref inputs "coreutils"))
(wget (assoc-ref inputs "wget")) (wget (assoc-ref inputs "wget"))
(debian (assoc-ref inputs "debian-keyring")) (debian (assoc-ref inputs "debian-keyring"))
(ubuntu (assoc-ref inputs "ubuntu-keyring"))) (ubuntu (assoc-ref inputs "ubuntu-keyring")))
@ -141,6 +142,7 @@ contains the archive keys used for that.")
(substitute* "scripts/gutsy" (substitute* "scripts/gutsy"
(("/usr") ubuntu)) (("/usr") ubuntu))
(substitute* "debootstrap" (substitute* "debootstrap"
(("chroot ") (string-append coreutils "/bin/chroot "))
(("=/usr") (string-append "=" out))) (("=/usr") (string-append "=" out)))
(substitute* "functions" (substitute* "functions"
(("wget ") (string-append wget "/bin/wget "))) (("wget ") (string-append wget "/bin/wget ")))
@ -154,7 +156,8 @@ contains the archive keys used for that.")
#:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))) #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
#:tests? #f)) ; no tests #:tests? #f)) ; no tests
(inputs (inputs
`(("debian-keyring" ,debian-archive-keyring) `(("coreutils" ,coreutils)
("debian-keyring" ,debian-archive-keyring)
("ubuntu-keyring" ,ubuntu-keyring) ("ubuntu-keyring" ,ubuntu-keyring)
("wget" ,wget))) ("wget" ,wget)))
;; The following are required for debootstrap to work correctly ;; The following are required for debootstrap to work correctly