unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Cuirass service vs. ‘--web’
@ 2019-08-17 21:32 Ludovic Courtès
  2019-08-17 21:47 ` Ricardo Wurmus
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2019-08-17 21:32 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Hello Ricardo and all,

In commit 2eb0628a423a36bc21777d7439885baa9a9a8e6d I updated the
‘cuirass’ package so it can work with Guile-JSON 3.  However, as a
result, the new ‘cuirass’ package won’t start the web interface unless
‘--web’ is passed, right?

Should we update the Cuirass service in (gnu services …) so that it
starts both processes?

(I won’t be able to look into it until the end of next week or so, if
anyone is willing to give it a spin…)

Thanks,
Ludo’.

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

* Re: Cuirass service vs. ‘--web’
  2019-08-17 21:32 Cuirass service vs. ‘--web’ Ludovic Courtès
@ 2019-08-17 21:47 ` Ricardo Wurmus
  0 siblings, 0 replies; 2+ messages in thread
From: Ricardo Wurmus @ 2019-08-17 21:47 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


Hi Ludo,

> In commit 2eb0628a423a36bc21777d7439885baa9a9a8e6d I updated the
> ‘cuirass’ package so it can work with Guile-JSON 3.  However, as a
> result, the new ‘cuirass’ package won’t start the web interface unless
> ‘--web’ is passed, right?

Right.

> Should we update the Cuirass service in (gnu services …) so that it
> starts both processes?
>
> (I won’t be able to look into it until the end of next week or so, if
> anyone is willing to give it a spin…)

I wrote this change but hadn’t committed it:

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index f92d33bf94..138a5cf67c 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -106,8 +106,6 @@
                             #$(scheme-file "cuirass-specs.scm" specs)
                             "--database" #$database
                             "--ttl" #$(string-append (number->string ttl) "s")
-                            "--port" #$(number->string port)
-                            "--listen" #$host
                             "--interval" #$(number->string interval)
                             #$@(if use-substitutes? '("--use-substitutes") '())
                             #$@(if one-shot? '("--one-shot") '())
@@ -118,6 +116,28 @@
                             (string-append "GIT_EXEC_PATH=" #$git
                                            "/libexec/git-core"))
 
+                      #:user #$user
+                      #:group #$group
+                      #:log-file #$log-file))
+            (stop #~(make-kill-destructor)))
+           (shepherd-service
+            (documentation "Run Cuirass web interface.")
+            (provision '(cuirass-web))
+            (requirement '(guix-daemon networking))
+            (start #~(make-forkexec-constructor
+                      (list (string-append #$cuirass "/bin/cuirass")
+                            "--cache-directory" #$cache-directory
+                            "--specifications"
+                            #$(scheme-file "cuirass-specs.scm" specs)
+                            "--database" #$database
+                            "--ttl" #$(string-append (number->string ttl) "s")
+                            "--web"
+                            "--port" #$(number->string port)
+                            "--listen" #$host
+                            "--interval" #$(number->string interval)
+                            #$@(if use-substitutes? '("--use-substitutes") '())
+                            #$@(if fallback? '("--fallback") '()))
+
                       #:user #$user
                       #:group #$group
                       #:log-file #$log-file))
--8<---------------cut here---------------end--------------->8---


-- 
Ricardo

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

end of thread, other threads:[~2019-08-17 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-17 21:32 Cuirass service vs. ‘--web’ Ludovic Courtès
2019-08-17 21:47 ` Ricardo Wurmus

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