Subject: bug#59197: closed (Re: bug#59197: [PATCH 0/3] Support 'herd configuration SERVICE' to view config file)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 18 Nov 2022 14:53:02 +0000

Your bug report

#59197: [PATCH 0/3] Support 'herd configuration SERVICE' to view config file

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 [email-masked].

-- 
59197: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59197
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#59197: [PATCH 0/3] Support 'herd configuration SERVICE' to view config file
From: Ludovic Courtès <[email-masked]>
To: 宋文武 <[email-masked]>
Cc: [email-masked]
Date: Fri, 18 Nov 2022 15:52:14 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

宋文武 <[email-masked]> skribis:

> Ludovic Courtès <[email-masked]> writes:
>
>> Hi!
>>
>> So far, to view the config file of sshd, elogind, etc., you'd have to do:
>>
>>   cat /proc/PID/cmdline | xargs -0
>>
>> or sometimes:
>>
>>   cat /proc/PID/environ | xargs -0
>>
>> and extract the config file name from there.
>>
>> With this change, you can do:
>>
>>   cat $(herd configuration elogind)
>>
>> or similar.  Simple but convenient.
>>
>> This patch series adds it to a few core services.  Adding it elsewhere
>> is left as an exercise to the reader.  :-)
>
> Look great to me, thank you!

Thanks for taking a look!

I pushed these patches with two minor changes: added the ‘configuration’
action to dicod, and documented ‘shepherd-configuration-action’.

  8b56983999 home: services: redshift: Add 'configuration' action.
  8d9647d8a7 services: Add Shepherd 'configuration' action to various services.
  ebc7de6a1e services: shepherd: Define 'shepherd-configuration-action' helper.

Ludo’.

Subject: [PATCH 0/3] Support 'herd configuration SERVICE' to view config file
From: Ludovic Courtès <[email-masked]>
To: [email-masked]
Cc: Ludovic Courtès <[email-masked]>
Date: Fri, 11 Nov 2022 19:11:31 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi!

So far, to view the config file of sshd, elogind, etc., you'd have to do:

  cat /proc/PID/cmdline | xargs -0

or sometimes:

  cat /proc/PID/environ | xargs -0

and extract the config file name from there.

With this change, you can do:

  cat $(herd configuration elogind)

or similar.  Simple but convenient.

This patch series adds it to a few core services.  Adding it elsewhere
is left as an exercise to the reader.  :-)

Thoughts?

Ludo’.

Ludovic Courtès (3):
  services: shepherd: Define 'shepherd-configuration-action' helper.
  services: Add Shepherd 'configuration' action to various services.
  home: services: redshift: Add 'configuration' action.

 doc/guix.texi                  | 11 +++++++++++
 gnu/home/services/desktop.scm  |  3 ++-
 gnu/home/services/shepherd.scm |  3 ++-
 gnu/services/avahi.scm         |  5 +++--
 gnu/services/base.scm          |  5 +++--
 gnu/services/desktop.scm       | 12 ++++++++----
 gnu/services/networking.scm    |  4 +++-
 gnu/services/shepherd.scm      | 12 ++++++++++++
 gnu/services/ssh.scm           |  6 +++++-
 gnu/services/web.scm           |  7 +++----
 gnu/services/xorg.scm          | 10 ++++++----
 gnu/tests/base.scm             |  6 ++++++
 12 files changed, 64 insertions(+), 20 deletions(-)

base-commit: 1f5e8ef14ffa385907fc94a754cfff7a45fee50c
prerequisite-patch-id: ee11d213a4ee466dff6379eeaeea292b6ba93fb0
prerequisite-patch-id: 857e9a0f3d1bc9ad5584c44bc767683a53e44972
prerequisite-patch-id: b87a0615ac48fe8950281f797cd2d096a98f4a2c
prerequisite-patch-id: c554e46d5d315cd349df21ba153ef6ed580f0b3c
-- 
2.38.0