unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Lirzin <mthl@gnu.org>
To: Carlo Zancanaro <carlo@zancanaro.id.au>
Cc: guix-devel@gnu.org
Subject: Re: Unable to configure a system with 'cuirass-service'
Date: Thu, 01 Dec 2016 21:22:51 +0100	[thread overview]
Message-ID: <87a8cf9z6s.fsf@gnu.org> (raw)
In-Reply-To: <87twan7kdu.fsf@zancanaro.id.au> (Carlo Zancanaro's message of "Fri, 02 Dec 2016 02:13:17 +1100")

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

Hi,

Carlo Zancanaro <carlo@zancanaro.id.au> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-cuirass-Update-to-revision-2.patch --]
[-- Type: text/x-diff, Size: 1263 bytes --]

From 707d6f7255eeab39b6694bc81537966cbca0e61d Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <mthl@gnu.org>
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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-services-cuirass-Put-specifications-in-the-store.patch --]
[-- Type: text/x-diff, Size: 2743 bytes --]

From ab369ae1b894bcbb4045aa70b30399543eb4b050 Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <mthl@gnu.org>
Date: Thu, 1 Dec 2016 20:41:08 +0100
Subject: [PATCH 2/2] services: cuirass: Put specifications in the store.

* gnu/services/cuirass.scm (<cuirass-configuration>): 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


[-- Attachment #4: Type: text/plain, Size: 194 bytes --]


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

  reply	other threads:[~2016-12-01 20:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 13:05 [PATCH 0/2] Cuirass package + service Mathieu Lirzin
2016-10-26 13:05 ` [PATCH 1/2] gnu: Add Cuirass Mathieu Lirzin
2016-10-26 13:36   ` David Craven
2016-11-29 22:25     ` Mathieu Lirzin
2016-11-30 13:10       ` Ludovic Courtès
2016-10-26 13:05 ` [PATCH 2/2] services: Add 'cuirass-service' Mathieu Lirzin
2016-10-26 13:35   ` David Craven
2016-10-26 14:42     ` Mathieu Lirzin
2016-10-26 18:57       ` David Craven
2016-10-27  0:22   ` Leo Famulari
2016-11-06 13:16     ` Andreas Enge
2016-10-27 13:36   ` Ludovic Courtès
2016-11-29 22:22     ` Mathieu Lirzin
2016-11-30 21:53       ` Unable to configure a system with 'cuirass-service' ng0
2016-11-30 23:14         ` Carlo Zancanaro
2016-12-01 12:41           ` ng0
2016-12-01 12:59             ` Carlo Zancanaro
2016-12-01 13:23               ` ng0
2016-12-01 15:13                 ` Carlo Zancanaro
2016-12-01 20:22                   ` Mathieu Lirzin [this message]
2016-12-15 21:58                     ` Mathieu Lirzin
2016-12-15 22:55                       ` ng0
2016-12-15 23:15                         ` Mathieu Lirzin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a8cf9z6s.fsf@gnu.org \
    --to=mthl@gnu.org \
    --cc=carlo@zancanaro.id.au \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).