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>
This reverts commit a7db92d9b3, this time with
the more careful command, to avoid a world rebuild:
grep -rl --exclude-dir=build --exclude-dir=patches --exclude=ld-wrapper.in \
--exclude=sitecustomize.py --exclude=guix-emacs.el maxim.cournoyer@gmail.com |
xargs sed -i 's/maxim.cournoyer@gmail.com/maxim@guixotic.coop/g'
Change-Id: I0871f5cf9ace79e34e78e24154d0da6ea95a3a91
The change was automated via:
git grep -l maxim.cournoyer@gmail.com |
xargs sed -i 's/maxim.cournoyer@gmail.com/maxim@guixotic.coop/g'
* .mailmap: New entry.
Change-Id: Iaa88b1e51c94159c49138fb43910badb990eb169
* gnu/services/virtualization.scm (sanitize-hurd-vm-configuration-type): New procedure.
(hurd-vm-confiuration): Add type field.
(hurd-vm-disk-image): Use it.
* doc/guix.texi (hurd-vm-configuration): Document it.
* gnu/tests/virtualization.scm (%childhurd64-os): New variable.
(run-childhurd-test): Add the os a parameter.
(%test-childhurd): Adjust accordingly.
(%test-childhurd64): New system test.
Change-Id: Ie1c55a9414657ced4bf8b4324527037f1a1f78f4
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This patch replaces boilerplate in container related tests with
oci-image plumbing from (gnu services containers).
* gnu/tests/containers.scm (%oci-tarball): New variable;
(run-rootless-podman-test): use %oci-tarball;
(build-tarball&run-rootless-podman-test): drop procedure.
* gnu/tests/docker.scm (%docker-tarball): New variable;
(build-tarball&run-docker-test): use %docker-tarball;
(%docker-system-tarball): New variable;
(build-tarball&run-docker-system-test): new procedure.
Change-Id: Iad6f0704aee188d89464c83722dea0bb7adb084a
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
This patch implements a generalization of the
oci-container-service-type, which consequently is made deprecated. The
oci-service-type, in addition to all the features from the
oci-container-service-type, can now provision OCI networks and volumes.
It only handles OCI objects creation, the user is supposed to handle
state once the objects are provsioned.
It currently supports two different OCI runtimes: Docker and rootless
Podman. Both runtimes are tested to make sure provisioned containers
can connect to each other through provisioned networks and can
read/write data with provisioned volumes.
At last the Scheme API is thought to facilitate the implementation of a
Guix Home service in the future.
* gnu/build/oci-containers.scm: New file containg OCI runtime business
logic used in OCI backed Shepherd services.
oci-read-lines
(oci-system*,oci-object-exists?,oci-object-service-available?
oci-image-load,oci-log-verbose,oci-container-execlp,oci-object-create):
New procedures.
* gnu/local.mk: Add it.
* gnu/services/containers.scm (list-of-oci-containers?,
list-of-oci-networks?,list-of-oci-volumes?,%oci-supported-runtimes,
oci-runtime?,oci-runtime-system-environment,oci-runtime-system-extra-arguments,
oci-runtime-system-requirement,oci-runtime-cli,oci-runtime-system-cli,
oci-runtime-home-cli,oci-runtime-name,oci-runtime-group,
oci-container-shepherd-name,oci-networks-shepherd-name,
oci-networks-home-shepherd-name,oci-volumes-shepherd-name,
oci-volumes-home-shepherd-name,oci-container-configuration->options,
oci-network-configuration->options,oci-volume-configuration->options,
oci-container-shepherd-service,oci-objects-merge-lst,oci-extension-merge,
oci-service-accounts,oci-service-profile,oci-service-subids,
oci-configuration->shepherd-services,oci-configuration-extend): New
procedures.
(image-reference): Implement unambiguous naming convention, that paired
with the new implementation for listing caches images with docker ls or
podman ls, allows for more efficient image caching.
(oci-container-configuration)[user,group]: Change default-type to
maybe-string, since by default containers will run under the user and
group declared in oci-configuration records. When unset the
oci-service-type will derive their value from the OCI runtime state.
[runtime,host-environment,environment,shepherd-actions,ports,extra-arguments]:
define a predicate and use it as a type in the configuration. This
way errors are reported with source location information.
(lower-manifest): Defer to caller the logic of setting up an image tag.
(lower-oci-image): Rename to load-oci-image-state.
(oci-runtime-state): Intermediate representation of the OCI runtime
details. It is supposed to be an internal API.
(oci-state): Intermediate representation of the OCI provisioning state,
such as containers and networks. It is supposed to be an internal API.
(oci-container-invocation): Intermediate representation of the OCI
runtime run command to start a container. It is supposed to be an
internal API.
(%oci-image-loader): Rename to oci-image-loader and use
oci-runtime-state and (gnu build oci-containers).
(oci-container-shepherd-service): Use oci-state and oci-runtime-state,
add command-line action.
(oci-network-configuration,oci-volume-configuration,oci-configuration,
oci-extension): New record types.
(oci-service-type): New service-type.
* doc/guix.texi: Document it.
* gnu/tests/containers.scm: Test it.
* gnu/services/docker.scm: Deprecate the oci-container-service-type.
Change-Id: I656b3db85832e42d53072fcbfb91d1226f39ef38
Modified-by: Maxim Cournoyer <maxim@guixotic.coop>
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
* gnu/tests/docker.scm: Simplify %test-oci-container test case and add
explicit timeouts to tests outcomes.
Change-Id: I75868479dcce031f3edc98064b1ebcf975f598f5
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
Fixes <https://issues.guix.gnu.org/70826>.
When using ‘luks-device-mapping-with-options’, procedures such as
‘operating-system-boot-mapped-devices’ would fail to identify LUKS
mapped devices because they would check whether the mapped device type
is ‘eq?’ to ‘luks-device-mapping’.
This addresses that by ensuring mapped devices are always of the
‘luks-device-mapping’ type, even when different options are used.
* gnu/system/mapped-devices.scm (close-luks-device): Add #:rest.
(luks-device-mapping-with-options): Deprecate.
* gnu/tests/install.scm (%encrypted-home-os-key-file): Update
accordingly.
* doc/guix.texi (Mapped Devices): Document use of the ‘arguments’ field
of ‘luks-device-mapping’. Remove ‘luks-device-mapping-with-options’
documentation.
(Bootloader Configuration): Update example with key file in extra
initrd.
Change-Id: I5442908cb8ef4e3891dbb053cccf5e42b895486f
Reported-by: Tadhg McDonald-Jensen <tadhgmister@gmail.com>
* gnu/tests/foreign.scm (qcow-image-with-marionette): Remove the “10G”
argument to ‘qemu-img create’ since it could lead to corrupt
images—e.g., with the Arch Linux image.
Change-Id: I92d7551a16f325376c98d32e2cd6a01f8ed05e51
* gnu/tests/foreign.scm (qcow-image-with-marionette)[build]: Call
‘error’ when ‘mount’ exits with a non-zero code.
Change-Id: I7c608e0aa7dff1447c9df778951d7a5256e47255
This is a follow-up of: 4c017ccfe5. The
run-basic-test procedure is used for the gui installation tests, but the
etc-profile-d-service-type and etc-bashrc-d-service-type services that are now
needed are only defined in the test-basic-os procedure.
Build upon the introduction of the extra-tests argument to define the
etc-profile-d-service-type and etc-bashrc-d-service-type specific tests
directly in the test-basic-os procedure.
* gnu/tests/base.scm (run-basic-test): Move the etc-profile-d-service-type and
etc-bashrc-d-service-type dedicated tests to ...
(test-basic-os): ... that procedure, where the matching services are defined.
Change-Id: I050f5ab87e19889bc90cc1a375a3cc28ea9a43ab
Follow-up of: 4c017ccfe5.
The --init-file script will only be run in the context of an interactive
shell, which is not the case here. Use the `-i` argument instead to force an
interactive shell. That way, the test_bashrc_d.sh is now really executed.
* gnu/tests/base.scm (run-basic-test): Fix the etc-bashrc-d-service-type test.
Change-Id: I3d749f65f51ff103c76f4e3d60746ae963660329
This factorizes out the remaining bashrc bits from /etc/skel/.bashrc to a the
template used for both /etc/bashrc on Guix System and ~/.bashrc for
home-bash-service-type.
Rationale: The use of /etc/skel introduce state: the file is only copied
originally when the user account is created, and never (automatically)
refreshed again.
* gnu/system.scm (operating-system-etc-service):
<profile>: Guard against souring /etc/bashrc in non-interactive, SSH case.
<bashrc>: Use %default-bashrc, having migrated the remaining definitions to...
* gnu/system/shadow.scm (%default-bashrc): ... here. Factorize aliases to...
* gnu/services.scm (%default-bash-aliases): ... here.
(%default-bashrc-d-aliases): New variable.
(%default-etc-bashrc-d-files): Include it in the default configuration.
* gnu/services/base.scm (%base-services): Register etc-bashrc-d-service-type.
* gnu/home/services/shells.scm (add-bash-configuration): Do not set PS1, now
part of %default-bashrc.
(home-bash-configuration) [guix-defaults?]: Update doc.
[aliases]: Set %default-bash-aliases as the default value. Update doc.
* doc/guix.texi (Shells Home Services): Update documentation.
(Service Reference): Update example.
Change-Id: I340c614983a78fd20a9c4a9705e7fc542ae9b513
* gnu/services.scm (files->bashrc-d-directory) New procedure.
(etc-bashrc-d-service-type): New service type.
* doc/guix.texi (Service Reference): Document it.
* gnu/tests/base.scm (test-basic-os): Test it.
Change-Id: Ibbb0f684de7aee296adedbce5b1192786d661af2
* gnu/services.scm (make-files->etc-directory)
(files->profile-d-entries): New procedures.
(etc-profile-d-service-type): New service type.
* doc/guix.texi (Service Reference): Document it.
* gnu/tests/base.scm (run-basic-test): Test it.
Change-Id: I45dde43a1b9603c3384b933ebd1d6e45dba146b9