GNU bug report logs - #38240
[PATCH] services: sysctl: Make service one-shot.

Previous Next

Package: guix-patches;

Reported by: Efraim Flashner <efraim <at> flashner.co.il>

Date: Sat, 16 Nov 2019 21:43:01 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38240 in the body.
You can then email your comments to 38240 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#38240; Package guix-patches. (Sat, 16 Nov 2019 21:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Efraim Flashner <efraim <at> flashner.co.il>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 16 Nov 2019 21:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: guix-patches <at> gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>
Subject: [PATCH] services: sysctl: Make service one-shot.
Date: Sat, 16 Nov 2019 23:42:06 +0200
* gnu/services/sysctl.scm (sysctl-shepherd-service): Adjust shepherd
service to use '--one-shot' flag. Remove 'respawn' option.
---
 gnu/services/sysctl.scm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gnu/services/sysctl.scm b/gnu/services/sysctl.scm
index 5e9e6f0661..1f1cf38195 100644
--- a/gnu/services/sysctl.scm
+++ b/gnu/services/sysctl.scm
@@ -58,9 +58,8 @@
         (documentation "Configure kernel parameters at boot.")
         (provision '(sysctl))
         (start #~(lambda _
-                   (zero? (system* #$sysctl "--load" #$sysctl.conf))))
-        (stop #~(const #t))
-        (respawn? #f))))))
+                   (zero? (system* #$sysctl "--load" #$sysctl.conf "--one-shot"))))
+        (stop #~(const #t)))))))
 
 (define sysctl-service-type
   (service-type
-- 
2.24.0





Information forwarded to guix-patches <at> gnu.org:
bug#38240; Package guix-patches. (Mon, 18 Nov 2019 08:22:01 GMT) Full text and rfc822 format available.

Message #8 received at 38240 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: 38240 <at> debbugs.gnu.org
Subject: Re: [PATCH v2] services: sysctl: Make service one-shot.
Date: Mon, 18 Nov 2019 10:21:11 +0200
[Message part 1 (text/plain, inline)]
After looking at the 'user-homes' commit to switch that to a one-shot
service, I've made a small change to the patch. (Namely, I removed the
'stop' command).


-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[0001-services-sysctl-Make-service-one-shot.patch (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#38240; Package guix-patches. (Tue, 19 Nov 2019 09:45:01 GMT) Full text and rfc822 format available.

Message #11 received at 38240 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 38240 <at> debbugs.gnu.org
Subject: Re: [bug#38240] [PATCH v2] services: sysctl: Make service one-shot.
Date: Tue, 19 Nov 2019 10:44:27 +0100
Hello,

Efraim Flashner <efraim <at> flashner.co.il> skribis:

> Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
> GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
> Confidentiality cannot be guaranteed on emails sent or received unencrypted
>
> From fa6ed7c614d2b3e42fbcb44878b69ebda37f23e7 Mon Sep 17 00:00:00 2001
> From: Efraim Flashner <efraim <at> flashner.co.il>
> Date: Sat, 16 Nov 2019 23:33:31 +0200
> Subject: [PATCH] services: sysctl: Make service one-shot.
>
> * gnu/services/sysctl.scm (sysctl-shepherd-service): Adjust shepherd
> service to use '--one-shot' flag. Remove 'stop' command. Remove
> 'respawn' option.
> ---
>  gnu/services/sysctl.scm | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/gnu/services/sysctl.scm b/gnu/services/sysctl.scm
> index 5e9e6f0661..e59e345189 100644
> --- a/gnu/services/sysctl.scm
> +++ b/gnu/services/sysctl.scm
> @@ -58,9 +58,7 @@
>          (documentation "Configure kernel parameters at boot.")
>          (provision '(sysctl))
>          (start #~(lambda _
> -                   (zero? (system* #$sysctl "--load" #$sysctl.conf))))
> -        (stop #~(const #t))
> -        (respawn? #f))))))
> +                   (invoke #$sysctl "--load" #$sysctl.conf "--one-shot"))))))))

I think you also need to add (one-shot? #t), right?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#38240; Package guix-patches. (Tue, 19 Nov 2019 09:59:02 GMT) Full text and rfc822 format available.

Message #14 received at 38240 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 38240 <at> debbugs.gnu.org
Subject: Re: [bug#38240] [PATCH v2] services: sysctl: Make service one-shot.
Date: Tue, 19 Nov 2019 11:57:52 +0200
[Message part 1 (text/plain, inline)]
On Tue, Nov 19, 2019 at 10:44:27AM +0100, Ludovic Courtès wrote:
> Hello,
> 
> Efraim Flashner <efraim <at> flashner.co.il> skribis:
> 
> > Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
> > GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
> > Confidentiality cannot be guaranteed on emails sent or received unencrypted
> >
> > From fa6ed7c614d2b3e42fbcb44878b69ebda37f23e7 Mon Sep 17 00:00:00 2001
> > From: Efraim Flashner <efraim <at> flashner.co.il>
> > Date: Sat, 16 Nov 2019 23:33:31 +0200
> > Subject: [PATCH] services: sysctl: Make service one-shot.
> >
> > * gnu/services/sysctl.scm (sysctl-shepherd-service): Adjust shepherd
> > service to use '--one-shot' flag. Remove 'stop' command. Remove
> > 'respawn' option.
> > ---
> >  gnu/services/sysctl.scm | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/gnu/services/sysctl.scm b/gnu/services/sysctl.scm
> > index 5e9e6f0661..e59e345189 100644
> > --- a/gnu/services/sysctl.scm
> > +++ b/gnu/services/sysctl.scm
> > @@ -58,9 +58,7 @@
> >          (documentation "Configure kernel parameters at boot.")
> >          (provision '(sysctl))
> >          (start #~(lambda _
> > -                   (zero? (system* #$sysctl "--load" #$sysctl.conf))))
> > -        (stop #~(const #t))
> > -        (respawn? #f))))))
> > +                   (invoke #$sysctl "--load" #$sysctl.conf "--one-shot"))))))))
> 
> I think you also need to add (one-shot? #t), right?
> 

Indeed. I'm also pretty sure that I don't want the '--one-shot' flag
that I copied from cuirass.

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#38240; Package guix-patches. (Tue, 19 Nov 2019 10:02:01 GMT) Full text and rfc822 format available.

Message #17 received at 38240 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 38240 <at> debbugs.gnu.org
Subject: Re: [bug#38240] [PATCH v3] services: sysctl: Make service one-shot.
Date: Tue, 19 Nov 2019 12:00:53 +0200
[Message part 1 (text/plain, inline)]
Here's yet another newer version :)


-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[0001-services-sysctl-Make-service-one-shot.patch (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#38240; Package guix-patches. (Wed, 20 Nov 2019 14:12:02 GMT) Full text and rfc822 format available.

Message #20 received at 38240 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 38240 <at> debbugs.gnu.org
Subject: Re: [bug#38240] [PATCH v3] services: sysctl: Make service one-shot.
Date: Wed, 20 Nov 2019 15:10:57 +0100
Hello!

Efraim Flashner <efraim <at> flashner.co.il> skribis:

> From 796bf6d1b58d675b04198e536bae62552b16da75 Mon Sep 17 00:00:00 2001
> From: Efraim Flashner <efraim <at> flashner.co.il>
> Date: Sat, 16 Nov 2019 23:33:31 +0200
> Subject: [PATCH] services: sysctl: Make service one-shot.
>
> * gnu/services/sysctl.scm (sysctl-shepherd-service): Adjust shepherd
> service to use the 'one-shot?' keyword. Remove 'stop' command. Remove
> 'respawn' option.
> ---
>  gnu/services/sysctl.scm | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/services/sysctl.scm b/gnu/services/sysctl.scm
> index 5e9e6f0661..2110b80395 100644
> --- a/gnu/services/sysctl.scm
> +++ b/gnu/services/sysctl.scm
> @@ -58,9 +58,8 @@
>          (documentation "Configure kernel parameters at boot.")
>          (provision '(sysctl))
>          (start #~(lambda _
> -                   (zero? (system* #$sysctl "--load" #$sysctl.conf))))
> -        (stop #~(const #t))
> -        (respawn? #f))))))
> +                   (invoke #$sysctl "--load" #$sysctl.conf)))
> +        (one-shot? #t))))))

Perhaps we’d rather keep the (zero? (system* …)) idiom here, so that
‘herd start’ gracefully reports failure of ‘sysctl’.

Apart from that, it’s all good to me!  :-)

Ludo’.




Reply sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Wed, 20 Nov 2019 19:26:01 GMT) Full text and rfc822 format available.

Notification sent to Efraim Flashner <efraim <at> flashner.co.il>:
bug acknowledged by developer. (Wed, 20 Nov 2019 19:26:31 GMT) Full text and rfc822 format available.

Message #25 received at 38240-done <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 38240-done <at> debbugs.gnu.org
Subject: Re: [bug#38240] [PATCH v3] services: sysctl: Make service one-shot.
Date: Wed, 20 Nov 2019 21:24:52 +0200
[Message part 1 (text/plain, inline)]
On Wed, Nov 20, 2019 at 03:10:57PM +0100, Ludovic Courtès wrote:
> Hello!
> 
> Efraim Flashner <efraim <at> flashner.co.il> skribis:
> 
> > From 796bf6d1b58d675b04198e536bae62552b16da75 Mon Sep 17 00:00:00 2001
> > From: Efraim Flashner <efraim <at> flashner.co.il>
> > Date: Sat, 16 Nov 2019 23:33:31 +0200
> > Subject: [PATCH] services: sysctl: Make service one-shot.
> >
> > * gnu/services/sysctl.scm (sysctl-shepherd-service): Adjust shepherd
> > service to use the 'one-shot?' keyword. Remove 'stop' command. Remove
> > 'respawn' option.
> > ---
> >  gnu/services/sysctl.scm | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/gnu/services/sysctl.scm b/gnu/services/sysctl.scm
> > index 5e9e6f0661..2110b80395 100644
> > --- a/gnu/services/sysctl.scm
> > +++ b/gnu/services/sysctl.scm
> > @@ -58,9 +58,8 @@
> >          (documentation "Configure kernel parameters at boot.")
> >          (provision '(sysctl))
> >          (start #~(lambda _
> > -                   (zero? (system* #$sysctl "--load" #$sysctl.conf))))
> > -        (stop #~(const #t))
> > -        (respawn? #f))))))
> > +                   (invoke #$sysctl "--load" #$sysctl.conf)))
> > +        (one-shot? #t))))))
> 
> Perhaps we’d rather keep the (zero? (system* …)) idiom here, so that
> ‘herd start’ gracefully reports failure of ‘sysctl’.

I didn't think that'd be a problem.

> 
> Apart from that, it’s all good to me!  :-)
> 
> Ludo’.

Ok, patch pushed!

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 19 Dec 2019 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 128 days ago.

Previous Next


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