* gnu/services/monitoring.scm (prometheus-node-exporter-service-type):
New variable.
(<prometheus-node-exporter-configuration>): New record type.
(prometheus-node-exporter-shepherd-service): New procedure.
* gnu/doc/guix.texi (Monitoring Services): Document it.
* gnu/tests/monitoring.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add test module.
Fixes <https://bugs.gnu.org/26353>.
Reported by Danny Milosavljevic <dannym@scratchpost.org>.
* gnu/services.scm (cleanup-gexp): Add 'setenv' and 'setlocale' calls
before 'delete-file-recursively'.
* gnu/tests/base.scm (%cleanup-os, %test-cleanup): New variables.
(run-cleanup-test): New procedure.
Since commit dc7b3e5633, 'start-service' returns
the Shepherd's representation of the service as a sexp, and '#f' if the
service fails to start. Also, it doesn't throw an exception when the service
fails to start, so relying on an exception instead of relying on its return
value is a false positive.
* gnu/tests/base.scm (run-nss-mdns-test): Split tests so to check the return
value of 'start-service'.
(run-mcron-test, run-nss-mdns-test): Use 'test-assert' with the return value
of 'start-service'.
* gnu/tests/admin.scm (run-tailon-test): Idem.
* gnu/tests/dict.scm (run-dicod-test): Idem.
* gnu/tests/mail.scm (run-opensmtpd-test, run-exim-test, run-dovecot-test):
Idem.
* gnu/tests/messaging.scm (run-xmpp-test, run-bitlbee-test): Idem.
* gnu/tests/nfs.scm (run-nfs-test): Idem.
* gnu/tests/rsync.scm (run-rsync-test): Idem.
* gnu/tests/ssh.scm (run-ssh-test): Idem.
* gnu/tests/version-control.scm (run-cgit-test, run-git-http-test): Idem.
* gnu/tests/web.scm (run-php-fpm-test): Idem.
* gnu/build/marionette.scm (wait-for-tcp-port): New procedure.
* gnu/tests/dict.scm (run-dicod-test)["connect inside"]: Use it instead
of the inline loop.
* doc/guix.texi (Networking Services): Document it.
* gnu/services/networking.scm (dhcpd-service-type): Add it.
(dhcpd-configuration, dhcpd-configuration?): Add it.
(dhcpd-configuration-package): Add it.
(dhcpd-configuration-config-file): Add it.
(dhcpd-configuration-version): Add it.
(dhcpd-configuration-run-directory): Add it.
(dhcpd-configuration-lease-file): Add it.
(dhcpd-configuration-pid-file): Add it.
(dhcpd-configuration-interfaces): Add it.
* gnu/tests/networking.scm (minimal-dhcpd-v4-config-file)
(dhcpd-v4-configuration, %dhcpd-os, run-dhcpd-test, %test-dhcpd): New
variables.
Fixes <https://bugs.gnu.org/31113>.
Reported by George myglc2 Clemmer <myglc2@gmail.com>.
* gnu/packages/guile.scm (mcron): Update to 1.1.1.
[arguments]: Change timezone in 'set-timezone' phase. Remove
'disable-schedule-test' and 'wrap-programs' phases. Add 'adjust-tests'
phase.
* gnu/tests/base.scm (%mcron-os): Change JOB1 to use the 'next-seconds'
form.
* 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.