* [PATCH] Add 'guix-daemon.conf' job for upstart
@ 2015-11-26 16:30 Mario Daniel Ruiz
2015-11-26 22:23 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Mario Daniel Ruiz @ 2015-11-26 16:30 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1.1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #1.2: Type: text/html, Size: 0 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: upstart-job.patch --]
[-- Type: text/x-patch, Size: 3902 bytes --]
From e61d658d944400764de8757c31e0689ee8830b6b Mon Sep 17 00:00:00 2001
From: Mario Daniel Ruiz Saavedra <desiderantes@rocketmail.com>
Date: Thu, 26 Nov 2015 11:07:51 -0500
Subject: [PATCH] Add 'guix-daemon.conf' job for upstart.
* etc/guix-daemon.conf.in: New file.
* daemon.am (CLEANFILES): Add etc/guix-daemon.conf.
(upstartjobdir, nodist_upstartjob_DATA): New variables.
(EXTRA_DIST): Add etc/guix-daemon.conf.in.
* doc/guix.texi (Binary Installation, Build Environment Setup): Mention
'guix-daemon.conf'.
Signed-off-by: Mario Daniel Ruiz Saavedra <desiderantes@rocketmail.com>
---
.gitignore | 1 +
daemon.am | 16 ++++++++++++++--
doc/guix.texi | 7 +++++++
etc/guix-daemon.conf.in | 13 +++++++++++++
4 files changed, 35 insertions(+), 2 deletions(-)
create mode 100644 etc/guix-daemon.conf.in
diff --git a/.gitignore b/.gitignore
index 6e8bfac..412d09c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -125,6 +125,7 @@ GTAGS
/doc/os-config-desktop.texi
/doc/*.1
/etc/guix-daemon.service
+/etc/guix-daemon.conf
/doc/images/bootstrap-graph.pdf
/doc/images/coreutils-bag-graph.png
/doc/images/coreutils-graph.png
diff --git a/daemon.am b/daemon.am
index f2cb0a4..186c035 100644
--- a/daemon.am
+++ b/daemon.am
@@ -21,7 +21,7 @@
#
BUILT_SOURCES += nix/libstore/schema.sql.hh
-CLEANFILES += $(BUILT_SOURCES) etc/guix-daemon.service
+CLEANFILES += $(BUILT_SOURCES) etc/guix-daemon.service etc/guix-daemon.conf
noinst_LIBRARIES = libformat.a libutil.a libstore.a
@@ -190,12 +190,24 @@ etc/guix-daemon.service: etc/guix-daemon.service.in \
$(SED) -e 's|@''bindir''@|$(bindir)|' < \
"$(srcdir)/etc/guix-daemon.service.in" > "$@.tmp"
mv "$@.tmp" "$@"
+
+# The '.conf' job for upstart.
+upstartjobdir = $(libdir)/upstart/system
+nodist_upstartjob_DATA = etc/guix-daemon.conf
+
+etc/guix-daemon.conf: etc/guix-daemon.conf.in \
+ $(top_builddir)/config.status
+ $(MKDIR_P) "`dirname "$@"`"
+ $(SED) -e 's|@''bindir''@|$(bindir)|' < \
+ "$(srcdir)/etc/guix-daemon.conf.in" > "$@.tmp"
+ mv "$@.tmp" "$@"
EXTRA_DIST += \
nix/libstore/schema.sql \
nix/AUTHORS \
nix/COPYING \
- etc/guix-daemon.service.in
+ etc/guix-daemon.service.in \
+ etc/guix-daemon.conf.in
AM_TESTS_ENVIRONMENT += \
top_builddir="$(abs_top_builddir)"
diff --git a/doc/guix.texi b/doc/guix.texi
index 058b359..ce7ea36 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -366,6 +366,10 @@ On hosts using the systemd init system, drop
@file{~root/.guix-profile/lib/systemd/system/guix-daemon.service} in
@file{/etc/systemd/system}.
+On hosts using the upstart init system, drop
+@file{~root/.guix-profile/lib/upstart/system/guix-daemon.conf} in
+@file{/etc/init}.
+
@item
Make the @command{guix} command available to other users on the machine,
for instance with:
@@ -554,6 +558,9 @@ parallel, as specified by the @option{--max-jobs} option
following command@footnote{If your machine uses the systemd init system,
dropping the @file{@var{prefix}/lib/systemd/system/guix-daemon.service}
file in @file{/etc/systemd/system} will ensure that
+@command{guix-daemon} is automatically started.}@footnote{If your machine uses the upstart init system,
+dropping the @file{@var{prefix}/lib/upstart/system/guix-daemon.conf}
+file in @file{/etc/init} will ensure that
@command{guix-daemon} is automatically started.}:
@example
diff --git a/etc/guix-daemon.conf.in b/etc/guix-daemon.conf.in
new file mode 100644
index 0000000..dce11e2
--- /dev/null
+++ b/etc/guix-daemon.conf.in
@@ -0,0 +1,13 @@
+# This is a "job" for the upstart init system to launch
+# 'guix-daemon'. Drop it in /etc/init or similar to have
+# 'guix-daemon' automatically started.
+
+description "Build daemon for GNU Guix"
+
+start on runlevel [2345]
+
+stop on runlevel [016]
+
+task
+
+exec @bindir@/guix-daemon --build-users-group=guixbuild
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Add 'guix-daemon.conf' job for upstart
2015-11-26 16:30 [PATCH] Add 'guix-daemon.conf' job for upstart Mario Daniel Ruiz
@ 2015-11-26 22:23 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-11-26 22:23 UTC (permalink / raw)
To: Mario Daniel Ruiz; +Cc: guix-devel
Mario Daniel Ruiz <desiderantes@rocketmail.com> skribis:
> From e61d658d944400764de8757c31e0689ee8830b6b Mon Sep 17 00:00:00 2001
> From: Mario Daniel Ruiz Saavedra <desiderantes@rocketmail.com>
> Date: Thu, 26 Nov 2015 11:07:51 -0500
> Subject: [PATCH] Add 'guix-daemon.conf' job for upstart.
>
> * etc/guix-daemon.conf.in: New file.
> * daemon.am (CLEANFILES): Add etc/guix-daemon.conf.
> (upstartjobdir, nodist_upstartjob_DATA): New variables.
> (EXTRA_DIST): Add etc/guix-daemon.conf.in.
> * doc/guix.texi (Binary Installation, Build Environment Setup): Mention
> 'guix-daemon.conf'.
>
> Signed-off-by: Mario Daniel Ruiz Saavedra <desiderantes@rocketmail.com>
I applied a similar version with “Upstart” properly capitalized, and
with lines wrapped to 80 characters.
Thank you!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-26 22:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-26 16:30 [PATCH] Add 'guix-daemon.conf' job for upstart Mario Daniel Ruiz
2015-11-26 22:23 ` Ludovic Courtès
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).