mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-27 19:41:50 +02:00
vm: Make UUID computation really deterministic.
Fixes <https://bugs.gnu.org/32652>. * gnu/system/vm.scm (operating-system-uuid)[service-name, file-system-digest]: New procedures. Map these over services and file systems and hash the result. * tests/guix-system.sh: Add test.
This commit is contained in:
@@ -232,6 +232,14 @@ guix system build "$tmpfile" -d | grep '\.drv$'
|
||||
guix system vm "$tmpfile" -d # succeeds
|
||||
guix system vm "$tmpfile" -d | grep '\.drv$'
|
||||
|
||||
# Make sure the behavior is deterministic (<https://bugs.gnu.org/32652>).
|
||||
drv1="`guix system vm "$tmpfile" -d`"
|
||||
drv2="`guix system vm "$tmpfile" -d`"
|
||||
test "$drv1" = "$drv2"
|
||||
drv1="`guix system disk-image --file-system-type=iso9660 "$tmpfile" -d`"
|
||||
drv2="`guix system disk-image --file-system-type=iso9660 "$tmpfile" -d`"
|
||||
test "$drv1" = "$drv2"
|
||||
|
||||
make_user_config "group-that-does-not-exist" "users"
|
||||
if guix system build "$tmpfile" -n 2> "$errorfile"
|
||||
then false
|
||||
|
||||
Reference in New Issue
Block a user