all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Build custom packages with cuirass.
@ 2017-01-22 15:47 Mathieu OTHACEHE
  2017-01-22 23:42 ` Mathieu Lirzin
  0 siblings, 1 reply; 4+ messages in thread
From: Mathieu OTHACEHE @ 2017-01-22 15:47 UTC (permalink / raw)
  To: guix-devel

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


Hi,

I'm trying to use cuirass to build all the packages of my current
manifest on top of guix master periodically.

Some of my packages are custom, so I need cuirass to be aware of
GUIX_PACKAGE_PATH env variable.

The only way I found is to patch cuirass service (cf. following patch).
Is this a good idea ? Is someone doing this kind of stuff here ?

Thank you,

Mathieu

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-wip-cuirass-env-variables.patch --]
[-- Type: text/x-patch, Size: 1794 bytes --]

From 9474cce0a6b9c303efa99124a98b99684995e0f8 Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <m.othacehe@gmail.com>
Date: Sun, 22 Jan 2017 16:27:39 +0100
Subject: [PATCH] wip: cuirass env variables

---
 gnu/services/cuirass.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index 1194133f6..8ca36f4c8 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -64,7 +64,9 @@
   (use-substitutes? cuirass-configuration-use-substitutes? ;boolean
                     (default #f))
   (one-shot?        cuirass-configuration-one-shot? ;boolean
-                    (default #f)))
+                    (default #f))
+  (env              cuirass-configuration-env
+                    (default '())))
 
 (define (cuirass-shepherd-service config)
   "Return a <shepherd-service> for the Cuirass service with CONFIG."
@@ -80,7 +82,8 @@
          (port             (cuirass-configuration-port config))
          (specs            (cuirass-configuration-specifications config))
          (use-substitutes? (cuirass-configuration-use-substitutes? config))
-         (one-shot?        (cuirass-configuration-one-shot? config)))
+         (one-shot?        (cuirass-configuration-one-shot? config))
+         (env              (cuirass-configuration-env config)))
      (list (shepherd-service
             (documentation "Run Cuirass.")
             (provision '(cuirass))
@@ -97,6 +100,7 @@
                             #$@(if one-shot? '("--one-shot") '()))
                       #:user #$user
                       #:group #$group
+                      #:environment-variables (list #$@env)
                       #:log-file #$log-file))
             (stop #~(make-kill-destructor)))))))
 
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Build custom packages with cuirass.
  2017-01-22 15:47 Build custom packages with cuirass Mathieu OTHACEHE
@ 2017-01-22 23:42 ` Mathieu Lirzin
  2017-01-23  8:57   ` Mathieu OTHACEHE
  0 siblings, 1 reply; 4+ messages in thread
From: Mathieu Lirzin @ 2017-01-22 23:42 UTC (permalink / raw)
  To: Mathieu OTHACEHE; +Cc: guix-devel

Hi,

Mathieu OTHACEHE <m.othacehe@gmail.com> writes:

> I'm trying to use cuirass to build all the packages of my current
> manifest on top of guix master periodically.
>
> Some of my packages are custom, so I need cuirass to be aware of
> GUIX_PACKAGE_PATH env variable.
>
> The only way I found is to patch cuirass service (cf. following patch).
> Is this a good idea ? Is someone doing this kind of stuff here ?

A quick and dirty way to fix your issue would be to add the absolute
base directory name for your custom package modules in the '#:load-path'
part of you specification.  However this will only work if your modules
names are '(gnu packages ...)'.

I guess Cuirass should handle this use case with '-L', '--load-path'
command line arguments like what 'guix build' does.  WDYT?

Would you be interested in implementing this?

Thanks.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Build custom packages with cuirass.
  2017-01-22 23:42 ` Mathieu Lirzin
@ 2017-01-23  8:57   ` Mathieu OTHACEHE
  2017-01-24 18:41     ` Mathieu Lirzin
  0 siblings, 1 reply; 4+ messages in thread
From: Mathieu OTHACEHE @ 2017-01-23  8:57 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel


> I guess Cuirass should handle this use case with '-L', '--load-path'
> command line arguments like what 'guix build' does.  WDYT?

Yes, it would be better than my initial idea.

>
> Would you be interested in implementing this?

Yes of course :)

Using cuirass I also noticed two other things that might need to be fixed:

* When network isn't up yet at cuirass service start,
or goes down for a moment, the url fetching
fails and cuirass service stays hanged and needs to be restarted.

* For an unknown reason, I have random freezes of cuirass, the polling
  stops and nothing is outputed to log. I'm stracing it to find out why
  ...

Otherwise it works fine for me !

Mathieu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Build custom packages with cuirass.
  2017-01-23  8:57   ` Mathieu OTHACEHE
@ 2017-01-24 18:41     ` Mathieu Lirzin
  0 siblings, 0 replies; 4+ messages in thread
From: Mathieu Lirzin @ 2017-01-24 18:41 UTC (permalink / raw)
  To: Mathieu OTHACEHE; +Cc: guix-devel

Hi,

Mathieu OTHACEHE <m.othacehe@gmail.com> writes:

> Using cuirass I also noticed two other things that might need to be fixed:
>
> * When network isn't up yet at cuirass service start,
> or goes down for a moment, the url fetching
> fails and cuirass service stays hanged and needs to be restarted.
>
> * For an unknown reason, I have random freezes of cuirass, the polling
>   stops and nothing is outputed to log. I'm stracing it to find out why
>   ...

I have created 2 separate issues on Notabug Web interface to track those
bugs:

  https://notabug.org/mthl/cuirass/issues

Thanks for reporting them.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-24 18:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-22 15:47 Build custom packages with cuirass Mathieu OTHACEHE
2017-01-22 23:42 ` Mathieu Lirzin
2017-01-23  8:57   ` Mathieu OTHACEHE
2017-01-24 18:41     ` Mathieu Lirzin

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.