[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/28: build: image: Add support for EXT2 and EXT3 file-systems.
From: |
guix-commits |
Subject: |
02/28: build: image: Add support for EXT2 and EXT3 file-systems. |
Date: |
Sat, 23 May 2020 05:27:57 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit e334787fa820c90a5c194a85c028cb14d23e6118
Author: Mathieu Othacehe <address@hidden>
AuthorDate: Wed May 20 16:12:14 2020 +0200
build: image: Add support for EXT2 and EXT3 file-systems.
* gnu/build/image.scm (make-ext4-image): Rename to ...
(make-ext-image): ... it, and pass the file-system type to mke2fs,
(make-partition-image): Adapt to call "make-ext-image" if the partition
file-system is prefixed by "ext".
---
gnu/build/image.scm | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/gnu/build/image.scm b/gnu/build/image.scm
index fe8e11a..23fc565 100644
--- a/gnu/build/image.scm
+++ b/gnu/build/image.scm
@@ -63,16 +63,18 @@
take the partition metadata size into account, take a 25% margin."
(* 1.25 (file-size root)))
-(define* (make-ext4-image partition target root
- #:key
- (owner-uid 0)
- (owner-gid 0))
- "Handle the creation of EXT4 partition images. See 'make-partition-image'."
+(define* (make-ext-image partition target root
+ #:key
+ (owner-uid 0)
+ (owner-gid 0))
+ "Handle the creation of EXT2/3/4 partition images. See
+'make-partition-image'."
(let ((size (partition-size partition))
+ (fs (partition-file-system partition))
(label (partition-label partition))
(uuid (partition-uuid partition))
(options "lazy_itable_init=1,lazy_journal_init=1"))
- (invoke "mke2fs" "-t" "ext4" "-d" root
+ (invoke "mke2fs" "-t" fs "-d" root
"-L" label "-U" (uuid->string uuid)
"-E" (format #f "root_owner=~a:~a,~a"
owner-uid owner-gid options)
@@ -105,8 +107,8 @@ ROOT directory to populate the image."
(let* ((partition (sexp->partition partition-sexp))
(type (partition-file-system partition)))
(cond
- ((string=? type "ext4")
- (make-ext4-image partition target root))
+ ((string-prefix? "ext" type)
+ (make-ext-image partition target root))
((string=? type "vfat")
(make-vfat-image partition target root))
(else
- branch wip-hurd-vm created (now cd57c13), guix-commits, 2020/05/23
- 02/28: build: image: Add support for EXT2 and EXT3 file-systems.,
guix-commits <=
- 03/28: gnu: grub: Allow "grub-bios-setup" to operate on raw disk-images., guix-commits, 2020/05/23
- 06/28: system: vm: Do not register-closures when cross-building to the Hurd., guix-commits, 2020/05/23
- 01/28: image: Add partition offset support., guix-commits, 2020/05/23
- 13/28: bootloader: grub: Add support for '<hurd-menu-entry>'., guix-commits, 2020/05/23
- 12/28: system: Add 'hurd' field to <boot-parameters>., guix-commits, 2020/05/23
- 15/28: system: Use 'hurd' package in label., guix-commits, 2020/05/23
- 04/28: system: image: Fix disk-image cross-compilation., guix-commits, 2020/05/23
- 05/28: utils: Move 'reset-timestamps' out of database., guix-commits, 2020/05/23
- 07/28: system: vm: Build vm-image using native qemu, for the Hurd., guix-commits, 2020/05/23
- 08/28: system: vm: Add defaults for the Hurd., guix-commits, 2020/05/23