[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
26/64: Install systemd units
From: |
Ludovic Courtès |
Subject: |
26/64: Install systemd units |
Date: |
Mon, 05 Jan 2015 16:38:58 +0000 |
civodul pushed a commit to branch nix
in repository guix.
commit 84d6936371037559704337614c65007a8e61b5e1
Author: Eelco Dolstra <address@hidden>
Date: Mon Apr 7 11:18:54 2014 +0200
Install systemd units
---
.gitignore | 3 +++
Makefile | 1 +
misc/systemd/local.mk | 1 +
misc/systemd/nix-daemon.service | 10 ----------
misc/systemd/nix-daemon.service.in | 9 +++++++++
misc/systemd/nix-daemon.socket.in | 11 +++++++++++
nix.spec.in | 8 --------
7 files changed, 25 insertions(+), 18 deletions(-)
diff --git a/.gitignore b/.gitignore
index 76fc815..008f5de 100644
--- a/.gitignore
+++ b/.gitignore
@@ -108,6 +108,9 @@ Makefile.config
/perl/lib/Nix/Config.pm
/perl/lib/Nix/Store.cc
+/misc/systemd/nix-daemon.service
+/misc/systemd/nix-daemon.socket
+
*.a
*.o
*.so
diff --git a/Makefile b/Makefile
index bcfa89d..77f22db 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,7 @@ makefiles = \
perl/local.mk \
scripts/local.mk \
corepkgs/local.mk \
+ misc/systemd/local.mk \
misc/emacs/local.mk \
doc/manual/local.mk \
tests/local.mk
diff --git a/misc/systemd/local.mk b/misc/systemd/local.mk
new file mode 100644
index 0000000..a5f6131
--- /dev/null
+++ b/misc/systemd/local.mk
@@ -0,0 +1 @@
+$(foreach n, nix-daemon.socket nix-daemon.service, $(eval $(call
install-file-in, $(d)/$(n), $(libdir)/systemd/system, 0644)))
diff --git a/misc/systemd/nix-daemon.service b/misc/systemd/nix-daemon.service
deleted file mode 100644
index ee28209..0000000
--- a/misc/systemd/nix-daemon.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Helper daemon for managing secure, multi-user Nix stores
-After=syslog.target
-
-[Service]
-Type=simple
-ExecStart=/usr/bin/nix-daemon
-
-[Install]
-WantedBy=multi-user.target
diff --git a/misc/systemd/nix-daemon.service.in
b/misc/systemd/nix-daemon.service.in
new file mode 100644
index 0000000..5fc04a3
--- /dev/null
+++ b/misc/systemd/nix-daemon.service.in
@@ -0,0 +1,9 @@
+[Unit]
+Description=Nix Daemon
address@hidden@
address@hidden@
address@hidden@/nix/daemon-socket
+
+[Service]
+ExecStart=@@bindir@/nix-daemon nix-daemon --daemon
+KillMode=process
diff --git a/misc/systemd/nix-daemon.socket.in
b/misc/systemd/nix-daemon.socket.in
new file mode 100644
index 0000000..9ed39ff
--- /dev/null
+++ b/misc/systemd/nix-daemon.socket.in
@@ -0,0 +1,11 @@
+[Unit]
+Description=Nix Daemon Socket
+Before=multi-user.target
address@hidden@
address@hidden@/nix/daemon-socket
+
+[Socket]
address@hidden@/nix/daemon-socket/socket
+
+[Install]
+WantedBy=sockets.target
diff --git a/nix.spec.in b/nix.spec.in
index f067c38..1457308 100644
--- a/nix.spec.in
+++ b/nix.spec.in
@@ -132,14 +132,6 @@ done
# (until this is fixed in the relevant Makefile)
chmod -x $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/nix.sh
-# systemd not available on RHEL yet
-%if ! 0%{?rhel}
-# install systemd service descriptor
-mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system
-cp -p misc/systemd/nix-daemon.service \
- $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system/
-%endif
-
# Copy the byte-compiled mode file by hand
cp -p misc/emacs/nix-mode.elc $RPM_BUILD_ROOT%{_emacs_sitelispdir}/
- 16/64: Remove unnecessary quotes around file names, (continued)
- 16/64: Remove unnecessary quotes around file names, Ludovic Courtès, 2015/01/05
- 08/64: Don't set an absolute soname, Ludovic Courtès, 2015/01/05
- 15/64: Include position info in function application, Ludovic Courtès, 2015/01/05
- 14/64: Update release notes, Ludovic Courtès, 2015/01/05
- 18/64: forceInt: Show position info, Ludovic Courtès, 2015/01/05
- 19/64: forceList: Show position info, Ludovic Courtès, 2015/01/05
- 21/64: forceString: Show position info, Ludovic Courtès, 2015/01/05
- 25/64: Show position info in attribute selection errors, Ludovic Courtès, 2015/01/05
- 29/64: nix-shell --pure: Keep the user's $PAGER, Ludovic Courtès, 2015/01/05
- 27/64: Update release notes, Ludovic Courtès, 2015/01/05
- 26/64: Install systemd units,
Ludovic Courtès <=
- 20/64: forceAttrs: Show position info, Ludovic Courtès, 2015/01/05
- 22/64: derivation: Don't require certain function arguments, Ludovic Courtès, 2015/01/05
- 30/64: Update installation instructions, Ludovic Courtès, 2015/01/05
- 23/64: Show position info in string concatenation / addition errors, Ludovic Courtès, 2015/01/05
- 35/64: Don't barf when installing as root, Ludovic Courtès, 2015/01/05
- 31/64: Remove redundant stuff, Ludovic Courtès, 2015/01/05
- 24/64: Show position info in Boolean operations, Ludovic Courtès, 2015/01/05
- 38/64: Fix test evaluation, Ludovic Courtès, 2015/01/05
- 34/64: Add docbook icons to the distribution, Ludovic Courtès, 2015/01/05
- 37/64: Bump date, Ludovic Courtès, 2015/01/05