[PATCH] services: cuirass: Allow passing extra command line options.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Christopher Baines
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal

Debbugs page

Christopher Baines wrote 5 years ago
(address . guix-patches@gnu.org)
20200302080233.28953-1-mail@cbaines.net
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(-)

Toggle diff (61 lines)
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
Ludovic Courtès wrote 5 years ago
(name . Christopher Baines)(address . mail@cbaines.net)(address . 39866@debbugs.gnu.org)
87d09neu98.fsf@gnu.org
Christopher Baines <mail@cbaines.net> skribis:

Toggle quote (9 lines)
> 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!
Christopher Baines wrote 5 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 39866-done@debbugs.gnu.org)
878skae703.fsf@cbaines.net
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (13 lines)
> 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 :)
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl5lhgxfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9Xd5RA//TtnVqrPLsdZjjnz0fy8o6g0prBvypmscZLy0uqL7dW+pE8e15Kx7xjJ0
v3GfLBfcJrsHNkS5aUa1vmlGP2mZKiLhWqKmyf+3mZxN5xg16ISBAAvUIFNrpD7j
FjJoj8yeL6i/dprphmBydi9W+FDXLYd54swWwmcuv8oNf/ZGuVP0am+dR+//kbu1
7GDQQmx90clVEzXNfMmJ5iGkff5PMlOCLRNJeGUfhlJSViDti4i1EG+Dr/IbmFba
+VKZf3TUmwiFvWtlG1TvXZRkl2JpzQya+TR9t7n6lsPZMue8sNNXFUqnJcu9av/W
wYGS0a9xaT4+JeWPfSMz4aPZwCs/62wpf5OzcVt60fEMPv0M0b56t95bEqhSsO2e
NhMinyvRomtOCcQ98cdFCbMfv256eG0JBykoAxDdOzmv8GRNHWNpCznhLbLMJh5t
bj+Y3biDEAQw764pVRYCd2JNxMFFxwKfoYDZu00rt6x5G7J9wRdAqFIgSSCn94Ow
MfDqgm6SdiYFIov+MBpfeqKzJ+qqRWLUW2P6MOorj7veh0IjtS44X0Dsq/9HjDep
zVZz9jnNFB+zt2lxe1E6T5NrQujdoOlNhaI+GtT3lAdcNz0IwYaXZ/Q0FfhbAuGs
Rl25fiG0G61QTz4z+geEhyyJ4oZLBeEJcuVjPmIbzPFHjl6Bkfs=
=Fktl
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 39866@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 39866
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help