all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 28504@debbugs.gnu.org
Subject: [bug#28504] [PATCH] cuirass: Add --listen command line option.
Date: Tue, 19 Sep 2017 17:32:16 +0200	[thread overview]
Message-ID: <87shfi1z7j.fsf@gnu.org> (raw)
In-Reply-To: <87shfj56wc.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 19 Sep 2017 12:17:55 +0200")

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

Ludovic Courtès writes:

>> * bin/cuirass.in (show-help): Add help for --listen option.
>> (%options): Add listen option.
>> (main): Pass host to run-cuirass-server.
>> * doc/cuirass.texi (Invocation): Add --listen option.
>> * src/cuirass/http.scm (run-cuirass-server): Add named #:host parameter.
>
> Good idea, LGTM thanks!

Pushed to guix-cuirass master as 2a4d493e28100b8eca7d23300dd872c9f99e1f16

Attached is the corresponding Guixy side (or should I close this one and
open a new bug?).

Greetings,
janneke


[-- Attachment #2: 0001-services-cuirass-Add-host-option.patch --]
[-- Type: text/x-patch, Size: 3184 bytes --]

From 5e14a890c0ffa1b9a753be8b9a9d516f14a6955f Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Mon, 18 Sep 2017 22:12:18 +0200
Subject: [PATCH] services: cuirass: Add host option.

* gnu/services/cuirass.scm (<cuirass-configuration>): Add host option.
(cuirass-shepherd-service): Pass host option.
* doc/guix.texi (Continuous Integration): Document it.
---
 doc/guix.texi            | 4 ++++
 gnu/services/cuirass.scm | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 1356a357c..deb055e29 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -15335,6 +15335,10 @@ added specifications.
 @item @code{port} (default: @code{8081})
 Port number used by the HTTP server.
 
+@item --listen=@var{host}
+Listen on the network interface for @var{host}.  The default is to
+accept connections from localhost.
+
 @item @code{specifications} (default: @code{#~'()})
 A gexp (@pxref{G-Expressions}) that evaluates to a list of specifications,
 where a specification is an association list
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index 2ad595220..c5e9fcbb2 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -61,6 +62,8 @@
                     (default "/var/run/cuirass/cuirass.db"))
   (port             cuirass-configuration-port ;integer (port)
                     (default 8081))
+  (host             cuirass-configuration-host ;string
+                    (default "localhost"))
   (specifications   cuirass-configuration-specifications)
                                   ;gexp that evaluates to specification-alist
   (use-substitutes? cuirass-configuration-use-substitutes? ;boolean
@@ -84,6 +87,7 @@
          (interval         (cuirass-configuration-interval config))
          (database         (cuirass-configuration-database config))
          (port             (cuirass-configuration-port config))
+         (host             (cuirass-configuration-host config))
          (specs            (cuirass-configuration-specifications config))
          (use-substitutes? (cuirass-configuration-use-substitutes? config))
          (one-shot?        (cuirass-configuration-one-shot? config))
@@ -100,6 +104,7 @@
                             #$(scheme-file "cuirass-specs.scm" specs)
                             "--database" #$database
                             "--port" #$(number->string port)
+                            "--listen" #$host
                             "--interval" #$(number->string interval)
                             #$@(if use-substitutes? '("--use-substitutes") '())
                             #$@(if one-shot? '("--one-shot") '())
-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com


[-- Attachment #3: Type: text/plain, Size: 152 bytes --]


-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

  reply	other threads:[~2017-09-19 15:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18 20:02 [bug#28504] [PATCH] cuirass: Add --listen command line option Jan Nieuwenhuizen
2017-09-19 10:17 ` Ludovic Courtès
2017-09-19 15:32   ` Jan Nieuwenhuizen [this message]
2017-09-19 16:39     ` Mathieu Othacehe
2017-09-19 16:53       ` Jan Nieuwenhuizen
2017-09-19 17:01         ` Mathieu Othacehe
2017-09-26  8:13           ` Ludovic Courtès
2017-09-26 16:17             ` bug#28504: " Jan Nieuwenhuizen

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

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

  git send-email \
    --in-reply-to=87shfi1z7j.fsf@gnu.org \
    --to=janneke@gnu.org \
    --cc=28504@debbugs.gnu.org \
    --cc=ludo@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 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.