The default value of the argument REGISTER-CLOSURE? of the ISO9660-IMAGE,
QEMU-IMAGE and SYSTEM-DOCKER-IMAGE procedures can be computed automatically,
since the operating-system definition is available in its context. When the
operating-system definition does not contain the GUIX-SERVICE-TYPE, do not
register the closure in the database of Guix, as it takes time and doesn't
serve a purpose.
* gnu/system/vm.scm (has-guix-service-type): Add predicate.
(iso9660-image)[register-closures?]: Use it to compute the argument's default
value.
(qemu-image)[register-closures?]: Likewise, and update docstring.
(system-docker-image)[register-closures?]: Likewise.
(system-disk-image): Do not explicit a value for the REGISTER-CLOSURES?
argument of the ISO9660-IMAGE and QEMU-IMAGE procedure calls, so that its
default value is used instead.
* guix/scripts/system.scm (system-derivation-for-action): Do not explicit a
value for the REGISTER-CLOSURES? argument of the SYSTEM-DOCKER-IMAGE
procedure call, so that its default value is used instead.
* gnu/system/linux-container.scm (container-essential-services): If network is
to be shared with the host, remove network configuration files from etc
service.
(containerized-operating-system): If network is to be shared with the host,
remove nscd service and map host's /var/run/nscd if it exists.
(container-script): If network is to be shared with the host, do not create
network namespace.
* guix/scripts/system.scm (system-derivation-for-action): Add
#:container-shared-network? argument.
(perform-action): Add #:container-shared-network? argument.
(show-help): Add "-N, --network" help information.
(%options): Add network option.
(process-action): Call perform-action with #container-shared-network? argument.
* doc/guix.texi (Invoking guix system): Document the "-N, --network" option.
Co-authored-by: Christopher Baines <mail@cbaines.net>
* gnu/system/pam.scm (unix-pam-service): Add #:login-uid? parameter. In
then 'session' field, add "pam_loginuid.so" as required when LOGIN-UID?
is true.
Fixes <https://bugs.gnu.org/35582>.
Reported by sirgazil <sirgazil@zoho.com>.
Previously, leading zeros would be removed, leading to an "invalid"
UUID:
(uuid->string (uuid "00CA-050E" 'fat32))
⇒ "CA-50E"
(string->uuid "CA-50E" 'fat32)
⇒ #f
* gnu/system/uuid.scm (fat-uuid->string): Pad digits with zeros.
* tests/uuid.scm ("uuid, FAT32, leading zeros preserved"): New test.
Fixes a bug whereby building an image containing non-ASCII file names
would fail due to improper decoding of file names.
* gnu/system/vm.scm (iso9660-image, qemu-image): Set GUIX_LOCPATH and
call 'setlocale' in the build environment.
* doc/guix.texi (Running Guix in a VM): Remove mentions of 'lsh-server';
mention 'openssh-service-type' and add a cross-reference.
* gnu/system/examples/vm-image.tmpl (services): Add a commented-out line
for 'openssh-service-type'.
Previously 'guix system disk-image' would fail if the OS didn't define a
"/" file system, even though it actually overrides that file system.
* gnu/system/vm.scm (system-disk-image)[root-uuid]: Turn into a
procedure.
Call 'root-uuid' on a variant of OS with a "/" file system and inherit
from that.
This hack worked around a defect in the Shepherd 0.5.0 and is no longer
needed.
* gnu/services/shepherd.scm (%containerized-shepherd-service): Remove.
* gnu/system/linux-container.scm (container-essential-services): Don't
use it.
Fixes <https://bugs.gnu.org/33639>.
* gnu/system/vm.scm (%linux-vm-file-systems): Remove "cache=loose" for /xchg.
(system-docker-image): Remove 'sync' call, now unneeded, and which was
probably insufficient.
Suggested by Florian Pelz.
* gnu/system/install.scm (%installation-node-names): New variable.
(log-to-info): Expect the chosen locale as an argument. Compute the
language, Info file name, and node name. Install the locale.
(documentation-shepherd-service): Add 'locale' parameter to the 'start'
action and honor it. Set GUIX_LOCPATH and TERM as environment variables
for the process.
* gnu/installer.scm (apply-locale): Use (gnu services herd). Call
'stop-service' and 'start-service' with the chosen locale.
* gnu/system/install.scm (log-to-info): Add 'tty' and 'user'
parameters. Open the tty and change UIDs/GIDs.
(documentation-shepherd-service): New procedure.
(%documentation-users, documentation-service-type): New variables.
(%installation-services): Use it instead of 'mingetty-service'.
* gnu/services/xorg.scm (gdm-service-type)[compose, extend]: New fields.
(set-xorg-configuration): New procedure.
* doc/guix.texi (Keyboard Layout): Use it.
(X Window): Document it.
* gnu/system/examples/desktop.tmpl: Add 'keyboard-layout' fields.
* gnu/system.scm (<operating-system>)[essential-services]: New field.
(operating-system-directory-base-entries): Remove #:container? keyword
and keep only the not-container branch.
(essential-services): Likewise.
(operating-system-services): Likewise, and call
'operating-system-essential-services' instead of 'essential-services'.
(operating-system-activation-script): Remove #:container?.
(operating-system-boot-script): Likewise.
(operating-system-derivation): Likewise.
* gnu/system/linux-container.scm (container-essential-services): New procedure.
(containerized-operating-system): Use it and set the
'essential-services' field.
(container-script): Remove call to 'operating-system-derivation'.
* gnu/system/vm.scm (system-docker-image): Likewise.
* doc/guix.texi (operating-system Reference): Document 'essential-services'.
Partially fixes <https://bugs.gnu.org/34276>.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.
* gnu/system/vm.scm (expression->derivation-in-linux-vm)[loader]: Call
'exit' when USER-BUILDER exits with a non-zero code.
* gnu/system/accounts.scm (sexp->user-group, sexp->user-account): New
procedures.
* gnu/system/shadow.scm (account-activation): Call them in the arguments
to 'activate-users+groups'.
(account-shepherd-service): Likewise.
* gnu/build/activation.scm (activate-users+groups): Expect a list of
<user-account> and a list of <user-group>. Replace uses of 'match' on
tuples with calls to record accessors.
(activate-user-home): Likewise.
The (gnu system accounts) module is meant to be used both on the build-
and on the host-side.
* gnu/system/shadow.scm <top level>: Call 'default-shell'.
(<user-account>, <user-group>): Move to...
* gnu/system/accounts.scm: ... here. New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add system/accounts.scm.