* gnu/services/web.scm (sogogi-service-type): New services.
(sogogi-serialize-section, sogogi-serialize-field)
(sogogi-serialize-string, sogogi-serialize-list-of-strings)
(sogogi-serialize-sogogi-user, sogogi-serialize-sogogi-location)
(sogogi-serialize-list-of-sogogi-user): New procedures.
(sogogi-user, sogogi-location)
(sogogi-configuration): New record types.
(sogogi-account-service): New variable.
(sogogi-config-file, sogogi-shepherd-service): New procedures.
* gnu/tests/web.scm (%test-sogogi): Add tests for the service.
* doc/guix.texi (Web Services): Document it.
Change-Id: I5cc6dd84d6c7c8d5d13b685853b19c5d433ed7e5
* gnu/services/messaging.scm (%default-soju-shepherd-requirement): New
variable.
(soju-ssl-certificate): New configuration record.
(soju-database): New configuration record.
(soju-configuration): New configuration record.
(serialize-soju-configuration,soju-activation,soju-accounts,
soju-shepherd-services): New procedures.
(soju-service-type): New service.
(serialize-ngircd-configuration): Reformat.
(pounce-configuration): Reformat.
* doc/guix.texi: Document the new soju service.
* gnu/tests/messaging.scm: Test the new soju service.
Change-Id: I6223ecac1aaaab76bd75461851ffe4cec0678118
* gnu/services/virtualization.scm (%libvirt-activation): Activate
default libvirt network configuration file.
* gnu/tests/virtualization.scm (run-libvirt-test): Drop network
definition test and replace it with a test checking that the default
network is inactive by default.
Change-Id: I03b6314a390c6d93ebf886d7033867ff5cacad74
This patch is supposed to introduce a test case to ensure use cases like
the one of https://codeberg.org/guix/guix/issues/3818 are working.
* gnu/tests/containers.scm (%guile-oci-image): New variable.
(%guile-bash-oci-image): New variable.
(%oci-rootless-podman-os)[fist-container]: Use %guile-oci-image.
[second-container]: Use file-like object as oci-image value.
(%oci-docker-os): Ditto.
Change-Id: I0052243dba2d901d497e1c0976a5aa1ebe9864a0
Reviewed-by: Owen T. Heisler <writer@owenh.net>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
When a device with a UUID is missing, canonicalize-device-spec will throw an
error. This error is not handled for mount-may-fail? devices. That means
that if you use UUID device and it isn't available, the boot will hang on
the user-file-systems not being started. All user services depend on that
service.
Also added a test for this behavior.
* gnu/build/file-systems.scm
(mount-file-system): Guard canonicalize-device-spec call.
(canonicalize-device-spec): Throw &partition-lookup-error on missing
partition.
(&partition-lookup-error): New variable.
* gnu/tests/base.scm (%test-missing-file-system): New variable.
Change-Id: I3b8d652251cef421cff6d2fdafb8d9d7d1fc74b5
Reported-By: renbus, on IRC
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
* gnu/services/upnp.scm (%readymedia-default-pid-directory): New variable.
(%readymedia-pid-file): New procedure.
(readymedia-shepherd-service)[start]: Start with the pid file.
(readymedia-activation): Create the pid directory.
* gnu/tests/upnp.scm (run-readymedia-test): Test the pid directory and file.
Merges: https://codeberg.org/guix/guix/pulls/1007
Change-Id: I454a89d25afe0e9bb0414645b1e4594afdf89058
Signed-off-by: Giacomo Leidi <therewasa@fishinthecalculator.me>
* gnu/services/upnp.scm (%readymedia-default-log-directory): Remove variable.
(%readymedia-default-log-file): New procedure.
(%readymedia-default-cache-directory): Turn it into a procedure.
(<readymedia-configuration>)[log-directory]: Remove field.
[log-file]: New field.
[cache-directory]: Set to %readymedia-default-cache-directory.
(readymedia-configuration->config-file): Remove "user" and "log_dir" fields.
(readymedia-shepherd-service)[modules]: Add (shepherd support).
[start]: Do not map the log-directory. For home services, do not wrap the
program with least-authority-wrapper.
(readymedia-activation): Do not create the log-directory.
* gnu/home/services/upnp.scm (%readymedia-cache-file, %readymedia-cache-path,
%readymedia-log-path): Remove variables.
(run-readymedia-test): Use the procedures properly. Do not test the
log directory. Test the log file.
* doc/guix.texi (Miscellaneous Services)[DLNA/UPnP Services]: Update doc.
Change-Id: I97d84b5287c374ddb26a495f20a36f986b0c142d
Signed-off-by: Giacomo Leidi <therewasa@fishinthecalculator.me>
* gnu/services/web.scm (go-webdav-service-type): New service.
(go-webdav-account-service): New variable.
(go-webdav-shepherd-service): New procedures.
* gnu/tests/web.scm (%test-go-webdav): Add tests for the service.
* doc/guix.texi (Web Services): Document it.
Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
The default timezone is set to Europe/Zaghreb, however the new check
introduced in 0a9eb3f3e2 was checking for the
one in the operating-system definition, which is Europe/Paris.
* gnu/tests/install.scm (gui-test-program): Explicitely set timezone to
Europe/Paris.
Change-Id: I7b5d327f13760632c9fbc0c1223a6a9bbc624f4d
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Merges: #4977
* gnu/tests/mail.scm
(%radicale-os): New variable.
(run-radicale-test): New function with basic tests.
(%test-radicale): New variable.
Change-Id: I4a4e093ca7ac2a20a575bcf38b6ff763edf67652
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #5361
Before this, the test failed because Avahi CLI utilities
exit with a non-zero status in case of a cache miss
(instead of blocking?).
* gnu/tests/avahi.scm (run-nss-mdns-test): Move the Avahi CLI tests
after other name resolution tests.
Change-Id: I88ab03abf39cf24ee2ce763c719444ac65504cc2
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #4955
* gnu/services/opensnitch.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add reference to it.
* doc/guix.texi (Miscellaneous Services, Security): Document it.
* gnu/tests/security.scm (%test-opensnitch): New variable.
Change-Id: I63d1b6636b3aaecf399664ec97383d82ff1391d1
* gnu/tests/foreign.scm (qcow-image-with-marionette):
- Create .autorelabel file to make copied Guile work
on SELinux-enabled systems.
(resize-lvm-xfs-partition): New variable.
(run-foreign-install-test): Increase RAM for VM to 1024
as 512 is not sufficient to run Guix installation
on Fedora.
(fedora-qcow2): New variable.
(%test-fedora-install): New variable.
Change-Id: Ib247a174dfea8630d830763410391077516a8c16
Merges: #5007
This one is a bit more complicated than the other ones, because the qcow2
image is too small to hold the tarball contents. So I have decided to add in
logic to resize the qemu img, the partition and the filesystem.
* gnu/tests/foreign.scm
(ubuntu-qcow2): New variable.
(ubuntu-uidmap-deb-file): New variable.
(ubuntu-libsuid4-deb-file): New variable.
(%test-ubuntu-install): New variable.
Change-Id: Ib705cfe0aeab5e6ede284b8eff06483aea617349e
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Merges: #4997
Change-Id: I17472d160665fa4965d1c1ee00d671746bd5fb74
* gnu/tests/foreign.scm
(qcow-image-with-marionette): Add resize-image and
resize-proc to resize the image, the partition and the file system.
(resize-ext4-partition): New variable.
(run-foreign-install-test): Add resize-image and resize-proc; Pass them to
qcow-image-with-marionette.
Change-Id: I92dbe0cdcafb5ff0a0b6c3e9b96205b4ad9d10e8
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Partly fixes guix/guix#4269.
Fixes a bug whereby shepherd (PID 1) could retain memory mappings for
/var/run/nscd/dbXXX, which are created by glibc’s NSS from database file
descriptors sent by nscd. Those mappings could then prevent
‘root-file-system’ from re-mounting the root file system as read-write.
This change causes PID 1 to drop these mappings.
PID 1 typically calls libc database functions such as ‘getgr’ when dealing
with AF_UNIX endpoints for socket-activated services, to look up the socket’s
owner and group. This is where the bug would manifest.
The regression may have been introduced by
85ac164c41, which caused nscd to handle the
password and group databases.
* gnu/services/base.scm (nscd-shepherd-service): In ‘stop’ procedure, call
‘getpw’, ‘getgr’, and ‘getaddrinfo’.
* gnu/tests/base.scm (run-root-unmount-test) <"open libc NSS database">: New
test.
(%test-root-unmount): Add #:imported-modules.
Change-Id: I197cc8c82165c631f857415898137412ce9bd439
Reported-by: Rutherther <rutherther@ditigal.xyz>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #4828
Match the modern desktop expectation set by systemd [0] and relied on by some
software (GNOME/glib, icecat, ungoogle-chromium, etc.).
[0] https://www.man7.org/linux/man-pages/man5/localtime.5.html
* gnu/tests/base.scm
("/etc/localtime is a symlink to the timezone data file"): New test.
Change-Id: I8fb95abb6a3e455dd7019d5d798f7862d16b6263
Reviewed-by: Ludovic Courtès <ludo@gnu.org>
* gnu/packages/patchutils.scm (patchwork):[arguments]: Write version.txt,
tweak some indentation, patch the STATICFILES_DIRS entry.
[propagated-inputs]: Add python-tzdata.
* gnu/services/web.scm (patchwork-settings-module-compiler): Don't set
STATIC_ROOT on debug, as this clashes with STATICFILES_DIRS.
(patchwork-django-admin-gexp): Fix.
(patchwork-shepherd-services): Workaround issue referencing random-token.
* gnu/tests/web.scm (patchwork-initial-database-setup-service): Don't use
primitive-fork, as this doesn't work with newer shepherds.
(run-patchwork-test): Check the setup runs.
Change-Id: I7dfeb816b4f6c9070358d433fb7ca8faa1fbfd2a
The test has two issues:
- it uses /var/spool/mail instead of /var/mail
- the client often takes more than 30 seconds to connect to the smtpd server,
because the server tries to perform name resolution on 10.0.2.3
* gnu/tests/mail.scm (%qemu-static-networking-no-nameserver): New variable.
(%opensmtpd-os): Use it instead of the dhcpcd-service-type service.
(run-opensmtpd-test): Use /var/mail instead of /var/spool/mail.
Fixes: guix/guix#3978
Change-Id: I429edbf2460f380f8a617ee1fccd145f34a1f3d6
* gnu/tests/samba.scm (run-samba-test): De-duplicate the smbclient test and
introduce some retries.
Fixes: guix/guix#3981
Change-Id: Id9a68ddd98b31138564f19b85aca68357ad73351
As discussed here: https://github.com/fail2ban/fail2ban/issues/1593, the
monitored file has to be present before the fail2ban service starts. Create
this file in a dedicated activation service.
* gnu/tests/security.scm (%auth-log-activation-service): New variable.
(run-fail2ban-basic-test, run-fail2ban-simple-test)
(run-fail2ban-extension-test): Use it.
Fixes: guix/guix#3645
Change-Id: Ic12891cc5438abbd041ceb19e1d22dae51c7c848
When Shepherd starts the getmail service, the TESTBOX mailbox needs to be
present, otherwise getmail fails with:
Copyright (C) 1998-2023 Charles Cazabon and others. Licensed under GNU GPL version 2.
SimpleIMAPRetriever:alice@localhost:143:
mailbox b'TESTBOX' not selectable (TESTBOX) - verify the mailbox exists and you have sufficient permissions
0 messages (0 bytes) retrieved, 0 skipped from SimpleIMAPRetriever:alice@localhost:143
* gnu/tests/mail.scm (run-getmail-test): Move the TESTBOX creation from here ...
(%getmail-os): ... to the dovecot configuration.
Change-Id: Ic6348565629c69e8b7bccf7c61460ca96850e6bd
* gnu/installer/services.scm (%system-services): desktop-environment for sway
and its minimal companion packages.
* gnu/tests/install.scm (installation-target-desktop-os-for-gui-tests): Add
sway and its companion packages to operating-system packages.
Change-Id: I22f4cb67752ce1a15009680a1ba081fae129d45a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu/tests/samba.scm (run-samba-test)[smbclient connect, smbclient
connect]: Add a delay before checking the connection to the samba
server.
Change-Id: Iffe378756f05b8b1a63e861ed626c943aceb3fc2
* gnu/services/guix.scm (nar-herder-shepherd-services): Add missing variables.
* gnu/tests/guix.scm (%nar-herder-os): Have the control server listen on all
interfaces.
(run-nar-herder-test): Test connecting to the control server.
Change-Id: I40949e8adaf0c6491ee56c59d611395a639d497b
* gnu/tests/foreign.scm (run-foreign-install-test): Add #:deb-files.
[test]("install extra .deb packages"): New test.
(debian-uidmap-deb-file): New variable.
(%test-debian-install): Pass it via #:deb-files.
Change-Id: I489056131d6ff20763457c29610af71866a396b2
* guix/tests/foreign.scm (archlinux-qcow2): update URL and checksum.
(%test-archlinux-install): add comment on possible test failure.
Change-Id: Ib1d6040f416a0a1117f956bc15111a0240dfb86b
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
* guix/tests/foreign.scm (debian-12-qcow2): rename to debian-13-qcow2.
(debian-13-qcow2): new URL and checksum.
(%test-debian-install): use new variable.
(%test-debian-install): add comment on possible test failures.
Change-Id: I0eb241b5c88f73a822edb20815fe09f8c76a2b6b
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Allow passing extra options to the 'cryptsetup open' command.
* gnu/system/mapped-devices.scm (luks-device-mapping-with-options):
[#:extra-options]: New argument.
(open-luks-device): Use it.
(check-luks-device): Validate it.
* doc/guix.texi (Mapped Devices): Document it.
* gnu/tests/install.scm (%test-encrypted-root-extra-options-os): New
test for it, as well as the previously untested #:allow-discards?
option.
(%encrypted-root-extra-options-os): New os declaration for the test.
Change-Id: I265a431efb0c81ed7cfc984344c6b8a4cc2f1624
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This file contains two package definitions that should be on wm.scm.
They are not overly complex, not tightly couple and small, so there is
few to no reason keeping them in a dedicated file.
* gnu/packages/openbox.scm (obconf, openbox): Move from here ...
* gnu/packages/wm.scm: ... to here.
* gnu/packages/openbox.scm: Delete file.
* gnu/local.mk: Remove reference to openbox.scm.
* gnu/packages/kde-frameworks.scm: Fixup reference to (gnu packages openbox) module.
* gnu/packages/lxde.scm: Remove reference to (gnu packages openbox) module.
* gnu/packages/lxqt.scm: Fixup reference to (gnu packages openbox) module.
* gnu/tests/install.scm: Remove reference to (gnu packages openbox) module.
* po/packages/POTFILES.in: Remove reference to openbox.scm.
Change-Id: I0b887debb97e8fcc7880c9f05d29981226d06077
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>