Fix windows issues that cropped up in the new install windows
authorTom Parker <palfrey@lshift.net>
Tue, 03 Apr 2012 18:44:58 +0100
branchwindows
changeset 349 b271be84da5e
parent 348 b155c43eaa56
child 355 63d8fe4e9450
Fix windows issues that cropped up in the new install
Makefile
README-windows.txt
--- a/Makefile	Tue Apr 03 17:35:02 2012 +0100
+++ b/Makefile	Tue Apr 03 18:44:58 2012 +0100
@@ -17,7 +17,7 @@
 setup-useradd: installfiles useradd inituser
 
 # WARNING: this is experimental
-setup-windows: installfiles adduser-windows inituser-windows
+setup-windows: installfiles adduser-windows
 
 installetc:
 	$(INSTALL) -d $(DESTDIR)$(ETCDIR)
@@ -76,6 +76,7 @@
 # WARNING: this is experimental
 inituser-windows:
 	mkdir /home/$(NEWUSER)
+	chown $(NEWUSER) /home/$(NEWUSER)
 	chmod 755 $(DESTDIR)$(LIBDIR)/init/*
 	ssh $(NEWUSER)@localhost "sh $(DESTDIR)$(LIBDIR)/init/hginit $(DESTDIR)$(LIBDIR)"
 
--- a/README-windows.txt	Tue Apr 03 17:35:02 2012 +0100
+++ b/README-windows.txt	Tue Apr 03 18:44:58 2012 +0100
@@ -21,28 +21,33 @@
 Note that even if you've already got them installed in Windows, Python and
 Mercurial still need to be installed in Cygwin.
 
-2) Open a new Cygwin terminal as Adminstrator (right click on "Cygwin Terminal"
-start menu option and pick "Run as administrator")
+2) Open a new Cygwin terminal as Adminstrator (under Windows 7, that's right
+click on "Cygwin Terminal" start menu option and pick "Run as administrator")
 
 3) Run "ssh-host-config -y" and "cygrunsrv -S sshd" to get sshd running. We need
 this because there's no proper su in Cygwin (see
 http://cygwin.com/faq-nochunks.html#faq.using.su for why this is)
 
-3) Goto the mercurial-server folder and "make setup-windows"
+3) Goto the mercurial-server folder and "sh windows.sh setup-windows"
 
-4) Run "passwd hg" and set the password for the hg user. 
+4) Run "passwd hg" and set the password for the hg user (created by
+setup-windows), then "mkpasswd -l > /etc/passwd" to add them to the Cygwin user
+database
+
+5) Run "sh windows.sh inituser-windows" to finish setting up the hg user
 
-5) Following the example from the main mercurial-server documentation (in that the server
-is called 'jeeves', your username is 'jay' and the client is called 'spoon'),
-but with a few differences for Cygwin, we can now get you initial access. We
-assume that you've generated a key with PuTTYgen
+5) Following the example from the main mercurial-server documentation (in that
+the server is called 'jeeves', your username is 'jay' and the client is called
+'spoon'), but with a few differences for Cygwin, we can now get you initial
+access. We assume that you've generated a key with PuTTYgen
 (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) and then
-copied the contents of the "public key" box into a file called my-key.
+copied the contents of the "public key" box into a file called my-key. Run the
+following, altered as appropriate for your local system:
 
-jay@jeeves:~$ mkdir -p /etc/mercurial-server/keys/root/jay
-jay@jeeves:~$ cp my-key /etc/mercurial-server/keys/root/jay/spoon
-jay@jeeves:~$ chown hg /etc/mercurial-server/keys/root/jay/spoon
-jay@jeeves:~$ ssh hg@localhost /usr/share/mercurial-server/refresh-auth
+  mkdir -p /etc/mercurial-server/keys/root/jay
+  cp my-key /etc/mercurial-server/keys/root/jay/spoon
+  chown hg /etc/mercurial-server/keys/root/jay/spoon
+  ssh hg@localhost /usr/local/share/mercurial-server/refresh-auth
 
 The rest of the instructions in the normal mercurial-server documentation should
 now work. Note that although it's possible to add keys/access info to