* Understanding Cuirass
@ 2018-11-09 0:00 Björn Höfling
2018-11-09 6:46 ` Mathieu Othacehe
0 siblings, 1 reply; 3+ messages in thread
From: Björn Höfling @ 2018-11-09 0:00 UTC (permalink / raw)
To: Guix-Help
[-- Attachment #1: Type: text/plain, Size: 1831 bytes --]
Hi,
I want to give Cuirass a try but I don't understand it (For the
reference: talking about version 0.0.1-21.0b40dca). From the
doc/curiass.texi I copy this snipped of a specification:
'((#:name . "foo-master")
(#:load-path-inputs . ("guix"))
(#:package-path-inputs . ("packages"))
(#:proc-input . "conf")
(#:proc-file . "drv-list.scm")
(#:proc . cuirass-jobs)
(#:proc-args (subset . "foo"))
(#:inputs . (((#:name . "guix")
(#:url . "git://git.savannah.gnu.org/guix.git")
(#:load-path . ".")
(#:branch . "master")
(#:no-compile? . #t))
((#:name . "conf")
(#:url . "git://my-personal-conf.git")
(#:load-path . ".")
(#:branch . "master")
(#:no-compile? . #t))
* What should the procedure #:proc return?
* What is the format of #:proc-args? Must this be an assoc-list or can
it be just anything?
* How is that used? Is it always the second parameter to the proc?
* And is the first one always a reference to the store?
In earlier examples like [0], the #:proc-file (then called #:file)
could be a plain file lying around. Now it looks like it must be
relative to one of its inputs, which is referenced by #:proc-input. Is
this right? Is the old variant still possible?
What forms can the inputs have? The documentation says it must always
be git (either git:// or smart HTTPS). In examples/random.scm I saw
also the form "file://", but when I tried it I got some error message
(can't remember which one exactly). Is this allowed?
Am I right that besides from an example this is underdocumented, or did
I miss something?
Björn
[0] https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00222.html
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Understanding Cuirass
2018-11-09 0:00 Understanding Cuirass Björn Höfling
@ 2018-11-09 6:46 ` Mathieu Othacehe
2018-11-09 20:56 ` Björn Höfling
0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Othacehe @ 2018-11-09 6:46 UTC (permalink / raw)
To: Björn Höfling; +Cc: Guix-Help
Hi Björn,
The Cuirass documentation should still be improved, so I understand your
questions. Here are some answers, feel free to improve the manual
afterwards :)
> * What should the procedure #:proc return?
The procedure #:proc takes exactly two arguments, the guix store and
an association list often called ARGUMENTS. The association list will
be the concatenation of #:proc-args and another association list
describing the sources that have been checked out by Cuirass, under
the form:
(INPUT-NAME (('file-name . "/gnu/store/path-of-the-checkouted-input")
('revision . "git-sha1-of-the-checkouted-input")
('load-path . INPUT-LOAD-PATH)
('no-compile? . INPUT-NO-COMPILE?)))
The role of #:proc is to return a list of 'jobs', which are mainly
derivations that have to be build.
They have to be under the following format:
(list (lambda ()
((#:job-name . "NAME-OF-THE-JOB")
(#:derivation . "/gnu/store/derivation-to-build.drv")))
...)
> * What is the format of #:proc-args? Must this be an assoc-list or can
> it be just anything?
No I think it has to be an assoc-list otherwise, the procedure
FORMAT-CHECKOUTS of cuirass/bin/evaluate.in won't be happy.
Have a look to the HYDRA-JOBS procedure in
guix/build-aux/hydra/gnu-system.scm. It is wrapped by the CUIRASS-JOBS
procedure and passed as #:proc in
guix-maintenance/hydra/modules/sysadmin/services.scm (configuration of
Cuirass for the Berlin server).
HYDRA-JOBS will look for the following keys in ARGUMENTS:
* SUBSET ("core", "hello", (list of packages), (list of manifests)).
* SYSTEM ("x86_64-linux", "i686-linux", ...)
So, if we take the exemple of HYDRA-JOBS called with SUBSET to "hello"
and SYSTEM to "x86_64-linux", its role will be to return a list
containing exactly one job, giving the derivation of the "hello"
package for x86_64-linux, that has to be build.
> * How is that used? Is it always the second parameter to the proc?
See above.
> * And is the first one always a reference to the store?
Yes.
> In earlier examples like [0], the #:proc-file (then called #:file)
> could be a plain file lying around. Now it looks like it must be
> relative to one of its inputs, which is referenced by #:proc-input. Is
> this right? Is the old variant still possible?
Yes it is right. #:proc-file should be the path of the file containing
#:proc in the specified #:proc-input.
No, you cannot use #:file anymore.
>
> What forms can the inputs have? The documentation says it must always
> be git (either git:// or smart HTTPS). In examples/random.scm I saw
> also the form "file://", but when I tried it I got some error message
> (can't remember which one exactly). Is this allowed?
The #:url field of an input will be passed to the
LATEST-REPOSITORY-COMMIT of (guix git), using the CLONE procedure of
Guile-Git and the GIT-CLONE function of libgit2 in-fine.
I'm not sure what are the exact protocols supported by GIT-CLONE, you'll
have to inspect the libgit2 library. Maybe trying something like:
,use (guix git)
,use (guix store)
(latest-repository-commit (open-connection) "file://path-to-git-repo"
#:cache-directory "/tmp")
to see if it works!
Don't hesitate if you have other questions.
Mathieu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Understanding Cuirass
2018-11-09 6:46 ` Mathieu Othacehe
@ 2018-11-09 20:56 ` Björn Höfling
0 siblings, 0 replies; 3+ messages in thread
From: Björn Höfling @ 2018-11-09 20:56 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: Guix-Help
[-- Attachment #1: Type: text/plain, Size: 635 bytes --]
Hi Mathieu,
On Fri, 09 Nov 2018 15:46:10 +0900
Mathieu Othacehe <m.othacehe@gmail.com> wrote:
> Hi Björn,
>
> The Cuirass documentation should still be improved, so I understand
> your questions. Here are some answers, feel free to improve the manual
> afterwards :)
>
[...]
> Don't hesitate if you have other questions.
Thanks for your answers. That brought me a step further. Now I have to
digest that and try out things. Currently the random-example works
mostly, my example produces nothing, but without errors. I will try out
more and come back when I can formulate questions (or answers).
Björn
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-09 20:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-09 0:00 Understanding Cuirass Björn Höfling
2018-11-09 6:46 ` Mathieu Othacehe
2018-11-09 20:56 ` Björn Höfling
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).