[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r19035: {torvm} Move README to HACKING, and create a simple README for users (in torvm/trunk: . build/win32 build/win32/patches)



Author: coderman
Date: 2009-03-16 01:58:46 -0400 (Mon, 16 Mar 2009)
New Revision: 19035

Added:
   torvm/trunk/HACKING
Modified:
   torvm/trunk/README
   torvm/trunk/build/win32/Makefile
   torvm/trunk/build/win32/patches/vidalia-torvm.patch
Log:
Move README to HACKING, and create a simple README for users. Add tweaks to vidalia changes so it doesnt try to clobber the torrc on vm if settings changed. Update geoip cache for Vidalia by default when building.

Added: torvm/trunk/HACKING
===================================================================
--- torvm/trunk/HACKING	                        (rev 0)
+++ torvm/trunk/HACKING	2009-03-16 05:58:46 UTC (rev 19035)
@@ -0,0 +1,103 @@
+
+                    Transparent Tor Proxy Virtual Machine
+
+
+See the doc/ directory for design and implementation details and the LICENSE
+file for rights and terms.
+
+To build you will need a *nix environment and a Windows XP or later operating
+system for Qemu and libraries.  Various build configuration options and other
+basic features are not yet avilable; edit the Makefile to adjust manually.
+
+
+
+NOTE: Some subversion repositories are accessed via SSL with keys that may need
+to be accepted manually.  To confirm that you have authenticated the keys used
+issue the following commands as the build user and approve the keys if needed:
+
+    svn info https://svn.torproject.org/svn/torvm/trunk/
+    # Fingerprint: 55:62:fe:1b:60:f9:35:fa:50:44:dd:33:ea:54:77:26:e4:da:5f:72
+
+    svn info https://svn.openwrt.org/openwrt/trunk/
+    # Fingerprint: a1:0a:d8:2d:af:4e:67:92:18:a0:27:b6:9f:2b:e1:12:08:28:a0:b1
+
+    svn info https://svn.vidalia-project.net/svn/vidalia/trunk/
+    # Fingerprint: 1e:ff:c9:02:af:53:50:f8:7a:6f:6f:95:25:c3:fb:50:78:15:9b:28
+
+
+
+Run 'make' to build the VM kernel image and Windows build ISO image.  Once the
+Windows build is done a complete Tor virtual machine package should be zipped
+up ready for distribution in the C:\Tor_VM folder.  You will need to have the
+Windows Driver Development Kit installed for the WinPcap and TAP-Win32 driver
+compilation.  You can download the DDK installer ISO at:
+
+    http://download.microsoft.com/download/9/0/f/90f019ac-8243-48d3-91cf-81fc4093ecfd/1830_usa_ddk.iso
+
+
+
+If you have trouble with the build process downloading the various sources
+from mirrors and upstream repositories a current copy of all the kamikaze and
+win32 archives is available as: http://peertech.org/files/torvmdlcache.tar
+
+The extracted dl and wdl directories can be used in the build by passing their
+location to the make command:
+
+    make DLDIR=./dl WDLDIR=./wdl all
+
+
+
+Some files and paths of interest:
+
+./build/kamikaze/x86-uclibc-vm/bin/openwrt-x86-vmlinuz
+> this is the Linux kernel and initramfs used in the VM.
+
+./build/win32/w32build.iso
+> this is the automated win32 build ISO for Qemu.  Once everything is built
+> the Qemu program and libraries will be placed in C:\Tor_VM
+
+./build/kamikaze/patches/
+> this directory contains the patch set applied to the kamikaze distribution
+> for Tor VM customizations.
+
+./build/win32/files/
+> this directory contains the scripts and files used in the Windows build and
+> packaged Qemu Tor_VM folder.
+
+./build/win32/patches/
+> this directory contains the patches applied to Qemu for bridged ethernet
+> support via WinPcap and modifications for the WinPcap and TAP-Win32 drivers
+> to prevent collision with any existing installed packages.
+
+
+
+Fully automated builds are supported with some minor modifications to both the
+Linux build host and the win32 build VM.  There are three steps to this setup:
+
+First, create a restricted user where the build targets will be copied to from
+the win32 build VM OS.  You can use the /bin/rbash restricted shell or similar
+utility to ensure that scp privileges and not much else are provided.  Create an
+SSH identity key for this user and copy the private key where the build user can
+access it.
+
+Second, configure the win32 build VM OS with a Startup script that invokes the
+install.bat script on the win32 build ISO image.  This image is assumed to be
+mounted when the win32 build VM OS boots up.
+
+Last, pass the requisite information to the build script so that the necessary
+commands are invoked during build to launch the win32 build VM and have the
+completed build files copied back out to the host.  For example:
+
+    make DLDIR=/var/build/dl WDLDIR=/var/build/wdl  \
+         W32AUTO_BUILD_CMD=/var/build/runbldvm.sh   \
+         AUTO_SHUTDOWN=TRUE                         \
+         BUILD_SCP_IDF=/var/build/build_id_rsa      \
+         BUILD_SCP_USER=build                       \
+         BUILD_SCP_HOST=192.168.1.2                 \
+         BUILD_SCP_DIR=/home/build                  \
+         all
+
+When the build completes a Tor_VM_<timestamp> directory will be created in the
+requested location.  The timestamp is an integer value representing the UNIX
+epoch in seconds.
+

Modified: torvm/trunk/README
===================================================================
--- torvm/trunk/README	2009-03-16 03:56:15 UTC (rev 19034)
+++ torvm/trunk/README	2009-03-16 05:58:46 UTC (rev 19035)
@@ -1,103 +1,21 @@
 
-                    Transparent Tor Proxy Virtual Machine
+  Transparent Tor Proxy Virtual Machine
 
+Software Copyright (C) 2008-2009  The Tor Project, Inc.
+See LICENSE file for rights and terms.
 
-See the doc/ directory for design and implementation details and the LICENSE
-file for rights and terms.
+Current documentation for this software is available at:
+  https://www.torproject.org/torvm/
 
-To build you will need a *nix environment and a Windows XP or later operating
-system for Qemu and libraries.  Various build configuration options and other
-basic features are not yet avilable; edit the Makefile to adjust manually.
+Please read the information there before requesting support.
 
+This initial release is still under heavy development. There is a bug tracking
+database for known issues and requests:
+  http://bugs.noreply.org/flyspray/index.php?tasks=all&project=4&cat=19
 
+To test the latest fixes or features periodic builds of the win32 bundles and
+packages are available at:
+  https://data.peertech.org/torbld/info/Tor_VM-svn
 
-NOTE: Some subversion repositories are accessed via SSL with keys that may need
-to be accepted manually.  To confirm that you have authenticated the keys used
-issue the following commands as the build user and approve the keys if needed:
+See the HACKING file for additional developer related information.
 
-    svn info https://svn.torproject.org/svn/torvm/trunk/
-    # Fingerprint: 55:62:fe:1b:60:f9:35:fa:50:44:dd:33:ea:54:77:26:e4:da:5f:72
-
-    svn info https://svn.openwrt.org/openwrt/trunk/
-    # Fingerprint: a1:0a:d8:2d:af:4e:67:92:18:a0:27:b6:9f:2b:e1:12:08:28:a0:b1
-
-    svn info https://svn.vidalia-project.net/svn/vidalia/trunk/
-    # Fingerprint: 1e:ff:c9:02:af:53:50:f8:7a:6f:6f:95:25:c3:fb:50:78:15:9b:28
-
-
-
-Run 'make' to build the VM kernel image and Windows build ISO image.  Once the
-Windows build is done a complete Tor virtual machine package should be zipped
-up ready for distribution in the C:\Tor_VM folder.  You will need to have the
-Windows Driver Development Kit installed for the WinPcap and TAP-Win32 driver
-compilation.  You can download the DDK installer ISO at:
-
-    http://download.microsoft.com/download/9/0/f/90f019ac-8243-48d3-91cf-81fc4093ecfd/1830_usa_ddk.iso
-
-
-
-If you have trouble with the build process downloading the various sources
-from mirrors and upstream repositories a current copy of all the kamikaze and
-win32 archives is available as: http://peertech.org/files/torvmdlcache.tar
-
-The extracted dl and wdl directories can be used in the build by passing their
-location to the make command:
-
-    make DLDIR=./dl WDLDIR=./wdl all
-
-
-
-Some files and paths of interest:
-
-./build/kamikaze/x86-uclibc-vm/bin/openwrt-x86-vmlinuz
-> this is the Linux kernel and initramfs used in the VM.
-
-./build/win32/w32build.iso
-> this is the automated win32 build ISO for Qemu.  Once everything is built
-> the Qemu program and libraries will be placed in C:\Tor_VM
-
-./build/kamikaze/patches/
-> this directory contains the patch set applied to the kamikaze distribution
-> for Tor VM customizations.
-
-./build/win32/files/
-> this directory contains the scripts and files used in the Windows build and
-> packaged Qemu Tor_VM folder.
-
-./build/win32/patches/
-> this directory contains the patches applied to Qemu for bridged ethernet
-> support via WinPcap and modifications for the WinPcap and TAP-Win32 drivers
-> to prevent collision with any existing installed packages.
-
-
-
-Fully automated builds are supported with some minor modifications to both the
-Linux build host and the win32 build VM.  There are three steps to this setup:
-
-First, create a restricted user where the build targets will be copied to from
-the win32 build VM OS.  You can use the /bin/rbash restricted shell or similar
-utility to ensure that scp privileges and not much else are provided.  Create an
-SSH identity key for this user and copy the private key where the build user can
-access it.
-
-Second, configure the win32 build VM OS with a Startup script that invokes the
-install.bat script on the win32 build ISO image.  This image is assumed to be
-mounted when the win32 build VM OS boots up.
-
-Last, pass the requisite information to the build script so that the necessary
-commands are invoked during build to launch the win32 build VM and have the
-completed build files copied back out to the host.  For example:
-
-    make DLDIR=/var/build/dl WDLDIR=/var/build/wdl  \
-         W32AUTO_BUILD_CMD=/var/build/runbldvm.sh   \
-         AUTO_SHUTDOWN=TRUE                         \
-         BUILD_SCP_IDF=/var/build/build_id_rsa      \
-         BUILD_SCP_USER=build                       \
-         BUILD_SCP_HOST=192.168.1.2                 \
-         BUILD_SCP_DIR=/home/build                  \
-         all
-
-When the build completes a Tor_VM_<timestamp> directory will be created in the
-requested location.  The timestamp is an integer value representing the UNIX
-epoch in seconds.
-

Modified: torvm/trunk/build/win32/Makefile
===================================================================
--- torvm/trunk/build/win32/Makefile	2009-03-16 03:56:15 UTC (rev 19034)
+++ torvm/trunk/build/win32/Makefile	2009-03-16 05:58:46 UTC (rev 19035)
@@ -388,6 +388,7 @@
 	$(UNZIP) $(WDLDIR)/$(WIXSRC_F) -d wixsrc; tar zcf $(ISODIR)/dl/$(WIXSRC_TGZ) wixsrc; rm -rf wixsrc $(ISODIR)/dl/$(WIXSRC_F); \
 	echo "--- Exporting Vidalia version $(VIDALIA_VER) from local mirror ..."; \
 	rm -rf $(VIDALIA_NAME); $(SVNCMD) export --revision $(VIDALIA_VER) $(SDLDIR)/$(VIDALIA_NAME) $(VIDALIA_NAME); \
+	( echo "Updating geoip cache in Vidalia source tree ..."; cd $(VIDALIA_NAME)/pkg; ./build-geoip-cache.sh ; ls -l geoip-cache ); \
 	tar zcf $(ISODIR)/dl/src/$(VIDALIA_TGZ) $(VIDALIA_NAME); rm -rf $(VIDALIA_NAME); \
 	echo "--- Exporting Marble revision $(MARBLE_VER) from local mirror ..."; \
 	rm -rf $(MARBLE_NAME); $(SVNCMD) export --revision $(MARBLE_VER) $(SDLDIR)/$(MARBLE_NAME) $(MARBLE_NAME) ; \

Modified: torvm/trunk/build/win32/patches/vidalia-torvm.patch
===================================================================
--- torvm/trunk/build/win32/patches/vidalia-torvm.patch	2009-03-16 03:56:15 UTC (rev 19034)
+++ torvm/trunk/build/win32/patches/vidalia-torvm.patch	2009-03-16 05:58:46 UTC (rev 19035)
@@ -10,6 +10,40 @@
  set(VERSION     "${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}-svn")
  message(STATUS  "Configuring Vidalia ${VERSION}")
  project(Vidalia)
+diff -Naur a/pkg/build-geoip-cache.sh b/pkg/build-geoip-cache.sh
+--- a/pkg/build-geoip-cache.sh	2008-02-29 04:30:11.928307000 +0000
++++ b/pkg/build-geoip-cache.sh	2009-03-16 05:33:25.382762424 +0000
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ ##
+ ##  $Id: build-geoip-cache.sh 2362 2008-02-29 04:30:11Z edmanm $
+ ## 
+@@ -13,15 +13,9 @@
+ 
+ 
+ DIRURL="http://tor.noreply.org/tor/status/all";
+-GEOIPURL="http://geoip.vidalia-project.net/cgi-bin/geoip";
++GEOIPURL="http://peertech.org/geoip";
+ CACHEFILE="geoip-cache"
+ 
+-if [ "$1" == "-notimestamp" -o "$1" == "--notimestamp" ]; then
+-  timestamp=""
+-else
+-  timestamp=":$(date +%s)"
+-fi
+-
+ # Fetch a list of server IP addresses
+ ipaddrs=$(wget -q -O - "$DIRURL" | awk '$1 == "r" { print $7 }' | sort | uniq | tr "\n" ",")
+ 
+@@ -32,6 +26,6 @@
+ IFS=$'\n'
+ rm -f $CACHEFILE
+ for geoip in $geoips; do
+-  echo "$geoip""$timestamp" >> "$CACHEFILE"
++  echo "$geoip" >> "$CACHEFILE"
+ done
+ 
 diff -Naur a/pkg/win32/polipo.conf b/pkg/win32/polipo.conf
 --- a/pkg/win32/polipo.conf	2008-04-06 00:00:07.066809000 +0000
 +++ b/pkg/win32/polipo.conf	2009-03-07 12:47:21.712807024 +0000
@@ -1581,7 +1615,7 @@
  /** Called when Tor has printed a log message to stdout. */
 diff -Naur a/src/vidalia/config/torsettings.cpp b/src/vidalia/config/torsettings.cpp
 --- a/src/vidalia/config/torsettings.cpp	2009-01-30 05:20:24.536180000 +0000
-+++ b/src/vidalia/config/torsettings.cpp	2009-03-07 03:57:41.693104376 +0000
++++ b/src/vidalia/config/torsettings.cpp	2009-03-16 05:35:49.339877616 +0000
 @@ -61,6 +61,7 @@
  {
  #if defined(Q_OS_WIN32)
@@ -1606,6 +1640,49 @@
    setDefault(SETTING_CONTROL_ADDR,  "127.0.0.1");
    setDefault(SETTING_CONTROL_PORT,  9051);
    setDefault(SETTING_AUTH_METHOD,   toString(DEFAULT_AUTH_METHOD));
+@@ -88,6 +96,9 @@
+ {
+   QHash<QString, QString> conf;
+   QString hashedPassword;
++  QString tor = localValue(SETTING_TOR_EXECUTABLE).toString();
++  if (tor.isEmpty())
++    return (true);
+ 
+   conf.insert(SETTING_CONTROL_PORT,
+               localValue(SETTING_CONTROL_PORT).toString());
+@@ -104,9 +115,12 @@
+                           ? hashPassword(randomPassword())
+                           : hashPassword(getControlPassword());
+       if (hashedPassword.isEmpty()) {
++#if 0
+         if (errmsg)
+           *errmsg =  tr("Failed to hash the control password.");
+         return false;
++#endif
++return true;
+       }
+       conf.insert(TOR_ARG_COOKIE_AUTH,    "0");
+       conf.insert(TOR_ARG_HASHED_PASSWORD, hashedPassword);
+@@ -139,7 +153,7 @@
+ {
+   QString tor = localValue(SETTING_TOR_EXECUTABLE).toString();
+   if (tor.isEmpty()) /* Don't let the Tor executable name be empty */
+-    tor = defaultValue(SETTING_TOR_EXECUTABLE).toString();
++    return tor;
+   return QDir::convertSeparators(tor);
+ }
+ 
+@@ -156,8 +170,10 @@
+ {
+   QString torrc;
+   TorControl *tc = torControl();
++#if 0
+   if (tc && tc->isConnected() && tc->getInfo("config-file", torrc))
+     return QDir::convertSeparators(torrc);
++#endif
+   return QDir::convertSeparators(localValue(SETTING_TORRC).toString());
+ }
+ 
 diff -Naur a/src/vidalia/config/vidaliasettings.cpp b/src/vidalia/config/vidaliasettings.cpp
 --- a/src/vidalia/config/vidaliasettings.cpp	2009-02-03 02:09:39.844750000 +0000
 +++ b/src/vidalia/config/vidaliasettings.cpp	2009-03-07 03:57:41.694104224 +0000