Commit graph

386 commits

Author SHA1 Message Date
Christopher Baines
eda4bb4f16
services: Add Laminar.
* gnu/services/ci.scm: New file.
* gnu/tests/ci.scm: New file.
* doc/guix.texi (Laminar): Document the Laminar service.
2021-04-09 11:59:58 +01:00
Pierre Langlois
81f65a3a2c
tests: libvirt: Catch issues with incorrect /var and /etc in package.
* gnu/tests/virtualization.scm (run-libvirt-test): Chdir to "/tmp" before
running test.  Add "connect" test.
2021-04-05 18:26:36 +01:00
Simon South
5d8c2c00d6
tests: Add Transmission Daemon system test.
* gnu/tests/file-sharing.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-03-28 22:31:00 +02:00
Mathieu Othacehe
eee69da3a5
tests: Remove Cuirass tests.
Those tests don't make sense anymore as the Cuirass 1.0 version has removed
the possibility to execute a custom registration procedure.

* gnu/tests/cuirass.scm: Remove it.
* gnu/local.mk (GNU_SYSTEM_MODULES): Ditto.
2021-03-23 16:47:47 +01:00
Léo Le Bouter
097cf21d1d
gnu: Remove MongoDB.
mongodb 3.4.10 has unpatched CVEs and mongodb 3.4.24 has some files in the
release tarball under the SSPL, therefore we cannot provide mongodb while
upholding to good security standards.

It turns out feff80cec3 was right since while
the main license file wasnt altered to SSPL, some files in the tree contain
SSPL headers.

* gnu/packages/databases.scm (go-gopkg.in-mgo.v2): Remove.
* gnu/packages/databases.scm (mongo-tools): Remove.
* doc/guix.texi (mongodb-service-type): Remove.
* gnu/tests/databases.scm (%test-mongodb, %mongodb-os, run-mongodb-test):
Remove.
* gnu/services/databases.scm (mongodb-configuration, mongodb-configuration?,
mongodb-configuration-mongodb, mongodb-configuration-config-file,
mongodb-configuration-data-directory, mongodb-service-type,
%default-mongodb-configuration-file, %mongodb-accounts, mongodb-activation,
mongodb-shepherd-service): Remove.
* gnu/packages/databases.scm (mongodb): Remove.
2021-03-16 11:05:24 +01:00
Mathieu Othacehe
207ef1a2b4
tests: cuirass: Remove cuirass simple test.
This is a follow-up of 6c883d0f1d.

* gnu/tests/cuirass.scm (simple-cuirass-service, %cuirass-simple-test): Remove
them.
2021-03-10 09:37:48 +01:00
Ludovic Courtès
2b0026813b
tests: docker-system: Increase VM memory.
* gnu/tests/docker.scm (run-docker-system-test)[vm]: Increase
'memory-size'.
2021-02-25 11:29:35 +01:00
Mathieu Othacehe
0de0074844
tests: cuirass: Restore "cuirass running".
This is a follow-up of ab054868af. The test was
failing because the Shepherd control socket wasn't ready yet. Restore it but
make sure that the control socket is available first.

* gnu/tests/cuirass.scm ("shepherd socket ready"): New test.
("cuirass running"): Restore it.
2021-02-23 11:54:53 +01:00
Mathieu Othacehe
ab054868af
tests: cuirass: Remove "cuirass running" test.
* gnu/tests/cuirass.scm ("cuirass running"): Remove it as it fails if all the
dependencies are not started yet.
2021-02-23 11:24:47 +01:00
Mathieu Othacehe
bebcf97600
services: cuirass: Improve simple-cuirass-services.
Instead of returning multiple services in simple-cuirass-services, rely on the
instantiate-missing-services procedure to instantiate postgresql and
postgresql-role-service-type when missing.

Turn simple-cuirass-services procedure into
simple-cuirass-configuration->specs, that takes a simple-cuirass-configuration
record and returns a Cuirass specification.

Suggested-by: Ludovic Courtès <ludo@gnu.org>

* gnu/services/cuirass.scm (%default-cuirass-config): Remove it.
(simple-cuirass-services): Rename it to ...
(simple-cuirass-configuration->specs): ... this procedure.
* gnu/tests/cuirass.scm (cuirass-services): Remove postgresql and
postgresql-role services that are automatically instantiated.
(simple-cuirass-service): New variable.
(%cuirass-simple-test): Adapt it to use simple-cuirass-configuration->specs
instead of simple-cuirass-services.
* doc/guix.texi (Simple Cuirass): Update it.
2021-02-23 09:45:09 +01:00
Mathieu Othacehe
e9bf511082
services: cuirass: Add "simple-cuirass-services".
* gnu/services/cuirass.scm (<build-manifest>,
<simple-cuirass-configuration>): New records.
(build-manifest, build-manifest?, simple-cuirass-configuration,
simple-cuirass-configuration?, simple-cuirass-services): New procedures.
(%default-cuirass-config): New variable.
* gnu/tests/cuirass.scm (%cuirass-simple-test): New variable.
* doc/guix.texi (Continuous Integration): Document it.
2021-02-19 20:10:09 +01:00
Mathieu Othacehe
25ad6e1d8e
tests: cuirass: Add an operating system argument.
Rewrite so that "run-cuirass-test" takes an operating-system argument. This is
functionally equivalent.

* gnu/tests/cuirass.scm (%derivation-file, git-service, cow-service,
%cuirass-specs): New variables.
(cuirass-services): New procedure.
(run-cuirass-test): Add an "operating-system" argument.
(%cuirass-test): Adapt it.
(%cuirass-remote-test): Ditto.
2021-02-19 20:10:08 +01:00
Leo Famulari
75b775e81b
Merge branch 'staging' 2021-02-01 14:18:38 -05:00
Mathieu Othacehe
d7db38341a
tests: cuirass: Increase delay.
* gnu/tests/cuirass.scm (run-cuirass-test): Increase "cuirass-web build
queued" test delay.
2021-01-29 11:48:47 +01:00
Mathieu Othacehe
df656c1518
tests: cuirass: Add Cuirass remote test.
* gnu/tests/cuirass.scm (run-cuirass-test): Add "name" and "remote-build?"
arguments.
(%cuirass-test): Adapt it.
(%cuirass-remote-test): New variable.
2021-01-29 11:36:06 +01:00
Mathieu Othacehe
f58d071366
tests: Add cuirass test. 2021-01-28 12:57:27 +01:00
Mathieu Othacehe
ec145a2ff9
services: postgresql: Add postgresql-role-service-type.
* gnu/services/databases.scm (postgresql-role,
postgresql-role?, postgresql-role-name,
postgresql-role-permissions, postgresql-role-create-database?,
postgresql-role-configuration, postgresql-role-configuration?,
postgresql-role-configuration-host, postgresql-role-configuration-roles,
postgresql-role-service-type): New procedures.
* gnu/tests/databases.scm: Test it.
* doc/guix.texi: Document it.
2021-01-28 12:57:27 +01:00
Mathieu Othacehe
fe4b882350
services: postgresql: Add log directory support.
* gnu/services/databases.scm (postgresql-configuration-log-directory): New
procedure.
(<postgresql-configuration>)[log-directory]: New field.
(postgresql-activation): Create the log directory.
(postgresql-shepherd-service): Honor it.
* gnu/tests/databases.scm (%postgresql-log-directory): New variable.
(log-file): New test case.
* doc/guix.texi (Database Services): Document it.
2021-01-28 12:57:26 +01:00
Mathieu Othacehe
6c0679215f
services: postgresql: Add socket directory support.
* gnu/services/databases.scm (postgresql-config-file-socket-directory): New
procedure.
(<postgresql-config-file>)[socket-directory]: New field.
(postgresql-config-file-compiler): Honor it.
(postgresql-activation): Create the socket directory if needed.
* doc/guix.texi (Database Services): Document it.
* gnu/tests/guix.scm (%guix-data-service-os): Adapt it.
* gnu/tests/monitoring.scm (%zabbix-os): Ditto.
* gnu/tests/web.scm (patchwork-os): Ditto.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2021-01-28 12:57:26 +01:00
Mathieu Othacehe
a38d0b0137
services: postgresql: Use Guile datatypes.
* gnu/services/databases.scm (postgresql-config-file-compiler): Support Guile
datatypes in the "extra-config" field.
* gnu/tests/databases.scm (%postgresql-os): Test it.
* doc/guix.texi (Database Services): Document it.
2021-01-28 12:57:26 +01:00
Maxim Cournoyer
886302fcf7
system: tests: Add a Btrfs RAID system test.
* gnu/tests/install.scm (%btrfs-raid-root-os)
(%btrfs-raid-root-os-source, %btrfs-raid-root-installation-script)
(%test-btrfs-raid-root-os): New variables.
2021-01-27 11:38:44 -05:00
Leo Famulari
68dd78e2e4
Merge branch 'master' into staging 2021-01-25 15:40:55 -05:00
Mathieu Othacehe
c64adff4c6
tests: install: Fix build.
This is a follow-up of: 2f497d94e7.

* gnu/tests/install.scm (run-install): Rename 'raw to 'efi-raw.
2021-01-20 12:50:47 +01:00
Leo Famulari
48d8d92c51
tests: monitoring: Use the latest postgresql for testing Zabbix.
This avoids a package collision while building the operating-system profile.

* gnu/tests/monitoring.scm (%zabbix-os): Use POSTGRESQL instead of
POSTGRESQL-10.
2021-01-04 18:07:53 -05:00
Miguel Ángel Arruga Vivas
f00e68ace0
system: Allow separated /boot and encrypted root.
* gnu/bootloader/grub.scm (grub-configuration-file): New parameter
store-crypto-devices.
[crypto-devices]: New helper function.
[builder]: Use crypto-devices.
* gnu/machine/ssh.scm (roll-back-managed-host): Use
boot-parameters-store-crypto-devices to provide its contents to the
bootloader configuration generation process.
* gnu/tests/install.scm (%encrypted-root-not-boot-os,
%encrypted-root-not-boot-os): New os declaration.
(%encrypted-root-not-boot-installation-script): New script, whose contents
were initially taken from %encrypted-root-installation-script.
(%test-encrypted-root-not-boot-os): New test.
* gnu/system.scm (define-module): Export
operating-system-bootoader-crypto-devices and
boot-parameters-store-crypto-devices.
(<boot-parameters>): Add field store-crypto-devices.
(read-boot-parameters): Parse store-crypto-devices field.
[uuid-sexp->uuid]: New helper function extracted from
device-sexp->device.
(operating-system-bootloader-crypto-devices): New function.
(operating-system-bootcfg): Use
operating-system-bootloader-crypto-devices to provide its contents to
the bootloader configuration generation process.
(operating-system-boot-parameters): Add store-crypto-devices to the
generated boot-parameters.
(operating-system-boot-parameters-file): Likewise to the file with
the serialized structure.
* guix/scripts/system.scm (reinstall-bootloader): Use
boot-parameters-store-crypto-devices to provide its contents to the
bootloader configuration generation process.
* tests/boot-parameters.scm (%default-store-crypto-devices): New
variable.
(%grub-boot-parameters, test-read-boot-parameters): Use
%default-store-crypto-devices.
(tests store-crypto-devices): New tests.
2020-12-21 18:41:11 +01:00
Marius Bakke
97c4fd21bd
services: MySQL: Add more tests.
* gnu/tests/databases.scm (run-mysql-test): Try creating a database and
inserting data.
2020-11-28 19:51:40 +01:00
Marius Bakke
e20388ad7f
services: MySQL: Upgrade database schemas automatically.
* gnu/services/databases.scm (<mysql-configuration>): Add AUTO-UPGRADE? field.
(mysql-upgrade-wrapper, mysql-upgrade-shepherd-service,
mysql-shepherd-services): New variables.
(mysql-service-type): Use MYSQL-SHEPHERD-SERVICES instead of
MYSQL-SHEPHERD-SERVICE.
* doc/guix.texi (Database Services): Document the AUTO-UPGRADE? field of
MYSQL-SERVICE-TYPE.
* gnu/tests/databases.scm (run-mysql-test): Test that mysql_upgrade has run.
2020-11-28 19:51:40 +01:00
Marius Bakke
89b704a456
services: MySQL: Deprecate 'mysql-service'.
* gnu/services/databases.scm (mysql-service): Define in terms of DEFINE-DEPRECATED.
* gnu/tests/databases.scm (%mysql-os): Adjust accordingly.
* doc/guix.texi (Database Services): Adjust the MariaDB/MySQL section to
document MYSQL-SERVICE-TYPE instead of MYSQL-SERVICE.  While at it, document
the EXTRA-CONTENT field.
2020-11-28 19:51:40 +01:00
Mikhail Tsykalov
a9a2fdaabc
mapped-devices: Add 'lvm-device-mapping'.
* gnu/system/mapped-devices.scm (lvm-device-mapping, open-lvm-device,
close-lvm-device): New variables.

* gnu/tests/install.scm (%lvm-separate-home-os,
%lvm-separate-home-os-source, %lvm-separate-home-installation-script,
%test-lvm-separate-home-os): New variables.

* gnu/system/linux-initrd.scm (raw-initrd): Add (srfi srfi-1) to initrd expression.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-11-26 00:05:39 +01:00
Ludovic Courtès
7286c9b187
tests: nfs-root-fs: Use the right store file name.
* gnu/tests/nfs.scm (run-nfs-root-fs-test): Pass "nfs-root-fs-test" as
the first argument to 'gexp->derivation'.
2020-11-07 12:48:24 +01:00
Ludovic Courtès
de6b649f80
tests: git-http: Avoid race condition.
* gnu/tests/version-control.scm (run-git-http-test)[test]("fcgiwrap
listens"): New test.
2020-11-07 12:07:41 +01:00
Ludovic Courtès
9909eddbc5
tests: mpd: Remove race condition; use default MPD configuration.
* gnu/tests/audio.scm (%mpd-os): Use the default 'mpd-configuration'.
(run-mpd-test)[test]("mpd listening"): New test.
("mpc connect"): Use 'system*' and 'test-equal'.
2020-11-06 23:14:14 +01:00
Ludovic Courtès
3c69e81d85
tests: docker-system: Increase VM memory.
The test was failing with ENOSPC.

* gnu/tests/docker.scm (run-docker-system-test)[vm]: Increase 'memory-size'.
(%test-docker-system): Change 'locale-libcs' for the OS passed to
'system-docker-image'.
2020-11-06 16:16:02 +01:00
Ludovic Courtès
a4e7749e91
services: Remove imports of (ice-9 …) modules.
* gnu/services/monitoring.scm (zabbix-server-activation): Remove (ice-9
rdelim) from the imported modules.
(zabbix-agent-activation): Likewise.
* gnu/tests/mail.scm (run-exim-test)[test]: Remove (ice-9 ftw) from the
imported modules.
2020-11-05 16:13:50 +01:00
Mathieu Othacehe
a38d861e57
system: reconfigure: Use the disk-installer if provided.
Fixes: <https://issues.guix.gnu.org/44101>.

* gnu/build/bootloader.scm (write-file-on-device): Pass 'no-fail flag instead
of 'no-create. Use a latin-1 transcoder.
* guix/scripts/system/reconfigure.scm (install-bootloader-program): Add a
"disk-installer" argument and use it as a fallback.
(install-bootloader): Adapt accordingly.
* gnu/tests/reconfigure.scm (run-install-bootloader-test): Ditto.
2020-11-03 07:59:59 +01:00
Ludovic Courtès
1c6d985331
installer: Use UUIDs in the 'swap-devices' field.
Note: This change requires an updated 'guix' package that contains
Linux-swap support in (gnu build file-systems).

* gnu/installer/parted.scm (user-partitions->configuration): Use UUIDs
in the 'swap-devices' field.
* gnu/installer/newt/final.scm (run-final-page)[wait-for-clients]: New
procedure.   Use it.
* gnu/installer/tests.scm (choose-partitioning): Wait for
'starting-final-step' message and move configuration file dialog
handling to...
(conclude-installation): ... here.  Send over PORT the reply
corresponding to 'starting-final-step'.
* gnu/tests/install.scm (gui-test-program): When ENCRYPTED? is false,
invoke 'swaplabel' in the marionette.
(installation-target-os-for-gui-tests): When ENCRYPTED? is false, except
a fixed UUID.
2020-10-30 01:14:21 +01:00
Mathieu Othacehe
572c59a7a1
tests: Fix nss-mdns test.
* gnu/tests/base.scm (run-nss-mdns-test): Use full "avahi-browse" path.
2020-10-26 16:33:39 +01:00
Christopher Baines
bdcf4d88d5
services: databases: Don't specify a default postgresql version.
Currently, if the postgresql package major version changes, this is going to
break the service upon upgrade, because PostgreSQL will reject the data files
from the differing major version of the service.

Because it's important to either keep running a particular major version, or
intentionally upgrade, I think the configuration would be better with no
default. I think this is also going to be helpful when trying to assist users
upgrading PostgreSQL.

* gnu/services/databases.scm (<postgresql-configuration>): Remove default for
postgresql.
(postgresql-service-type): Remove the default value.
* gnu/tests/databases.scm (%postgresql-os): Update accordingly.
* gnu/tests/guix.scm (%guix-data-service-os): Update accordingly.
* gnu/tests/monitoring.scm (%zabbix-os): Update accordingly.
* gnu/tests/web.scm (patchwork-os): Update accordingly.
* doc/guix.texi (PostgreSQL): Update accordingly.
2020-10-20 22:39:43 +01:00
Christopher Baines
dd2e6e31ed
tests: monitoring: Use (service postgresql-service-type).
As I'm looking at removing the procedure, in favour of always using the
service type.

* gnu/tests/monitoring.scm (%zabbix-os): Use (service postgresql-service-type)
rather than (postgresql-service).
2020-10-20 22:39:42 +01:00
Jan (janneke) Nieuwenhuizen
1197b8b20f
installer: Add Emacs EXWM desktop environment.
Suggested by zenny via IRC.

* gnu/installer/services.scm (%system-services): Add emacs, emacs-exwm,
emacs-desktop-environment.
* etc/release-manifest.scm (%system-packages): Likewise.
* gnu/system/examples/lightweight-desktop.tmpl: Likewise.
* gnu/tests/install.scm (installation-target-desktop-os-for-gui-tests)
[packages]: Likewise
* gnu/installer/newt/services.scm (run-desktop-environments-cbt-page): Make
one entry taller.
2020-10-13 21:17:40 +02:00
Christopher Baines
15955e9b54
services: guix: Add guix-build-coordinator-service-type.
* gnu/services/guix.scm (<guix-build-coordinator-configuration>): New record
type.
(guix-build-coordinator-configuration, guix-build-coordinator-configuration?,
guix-build-coordinator-configuration-package,
guix-build-coordinator-configuration-user,
guix-build-coordinator-configuration-group,
guix-build-coordinator-configuration-datastore-uri-string,
guix-build-coordinator-configuration-agent-communication-uri-string,
guix-build-coordinator-configuration-client-communication-uri-string,
guix-build-coordinator-configuration-allocation-strategy,
guix-build-coordinator-configuration-hooks,
guix-build-coordinator-configuration-guile,
make-guix-build-coordinator-start-script,
guix-build-coordinator-shepherd-services, guix-build-coordinator-activation,
guix-build-coordinator-account): New procedures.
(guix-build-coordinator-service-type): New variable.
* gnu/tests/guix.scm (%test-guix-build-coordinator): New variable.
* doc/guix.texi (Guix Services): Document it.
2020-10-05 18:10:48 +01:00
Jan (janneke) Nieuwenhuizen
18e76f8905
services: hurd-vm: Resurrect system-test by using raw disk-image.
Using the new compressed-qcow2 image breaks this test.

* gnu/tests/virtualization.scm (hurd-vm-disk-image-raw): New procedure.
(%childhurd-os): Use it.
2020-10-01 15:47:29 +02:00
Mathieu Othacehe
10b135cef5
system: image: Add image-type support.
* gnu/system/image.scm (image-with-os): New macro. Rename the old
"image-with-os" procedure to ...
(image-with-os*): ... this new procedure,
(system-image): adapt according,
(raw-image-type, iso-image-type, uncompressed-iso-image-type
%image-types): new variables,
(lookup-image-type-by-name): new procedure.
(find-image): remove it.
* gnu/system/images/hurd.scm (hurd-image-type): New variable,
use it to define ...
(hurd-disk-image): ... this variable, using "os->image" procedure.
* gnu/tests/install.scm (run-install): Rename
installation-disk-image-file-system-type parameter to installation-image-type,
use os->config instead of find-image to compute the image passed to system-image,
(%test-iso-image-installer) adapt accordingly,
(guided-installation-test): ditto.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2020-09-30 10:47:59 +02:00
Ludovic Courtès
c11c19bd4d
services: hurd-vm: Add system test.
* gnu/tests/virtualization.scm (%childhurd-os): New variable.
(run-childhurd-test): New procedure.
(%test-childhurd): New variable.
2020-09-29 21:56:28 +02:00
Danny Milosavljevic
c41a8572ef
tests: nfs: Improve "nfs-root-fs".
Follow-up to a1a39ed5a4.

* gnu/tests/nfs.scm (run-nfs-root-fs-test): Improve tests.
(%test-nfs-root-fs)[description]: Modify.
2020-09-10 18:57:46 +02:00
Mathieu Othacehe
6e71514a29
tests: install: Fix gui-installed-desktop-os-encrypted test.
* gnu/tests/base.scm (run-basic-test): Add a 'desktop?' argument. Wait 30
seconds before trying to switch to TTY1 on desktop.
* gnu/tests/install.scm (guided-installation-test): Use 512MiB of RAM and pass
the desktop argument to "run-basic-test".
2020-09-10 14:59:53 +02:00
Danny Milosavljevic
c4fe53bd11
tests: nfs: Improve "nfs-root-fs".
Follow-up to a1a39ed5a4.

* gnu/tests/nfs.scm (run-nfs-root-fs-test): Improve tests.
2020-09-07 18:58:39 +02:00
Stefan
a1a39ed5a4
tests: Add "nfs-root-fs" system test.
* gnu/tests/nfs.scm (run-nfs-root-fs-test): New procedure.
(%test-nfs-root-fs): New variable.  Export it.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-09-07 15:32:29 +02:00
Oleg Pykhalov
4656180d5d
services: nix: Fix sandbox.
* gnu/tests/package-management.scm: New file.
* gnu/local.mk: Add this.
* gnu/services/nix.scm (<nix-configuration>): New record.
(nix-activation): Generate Nix config file which fixes sandbox.
(nix-service-type): Add default value.
(nix-shepherd-service): Allow provide Nix package.
* doc/guix.texi (Miscellaneous Services)[Nix service]<nix-configuration>:
Document record.
2020-07-22 22:10:11 +03:00
Marius Bakke
41daf12865
services: ganeti: Use TLS on the remote API by default.
* gnu/services/ganeti.scm (<ganeti-rapi-configuration>): Set SSL? to #t.
* gnu/tests/ganeti.scm (%ganeti-os): Set SSL? to #f.
* doc/guix.texi (Virtualization Services): Adjust accordingly.
2020-07-19 14:23:16 +02:00
Jakub Kądziołka
c9ea5dfdbe
tests: docker-system: Use guile-3.0.
This helps find the (json) module in the virtual machine.

* gnu/tests/docker.scm (build-tarball&run-docker-test,
run-docker-system-test): Replace guile-2.2 with guile-3.0.
2020-07-17 22:13:58 +02:00
Marius Bakke
9a62282755
services: Add ganeti.
* gnu/services/ganeti.scm, gnu/tests/ganeti.scm: New files.
* doc/guix.texi (Virtualization Services): Document the Ganeti services.
2020-07-16 21:51:44 +02:00
Oleg Pykhalov
37fea3c30a
tests: zabbix: Fix typo in comment.
* gnu/tests/monitoring.scm (run-zabbix-server-test)[test]: Fix typo in
comment.
2020-07-15 22:15:50 +03:00
Julien Lepiller
5cd9cd644c
gnu: tests: Fix unbound variable.
Record type descriptors were made private in
a143e92446, but a usage of them was
forgotten in the tests files.

* gnu/tests/web.scm (patchwork-initial-database-setup-service): Use
accessors to access field values instead of unexported type descriptor.
2020-07-13 04:23:43 +02:00
Marius Bakke
54461153da
tests: networking: Use 'net.ifnames=0' for the Open vSwitch test.
* gnu/tests/networking.scm (%openvswitch-os): Override KERNEL-ARGUMENTS.
2020-07-11 23:36:32 +02:00
Mathieu Othacehe
5e766fe5a2
tests: install: Increase image size limit.
Commits 0eed771275 and
614a1e3fa2 caused a ~150M increase of the image
size. Increase the image size limit by 200M until the situation is addressed.

* gnu/tests/install.scm (%simple-installation-script,
%extlinux-gpt-installation-script, %simple-installation-script-for-/dev/vda,
%raid-root-installation-script, %encrypted-root-installation-script): Increase
image size limit by 200M.
2020-06-30 14:44:01 +02:00
Mathieu Othacehe
544fd8e3b5
tests: install: Disable image compression.
* gnu/tests/install.scm (run-install): Disable image compression to speed-up
the tests.
2020-06-26 15:00:08 +02:00
Mathieu Othacehe
1da6914589
tests: install: Fix marionette race condition.
If the marionette shuts down before the script return is received, then status
will be <eof>.

* gnu/tests/install.scm (run-install): Allow status to be the <eof> object.
2020-06-26 14:49:32 +02:00
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
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
0ae735bcc8: /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
Mathieu Othacehe
4f83afd28a
tests: Rename %test-encrypted-os to %test-encrypted-root-os.
* gnu/tests/install.scm (%test-encrypted-os): Rename to
%test-encrypted-root-os for consistency with its system-test name.
2019-01-17 14:04:21 +01:00
Ludovic Courtès
2e04ab7147
services: avahi: Deprecate the 'avahi-service' procedure.
* gnu/services/avahi.scm (<avahi-configuration>): Export getters.  Add
default values.
(avahi-service-type)[default-value]: New field.
(avahi-service): Mark as deprecated.
* gnu/services/desktop.scm (%desktop-services): Use the 'service' form
instead of calling 'avahi-service'.
* gnu/tests/base.scm (%avahi-os): Likewise.
* doc/guix.texi (Base Services): Adjust example accordingly.
(Networking Services): Update accordingly.
2019-01-16 14:07:37 +01:00
Danny Milosavljevic
49ec5d88c5
tests: docker: Run a guest guile inside the docker container.
* gnu/tests/docker.scm (run-docker-test): Add parameters.  Load and run
docker container.  Check response of guest guile.
(build-tarball&run-docker-test): New procedure.
(%test-docker): Use it.
[description]: Modify.
2019-01-15 12:16:46 +01:00
Ludovic Courtès
84a2de36a1
services: Deprecate a few more service procedures.
These procedures were already either undocumented (and de facto
deprecated) or documented as deprecated or redundant.

* gnu/services/base.scm (guix-service, guix-publish-service): Mark as
deprecated.
* gnu/services/mcron.scm (mcron-service): Likewise.
* gnu/services/networking.scm (tor-service): Likewise.
* doc/guix.texi (Scheduled Job Execution): Remove 'mcron-service' and
adjust example.
(Networking Services): Remove 'tor-service'.
* gnu/tests/base.scm (%mcron-os): Use 'mcron-service-type' instead of
'mcron-service'.
* gnu/tests/networking.scm (%tor-os): Use 'tor-service-type' instead of
'tor-service'.
* tests/guix-system.sh: Likewise.
2019-01-11 12:14:38 +01:00
Ludovic Courtès
babfd9447d
tests: Nitpick on Docker test.
This is a followup to 7d8a4eeacc.

* gnu/local.mk (GNU_SYSTEM_MODULES): Add gnu/tests/docker.scm.
* gnu/tests/docker.scm: Update copyright line.
2019-01-11 12:14:37 +01:00
Danny Milosavljevic
dc4b4a38fa
tests: docker: Fix test.
* gnu/tests/docker.scm (run-docker-test): Set memory and disk size.
(%docker-os): Add elogind service.
2019-01-10 05:15:41 +01:00
Danny Milosavljevic
7d8a4eeacc
tests: Add Docker system test.
* gnu/tests/docker.scm: New file.
2019-01-10 03:44:20 +01:00
Oleg Pykhalov
8b6c91ba53
gnu: php-with-bcmath: Deprecate in favour of 'php'.
This is a follow-up to 4629d26755.

* gnu/packages/php.scm (php-with-bcmath): Deprecate in favour of 'php'.
* gnu/tests/monitoring.scm (%zabbix-os): Use this.
2019-01-01 18:57:56 +03:00
Efraim Flashner
dcad57d5fc
services: Add quassel.
* gnu/services/messaging.scm (<quassel-configuration>): New record type.
(%quassel-account, %quassel-activation): New procedures.
(quassel-service-type): New variable.
* gnu/tests/messaging.scm (%test-quassel): New variable.
(run-quassel-test): New procedure.
* doc/guix.texi (Messaging): Document quassel service.
2018-12-24 11:18:36 +02:00
Ludovic Courtès
6ea6e1476f
file-systems: Spawn a REPL only when interaction is possible.
Fixes <https://bugs.gnu.org/23697>.
Reported by Jan Nieuwenhuizen <janneke@gnu.org>.

* gnu/build/file-systems.scm (check-file-system): Call 'start-repl' only
if current-input-port passes 'isatty?'.
* gnu/services/shepherd.scm (shepherd-configuration-file): After
'for-each' expression, call 'redirect-port'.
* gnu/tests/base.scm (run-basic-test)["stdin is /dev/null"]: New test.
2018-12-18 16:04:26 +01:00
Oleg Pykhalov
85c07cff9c
services: monitoring: Add 'zabbix-front-end'.
* gnu/services/monitoring.scm (nginx-server-configuration-list?,
serialize-nginx-server-configuration-list, zabbix-front-end-configuration,
zabbix-front-end-config, zabbix-front-end-activation,
generate-zabbix-front-end-documentation): New procedures.
(%zabbix-front-end-configuration-nginx, %maintenance.inc.php,
zabbix-front-end-service-type): New variables.
* doc/guix.texi (Monitoring Services): Document this.
2018-12-17 22:09:11 +03:00
Oleg Pykhalov
6106d7cae4
services: monitoring: Add 'zabbix-agent'.
* gnu/services/monitoring.scm (zabbix-server-service-type,
zabbix-agent-account, zabbix-agent-activation, zabbix-agent-config-file,
zabbix-agent-shepherd-service, generate-zabbix-agent-documentation): New
procedures.
(zabbix-agent-service-type): New 'service-type'.
* gnu/tests/monitoring.scm (run-zabbix-server-test): Test 'zabbix-agent'.
(%zabbix-os): Add 'zabbix-agent' service.
* doc/guix.texi (Monitoring Services): Document 'zabbix-agent'.
2018-12-17 22:09:10 +03:00
Oleg Pykhalov
6b1c4179e2
services: monitoring: Add 'zabbix-server'.
* gnu/services/monitoring.scm (uglify-field-name, serialize-field,
serialize-number, serialize-list, serialize-string, group?, serialize-group,
include-files?, serialize-include-files, zabbix-server-account,
zabbix-server-config-file, zabbix-server-activation,
zabbix-server-shepherd-service, generate-zabbix-server-documentation,
extra-options, serialize-extra-options): New procedures.
(zabbix-server-service-type): New variable.
* gnu/tests/monitoring.scm (%psql-user-create-zabbix,
%psql-db-zabbix-create-script, %psql-db-create-zabbix, %psql-db-import-zabbix,
%zabbix-os, %test-zabbix): New variables.
(run-zabbix-server-test): New procedure.
* doc/guix.texi (Monitoring Services): Document 'zabbix-server'.

squash! services: monitoring: Add 'zabbix-server'.
2018-12-17 22:09:10 +03:00
Ludovic Courtès
3933905c5f
Merge branch 'version-0.16.0' 2018-12-07 00:00:41 +01:00
Marius Bakke
d553ee8082
tests: elogind: Adjust to elogind output change.
This is a follow-up to commit 4163f2467b.

* gnu/tests/desktop.scm (run-elogind-test): s|/dev/tty1/tty1.
2018-12-06 21:18:03 +01:00
Ludovic Courtès
040ae18819
tests: Increase root partitions size to 1.2G.
The system closure has grown slightly above 1GiB so adjust accordingly.

* gnu/tests/install.scm (%simple-installation-script): Increase vdb2 size of
1.2G,
(%extlinux-gpt-installation-script); ditto
(%simple-installation-script-for-/dev/vda): ditto,
(%separate-store-installation-script): ditto for vdb3,
(%encrypted-root-installation-script): ditto.
2018-12-04 20:30:50 +01:00