[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
104/197: installer: Support btrfs
From: |
Danny Milosavljevic |
Subject: |
104/197: installer: Support btrfs |
Date: |
Mon, 3 Jul 2017 20:37:08 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit 70a960f8f3d950ecfd4a69f5915c10e023d67a8c
Author: John Darrington <address@hidden>
Date: Sun Jan 15 19:34:27 2017 +0100
installer: Support btrfs
* gnu/system/install.scm (guix-installer): Add path to btrfs tools.
* gnu/system/installer/filesystems.scm (file-system-task-incomplete-reason):
Add "btrfs" to the list of acceptable filesystems.
* gnu/system/installer/format.scm (format-page-key-handler): Change args to
suit
mkfs.btrfs.
---
gnu/system/install.scm | 36 ++++++++++++++++++++++++++++++++++++
gnu/system/installer/filesystems.scm | 11 ++++++-----
gnu/system/installer/format.scm | 12 +++++++-----
3 files changed, 49 insertions(+), 10 deletions(-)
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 2c408c1..2fbf6e3 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -62,6 +62,42 @@ manual."
"-f" (string-append #$guix "/share/info/guix.info")
"-n" "System Installation"))))
+(define (guix-installer)
+ "Return a script that spawns the guix installer."
+ (program-file "guix-installer"
+ #~(begin
+ (setenv "TZDIR"
+ (string-append #$tzdata "/share/zoneinfo"))
+ (setenv "PATH"
+ (string-join
+ (list
+ (string-append #$bash "/bin")
+ (string-append #$coreutils "/bin") ; for ls (!)
+ (string-append #$btrfs-progs "/bin")
+ (string-append #$e2fsprogs "/sbin")
+ (string-append #$(current-guix) "/bin") ; for
guix system init
+ (string-append #$inetutils "/bin") ; for ping
+ (string-append #$iproute "/sbin")
+ (string-append #$isc-dhcp "/sbin")
+ (string-append #$iw "/sbin")
+ (string-append #$kbd "/bin")
+ (string-append #$parted "/sbin")
+ (string-append #$pciutils "/sbin")
+ (string-append #$shepherd "/bin") ; for herd
+ (string-append #$shepherd "/sbin") ; for reboot
+ (string-append #$util-linux "/bin") ; for mount
+ (string-append #$util-linux "/sbin")
+ (string-append #$wireless-tools "/sbin") ; for
iwlist
+ (string-append #$wpa-supplicant-minimal
"/sbin")
+ (string-append #$which "/bin"))
+ ":"))
+ (setenv "GUILE_LOAD_PATH"
+ (string-append #$guile-ncurses
"/share/guile/site/2.0"))
+ ;; "(current-guix)" should probably be changed to "guix"
+ ;; at some point.
+ (execl (string-append #$(current-guix) "/bin/guix")
+ "guix" "system" "installer"))))
+
(define %backing-directory
;; Sub-directory used as the backing store for copy-on-write.
"/tmp/guix-inst")
diff --git a/gnu/system/installer/filesystems.scm
b/gnu/system/installer/filesystems.scm
index 68105c3..93db3bf 100644
--- a/gnu/system/installer/filesystems.scm
+++ b/gnu/system/installer/filesystems.scm
@@ -116,11 +116,12 @@
(let ((partitions-without-filesystems
(fold (lambda (x prev)
(match x
- ((dev . (? file-system-spec? fss))
- (if (not (string-prefix? "ext"
- (file-system-spec-type
fss)))
- (cons dev prev)
- prev)))) '() mount-points)))
+ ((dev . ($ <file-system-spec> mp label type uuid))
+ (cond
+ ((string-prefix? "ext" type) prev)
+ ((equal? "btrfs" type) prev)
+ (else (cons dev prev))))))
+ '() mount-points)))
(if (null? partitions-without-filesystems)
#f
diff --git a/gnu/system/installer/format.scm b/gnu/system/installer/format.scm
index 1f32196..3a5f8af 100644
--- a/gnu/system/installer/format.scm
+++ b/gnu/system/installer/format.scm
@@ -106,13 +106,15 @@ match those uuids read from the respective partitions"
(for-each
(lambda (x)
(match x
- ((dev . (? file-system-spec? fss))
- (let ((cmd (string-append "mkfs." (file-system-spec-type
fss))))
+ ((dev . ($ <file-system-spec> mp label type uuid))
+ (let ((cmd (string-append "mkfs." type)))
(zero? (pipe-cmd window-port
cmd cmd
- "-L" (file-system-spec-label fss)
- "-U" (file-system-spec-uuid fss)
- "-v"
+ "-L" label
+ "-U" uuid
+ (if (equal? type "btrfs")
+ "-f"
+ "-v")
dev))
)))) mount-points)
- 92/197: installer: Remove mkfs capability from mount points page., (continued)
- 92/197: installer: Remove mkfs capability from mount points page., Danny Milosavljevic, 2017/07/03
- 118/197: installer: Distinguish between Wifi encryption methods., Danny Milosavljevic, 2017/07/03
- 127/197: gurses: Remove box from form popup window., Danny Milosavljevic, 2017/07/03
- 123/197: installer: Add a popup window for forms which have multiple choice fields., Danny Milosavljevic, 2017/07/03
- 121/197: installer: Note which types of file system are supported., Danny Milosavljevic, 2017/07/03
- 141/197: gurses: Avoid one usage of car and cdr., Danny Milosavljevic, 2017/07/03
- 151/197: installer: Avoid wpa_supplicant's output causing screen damage., Danny Milosavljevic, 2017/07/03
- 99/197: installer: Exit the format page after all partitions are successfully formatted., Danny Milosavljevic, 2017/07/03
- 101/197: installer: Replace one usage of car with match., Danny Milosavljevic, 2017/07/03
- 109/197: installer: Fix bug where the selected item of main page was not indicated., Danny Milosavljevic, 2017/07/03
- 104/197: installer: Support btrfs,
Danny Milosavljevic <=
- 111/197: gurses: Change highlighting from bold to inverse., Danny Milosavljevic, 2017/07/03
- 108/197: installer: Do not add file systems which are invalid., Danny Milosavljevic, 2017/07/03
- 164/197: gurses: Use match instead of car., Danny Milosavljevic, 2017/07/03
- 170/197: installer: Remove unused procedure., Danny Milosavljevic, 2017/07/03
- 152/197: installer: New file i18n.scm., Danny Milosavljevic, 2017/07/03
- 110/197: installer: Add an explanatory text to the main page., Danny Milosavljevic, 2017/07/03
- 120/197: gurses: Mini refactor., Danny Milosavljevic, 2017/07/03
- 124/197: gurses: Populate dropdown boxes in forms using a menu., Danny Milosavljevic, 2017/07/03
- 131/197: gurses: Use inverse instead of underline for field value area., Danny Milosavljevic, 2017/07/03
- 133/197: installer: Change livery., Danny Milosavljevic, 2017/07/03