all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#39866] [PATCH] services: cuirass: Allow passing extra command line options.
@ 2020-03-02  8:02 Christopher Baines
  2020-03-07 21:21 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Baines @ 2020-03-02  8:02 UTC (permalink / raw)
  To: 39866

This is so that the options supported by the service configuration don't have
to always be changed. Generally though all options should be explicitly
supported and documented, so this is mostly to facilitate experimentation.

* gnu/services/cuirass.scm (<cuirass-configuration>): Add an extra-options
field.
(cuirass-shepherd-service): Pass the extra options to the shepherd servvices.
* doc/guix.texi (Continuous Integration): Document it.
---
 doc/guix.texi            |  3 +++
 gnu/services/cuirass.scm | 13 +++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index fab9159530..43fd17e59f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -22445,6 +22445,9 @@ Only evaluate specifications and build derivations once.
 When substituting a pre-built binary fails, fall back to building
 packages locally.
 
+@item @code{extra-options} (default: @code{'()})
+Extra options to pass when running the Cuirass processes.
+
 @item @code{cuirass} (default: @code{cuirass})
 The Cuirass package to use.
 @end table
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index 7bfb021161..0f4f0f9948 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -77,7 +77,9 @@
   (one-shot?        cuirass-configuration-one-shot? ;boolean
                     (default #f))
   (fallback?        cuirass-configuration-fallback? ;boolean
-                    (default #f)))
+                    (default #f))
+  (extra-options    cuirass-configuration-extra-options
+                    (default '())))
 
 (define (cuirass-shepherd-service config)
   "Return a <shepherd-service> for the Cuirass service with CONFIG."
@@ -95,7 +97,8 @@
         (specs            (cuirass-configuration-specifications config))
         (use-substitutes? (cuirass-configuration-use-substitutes? config))
         (one-shot?        (cuirass-configuration-one-shot? config))
-        (fallback?        (cuirass-configuration-fallback? config)))
+        (fallback?        (cuirass-configuration-fallback? config))
+        (extra-options    (cuirass-configuration-extra-options config)))
     (list (shepherd-service
            (documentation "Run Cuirass.")
            (provision '(cuirass))
@@ -110,7 +113,8 @@
                            "--interval" #$(number->string interval)
                            #$@(if use-substitutes? '("--use-substitutes") '())
                            #$@(if one-shot? '("--one-shot") '())
-                           #$@(if fallback? '("--fallback") '()))
+                           #$@(if fallback? '("--fallback") '())
+                           #$@extra-options)
 
                      #:environment-variables
                      (list "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt"
@@ -137,7 +141,8 @@
                            "--listen" #$host
                            "--interval" #$(number->string interval)
                            #$@(if use-substitutes? '("--use-substitutes") '())
-                           #$@(if fallback? '("--fallback") '()))
+                           #$@(if fallback? '("--fallback") '())
+                           #$@extra-options)
 
                      #:user #$user
                      #:group #$group
-- 
2.25.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#39866] [PATCH] services: cuirass: Allow passing extra command line options.
  2020-03-02  8:02 [bug#39866] [PATCH] services: cuirass: Allow passing extra command line options Christopher Baines
@ 2020-03-07 21:21 ` Ludovic Courtès
  2020-03-08 23:55   ` bug#39866: " Christopher Baines
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2020-03-07 21:21 UTC (permalink / raw)
  To: Christopher Baines; +Cc: 39866

Christopher Baines <mail@cbaines.net> skribis:

> This is so that the options supported by the service configuration don't have
> to always be changed. Generally though all options should be explicitly
> supported and documented, so this is mostly to facilitate experimentation.
>
> * gnu/services/cuirass.scm (<cuirass-configuration>): Add an extra-options
> field.
> (cuirass-shepherd-service): Pass the extra options to the shepherd servvices.
> * doc/guix.texi (Continuous Integration): Document it.

LGTM too!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#39866: [PATCH] services: cuirass: Allow passing extra command line options.
  2020-03-07 21:21 ` Ludovic Courtès
@ 2020-03-08 23:55   ` Christopher Baines
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher Baines @ 2020-03-08 23:55 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 39866-done

[-- Attachment #1: Type: text/plain, Size: 639 bytes --]


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

> Christopher Baines <mail@cbaines.net> skribis:
>
>> This is so that the options supported by the service configuration don't have
>> to always be changed. Generally though all options should be explicitly
>> supported and documented, so this is mostly to facilitate experimentation.
>>
>> * gnu/services/cuirass.scm (<cuirass-configuration>): Add an extra-options
>> field.
>> (cuirass-shepherd-service): Pass the extra options to the shepherd servvices.
>> * doc/guix.texi (Continuous Integration): Document it.
>
> LGTM too!

Thanks for taking a look, I've pushed this now :)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-09  1:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02  8:02 [bug#39866] [PATCH] services: cuirass: Allow passing extra command line options Christopher Baines
2020-03-07 21:21 ` Ludovic Courtès
2020-03-08 23:55   ` bug#39866: " Christopher Baines

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.