GNU bug report logs - #29707
"guix system search" doesn't show how to start/stop service

Previous Next

Package: guix;

Reported by: Clément Lassieur <clement <at> lassieur.org>

Date: Thu, 14 Dec 2017 10:58:02 UTC

Severity: normal

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

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 29707 in the body.
You can then email your comments to 29707 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 bug-guix <at> gnu.org:
bug#29707; Package guix. (Thu, 14 Dec 2017 10:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Clément Lassieur <clement <at> lassieur.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 14 Dec 2017 10:58:02 GMT) Full text and rfc822 format available.

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

From: Clément Lassieur <clement <at> lassieur.org>
To: bug-guix <at> gnu.org
Subject: "guix system search" doesn't show how to start/stop service
Date: Thu, 14 Dec 2017 11:30:14 +0100
The "guix system search" command doesn't show how we are supposed to
start/stop the searched service.

For example, I think it would be useful to know that "herd stop
xmpp-daemon" stops the XMPP server and "herd stop xorg-server" stops the
Xorg server.

Neither "guix system search xorg" nor "guix system search slim" says
anything about "xorg-server".




Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Mon, 30 Apr 2018 12:54:02 GMT) Full text and rfc822 format available.

Notification sent to Clément Lassieur <clement <at> lassieur.org>:
bug acknowledged by developer. (Mon, 30 Apr 2018 12:54:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 29707-done <at> debbugs.gnu.org
Subject: Re: bug#29707: "guix system search" doesn't show how to start/stop
 service
Date: Mon, 30 Apr 2018 14:53:21 +0200
Hi Clément,

Clément Lassieur <clement <at> lassieur.org> skribis:

> The "guix system search" command doesn't show how we are supposed to
> start/stop the searched service.
>
> For example, I think it would be useful to know that "herd stop
> xmpp-daemon" stops the XMPP server and "herd stop xorg-server" stops the
> Xorg server.
>
> Neither "guix system search xorg" nor "guix system search slim" says
> anything about "xorg-server".

Commit 6ac8b7359a1ac80e558f41dd37004ffa727dd3c6 does roughly what you
suggested:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix system search slim
name: slim
location: gnu/services/xorg.scm:510:2
extends: shepherd-root pam profile
shepherdnames: xorg-server
relevance: 3
--8<---------------cut here---------------end--------------->8---

Note that there are limitations: here ‘shepherdnames’ is just the list
of names of the _default_ Shepherd services for that service type.  But
due to the way service extensions work, actual Shepherd service names
can very well depend on the configuration of the service.  For example,
‘console-font-service-type’ generates a Shepherd service whose name
depends on its configuration: ‘console-font-tty1’, etc.

Besides, ‘guix system search xmpp’ currently returns nothing, but it
will return something as soon as you’ve added a ‘description’ to
‘prosody-service-type’.  If you add a ‘default-value’, you’ll get
‘shepherdnames’ as well.  Hint hint.  ;-)

Cheers,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#29707; Package guix. (Mon, 30 Apr 2018 23:39:01 GMT) Full text and rfc822 format available.

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

From: Clément Lassieur <clement <at> lassieur.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 29707-done <at> debbugs.gnu.org
Subject: Re: bug#29707: "guix system search" doesn't show how to start/stop
 service
Date: Tue, 01 May 2018 01:38:26 +0200
Hi Ludovic,

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

> Commit 6ac8b7359a1ac80e558f41dd37004ffa727dd3c6 does roughly what you
> suggested:
>
> --8<---------------cut here---------------start------------->8---
> $ ./pre-inst-env guix system search slim
> name: slim
> location: gnu/services/xorg.scm:510:2
> extends: shepherd-root pam profile
> shepherdnames: xorg-server
> relevance: 3
> --8<---------------cut here---------------end--------------->8---
>
> Note that there are limitations: here ‘shepherdnames’ is just the list
> of names of the _default_ Shepherd services for that service type.  But
> due to the way service extensions work, actual Shepherd service names
> can very well depend on the configuration of the service.  For example,
> ‘console-font-service-type’ generates a Shepherd service whose name
> depends on its configuration: ‘console-font-tty1’, etc.

Great!  Thank you!  But I don't understand why the first provision is
the only one that is displayed.  If it's not on purpose, here is a patch
fixing it.

> Besides, ‘guix system search xmpp’ currently returns nothing, but it
> will return something as soon as you’ve added a ‘description’ to
> ‘prosody-service-type’.  If you add a ‘default-value’, you’ll get
> ‘shepherdnames’ as well.  Hint hint.  ;-)

Haha, okay I did it :-)

Clément




Information forwarded to bug-guix <at> gnu.org:
bug#29707; Package guix. (Mon, 30 Apr 2018 23:41:01 GMT) Full text and rfc822 format available.

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

From: Clément Lassieur <clement <at> lassieur.org>
To: 29707-done <at> debbugs.gnu.org
Cc: ludo <at> gnu.org
Subject: [PATCH] guix system: search: Display all provision names as
 'shepherdnames'.
Date: Tue,  1 May 2018 01:39:47 +0200
* guix/scripts/system/search.scm (service-type-shepherd-names): Append
provision lists together instead of returning a list of provision cars.
---
 guix/scripts/system/search.scm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/guix/scripts/system/search.scm b/guix/scripts/system/search.scm
index 7229c60a0..955cdd1e9 100644
--- a/guix/scripts/system/search.scm
+++ b/guix/scripts/system/search.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017, 2018 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2018 Clément Lassieur <clement <at> lassieur.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -59,10 +60,8 @@ provided TYPE has a default value."
 
 (define (service-type-shepherd-names type)
   "Return the default names of Shepherd services created for TYPE."
-  (match (map shepherd-service-provision
-              (service-type-default-shepherd-services type))
-    (((names . _) ...)
-     names)))
+  (append-map shepherd-service-provision
+              (service-type-default-shepherd-services type)))
 
 (define* (service-type->recutils type port
                                  #:optional (width (%text-width))
-- 
2.17.0





Information forwarded to bug-guix <at> gnu.org:
bug#29707; Package guix. (Tue, 01 May 2018 19:57:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 29707-done <at> debbugs.gnu.org
Subject: Re: [PATCH] guix system: search: Display all provision names as
 'shepherdnames'.
Date: Tue, 01 May 2018 21:56:23 +0200
Clément Lassieur <clement <at> lassieur.org> skribis:

> * guix/scripts/system/search.scm (service-type-shepherd-names): Append
> provision lists together instead of returning a list of provision cars.

You’re right, that makes more sense.  OK for me!

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#29707; Package guix. (Tue, 01 May 2018 21:36:01 GMT) Full text and rfc822 format available.

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

From: Clément Lassieur <clement <at> lassieur.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 29707-done <at> debbugs.gnu.org
Subject: Re: [PATCH] guix system: search: Display all provision names as
 'shepherdnames'.
Date: Tue, 01 May 2018 23:35:26 +0200
Ludovic Courtès <ludo <at> gnu.org> writes:

> Clément Lassieur <clement <at> lassieur.org> skribis:
>
>> * guix/scripts/system/search.scm (service-type-shepherd-names): Append
>> provision lists together instead of returning a list of provision cars.
>
> You’re right, that makes more sense.  OK for me!

Cool, pushed!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 30 May 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 331 days ago.

Previous Next


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