Fixes <https://issues.guix.gnu.org/54783>.
* gnu/services/linux.scm (zram-device-configuration)
[priority]: Adapt to use #f or an integer from 0 to 32767. Add sanitizer to
warn for the change and delay the field.
(zram-device-configuration->udev-string): Adapt as above.
* doc/guix.texi (Zram Device Service): Remove double copyright line.
Change priority description to refer to the Swap Space one, and suggest not
leaving the default #f on to properly use zram.
Reported-by: Stefan Baums <baums@stefanbaums.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This partially fixes <https://issues.guix.gnu.org/54786>, allowing the 'jami'
and 'jami-provisioning' system tests to pass again.
In version 0.9.0, Shepherd constructors are now run concurrently, via
cooperative scheduling (Guile Fibers). The Jami service previously relied on
blocking sleeps while polling for D-Bus services to become ready after forking
a process; this wouldn't work anymore since while blocking the service process
wouldn't be given the chance to finish starting. The new reliance on Fibers
in Shepherd's fork+exec-command in the helper 'send-dbus' procedure also meant
that it wouldn't work outside of Shepherd anymore. Finally, the
'start-service' Shepherd procedure used in the test suite would cause the Jami
daemon to be spawned multiple times (a bug introduced in Shepherd 0.9.0).
To fix/simplify these problems, this change does the following:
1. Use the Guile AC/D-Bus library for D-Bus communication, which simplify
things, such as avoiding the need to fork 'dbus-send' processes.
2. The non-blocking 'sleep' version of Fiber is used for the 'with-retries'
waiting syntax.
3. A 'dbus' package variant is used to adjust the session bus configuration,
tailoring it for the use case at hand.
4. Avoid start-service in the tests, preferring 'jami-service-available?' for
now.
* gnu/build/jami-service.scm (parse-dbus-reply, strip-quotes)
(deserialize-item, serialize-boolean, dbus-dict->alist)
(dbus-array->list, parse-account-ids, parse-account-details)
(parse-contacts): Delete procedures.
(%send-dbus-binary, %send-dbus-bus, %send-dbus-user, %send-dbus-group)
(%send-dbus-debug): Delete parameters.
(jami-service-running?): New procedure.
(send-dbus/configuration-manager): Rename to...
(call-configuration-manager-method): ... this. Turn METHOD into a positional
argument. Turn ARGUMENTS into an optional argument. Invoke
`call-dbus-method' instead of `send-dbus', adjusting callers accordingly.
(get-account-ids, id->account-details, id->account-details)
(id->volatile-account-details, username->id, add-account remove-account)
(username->contacts, remove-contact, add-contact, set-account-details)
(set-all-moderators, username->all-moderators?, username->moderators)
(set-moderator): Adjust accordingly.
(with-retries, send-dbus, dbus-available-services)
(dbus-service-available?): Move to ...
* gnu/build/dbus-service.scm: ... this new module.
(send-dbus): Rewrite to use the Guile AC/D-Bus library.
(%dbus-query-timeout, sleep*): New variables.
(%current-dbus-connection): New parameter.
(initialize-dbus-connection!, argument->signature-type)
(call-dbus-method): New procedures.
(dbus-available-services): Adjust accordingly.
* gnu/local.mk (GNU_SYSTEM_MODULES): Register new module.
* gnu/packages/glib.scm (dbus-for-jami): New variable.
* gnu/services/telephony.scm: (jami-configuration)[dbus]: Default to
dbus-for-jami.
(jami-dbus-session-activation): Write a D-Bus daemon configuration file at
'/var/run/jami/session-local.conf'.
(jami-shepherd-services): Add the closure of guile-ac-d-bus and guile-fibers
as extensions. Adjust imported modules. Remove no longer used parameters.
<jami-dbus-session>: Use a PID file, avoiding the need for the manual
synchronization.
<jami>: Set DBUS_SESSION_BUS_ADDRESS environment variable. Poll using
'jami-service-available?' instead of 'dbus-service-available?'.
* gnu/tests/telephony.scm (run-jami-test): Add needed Guile extensions. Set
DBUS_SESSION_BUS_ADDRESS environment variable. Adjust all tests to use
'jami-service-available?' to determine if the service is started rather than
the now problematic Shepherd's 'start-service'.
Fixes <https://issues.guix.gnu.org/55707>.
Previously Inetutils' syslogd would call 'fsync' after each line written
to a file. This would significantly increase boot times on machines
with slow-ish spinning HDDs, where each 'fsync' call would take between
0.1s and 0.4s (and we'd do two of them for each line, one for
/var/log/messages and one for /var/log/debug).
* gnu/services/base.scm (%default-syslog.conf): Add a '-' before each
file name, except /var/log/secure. Change what goes to /var/log/debug.
The guix-data-service system test fails on a slower machine with a one-minute
time limit.
* gnu/services/guix.scm (guix-data-service): Double the #:pid-file-timeout.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu/services/messaging.scm (bitlbee-shepherd-service): In the
'make-inetd-constructor' case, set GUIX_LOCPATH and LC_ALL. In the
'least-authority-wrapper' call, preserve GUIX_LOCPATH and LC_ALL, and
map /run/current-system/locale.
Fixes <https://issues.guix.gnu.org/55444>.
Previously shepherd and dbus-daemon would race to start elogind. In
some cases (for instance if one logs in quickly enough on the tty),
dbus-daemon would "win" and start elogind before shepherd has had a
chance to do it. Consequently, shepherd would fail to start elogind and
mark it as stopped and disabled, in turn preventing services that depend
on it such as 'xorg-server' from starting.
* gnu/services/desktop.scm (elogind-dbus-service): Rewrite to refer to a
wrapper that waits for the 'elogind' Shepherd service.
Fixes a bug introduced in 1f29ed4a81,
whereby 'authorized-key-directory' would end up creating empty files for
authorized keys passed as an extension.
See <https://issues.guix.gnu.org/55359>.
* gnu/services/ssh.scm (extend-openssh-authorized-keys): Call
'alist->vhash' on the alist resulting from the 'append' call.
* gnu/packages/package-management.scm (guix-build-coordinator): Update to
0-53.3de63f1.
* gnu/services/guix.scm (guix-build-coordinator-queue-builds-configuration-guix-data-service-build-server-id):
New procedure.
(guix-build-coordinator-queue-builds-shepherd-services): Use the guix-data-service-build-server-id.
* doc/guix.texi (Guix Build Coordinator): Document the new queue builds
configuration field.
This adds a simple log rotation extension to every networking service that
specifies a #:log-file in its Shepherd service, which should prevent some logs
from accumulating indefinitely.
* gnu/services/networking.scm (%ntp-log-rotation): New variable.
(ntp-service-type): Extend 'rottlog-service-type'.
(openntpd-shepherd-service): Change #:log-file argument to "/var/log/ntpd.log".
(openntpd-service-type): Extend 'rottlog-service-type'.
(%tor-log-rotation): New variable.
(tor-service-type): Extend 'rottlog-service-type'.
(%connman-log-rotation): New variable.
(connman-service-type): Extend 'rottlog-service-type'.
(%hostapd-log-rotation): New variable.
(hostapd-service-type): Extend 'rottlog-service-type'.
(%pagekite-log-rotation): New variable.
(pagekite-service-type): Extend 'rottlog-service-type'.
(%yggdrasil-log-rotation): New variable.
(yggdrasil-service-type): Extend 'rottlog-service-type'.
(%ipfs-log-rotation): New variable.
(ipfs-service-type): Extend 'rottlog-service-type'.
(%keepalived-log-rotation): New variable.
(keepalived-service-type): Extend 'rottlog-service-type'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Fixes <https://issues.guix.gnu.org/55335>.
Reported by Christopher Baines <mail@cbaines.net>.
* gnu/services/ssh.scm (openssh-shepherd-service)[inetd-style?]: New variable.
<start>: Use it. When using 'make-inetd-constructor', pass a list of
endpoints as is possible with the Shepherd 0.9.1.
<stop>: Adjust accordingly.
* gnu/tests/ssh.scm (run-ssh-test)["wait for port 22"]: Rename to...
["wait for port 22, IPv4"]: ... this.
["wait for port 22, IPv6"]: New test.
Fixes <https://issues.guix.gnu.org/55450>.
Fixes a bug introduced in 211fe3f66e
whereby the inetd-spawned process would run as root (it would still run
in a separate user namespace, with UID 1000 inside of it, but had the
authority of root).
* gnu/services/messaging.scm (bitlbee-shepherd-service): Pass #:user
and #:group to 'make-inetd-constructor'. Remove "-u bitlbee" argument
to BITLBEE*.
Previously, in the absence of extensions of 'pipefs-service-type', we'd
get a wrong-type-arg exception while folding services:
In gnu/services/nfs.scm:
134:37 1 (_ #<<pipefs-configuration> mount-point: "/var/lib/nfs…> …)
In ice-9/boot-9.scm:
1685:16 0 (raise-exception _ #:continuable? _)
In procedure car: Wrong type argument in position 1 (expecting pair): ()
* gnu/services/nfs.scm (pipefs-service-type)[extend]: Gracefully handle
the case where VALUES is the empty list, as done in 'gss-service-type'.
This is a followup to b06ecc5751,
211fe3f66e, and
fd57ce267c.
* gnu/services/base.scm (guix-publish-shepherd-service): Change 'stop'
method to use 'make-systemd-destructor' when 'make-systemd-constructor'
is used.
* gnu/services/dict.scm (dicod-shepherd-service): Change 'stop' method
to use 'make-inetd-destructor' when 'make-inetd-constructor' is used.
* gnu/services/messaging.scm (bitlbee-shepherd-service): Likewise.
Fixes a regression introduced in
211fe3f66e whereby, in inetd mode, and
when using 'bitlbee-purple', libpurple plugins would not be found.
* gnu/services/messaging.scm (bitlbee-shepherd-service): Pass
#:preserved-environment-variables to 'least-authority-wrapper'.
* gnu/services/networking.scm (opendht-configuration->command-line-arguments):
Use 'least-authority-wrapper'.
(opendht-shepherd-service): Use 'make-forkexec-constructor'.
* gnu/services/messaging.scm (bitlbee-shepherd-service): Add call to
'least-authority-wrapper'. In 'start' method, use
'make-inetd-constructor' when available.
* gnu/tests/messaging.scm (run-bitlbee-test)["valid PID"]: Remove test.
* gnu/services/dict.scm (dicod-shepherd-service): Rewrite using
'least-authority-wrapper' plus 'make-forkexec-constructor' instead of
'make-forkexec-constructor/container'.
* gnu/services/databases.scm (postgresql-service-type)[description]: New field.
(memcached-service-type)[description]: New field.
(mysql-service-type)[description]: New field.
(redis-service-type)[description]: New field.
* gnu/services/desktop.scm (geoclue-service-type)[description]: New
field.
(udisks-service-type)[description]: New field.
(elogind-service-type)[description]: New field.
(account-service-type)[description]: New field.
* gnu/services/kerberos.scm (krb5-service-type)[description]: New field.
(pam-krb5-service-type)[description]: New field.
* gnu/services/lirc.scm (lirc-service-type)[description]: New field.
* gnu/services/mail.scm (dovecot-service-type)[description]: New field.
(opensmtpd-service-type)[description]: New field.
(mail-aliases-service-type)[description]: New field.
(exim-service-type)[description]: New field.
* gnu/services/monitoring.scm (zabbix-server-service-type)[description]:
New field.
(zabbix-agent-service-type)[description]: New field.
* gnu/services/nfs.scm (rpcbind-service-type)[description]: New field.
(pipefs-service-type)[description]: New field.
(gss-service-type)[description]: New field.
(idmap-service-type)[description]: New field.
* gnu/services/spice.scm (spice-vdagent-service-type)[description]: New field.
* gnu/services/sysctl.scm (sysctl-service-type)[description]: New field.
* gnu/services/virtualization.scm (libvirt-service-type)[description]:
New field.
(virtlog-service-type)[description]: New field.
* gnu/services/vpn.scm (openvpn-server-service-type)[description]: New field.
(openvpn-client-service-type)[description]: New field.
(wireguard-service-type)[description]: New field.
* gnu/services/web.scm (httpd-service-type)[description]: New field.
(fcgiwrap-service-type)[description]: New field.
(agate-service-type)[description]: New field.
[name]: Fix.
* gnu/services/guix.scm (nar-herder-configuration-log-level): New procedure.
(nar-herder-shepherd-services): Pass the log-level to the nar-herder process.
* doc/guix.texi (Nar Herder): Document configuring the log-level.
Fixes <https://issues.guix.gnu.org/54812>.
Starting with Shepherd 0.9.0 and the use of 'make-inetd-constructor' in
commit 808b9e8504, systems might be
running transient Shepherd services such as those corresponding to SSH
connections. Before this change, 'shepherd-service-upgrade' would have
those transient services in the list of services to unload; concretely,
that would lead all SSH connections to be closed upon 'guix system
reconfigure'.
* gnu/services/shepherd.scm (shepherd-service-upgrade): Remove transient
services to TO-UNLOAD.
* gnu/services/herd.scm (<live-service>)[transient?]: New field.
(current-services): Check the value of 'transient?'. Call
'resolve-transients'.
(resolve-transients): New procedure.
* gnu/services/ssh.scm (openssh-shepherd-service): Use
'make-inetd-constructor' when it is defined.
(<openssh-configuration>)[max-connections]: New field.
* gnu/tests/ssh.scm (run-ssh-test)["sshd PID"]: Adjust to cope with
PID-FILE being #f.
* gnu/tests/ssh.scm (%test-openssh): Pass #f as the 'pid-file'
argument.
* doc/guix.texi (Networking Services): Document 'max-connections'.
* gnu/services/shepherd.scm (scm->go): Define 'shepherd&co' and pass it
to 'with-extensions'.
(shepherd-configuration-file): Call 'start-in-the-background' when it is
defined.
(<shepherd-configuration>)[shepherd]: Default to SHEPHERD-0.9.
* gnu/system.scm (hurd-default-essential-services): Use SHEPHERD-0.8.
* gnu/services/admin.scm (<log-cleanup-configuration>): New record
type.
(log-cleanup-program, log-cleanup-mcron-jobs): New procedures.
(log-cleanup-service-type): New variable.
* doc/guix.texi (Log Rotation): Document it.
Fixes <https://issues.guix.gnu.org/35450>.
This driver isn't intended to be installed by default as it takes
precedence over the recommended xf86-input-libinput.
* gnu/services/xorg.scm (%default-xorg-modules): Remove
xf86-input-synaptics.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* gnu/services/telephony.scm (murmur-activation):
(murmur-shepherd-service): Change file name of mumble server, which is
now called mumble-server instead of murmurd since version 1.4.x.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* gnu/services/pm.scm (<thermald-configuration>): Add 'adaptive?' field.
(thermald-shepherd-service): Use it to pass --adaptive to thermald.
* doc/guix.texi (Power Management Services): Document the 'adaptive?' field of
'thermald-configuration'.
This reverts commit 0a9e82b430, which didn't end
up fixing anything. The problem was elsewhere; namely, using
'operating-system-services' instead of 'operating-system-user-services'.