about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-03T21·57-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-03T21·59-0400
commite35d6f78dc797150451f5134833afa0ecdf4a241 (patch)
tree052a38cce623d3d6e5075023a229e5f32c441238
parent522ecab9b83902de5a3010b50b9532e376cbba4c (diff)
Rename nix-worker to nix-daemon
-rw-r--r--.gitignore4
-rw-r--r--configure.ac2
-rw-r--r--doc/manual/Makefile.am2
-rw-r--r--doc/manual/env-common.xml4
-rw-r--r--doc/manual/installation.xml10
-rw-r--r--doc/manual/manual.xml2
-rw-r--r--doc/manual/nix-daemon.xml (renamed from doc/manual/nix-worker.xml)9
-rw-r--r--doc/manual/release-notes.xml8
-rw-r--r--misc/systemd/nix-daemon.service (renamed from misc/systemd/nix-worker.service)2
-rw-r--r--nix.spec.in8
-rw-r--r--src/Makefile.am2
-rw-r--r--src/nix-daemon/Makefile.am12
-rw-r--r--src/nix-daemon/nix-daemon.cc (renamed from src/nix-worker/nix-worker.cc)12
-rw-r--r--src/nix-worker/Makefile.am9
-rw-r--r--tests/common.sh.in4
15 files changed, 49 insertions, 41 deletions
diff --git a/.gitignore b/.gitignore
index bd66cabef24c..8a7e99d0676b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -106,8 +106,8 @@ Makefile.in
 # /src/nix-store/
 /src/nix-store/nix-store
 
-# /src/nix-worker/
-/src/nix-worker/nix-worker
+# /src/nix-daemon/
+/src/nix-daemon/nix-daemon
 
 # /tests/
 /tests/test-tmp
diff --git a/configure.ac b/configure.ac
index 4b13ba276e3b..11a5390fa44c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -364,7 +364,7 @@ AC_CONFIG_FILES([Makefile
    src/libexpr/Makefile
    src/nix-instantiate/Makefile
    src/nix-env/Makefile
-   src/nix-worker/Makefile
+   src/nix-daemon/Makefile
    src/nix-setuid-helper/Makefile
    src/nix-log2xml/Makefile
    src/bsdiff-4.3/Makefile
diff --git a/doc/manual/Makefile.am b/doc/manual/Makefile.am
index 42da3c8b0c09..eedc992a3851 100644
--- a/doc/manual/Makefile.am
+++ b/doc/manual/Makefile.am
@@ -23,7 +23,7 @@ man1_MANS = nix-env.1 nix-build.1 nix-store.1 nix-instantiate.1 \
 
 man5_MANS = nix.conf.5
 
-man8_MANS = nix-worker.8
+man8_MANS = nix-daemon.8
 
 FIGURES = figures/user-environments.png
 
diff --git a/doc/manual/env-common.xml b/doc/manual/env-common.xml
index c4c0f9d2df63..fcdd2c268399 100644
--- a/doc/manual/env-common.xml
+++ b/doc/manual/env-common.xml
@@ -304,9 +304,9 @@ $ mount -o bind /mnt/otherdisk/nix /nix</screen>
   <literal>/var/run/nix/remote-stores</literal>.</para>
 
   <para>Note that if you’re building through the <link
-  linkend="sec-nix-worker">Nix daemon</link>, the only setting for
+  linkend="sec-nix-daemon">Nix daemon</link>, the only setting for
   this variable that matters is the one that the
-  <command>nix-worker</command> process uses.  So if you want to
+  <command>nix-daemon</command> process uses.  So if you want to
   change it, you have to restart the daemon.</para></listitem>
 
 </varlistentry>
diff --git a/doc/manual/installation.xml b/doc/manual/installation.xml
index bbcc057f1d04..fdab71fc0f37 100644
--- a/doc/manual/installation.xml
+++ b/doc/manual/installation.xml
@@ -412,11 +412,11 @@ $ chown -R root /nix/store /nix/var/nix</screen>
 
 </para>
 
-<para>The <link linkend="sec-nix-worker">Nix daemon</link> should be
+<para>The <link linkend="sec-nix-daemon">Nix daemon</link> should be
 started as follows (as <literal>root</literal>):
 
 <screen>
-$ nix-worker --daemon</screen>
+$ nix-daemon</screen>
 
 You’ll want to put that line somewhere in your system’s boot
 scripts.</para>
@@ -450,11 +450,11 @@ named anything.  It should own the Nix store and database:
 <screen>
 $ chown -R nix /nix/store /nix/var/nix</screen>
 
-and of course <command>nix-worker --daemon</command> should be started
-under that user, e.g.,
+and of course <command>nix-daemon</command> should be started under
+that user, e.g.,
 
 <screen>
-$ su - nix -c "exec /nix/bin/nix-worker --daemon"</screen>
+$ su - nix -c "exec /nix/bin/nix-daemon"</screen>
 
 </para>
 
diff --git a/doc/manual/manual.xml b/doc/manual/manual.xml
index ccff9423cf17..aa461d7081bf 100644
--- a/doc/manual/manual.xml
+++ b/doc/manual/manual.xml
@@ -59,7 +59,7 @@
       <xi:include href="nix-prefetch-url.xml" />
       <xi:include href="nix-pull.xml" />
       <xi:include href="nix-push.xml" />
-      <xi:include href="nix-worker.xml" />
+      <xi:include href="nix-daemon.xml" />
     </section>
 
     <section>
diff --git a/doc/manual/nix-worker.xml b/doc/manual/nix-daemon.xml
index 5ae9d59bddc7..c68605fd6566 100644
--- a/doc/manual/nix-worker.xml
+++ b/doc/manual/nix-daemon.xml
@@ -1,24 +1,23 @@
 <refentry xmlns="http://docbook.org/ns/docbook"
           xmlns:xlink="http://www.w3.org/1999/xlink"
           xmlns:xi="http://www.w3.org/2001/XInclude"
-          xml:id="sec-nix-worker">
+          xml:id="sec-nix-daemon">
 
 <refmeta>
-  <refentrytitle>nix-worker</refentrytitle>
+  <refentrytitle>nix-daemon</refentrytitle>
   <manvolnum>8</manvolnum>
   <refmiscinfo class="source">Nix</refmiscinfo>
   <refmiscinfo class="version"><xi:include href="version.txt" parse="text"/></refmiscinfo>
 </refmeta>
 
 <refnamediv>
-  <refname>nix-worker</refname>
+  <refname>nix-daemon</refname>
   <refpurpose>Nix multi-user support daemon</refpurpose>
 </refnamediv>
 
 <refsynopsisdiv>
   <cmdsynopsis>
-    <command>nix-worker</command>
-    <arg choice="plain"><option>--daemon</option></arg>
+    <command>nix-daemon</command>
   </cmdsynopsis>
 </refsynopsisdiv>
 
diff --git a/doc/manual/release-notes.xml b/doc/manual/release-notes.xml
index 43d5080afabd..8d0840d06e5f 100644
--- a/doc/manual/release-notes.xml
+++ b/doc/manual/release-notes.xml
@@ -10,7 +10,7 @@
 
 <section xml:id="ssec-relnotes-1.2"><title>Release 1.2 (TBA)</title>
 
-<para>This release has the following improvements:</para>
+<para>This release has the following improvements and changes:</para>
 
 <itemizedlist>
 
@@ -47,6 +47,12 @@ $ mount -o remount,ro,bind /nix/store
     modifications.</para>
   </listitem>
 
+  <listitem>
+    <para>The command <command>nix-worker</command> has been renamed
+    to <command>nix-daemon</command>.  Support for running the Nix
+    worker in “slave” mode has been removed.</para>
+  </listitem>
+
 </itemizedlist>
 
 </section>
diff --git a/misc/systemd/nix-worker.service b/misc/systemd/nix-daemon.service
index 2ededfea8068..ee28209f090e 100644
--- a/misc/systemd/nix-worker.service
+++ b/misc/systemd/nix-daemon.service
@@ -4,7 +4,7 @@ After=syslog.target
 
 [Service]
 Type=simple
-ExecStart=/usr/bin/nix-worker --daemon
+ExecStart=/usr/bin/nix-daemon
 
 [Install]
 WantedBy=multi-user.target
diff --git a/nix.spec.in b/nix.spec.in
index 9d93c654d05e..822684c5e16a 100644
--- a/nix.spec.in
+++ b/nix.spec.in
@@ -139,7 +139,7 @@ chmod -x $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/nix.sh
 %if ! 0%{?rhel} 
 # install systemd service descriptor
 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system
-cp -p misc/systemd/nix-worker.service \
+cp -p misc/systemd/nix-daemon.service \
   $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system/
 %endif
 
@@ -173,8 +173,8 @@ chgrp %{nixbld_group} /nix/store
 chmod 1775 /nix/store
 %if ! 0%{?rhel}
 # Enable and start Nix worker
-systemctl enable nix-worker.service
-systemctl start  nix-worker.service
+systemctl enable nix-daemon.service
+systemctl start  nix-daemon.service
 %endif
 
 %files
@@ -186,7 +186,7 @@ systemctl start  nix-worker.service
 %exclude %dir %{perl_vendorarch}/auto/
 %{_prefix}/libexec/*
 %if ! 0%{?rhel}
-%{_prefix}/lib/systemd/system/nix-worker.service
+%{_prefix}/lib/systemd/system/nix-daemon.service
 %endif
 %{_datadir}/emacs/site-lisp/nix-mode.el
 %{_datadir}/nix
diff --git a/src/Makefile.am b/src/Makefile.am
index 25ae67996b2f..0ae407c573d1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,3 @@
 SUBDIRS = boost libutil libstore libmain nix-store nix-hash \
- libexpr nix-instantiate nix-env nix-worker nix-setuid-helper \
+ libexpr nix-instantiate nix-env nix-daemon nix-setuid-helper \
  nix-log2xml bsdiff-4.3
diff --git a/src/nix-daemon/Makefile.am b/src/nix-daemon/Makefile.am
new file mode 100644
index 000000000000..b8e9f4a064ad
--- /dev/null
+++ b/src/nix-daemon/Makefile.am
@@ -0,0 +1,12 @@
+bin_PROGRAMS = nix-daemon
+
+nix_daemon_SOURCES = nix-daemon.cc
+nix_daemon_LDADD = ../libmain/libmain.la ../libstore/libstore.la ../libutil/libutil.la \
+ ../boost/format/libformat.la
+
+AM_CXXFLAGS = \
+ -I$(srcdir)/.. -I$(srcdir)/../libutil \
+ -I$(srcdir)/../libstore -I$(srcdir)/../libmain
+
+install-exec-local:
+	ln -sf nix-daemon $(DESTDIR)$(bindir)/nix-worker
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-daemon/nix-daemon.cc
index 833fc3518415..6256258ec396 100644
--- a/src/nix-worker/nix-worker.cc
+++ b/src/nix-daemon/nix-daemon.cc
@@ -25,7 +25,7 @@ using namespace nix;
    disconnects and immediately kill any ongoing builds.  On platforms
    that lack it, we only notice the disconnection the next time we try
    to write to the client.  So if you have a builder that never
-   generates output on stdout/stderr, the worker will never notice
+   generates output on stdout/stderr, the daemon will never notice
    that the client has disconnected until the builder terminates. */
 #ifdef O_ASYNC
 #define HAVE_HUP_NOTIFICATION
@@ -677,7 +677,7 @@ static void processConnection()
         /* Prevent users from doing something very dangerous. */
         if (geteuid() == 0 &&
             querySetting("build-users-group", "") == "")
-            throw Error("if you run `nix-worker' as root, then you MUST set `build-users-group'!");
+            throw Error("if you run `nix-daemon' as root, then you MUST set `build-users-group'!");
 #endif
 
         /* Open the store. */
@@ -724,7 +724,7 @@ static void processConnection()
         assert(!canSendStderr);
     };
 
-    printMsg(lvlError, format("%1% worker operations") % opCount);
+    printMsg(lvlError, format("%1% operations") % opCount);
 }
 
 
@@ -858,7 +858,7 @@ static void daemonLoop()
             case 0:
                 try { /* child */
 
-                    /* Background the worker. */
+                    /* Background the daemon. */
                     if (setsid() == -1)
                         throw SysError(format("creating a new session"));
 
@@ -907,8 +907,8 @@ void run(Strings args)
 
 void printHelp()
 {
-    showManPage("nix-worker");
+    showManPage("nix-daemon");
 }
 
 
-string programId = "nix-worker";
+string programId = "nix-daemon";
diff --git a/src/nix-worker/Makefile.am b/src/nix-worker/Makefile.am
deleted file mode 100644
index 6b1b2827cbf7..000000000000
--- a/src/nix-worker/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-bin_PROGRAMS = nix-worker
-
-nix_worker_SOURCES = nix-worker.cc
-nix_worker_LDADD = ../libmain/libmain.la ../libstore/libstore.la ../libutil/libutil.la \
- ../boost/format/libformat.la
-
-AM_CXXFLAGS = \
- -I$(srcdir)/.. -I$(srcdir)/../libutil \
- -I$(srcdir)/../libstore -I$(srcdir)/../libmain
diff --git a/tests/common.sh.in b/tests/common.sh.in
index ee0ddfbb69e6..f327ad727632 100644
--- a/tests/common.sh.in
+++ b/tests/common.sh.in
@@ -59,9 +59,9 @@ clearManifests() {
 
 startDaemon() {
     # Start the daemon, wait for the socket to appear.  !!!
-    # ‘nix-worker’ should have an option to fork into the background.
+    # ‘nix-daemon’ should have an option to fork into the background.
     rm -f $NIX_STATE_DIR/daemon-socket/socket
-    nix-worker --daemon &
+    nix-daemon &
     for ((i = 0; i < 30; i++)); do
         if [ -e $NIX_STATE_DIR/daemon-socket/socket ]; then break; fi
         sleep 1