GNU bug report logs - #71118
[PATCH 0/5] More service logging to stderr

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Wed, 22 May 2024 14:05:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: 71118 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [bug#71118] [PATCH 4/5] services: avahi: Use socket activation and log to stderr.
Date: Wed, 22 May 2024 16:53:39 +0200
* gnu/services/avahi.scm (avahi-shepherd-service): Change to systemd
style.  Remove ‘--daemonize’ option and #:pid-file.  Add #:lazy-start?
and #:log-file.

Change-Id: I1915243f057ff3bbe281f46f17826f24b124f659
---
 gnu/services/avahi.scm | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm
index 1c4220e490b..9352492bbda 100644
--- a/gnu/services/avahi.scm
+++ b/gnu/services/avahi.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014-2020, 2022 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2014-2020, 2022, 2024 Ludovic Courtès <ludo <at> gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -131,13 +131,17 @@ (define (avahi-shepherd-service config)
            (provision '(avahi-daemon))
            (requirement '(user-processes dbus-system networking))
 
-           (start #~(make-forkexec-constructor
+           (start #~(make-systemd-constructor
                      (list #$(file-append avahi "/sbin/avahi-daemon")
-                           "--daemonize"
                            #$@(if debug? #~("--debug") #~())
                            "-f" #$config)
-                     #:pid-file "/run/avahi-daemon/pid"))
-           (stop #~(make-kill-destructor))
+                     (list (endpoint
+                            (make-socket-address
+                             AF_UNIX
+                             "/run/avahi-daemon/socket")))
+                     #:lazy-start? #f
+                     #:log-file "/var/log/avahi-daemon.log"))
+           (stop #~(make-systemd-destructor))
            (actions (list (shepherd-configuration-action config)))))))
 
 (define avahi-service-type
-- 
2.41.0





This bug report was last modified 1 year and 25 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.