diff options
Diffstat (limited to 'gnu/system/install.scm')
| -rw-r--r-- | gnu/system/install.scm | 119 |
1 files changed, 61 insertions, 58 deletions
diff --git a/gnu/system/install.scm b/gnu/system/install.scm index de14f6fb4c7..734a361c375 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> | 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
| 4 | ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr> | ||
| 4 | ;;; | 5 | ;;; |
| 5 | ;;; This file is part of GNU Guix. | 6 | ;;; This file is part of GNU Guix. |
| 6 | ;;; | 7 | ;;; |
| @@ -55,52 +56,53 @@ under /root/.guix-profile where GUIX is installed." | |||
| 55 | (manifest | 56 | (manifest |
| 56 | (list (package->manifest-entry guix)))))) | 57 | (list (package->manifest-entry guix)))))) |
| 57 | (define build | 58 | (define build |
| 58 | #~(begin | 59 | (with-imported-modules '((guix build utils) |
| 59 | (use-modules (guix build utils) | 60 | (guix build store-copy) |
| 60 | (gnu build install)) | 61 | (gnu build install)) |
| 61 | 62 | #~(begin | |
| 62 | (define %root "root") | 63 | (use-modules (guix build utils) |
| 63 | 64 | (gnu build install)) | |
| 64 | (setenv "PATH" | 65 | |
| 65 | (string-append #$guix "/sbin:" #$tar "/bin:" #$xz "/bin")) | 66 | (define %root "root") |
| 66 | 67 | ||
| 67 | ;; Note: there is not much to gain here with deduplication and there | 68 | (setenv "PATH" |
| 68 | ;; is the overhead of the '.links' directory, so turn it off. | 69 | (string-append #$guix "/sbin:" #$tar "/bin:" #$xz "/bin")) |
| 69 | (populate-single-profile-directory %root | 70 | |
| 70 | #:profile #$profile | 71 | ;; Note: there is not much to gain here with deduplication and |
| 71 | #:closure "profile" | 72 | ;; there is the overhead of the '.links' directory, so turn it |
| 72 | #:deduplicate? #f) | 73 | ;; off. |
| 73 | 74 | (populate-single-profile-directory %root | |
| 74 | ;; Create the tarball. Use GNU format so there's no file name | 75 | #:profile #$profile |
| 75 | ;; length limitation. | 76 | #:closure "profile" |
| 76 | (with-directory-excursion %root | 77 | #:deduplicate? #f) |
| 77 | (zero? (system* "tar" "--xz" "--format=gnu" | 78 | |
| 78 | 79 | ;; Create the tarball. Use GNU format so there's no file name | |
| 79 | ;; Avoid non-determinism in the archive. Use | 80 | ;; length limitation. |
| 80 | ;; mtime = 1, not zero, because that is what the | 81 | (with-directory-excursion %root |
| 81 | ;; daemon does for files in the store (see the | 82 | (zero? (system* "tar" "--xz" "--format=gnu" |
| 82 | ;; 'mtimeStore' constant in local-store.cc.) | 83 | |
| 83 | "--sort=name" | 84 | ;; Avoid non-determinism in the archive. Use |
| 84 | "--mtime=@1" ;for files in /var/guix | 85 | ;; mtime = 1, not zero, because that is what the |
| 85 | "--owner=root:0" | 86 | ;; daemon does for files in the store (see the |
| 86 | "--group=root:0" | 87 | ;; 'mtimeStore' constant in local-store.cc.) |
| 87 | 88 | "--sort=name" | |
| 88 | "--check-links" | 89 | "--mtime=@1" ;for files in /var/guix |
| 89 | "-cvf" #$output | 90 | "--owner=root:0" |
| 90 | ;; Avoid adding / and /var to the tarball, | 91 | "--group=root:0" |
| 91 | ;; so that the ownership and permissions of those | 92 | |
| 92 | ;; directories will not be overwritten when | 93 | "--check-links" |
| 93 | ;; extracting the archive. Do not include /root | 94 | "-cvf" #$output |
| 94 | ;; because the root account might have a different | 95 | ;; Avoid adding / and /var to the tarball, so |
| 95 | ;; home directory. | 96 | ;; that the ownership and permissions of those |
| 96 | "./var/guix" | 97 | ;; directories will not be overwritten when |
| 97 | (string-append "." (%store-directory))))))) | 98 | ;; extracting the archive. Do not include /root |
| 99 | ;; because the root account might have a | ||
| 100 | ;; different home directory. | ||
| 101 | "./var/guix" | ||
| 102 | (string-append "." (%store-directory)))))))) | ||
| 98 | 103 | ||
| 99 | (gexp->derivation "guix-tarball.tar.xz" build | 104 | (gexp->derivation "guix-tarball.tar.xz" build |
| 100 | #:references-graphs `(("profile" ,profile)) | 105 | #:references-graphs `(("profile" ,profile))))) |
| 101 | #:modules '((guix build utils) | ||
| 102 | (guix build store-copy) | ||
| 103 | (gnu build install))))) | ||
| 104 | 106 | ||
| 105 | 107 | ||
| 106 | (define (log-to-info) | 108 | (define (log-to-info) |
| @@ -212,20 +214,20 @@ the user's target storage device rather than on the RAM disk." | |||
| 212 | 214 | ||
| 213 | (define directory | 215 | (define directory |
| 214 | (computed-file "configuration-templates" | 216 | (computed-file "configuration-templates" |
| 215 | #~(begin | 217 | (with-imported-modules '((guix build utils)) |
| 216 | (mkdir #$output) | 218 | #~(begin |
| 217 | (for-each (lambda (file target) | 219 | (mkdir #$output) |
| 218 | (copy-file file | 220 | (for-each (lambda (file target) |
| 219 | (string-append #$output "/" | 221 | (copy-file file |
| 220 | target))) | 222 | (string-append #$output "/" |
| 221 | '(#$(file "bare-bones.tmpl") | 223 | target))) |
| 222 | #$(file "desktop.tmpl") | 224 | '(#$(file "bare-bones.tmpl") |
| 223 | #$(file "lightweight-desktop.tmpl")) | 225 | #$(file "desktop.tmpl") |
| 224 | '("bare-bones.scm" | 226 | #$(file "lightweight-desktop.tmpl")) |
| 225 | "desktop.scm" | 227 | '("bare-bones.scm" |
| 226 | "lightweight-desktop.scm")) | 228 | "desktop.scm" |
| 227 | #t) | 229 | "lightweight-desktop.scm")) |
| 228 | #:modules '((guix build utils)))) | 230 | #t)))) |
| 229 | 231 | ||
| 230 | `(("configuration" ,directory))) | 232 | `(("configuration" ,directory))) |
| 231 | 233 | ||
| @@ -391,6 +393,7 @@ Use Alt-F2 for documentation. | |||
| 391 | parted ddrescue | 393 | parted ddrescue |
| 392 | grub ;mostly so xrefs to its manual work | 394 | grub ;mostly so xrefs to its manual work |
| 393 | cryptsetup | 395 | cryptsetup |
| 396 | mdadm | ||
| 394 | btrfs-progs | 397 | btrfs-progs |
| 395 | wireless-tools iw wpa-supplicant-minimal iproute | 398 | wireless-tools iw wpa-supplicant-minimal iproute |
| 396 | ;; XXX: We used to have GNU fdisk here, but as of version | 399 | ;; XXX: We used to have GNU fdisk here, but as of version |
