Commit graph

202 commits

Author SHA1 Message Date
Ludovic Courtès a55472955d
tests: nfs-server: Use marionette helper procedures.
* gnu/tests/nfs.scm (run-nfs-server-test)[test](wait-for-file): Remove.
("nscd is listening on its socket"): Use 'wait-for-unix-socket'.
2020-03-16 22:58:37 +01:00
Ludovic Courtès e8cec7cc12
tests: nfs: Ensure 'rpcinfo' can be found.
The test was failing since 8b9cad01e9.

* gnu/tests/nfs.scm (run-nfs-test)[test]("RPC service running"): Add
'setenv' call for PATH.
2020-03-16 14:05:52 +01:00
Ludovic Courtès a37e03d60e
tests: opensmtpd: Check /var/spool/mail instead of /var/mail.
The test had been failing since the upgrade to 6.6.3p1 in commit
2dbfd8eec4.

* gnu/services/mail.scm (opensmtpd-activation): Create /var/spool/mail.
* gnu/tests/mail.scm (run-opensmtpd-test): Check /var/spool/mail instead
of /var/mail.
2020-03-16 14:05:52 +01:00
Ludovic Courtès c215d9ec1c
tests: opensmtpd: Gracefully handle test failure.
Previously the 'wait' loop would run for ~1024 seconds, at which point
we'd reach the file descriptor limit due to the leak in 'queue-empty?'.

* gnu/tests/mail.scm (run-opensmtpd-test)[test]("mail arrived"): In
'queue-empty?', close PIPE to avoid file descriptor leak.  In 'wait'
loop, arrange to run at most 20 times.
2020-03-16 14:05:52 +01:00
Ludovic Courtès ef0f5ff2a7
tests: dhcpd: Adjust network interface name.
This is a followup to 8e53fe2b91.

* gnu/tests/networking.scm (dhcpd-v4-configuration)
(%dhcpd-os): Use "ens3" instead of "eth0".
2020-03-16 14:05:52 +01:00
Ludovic Courtès 4df02ab675
tests: rsync: Set PATH.
This is a followup to 8b9cad01e9, which
would leave PATH unset.

* gnu/tests/rsync.scm (run-rsync-test)[test]("service running"): Add
call to 'setenv' for PATH.
2020-03-16 14:05:52 +01:00
Ludovic Courtès 827abd5deb
tests: getmail: Provide a pre-initialized user account password.
* gnu/tests/mail.scm (%getmail-os): Rewrite so that the "alice" account
has a password.
(run-getmail-test)[test]("set password for alice"): Remove.  This would
not work since commit 8b9cad01e9 since
'passwd' would no longer be in $PATH.
2020-03-09 23:46:36 +01:00
Ludovic Courtès 0e42a1643e
tests: docker-system: Increase memory requirement.
The system image would no longer fit in memory, starting from commit
8c7eb58453.

* gnu/tests/docker.scm (run-docker-system-test): Set 'memory-size' to 3500.
2020-03-09 23:46:36 +01:00
Ludovic Courtès 7e5f016cdb
tests: zabbix: Set 'PATH' before running the scripts.
This is a followup to 8b9cad01e9.

* gnu/tests/monitoring.scm (run-zabbix-server-test)[test]: Set 'PATH' in
MARIONETTE.
2020-03-09 23:46:36 +01:00
Mathieu Othacehe e666a92344
tests: install: Add %test-gui-installed-os-encrypted.
* gnu/tests/install.scm (%test-gui-installed-os-encrypted): New variable,
(guided-installation-test): set a swap-device only if there is no encryption.
2020-03-05 23:40:24 +01:00
Ludovic Courtès ccb1a8c437
tests: install: Add "gui-installed-os".
* gnu/installer/tests.scm: New file.
* gnu/local.mk (INSTALLER_MODULES): Add it.
* gnu/tests/install.scm (run-install): Add #:gui-test.  Add (gnu
installer tests) to the marionette imported modules.  Honor GUI-TEST.
Check whether SCRIPT is true.
(%root-password, %syslog-conf): New variable.
(operating-system-with-console-syslog, gui-test-program)
(guided-installation-test): New procedures.
(%extra-packages, installation-os-for-gui-tests)
(%test-gui-installed-os): New variable.
2020-03-05 23:40:23 +01:00
Ludovic Courtès 91ba90c18b
tests: 'run-basic-test' can enter a root password.
* gnu/tests/base.scm (run-basic-test): Add #:root-password and honor it.
2020-03-05 23:40:22 +01:00
Marius Bakke 15a6805751
gnu: Add system test for CUPS.
* gnu/tests/cups.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Adjust accordingly.
2020-03-02 23:39:44 +01:00
Ludovic Courtès 43e282accc
tests: Factorize LUKS passphrase.
* gnu/tests/install.scm (%luks-passphrase): New variable.
(%encrypted-root-installation-script): Use it.
(enter-luks-passphrase): Use it.
2020-02-22 00:45:42 +01:00
Tobias Geerinckx-Rice e813444287
Update e-mail address for Jakob L. Kreuze.
As requested here:
<https://lists.gnu.org/archive/html/guix-devel/2020-02/msg00128.html>.

* .mailmap: Add an entry for Jakob.
* gnu/machine.scm, gnu/machine/digital-ocean.scm, gnu/machine/ssh.scm,
gnu/packages/admin.scm, gnu/packages/i2p.scm, gnu/packages/music.scm,
gnu/packages/web.scm, gnu/tests/reconfigure.scm, guix/scripts/deploy.scm,
guix/scripts/system/reconfigure.scm: Update their e-mail address.
2020-02-09 23:16:45 +01:00
Tobias Geerinckx-Rice c3f146e79a
gnu: Update opensmtpd configuration grammar.
This follows up on commit 0d48690908.

* gnu/services/mail.scm (%default-opensmtpd-config-file): Adapt to ‘new’
≥6.4 grammar.
* gnu/tests/mail.scm (%opensmtpd-os): Likewise.
2020-01-31 00:42:48 +01:00
Christopher Baines b3e28b5ef5
tests: mail: Remove %getmail-os from the bottom of the file.
This was left over when debugging the system test.

* gnu/tests/mail.scm: Remove %getmail-os from the bottom of the file.
2020-01-20 19:13:17 +00:00
Ludovic Courtès 3adf320e44
tests: install: "raid-root-os" test uses RAID-1 instead of RAID-0.
Fixes <https://bugs.gnu.org/38086>.
Thanks to Vagrant and Tobias!

* gnu/tests/install.scm (%raid-root-os)[initrd-modules]: Add "raid1"
instead of "raid0".
(%raid-root-installation-script): Make the partitions twice as big.
Invoke 'mdadm' with '--level=mirror' instead of '--level=stripe';
connect "yes" to its stdin.
(%test-raid-root-os): Set #:target-size to 2.8 GiB.
2020-01-19 23:11:37 +01:00
Ricardo Wurmus 907eeac2e7
services: nfs: Add nfs-service-type.
* gnu/services/nfs.scm (<nfs-configuration>): New record.
(nfs-configuration, nfs-configuration?, nfs-configuration-nfs-utils,
nfs-configuration-nfs-version, nfs-configuration-exports,
nfs-configuration-rpcmountd-port, nfs-configuration-rpcstatd-port,
nfs-configuration-rpcbind, nfs-configuration-idmap-domain,
nfs-configuration-nfsd-port, nfs-configuration-nfsd-threads,
nfs-configuration-pipefs-directory, nfs-configuration-debug,
nfs-shepherd-services): New procedures.
(nfs-service-type): New variable.
* doc/guix.texi (Network File System): Document it.
* gnu/tests/nfs.scm (%test-nfs-server): New variable.
(%base-os): Use default value of rpcbind-service-type.
2020-01-08 23:56:16 +01:00
Tobias Geerinckx-Rice 4f51fdba01
tests: install: Test a JFS root file system.
* gnu/tests/install.scm (%jfs-root-os, %jfs-root-installation-script)
(%test-jfs-root-os): New variables.
2020-01-03 13:54:13 +01:00
Maxim Cournoyer 1a034f043e
tests: install: Fix typo.
* gnu/tests/install.scm (run-install): Fix typo in docstring.
2019-11-18 13:22:15 +09:00
Ludovic Courtès f0034427f5
tests: Update references to the now-deprecated 'guile-json' variable.
* gnu/tests/docker.scm (build-tarball&run-docker-test): Refer to
'guile-json-3' instead of 'guile-json'.
* gnu/tests/singularity.scm (build-tarball&run-singularity-test):
Likewise.
2019-11-09 23:04:14 +01:00
Ludovic Courtès 198a7ac02f
tests: install: Increase root partition size.
1.2G had become slightly too small on x86_64.
This is a followup to 8dfb0c969e.

* gnu/tests/install.scm (%simple-installation-script)
(%extlinux-gpt-installation-script)
(%simple-installation-script-for-/dev/vda): Switch from 1.2G to 1.4G.
2019-11-06 12:12:51 +01:00
Christopher Baines dd2a83270b
services: Add the Guix Data Service.
* gnu/services/guix.scm: New file.
* gnu/tests/guix.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add both new files.
* doc/guix.texi (Guix Services): New section documenting the Guix Data
Service.
2019-09-25 08:35:33 +01:00
Ludovic Courtès 7979a287f8
pack: Create /tmp in Docker images.
Fixes <https://bugs.gnu.org/37161>.

* guix/scripts/pack.scm (docker-image)[build]: Add a 'directory' entry
for "/tmp" to DIRECTIVES.
* tests/pack.scm ("docker-image + localstatedir"): Test the presence of /tmp.
* gnu/tests/docker.scm (run-docker-test)["Load docker image and run
it"]: Test the presence and permission bits of "/tmp".
2019-08-27 12:20:44 +02:00
Jakob L. Kreuze ec12235ce2
reconfigure: Improve tests for system activation.
* gnu/tests/reconfigure.scm (run-switch-to-system-test): Assert that
'/run/current-system' points to the activated system, and that new user
accounts specified in the operating system declaration are created.
2019-08-07 15:27:09 -04:00
Jakob L. Kreuze d23a00b599
tests: Add reconfigure system test.
[[PGP Signed Part:No public key for F506FD169D8FD95A created at 2019-07-24T18:35:10+0200 using RSA]]
* gnu/tests/reconfigure.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-07-26 19:19:49 +02:00
Ludovic Courtès 8dfb0c969e
tests: encrypted-root-os: Increase root partition size.
1.2G had become slightly too small on x86_64.

* gnu/tests/install.scm (%encrypted-root-installation-script): Increase
root partition size to 1.3G.
2019-07-06 16:17:24 +02:00
Ludovic Courtès dea62932bc
pack: 'squashfs' backend records the profile's search paths.
* guix/scripts/pack.scm (singularity-environment-file): New procedure.
(squashfs-image): Use it, and create /.singularity/env/90-environment.sh.
* gnu/tests/singularity.scm (run-singularity-test)["singularity run,
with environment"]: New test, currently skipped.
* gnu/tests/singularity.scm (build-tarball&run-singularity-test): Add
GUILE-JSON to the profile.
2019-07-04 18:05:02 +02:00
Ludovic Courtès b9fcf0c82a
pack: 'docker' backend records the profile's search paths.
* guix/docker.scm (config): Add #:environment parameter and honor it.
(build-docker-image): Likewise, and pass it to 'config'.
* guix/scripts/pack.scm (docker-image): Import (guix profiles) and (guix
search-paths).  Call 'profile-search-paths' and pass #:environment to
'build-docker-image'.
* gnu/tests/docker.scm (run-docker-test)["Load docker image and run it"]:
Add example that expects (json) to be available.
* gnu/tests/docker.scm (build-tarball&run-docker-test): Replace
%BOOTSTRAP-GUILE by GUILE-2.2 and GUILE-JSON in the environment.
2019-07-04 18:05:02 +02:00
Ludovic Courtès f9d55c4925
tests: Import (guix build utils) in the marionette.
* gnu/tests/install.scm (%minimal-os)[marionette-configuration](imported-modules):
Add (guix build utils).
* gnu/tests/base.scm (run-basic-test)["skeletons in home directories"]:
Use (guix build utils) explicitly.
2019-06-24 17:50:08 +02:00
Tobias Geerinckx-Rice bf5929c530
tests: Fix opensmtpd test.
* gnu/tests/mail.scm (run-opensmtpd-test) <"mail arrived">: Invoke
smtpctl by its full file name.
2019-06-19 11:49:33 +02:00
Ludovic Courtès a0f352b30f
pack: Add '--entry-point'.
* guix/scripts/pack.scm (self-contained-tarball): Add #:entry-point and
warn when it's true.
(squashfs-image): Add #:entry-point and honor it.
(docker-image): Add #:entry-point and honor it.
(%options, show-help): Add '--entry-point'.
(guix-pack): Honor '--entry-point' and pass #:entry-point to BUILD-IMAGE.
* gnu/tests/docker.scm (run-docker-test): Test 'docker run' with the
default entry point.
(build-tarball&run-docker-test): Pass #:entry-point to 'docker-image'.
* doc/guix.texi (Invoking guix pack): Document it.
* gnu/tests/singularity.scm (run-singularity-test)["singularity run"]:
New test.
(build-tarball&run-singularity-test): Pass #:entry-point to
'squashfs-image'.
2019-06-07 09:57:19 +02:00
Ludovic Courtès 08814aec6a
services: Add Singularity.
* gnu/packages/linux.scm (singularity)[source](snippet): Change file
name of setuid helpers in libexec/cli/*.exec.
[arguments]: Remove "--disable-suid".
* gnu/services/docker.scm (%singularity-activation): New variable.
(singularity-setuid-programs): New procedure.
(singularity-service-type): New variable.
* gnu/tests/singularity.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi (Miscellaneous Services): Document it.
2019-06-07 09:57:19 +02:00
Christopher Baines 2177d9222f
services: Add patchwork.
* gnu/service/web.scm (<patchwork-database-configuration>
<patchwork-settings-module>, <patchwork-configuration>): New record types.
(patchwork-virtualhost): New procedure.
(patchwork-service-type): New variable.
* gnu/tests/web.scm (%test-patchwork): New variable.
* doc/guix.text (Web Services): Document it.
2019-05-31 20:22:23 +01:00
Christopher Baines f6b0e1f8ff
services: Add getmail.
Getmail is a mail retriever written in Python, this commit adds a service-type
to run getmail. I'm looking at this, as it's a convinient way of getting
mailing list messages in to Patchwork.

I initially tried putting this in the (gnu services mail) module, but due to
also trying to use the define-configuration pattern, it conflicted with the
dovecot service.

* gnu/services/getmail.scm: New file.
* gnu/local.mk: Add it.
* gnu/tests/mail.scm (%getmail-os, %test-getmail): New variables.
(run-getmail-test): New procedure.
2019-05-31 20:22:20 +01:00
Ludovic Courtès 247649d42e
vm: 'system-docker-image' provides an entry point.
This simplifies use of images created with 'guix system docker-image'.

* gnu/system/vm.scm (system-docker-image)[boot-program]: New variable.
[os]: Add it to the GC roots.
[build]: Pass #:entry-point to 'build-docker-image'.
* gnu/tests/docker.scm (run-docker-system-test): New procedure.
(%test-docker-system): New variable.
* doc/guix.texi (Invoking guix system): Remove GUIX_NEW_SYSTEM hack and
'--entrypoint' from the example.  Mention 'docker create', 'docker
start', and 'docker exec'.
2019-05-15 16:36:21 +02:00
Ludovic Courtès 9fcfe30d28
system: Add 'operating-system-with-gc-roots'.
* gnu/tests/install.scm (operating-system-with-gc-roots): Move to...
* gnu/system.scm (operating-system-with-gc-roots): ... here.  New
procedure.
2019-05-15 16:36:21 +02:00
Ludovic Courtès 33572a3662
tests: Skip unreliable "herd invalidate nscd" test.
* gnu/tests/base.scm (run-basic-test)["nscd invalidate action, wrong
table"]: Skip unconditionally.
2019-05-15 12:18:51 +02:00
Ludovic Courtès 8b310793d2
tests: 'getlogin' test creates its file atomically.
Previously we could end up reading an empty /root/login-id file.

* gnu/tests/base.scm (run-basic-test)["getlogin on tty1"]: Create
/root/login-id atomically.
2019-05-15 12:18:51 +02:00
Ludovic Courtès e6b1a2248f
services: Log-in services now require "pam_loginuid".
Fixes <https://bugs.gnu.org/35553>.
Reported by Bruno Haible <bruno@clisp.org>.

* gnu/services/base.scm (login-pam-service): Pass #:login-uid? #t to
'unix-pam-service'.
* gnu/services/ssh.scm (lsh-pam-services, openssh-pam-services):
Likewise.
* gnu/services/xorg.scm (slim-pam-service): Likewise.
(gdm-pam-service): Likewise for "gdm-autologin" and "gdm-password".
* gnu/tests/base.scm (run-basic-test)["getlogin on tty1"]: New test.
* gnu/tests/ssh.scm (run-ssh-test): Add #:test-getlogin? parameter.
["getlogin"]: New test.
(%test-dropbear): Pass #:test-getlogin? #f.
2019-05-09 12:11:36 +02:00
Ludovic Courtès 307ec7324b
tests: separate-store-os: Increase root partition size.
* gnu/tests/install.scm (%separate-store-installation-script): Increase
size of the root partition so that it's big enough to contain
downloaded nars and temporary files.  Add 'df -h /mnt/gnu'.
2019-04-14 17:42:08 +02:00
Marius Bakke e73ded3c71
services: Open vSwitch: Provide a default configuration.
* gnu/services/networking.scm (openvswitch-service-type): Provide
OPENVSWITCH-CONFIGURATION as a default value.
* gnu/tests/networking.scm (%openvswitch-os): Don't configure the service.
2019-03-31 21:26:15 +02:00
Ludovic Courtès cf848cc0a1
accounts: Add default value for the 'home-directory' field of <user-account>.
* gnu/system/accounts.scm (<user-account>)[home-directory]: Mark as
thunked and add a default value.
(default-home-directory): New procedure.
* doc/guix.texi (User Accounts): Remove 'home-directory' from example.
* gnu/system/examples/bare-bones.tmpl: Likewise.
* gnu/system/examples/beaglebone-black.tmpl: Likewise.
* gnu/system/examples/desktop.tmpl: Likewise.
* gnu/system/examples/docker-image.tmpl: Likewise.
* gnu/system/examples/lightweight-desktop.tmpl: Likewise.
* gnu/system/install.scm (installation-os): Likewise.
* gnu/tests.scm (%simple-os): Likewise.
* gnu/tests/install.scm (%minimal-os, %minimal-os-on-vda):
(%separate-home-os, %encrypted-root-os, %btrfs-root-os): Likewise.
* tests/accounts.scm ("allocate-passwd")
("allocate-passwd with previous state"): Likewise.
2019-03-25 23:37:06 +01:00
Ricardo Wurmus c16423f143
services: Add nslcd-service-type.
* gnu/services/authentication.scm (nslcd-service-type, nslcd-configuration,
%nslcd-accounts): New variables.
(uglify-field-name, value->string, serialize-field, serialize-list,
ssl-option?, tls-reqcert-option?, deref-option?,
comma-separated-list-of-strings?, serialize-ignore-users-option, log-option?,
serialize-log-option, valid-map?, scope-option?, serialize-scope-option,
map-entry?, list-of-map-entries?, filter-entry?, list-of-filter-entries?,
serialize-filter-entry, serialize-list-of-filter-entries, serialize-map-entry,
serialize-list-of-map-entries, nslcd-config-file, nslcd-etc-service,
nslcd-shepherd-service, pam-ldap-pam-services, pam-ldap-pam-service,
generate-nslcd-documentation): New procedures.
* gnu/tests/ldap.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi (LDAP Services): Document it.
2019-03-20 20:31:15 +01:00
Ludovic Courtès 59e8044588
Remove traces of "GuixSD".
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Remove
mentions of "GuixSD".
* gnu/bootloader/grub.scm (install-grub-efi): Likewise.
* gnu/build/vm.scm (make-iso9660-image): Change default #:volume-id to
"Guix_image".
(initialize-hard-disk): Search for the "Guix_image" label.
* gnu/ci.scm (system-test-jobs, tarball-jobs): Remove "GuixSD".
* gnu/installer/newt/welcome.scm (run-welcome-page): Likewise.
* gnu/packages/audio.scm (supercollider)[description]: Likewise.
* gnu/packages/curl.scm (curl): Likewise.
* gnu/packages/emacs.scm (emacs): Likewise.
* gnu/packages/gnome.scm (network-manager): Likewise.
* gnu/packages/julia.scm (julia): Likewise.
* gnu/packages/linux.scm (alsa-plugins): Likewise.
(powertop, wireless-regdb): Likewise.
* gnu/packages/package-management.scm (guix): Likewise.
* gnu/packages/polkit.scm (polkit): Likewise.
* gnu/packages/tex.scm (texlive-bin): Likewise.
* gnu/services/base.scm (file-systems->fstab): Likewise.
* gnu/services/cups.scm (%cups-activation): Likewise.
* gnu/services/mail.scm (%dovecot-activation): Likewise.
* gnu/services/messaging.scm (prosody-configuration)[log]: Likewise.
* gnu/system/examples/vm-image.tmpl (vm-image-motd): Likewise.
* gnu/system/install.scm (installation-os)[file-systems]: Change root
file system label to "Guix_image".
* gnu/system/mapped-devices.scm (check-device-initrd-modules):
Remove "GuixSD".
* gnu/system/vm.scm (system-docker-image): Likewise.
(system-disk-image)[root-label]: Change to "Guix_image".
* gnu/tests/install.scm (run-install): Remove "GuixSD".
* guix/modules.scm (guix-module-name?): Likewise.
* nix/libstore/optimise-store.cc: Likewise.
2019-03-13 23:12:43 +01:00
Ludovic Courtès d429878daf
activation: Shared system home directories are now 555 and root-owned.
Fixes <https://bugs.gnu.org/34788>.
Reported by Jack Hill <jackhill@jackhill.us>.

Regression introduced by the combination of
8bb76f3d44 and
0ae735bcc8ff7fdc89d67b492bdee9091ee19e86: /var/empty would be 700 and
owned by one of the system accounts (thus inaccessible to others), and
/var/run/dbus would be 700 as well, thereby preventing D-Bus clients
from connecting to the daemon.

* gnu/build/activation.scm (duplicates): New procedure.
(activate-users+groups)[system-accounts]: New variable.
Use it.  Make shared system account home directories #o555 and
root-owned.
* gnu/services/dbus.scm (dbus-activation): Make /var/run/dbus #o755.
* gnu/tests/base.scm (run-basic-test): Test the ownership and
permissions of /var/empty.
2019-03-08 23:21:59 +01:00
Ludovic Courtès ba926e3534
tests: Use non-deprecated (guix store) API.
This is a followup to f9e8a12379.

* gnu/tests/base.scm (run-basic-test)["/run/current-system is a GC
root"]: Use 'store-protocol-error?' instead of 'nix-protocol-error?'.
2019-03-04 15:22:58 +01:00
Ludovic Courtès 2d04076332
gnu: Remove duplicate record fields.
* gnu/packages/haskell.scm (ghc-case-insensitive): Remove duplicate
'inputs' field.
* gnu/packages/python-xyz.scm (python2-pysnptools): Remove duplicate
'native-inputs' field.
* gnu/tests/install.scm (%separate-home-os): Remove duplicate 'type'
field.
2019-01-22 23:04:05 +01:00
Danny Milosavljevic 69e47686c9
tests: docker: Use "package" instead of "dummy-package".
* gnu/tests/docker.scm (build-tarball&run-docker-test): Use "package" instead
of "dummy-package".
2019-01-18 22:24:14 +01:00