This reinstates c83bfc0415, which had been
reverted in 8c483c12e9 in response to
<https://issues.guix.gnu.org/76315>.
* gnu/services/base.scm (%base-services): Replace ‘syslog-service-type’
by ‘shepherd-system-log-service-type’.
* doc/guix.texi (Base Services): Update ‘syslog-service-type’
documentation.
(Shepherd Services): Mention that ‘system-log-service-type’ is in
‘%base-services’. Add anchor.
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Change-Id: I21082300f6a052865a6ab1bdff27fbe71f73d492
Partly fixes <https://issues.guix.gnu.org/76315>.
Fixes a bug whereby a service whose canonical name has changed would not
be restarted—e.g., if '(syslogd) has a replacement providing
'(system-log syslogd).
* gnu/services/shepherd.scm (shepherd-service-upgrade)[running?]:
Remove.
[to-restart]: Change to a subset of LIVE. Look up all the names of each
element of TARGET.
* guix/scripts/system/reconfigure.scm (upgrade-shepherd-services):
TO-RESTART is now a list of <live-service>; adjust accordingly.
* tests/services.scm ("shepherd-service-upgrade: one unchanged, one upgraded, one new"):
("shepherd-service-upgrade: service depended on is not unloaded"):
("shepherd-service-upgrade: obsolete services that depend on each other"):
("shepherd-service-upgrade: transient service"): Adjust accordingly.
("shepherd-service-upgrade: service has new canonical name"): New test.
Reported-by: Tomas Volf <~@wolfsden.cz>
Change-Id: I7cec495b4e824da5fad5518f039607cf92f935d9
* gnu/services/base.scm (<udev-configuration>): <debug?>: New field.
* gnu/services/base.scm (udev-shepherd-service): Use it to add '--debug' to
the command line, if applicable.
* doc/guix.texi (Base Services): Document it.
Change-Id: I88243fb4f321ff0876dd227e3c2b22082d37cfcf
This is a followup to commit 651f8765b6
* gnu/services/syncthing.scm (syncthing-files-service): Fix typo.
Change-Id: I55d1d480d356f41e65b85f8503ceb38c5c1a021b
* gnu/services/mail.scm (package-list?, serialize-package-list): New
procedures.
* gnu/services/mail.scm (dovecot-configuration)[extensions]: New field. The
field lets you provide a list of dovecot plugins that need to be available
during the runtime. A union of the set of modules will be created on the
activation time.
* gnu/services/mail.scm (opaque-dovecot-configuration)[extensions]: Likewise.
* gnu/services/mail.scm (make-dovecot-moduledir): New function.
* gnu/services/mail.scm (%dovecot-activation): Add step to compute a set of
modules, and provide them over the shared link at /usr/lib/dovecot.
* doc/guix.texi (Mail Services)[extension]: Add documentation. Clarify the
purpose and usage of the extensions parameter. Add an example showing how to
enable Sieve filtering using dovecot-pigeonhole. Better explain the module
directory structure and requirements.
Change-Id: I3c3955bb04b09d245242112f6810ecc0558109a1
Signed-off-by: Christopher Baines <mail@cbaines.net>
Fixes <https://issues.guix.gnu.org/76315>.
This is more concise and more robust: these ‘waitpid’ calls would
compete with those made by shepherd’s event loop upon SIGCHLD, and they
could hang forever, as illustrated with ‘dhcp-client-service-type’
in <https://issues.guix.gnu.org/76315>.
* gnu/services/databases.scm (postgresql-role-shepherd-service): Use
‘spawn-command’ instead of ‘fork+exec-command’ followed by ‘waitpid’.
* gnu/services/networking.scm (dhcp-client-shepherd-service): Change
‘start’ to use ‘spawn-command’ instead of ‘fork+exec-command’ and
* gnu/services/web.scm (patchwork-django-admin-gexp): Use
‘spawn-command’ instead of ‘primitive-fork’ + ‘waitpid’.
Change-Id: I449290bfa46f8600e6ccdb5a6da990ad0cb7948c
Reported-by: Tomas Volf <~@wolfsden.cz>
This ‘stop’ methods had two problems:
1. It is incompatible with the Shepherd 1.0, where the running value
is a <process> record and not a PID.
2. It is unreliable because its ‘waitpid’ calls compete with those
made by shepherd’s main event loop upon SIGCHLD.
* gnu/services/file-sharing.scm (transmission-daemon-shepherd-service):
Change ‘stop’ to use ‘make-kill-destructor’.
Change-Id: I406eb619d4a72bb5afe6200ac5c8f68736a78d97
The parameter should take the values #t, #f or 'default.
In a container environment, 'default amounts to #f, otherwise it
amounts to #t.
* gnu/services/base.scm (guix-configuration)<chroot?>: New field.
(guix-shepherd-service): If chroot? is #f, add "--disable-chroot".
If it is #t or 'default, do nothing.
* gnu/system/linux-container.scm (containerized-operating-system):
If chroot? is 'default, replace it by #f.
* doc/guix.texi: Document the parameter.
Change-Id: I8b9c3f46ad8650fa6ed4acee947b4ae5d002d03d
* gnu/services/syncthing.scm: (syncthing-config-file, syncthing-folder,
syncthing-device, syncthing-folder-device): New records.
(syncthing-service-type): Add special-files-service-type extension for
the config file.
(syncthing-files-service): Add service to create config file.
* gnu/home/services/syncthing.scm: (home-syncthing-service-type):
Extend home-files-services-type and re-exported more things from
gnu/services/syncthing.scm.
* doc/guix.texi: (syncthing-service-type): Document changes.
Change-Id: I87eeba1ee1fdada8f29c2ee881fbc6bc4113dde9
Signed-off-by: Leo Famulari <leo@famulari.name>
As truncating the WAL can take time.
* gnu/services/guix.scm (guix-build-coordinator-shepherd-services): Extend pid
file timeout.
Change-Id: I054fbf5631ee5060a4ea5b3c7940809193e1003b
Allow users to specify additional configuration files for NetworkManager.
These files will be added to /etc/NetworkManager/conf.d (NetworkManager's
default configuration directory location).
* gnu/services/networking.scm (<network-manager-configuration>)
[extra-configuration-files]: New field.
(network-manager-activation): Honor the new field.
* doc/guix.texi (Networking Setup): Document the new field.
Change-Id: I07479958e4d0aa318328c666a9630b779230b300
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
* gnu/services/herd.scm (gnu): Export 'eval-there', which is useful to
evaluate Scheme expressions.
Change-Id: Iff1db56e0847fc5886ac9fe594d677b363e7e6e7
The /etc/shepherd/do-not-kill feature has been unused since commit
c828969036, which switched from
unionfs (FUSE) to overlayfs.
* gnu/services/shepherd.scm (%do-not-kill-file): Remove.
(user-processes-shepherd-service): In ‘stop’ action, remove
‘kill-except’, ‘omitted-pids’, and ‘lset=’. Remove conditionals on
‘omitted-pids’ being non-empty.
Change-Id: Id7c6031fc12fd8ff0a3fde955fb01e373751e2d0
* gnu/services/shepherd.scm (user-processes-shepherd-service): In ‘stop’
action, remove ‘sleep*’, which is unnecessary when using Fibers, and
remove the ‘reap-children’ loop and its ‘waitpid’ call, which is
redundant with ‘waitpid’ calls made by shepherd itself and could cause
confusion.
Change-Id: I0df1733f0cbe781a0ad5fef4830d903483e0da27
This was erroneously renamed during the review of commit
ee0d1b144c ("services: greetd: Improve greeter configurations."). The field
*adds* to the intrinsic requirements of the service, so the 'extra-' prefixes
communicates this better.
* gnu/services/base.scm (<greetd-terminal-configuration>): Rename
shepherd-requirement field to extra-shepherd-requirement.
* doc/guix.texi (Base Services): Adjust doc accordingly.
Change-Id: I4b970bdd63864ed86d61fde9cad2487a293417ce
Fixes a bug introduced in ee0d1b144c where
reconfiguring a system with ‘greetd-service-type’ would fail with:
guix system: error: mkdir: File exists "/run/user".
* gnu/services/base.scm (greetd-run-user-activation): Replace mkdir with mkdir-p.
Change-Id: I030d1f57c3292c518b3f17061f75258e8a72141c
This improvement focuses on providing common user session scripts
for use by multiple greeters. Now user session entry point is
factored out into '<greetd-user-session>', which can be reused
as is with different greeters. By default it uses 'bash' as
first user process. Then user normally starts additional programs
with '.profile' or '.bashrc'. Using 'command', 'command-args' and
'extra-env' one can specify something else, which could be
'dbus-session' wrapped process, some desktop environment or else.
While the above is possible, one is still encouraged to use
'.bashrc', '.profile' or similar.
It also fixes incorrect use of 'XDG_RUNTIME_DIR' for 'wlgreet'.
'wlgreet' requires a compositor to run. We provide common sway based
greeter script, which can be shared by other graphical greeters.
* gnu/services/base.scm (<greetd-user-session>): Common user session
factored out, for shared use by multiple greeters.
(<greetd-agreety-session>): Switch to common user session.
(<greetd-wlgreet-configuration>): Refactor 'wlgreet' configuration.
(<greetd-wlgreet-sway-session>): Switch to common user session.
(<greetd-terminal-configuration>): Add 'extra-shepherd-requirement'
for establishing configurable Shepherd service dependency.
* gnu/tests/desktop.scm (%minimal-services): Reflect configuration
changes.
* doc/guix.texi (Base Services): Document refactoring changes.
Change-Id: I9d45a592b355eb9c438be5b1d4d15555ce4956fa
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This is a followup to commit 7a482ee945
Perhaps it was caused by a conflict resolution error during a rebase or
merge?
* gnu/services/desktop.scm: Stop exporting the non-existent variable
mate-desktop-service.
Change-Id: Ie71a3a49a7abf33df6aa3a5c27440a4cb382d46e
This is a followup to commit a1fa230147.
Perhaps it was caused by a conflict resolution error during a rebase or
merge?
* gnu/services/desktop.scm: Stop exporting the non-existent variable
xfce-desktop-service.
* doc/guix.texi (Desktop Services): Adjust accordingly.
Change-Id: I7ca24331365fa395fcee47de7ad0239e08aafbe3
Previously to 4722496292 ("Remove gnome-boxes from default GNOME apps."), USB
redirection for GNOME Boxes had been working out-of-the-box. Reinstate the
extensions that made that possible, so that simply adding the gnome-boxes
package back to one of the gnome-desktop-configuration fields does the right
thing.
* gnu/services/desktop.scm (gnome-setuid-programs): New procedure.
(gnome-desktop-service-type) [privileged-program-service-type]: Use it as an
extension.
* gnu/packages/gnome.scm (gnome-boxes):
[inputs]: Move spice-gtk to...
[propagated-inputs]: ... here.
[description]: Document extra steps necessary to enable the USB redirection
feature.
Change-Id: If84e8a2e0c480ddd1d7cd294890fad1ae2a76987
Reviewed-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This is useful for automatically picking up the polkit or udev rules from the
GNOME packages propagated inputs (transitively), e.g. spice-gtk from the
gnome-boxes package.
* gnu/services/desktop.scm (gnome-profile): Add a #:transitive? argument.
(gnome-udev-configuration-files): Use it.
(gnome-polkit-settings): Likewise.
Change-Id: I3597c9d3dc296e8f3e45017bb02e500db0b73783
Reviewed-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This patch implements restic backup with Shepherd services. It is
supposed not to break any existing setup.
* gnu/services/backup.scm (restic-backup-job): Add Shepherd
configuration options;
(restic-backup-job->mcron-job): Replace with...;
(restic-job-log-file): New procedure;
(restic-backup-job->shepherd-service): New procedure;
(restic-backup-activation): New procedure;
(restic-backup-service-type): Replace mcron with Shepherd extension and add
activation extension hook.
* doc/guix.texi: Document it.
Change-Id: I66de3b6a1cb6177f9e4ee0c2acf3013ecbcdd338
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This is a semi-incompatible change: gexps previously provided in the
‘schedule’ field will no longer work.
* gnu/services/admin.scm (unattended-upgrade-mcron-jobs): Rename to…
(unattended-upgrade-shepherd-services): … this. Return a list of one
Shepherd service. Remove custom logging and time limitation facilities
from ‘code’.
(unattended-upgrade-service-type): Extend ‘shepherd-root-service-type’
instead of ‘mcron-service-type’.
(<unattended-upgrade-configuration>)[services-to-restart]: Change
default.
* doc/guix.texi (Unattended Upgrades): Adjust ‘schedule’ and
‘services-to-restart’ documentation.
Change-Id: I1b239c5946e71cf9e2af9b24fe4b01366b57fb7a
This is a semi-incompatible change: gexps previously provided in the
‘schedule’ field will no longer work.
* gnu/services/admin.scm (log-cleanup-mcron-jobs): Remove.
(log-cleanup-shepherd-services): New procedure.
(log-cleanup-service-type): Extend SHEPHERD-ROOT-SERVICE-TYPE instead of
MCRON-SERVICE-TYPE.
* doc/guix.texi (Log Rotation): Adjust ‘schedule’ documentation
accordingly.
Change-Id: I2a3beb7dffbc9992b714a29423674db9c7dc6cab
* gnu/services/admin.scm (%default-log-rotation-calendar-event): New
variable.
(<log-rotation-configuration>): New record type.
(log-rotation-shepherd-services): New procedure.
(log-rotation-service-type): New variable.
Change-Id: I4400035f3b6065ec147ac932110b690120d739c2
In #68757, v3 instead of v4 of the patchset was committed by accident.
This patch revives the (minor) changes made in the v4.
* gnu/service/dns.scm: Remove exports of no longer existing names.
(unbound-service-type): Fix at typo (unbound -> Unbound).
(unbound-shepherd-service): Run after user processes.
(unbound-account-service): Determine shell based on shadow package.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>