Skip to content
Snippets Groups Projects
Unverified Commit 60581502 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

vm: Use a fixed FAT serial number for 'efi.img' in ISO images.

Partly fixes <https://bugs.gnu.org/35283>.

* gnu/build/vm.scm (make-iso9660-image): Set the
'GRUB_FAT_SERIAL_NUMBER' environment variable.
parent 52b5fe5b
No related branches found
No related tags found
No related merge requests found
......@@ -468,6 +468,16 @@ (define items
(time-second
(date->time-utc (make-date 0 0 0 0 1 1 1980 0)))))
;; Our patched 'grub-mkrescue' honors this environment variable and passes
;; it to 'mformat', which makes it the serial number of 'efi.img'. This
;; allows for deterministic builds.
(setenv "GRUB_FAT_SERIAL_NUMBER"
(number->string (if volume-uuid
(string-hash (iso9660-uuid->string volume-uuid)
(expt 2 32))
#x77777777)
16))
(let ((pipe
(apply open-pipe* OPEN_WRITE
grub-mkrescue "-o" target
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment