* 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.
This is a followup to ab64483.
* gnu/system.scm (mapped-device-user): Check whether the title of FS is
'device before calling 'string=?'.
* gnu/system/vm.scm (virtualized-operating-system)[user-file-systems]:
Likewise.
Previously a wrong-type-arg error would be raised when a file system
with a UUID (bytevector) field was encountered.
* gnu/system.scm (other-file-system-services)[device-mappings]: Check
whether FS's device is a string.