GNU bug report logs - #55404
[PATCH 0/2] Make 'description' of <service-type> mandatory

Previous Next

Package: guix-patches;

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

Date: Fri, 13 May 2022 21:44:01 UTC

Severity: normal

Tags: patch

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

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 55404 in the body.
You can then email your comments to 55404 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#55404; Package guix-patches. (Fri, 13 May 2022 21:44:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludo <at> gnu.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 13 May 2022 21:44:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 0/2] Make 'description' of <service-type> mandatory
Date: Fri, 13 May 2022 23:43:18 +0200
Hi!

This change makes the ‘description’ field of <service-type> mandatory.
I think it’s necessary if we are to make ‘guix system search’, ‘guix
home search’, and similar tools useful.

Objections?

Thanks,
Ludo’.

Ludovic Courtès (2):
  services: Add more description fields.
  services: Make <service-type> 'description' field mandatory.

 gnu/services.scm       | 6 +++---
 gnu/services/base.scm  | 3 ++-
 gnu/system/install.scm | 6 ++++--
 gnu/tests.scm          | 7 +++++--
 4 files changed, 14 insertions(+), 8 deletions(-)


base-commit: 2e6f4220cffc72f55f5390a57499e95fc9a03796
-- 
2.36.0





Information forwarded to guix-patches <at> gnu.org:
bug#55404; Package guix-patches. (Fri, 13 May 2022 21:48:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: 55404 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 1/2] services: Add more description fields.
Date: Fri, 13 May 2022 23:46:44 +0200
* gnu/services.scm (simple-service): Add 'description' field.
* gnu/services/base.scm (udev-rules-service): Likewise.
* gnu/system/install.scm (configuration-template-service-type): Likewise.
* gnu/tests.scm (marionette-service-type): Likewise.
---
 gnu/services.scm       | 3 ++-
 gnu/services/base.scm  | 3 ++-
 gnu/system/install.scm | 6 ++++--
 gnu/tests.scm          | 7 +++++--
 4 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/gnu/services.scm b/gnu/services.scm
index e3d4fcc232..234ee372b8 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -292,7 +292,8 @@ (define (simple-service name target value)
 singleton service type NAME, of which the returned service is an instance."
   (let* ((extension (service-extension target identity))
          (type      (service-type (name name)
-                                  (extensions (list extension)))))
+                                  (extensions (list extension))
+                                  (description "This is a simple service."))))
     (service type value)))
 
 (define-syntax %modify-service
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index bcec888587..3fb92e6da0 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -2191,7 +2191,8 @@ (define* (udev-rules-service name rules #:key (groups '()))
                              (service-extension
                               account-service-type account-extension)
                              (service-extension
-                              udev-service-type udev-extension))))))
+                              udev-service-type udev-extension)))
+                (description "This service adds udev rules."))))
     (service type #f)))
 
 (define (swap-space->shepherd-service-name space)
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 073d7df1db..2fbf08f676 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2014-2022 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw <at> netris.org>
 ;;; Copyright © 2016 Andreas Enge <andreas <at> enge.fr>
 ;;; Copyright © 2017 Marius Bakke <mbakke <at> fastmail.com>
@@ -252,7 +252,9 @@ (define configuration-template-service-type
   (service-type (name 'configuration-template)
                 (extensions
                  (list (service-extension etc-service-type
-                                          /etc/configuration-files)))))
+                                          /etc/configuration-files)))
+                (description "Install the operating system configuration file
+templates under @file{/etc/configuration}.")))
 
 (define %configuration-template-service
   (service configuration-template-service-type #t))
diff --git a/gnu/tests.scm b/gnu/tests.scm
index 85f38ae8c9..ca677d315b 100644
--- a/gnu/tests.scm
+++ b/gnu/tests.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2016-2020, 2022 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe <at> gmail.com>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
@@ -161,7 +161,10 @@ (define marionette-service-type
   (service-type (name 'marionette-repl)
                 (extensions
                  (list (service-extension shepherd-root-service-type
-                                          marionette-shepherd-service)))))
+                                          marionette-shepherd-service)))
+                (description "The @dfn{marionette} service allows a guest
+system (virtual machine) to be manipulated by the host.  It is used for system
+tests.")))
 
 (define* (marionette-operating-system os
                                       #:key
-- 
2.36.0





Information forwarded to guix-patches <at> gnu.org:
bug#55404; Package guix-patches. (Fri, 13 May 2022 21:48:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: 55404 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 2/2] services: Make <service-type> 'description' field
 mandatory.
Date: Fri, 13 May 2022 23:46:45 +0200
* gnu/services.scm (<service-type>)[description]: Remove default value.
---
 gnu/services.scm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gnu/services.scm b/gnu/services.scm
index 234ee372b8..6f0f4d5bdc 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -183,8 +183,7 @@ (define-record-type* <service-type> service-type make-service-type
                  (default &no-default-value))
 
   ;; Meta-data.
-  (description  service-type-description          ;string
-                (default #f))
+  (description  service-type-description)         ;string
   (location     service-type-location             ;<location>
                 (default (and=> (current-source-location)
                                 source-properties->location))
-- 
2.36.0





Information forwarded to guix-patches <at> gnu.org:
bug#55404; Package guix-patches. (Wed, 18 May 2022 04:44:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 55404 <at> debbugs.gnu.org
Subject: Re: bug#55404: [PATCH 0/2] Make 'description' of <service-type>
 mandatory
Date: Wed, 18 May 2022 00:43:28 -0400
Hello Ludovic,

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

> Hi!
>
> This change makes the ‘description’ field of <service-type> mandatory.
> I think it’s necessary if we are to make ‘guix system search’, ‘guix
> home search’, and similar tools useful.
>
> Objections?

None.  Go for it!

(LGTM)

Maxim




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 18 May 2022 20:39:01 GMT) Full text and rfc822 format available.

Notification sent to Ludovic Courtès <ludo <at> gnu.org>:
bug acknowledged by developer. (Wed, 18 May 2022 20:39:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 55404-done <at> debbugs.gnu.org
Subject: Re: bug#55404: [PATCH 0/2] Make 'description' of <service-type>
 mandatory
Date: Wed, 18 May 2022 22:37:56 +0200
Hello,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:

> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Hi!
>>
>> This change makes the ‘description’ field of <service-type> mandatory.
>> I think it’s necessary if we are to make ‘guix system search’, ‘guix
>> home search’, and similar tools useful.
>>
>> Objections?
>
> None.  Go for it!

Alright, pushed as 3948ac25b1dccc40c7fdf56377f94a0775a835ee with
additional ‘tests/services.scm’ changes I had forgotten.

Thanks for taking a look!

Ludo’.




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

This bug report was last modified 1 year and 286 days ago.

Previous Next


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