This patch adds a Guix Home service, which allows for configuring/deploying an
operating-system declaration with an associated home-environment.
* gnu/services/guix.scm: Add guix-home-service and guix-home-shepherd-service
* gnu/home/services/shepherd.scm: Don't attempt to launch user shepherd when
the system shepherd runs guix-home-<user>
* doc/guix.texi: Add documentation for guix-home-service
* gnu/tests/guix.scm: Add a test to verify guix-home-service-type is able to
activate a home environment
Change-Id: Ifbcc0878d934aa4abe34bb2123b5081fb432aa8e
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Create a basic suite of tests to verify the display manager starts.
* gnu/tests/sddm.scm: New file.
Change-Id: Ia84926e9aab42c6781430c22aae0f892387d1a29
Signed-off-by: Christopher Baines <mail@cbaines.net>
* guix/scripts/system/reconfigure.scm (switch-system-program): Set
‘GUIX_NEW_SYSTEM’ to GENERATION rather than OS, for consistency with
what ‘boot-system’ does.
* gnu/tests/reconfigure.scm (run-switch-to-system-test)
["script activated the new generation"]: Adjust accordingly.
Change-Id: I57b693606a41b8c952df32bbdc2b9120c6dbfd6a
The test was failing because the sasl module no longer accepts PLAIN auth on
insecure connections.
* gnu/tests/messaging.scm (%test-prosody): Configure test prosody to allow all
auth types on insecure connections.
Change-Id: I142f3b6ccbdde4bdde86ce0698fea7d5509fc200
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Fix build failure caused by lack of free disk space.
* gnu/tests/install.scm (%test-encrypted-root-not-boot-os): Increase the root
partition to 1600 MiB.
Change-Id: I9f8378c37743ae8e59a72228b9e8bdbad93b4473
The installation no longer fits into the 1.6G, leading to a warning while
running the test:
guix system: warning: at least 1526.8 MB needed but only 1408.4 MB available in /mnt
Followed by a failure:
93% [#################################################################### ]note: build failure may have been caused by lack of free disk space
builder for `/gnu/store/8wl8q8nc1za0vlyv21jpzwgml45njgk2-module-import-compiled.drv' failed with exit code 1
This commit increases the root partition to 2G, making the test pass again.
* gnu/tests/install.scm (%encrypted-root-installation-script): Increase the
root partition to 2G.
(%test-encrypted-home-os), (%test-encrypted-home-os-key-file): Increase the
target size to 3G to accommodate for the larger root partition.
Change-Id: I0f7092f7b7fc9992d3f895a1eaecf1f2065b7360
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
The installation no longer fits into the 1.6G, leading to a warning while
running the test:
guix system: warning: at least 1526.8 MB needed but only 1408.4 MB available in /mnt
Followed by a failure:
93% [#################################################################### ]note: build failure may have been caused by lack of free disk space
builder for `/gnu/store/8wl8q8nc1za0vlyv21jpzwgml45njgk2-module-import-compiled.drv' failed with exit code 1
This commit increases the root partition to 2G, making the test pass again.
* gnu/tests/install.scm (%encrypted-root-installation-script): Increase the
root partition to 2G.
Change-Id: I4cc5c78cfbd93ab2ae92ec77603ce6fee0289843
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
For testing that installation works, there is no need to spent 2000ms (the
default) iterating while generating the encryption key. This commit therefore
sets the iteration time to the lowest possible value, 1(ms).
* gnu/tests/install.scm (%encrypted-root-installation-script):
(%encrypted-home-installation-script):
(%encrypted-root-not-boot-installation-script): Pass -i 1 to luksFormat
invocation.
Change-Id: Iab79459b48bebe4d293b18290a236c6414fb27fc
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Based on encrypted-home-os, this test verifies unlocking via a key file.
* gnu/tests/install.scm (%encrypted-home-os-key-file),
(%encrypted-home-os-key-file-source): New variables.
(%test-encrypted-home-os-key-file): New exported variables.
(%encrypted-home-installation-script): Generate initrd with a key file for
unlocking the LUKS.
Change-Id: I04460155284bdef7e18da645f2b4b26bd8e86636
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
The openssh-service-type requires 'networking to be setup. So add a
static-networking-service-type that provides it.
* gnu/tests/security.scm
(run-fail2ban-extension-test)[simple-operating-system]: Add
static-networking-service-type service.
Change-Id: I8d736cbf3fcaa54f86fbd60c52b3595b647731e2
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* gnu/tests/telephony.scm (%jami-account-content-sexp): New variable. Compute
its value with `read` instead of using `include`.
* gnu/tests/data/jami-dummy-account.dat (%jami-account-content-sexp): Remove
variable. Make the file contain just the S-expression.
Change-Id: I8d37aaf7b739f5f39715bfb8a9b8c9536385fd09
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
* gnu/tests/telephony.scm (run-jami-test): Pass #:timeout to
‘wait-for-service’. Double number passed to ‘with-retries’.
Change-Id: Ib3c81a770c2d52b2eb40e4f28abc8e33f5c71fc8
“-cpu host” can sometimes, for unclear reasons, lead to this error from
QEMU 8.1.1:
qemu-system-x86_64: CPU model 'host' requires KVM or HVF
This commit fixes it.
Inspired by
<47b56e7c19>.
* gnu/tests/virtualization.scm (run-childhurd-test)[test]: Prefer
“-cpu max” over “-cpu host”.
Change-Id: I11a8a68bb0532fe1f3fd2c34b4a7a5fdb7bccb57
* gnu/services/base.scm (<network-link>): Add mac-address field. Set
type field to #f by default, so it won't be mandatory. network-link
without a type will be used for existing interfaces.
(assert-network-link-mac-address, mac-address?): Add sanitizer. Allow
valid mac-address or #f.
(assert-network-link-type): Add sanitizer. Allow symbol or #f.
* gnu/services/base.scm (network-set-up/linux,
network-tear-down/linux): Adapt to new structure.
* doc/guix.texi (Networking Setup): Document it.
* gnu/tests/networking.scm (run-static-networking-advanced-test): New
variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu/tests/virtualization.scm (%childhurd-os): Remove ‘services’ and
add ‘users’ to the GNU/Hurd ‘operating-system’ declaration.
(run-childhurd-test)[run-command-over-ssh]: Log in as “test” instead of
“root”.
This allows for zero-configuration offloading to a childhurd.
* gnu/services/virtualization.scm (operating-system-with-offloading-account):
New procedure.
(<hurd-vm-configuration>)[offloading?]: New field.
(hurd-vm-disk-image): Define ‘transform’ and use it.
(hurd-vm-activation): Generate SSH key for user ‘offloading’ and add
authorize it via /etc/childhurd/etc/ssh/authorized_keys.d.
(hurd-vm-configuration-offloading-ssh-key)
(hurd-vm-guix-extension): New procedures.
(hurd-vm-service-type): Add GUIX-SERVICE-TYPE extension.
* gnu/tests/virtualization.scm (run-childhurd-test)[import-module?]: New
procedure.
[os]: Add (gnu build install) and its closure to #:import-modules.
[test]: Add “copy-on-write store” and “offloading” tests.
* doc/guix.texi (Virtualization Services): Document it.
With offloading to a childhurd is enabled, allowing password-less root
login in the childhurd to anyone amounts to providing write access to
the host’s store to anyone. Thus, disable password-based root logins in
the childhurd.
* gnu/services/virtualization.scm (%hurd-vm-operating-system): Change
‘permit-root-login’ to 'prohibit-password.
* gnu/tests/virtualization.scm (%childhurd-os): Provide a custom ‘os’
field for ‘hurd-vm-configuration’.
* doc/guix.texi (Virtualization Services): Remove mention of
password-less root login.
This was added in 18e76f8905. Presumably,
the problem was that using compressed QCOW2 images makes the childhurd
slower, so it’s eventually marked as failing to start. By enabling KVM
inside the Guix System VM, we allow the childhurd to run on KVM, which
compensates the slowdown due to the use of a compressed image.
* gnu/tests/virtualization.scm (hurd-vm-disk-image-raw): Remove.
(%childhurd-os): Use default config for ‘hurd-vm-service-type’.
(run-childhurd-test)[test]: Pass “-cpu host” to the run-vm script.
Fixes a regression introduced in
a09c7da8f8.
* gnu/tests/virtualization.scm (run-childhurd-test)[test]: Import (ice-9
textual-ports) and (ice-9 match) in the marionette when needed.
This is intended to replace the functionality of the Guix Build Coordinator
queue builds script, and also provide a web interface for build farms.
* gnu/services/guix.scm (<bffe-configuration>): New record type.
(bffe-configuration, bffe-configuration?,
bffe-configuration-package,
bffe-configuration-user,
bffe-configuration-group,
bffe-configuration-arguments
bffe-configuration-extra-environment-variables): New procedures.
(bffe-service-type): New variable.
* gnu/tests/guix.scm (%test-bffe): New variable.
* doc/guix.texi (Guix Services): Document the new service.
* gnu/system/image.scm (mbr-disk-image, mbr-raw-image-type): New variables.
(qcow2-image-type): Inherit mbr-disk-image.
* guix/scripts/system.scm (%default-options): Use mbr-raw-image-type by
default.
* gnu/tests/install.scm (run-install): Use mbr-raw in the tests.
* doc/guix-cookbook.texi (Guix System Image API): Update the list of image
types.
* doc/guix.texi (Invoking guix system, System Images, image-type Reference):
Add mbr-raw and switch documented default to it.
Thanks to Bruno Victal "mirai" for cooperating on this patch and for
generously sharing a wealth of insights about Guix services.
Thanks to Jean-Baptiste Note for an early version of this service!
* doc/guix.texi (Linux Services)[Cachefilesd Service]: New heading.
* gnu/services/linux.scm (serialize-string, non-negative-integer?)
(serialize-non-negative-integer, string, non-negative-integer)
(make-option-serializer, make-percentage-threshold-serializer): New
procedures.
(cachefilesd-configuration): New record type.
(cachefilesd-service-type): New variable.
* gnu/tests/cachefilesd.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
Co-authored-by: Bruno Victal <mirai@makinata.eu>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This revised system test is superior to the one accepted when #61744 was
closed because it confirms whether the configured limits are actually being
enforced upon login.
The previous test merely validated the serialization of one particular config
in the config file.
* gnu/tests/pam.scm (pam-limits-service): Revise test to confirm limits on
login.
(%test-pam-limits)[description]: Update.
(%test-pam-limits-deprecated): Remove.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This is to avoid non-deterministic failures on slower machines.
* gnu/tests/lightdm.scm (run-lightdm-test) <wait-for-screen-text>: Bump
timeout to 60 s (from the default 30 s).
This failure is another collateral from commit a09c7da ("tests: Fork and exec
a new Guile for the marionette REPL."), which isolated the marionette
evaluation environment from that of the host.
* gnu/tests/vnc.scm (run-xvnc-test): Move the (guix build utils) import to...
["gdm auto-suspend is disabled"]: ... inside the marionette-eval of this
test. Complete comment.
Reported-by: Bruno Victal <mirai@makinata.eu>
* gnu/tests/vnc.scm (run-xvnc-test): Group up GDM test. Use GNU Ocrad.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
* gnu/packages/patches/lightdm-vnc-ipv6.patch: New patch file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/display-managers.scm (lightdm): Apply it.
* gnu/tests/lightdm.scm (run-lightdm-test): Remove comment and expected fail
directive for the "can connect to TCP port 5900 on IPv6" test.
Suggested-by: Bruno Victal <mirai@makinata.eu>
This fixes a regression introduced with commit a09c7da ("tests: Fork and exec
a new Guile for the marionette REPL.") and only partially fixed with the
follow-up commit f518882 (" tests: Add missing module imports for
marionette-evaluated code.").
* gnu/tests/telephony.scm (run-jami-test): Remove extraneous module imports.
Move the setting of the DBUS_SESSION_BUS_ADDRESS environment variable inside
the first marionette-eval'd setup test.
["service can be stopped"]: Add missing (gnu build dbus-service) module.
Previously we could find ourselves typing in too early.
* gnu/tests/desktop.scm (run-elogind-test)["login on tty1"]: Wait for
'elogind in to 'term-tty1.
["screendump"]: New test.
Those tests were racy: it could take a while for those files to appear
and for the shepherd service to be up. Thus, wait a little longer for
each of them.
* gnu/tests/networking.scm (run-dhcpd-test)["pid file exists"]
["lease file exists"]: Use 'wait-for-file'.
["dhcpd is alive"]: Use 'wait-for-service'.
This would break "make as-derivation" because /etc/services is
unavailable in the build environment:
[ 38/ 80] loading... 95.0% of 40 filesBacktrace:
In guix/build/compile.scm:
249:8 19 (compile-files "." "/gnu/store/s5nadqd6hkzivkxp33svwqslfn608ng5-guix-system-tests" ("gnu/tests/audio.scm" "gnu/tests/base.scm" "gnu/tests/ci.scm" "gnu/tests/cups.scm" "gnu/tests/d…" …) …)
[…]
In unknown file:
0 (getserv "discard" "tcp")
ERROR: In procedure getserv:
In procedure getserv: no such service discard
builder for `/gnu/store/…-guix-system-tests.drv' failed with exit code 1
* gnu/tests/vnstat.scm (run-vnstat-test): Hard-code 'guest-port' instead
of calling 'getservbyname'.
Checking for "br0" should only be done once the
'openvswitch-configuration' service is up because it's the one that sets
it up.
* gnu/tests/networking.scm (run-openvswitch-test)["openvswitch-configuration
is running"]: New test.
This missing imports became apparent with commit
a09c7da8f8, which runs the marionette
service in a fresh Guile process with fewer imports.
* gnu/tests/databases.scm (run-postgresql-test, run-timescaledb-test)
(run-mysql-test): Add missing module imports for code passed to
'marionette-eval'.
* gnu/tests/docker.scm (run-docker-test, run-docker-system-test): Likewise.
* gnu/tests/mail.scm (run-dovecot-test, run-getmail-test): Likewise.
* gnu/tests/monitoring.scm (run-zabbix-server-test): Likewise.
* gnu/tests/pam.scm (run-test-pam-limits): Likewise.
* gnu/tests/reconfigure.scm (run-switch-to-system-test)
(run-install-bootloader-test): Likewise.
* gnu/tests/security-token.scm (run-pcscd-test): Likewise.
* gnu/tests/install.scm (gui-test-program): Likewise.
* gnu/tests/telephony.scm (run-jami-test): Add modules to
the #:imported-modules argument of 'marionette-operating-system'.
[test]: Remove them from 'with-imported-modules'; remove
'with-extensions'. Add "d-bus tooling loaded" test to set up %load-path
and %load-compiled-path so the marionette process can find
guile-ac-d-bus and guile-packrat.
The previous code worked "by chance": 'start' from (shepherd service)
happened to be in scope because the marionette REPL is created by a mere
'primitive-fork', and 'start' happened to kinda work.
* gnu/tests/base.scm (run-basic-test): Use 'start-service' from (gnu
services herd), not 'start' from (shepherd service), which is not
supposed to work.
* gnu/tests/install.scm (run-install): Likewise.