guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: debootstrap: Update build.


From: guix-commits
Subject: 01/02: gnu: debootstrap: Update build.
Date: Sat, 1 Dec 2018 16:35:11 -0500 (EST)

efraim pushed a commit to branch master
in repository guix.

commit 7111ea0d588aca0cdd8ddd204919effa2f2d8283
Author: Efraim Flashner <address@hidden>
Date:   Sat Dec 1 23:32:01 2018 +0200

    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.
---
 gnu/packages/debian.scm | 44 +++++++++++++++++++++++++++-----------------
 1 file changed, 27 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/debian.scm b/gnu/packages/debian.scm
index 622c77b..d750380 100644
--- a/gnu/packages/debian.scm
+++ b/gnu/packages/debian.scm
@@ -27,8 +27,7 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages wget))
+  #:use-module (gnu packages perl))
 
 (define-public debian-archive-keyring
   (package
@@ -137,46 +136,57 @@ contains the archive keys used for that.")
          (add-after 'unpack 'patch-source
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out    (assoc-ref outputs "out"))
-                   (coreutils (assoc-ref inputs "coreutils"))
-                   (wget   (assoc-ref inputs "wget"))
+                   (tzdata (assoc-ref inputs "tzdata"))
                    (debian (assoc-ref inputs "debian-keyring"))
                    (ubuntu (assoc-ref inputs "ubuntu-keyring")))
                (substitute* "Makefile"
                  (("/usr") "")
                  (("-o root -g root") "")
                  (("chown root.*") "\n"))
-               (substitute* "scripts/sid"
+               (substitute* '("scripts/etch"
+                              "scripts/potato"
+                              "scripts/sarge"
+                              "scripts/sid"
+                              "scripts/woody"
+                              "scripts/woody.buildd")
                  (("/usr") debian))
                (substitute* "scripts/gutsy"
                  (("/usr") ubuntu))
                (substitute* "debootstrap"
-                 (("chroot ") (string-append coreutils "/bin/chroot "))
                  (("=/usr") (string-append "=" out)))
-               (substitute* "functions"
-                 (("wget ") (string-append wget "/bin/wget ")))
+               (substitute* (find-files "scripts" ".")
+                 (("/usr/share/zoneinfo") (string-append tzdata 
"/share/zoneinfo")))
                #t)))
          (add-after 'install 'install-man-file
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
                (install-file "debootstrap.8"
                              (string-append out "/share/man/man8"))
+               #t)))
+         (add-after 'install 'wrap-executable
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((debootstrap (string-append (assoc-ref outputs "out")
+                                               "/sbin/debootstrap"))
+                   (path        (getenv "PATH")))
+               (wrap-program debootstrap
+                             `("PATH" ":" prefix (,path)))
                #t))))
        #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs 
"out")))
        #:tests? #f)) ; no tests
     (inputs
-     `(("coreutils" ,coreutils)
-       ("debian-keyring" ,debian-archive-keyring)
+     `(("debian-keyring" ,debian-archive-keyring)
        ("ubuntu-keyring" ,ubuntu-keyring)
-       ("wget" ,wget)))
-    ;; The following are required for debootstrap to work correctly
-    (propagated-inputs
-     `(("binutils" ,binutils)
-       ("gnupg" ,gnupg)
-       ("perl" ,perl)))
+       ("tzdata" ,tzdata)))
+    (native-inputs
+     `(("perl" ,perl)))
     (home-page "https://tracker.debian.org/pkg/debootstrap";)
     (synopsis "Bootstrap a basic Debian system")
     (description "Debootstrap is used to create a Debian base system from
 scratch, without requiring the availability of @code{dpkg} or @code{apt}.
 It does this by downloading .deb files from a mirror site, and carefully
-unpacking them into a directory which can eventually be chrooted into.")
+unpacking them into a directory which can eventually be chrooted into.
+
+It is recommended to run @code{debootstrap --foreign --arch=...} and then
address@hidden into the directory, set the PATH and run @code{debootstrap
+--second-stage} after.")
     (license license:gpl2)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]