[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#27521] [PATCH] build: Allow specifying volume-uuid with make-iso966
From: |
Danny Milosavljevic |
Subject: |
[bug#27521] [PATCH] build: Allow specifying volume-uuid with make-iso9660-image. |
Date: |
Mon, 3 Jul 2017 13:10:43 +0200 |
* gnu/build/file-systems.scm (iso9660-uuid->string): Export.
* gnu/build/vm.scm (make-iso9660-image): Add volume-uuid.
---
gnu/build/file-systems.scm | 1 +
gnu/build/vm.scm | 19 ++++++++++++++-----
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 16160a659..b6930497d 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -48,6 +48,7 @@
string->ext3-uuid
string->ext4-uuid
string->btrfs-uuid
+ iso9660-uuid->string
bind-mount
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 860c98346..4239bc2fb 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -353,18 +353,27 @@ SYSTEM-DIRECTORY is the name of the directory of the
'system' derivation."
(error "failed to create GRUB EFI image"))))
(define* (make-iso9660-image grub config-file os-drv target
- #:key (volume-id "GuixSD"))
+ #:key (volume-id "GuixSD") (volume-uuid #f))
"Given a GRUB package, creates an iso image as TARGET, using CONFIG-FILE as
Grub configuration and OS-DRV as the stuff in it."
(let ((grub-mkrescue (string-append grub "/bin/grub-mkrescue")))
(mkdir-p "/tmp/root/var/run")
(mkdir-p "/tmp/root/run")
- (unless (zero? (system* grub-mkrescue "-o" target
- (string-append "boot/grub/grub.cfg=" config-file)
- (string-append "gnu/store=" os-drv "/..")
+ (unless (zero? (apply system*
+ `(,grub-mkrescue "-o" ,target
+ ,(string-append "boot/grub/grub.cfg=" config-file)
+ ,(string-append "gnu/store=" os-drv "/..")
"var=/tmp/root/var"
"run=/tmp/root/run"
- "--" "-volid" (string-upcase volume-id)))
+ "--"
+ "-volid" ,(string-upcase volume-id)
+ ,@(if volume-uuid
+ `("-volume_date" "uuid"
+ ,(string-filter (lambda (value)
+ (not (char=? #\- value)))
+ (iso9660-uuid->string
+ volume-uuid)))
+ `()))))
(error "failed to create ISO image"))))
(define* (initialize-hard-disk device
- [bug#27521] [PATCH v5] build: Add iso9660 system image generator., (continued)
- [bug#27521] [PATCH] guix system: Add "--file-system-type" option., Danny Milosavljevic, 2017/07/03
- [bug#27521] [PATCH] guix system: Add "--file-system-type" option., Ludovic Courtès, 2017/07/03
- [bug#27521] [PATCH] guix system: Add "--file-system-type" option., Danny Milosavljevic, 2017/07/03
- [bug#27521] [PATCH] guix system: Add "--file-system-type" option., Ludovic Courtès, 2017/07/03
- [bug#27521] [PATCH] guix system: Add "--file-system-type" option., Danny Milosavljevic, 2017/07/03
- [bug#27521] [PATCH] guix system: Add "--file-system-type" option., Ludovic Courtès, 2017/07/03
- [bug#27521] [PATCH] guix system: Add "--file-system-type" option., Danny Milosavljevic, 2017/07/03
- [bug#27521] [PATCH] build: Allow specifying volume-uuid with make-iso9660-image.,
Danny Milosavljevic <=
- [bug#27521] [PATCH] build: Allow specifying volume-uuid with make-iso9660-image., Ludovic Courtès, 2017/07/03