guix/gnu/system
Ludovic Courtès 9b336338cd
system: Introduce a disjoint UUID type.
Conceptually a UUID is just a bytevector.  However, there's software out
there such as GRUB that relies on the string representation of different
UUID types (e.g., the string representation of DCE UUIDs differs from
that of ISO-9660 UUIDs, even if they are actually bytevectors of the
same length).  This new <uuid> record type allows us to preserve
information about the type of UUID so we can eventually convert it to a
string using the right representation.

* gnu/system/uuid.scm (<uuid>): New record type.
(bytevector->uuid): New procedure.
(uuid): Return calls to 'make-uuid'.
(uuid->string): Rewrite using 'match-lambda*' to accept a single 'uuid?'
argument.
* gnu/bootloader/grub.scm (grub-root-search): Check for 'uuid?' instead
of 'bytevector?'.
* gnu/system.scm (bootable-kernel-arguments): Check whether ROOT-DEVICE
is 'uuid?'.
(read-boot-parameters): Use 'bytevector->uuid' when the
store device is a bytevector.
(read-boot-parameters-file): Check for 'uuid?' instead of 'bytevector?'.
(device->sexp): New procedure.
(operating-system-boot-parameters-file): Use it for 'root-device' and
'store'.
(operating-system-bootcfg): Remove conditional in definition of
'root-device'.
* gnu/system/file-systems.scm (file-system->spec): Check for 'uuid?' on
DEVICE and take its bytevector.
* gnu/system/mapped-devices.scm (open-luks-device): Likewise.
* gnu/system/vm.scm (iso9660-image): Call 'uuid-bytevector' for the
 #:volume-uuid argument.
2017-09-11 22:24:46 +02:00
..
examples gnu: bootloader: Deprecate "device" field in favor of "target". 2017-08-23 22:23:19 +02:00
file-systems.scm system: Introduce a disjoint UUID type. 2017-09-11 22:24:46 +02:00
install.scm install: Add OpenSSH to the global profile. 2017-09-10 23:34:29 +02:00
linux-container.scm file-systems: Add 'file-system-mapping->bind-mount'. 2017-02-03 00:23:28 +01:00
linux-initrd.scm linux-initrd: Avoid monadic style a bit. 2017-07-04 23:45:12 +02:00
locale.scm locale: Demonadify the locale creation API. 2017-07-17 23:41:36 +02:00
mapped-devices.scm system: Introduce a disjoint UUID type. 2017-09-11 22:24:46 +02:00
nss.scm
pam.scm system: Allow root to run "su" without password. 2017-05-08 23:11:01 +02:00
shadow.scm system: Add 'grep --color' alias in '.bash_profile' skeleton. 2017-07-27 14:44:28 +02:00
uuid.scm system: Introduce a disjoint UUID type. 2017-09-11 22:24:46 +02:00
vm.scm system: Introduce a disjoint UUID type. 2017-09-11 22:24:46 +02:00