guix-commits
[Top][All Lists]
Advanced

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

04/04: gnu: Add debootstrap.


From: Efraim Flashner
Subject: 04/04: gnu: Add debootstrap.
Date: Mon, 12 Mar 2018 15:58:35 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit 298a2c1e669f1782f3e3d92c96bb55e9000163ce
Author: Efraim Flashner <address@hidden>
Date:   Mon Mar 5 11:17:45 2018 +0200

    gnu: Add debootstrap.
    
    * gnu/packages/debian.scm (debootstrap): New variable.
---
 gnu/packages/debian.scm | 65 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 64 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/debian.scm b/gnu/packages/debian.scm
index 15d4429..3c3189e 100644
--- a/gnu/packages/debian.scm
+++ b/gnu/packages/debian.scm
@@ -21,7 +21,9 @@
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages gnupg))
+  #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages wget))
 
 (define-public debian-archive-keyring
   (package
@@ -105,3 +107,64 @@ contains the archive keys used for that.")
 contains the archive keys used for that.")
     (license (list license:public-domain ; the keys
                    license:gpl2+)))) ; see debian/copyright
+
+(define-public debootstrap
+  (package
+    (name "debootstrap")
+    (version "1.0.93")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "mirror://debian/pool/main/d/" name "/"
+                            name "_" version ".tar.gz"))
+        (sha256
+         (base32
+          "1nyp9fwb7xrk1vin81dmgx2g9rb52yg4gwz4rcx97gamw4mlvbfd"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'unpack 'patch-source
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out    (assoc-ref outputs "out"))
+                   (wget   (assoc-ref inputs "wget"))
+                   (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"
+                 (("/usr") debian))
+               (substitute* "scripts/gutsy"
+                 (("/usr") ubuntu))
+               (substitute* "debootstrap"
+                 (("=/usr") (string-append "=" out)))
+               (substitute* "functions"
+                 (("wget ") (string-append wget "/bin/wget ")))
+               #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))))
+       #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs 
"out")))
+       #:tests? #f)) ; no tests
+    (inputs
+     `(("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)))
+    (home-page "https://anonscm.debian.org/cgit/d-i/debootstrap.git";)
+    (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.")
+    (license license:gpl2)))



reply via email to

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