* gnu/system.scm (<operating-system>)[initrd-modules]: New field.
(operating-system-initrd-file): Pass #:linux-modules to 'make-initrd'.
* gnu/system/linux-initrd.scm (default-initrd-modules): New procedure.
(%base-initrd-modules): New macro.
(base-initrd): Add #:linux-modules and honor it.
* gnu/system/install.scm (embedded-installation-os): Use
'initrd-modules' instead of 'initrd'.
* gnu/tests/install.scm (%raid-root-os): Likewise.
* doc/guix.texi (operating-system Reference): Add 'initrd-modules'.
(Initial RAM Disk): Document it. Adjust example to not use
#:extra-modules.
This simplifies OS configuration: users no longer need to be aware of
what a given service depends on.
See the discussion at
<https://lists.gnu.org/archive/html/guix-devel/2018-01/msg00114.html>.
* gnu/services.scm (missing-target-error): New procedure.
(service-back-edges): Use it.
(instantiate-missing-services): New procedure.
* gnu/system.scm (operating-system-services): Call
'instantiate-missing-services'.
* tests/services.scm ("instantiate-missing-services")
("instantiate-missing-services, no default value"): New tests.
* gnu/services/version-control.scm (cgit-service-type)[extensions]: Add
FCGIWRAP-SERVICE-TYPE.
* gnu/tests/version-control.scm (%cgit-os): Remove NGINX-SERVICE-TYPE
and FCGIWRAP-SERVICE-TYPE instances.
* doc/guix.texi (Log Rotation): Remove 'mcron-service-type' in example.
(Miscellaneous Services): Remove 'nginx-service-type' and
'fcgiwrap-service-type' in Cgit example.
Previously tests sometimes start before the shepherd was listening,
leading to test failures.
* gnu/tests/version-control.scm (run-cgit-test)[test]: Add "shepherd
socket ready" test. Rename to two "service running" tests for clarity.
So that it can also be used for other web servers.
* gnu/tests/web.scm (%index.html-contents): Change nginx to guix.
(%make-http-root): Move the index.html file from /srv to /srv/http.
(%nginx-servers): Remove the setting of root.
(run-nginx-test, run-webserver-test): Rename run-nginx-test to
run-webserver-test and generalise its behaviour
(%test-nginx): Change to use run-webserver-test, rather than run-nginx-test.
* gnu/tests/networking.scm (openvswitch-configuration-service,
%openvswitch-os): New variables.
(setup-openvswitch, run-openvswitch-test): New procedures.
(%test-openvswitch): New public variable.
Fixes <https://bugs.gnu.org/29769>.
Reported by Mark H Weaver <mhw@netris.org>.
This is a followup to 8b223ceac4.
* gnu/tests/web.scm (%php-fpm-nginx-server-blocks): Turn 'listen' into a
list.
If nginx is configured with a ssl-certificate file, and ssl-certificate-key,
it will fail to start unless these exist. To avoid this happening, change the
default to #f.
* gnu/services/web.scm (<nginx-server-configuration>)
[ssl-certificate,ssl-certificate-key]: Set the defaults to #f.
* gnu/tests/web.scm (%nginx-servers): Remove redundant
nginx-server-configuration fields.
* doc/guix.texi (Web Services): Update examples and documentation.
* gnu/tests/version-control.scm (README-contents): New variable.
(%make-git-repository): Add a 'README' file to the repo.
(%test-repository-service): New variable.
(%cgit-os): Use it.
(run-cgit-test): Test /test/tree/README and /test/tree/does-not-exist.
1200 MiB are too small for a btrfs-root-os, thus let increase it.
* gnu/tests/install.scm (run-install): Increase target-size to 2200 MiB.
(%btrfs-root-installation-script): Increase my-root partition size to 2G.
1500 MiB are too small for a current system, thus let
system-disk-image estimate the required size.
* gnu/tests/install.scm: (run-install): Pass "#:disk-image-size
'guess" to system-disk-image.
Previously, the activation phase for this service caused some systems using it
to not boot. This test checks that it's possible to boot a system using it,
and at least start the service.
* gnu/tests/databases.scm (%mysql-os, %test-mysql): New variables.
(run-mysql-test): New procedure.
Fixes <https://bugs.gnu.org/28600>.
Fixes a regression introduced in
4e854b1814.
Reported by Christopher Baines <mail@cbaines.net>.
* gnu/tests/install.scm (operating-system-with-gc-roots): Use
'simple-service' to extend GC-ROOT-SERVICE-TYPE instead of instantiating
it.
Fixes a regression introduced in
8bd5231485, whereby returning #<eof> would
no longer work (since #<eof> would be in the cdr of the result, and thus
it would not get converted to a string.)
* gnu/tests/base.scm (run-mcron-test)["root's job with command"]: Pass
#:read to 'wait-for-file'.
Fixes a regression introduced in fbc7b1f125.
* gnu/tests/install.scm (run-install)[install]: Don't use 'file-append'
with a string as its first argument; use a gexp with 'string-append' instead.
Use a gexp instead of a list for "-cdrom IMG".
Fixes a regression introduced in
fa67d56541 whereby elogind would fail to
start with:
Cannot determine cgroup we are running in: No data available
Out of memory.
thereby preventing log-in altogether.
* gnu/packages/freedesktop.scm (elogind)[arguments]: Pass
"--with-cgroup-controller=elogind".
* gnu/tests/desktop.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/build/marionette.scm (wait-for-file): Add #:read parameter and
honor it.
* gnu/tests/base.scm (run-basic-test)["login on tty1"]: Use
'wait-for-file' instead of inline code.
* gnu/tests/install.scm (%test-iso-image-installer): New variable.
(run-install): Add #:installation-disk-image-file-system-type as a keyword
argument.
* gnu/bootloader.scm (<bootloader-configuration>): Deprecate "device" field in
favor of "target" field. This is mostly a renaming but also a generalization
to support UEFI targets being paths to a mounted partition instead of a device
name.
* gnu/system/examples/bare-bones.tmpl:
* gnu/system/examples/desktop.tmpl:
* gnu/system/examples/lightweight-desktop.tmpl:
* gnu/system/examples/vm-image.tmpl:
* gnu/system/install.scm:
* gnu/tests.scm:
* gnu/tests/install.scm:
* gnu/tests/nfs.scm:
* tests/system.scm: Adapt all invocations of bootloader-configuration.
* guix/scripts/system.scm (perform-action): Rename device argument to
bootloader-target.
(process-action): Adapt caller.
* doc/guix.texi (Proceeding with the Installation):
* doc/guix.texi (Bootloader Configuration): Update documentation.
Memcached changes to the memcached user from root before writing the PID
file. This means that it must be able to write the PID file as the memcached
user.
To make this work, create the /var/run/memcached directory when the service
starts, make it owned by memcached, and change memcached to write the PID file
to /var/run/memcached/pid.
This wasn't picked up by the system test as the "service running" part was too
permissive, and only failed on an error. Instead, test the response from
calling start-service and check that the PID is a number.
* gnu/services/databases.scm (memcached-activation): New variable.
(memcached-shepherd-service): Change PID file location.
(memcached-service-type): Extend the activation-service-type.
* gnu/tests/databases.scm (run-memcached-test)[test]: Change the "service
running" test to check the response from the shepherd.
* doc/guix.texi: Add documentation.
* gnu/services/audio.scm (<mpd-configuration>): New record type.
(mpd-service-type): New service type.
* gnu/tests/audio.scm: New file.
* gnu/local.mk: Add new files.
Signed-off-by: Christopher Baines <mail@cbaines.net>
* gnu/services/databases.scm (memcached-service-type, %memcached-accounts):
New variables.
(<memcached-configuration>): New record type.
(memcached-service-type): New procedures.
* gnu/tests/databases.scm: New file.
* doc/guix.texi (Database Services): Document the new memcached service.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add entry for tests/databases.scm.
* gnu/tests/install.scm (%test-installed-extlinux-os): New exported
variable.
(%minimal-extlinux-os, %minimal-extlinux-os-source): New variables.
(%extlinux-gpt-installation-script): New variable.
(run-install)[packages]: New argument. The packages specified are
appended to the installation image.
* gnu/build/marionette.scm (wait-for-file): New procedure.
* gnu/tests/base.scm (run-mcron-test)[test](wait-for-file): Remove.
Pass second argument in 'wait-for-file' calls.
* gnu/tests/ssh.scm (run-ssh-test)[test](wait-for-file): Remove.
Pass second argument in 'wait-for-file' calls.
* gnu/tests/messaging.scm (run-xmpp-test)[test](guest-wait-for-file):
Remove.
Use 'wait-for-file' instead, with second argument.
Reported by Alex Griffin <a@ajgrf.com>.
Fixes <http://bugs.gnu.org/27135>.
* gnu/build/activation.scm (add-user): When UID is zero, add 'chmod'
call.
* gnu/tests/base.scm (run-basic-test)["permissions on /root"]: New test.
Fixes a bug whereby GuixSD would create the /nonexistent directory, from
user 'nobody', even though it has 'create-home-directory?' set to #f.
* gnu/build/activation.scm (activate-users+groups): Add comment for
\#:create-home?.
(activate-user-home)[ensure-user-home]: Skip when CREATE-HOME? is #f or
SYSTEM? is #t.
* gnu/tests/base.scm (run-basic-test)["no extra home directories"]: New
tests.
Fixes a bug whereby GuixSD would create the /nonexistent directory, from
user 'nobody', even though it has 'create-home-directory?' set to #f.
* gnu/build/activation.scm (activate-users+groups): Add comment for
\#:create-home?.
(activate-user-home)[ensure-user-home]: Skip when CREATE-HOME? is #f or
SYSTEM? is #t.
* gnu/tests/base.scm (run-basic-test)["no extra home directories"]: New
tests.
* 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.
This is a followup to 7561881f2a.
* gnu/tests/base.scm (run-basic-test)["/run/current-system is a GC
root"]: Remove 'set!' statements, add 'add-to-load-path' statement for
GUIX.
* gnu/services/networking.scm (<inetd-configuration>, <inetd-entry>): New
record types.
(inetd-config-file, inetd-shepherd-service): New procedures.
(inetd-service-type): New variable.
* doc/guix.texi (Networking Services): Document it.
* gnu/tests/networking.scm: New file.
* gnu/local.mk: Add it.
* gnu/tests/ssh.scm (run-ssh-test): Introduce "SFTP file writing and reading".
Make 'sftp?' a keyword parameter.
(%test-openssh): Pass #:sftp? #t to 'run-ssh-test'.
* gnu/tests/ssh.scm (run-ssh-test): Introduce make-session-for-test,
call-with-connected-session and call-with-connected-session/auth.
(run-ssh-test)["connect"]: Rename to "shell command". Abstract its session
connection and authentication work into the above three functions.
This fixes a regression introduced in
ae763b5b0b whereby home directories and
skeletons would be root-owned.
* gnu/build/activation.scm (copy-account-skeletons): Make 'directory' a
keyword parameter. Add #:uid and #:gid and honor them.
[set-owner]: New procedure.
(activate-user-home): Add call to 'getpw' and 'chown'. Pass UID and GID
to 'copy-account-skeletons'.
* gnu/tests/base.scm (run-basic-test)["skeletons in home directories"]:
Test file ownership under HOME.
Fixes <http://bugs.gnu.org/21108>.
Reported by Andy Patterson <ajpatter@uwaterloo.ca>
and Leo Famulari <leo@famulari.name>.
* gnu/build/activation.scm (activate-users+groups)[activate-user]: Pass
#:create-home? #t iff CREATE-HOME? and SYSTEM?.
(activate-user-home): New procedure.
* gnu/system/shadow.scm (account-shepherd-service): New procedure.
(account-service-type)[extensions]: Add SHEPHERD-ROOT-SERVICE-TYPE
extension.
* gnu/tests/base.scm (run-basic-test)["home"]
["skeletons in home directories"]: New tests.
* gnu/tests/install.scm (%separate-home-os, %separate-home-os-source)
(%test-separate-home-os): New variables.
This fixes a bug whereby /var/log/wtmp would never be created, and thus
accounting information would be lost.
* gnu/services.scm (activation-script): Create /var/log/wtmp.
* gnu/tests/base.scm (run-basic-test)["wtmp entry"]: New test.
This fixes a bug whereby /var/run/utmpx would never be created, and thus
accounting information would be missing.
* gnu/services.scm (activation-script): Create /var/run/utmpx.
* gnu/tests/base.scm (run-basic-test)["utmpx entry"]: New test.
Suggested by John Darrington <john@darrington.wattle.id.au>.
* gnu/system/file-systems.scm (%not-slash): New variable.
(file-prefix?): New procedure.
(file-system-needed-for-boot?): Use it to check whether FS holds the
store.
* tests/file-systems.scm ("file-system-needed-for-boot?"): New test.
* gnu/tests/install.scm (%separate-store-os)[file-systems]: Remove
'needed-for-boot?' field for "/gnu".
This allows 'grub-install' to do the right thing when / or /boot is a
LUKS-encrypted partition.
Fixes <http://bugs.gnu.org/21843>.
* gnu/build/install.scm (install-grub): Add 'setenv' to set
'GRUB_ENABLE_CRYPTODISK'.
(wait-for-screen-text): New test.
* gnu/tests/base.scm (run-basic-test): Add #:initialization parameter
and honor it.
* gnu/tests/install.scm (%encrypted-root-os)[kernel-arguments]: Remove.
(%encrypted-root-installation-script): Pass '--uuid' to 'cryptsetup
luksFormat'. Remove 'sed' invocation.
(enter-luks-passphrase): New procedure.
(%test-encrypted-os)[value]: Pass #:initialization to 'run-basic-test'.
* gnu/tests/base.scm (run-basic-test)["login on tty1"]: Move the
file-waiting loop inside the 'marionette-eval' body. Before that, we
were waiting for the file to appear on the host, which would never
happen, meaning that we were always waiting for 15 seconds.
This is a followup to 0f65f54ebd.
* gnu/tests/install.scm (%separate-store-os, %separate-store-os-source)
(%separate-store-installation-script, %test-separate-store-os): New
variables.
* gnu/services/herd.scm (<live-service>): New record type.
(current-services): Change to return a single value: #f or a list of
<live-service>.
* guix/scripts/system.scm (call-with-service-upgrade-info): Adjust
accordingly.
* gnu/tests/base.scm (run-basic-test)["shepherd 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/tests/install.scm (%simple-installation-script): New variable.
Contains installation script formerly in 'run-install'.
(run-install): Add 'target-os', 'target-os-source', and #:script
parameters. Honor them.
(qemu-command/writable-image): New procedure.
(%test-installed-os): Use it.
This is a followup to 037f9e07cd.
Reported by Mark H Weaver.
* gnu/tests/install.scm (%minimal-os): Pass a <marionette-configuration>
object as the value for the MARIONETTE-SERVICE-TYPE.