Rename nix-worker to nix-daemon
This commit is contained in:
		
							parent
							
								
									522ecab9b8
								
							
						
					
					
						commit
						e35d6f78dc
					
				
					 15 changed files with 49 additions and 41 deletions
				
			
		
							
								
								
									
										4
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							|  | @ -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 | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
|  | @ -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 | ||||
| 
 | ||||
|  |  | |||
|  | @ -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> | ||||
|  |  | |||
|  | @ -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> | ||||
| 
 | ||||
|  |  | |||
|  | @ -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> | ||||
|  |  | |||
|  | @ -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> | ||||
| 
 | ||||
|  | @ -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> | ||||
|  |  | |||
|  | @ -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 | ||||
|  | @ -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 | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
							
								
								
									
										12
									
								
								src/nix-daemon/Makefile.am
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								src/nix-daemon/Makefile.am
									
										
									
									
									
										Normal file
									
								
							|  | @ -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 | ||||
|  | @ -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"; | ||||
|  | @ -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 | ||||
|  | @ -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 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue