* gnu/system.scm (operating-system-etc-service): Set XCURSOR_PATH environment
variable so that libxcursor finds cursors in user and system profiles.
* gnu/packages/xorg.scm (libxcursor): Add a TODO for better handling of
XCURSOR_PATH in other profiles.
This is a followup to db4e8fd5d4.
Fixes <https://bugs.gnu.org/28445>.
Reported by Mark H Weaver <mhw@netris.org>.
* gnu/system.scm (ensure-not-/dev): New procedure.
(read-boot-parameters)[ensure-not-/dev]: Remove.
(operating-system-boot-parameters): Use it.
Fixes <https://bugs.gnu.org/28445>.
Reported by Mark H Weaver and Roel Janssen.
* gnu/system.scm (read-boot-parameters)[ensure-not-/dev]: New procedure.
Use it.
* gnu/system.scm (read-boot-parameters): Fix store-device computation for root
devices of type "device", like the LUKS partition described in the manual.
From a patch from https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28445#23.
Signed-off-by: Andy Wingo <wingo@igalia.com>
Fixes a regression introduced in
commit 075681d350.
* gnu/system.scm (read-boot-parameters): For 'root-device', use
'device-sexp->device', not 'device->sexp'.
* gnu/system.scm (read-boot-parameters)[device->sexp]: New procedure.
Use it for 'root-device' and 'store-device'.
(device->sexp): Serialize the UUID type in addition to its bytevector.
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.
* gnu/bootloader.scm (menu-entry-device-mount-point): New variable. Export it.
(<menu-entry>: New field "device".
* gnu/bootloader/grub.scm (grub-confgiuration-file): Handle <menu-entry>
entries.
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Handle
<menu-entry> entries.
* gnu/system.scm (menu->entry->boot-parameters): Delete variable.
(boot-parameters->menu-entry): New variable. Export it.
(operating-system-bootcfg): Make OLD-ENTRIES a list of <menu-entry>.
* guix/script/system.scm (reinstall-bootloader): Fix bootcfg usage.
(perform-action): Fix bootcfg usage.
* gnu/packages/linux.scm (linux-libre)[arguments]: Add to the regex to
find and install the aarch64-linux kernel.
* gnu/system.scm (system-linux-image-file-name): Add entry for aarch64.
* gnu/system/locale.scm (single-locale-directory): Use 'computed-file'
instead of 'gexp->derivation'.
(locale-directory): Adjust accordingly and do the same.
* gnu/system.scm (operating-system-directory-base-entries): Adjust
accordingly.
* gnu/bootloader.scm (<menu-entry>): New variable. Export associated getters,
This record is extracted from grub module.
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Use
menu-entry->boot-parameters to convert menu-entry records to
boot-parameters.
* gnu/bootloader/grub.scm (<menu-entry>): Remove.
(boot-parameters->menu-entry): Remove.
(grub-configuration-file): Use boot-parameters to create configuration
entries.
* gnu/system.scm (menu-entry->boot-parameters): New exported procedure.
* gnu/bootloader.scm: New file.
* gnu/bootloader/extlinux.scm: New file.
* gnu/bootloader/grub.scm: New file.
* gnu/local.mk: Build new files.
* gnu/system.scm: Adapt to new bootloader api.
* gnu/scripts/system.scm: Adapt to new bootloader api.
* gnu.scm: Remove (gnu system grub) and replace by (gnu bootloader) and (gnu
bootloader grub) modules.
* gnu/system/grub.scm: Moved content to gnu/bootloader/grub.scm.
* gnu/system/vm: Replace (gnu system grub) module by (gnu bootloader).
* gnu/tests.scm: Ditto.
* gnu/tests/nfs.scm: Ditto.
Followup to 8e815c5b69.
* gnu/system.scm: Remove (gnu system grub) import.
(operating-system-bootcfg): Refer to (gnu system grub) within the procedure.
Fixes <http://bugs.gnu.org/26791>.
Reported by Mark H Weaver <mhw@netris.org>.
* gnu/system.scm (<boot-parameters>, read-boot-parameters)
(read-boot-parameters-file): Move before first use of the
'boot-parameters' macro.
* gnu/system.scm (read-boot-parameters): Remove export.
(read-boot-parameters-file): New variable. Export it.
* guix/scripts/system.scm (profile-boot-parameters): Use
read-boot-parameters-file.
(profile-grub-entries): Use read-boot-parameters-file.
(reinstall-grub): Use read-boot-parameters-file.
(display-system-generation): Use read-boot-parameters-file.
* gnu/system.scm (bootable-kernel-arguments): New variable.
(operating-system-kernel-arguments): New variable.
(operating-system-bootcfg): Use operating-system-kernel-arguments.
(operating-system-boot-parameters): Use operating-system-kernel-arguments.
* gnu/services/base.scm (file-system-shepherd-services): New procedure.
(file-system-service-type): Use it as the SHEPHERD-ROOT-SERVICE-TYPE
extension.
(user-processes-service-type): Change to take a single 'grace-delay'
parameter.
(user-processes-service): Remove 'file-systems' parameter. Pass
GRACE-DELAY as the only value for the service.
* gnu/system.scm (essential-services): Adjust accordingly.
This fixes a regression introduced by
1ef8b72a7f, in which we would incorrectly use a
device path in a label-based grub root search command, e.g. 'search --label
--set /dev/sda4'.
* gnu/system.scm (grub-device): New procedure.
(operating-system-grub.cfg, operating-system-parameters-file): Use it.
(read-boot-parameters): Handle device paths correctly.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu/system.scm (<boot-parameters>)[store-device, store-mount-point]:
New fields.
(read-boot-parameters): Initialize them.
(operating-system-grub.cfg): Likewise. Remove STORE-FS argument from
call to 'grub-configuration-file'.
(operating-system-parameters-file): Add 'store' element in
'boot-parameters'.
* gnu/system/grub.scm (strip-mount-point): Replace 'store-fs' parameter
by 'mount-point'; adjust accordingly. Adjust callers.
(<menu-entry>)[device, device-mount-point]: New fields.
(eye-candy): Replace 'root-fs' parameter by 'store-device'; add
'store-mount-point'. Use keyword arguments for 'system' and 'port'.
(grub-root-search): Remove 'root-fs' by 'device' and adjust
accordingly.
(grub-configuration-file): Remove 'store-fs' parameter. Adjust
accordingly.
* guix/scripts/system.scm (previous-grub-entries): Initialize 'device'
and 'device-mount-point' fields from PARAMS.
* doc/guix.texi (GRUB Configuration): Document 'device' and
'device-mount-point'. Explain that 'linux' can be prefixed by a GRUB
device name.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Fixes <http://bugs.gnu.org/24346>.
Reported by csanchezdll@gmail.com (Carlos Sánchez de La Lama).
* guix/scripts/system.scm (previous-grub-entries): Get the initrd file
name from PARAMS.
* gnu/system.scm (operating-system-grub.cfg): Use
'operating-system-initrd-file' to retrieve the initrd file name.
* gnu/system/grub.scm (strip-mount-point): New procedure.
(grub-configuration-file)[entry->gexp]: Call 'strip-mount-point' for
LINUX and INITRD.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* gnu/system.scm (<boot-parameters>)[initrd]: New field.
(read-boot-parameters): Read the 'initrd' element and fill in the
'initrd' field of the result.
Fixes <http://bugs.gnu.org/20067>.
Reported by Tomáš Čech <sleep_walker@suse.cz>.
* gnu/system.scm (system-linux-image-file-name)
(operating-system-kernel-file): New procedures.
(operating-system-grub.cfg): Use 'operating-system-kernel-file' for the
'kernel' field of 'menu-entry'.
(operating-system-parameters-file): Likewise for the 'kernel' entry.
(read-boot-parameters): Adjust 'kernel' field so that it contains the
absolute file name of the image.
* gnu/system/grub.scm (grub-configuration-file)[linux-image-name]:
Remove.
[entry->gexp]: Assume LINUX is the absolute file name of the kernel
image.
* doc/guix.texi (GRUB Configuration): Add an example, and adjust
'kernel' field documentation accordingly.
Previously we would create one 'file-system-service-type' instead per
file system. Now, we create only one instance for all the file
systems.
* gnu/services/base.scm (fstab-service-type)[compose]: Change to
CONCATENATE.
(file-system-shepherd-service): Change to return either one
<shepherd-service> or #f.
(file-system-service-type): Pluralize 'name'. Adjust
SHEPHERD-ROOT-SERVICE-TYPE extension to above changes. Add 'compose'
and 'extend'.
(file-system-service): Remove.
* gnu/system.scm (other-file-system-services): Rename to...
(non-boot-file-system-service): ... this. Change to return a single
FILE-SYSTEM-SERVICE-TYPE instance.
(essential-services): Adjust accordingly.
Our 'glibc' package currently ignores /run/current-system/locale,
although the intent is to look for locales in that directory.
* gnu/packages/base.scm (glibc/linux): Add comment about
/run/current-system/locale being ignored.
* gnu/system.scm (operating-system-environment-variables): Add
'GUIX_LOCPATH'.
* gnu/tests/base.scm (run-basic-test): Add "locale" test.
* gnu/system.scm (operating-system-etc-service) <profile>: Move sourcing
of /etc/environment before that of $HOME/.guix-profile/etc/profile.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This allows mapped devices listed in 'dependencies' to be properly taken
into account.
Reported by Andreas Enge <andreas@enge.fr>.
* gnu/system.scm (mapped-device-user): Check whether DEVICE is a member
of the 'dependencies' of FS.
* tests/system.scm (%luks-device, %os-with-mapped-device): New variables.
("operating-system-user-mapped-devices")
("operating-system-boot-mapped-devices")
("operating-system-boot-mapped-devices, implicit dependency"): New tests.
After commits 004ea62 and 092dd65, Emacs can find packages in a system
profile, so it autoloads guix code without additional hacks, which can
be removed now.
* gnu/system.scm (emacs-site-file, emacs-site-directory): Remove.
(operating-system-etc-service): Adjust accordingly.
(operating-system-environment-variables): Remove EMACSLOADPATH.
Fixes <http://bugs.gnu.org/22572>.
Reported by Mark H Weaver <mhw@netris.org>.
* gnu/system/locale.scm (%not-dot): New variable.
(denormalize-codeset, locale-name->definition): New procedures.
* gnu/system.scm (locale-name->definition*): New procedure.
(operating-system-locale-directory): Instead of raising an error, add
the missing locale.
* doc/guix.texi (Locales): Adjust accordingly.
After commit 13fe4891fa, Emacs package
includes "site-start.el", and it has a priority over
"/etc/emacs/site-start.el" on GuixSD because "/etc/emacs" is added to
the end of 'load-path'.
* gnu/system.scm (operating-system-environment-variables): Change
EMACSLOADPATH to prepend "/etc/emacs" to 'load-path' instead of
appending.
This fixes a bug whereby /dev/disk/by-{label,id} would be missing on
GuixSD (/dev/disk/by-id would still contain device-mapped partitions
though.)
Reported by Mark H Weaver <mhw@netris.org>.
* gnu/packages/linux.scm (eudev-with-blkid): New variable.
* gnu/services/base.scm (udev-service): #:udev defaults to
EUDEV-WITH-BLKID.
* gnu/system.scm (%base-packages): Replace EUDEV with EUDEV-WITH-BLKID.
Fixes <http://bugs.gnu.org/22281>.
Reported by Christopher Allan Webber <cwebber@dustycloud.org>.
* gnu/system/grub.scm (eye-candy): Add 'root-fs' parameter. Replace
'search --file' command in the output with whatever 'grub-root-search'
returns.
(grub-root-search): New procedure.
(grub-configuration-file): Add 'store-fs' parameter. Use
'grub-root-search' instead of hard-coded 'search --file' commands.
* gnu/system.scm (store-file-system,
operating-system-store-file-system): New procedures.
(operating-system-grub.cfg): Use it, and adjust call to
'grub-configuration-file'.
* tests/system.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* gnu/services.scm (compute-boot-script): Remove /tmp and /var/run
deletion code from here.
(cleanup-gexp): New procedure with /tmp and /var/run deletion code
formerly in 'compute-boot-script'.
(cleanup-service-type): New variable.
* gnu/system.scm (essential-services): Add an instance of
CLEANUP-SERVICE-TYPE.
* gnu/build/file-systems.scm (canonicalize-device-spec)[canonical-title]:
Use 'string->uuid' to check whether SPEC is a UUID.
When SPEC is a string and CANONICAL-TITLE is 'uuid, call 'string->uuid'.
* gnu/system.scm (operating-system-grub.cfg): Add 'root-device'
variable and use it for the "--root=" argument.