diff mbox

Unable to configure a system with 'cuirass-service'

Message ID 87a8cf9z6s.fsf@gnu.org
State New
Headers show

Commit Message

Mathieu Lirzin Dec. 1, 2016, 8:22 p.m. UTC
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.
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,

Comments

Mathieu Lirzin Dec. 15, 2016, 9:58 p.m. UTC | #1
Hi,

Mathieu Lirzin <mthl@gnu.org> writes:

> 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.

I went ahead and pushed them in commits:

 - 44ccd9622eb4a0083d4f833a61172973390ca62b
 - 57aa94bd7e7d530e52356723c8f1dbf727144b25

Thanks,
ng0 Dec. 15, 2016, 10:55 p.m. UTC | #2
Mathieu Lirzin <mthl@gnu.org> writes:

> Hi,
>
> Mathieu Lirzin <mthl@gnu.org> writes:
>
>> 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.
>
> I went ahead and pushed them in commits:
>
>  - 44ccd9622eb4a0083d4f833a61172973390ca62b
>  - 57aa94bd7e7d530e52356723c8f1dbf727144b25
>
> Thanks,
>
> -- 
> Mathieu Lirzin
>

Thanks, I wasn't able to test them before and provide you with
feedback, I was just busy and the CI is kind of low priority for
gnunet. But we'd like to get a CI running on our own
infrastructure on systems like GuixSD as far as I understood
conversations so far.

But I am aware that a general CI might still take some time with
cuirass.
Mathieu Lirzin Dec. 15, 2016, 11:15 p.m. UTC | #3
ng0 <ng0@libertad.pw> writes:

> Mathieu Lirzin <mthl@gnu.org> writes:
>
>> Hi,
>>
>> Mathieu Lirzin <mthl@gnu.org> writes:
>>
>>> 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.
>>
>> I went ahead and pushed them in commits:
>>
>>  - 44ccd9622eb4a0083d4f833a61172973390ca62b
>>  - 57aa94bd7e7d530e52356723c8f1dbf727144b25
>>
>> Thanks,
>>
>> -- 
>> Mathieu Lirzin
>>
>
> Thanks, I wasn't able to test them before and provide you with
> feedback, I was just busy and the CI is kind of low priority for
> gnunet. 

Sure no problem.
diff mbox

Patch

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