From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Lirzin Subject: Re: Unable to configure a system with 'cuirass-service' Date: Thu, 01 Dec 2016 21:22:51 +0100 Message-ID: <87a8cf9z6s.fsf@gnu.org> References: <20161026130558.31924-1-mthl@gnu.org> <20161026130558.31924-3-mthl@gnu.org> <87k2ctkj7h.fsf@gnu.org> <87bmwy53kn.fsf@gnu.org> <87k2bk63eg.fsf@we.make.ritual.n0.is> <87y4007e6n.fsf@zancanaro.id.au> <87k2bj7rfj.fsf@we.make.ritual.n0.is> <87vav37qky.fsf@zancanaro.id.au> <87polbzst7.fsf@we.make.ritual.n0.is> <87twan7kdu.fsf@zancanaro.id.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCXsh-0000ty-Ev for guix-devel@gnu.org; Thu, 01 Dec 2016 15:23:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cCXsg-00062k-5w for guix-devel@gnu.org; Thu, 01 Dec 2016 15:22:59 -0500 In-Reply-To: <87twan7kdu.fsf@zancanaro.id.au> (Carlo Zancanaro's message of "Fri, 02 Dec 2016 02:13:17 +1100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Carlo Zancanaro Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Hi, Carlo Zancanaro writes: > On Thu, Dec 01 2016, ng0 wrote >> I tried that before (though I did just think it was wrong) and now I >> get the same message as yesterday: >> >> ... >> >> In gnu/services/cuirass.scm: 81: 1 [cuirass-shepherd-service #] In >> unknown file: ?: 0 [string=? "" ((# # # # ...))] >> >> ERROR: In procedure string=?: ERROR: In procedure string=: Wrong >> type argument in position 2 (expecting string): (((#:name . "guix") >> (#:url . "git://git.savannah.gnu.org/guix.git") (#:load-path . ".") >> (#:file . "/.../cuirass/tests/gnu-system.scm") (#:proc . hydra-jobs) >> (#:arguments (subset . "hello")) (#:branch . "master"))) > > It looks like cuirass is expecting the specifications to be a string, > not a list. I don't know anything about cuirass, so I can't help you > to configure the cuirass-service. > > Looking at the source, specifications has a comment ";string > (file-name)". It looks like the "specifications" field of the > configuration is just equivalent to the --specifications argument to the > cuirass command, if that helps at all. Indeed, this is a mistake on my side. Here are 2 patches that should fix this issue. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-gnu-cuirass-Update-to-revision-2.patch >From 707d6f7255eeab39b6694bc81537966cbca0e61d Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Thu, 1 Dec 2016 21:10:18 +0100 Subject: [PATCH 1/2] gnu: cuirass: Update to revision 2. * gnu/packages/ci.scm (cuirass): Update to revision 2. --- gnu/packages/ci.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm index f07e75a..d88ee6d 100644 --- a/gnu/packages/ci.scm +++ b/gnu/packages/ci.scm @@ -185,8 +185,8 @@ their dependencies.") (license l:gpl3+)))) (define-public cuirass - (let ((commit "7248c0038f3d0bfcf6c469d534efb4a13952c112") - (revision "1")) + (let ((commit "05eba838eab4ca928d8df926d70677821714e962") + (revision "2")) (package (name "cuirass") (version (string-append "0.0.1-" revision "." (string-take commit 7))) @@ -198,7 +198,7 @@ their dependencies.") (file-name (string-append name "-" version)) (sha256 (base32 - "0hkwh2pcz3wzg1n533ch2w7vwr97yr369q4ki0yqk99wfipjrydw")))) + "17bchil0dxflf74fncpr6drbpvc43a0hnvp22gp9w58kwpskwvri")))) (build-system gnu-build-system) (arguments '(#:phases -- 2.10.2 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-services-cuirass-Put-specifications-in-the-store.patch >From ab369ae1b894bcbb4045aa70b30399543eb4b050 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Thu, 1 Dec 2016 20:41:08 +0100 Subject: [PATCH 2/2] services: cuirass: Put specifications in the store. * gnu/services/cuirass.scm (): Change type of 'specifications' field to an alist to match the documentation example. (cuirass-shepherd-service): Store the provided specifications in a file. Use that file as the "--specification" argument. --- gnu/services/cuirass.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index d843c07..4975a7e 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -52,8 +52,8 @@ (default 60)) (database cuirass-configuration-database ;string (file-name) (default "/var/run/cuirass/cuirass.db")) - (specifications cuirass-configuration-specifications ;string (file-name) - (default "")) + (specifications cuirass-configuration-specifications ;specification-alist + (default '())) (use-substitutes? cuirass-configuration-use-substitutes? ;boolean (default #f)) (one-shot? cuirass-configuration-one-shot? ;boolean @@ -66,7 +66,7 @@ (let ((cache-directory (cuirass-configuration-cache-directory config)) (interval (cuirass-configuration-interval config)) (database (cuirass-configuration-database config)) - (specifications (cuirass-configuration-specifications config)) + (specs (cuirass-configuration-specifications config)) (use-substitutes? (cuirass-configuration-use-substitutes? config)) (one-shot? (cuirass-configuration-one-shot? config))) (list (shepherd-service @@ -78,9 +78,11 @@ #$@(if (string=? "" cache-directory) '() (list "--cache-directory" cache-directory)) - #$@(if (string=? "" specifications) + #$@(if (null? specs) '() - (list "--specifications" specifications)) + (let ((str (format #f "'~S" specs))) + (list "--specifications" + (plain-file "specs.scm" str)))) "--database" #$database "--interval" #$(number->string interval) #$@(if use-substitutes? '("--use-substitutes") '()) -- 2.10.2 --=-=-= Content-Type: text/plain Tell me if this works better. Next problem to solve is that 'git' is not found in the path even when put in the global packages... Thanks for testing the Cuirass service, -- Mathieu Lirzin --=-=-=--