From unknown Tue Jun 17 22:28:26 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43921] [Shepherd PATCH 0/2] Add User Service example. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Oct 2020 09:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43921 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43921@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160240925425265 (code B ref -1); Sun, 11 Oct 2020 09:41:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 Oct 2020 09:40:54 +0000 Received: from localhost ([127.0.0.1]:39136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRXqU-0006ZO-Ts for submit@debbugs.gnu.org; Sun, 11 Oct 2020 05:40:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:45366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRXqQ-0006ZF-32 for submit@debbugs.gnu.org; Sun, 11 Oct 2020 05:40:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRXqP-0008Sq-SL for guix-patches@gnu.org; Sun, 11 Oct 2020 05:40:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50017) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRXqO-0006sj-QE; Sun, 11 Oct 2020 05:40:44 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=48234 helo=dundal.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kRXqO-00085b-5N; Sun, 11 Oct 2020 05:40:44 -0400 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl X-Url: http://AvatarAcademy.nl Date: Sun, 11 Oct 2020 11:40:40 +0200 Message-ID: <874kn1rtgn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! Ever since Efraim's excellent blog post (https://guix.gnu.org/en/blog/2020/gnu-shepherd-user-services/) I have been willing to try Shepherd's User Services (actually I wanted to try it for mu= ch longer but it felt too daunting to dive in), and thanks to a nice discussion on IRC this morning I finally gave it a go. We were wondering it if would be feasible to add --8<---------------cut here---------------start------------->8--- if [[ ! -S /run/user/$UID/shepherd/socket ]]; then=20=20 shepherd=20=20 fi=20=20 --8<---------------cut here---------------end--------------->8--- to /etc/skel/.bash_profile, and maybe even add /etc/skel/.config/shepherd/init.scm: --8<---------------cut here---------------start------------->8--- (use-modules (shepherd service) ((ice-9 ftw) #:select (scandir))) ;; Load all the files in the directory 'init.d' with a suffix '.scm'. (for-each (lambda (file) (load (string-append "init.d/" file))) (scandir (string-append (dirname (current-filename)) "/init.d") (lambda (file) (string-suffix? ".scm" file)))) ;; Send shepherd into the background (action 'shepherd 'daemonize) --8<---------------cut here---------------end--------------->8--- that I got from Efraim's blog post. For starters, I have put this in the Shepherd manual. WDYT? Greetings, Janneke Jan (janneke) Nieuwenhuizen (2): Use XDG_CACHE_HOME/shepherd for unprivileged users' log directory. Add User Service example. doc/shepherd.texi | 75 +++++++++++++++++++++++++++++++++--- modules/shepherd/support.scm | 15 +++++++- 2 files changed, 83 insertions(+), 7 deletions(-) --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From unknown Tue Jun 17 22:28:26 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43921] [Shepherd PATCH 1/2] Use XDG_CACHE_HOME/shepherd for unprivileged users' log directory. References: <874kn1rtgn.fsf@gnu.org> In-Reply-To: <874kn1rtgn.fsf@gnu.org> Resent-From: "Jan (janneke) Nieuwenhuizen" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Oct 2020 09:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43921 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43921@debbugs.gnu.org Received: via spool by 43921-submit@debbugs.gnu.org id=B43921.160240945325597 (code B ref 43921); Sun, 11 Oct 2020 09:45:01 +0000 Received: (at 43921) by debbugs.gnu.org; 11 Oct 2020 09:44:13 +0000 Received: from localhost ([127.0.0.1]:39142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRXtf-0006eh-JX for submit@debbugs.gnu.org; Sun, 11 Oct 2020 05:44:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRXtd-0006dz-Lp for 43921@debbugs.gnu.org; Sun, 11 Oct 2020 05:44:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50040) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRXtX-0007HN-Li; Sun, 11 Oct 2020 05:43:59 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=48246 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1kRXtX-0008H9-4x; Sun, 11 Oct 2020 05:43:59 -0400 From: "Jan (janneke) Nieuwenhuizen" Date: Sun, 11 Oct 2020 11:43:57 +0200 Message-Id: <20201011094358.14013-1-janneke@gnu.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * modules/shepherd/support.scm (%user-cache-dir): New variable. (user-default-log-file): Use it. * doc/shepherd.texi (Invoking shepherd): Document it. --- doc/shepherd.texi | 4 +++- modules/shepherd/support.scm | 11 +++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/shepherd.texi b/doc/shepherd.texi index 696477e..7c9a739 100644 --- a/doc/shepherd.texi +++ b/doc/shepherd.texi @@ -417,7 +417,9 @@ permissions are not as expected. Log output into @var{file}. For unprivileged users, the default log file is -@file{$XDG_CONFIG_HOME/shepherd/shepherd.log}. +@file{$XDG_CACHE_HOME/shepherd/shepherd.log}. If the +@code{XDG_CACHE_HOME} environment variable is not defined, +@code{$HOME/.cache/shepherd/shepherd.log} is used instead. @cindex syslog When running as root, the default behavior is to connect to diff --git a/modules/shepherd/support.scm b/modules/shepherd/support.scm index cdb7b35..fe64a05 100644 --- a/modules/shepherd/support.scm +++ b/modules/shepherd/support.scm @@ -4,6 +4,7 @@ ;; Copyright (C) 2002, 2003 Wolfgang Jährling ;; Copyright (C) 2016 Mathieu Lirzin ;; Copyright (C) 2018 Danny Milosavljevic +;; Copyright (C) 2020 Jan (janneke) Nieuwenhuizen ;; ;; This file is part of the GNU Shepherd. ;; @@ -265,6 +266,12 @@ There is NO WARRANTY, to the extent permitted by law."))) (false-if-exception (passwd:dir (getpwuid (getuid)))) "/")) +(define %user-cache-dir + ;; Default cache directory if shepherd is run as a normal user. + (string-append (or (getenv "XDG_CACHE_HOME") + (string-append user-homedir "/.cache")) + "/shepherd")) + (define %user-config-dir ;; Default config directory if shepherd is run as a normal user. (string-append (or (getenv "XDG_CONFIG_HOME") @@ -302,8 +309,8 @@ TARGET should be a string representing a filepath + name." ;; Logging. (define (user-default-log-file) "Return the file name of the user's default log file." - (mkdir-p %user-config-dir #o700) - (string-append %user-config-dir "/shepherd.log")) + (mkdir-p %user-cache-dir #o700) + (string-append %user-cache-dir "/shepherd.log")) (define default-logfile-date-format ;; 'strftime' format string to prefix each entry in the log. -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From unknown Tue Jun 17 22:28:26 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43921] [Shepherd PATCH 2/2] Add User Service example. Resent-From: "Jan (janneke) Nieuwenhuizen" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Oct 2020 09:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43921 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43921@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 43921-submit@debbugs.gnu.org id=B43921.160240945325604 (code B ref 43921); Sun, 11 Oct 2020 09:45:02 +0000 Received: (at 43921) by debbugs.gnu.org; 11 Oct 2020 09:44:13 +0000 Received: from localhost ([127.0.0.1]:39144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRXtl-0006eo-58 for submit@debbugs.gnu.org; Sun, 11 Oct 2020 05:44:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRXte-0006e6-5y for 43921@debbugs.gnu.org; Sun, 11 Oct 2020 05:44:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50041) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRXtY-0007Ha-Sn; Sun, 11 Oct 2020 05:44:00 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=48246 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1kRXtY-0008H9-5m; Sun, 11 Oct 2020 05:44:00 -0400 From: "Jan (janneke) Nieuwenhuizen" Date: Sun, 11 Oct 2020 11:43:58 +0200 Message-Id: <20201011094358.14013-2-janneke@gnu.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201011094358.14013-1-janneke@gnu.org> References: <20201011094358.14013-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * modules/shepherd/support.scm: Export %user-cache-dir, %user-config-dir, %user-runtime-dir. * doc/shepherd.texi (User Service examples): Use them in new subsection with example. Co-authored-by: Efraim Flashner --- doc/shepherd.texi | 71 ++++++++++++++++++++++++++++++++++-- modules/shepherd/support.scm | 4 ++ 2 files changed, 71 insertions(+), 4 deletions(-) diff --git a/doc/shepherd.texi b/doc/shepherd.texi index 7c9a739..41cc651 100644 --- a/doc/shepherd.texi +++ b/doc/shepherd.texi @@ -13,6 +13,7 @@ Copyright @copyright{} @value{OLD-YEARS} Wolfgang J@"ahrling@* Copyright @copyright{} @value{NEW-YEARS} Ludovic Courtès@* Copyright @copyright{} 2020 Brice Waegeneire@* Copyright @copyright{} 2020 Oleg Pykhalov +Copyright @copyright{} 2020 Jan (janneke) Nieuwenhuizen@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -146,10 +147,11 @@ configuration file. When it is started with superuser privileges, it tries to use @code{/etc/shepherd.scm}. When started as normal user, it looks for a file called @code{$XDG_CONFIG_HOME/shepherd/init.scm}. If the @code{XDG_CONFIG_HOME} environment variable is not defined, -@code{$HOME/.config/shepherd/init.scm} is used instead. With the option -@code{--config} (or, for short, @code{-c}), you can specify where to -look instead. So if you want to start @command{shepherd} with an -alternative file, use one of the following commands: +@code{$HOME/.config/shepherd/init.scm} is used instead @ref{User Service +examples}. With the option @code{--config} (or, for short, @code{-c}), +you can specify where to look instead. So if you want to start +@command{shepherd} with an alternative file, use one of the following +commands: @example shepherd --config=/etc/shepherd.scm.old @@ -1025,6 +1027,67 @@ also specifies some more initial values for the slots: (restart (...))))) @end lisp +@menu +* User Service examples:: +@end menu + +@node User Service examples +@subsection User Service examples + +For starters, use a toplevel @code{$XDG_CONFIG_HOME/shepherd/init.scm} +that looks like this: + +@lisp +(use-modules (shepherd service) + ((ice-9 ftw) #:select (scandir))) + +;; Load all the files in the directory 'init.d' with a suffix '.scm'. +(for-each + (lambda (file) + (load (string-append "init.d/" file))) + (scandir (string-append (dirname (current-filename)) "/init.d") + (lambda (file) + (string-suffix? ".scm" file)))) + +;; Send shepherd into the background +(action 'shepherd 'daemonize) +@end lisp + +Then, individual user services can be put in +@code{$XDG_CONFIG_HOME/shepherd/init.d/}, e.g., for ssh-agent + +@lisp +;;; Commentary: +;;; +;;; Add to your ~/.bash_profile: +;;; +;;; SSH_AUTH_SOCK=/run/user/$UID/ssh-agent/socket +;;; export SSH_AUTH_SOCK +;;; +;;; Code: + +(use-modules (shepherd support)) + +(define ssh-agent + (make + #:provides '(ssh-agent) + #:docstring "Run `ssh-agent'" + #:start (let ((socket-dir (string-append %user-runtime-dir "/ssh-agent"))) + (unless (file-exists? socket-dir) + (mkdir-p socket-dir) + (chmod socket-dir #o700)) + (unless (file-exists? log-dir) + (mkdir-p log-dir)) + (make-forkexec-constructor + `("ssh-agent" "-D" "-a" ,(string-append socket-dir "/socket")) + #:log-file (string-append %user-cache-dir "/ssh-agent.log"))) + #:stop (make-kill-destructor) + #:respawn? #t)) +(register-services ssh-agent) + +(start ssh-agent) +@end lisp + @c @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @node The root and unknown services diff --git a/modules/shepherd/support.scm b/modules/shepherd/support.scm index fe64a05..bf34ada 100644 --- a/modules/shepherd/support.scm +++ b/modules/shepherd/support.scm @@ -61,6 +61,10 @@ persistency persistency-state-file + %user-cache-dir + %user-config-dir + %user-runtime-dir + verify-dir)) (define-syntax-rule (if-2.0 subsequent alternate) -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From unknown Tue Jun 17 22:28:26 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43921] [Shepherd PATCH 2/2] Add User Service example. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Oct 2020 10:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43921 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43921@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 43921-submit@debbugs.gnu.org id=B43921.160241273030953 (code B ref 43921); Sun, 11 Oct 2020 10:39:02 +0000 Received: (at 43921) by debbugs.gnu.org; 11 Oct 2020 10:38:50 +0000 Received: from localhost ([127.0.0.1]:39235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRYkc-00083B-7J for submit@debbugs.gnu.org; Sun, 11 Oct 2020 06:38:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRYkY-00082w-53 for 43921@debbugs.gnu.org; Sun, 11 Oct 2020 06:38:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50475) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRYkS-0004iE-PP; Sun, 11 Oct 2020 06:38:40 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=48266 helo=dundal.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kRYkS-0001Hu-3S; Sun, 11 Oct 2020 06:38:40 -0400 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl References: <20201011094358.14013-1-janneke@gnu.org> <20201011094358.14013-2-janneke@gnu.org> X-Url: http://AvatarAcademy.nl Date: Sun, 11 Oct 2020 12:38:38 +0200 In-Reply-To: <20201011094358.14013-2-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Sun, 11 Oct 2020 11:43:58 +0200") Message-ID: <87blh9caj5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Jan (janneke) Nieuwenhuizen writes: Oops... > diff --git a/doc/shepherd.texi b/doc/shepherd.texi > index 7c9a739..41cc651 100644 > --- a/doc/shepherd.texi > +++ b/doc/shepherd.texi [..] > @@ -1025,6 +1027,67 @@ also specifies some more initial values for the sl= ots: > (restart (...))))) [..] > +(define ssh-agent > + (make > + #:provides '(ssh-agent) > + #:docstring "Run `ssh-agent'" > + #:start (let ((socket-dir (string-append %user-runtime-dir "/ssh-age= nt"))) > + (unless (file-exists? socket-dir) > + (mkdir-p socket-dir) > + (chmod socket-dir #o700)) ...this log-dir bit: > + (unless (file-exists? log-dir) > + (mkdir-p log-dir)) is an obsolete leftover. Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From unknown Tue Jun 17 22:28:26 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43921] [Shepherd PATCH v2 2/2] Add User Service example. References: <874kn1rtgn.fsf@gnu.org> In-Reply-To: <874kn1rtgn.fsf@gnu.org> Resent-From: "Jan (janneke) Nieuwenhuizen" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Oct 2020 12:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43921 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43921@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 43921-submit@debbugs.gnu.org id=B43921.160241821615526 (code B ref 43921); Sun, 11 Oct 2020 12:11:01 +0000 Received: (at 43921) by debbugs.gnu.org; 11 Oct 2020 12:10:16 +0000 Received: from localhost ([127.0.0.1]:39273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRaB1-00042H-Pr for submit@debbugs.gnu.org; Sun, 11 Oct 2020 08:10:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRaAy-00041z-VZ for 43921@debbugs.gnu.org; Sun, 11 Oct 2020 08:10:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51068) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRaAt-0005Pb-8F; Sun, 11 Oct 2020 08:10:03 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=49564 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1kRaAs-0006lK-EU; Sun, 11 Oct 2020 08:10:02 -0400 From: "Jan (janneke) Nieuwenhuizen" Date: Sun, 11 Oct 2020 14:10:00 +0200 Message-Id: <20201011121000.26307-1-janneke@gnu.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * modules/shepherd/support.scm: Export %user-cache-dir, %user-config-dir, %user-runtime-dir. * doc/shepherd.texi (User Service examples): Use them in new subsection with example. Co-authored-by: Efraim Flashner --- doc/shepherd.texi | 79 ++++++++++++++++++++++++++++++++++-- modules/shepherd/support.scm | 4 ++ 2 files changed, 79 insertions(+), 4 deletions(-) diff --git a/doc/shepherd.texi b/doc/shepherd.texi index 7c9a739..e6207b3 100644 --- a/doc/shepherd.texi +++ b/doc/shepherd.texi @@ -13,6 +13,7 @@ Copyright @copyright{} @value{OLD-YEARS} Wolfgang J@"ahrling@* Copyright @copyright{} @value{NEW-YEARS} Ludovic Courtès@* Copyright @copyright{} 2020 Brice Waegeneire@* Copyright @copyright{} 2020 Oleg Pykhalov +Copyright @copyright{} 2020 Jan (janneke) Nieuwenhuizen@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -146,10 +147,11 @@ configuration file. When it is started with superuser privileges, it tries to use @code{/etc/shepherd.scm}. When started as normal user, it looks for a file called @code{$XDG_CONFIG_HOME/shepherd/init.scm}. If the @code{XDG_CONFIG_HOME} environment variable is not defined, -@code{$HOME/.config/shepherd/init.scm} is used instead. With the option -@code{--config} (or, for short, @code{-c}), you can specify where to -look instead. So if you want to start @command{shepherd} with an -alternative file, use one of the following commands: +@code{$HOME/.config/shepherd/init.scm} is used instead (@pxref{User +Service examples}). With the option @code{--config} (or, for short, +@code{-c}), you can specify where to look instead. So if you want to +start @command{shepherd} with an alternative file, use one of the +following commands: @example shepherd --config=/etc/shepherd.scm.old @@ -1025,6 +1027,75 @@ also specifies some more initial values for the slots: (restart (...))))) @end lisp +@menu +* User Service examples:: +@end menu + +@node User Service examples +@subsection User Service examples + +For starters, use a toplevel @code{$XDG_CONFIG_HOME/shepherd/init.scm} +that looks like this: + +@lisp +;;; Commentary: +;;; +;;; Add to your ~/.bash_profile: +;;; +;;; if [[ ! -S ${XDG_RUN_HOME-$HOME/.cache}/shepherd/socket ]]; then +;;; shepherd +;;; fi +;;; +;;; Code: + +(use-modules (shepherd service) + ((ice-9 ftw) #:select (scandir))) + +;; Load all the files in the directory 'init.d' with a suffix '.scm'. +(for-each + (lambda (file) + (load (string-append "init.d/" file))) + (scandir (string-append (dirname (current-filename)) "/init.d") + (lambda (file) + (string-suffix? ".scm" file)))) + +;; Send shepherd into the background +(action 'shepherd 'daemonize) +@end lisp + +Then, individual user services can be put in +@code{$XDG_CONFIG_HOME/shepherd/init.d/}, e.g., for ssh-agent + +@lisp +;;; Commentary: +;;; +;;; Add to your ~/.bash_profile: +;;; +;;; SSH_AUTH_SOCK=${XDG_RUN_HOME-$HOME/.cache}/ssh-agent/socket +;;; export SSH_AUTH_SOCK +;;; +;;; Code: + +(use-modules (shepherd support)) + +(define ssh-agent + (make + #:provides '(ssh-agent) + #:docstring "Run `ssh-agent'" + #:start (let ((socket-dir (string-append %user-runtime-dir "/ssh-agent"))) + (unless (file-exists? socket-dir) + (mkdir-p socket-dir) + (chmod socket-dir #o700)) + (make-forkexec-constructor + `("ssh-agent" "-D" "-a" ,(string-append socket-dir "/socket")) + #:log-file (string-append %user-cache-dir "/ssh-agent.log"))) + #:stop (make-kill-destructor) + #:respawn? #t)) +(register-services ssh-agent) + +(start ssh-agent) +@end lisp + @c @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @node The root and unknown services diff --git a/modules/shepherd/support.scm b/modules/shepherd/support.scm index fe64a05..bf34ada 100644 --- a/modules/shepherd/support.scm +++ b/modules/shepherd/support.scm @@ -61,6 +61,10 @@ persistency persistency-state-file + %user-cache-dir + %user-config-dir + %user-runtime-dir + verify-dir)) (define-syntax-rule (if-2.0 subsequent alternate) -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From unknown Tue Jun 17 22:28:26 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43921] [PATCH v3 2/2] Add User Service example. References: <874kn1rtgn.fsf@gnu.org> In-Reply-To: <874kn1rtgn.fsf@gnu.org> Resent-From: "Jan (janneke) Nieuwenhuizen" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Oct 2020 05:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43921 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43921@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 43921-submit@debbugs.gnu.org id=B43921.16024797518032 (code B ref 43921); Mon, 12 Oct 2020 05:16:01 +0000 Received: (at 43921) by debbugs.gnu.org; 12 Oct 2020 05:15:51 +0000 Received: from localhost ([127.0.0.1]:41385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRqBX-00025Q-0I for submit@debbugs.gnu.org; Mon, 12 Oct 2020 01:15:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRqBV-00025F-RQ for 43921@debbugs.gnu.org; Mon, 12 Oct 2020 01:15:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36435) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRqBQ-0003Pg-4P; Mon, 12 Oct 2020 01:15:40 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=55160 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1kRqBP-0006IJ-Nc; Mon, 12 Oct 2020 01:15:39 -0400 From: "Jan (janneke) Nieuwenhuizen" Date: Mon, 12 Oct 2020 07:15:36 +0200 Message-Id: <20201012051536.1609-1-janneke@gnu.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * modules/shepherd/support.scm: Export %user-cache-dir, %user-config-dir, %user-runtime-dir. * doc/shepherd.texi (User Service examples): Use them in new subsection with example. Co-authored-by: Efraim Flashner --- doc/shepherd.texi | 79 ++++++++++++++++++++++++++++++++++-- modules/shepherd/support.scm | 4 ++ 2 files changed, 79 insertions(+), 4 deletions(-) diff --git a/doc/shepherd.texi b/doc/shepherd.texi index 7c9a739..15d00f1 100644 --- a/doc/shepherd.texi +++ b/doc/shepherd.texi @@ -13,6 +13,7 @@ Copyright @copyright{} @value{OLD-YEARS} Wolfgang J@"ahrling@* Copyright @copyright{} @value{NEW-YEARS} Ludovic Courtès@* Copyright @copyright{} 2020 Brice Waegeneire@* Copyright @copyright{} 2020 Oleg Pykhalov +Copyright @copyright{} 2020 Jan (janneke) Nieuwenhuizen@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -146,10 +147,11 @@ configuration file. When it is started with superuser privileges, it tries to use @code{/etc/shepherd.scm}. When started as normal user, it looks for a file called @code{$XDG_CONFIG_HOME/shepherd/init.scm}. If the @code{XDG_CONFIG_HOME} environment variable is not defined, -@code{$HOME/.config/shepherd/init.scm} is used instead. With the option -@code{--config} (or, for short, @code{-c}), you can specify where to -look instead. So if you want to start @command{shepherd} with an -alternative file, use one of the following commands: +@code{$HOME/.config/shepherd/init.scm} is used instead (@pxref{User +Service examples}). With the option @code{--config} (or, for short, +@code{-c}), you can specify where to look instead. So if you want to +start @command{shepherd} with an alternative file, use one of the +following commands: @example shepherd --config=/etc/shepherd.scm.old @@ -1025,6 +1027,75 @@ also specifies some more initial values for the slots: (restart (...))))) @end lisp +@menu +* User Service examples:: +@end menu + +@node User Service examples +@subsection User Service examples + +For starters, use a toplevel @code{$XDG_CONFIG_HOME/shepherd/init.scm} +that looks like this: + +@lisp +;;; Commentary: +;;; +;;; Add to your ~/.bash_profile: +;;; +;;; if [[ ! -S ${XDG_RUNTIME_DIR-$HOME/.cache}/shepherd/socket ]]; then +;;; shepherd +;;; fi +;;; +;;; Code: + +(use-modules (shepherd service) + ((ice-9 ftw) #:select (scandir))) + +;; Load all the files in the directory 'init.d' with a suffix '.scm'. +(for-each + (lambda (file) + (load (string-append "init.d/" file))) + (scandir (string-append (dirname (current-filename)) "/init.d") + (lambda (file) + (string-suffix? ".scm" file)))) + +;; Send shepherd into the background +(action 'shepherd 'daemonize) +@end lisp + +Then, individual user services can be put in +@code{$XDG_CONFIG_HOME/shepherd/init.d/}, e.g., for ssh-agent + +@lisp +;;; Commentary: +;;; +;;; Add to your ~/.bash_profile: +;;; +;;; SSH_AUTH_SOCK=${XDG_RUNTIME_DIR-$HOME/.cache}/ssh-agent/socket +;;; export SSH_AUTH_SOCK +;;; +;;; Code: + +(use-modules (shepherd support)) + +(define ssh-agent + (make + #:provides '(ssh-agent) + #:docstring "Run `ssh-agent'" + #:start (let ((socket-dir (string-append %user-runtime-dir "/ssh-agent"))) + (unless (file-exists? socket-dir) + (mkdir-p socket-dir) + (chmod socket-dir #o700)) + (make-forkexec-constructor + `("ssh-agent" "-D" "-a" ,(string-append socket-dir "/socket")) + #:log-file (string-append %user-cache-dir "/ssh-agent.log"))) + #:stop (make-kill-destructor) + #:respawn? #t)) +(register-services ssh-agent) + +(start ssh-agent) +@end lisp + @c @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @node The root and unknown services diff --git a/modules/shepherd/support.scm b/modules/shepherd/support.scm index fe64a05..bf34ada 100644 --- a/modules/shepherd/support.scm +++ b/modules/shepherd/support.scm @@ -61,6 +61,10 @@ persistency persistency-state-file + %user-cache-dir + %user-config-dir + %user-runtime-dir + verify-dir)) (define-syntax-rule (if-2.0 subsequent alternate) -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From unknown Tue Jun 17 22:28:26 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43921] [PATCH v3 2/2] Add User Service example. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Oct 2020 13:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43921 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "Jan (janneke) Nieuwenhuizen" Cc: 43921@debbugs.gnu.org, Efraim Flashner Received: via spool by 43921-submit@debbugs.gnu.org id=B43921.160345990021989 (code B ref 43921); Fri, 23 Oct 2020 13:32:02 +0000 Received: (at 43921) by debbugs.gnu.org; 23 Oct 2020 13:31:40 +0000 Received: from localhost ([127.0.0.1]:56372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVxAS-0005iH-Bb for submit@debbugs.gnu.org; Fri, 23 Oct 2020 09:31:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVxAP-0005cD-1r for 43921@debbugs.gnu.org; Fri, 23 Oct 2020 09:31:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49549) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVxAH-0002aF-UG; Fri, 23 Oct 2020 09:31:29 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=55398 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kVxAH-0007Fx-A6; Fri, 23 Oct 2020 09:31:29 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <874kn1rtgn.fsf@gnu.org> <20201012051536.1609-1-janneke@gnu.org> Date: Fri, 23 Oct 2020 15:31:27 +0200 In-Reply-To: <20201012051536.1609-1-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Mon, 12 Oct 2020 07:15:36 +0200") Message-ID: <87h7qlnk5s.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! "Jan (janneke) Nieuwenhuizen" skribis: > * modules/shepherd/support.scm: Export %user-cache-dir, %user-config-dir, > %user-runtime-dir. > * doc/shepherd.texi (User Service examples): Use them in new subsection w= ith > example. > > Co-authored-by: Efraim Flashner Good idea! > +@menu > +* User Service examples:: > +@end menu > + > +@node User Service examples > +@subsection User Service examples The subsection looks lonely. :-) How about making it a section, at the same level as =E2=80=9CService Examples=E2=80=9D? Also, since =E2=80=9Cuser services=E2=80=9D are no different than =E2=80=9C= non-user=E2=80=9D services, perhaps the focus should be on using the Shepherd as an unprivileged user. Thus, I=E2=80=99d suggest calling the section =E2=80=9CManaging User= Services=E2=80=9D, or =E2=80=9CRunning the Shepherd as a User=E2=80=9D, which do not imply tha= t =E2=80=9Cuser services=E2=80=9D are a new concept. WDYT? > +For starters, use a toplevel @code{$XDG_CONFIG_HOME/shepherd/init.scm} > +that looks like this: Maybe: =E2=80=9C=E2=80=A6 we suggest the following top-level @file{$XDG_CONFIG_HOME/shepherd/init.scm} file, which will automatically load individual service definitions from @file{~/.config/shepherd/init.d}:=E2=80=9D > +@lisp > +;;; Commentary: > +;;; > +;;; Add to your ~/.bash_profile: > +;;; > +;;; if [[ ! -S ${XDG_RUNTIME_DIR-$HOME/.cache}/shepherd/socket ]]; then > +;;; shepherd > +;;; fi Maybe make it a paragraph in the text, above the =E2=80=98init.scm=E2=80=99= example: First, to use the Shepherd as an unprivileged user, you may want to ensure it is up and running every time you log in. One way to accomplish that is by adding the following lines to @file{~/.bashrc} (@pxref{Bash Startup Files,,, bash, The GNU Bash Reference Manual}): =E2=80=A6 > +Then, individual user services can be put in > +@code{$XDG_CONFIG_HOME/shepherd/init.d/}, e.g., for ssh-agent @command{ssh-agent} and period. :-) > +@lisp > +;;; Commentary: > +;;; > +;;; Add to your ~/.bash_profile: > +;;; > +;;; SSH_AUTH_SOCK=3D${XDG_RUNTIME_DIR-$HOME/.cache}/ssh-agent/socket > +;;; export SSH_AUTH_SOCK > +;;; > +;;; Code: > + > +(use-modules (shepherd support)) > + > +(define ssh-agent > + (make > + #:provides '(ssh-agent) > + #:docstring "Run `ssh-agent'" > + #:start (let ((socket-dir (string-append %user-runtime-dir "/ssh-age= nt"))) > + (unless (file-exists? socket-dir) > + (mkdir-p socket-dir) > + (chmod socket-dir #o700)) > + (make-forkexec-constructor > + `("ssh-agent" "-D" "-a" ,(string-append socket-dir "/sock= et")) > + #:log-file (string-append %user-cache-dir "/ssh-agent.log= "))) This is misleading because the code to create the socket directory runs from the top-level, i.e., when shepherd starts. I=E2=80=99d write: #:start (lambda () ;; make socket dir (fork+exec-command =E2=80=A6 #:log-file =E2=80=A6)) (BTW, I use =E2=80=98gnupg-agent=E2=80=99, which I think is pretty nice bec= ause it=E2=80=99s integrated with pinentry and all. I run it as: eval `gpg-agent --daemon --enable-ssh-support` =E2=80=A6 from ~/.xsession.) Thanks, Ludo=E2=80=99. From unknown Tue Jun 17 22:28:26 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43921] [PATCH v3 2/2] Add User Service example. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Oct 2020 16:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43921 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 43921@debbugs.gnu.org, Efraim Flashner Received: via spool by 43921-submit@debbugs.gnu.org id=B43921.160347108628315 (code B ref 43921); Fri, 23 Oct 2020 16:39:01 +0000 Received: (at 43921) by debbugs.gnu.org; 23 Oct 2020 16:38:06 +0000 Received: from localhost ([127.0.0.1]:58088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW04m-0007MA-DQ for submit@debbugs.gnu.org; Fri, 23 Oct 2020 12:38:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW04j-0007Lv-7R for 43921@debbugs.gnu.org; Fri, 23 Oct 2020 12:37:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53786) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kW04d-0002MK-Hw; Fri, 23 Oct 2020 12:37:51 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=48898 helo=dundal.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kW04c-0000ay-QO; Fri, 23 Oct 2020 12:37:51 -0400 From: Jan Nieuwenhuizen References: <874kn1rtgn.fsf@gnu.org> <20201012051536.1609-1-janneke@gnu.org> <87h7qlnk5s.fsf@gnu.org> Date: Fri, 23 Oct 2020 18:37:47 +0200 In-Reply-To: <87h7qlnk5s.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Fri, 23 Oct 2020 15:31:27 +0200") Message-ID: <87a6wcyk2s.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: Hello, > "Jan (janneke) Nieuwenhuizen" skribis: > >> * modules/shepherd/support.scm: Export %user-cache-dir, %user-config-dir, >> %user-runtime-dir. >> * doc/shepherd.texi (User Service examples): Use them in new subsection = with >> example. >> >> Co-authored-by: Efraim Flashner > > Good idea! > >> +@menu >> +* User Service examples:: >> +@end menu >> + >> +@node User Service examples >> +@subsection User Service examples > > The subsection looks lonely. :-) How about making it a section, at the > same level as =E2=80=9CService Examples=E2=80=9D? Sure. > Also, since =E2=80=9Cuser services=E2=80=9D are no different than =E2=80= =9Cnon-user=E2=80=9D services, > perhaps the focus should be on using the Shepherd as an unprivileged > user. Thus, I=E2=80=99d suggest calling the section =E2=80=9CManaging Us= er Services=E2=80=9D, > or =E2=80=9CRunning the Shepherd as a User=E2=80=9D, which do not imply t= hat =E2=80=9Cuser > services=E2=80=9D are a new concept. > > WDYT? Yes, nice. I changed the opening to The Shepherd can be used to manage services for an unprivileged user. First, you may want to ensure it is up and running every time you log in. One way to accomplish that is by adding the following lines to @file{~/.bash_profile} (@pxref{Bash Startup Files,,, bash, The GNU Bash Reference Manual}): >> +For starters, use a toplevel @code{$XDG_CONFIG_HOME/shepherd/init.scm} >> +that looks like this: > > Maybe: =E2=80=9C=E2=80=A6 we suggest the following top-level > @file{$XDG_CONFIG_HOME/shepherd/init.scm} file, which will automatically > load individual service definitions from > @file{~/.config/shepherd/init.d}:=E2=80=9D Nice. >> +Then, individual user services can be put in >> +@code{$XDG_CONFIG_HOME/shepherd/init.d/}, e.g., for ssh-agent > > @command{ssh-agent} and period. :-) >> +@lisp [..] >> + #:start (let ((socket-dir (string-append %user-runtime-dir "/ssh-ag= ent"))) >> + (unless (file-exists? socket-dir) >> + (mkdir-p socket-dir) >> + (chmod socket-dir #o700)) >> + (make-forkexec-constructor >> + `("ssh-agent" "-D" "-a" ,(string-append socket-dir "/soc= ket")) >> + #:log-file (string-append %user-cache-dir "/ssh-agent.lo= g"))) > > This is misleading because the code to create the socket directory runs > from the top-level, i.e., when shepherd starts. Oops; that's probably $HOME for me, because it worked... > I=E2=80=99d write: > > #:start (lambda () > ;; make socket dir > (fork+exec-command =E2=80=A6 #:log-file =E2=80=A6)) Great; changed that too. > (BTW, I use =E2=80=98gnupg-agent=E2=80=99, which I think is pretty nice b= ecause it=E2=80=99s > integrated with pinentry and all. Interesting...makes me wonder: maybe we could ship init.scm together with a couple of popular user service descriptions like ssh-agent.scm, znc.scm, ...gpg-agent.scm (?) in an examples directory? That would make it even easier for people to migrate away from the old > I run it as: > eval `gpg-agent --daemon --enable-ssh-support` > > =E2=80=A6 from ~/.xsession.) It would have helped me to move away from my `eval ssh-agent` thingy ;-) New version attached (included 0001 patch for completeness but which can probably be merged into / obsoleted by #43920). Greetings, Janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=v3-0001-Use-XDG_CACHE_HOME-shepherd-for-unprivileged-user.patch Content-Transfer-Encoding: quoted-printable >From f0deaa24ad57d2db921bf1b092350988c50558a7 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Sun, 11 Oct 2020 10:54:26 +0200 Subject: [PATCH v3 1/2] Use XDG_CACHE_HOME/shepherd for unprivileged users' log directory. Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=3DUTF-8 * modules/shepherd/support.scm (%user-cache-dir): New variable. (user-default-log-file): Use it. * doc/shepherd.texi (Invoking shepherd): Document it. --- doc/shepherd.texi | 4 +++- modules/shepherd/support.scm | 11 +++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/shepherd.texi b/doc/shepherd.texi index 696477e..7c9a739 100644 --- a/doc/shepherd.texi +++ b/doc/shepherd.texi @@ -417,7 +417,9 @@ permissions are not as expected. Log output into @var{file}. =20 For unprivileged users, the default log file is -@file{$XDG_CONFIG_HOME/shepherd/shepherd.log}. +@file{$XDG_CACHE_HOME/shepherd/shepherd.log}. If the +@code{XDG_CACHE_HOME} environment variable is not defined, +@code{$HOME/.cache/shepherd/shepherd.log} is used instead. =20 @cindex syslog When running as root, the default behavior is to connect to diff --git a/modules/shepherd/support.scm b/modules/shepherd/support.scm index cdb7b35..fe64a05 100644 --- a/modules/shepherd/support.scm +++ b/modules/shepherd/support.scm @@ -4,6 +4,7 @@ ;; Copyright (C) 2002, 2003 Wolfgang J=C3=A4hrling ;; Copyright (C) 2016 Mathieu Lirzin ;; Copyright (C) 2018 Danny Milosavljevic +;; Copyright (C) 2020 Jan (janneke) Nieuwenhuizen ;; ;; This file is part of the GNU Shepherd. ;; @@ -265,6 +266,12 @@ There is NO WARRANTY, to the extent permitted by law."= ))) (false-if-exception (passwd:dir (getpwuid (getuid)))) "/")) =20 +(define %user-cache-dir + ;; Default cache directory if shepherd is run as a normal user. + (string-append (or (getenv "XDG_CACHE_HOME") + (string-append user-homedir "/.cache")) + "/shepherd")) + (define %user-config-dir ;; Default config directory if shepherd is run as a normal user. (string-append (or (getenv "XDG_CONFIG_HOME") @@ -302,8 +309,8 @@ TARGET should be a string representing a filepath + nam= e." ;; Logging. (define (user-default-log-file) "Return the file name of the user's default log file." - (mkdir-p %user-config-dir #o700) - (string-append %user-config-dir "/shepherd.log")) + (mkdir-p %user-cache-dir #o700) + (string-append %user-cache-dir "/shepherd.log")) =20 (define default-logfile-date-format ;; 'strftime' format string to prefix each entry in the log. --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=v3-0002-doc-Add-Managing-User-Services.patch Content-Transfer-Encoding: quoted-printable >From ae64ec3bfa7a0e4e877f06161f2d6aacb5804960 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Sun, 11 Oct 2020 10:59:04 +0200 Subject: [PATCH v3 2/2] doc: Add "Managing User Services". MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=3DUTF-8 * modules/shepherd/support.scm: Export %user-cache-dir, %user-config-dir, %user-runtime-dir. * doc/shepherd.texi (Managing User Services): Use them in new section with example. Co-authored-by: Efraim Flashner Co-authored-by: Ludovic Court=C3=A8s --- doc/shepherd.texi | 81 ++++++++++++++++++++++++++++++++++-- modules/shepherd/support.scm | 4 ++ 2 files changed, 81 insertions(+), 4 deletions(-) diff --git a/doc/shepherd.texi b/doc/shepherd.texi index 7c9a739..ea3edf0 100644 --- a/doc/shepherd.texi +++ b/doc/shepherd.texi @@ -13,6 +13,7 @@ Copyright @copyright{} @value{OLD-YEARS} Wolfgang J@"ahrl= ing@* Copyright @copyright{} @value{NEW-YEARS} Ludovic Court=C3=A8s@* Copyright @copyright{} 2020 Brice Waegeneire@* Copyright @copyright{} 2020 Oleg Pykhalov +Copyright @copyright{} 2020 Jan (janneke) Nieuwenhuizen@* =20 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -146,10 +147,11 @@ configuration file. When it is started with superuse= r privileges, it tries to use @code{/etc/shepherd.scm}. When started as normal user, it looks for a file called @code{$XDG_CONFIG_HOME/shepherd/init.scm}. If the @code{XDG_CONFIG_HOME} environment variable is not defined, -@code{$HOME/.config/shepherd/init.scm} is used instead. With the option -@code{--config} (or, for short, @code{-c}), you can specify where to -look instead. So if you want to start @command{shepherd} with an -alternative file, use one of the following commands: +@code{$HOME/.config/shepherd/init.scm} is used instead (@pxref{Managing +User Services }). With the option @code{--config} (or, for short, +@code{-c}), you can specify where to look instead. So if you want to +start @command{shepherd} with an alternative file, use one of the +following commands: =20 @example shepherd --config=3D/etc/shepherd.scm.old @@ -591,6 +593,7 @@ defined in the @code{(shepherd service)} module. * Service De- and Constructors:: Commonly used ways of starting and stopping services. * Service Examples:: Examples that show how services are used. +* Managing User Services:: Running the Shepherd as a user. * The root and unknown services:: Special services in the Shepherd. @end menu =20 @@ -1025,6 +1028,76 @@ also specifies some more initial values for the slot= s: (restart (...))))) @end lisp =20 +@node Managing User Services +@section Managing User Services + +The Shepherd can be used to manage services for an unprivileged user. +First, you may want to ensure it is up and running every time you log +in. One way to accomplish that is by adding the following lines to +@file{~/.bash_profile} (@pxref{Bash Startup Files,,, bash, The GNU Bash +Reference Manual}): + +@verbatim +if [[ ! -S ${XDG_RUNTIME_DIR-$HOME/.cache}/shepherd/socket ]]; then + shepherd +fi +@end verbatim + +Then, we suggest the following top-level +@file{$XDG_CONFIG_HOME/shepherd/init.scm} file, which will automatically +load individual service definitions from +@file{~/.config/shepherd/init.d}: + +@lisp +(use-modules (shepherd service) + ((ice-9 ftw) #:select (scandir))) + +;; Load all the files in the directory 'init.d' with a suffix '.scm'. +(for-each + (lambda (file) + (load (string-append "init.d/" file))) + (scandir (string-append (dirname (current-filename)) "/init.d") + (lambda (file) + (string-suffix? ".scm" file)))) + +;; Send shepherd into the background +(action 'shepherd 'daemonize) +@end lisp + +Then, individual user services can be put in +@code{$XDG_CONFIG_HOME/shepherd/init.d/}, e.g., for @command{ssh-agent}. + +@lisp +;;; Commentary: +;;; +;;; Add to your ~/.bash_profile: +;;; +;;; SSH_AUTH_SOCK=3D$@{XDG_RUNTIME_DIR-$HOME/.cache@}/ssh-agent/socket +;;; export SSH_AUTH_SOCK +;;; +;;; Code: + +(use-modules (shepherd support)) + +(define ssh-agent + (make + #:provides '(ssh-agent) + #:docstring "Run `ssh-agent'" + #:start (lambda () + (let ((socket-dir (string-append %user-runtime-dir "/ssh-age= nt"))) + (unless (file-exists? socket-dir) + (mkdir-p socket-dir) + (chmod socket-dir #o700)) + (fork+exec-command + `("ssh-agent" "-D" "-a" ,(string-append socket-dir "/sock= et")) + #:log-file (string-append %user-cache-dir "/ssh-agent.log= ")))) + #:stop (make-kill-destructor) + #:respawn? #t)) + +(register-services ssh-agent) +(start ssh-agent) +@end lisp + @c @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ =20 @node The root and unknown services diff --git a/modules/shepherd/support.scm b/modules/shepherd/support.scm index fe64a05..bf34ada 100644 --- a/modules/shepherd/support.scm +++ b/modules/shepherd/support.scm @@ -61,6 +61,10 @@ persistency persistency-state-file =20 + %user-cache-dir + %user-config-dir + %user-runtime-dir + verify-dir)) =20 (define-syntax-rule (if-2.0 subsequent alternate) --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=-- From unknown Tue Jun 17 22:28:26 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jan Nieuwenhuizen Subject: bug#43921: closed (Re: [bug#43921] [PATCH v3 2/2] Add User Service example.) Message-ID: References: <87sg96jqig.fsf@gnu.org> <874kn1rtgn.fsf@gnu.org> X-Gnu-PR-Message: they-closed 43921 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 43921@debbugs.gnu.org Date: Wed, 18 Nov 2020 21:38:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1605735481-15073-1" This is a multi-part message in MIME format... ------------=_1605735481-15073-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #43921: [Shepherd PATCH 0/2] Add User Service example. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 43921@debbugs.gnu.org. --=20 43921: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D43921 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1605735481-15073-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 43921-done) by debbugs.gnu.org; 18 Nov 2020 21:37:21 +0000 Received: from localhost ([127.0.0.1]:36700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfV8j-0003uC-GD for submit@debbugs.gnu.org; Wed, 18 Nov 2020 16:37:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfV8g-0003tz-F2 for 43921-done@debbugs.gnu.org; Wed, 18 Nov 2020 16:37:19 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34536) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfV8b-0002bV-5L; Wed, 18 Nov 2020 16:37:13 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=55474 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kfV8a-0000xw-MV; Wed, 18 Nov 2020 16:37:12 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Jan Nieuwenhuizen Subject: Re: [bug#43921] [PATCH v3 2/2] Add User Service example. References: <874kn1rtgn.fsf@gnu.org> <20201012051536.1609-1-janneke@gnu.org> <87h7qlnk5s.fsf@gnu.org> <87a6wcyk2s.fsf@gnu.org> Date: Wed, 18 Nov 2020 22:37:11 +0100 In-Reply-To: <87a6wcyk2s.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Fri, 23 Oct 2020 18:37:47 +0200") Message-ID: <87sg96jqig.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43921-done Cc: 43921-done@debbugs.gnu.org, Efraim Flashner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Jan Nieuwenhuizen skribis: >>>From ae64ec3bfa7a0e4e877f06161f2d6aacb5804960 Mon Sep 17 00:00:00 2001 > From: "Jan (janneke) Nieuwenhuizen" > Date: Sun, 11 Oct 2020 10:59:04 +0200 > Subject: [PATCH v3 2/2] doc: Add "Managing User Services". > MIME-Version: 1.0 > Content-Type: text/plain; charset=3DUTF-8 > Content-Transfer-Encoding: 8bit > Content-Transfer-Encoding: 8bit > Content-Type: text/plain; charset=3DUTF-8 > > * modules/shepherd/support.scm: Export %user-cache-dir, %user-config-dir, > %user-runtime-dir. > * doc/shepherd.texi (Managing User Services): Use them in new section with > example. > > Co-authored-by: Efraim Flashner > Co-authored-by: Ludovic Court=C3=A8s Finally pushed; I changed =E2=80=98%user-cache-dir=E2=80=99 references to =E2=80=98%user-log-dir=E2=80=99: https://git.savannah.gnu.org/cgit/shepherd.git/commit/?id=3D4c5176f5a7a5a= 1e7d7f258f585e8ed127a21b99a Thanks! Ludo=E2=80=99. ------------=_1605735481-15073-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 11 Oct 2020 09:40:54 +0000 Received: from localhost ([127.0.0.1]:39136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRXqU-0006ZO-Ts for submit@debbugs.gnu.org; Sun, 11 Oct 2020 05:40:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:45366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRXqQ-0006ZF-32 for submit@debbugs.gnu.org; Sun, 11 Oct 2020 05:40:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRXqP-0008Sq-SL for guix-patches@gnu.org; Sun, 11 Oct 2020 05:40:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50017) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRXqO-0006sj-QE; Sun, 11 Oct 2020 05:40:44 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=48234 helo=dundal.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kRXqO-00085b-5N; Sun, 11 Oct 2020 05:40:44 -0400 From: Jan Nieuwenhuizen To: guix-patches@gnu.org Subject: [Shepherd PATCH 0/2] Add User Service example. Organization: AvatarAcademy.nl X-Url: http://AvatarAcademy.nl Date: Sun, 11 Oct 2020 11:40:40 +0200 Message-ID: <874kn1rtgn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Efraim Flashner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! Ever since Efraim's excellent blog post (https://guix.gnu.org/en/blog/2020/gnu-shepherd-user-services/) I have been willing to try Shepherd's User Services (actually I wanted to try it for mu= ch longer but it felt too daunting to dive in), and thanks to a nice discussion on IRC this morning I finally gave it a go. We were wondering it if would be feasible to add --8<---------------cut here---------------start------------->8--- if [[ ! -S /run/user/$UID/shepherd/socket ]]; then=20=20 shepherd=20=20 fi=20=20 --8<---------------cut here---------------end--------------->8--- to /etc/skel/.bash_profile, and maybe even add /etc/skel/.config/shepherd/init.scm: --8<---------------cut here---------------start------------->8--- (use-modules (shepherd service) ((ice-9 ftw) #:select (scandir))) ;; Load all the files in the directory 'init.d' with a suffix '.scm'. (for-each (lambda (file) (load (string-append "init.d/" file))) (scandir (string-append (dirname (current-filename)) "/init.d") (lambda (file) (string-suffix? ".scm" file)))) ;; Send shepherd into the background (action 'shepherd 'daemonize) --8<---------------cut here---------------end--------------->8--- that I got from Efraim's blog post. For starters, I have put this in the Shepherd manual. WDYT? Greetings, Janneke Jan (janneke) Nieuwenhuizen (2): Use XDG_CACHE_HOME/shepherd for unprivileged users' log directory. Add User Service example. doc/shepherd.texi | 75 +++++++++++++++++++++++++++++++++--- modules/shepherd/support.scm | 15 +++++++- 2 files changed, 83 insertions(+), 7 deletions(-) --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com ------------=_1605735481-15073-1-- From unknown Tue Jun 17 22:28:26 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43921] [PATCH v3 2/2] Add User Service example. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 19 Nov 2020 06:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43921 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 43921-done@debbugs.gnu.org, Efraim Flashner Received: via spool by 43921-done@debbugs.gnu.org id=D43921.160576567232702 (code D ref 43921); Thu, 19 Nov 2020 06:02:02 +0000 Received: (at 43921-done) by debbugs.gnu.org; 19 Nov 2020 06:01:12 +0000 Received: from localhost ([127.0.0.1]:37812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfd0I-0008VN-Fk for submit@debbugs.gnu.org; Thu, 19 Nov 2020 01:01:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfd0E-0008Uk-F5 for 43921-done@debbugs.gnu.org; Thu, 19 Nov 2020 01:01:09 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45651) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfd06-0002q4-OD; Thu, 19 Nov 2020 01:00:59 -0500 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=57084 helo=dundal.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kfd04-0007xQ-VJ; Thu, 19 Nov 2020 01:00:58 -0500 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl References: <874kn1rtgn.fsf@gnu.org> <20201012051536.1609-1-janneke@gnu.org> <87h7qlnk5s.fsf@gnu.org> <87a6wcyk2s.fsf@gnu.org> <87sg96jqig.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Thu, 19 Nov 2020 07:00:53 +0100 In-Reply-To: <87sg96jqig.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Wed, 18 Nov 2020 22:37:11 +0100") Message-ID: <87sg957une.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: Hello, > Jan Nieuwenhuizen skribis: > >>>>From ae64ec3bfa7a0e4e877f06161f2d6aacb5804960 Mon Sep 17 00:00:00 2001 >> From: "Jan (janneke) Nieuwenhuizen" >> Date: Sun, 11 Oct 2020 10:59:04 +0200 >> Subject: [PATCH v3 2/2] doc: Add "Managing User Services". [..] > Finally pushed; I changed =E2=80=98%user-cache-dir=E2=80=99 references to > =E2=80=98%user-log-dir=E2=80=99: > > https://git.savannah.gnu.org/cgit/shepherd.git/commit/?id=3D4c5176f5a7a= 5a1e7d7f258f585e8ed127a21b99a Nice, thanks! Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com