Commit graph

228 commits

Author SHA1 Message Date
Jan (janneke) Nieuwenhuizen
7ca533c723
image: Make 'find-image' non-monadic.
* gnu/system/image.scm (find-image): Make non-monadic.  Add 'target'
parameter.
* gnu/tests/install.scm (run-install): Update caller,
passing (%current-target-system).
* guix/scripts/system.scm (perform-action): Likewise.
2020-06-13 15:03:55 +02:00
Mathieu Othacehe
e3f0155c41
image: Do not use VM to create disk-images.
Now that installing Grub on raw disk-images is supported, we do not need to
rely on (gnu system vm) module.

* gnu/system/image.scm (make-system-image): Rename to ...
(system-image): ... this, and remove the compatibility wrapper.
(find-image): Turn to a monadic procedure. This will become useful when
introducing Hurd support, to be able to detect the target system.
* gnu/ci.scm (qemu-jobs): Use lower-object now that system-image returns a
file-like object.
* gnu/tests/install.scm (run-install): Ditto.
* guix/scripts/system.scm (system-derivation-for-action): Add a 'base-image'
argument,
(perform-action): adapt accordingly.
2020-05-29 09:12:11 +02:00
Maxim Cournoyer
b460ba7992
bootloader: grub: Allow booting from a Btrfs subvolume.
* gnu/bootloader/grub.scm (strip-mount-point): Remove procedure.
(normalize-file): Add procedure.
(grub-configuration-file): New BTRFS-SUBVOLUME-FILE-NAME parameter.  When
defined, prepend its value to the kernel and initrd file names, using the
NORMALIZE-FILE procedure.  Adjust the call to EYE-CANDY to pass the
BTRFS-SUBVOLUME-FILE-NAME argument.  Normalize the KEYMAP file as well.
(eye-candy): Add a BTRFS-SUBVOLUME-FILE-NAME parameter, and use it, along with
the NORMALIZE-FILE procedure, to normalize the FONT-FILE and IMAGE nested
variables.  Adjust doc.
* gnu/bootloader/depthcharge.scm (depthcharge-configuration-file): Adapt.
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Likewise.
* gnu/system/file-systems.scm (btrfs-subvolume?)
(btrfs-store-subvolume-file-name): New procedures.
* gnu/system.scm (operating-system-bootcfg): Specify the Btrfs
subvolume file name the store resides on to the
`operating-system-bootcfg' procedure, using the new
BTRFS-SUBVOLUME-FILE-NAME argument.
* doc/guix.texi (File Systems): Add a Btrfs subsection to document the use of
subvolumes.
* gnu/tests/install.scm (%btrfs-root-on-subvolume-os)
(%btrfs-root-on-subvolume-os-source)
(%btrfs-root-on-subvolume-installation-script)
(%test-btrfs-root-on-subvolume-os): New variables.
2020-05-20 08:30:35 -04:00
Marius Bakke
87a40d7203
Merge branch 'master' into core-updates 2020-05-05 20:43:21 +02:00
Mathieu Othacehe
f19cf27c2b
image: Add a new API.
Raw disk-images and ISO9660 images are created in a Qemu virtual machine. This
is quite fragile, very slow, and almost unusable without KVM.

For all these reasons, add support for host image generation. This implies the
use new image generation mechanisms.

- Raw disk images: images of partitions are created using tools such as mke2fs
  and mkdosfs depending on the partition file-system type. The partition
  images are then assembled into a final image using genimage.

- ISO9660 images: the ISO root directory is populated within the store. GNU
  xorriso is then called on that directory, in the exact same way as this is
  done in (gnu build vm) module.

Those mechanisms are built upon the new (gnu image) module.

* gnu/image.scm: New file.
* gnu/system/image.scm: New file.
* gnu/build/image: New file.
* gnu/local.mk: Add them.
* gnu/system/vm.scm (system-disk-image): Rename to system-disk-image-in-vm.
* gnu/ci.scm (qemu-jobs): Adapt to new API.
* gnu/tests/install.scm (run-install): Ditto.
* guix/scripts/system.scm (system-derivation-for-action): Ditto.
2020-05-05 16:13:53 +02:00
Danny Milosavljevic
af7a8e718d
tests: install: Test a F2FS root file system.
* gnu/tests/install.scm (%f2fs-root-os, %f2fs-root-installation-script,
%test-f2fs-root-os): New variables.
2020-05-03 20:35:50 +02:00
Marius Bakke
8bf8cd9b85
Merge branch 'master' into core-updates
Conflicts:
	gnu/local.mk
	gnu/packages/backup.scm
	gnu/packages/emacs-xyz.scm
	gnu/packages/guile.scm
	gnu/packages/lisp.scm
	gnu/packages/openldap.scm
	gnu/packages/package-management.scm
	gnu/packages/web.scm
	gnu/packages/xorg.scm
2020-04-30 23:47:49 +02:00
Mathieu Othacehe
c537d2bcb7
tests: install: Fix device usage.
This is a follow-up of a860eddbbd. Guided
installation tests are now run from an ISO image. Hence the main block device
is vda and not vdb anymore.

* gnu/tests/install.scm (installation-target-os-for-gui-tests): Use
%minimal-os-on-vda instead of %minimal-os.
(%minimal-os-on-vda): Make sure that it replicates the config of %minimal-os.
2020-04-29 15:30:14 +02:00
Mathieu Othacehe
be3abf28af
tests: install: Fix gui-installed-os test.
This is a follow-up of a860eddbbd. If using an
ISO, the main disk is vda and not vdb anymore.

* gnu/tests/install.scm (installation-target-os-for-gui-tests): Use vda2 as
swap partition.
2020-04-29 10:12:55 +02:00
Mathieu Othacehe
ae1a0f7583
tests: install: Increase virtual machine RAM.
It seems that 'guix system init' is consuming more than the 800M of RAM
currently allocated. Until this is understood, bump the limit to 1.2G.

Reported here:
https://lists.gnu.org/archive/html/bug-guix/2020-04/msg00519.html

* gnu/tests/install.scm (run-install): Bump RAM to 1.2G.
2020-04-29 10:08:54 +02:00
Christopher Baines
53aa66c3df
reconfigure: Don't call build-derivations for upgrade-services test
This commit adjusts the upgrade-services system test to not build anything
when computing the derivation for the system test.  I came across this when
looking at issues computing the system test derivations to store in the Guix
Data Service.

* gnu/tests/reconfigure.scm (run-upgrade-services-test): Remove the use of,
and definition for ensure-service-file.
2020-04-26 19:41:56 +01:00
Marius Bakke
0e72d49ef7
tests: Add 'guile-final' to the installation test GC roots.
* gnu/tests/install.scm (run-install): Add GUILE-FINAL to
OPERATING-SYSTEM-WITH-GC-ROOTS.
2020-04-26 00:51:12 +02:00
Danny Milosavljevic
f91ad0b13d
system: Automatically adjust linux-module packages to use the
operating-system's kernel.

* gnu/system.scm (package-for-kernel): New procedure.
(operating-system-directory-base-entries): Use it.
* gnu/tests/linux-module.scm: Test it.
2020-04-22 22:59:39 +02:00
Ludovic Courtès
aa7b3c6c0e
tests: web: Explicitly wait for the HTTP port.
* gnu/tests/web.scm (run-webserver-test)["HTTP port ready"]: New test.
2020-04-21 16:33:21 +02:00
Ludovic Courtès
a295a1ca29
tests: ssh: Explicitly wait for port 22.
Previously we could occasionally try to connect before the server is
actually listening, both for OpenSSH and Dropbear.

* gnu/tests/ssh.scm (run-ssh-test)["wait for port 22"]: New test.
2020-04-21 16:33:21 +02:00
Marius Bakke
6720616daa
tests: openvswitch: Use the absolute file name of ovs-vsctl.
This fixes a regression introduced in 8b9cad01e9
where ovs-vsctl would no longer be available in PATH.

* gnu/tests/networking.scm (run-openvswitch-test): Qualify "ovs-vsctl"
invocation by ungexping the OPENVSWITCH variable instead of assuming it's
available on PATH.
2020-04-10 20:20:11 +02:00
Ludovic Courtès
a860eddbbd
tests: Run guided installation tests from an ISO image.
* gnu/tests/install.scm (guided-installation-test): Pass
 #:installation-disk-image-file-system-type to 'run-install'.
2020-04-10 16:02:52 +02:00
Ludovic Courtès
9cfd889f1d
tests: Mark VM images as non-substitutable.
* gnu/tests/install.scm (run-install): Pass #:substitutable? to
'system-disk-image' and to 'gexp->derivation'.
2020-04-08 12:42:41 +02:00
Ludovic Courtès
3302e03ba0
services: guix: Add 'set-http-proxy' action.
Fixes <https://bugs.gnu.org/25569>.
Reported by Divan Santana <divan@santanas.co.za>.

* gnu/services/base.scm (shepherd-set-http-proxy-action): New procedure.
(guix-shepherd-service): Add 'actions' field.  Change 'start' to a
lambda; check the value of the "http_proxy" environment variable and
add "http_proxy" and "https_proxy" to #:environment-variables as a
function of that.
* gnu/tests/base.scm (run-basic-test)["guix-daemon set-http-proxy
action", "guix-daemon set-http-proxy action, clear"]: New tests.
* doc/guix.texi (Base Services): Document it.
2020-04-07 12:31:36 +02:00
Ludovic Courtès
d7113bb655
services: syslog: Create log files as non-world-readable.
Partly fixes <https://bugs.gnu.org/40405>.
Reported by Diego Nicola Barbato <dnbarbato@posteo.de>.

* gnu/services/base.scm (syslog-service-type): Change 'start' method to
set umask to #o137 before spawning syslogd.
* gnu/tests/base.scm (run-basic-test)["/var/log/messages is not
world-readable"]: New test.
2020-04-06 23:56:24 +02:00
Brice Waegeneire
044d1478c9
gnu: Add kernel-module-loader-service.
* doc/guix.texi (Linux Services): Add a new subsection and document the
new service and its configuration.
* gnu/services/linux.scm (kernel-module-loader-service-type): New type.
(kernel-module-loader-shepherd-service): New procedure.
* gnu/tests/linux-modules.scm (module-loader-program): Procedure
removed.
(modules-loaded?-program): New procedure.
(run-loadable-kernel-modules-test): 'module-loader-program' procedure
replaced by the new one.
[os]: Use 'kernel-module-loader-service'.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-04-05 13:07:13 +02:00
Mathieu Othacehe
b03ebdbc7c
tests: install: Add %test-gui-installed-desktop-os-encrypted.
* gnu/tests/install.scm (gui-test-program): Add a desktop? argument, and pass it to choose-services,
(installation-target-os-for-gui-tests): new procedure,
(installation-target-desktop-os-for-gui-tests): new procedure,
(guided-installation-test): add target-os and desktop? arguments. Use
target-os instead of the previous os variable. Pass desktop? argument to
gui-test-program.
(%test-gui-installed-os): Adapt accordingly,
(%test-gui-installed-os-encrypted): ditto,
(%test-gui-installed-desktop-os-encrypted): new exported variable.
2020-03-26 11:53:50 +01:00
Ricardo Wurmus
eb019af8d8
tests/nfs: Fix use of WAIT-FOR-FILE.
* gnu/tests/nfs.scm ("nfs services are running"): Pass marionette to
WAIT-FOR-FILE.
2020-03-25 14:17:24 +01:00
Danny Milosavljevic
5c79f23863
system: Add kernel-loadable-modules to operating-system.
* gnu/system.scm (<operating-system>): Add kernel-loadable-modules.
(operating-system-directory-base-entries): Use it.
* doc/guix.texi (operating-system Reference): Document
KERNEL-LOADABLE-MODULES.
* gnu/build/linux-modules.scm (depmod): New procedure.
(make-linux-module-directory): New procedure.  Export it.
* guix/profiles.scm (linux-module-database): New procedure.  Export it.
* gnu/tests/linux-modules.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/linux.scm (make-linux-libre*)[arguments]<#:phases>[install]:
Disable depmod.  Remove "build" and "source" symlinks.
[native-inputs]: Remove kmod.
2020-03-22 12:51:50 +01:00
Mathieu Othacehe
1550db6fd4
tests: install: Abort when one installation step fails.
When marionette-eval calls fail in gui-test-program, the installation
continues which results in two scenarios:

- hang forever at the next marionette-eval call,

- keep going and start a broken installation, which is annoying because it
clears the terminal and hides the error.

Make sure that gui-test-program is exited with #f return code when one of the
marionette-eval calls fail.

* gnu/tests/install.scm (gui-test-program): Add a new macro
"marionette-eval*". Throw an exception when one on the marionette-eval calls
fail.
2020-03-22 10:53:55 +01:00
Ludovic Courtès
be0a672c30
tests: Accept manual installation scripts that exit with SIGTERM.
Fixes <https://bugs.gnu.org/39926>.
Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>.

Previously we'd error out if the installation script exits with
non-zero, which was the case because the 'reboot' program would
typically not get a reply, and thus would eventually be killed by PID 1
as the system is brought down.

* gnu/tests/install.scm (run-install)[install]: Expect SCRIPT to exit
with SIGTERM in addition to exiting with zero.
2020-03-19 23:17:32 +01:00
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