This mitigates a race condition described in #576. The 'Type=exec'
option ensures that systemd only starts follow-up units after the
guix-daemon binary has started. By then, the mount points are collected
in a private namespace and will not be affected. Without this option,
'gnu-store.mount' could win the race and remount everything read-only
before guix-daemon has acquired a read-write view.
Fixes#2270
* etc/guix-daemon.service.in: Mitigate mount race condition
Change-Id: I5d28ebc38b0c10e6d2aa8e65353757ef13d5bad3
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This fixes issue for rootless guix daemon where store being remounted
read-only by gnu-store.mount is propagated to the guix daemon making
guix daemon not able to modify it.
* etc/guix-daemon.service.in: Disable host filesystem mount propagation.
Change-Id: Ib1abc387ee15d2b04d6f70c121244943cd0ad8c6
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Modified-by: Ludovic Courtès <ludo@gnu.org>
Having substitute URLs explicitly listed in the service startup file
makes it clearer what should be modified to permanently change the list
of substitute URLs.
* config-daemon.ac: Rename ‘guix_substitute_urls’ to
‘GUIX_SUBSTITUTE_URLS’ and substitute it.
* nix/local.mk (etc/guix-%.service, etc/init.d/guix-daemon)
(etc/guix-%.conf): Substitute it.
* etc/guix-daemon.conf.in, etc/guix-daemon.service.in,
etc/init.d/guix-daemon.in: Add an explicit ‘--substitute-urls’ option.
Change-Id: Ie491b7fab5c42e54dca582801c03805a85de2bf9
The "syslog" method has been deprecated for years, and issues a warning:
Standard output type syslog is obsolete, automatically updating to
journal. Please update your unit file, and consider removing the setting
altogether.
Fixes: #48323
* etc/guix-daemon.service.in (StandardOutput): Use "journal"
(StandardError): Likewise.
* etc/guix-publish.service.in (StandardOutput): Likewise.
(StandardError): Likewise.
Also ensure prompt_yes_no always print the message with a trailing space,
which is more pleasing to the eye.
* etc/guix-daemon.conf.in <--discover=no>: New guix-daemon option.
* etc/guix-daemon.service.in: Likewise.
* etc/init.d/guix-daemon.in: Likewise.
* etc/openrc/guix-daemon.in: Likewise.
* etc/guix-install.sh (configure_substitute_discovery): New procedure.
(sys_enable_guix_daemon): Ask the user whether automatic substitute discovery
should be enabled. Set the '--discover' argument accordingly.
(prompt_yes_no): Add a trailing space to the message.
(sys_authorize_build_farms): Remove trailing space from the message argument.
* NEWS (Distribution): Add news.
Otherwise, users will be stuck running an old copy of guix and the guix-daemon
if they copy the service files instead of symlinking them.
* etc/guix-daemon.conf.in, etc/guix-daemon.service.in, etc/guix-publish.conf.in,
etc/guix-publish.service.in: Expand @localstatedir@ instead of @bindir@.
* nix/local.mk (etc/guix-%.service, etc/guix-%.conf): Use @localstatedir@
instead of @bindir@.