From patchwork Mon Mar 2 08:02:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 20492 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id AB4A927BBEA; Mon, 2 Mar 2020 08:03:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 4C47C27BBE4 for ; Mon, 2 Mar 2020 08:03:10 +0000 (GMT) Received: from localhost ([::1]:56312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8g2f-0007b5-Rv for patchwork@mira.cbaines.net; Mon, 02 Mar 2020 03:03:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35100) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8g2a-0007ax-2u for guix-patches@gnu.org; Mon, 02 Mar 2020 03:03:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8g2Y-0005vk-VV for guix-patches@gnu.org; Mon, 02 Mar 2020 03:03:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59503) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j8g2Y-0005vY-OW for guix-patches@gnu.org; Mon, 02 Mar 2020 03:03:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j8g2Y-0004G6-Lz for guix-patches@gnu.org; Mon, 02 Mar 2020 03:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#39866] [PATCH] services: cuirass: Allow passing extra command line options. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Mar 2020 08:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39866 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39866@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158313616316317 (code B ref -1); Mon, 02 Mar 2020 08:03:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Mar 2020 08:02:43 +0000 Received: from localhost ([127.0.0.1]:37243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8g2F-0004F7-88 for submit@debbugs.gnu.org; Mon, 02 Mar 2020 03:02:43 -0500 Received: from lists.gnu.org ([209.51.188.17]:36538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8g2D-0004Ez-A1 for submit@debbugs.gnu.org; Mon, 02 Mar 2020 03:02:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35055) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8g2C-0007Xa-25 for guix-patches@gnu.org; Mon, 02 Mar 2020 03:02:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8g2A-0005gG-Tc for guix-patches@gnu.org; Mon, 02 Mar 2020 03:02:39 -0500 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:34851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j8g2A-0005dY-Kx for guix-patches@gnu.org; Mon, 02 Mar 2020 03:02:38 -0500 Received: from localhost (unknown [46.237.162.11]) by mira.cbaines.net (Postfix) with ESMTPSA id E0BF327BBE4 for ; Mon, 2 Mar 2020 08:02:35 +0000 (GMT) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 24912c77 for ; Mon, 2 Mar 2020 08:02:33 +0000 (UTC) From: Christopher Baines Date: Mon, 2 Mar 2020 08:02:33 +0000 Message-Id: <20200302080233.28953-1-mail@cbaines.net> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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 (): 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 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