From unknown Tue Jun 17 20:15:49 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#73383 <73383@debbugs.gnu.org> To: bug#73383 <73383@debbugs.gnu.org> Subject: Status: [PATCH] home: home-shepherd-configuration: Add silent? field. Reply-To: bug#73383 <73383@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:15:49 +0000 retitle 73383 [PATCH] home: home-shepherd-configuration: Add silent? field. reassign 73383 guix-patches submitter 73383 Dariqq severity 73383 normal tag 73383 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 20 09:03:38 2024 Received: (at submit) by debbugs.gnu.org; 20 Sep 2024 13:03:38 +0000 Received: from localhost ([127.0.0.1]:34347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srdIM-00010Z-0N for submit@debbugs.gnu.org; Fri, 20 Sep 2024 09:03:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:54176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srdIK-00010R-5c for submit@debbugs.gnu.org; Fri, 20 Sep 2024 09:03:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srdI0-0005nV-Re for guix-patches@gnu.org; Fri, 20 Sep 2024 09:03:13 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srdHy-0002Mw-MW for guix-patches@gnu.org; Fri, 20 Sep 2024 09:03:12 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id CDE45240104 for ; Fri, 20 Sep 2024 15:03:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1726837386; bh=uERdxSaua7180I7dwOsDx4Ic7NcPS0f6ltSNz3B+04g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=qBPXC4CW67iypA0LFKmK+AGEbBO/eQ37OE4NiLu5Ag1O8rc7LJBmIFunKa69jfgtH ytqV4gjPBDeAnBb+9tPrqp3/wQty6l1SNWTkgmS0+pB8idvfkC7cfuRgSpq34F/FQp 4UdTkR+Ekh53m9Je657qPD3B9lI6m84rXBf5Pmb2VoSN76cY/vRmRsAxTApXXAEsib 1UZ/j0ySqd7Hwr1z/oOBoappsvwbAioxLxchst4NQp0AiuysxA6LDF/YXw8MLg35Hl q8IHVMcf74LgRwLlGpn7PNv2bHf2fnxTGXjAbePdayFyxW4g9CdGzBQ8PbnHjFOS8E aKkBHBkFvwx6Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4X9CHG20Q3z9rxG; Fri, 20 Sep 2024 15:03:06 +0200 (CEST) From: Dariqq To: guix-patches@gnu.org Subject: [PATCH] home: home-shepherd-configuration: Add silent? field. Date: Fri, 20 Sep 2024 12:39:23 +0000 Message-ID: MIME-Version: 1.0 X-Debbugs-Cc: ( , Andrew Tropin , Florian Pelz , Ludovic Courtès , Maxim Cournoyer , Tanguy Le Carrour Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.66; envelope-from=dariqq@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Dariqq 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: -2.3 (--) * gnu/home/services/shepherd.scm (home-shepherd-configuration): Add silent? field. (launch-shepherd-gexp): Conditionally invoke shepherd with --silent. * doc/guix.texi (home-shepherd-configuration): Document it. Change-Id: I1ce7a92c2777ebded39fe293b0bdcbd03562b4fc --- Hi, This adds a configuration field to the home-shepherd to optionally invoke it with --silent. See [1] for details. The option currently only actually works as advertised when using the development branch of shepherd, for the current version (v0.10.5) the --silent parameter is ignored. I have set the default value to #f to not change the current behaviour. For the documentation I am not perfectly happy with my description because the behaviour is opposite of the description (Setting to #t causes no output to stdout), maybe there is a better way to phrase this? Also is there a better way to communicate that it only works when the auto-start? field is also #t? Related: The daemonize? field is not documented and the accessor is not being exported. [1] https://issues.guix.gnu.org/72277 doc/guix.texi | 3 +++ gnu/home/services/shepherd.scm | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 52e36e4354..ab8cf54ae8 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -46057,6 +46057,9 @@ Shepherd Home Service @item auto-start? (default: @code{#t}) Whether or not to start Shepherd on first login. +@item silent? (default: @code{#f}) +Whether or not the auto-started Shepherd should output to stdout. + @item services (default: @code{'()}) A list of @code{} to start. You should probably use the service extension diff --git a/gnu/home/services/shepherd.scm b/gnu/home/services/shepherd.scm index dfe4030a4e..17b005ed71 100644 --- a/gnu/home/services/shepherd.scm +++ b/gnu/home/services/shepherd.scm @@ -32,6 +32,7 @@ (define-module (gnu home services shepherd) home-shepherd-configuration? home-shepherd-configuration-shepherd home-shepherd-configuration-auto-start? + home-shepherd-configuration-silent? home-shepherd-configuration-services) #:re-export (shepherd-service shepherd-service? @@ -58,6 +59,8 @@ (define-record-type* (default #t)) (daemonize? home-shepherd-configuration-daemonize? (default #t)) + (silent? home-shepherd-configuration-silent? + (default #f)) (services home-shepherd-configuration-services (default '()))) @@ -107,7 +110,8 @@ (define (home-shepherd-configuration-file config) (scheme-file "shepherd.conf" config))) (define (launch-shepherd-gexp config) - (let* ((shepherd (home-shepherd-configuration-shepherd config))) + (let* ((shepherd (home-shepherd-configuration-shepherd config)) + (silent? (home-shepherd-configuration-silent? config))) (if (home-shepherd-configuration-auto-start? config) (with-imported-modules '((guix build utils)) #~(unless (file-exists? @@ -125,6 +129,7 @@ (define (launch-shepherd-gexp config) #$(file-append shepherd "/bin/shepherd") "--logfile" (string-append log-dir "/shepherd.log") + #$@(if silent? '("--silent") '()) "--config" #$(home-shepherd-configuration-file config))))) #~""))) base-commit: e9d903f146865db5948abd271a5c7e763681b4e9 -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 11:58:12 2024 Received: (at 73383) by debbugs.gnu.org; 25 Sep 2024 15:58:13 +0000 Received: from localhost ([127.0.0.1]:43216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stUP6-0004HD-Ht for submit@debbugs.gnu.org; Wed, 25 Sep 2024 11:58:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stUP3-0004Gu-CR for 73383@debbugs.gnu.org; Wed, 25 Sep 2024 11:58:11 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stUOU-0006yr-NG; Wed, 25 Sep 2024 11:57:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=hFGwU7Eb8MvFFVdgGydsxNHO6iBRl/h2l39hL3FU+8A=; b=S7gj6Nl+HvA9hKhGsDeS exkYqbj9l7nD9vNOqsxWsE7ZADTEm6TCrSSk5awC3TbXTWjzQ0ub6Gn5GPjUXZw6gPzZO484h+hTZ i63Rf+rJcNVNiO5bQ6v5DQoihaSGOyxQ+S4w3wG2bjRoad4eY6CLtCwEEFnuTaTyvPE2By9ynk3lB nWe84UEqEz32s+bkEXMharyXhO6zb5U2RCRyISh+E3kSnAIiAu2C4dZEtp9Kh/K0xEJMZwV00Pdb5 LgOB9UZcVZ0LcGdYPF3tToiRjAWGn1zCx/iZiwGi/HHTsMQwHfOZV/ybGSEL9IWIL9KxVMvqQO4+M y6JmjxZBQMnR5A==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Dariqq Subject: Re: [bug#73383] [PATCH] home: home-shepherd-configuration: Add silent? field. In-Reply-To: (dariqq@posteo.net's message of "Fri, 20 Sep 2024 12:39:23 +0000") References: Date: Wed, 25 Sep 2024 17:57:10 +0200 Message-ID: <87y13fsp49.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) 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: 73383 Cc: Tanguy Le Carrour , 73383@debbugs.gnu.org, Maxim Cournoyer , paren@disroot.org, Florian Pelz , Andrew Tropin 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, Dariqq skribis: > * gnu/home/services/shepherd.scm (home-shepherd-configuration): Add silen= t? field. > (launch-shepherd-gexp): Conditionally invoke shepherd with --silent. > * doc/guix.texi (home-shepherd-configuration): Document it. > > Change-Id: I1ce7a92c2777ebded39fe293b0bdcbd03562b4fc [...] > Related: The daemonize? field is not documented and the accessor is not b= eing > exported. We should fix it. > +@item silent? (default: @code{#f}) > +Whether or not the auto-started Shepherd should output to stdout. Alternatively: =E2=80=9CWhen true, the @command{shepherd} process does not = write anything to standard output.=E2=80=9D I would go as far as making it #t by default, WDYT? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 27 10:16:17 2024 Received: (at 73383) by debbugs.gnu.org; 27 Sep 2024 14:16:17 +0000 Received: from localhost ([127.0.0.1]:37460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suBlY-0007H0-Iv for submit@debbugs.gnu.org; Fri, 27 Sep 2024 10:16:17 -0400 Received: from mout02.posteo.de ([185.67.36.66]:54233) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suBlV-0007Ga-SW for 73383@debbugs.gnu.org; Fri, 27 Sep 2024 10:16:15 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 92475240101 for <73383@debbugs.gnu.org>; Fri, 27 Sep 2024 16:06:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1727445986; bh=2NIw44N60RKB8/aMsJOBfRbGiRYkQLtJeH/0k4Zeu0I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:Content-Type: Content-Transfer-Encoding:From; b=kzuUtI0O0d29jt/kfNLnmK4lNe3/6BEl/u6wSPgdO2JXPH62Zo+LMFcfGvGaFV7hJ t8kJaKBsY6aS6ZrjFR8PpzXfZkfI6jqTdtjeNgl8BUZkrfOQECpEXo8Ks63htqXac9 b++Qi98a9hkZtwtHUCo9pA0sZGUqN/WsCtdVJjkynICEjvZ/0xkdd27isT7byWWyg7 d9t5DbzZKYxKoKISf4KWx1ue7bRdsAGOdBm/FKgK0JL2DqZkoRWXzwA6IrZfwxLOV5 vDKQ8STrGq2vBWmNMjhTIuskJhEWVZrwqvHu+dBJQ4xgq2MGb1j94cW9vJPOepPifq 9PztYJYxWrXfQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XFXM509sPz6twb; Fri, 27 Sep 2024 16:06:24 +0200 (CEST) Message-ID: Date: Fri, 27 Sep 2024 14:06:16 +0000 MIME-Version: 1.0 Subject: Re: [bug#73383] [PATCH] home: home-shepherd-configuration: Add silent? field. To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= References: <87y13fsp49.fsf@gnu.org> Content-Language: en-US From: Dariqq In-Reply-To: <87y13fsp49.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73383 Cc: Tanguy Le Carrour , 73383@debbugs.gnu.org, Maxim Cournoyer , paren@disroot.org, Florian Pelz , Andrew Tropin 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 (---) On 25.09.24 17:57, Ludovic Courtès wrote: > Hi, > > Dariqq skribis: > >> * gnu/home/services/shepherd.scm (home-shepherd-configuration): Add silent? field. >> (launch-shepherd-gexp): Conditionally invoke shepherd with --silent. >> * doc/guix.texi (home-shepherd-configuration): Document it. >> >> Change-Id: I1ce7a92c2777ebded39fe293b0bdcbd03562b4fc > > [...] > >> Related: The daemonize? field is not documented and the accessor is not being >> exported. > > We should fix it. > >> +@item silent? (default: @code{#f}) >> +Whether or not the auto-started Shepherd should output to stdout. > > Alternatively: “When true, the @command{shepherd} process does not write > anything to standard output.” That sounds way better. I would also mention that this only does something when autostart? is also #t. > > I would go as far as making it #t by default, WDYT? > Personally I think these messages provide little value when they just inform me that all my home-services have started successfully (especially because this is also available in the log file anyway), so I would have no objection. Not sure how others feel about them. Probably most dont see them at all when they launch directly into their de/wm. > Thanks, > Ludo’. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 04:40:50 2024 Received: (at 73383) by debbugs.gnu.org; 11 Oct 2024 08:40:50 +0000 Received: from localhost ([127.0.0.1]:33392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szBCc-0003xQ-Gd for submit@debbugs.gnu.org; Fri, 11 Oct 2024 04:40:50 -0400 Received: from mout01.posteo.de ([185.67.36.65]:40639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szBCY-0003x5-VC for 73383@debbugs.gnu.org; Fri, 11 Oct 2024 04:40:49 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id DB771240027 for <73383@debbugs.gnu.org>; Fri, 11 Oct 2024 10:40:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1728636026; bh=00G3+JeQ+jAGoAK7WmR2Wx8WLqetUHH1vE4aoYXfm6E=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=RZS90f/uy19/7uC1NqwsRcvy6a5Mqiyi9yZXpoDcMlGVwRpF11e7BWgWGbvrO7LXr houMu7EW5RCErnratdt2cyJquOn6ZlEwRlqJLB95XzLbOjOD5ln/D6jJ3DAZffW8c8 +v1JovgUJIty2ld+qpKQgqIpiiA9FtsF3mIOjX3SYLkHsd1b542PnhdEYaGVdi/LjS uxwPKROpz9aj//GgxJPbVOYgSQqLcMO+F9AR1mm1R/NAKZ9rtKcuc6h3q25GuqY3Wr gxFnn3dxCnLWFiC6gSpZKBvxgjXv/HoblOU/jtvb/6OAxyMgTq97xVwm03McYsoL4Z mAnUcEYJri4wQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XQ0SV2Gryz6tyZ; Fri, 11 Oct 2024 10:40:25 +0200 (CEST) From: Dariqq To: 73383@debbugs.gnu.org Subject: [PATCH v2 0/2] home-shepherd-configuration: add silent? and document daemonize? Date: Fri, 11 Oct 2024 08:39:07 +0000 Message-ID: MIME-Version: 1.0 X-Debbugs-Cc: ( , Andrew Tropin , Florian Pelz , Ludovic Courtès , Maxim Cournoyer , Tanguy Le Carrour Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73383 Cc: Dariqq 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 (---) Here is v2: Changes: * Change default-value of the silent? field to #t. * Update the documentation. I added something that (hopefully) makes it obvious that the field is intended to be used together with the auto-start? field. * Added a second patch to document the daemonize? field and export the field-accessor. Should it warn about the issue when dameonize? is #f but auto-start? is #t blocking logins? Dariqq (2): home: home-shepherd-configuration: Add silent? field. doc: Document home-shepherd-configuration-daemonize? doc/guix.texi | 7 +++++++ gnu/home/services/shepherd.scm | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) base-commit: 99999ac8ebc4bd5c988ebc88461421aaf55e337a -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 04:40:53 2024 Received: (at 73383) by debbugs.gnu.org; 11 Oct 2024 08:40:53 +0000 Received: from localhost ([127.0.0.1]:33395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szBCe-0003xf-SL for submit@debbugs.gnu.org; Fri, 11 Oct 2024 04:40:53 -0400 Received: from mout01.posteo.de ([185.67.36.65]:51417) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szBCc-0003xC-PQ for 73383@debbugs.gnu.org; Fri, 11 Oct 2024 04:40:51 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B7C36240027 for <73383@debbugs.gnu.org>; Fri, 11 Oct 2024 10:40:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1728636032; bh=xoAjCIM4xUD977C6w26sZkpiAA3G9oruzW4QIlAx8dc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=h1LsmtJbpu00tgrqZAgltC19NZ4ZelPOzVpPEq888k1QV1vQTmhzV8zyXBj3bM5gs 5B4jqKWO1mXDPw6gCkpzk2R7/47xw5U3on3hL/s/kgSvRZoJfwpvXm6u4akfLy8De9 ta62o9s5bFw/JWuo1JjeOQnjABd0r3qspIHtWFAQUZppWAED9J8jwq71lBwc0eZasH Fa7Ytgey4mahhJYkjZbg0wWdoS8M1N5n6D7Wu7WbvBgKvRQ8WJxcUPOv9k9uxC3uHB 7+fkYhD001F59mBSnisXZEYY0BR1YUkseBrSYPQnJj/HK/nPV0aFlfIYdxG+dw9eQ6 YzSNjfDH+54NA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XQ0Sb59VLz6tyf; Fri, 11 Oct 2024 10:40:31 +0200 (CEST) From: Dariqq To: 73383@debbugs.gnu.org Subject: [PATCH v2 1/2] home: home-shepherd-configuration: Add silent? field. Date: Fri, 11 Oct 2024 08:39:08 +0000 Message-ID: <604543b7f28f26505e5449b0dc6e46a52c6e325b.1728634996.git.dariqq@posteo.net> In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: ( , Andrew Tropin , Florian Pelz , Ludovic Courtès , Maxim Cournoyer , Tanguy Le Carrour Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73383 Cc: Dariqq 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 (---) * gnu/home/services/shepherd.scm (home-shepherd-configuration): Add silent? field. (launch-shepherd-gexp): Conditionally invoke shepherd with --silent. * doc/guix.texi (home-shepherd-configuration): Document it. Change-Id: I1ce7a92c2777ebded39fe293b0bdcbd03562b4fc --- doc/guix.texi | 4 ++++ gnu/home/services/shepherd.scm | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 8f3b8ef6cd..10d4214563 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -46071,6 +46071,10 @@ Shepherd Home Service @item auto-start? (default: @code{#t}) Whether or not to start Shepherd on first login. +@item silent? (default: @code{#t}) +When true, the @command{shepherd} process does not write +anything to standard output when started automatically. + @item services (default: @code{'()}) A list of @code{} to start. You should probably use the service extension diff --git a/gnu/home/services/shepherd.scm b/gnu/home/services/shepherd.scm index dfe4030a4e..75b80bfa26 100644 --- a/gnu/home/services/shepherd.scm +++ b/gnu/home/services/shepherd.scm @@ -32,6 +32,7 @@ (define-module (gnu home services shepherd) home-shepherd-configuration? home-shepherd-configuration-shepherd home-shepherd-configuration-auto-start? + home-shepherd-configuration-silent? home-shepherd-configuration-services) #:re-export (shepherd-service shepherd-service? @@ -58,6 +59,8 @@ (define-record-type* (default #t)) (daemonize? home-shepherd-configuration-daemonize? (default #t)) + (silent? home-shepherd-configuration-silent? + (default #t)) (services home-shepherd-configuration-services (default '()))) @@ -107,7 +110,8 @@ (define (home-shepherd-configuration-file config) (scheme-file "shepherd.conf" config))) (define (launch-shepherd-gexp config) - (let* ((shepherd (home-shepherd-configuration-shepherd config))) + (let* ((shepherd (home-shepherd-configuration-shepherd config)) + (silent? (home-shepherd-configuration-silent? config))) (if (home-shepherd-configuration-auto-start? config) (with-imported-modules '((guix build utils)) #~(unless (file-exists? @@ -125,6 +129,7 @@ (define (launch-shepherd-gexp config) #$(file-append shepherd "/bin/shepherd") "--logfile" (string-append log-dir "/shepherd.log") + #$@(if silent? '("--silent") '()) "--config" #$(home-shepherd-configuration-file config))))) #~""))) -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 04:40:57 2024 Received: (at 73383) by debbugs.gnu.org; 11 Oct 2024 08:40:57 +0000 Received: from localhost ([127.0.0.1]:33398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szBCj-0003xy-CX for submit@debbugs.gnu.org; Fri, 11 Oct 2024 04:40:57 -0400 Received: from mout02.posteo.de ([185.67.36.66]:54383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szBCh-0003xH-BS for 73383@debbugs.gnu.org; Fri, 11 Oct 2024 04:40:56 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D668A240101 for <73383@debbugs.gnu.org>; Fri, 11 Oct 2024 10:40:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1728636033; bh=9HKf92iY8lByOgDO1Inf7DhvsKuYCG3HbZDuvodF4EQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=csZjU1XOvhhkXT7xhwXOvpfC/I+OgvW1zk168AN9T01AkX93sjXoZ1E32KILC0fjo vgR6xfdrwAem01eaTRU+kgehlMoENEn7atdlxDHdSuNs9zm1QvcD+qeTK1vQtFeUTj 2ciDukkDjsyr3s/+RAP5vdrLpDkbqswATfBpjwX6yqjgOKysoXVuBmwAekaLFsRDFK AWKSE8HkDcOXiN5KCkZrt0VCNzIXoNNiO91LtaWOoVG/R/J9WUcrMwNCtYuTOZpTgi JWObKld4bLeeSMxarxK5go5Ys+32r7AjRGm6azbOROpCnrQe4O0MWiSX5VFKlmx8Sl 32JPmaAYziLPg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XQ0Sc6H6lz6tyd; Fri, 11 Oct 2024 10:40:32 +0200 (CEST) From: Dariqq To: 73383@debbugs.gnu.org Subject: [PATCH v2 2/2] doc: Document home-shepherd-configuration-daemonize? Date: Fri, 11 Oct 2024 08:39:09 +0000 Message-ID: <708aabc3a290dc32536c9a4afc660ecdef646e05.1728634996.git.dariqq@posteo.net> In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: ( , Andrew Tropin , Florian Pelz , Ludovic Courtès , Maxim Cournoyer , Tanguy Le Carrour Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73383 Cc: Dariqq 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 (---) * gnu/home/services/shepherd.scm: Export home-shepherd-configuration-daemonize?. * doc/guix.texi (home-shepherd-configuration): Add entry for daemonize? field. Change-Id: Ifd1518c89fe8d5869d5e6469823dafd8457f24f1 --- doc/guix.texi | 3 +++ gnu/home/services/shepherd.scm | 1 + 2 files changed, 4 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 10d4214563..b786e1b022 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -46071,6 +46071,9 @@ Shepherd Home Service @item auto-start? (default: @code{#t}) Whether or not to start Shepherd on first login. +@item daemonize? (default: @code{#t}) +Whether or not to run Shepherd in the background. + @item silent? (default: @code{#t}) When true, the @command{shepherd} process does not write anything to standard output when started automatically. diff --git a/gnu/home/services/shepherd.scm b/gnu/home/services/shepherd.scm index 75b80bfa26..5ea8462020 100644 --- a/gnu/home/services/shepherd.scm +++ b/gnu/home/services/shepherd.scm @@ -32,6 +32,7 @@ (define-module (gnu home services shepherd) home-shepherd-configuration? home-shepherd-configuration-shepherd home-shepherd-configuration-auto-start? + home-shepherd-configuration-daemonize? home-shepherd-configuration-silent? home-shepherd-configuration-services) #:re-export (shepherd-service -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 14 07:07:30 2024 Received: (at 73383-done) by debbugs.gnu.org; 14 Oct 2024 11:07:30 +0000 Received: from localhost ([127.0.0.1]:35528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0IvC-0001wY-Gi for submit@debbugs.gnu.org; Mon, 14 Oct 2024 07:07:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0Iv7-0001wB-MP for 73383-done@debbugs.gnu.org; Mon, 14 Oct 2024 07:07:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t0Iuk-0000Ed-BL; Mon, 14 Oct 2024 07:07:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=kiu2jd/UsroydRCNoA3fvQP4gTMI3Ub30xUp9zpIqlk=; b=L73Ycp9igU7JtcUia1lp QT/vK+YAO6WuPbaf67UeQAMfQjbj87Sf3Oo7fEGWblWb1JDHKCPtAD5LbK2urzxncoeyCoUGTn2X/ OwZx3iXkh4mvrBQCpbJgOaJSyHhJPq1NSBHtM0E2kAYT2/bkxeIFVHk4gC6nX82C018n4cbO9tCWF 9UQW2wv5vqPa8h1L8VtWnnv+4I4ZEbHK2lhMqA3oDKJm/1q/l6V95FTVQBjK/4IonJKec/K/+bWBS kg665Nb+x40d9mmsOWpjzlrIjaFrVm7ObMVXsKziO2kiWcVZBjvIhzUnJ3LkcOxJaO7zrR/7v0GmU XY2t0pz1Qc/fYA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Dariqq Subject: Re: [bug#73383] [PATCH v2 0/2] home-shepherd-configuration: add silent? and document daemonize? In-Reply-To: (dariqq@posteo.net's message of "Fri, 11 Oct 2024 08:39:07 +0000") References: Date: Mon, 14 Oct 2024 13:07:00 +0200 Message-ID: <87iktv3puz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) 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: 73383-done Cc: Tanguy Le Carrour , Maxim Cournoyer , paren@disroot.org, Florian Pelz , Andrew Tropin , 73383-done@debbugs.gnu.org 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, Dariqq skribis: > Here is v2: > > Changes: > * Change default-value of the silent? field to #t. > * Update the documentation. I added something that (hopefully) makes it = obvious that the field is intended to be used together with the auto-start?= field. > * Added a second patch to document the daemonize? field and export the f= ield-accessor. Should it warn about the issue when dameonize? is #f but aut= o-start? is #t blocking logins? > > Dariqq (2): > home: home-shepherd-configuration: Add silent? field. > doc: Document home-shepherd-configuration-daemonize? Applied, thanks! Ludo=E2=80=99. From unknown Tue Jun 17 20:15:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 11 Nov 2024 12:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator