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

[or-cvs] r20456: {torvm} Revert the FAT based GeoIP data import for Qemu with ISO ima (in torvm/trunk/build: kamikaze/patches win32 win32/files win32/src/pkg)



Author: coderman
Date: 2009-09-01 18:10:13 -0400 (Tue, 01 Sep 2009)
New Revision: 20456

Added:
   torvm/trunk/build/win32/src/pkg/geoip.wxs
Modified:
   torvm/trunk/build/kamikaze/patches/003-kamikaze-kernel-config.patch
   torvm/trunk/build/win32/Makefile
   torvm/trunk/build/win32/files/buildall.sh
   torvm/trunk/build/win32/src/pkg/bundle.nsi
   torvm/trunk/build/win32/src/pkg/netinst.nsi
Log:
Revert the FAT based GeoIP data import for Qemu with ISO image for security reasons, create a package for the geoip data, update Thandy to latest with BitTorrent support.

Modified: torvm/trunk/build/kamikaze/patches/003-kamikaze-kernel-config.patch
===================================================================
--- torvm/trunk/build/kamikaze/patches/003-kamikaze-kernel-config.patch	2009-09-01 16:42:54 UTC (rev 20455)
+++ torvm/trunk/build/kamikaze/patches/003-kamikaze-kernel-config.patch	2009-09-01 22:10:13 UTC (rev 20456)
@@ -1,6 +1,6 @@
 diff -Naur a/target/linux/x86/config-2.6.28 b/target/linux/x86/config-2.6.28
 --- a/target/linux/x86/config-2.6.28	2009-05-15 10:40:04.149461000 +0000
-+++ b/target/linux/x86/config-2.6.28	2009-08-20 05:43:28.977447720 +0000
++++ b/target/linux/x86/config-2.6.28	2009-09-01 01:16:26.598309604 +0000
 @@ -2,7 +2,6 @@
  CONFIG_4KSTACKS=y
  # CONFIG_60XX_WDT is not set
@@ -368,7 +368,7 @@
  CONFIG_X86_RESERVE_LOW_64K=y
  # CONFIG_X86_SPEEDSTEP_CENTRINO is not set
  # CONFIG_X86_SPEEDSTEP_ICH is not set
-@@ -392,6 +433,241 @@
+@@ -392,6 +433,240 @@
  CONFIG_X86_UP_APIC=y
  CONFIG_X86_UP_IOAPIC=y
  CONFIG_X86_VERBOSE_BOOTUP=y
@@ -553,7 +553,7 @@
 +CONFIG_INOTIFY=y
 +CONFIG_INOTIFY_USER=y
 +CONFIG_ISO9660_FS=y
-+CONFIG_VFAT_FS=y
++# CONFIG_VFAT_FS is not set
 +# CONFIG_JFFS2_FS is not set
 +# CONFIG_JFFS2_CMODE_PRIORITY is not set
 +# CONFIG_SQUASHFS is not set
@@ -563,7 +563,6 @@
 +CONFIG_NLS_ASCII=y
 +CONFIG_NLS_ISO8859_1=y
 +CONFIG_NLS_UTF8=y
-+CONFIG_NLS_CODEPAGE_437=y
 +# CONFIG_DEBUG_FS is not set
 +# CONFIG_SYSCTL_SYSCALL_CHECK is not set
 +# CONFIG_X86_VERBOSE_BOOTUP is not set

Modified: torvm/trunk/build/win32/Makefile
===================================================================
--- torvm/trunk/build/win32/Makefile	2009-09-01 16:42:54 UTC (rev 20455)
+++ torvm/trunk/build/win32/Makefile	2009-09-01 22:10:13 UTC (rev 20456)
@@ -218,6 +218,17 @@
 TORBUTTON_XPI_URL=http://releases.mozilla.org/pub/mozilla.org/addons/2275/$(TORBUTTON_XPI_F)
 TORBUTTON_XPI_SUM=d08fa9c1efc0203b5cf9c3fbc551dc158963821b45f1e9fe5763427332e00192
 
+BITTORRENT_VER=3.4.2.orig
+BITTORRENT_F=bittorrent_$(BITTORRENT_VER).tar.gz
+# gah, sometimes it is pub/debian/... and others debian/... ???
+BITTORRENT_URL=ftp://cdn.debian.net/debian/pool/main/b/bittorrent/$(BITTORRENT_F)
+BITTORRENT_SUM=5bc3fc2372b0765d626a01aa60575b297b7d90629db019e885cfd053bd949fc5
+
+BTPATCH_VER=3.4.2-11.1
+BTPATCH_F=bittorrent_$(BTPATCH_VER).diff.gz
+BTPATCH_URL=ftp://cdn.debian.net/debian/pool/main/b/bittorrent/$(BTPATCH_F)
+BTPATCH_SUM=9dffc33c7c31daef9c6e63aaad4cef8b137d515e31b0685b3205efbdd3cb6c21
+
 MARBLE_NAME=marble-latest
 MARBLE_TGZ=$(MARBLE_NAME).tar.gz
 MARBLE_SVN=https://svn.vidalia-project.net/svn/marble/
@@ -253,7 +264,7 @@
 THANDY_NAME=thandy-latest
 THANDY_TGZ=$(THANDY_NAME).tar.gz
 THANDY_GIT=git://git.torproject.org/git/thandy
-THANDY_VER=b346e24c3d67c129b8609d44cab77160b3cfb399
+THANDY_VER=88e9bef040e05e0d94846577cd1c0a3d8f9a0653
 
 # XXX: tmp equivalent of exit 0 when chaining cmds
 # buildscripts need some dire clean up...
@@ -261,7 +272,7 @@
 
 CACHE_URL_BASE=http://data.peertech.org/pkgcache
 
-ALLPKGNAMES=ZLIB GZIP BZIP2 LIBARCH BINUTILS GCCORE GPP MINGWRUN MINGWUTIL MAKE W32API MSYSCORE LIBTOOL MINIRES MSYSZLIB MSYSCRYPT MSYSSSL MSYSSSH ZLIBSRC PTHREADS LIBEVENT AMAKE ACONF PERL GROFF CMAKE QT NSIS SSLSRC PYTHON PY2EXE WIX WIXSRC GNURX POLIPO SDL WPCAPSRC QEMU TORBUTTON_XPI OVPN GEOIP
+ALLPKGNAMES=ZLIB GZIP BZIP2 LIBARCH BINUTILS GCCORE GPP MINGWRUN MINGWUTIL MAKE W32API MSYSCORE LIBTOOL MINIRES MSYSZLIB MSYSCRYPT MSYSSSL MSYSSSH ZLIBSRC PTHREADS LIBEVENT AMAKE ACONF PERL GROFF CMAKE QT NSIS SSLSRC PYTHON PY2EXE WIX WIXSRC GNURX POLIPO SDL WPCAPSRC QEMU TORBUTTON_XPI OVPN GEOIP BITTORRENT BTPATCH
 
 # adjust if we're dealing with non source, zip or tar archives for a package
 SEVNZIP_OPT_DL=
@@ -356,6 +367,8 @@
 	mv $(ISODIR)/dl/$(LIBEVENT_F) $(ISODIR)/dl/src/; \
 	mv $(ISODIR)/dl/$(PYTHON_F) $(ISODIR)/dl/src/; \
 	mv $(ISODIR)/dl/$(QT_F) $(ISODIR)/dl/src/; \
+	mv $(ISODIR)/dl/$(BITTORRENT_F) $(ISODIR)/dl/src/; \
+	mv $(ISODIR)/dl/$(BTPATCH_F) $(ISODIR)/dl/src/; gzip -d $(ISODIR)/dl/src/$(BTPATCH_F); \
 	echo "--- Repacking WinPCAP archive ..."; \
 	$(UNZIP) $(WDLDIR)/$(WPCAPSRC_F); mv winpcap WpcapSrc_$(WPCAPSRC_VER); tar cf $(ISODIR)/dl/src/WpcapSrc_$(WPCAPSRC_VER).tar WpcapSrc_$(WPCAPSRC_VER); gzip -9 $(ISODIR)/dl/src/WpcapSrc_$(WPCAPSRC_VER).tar; rm -rf WpcapSrc_$(WPCAPSRC_VER) $(ISODIR)/dl/$(WPCAPSRC_F); \
 	echo "--- Repacking Py2Exe archive ..."; \
@@ -396,7 +409,8 @@
 	fi; \
 	if [ -f $(WDLDIR)/$(GEOIP_F) ]; then \
 		echo "--- Creating Tor GEOIP file from $(GEOIP_F) source ..."; \
-		$(UNZIP) $(WDLDIR)/$(GEOIP_F) -d tmp; cat tmp/*.csv | cut -d, -f1-3 | sed 's/"//g' > $(ISODIR)/dl/geoip.txt; rm -rf tmp; rm $(ISODIR)/dl/$(GEOIP_F); \
+		$(UNZIP) $(WDLDIR)/$(GEOIP_F) -d tmp; cat tmp/*.csv | cut -d, -f1-3 | sed 's/"//g' > $(ISODIR)/add/GEOIP.TXT; \
+		mkisofs -hide-rr-moved -pad -l -o $(ISODIR)/add/geoip.iso -J $(ISODIR)/add/GEOIP.TXT ; rm -rf tmp; \
 	fi; \
 	echo "--- Creating source archives from win32 tree ..."; \
 	( cd src && tar zcf ../$(ISODIR)/dl/src/torvm-w32.tgz torvm-w32 ); \

Modified: torvm/trunk/build/win32/files/buildall.sh
===================================================================
--- torvm/trunk/build/win32/files/buildall.sh	2009-09-01 16:42:54 UTC (rev 20455)
+++ torvm/trunk/build/win32/files/buildall.sh	2009-09-01 22:10:13 UTC (rev 20456)
@@ -10,6 +10,7 @@
 
   export KERNEL_IMAGE=/src/add/vmlinuz
   export VMHDD_IMAGE=/src/add/hdd.img
+  export GEOIP_IMAGE=/src/add/geoip.iso
   export TORVMUSER_IMAGE=torvmuser.bmp
   export KERNEL_LICENSE_DOCS=/src/add/kernel-license-docs.tgz
   
@@ -159,6 +160,10 @@
 
   export WIXSRC_DIR=wixsrc
   export WIXSRC_FILE=wixsrc.tar.gz
+
+  export BITTORRENT_FILE=bittorrent_3.4.2.orig.tar.gz
+  export BITTORRENT_DIR=BitTorrent-3.4.2
+  export BTPATCH_FILE=bittorrent_3.4.2-11.1.diff
   
   if [ -d "$VS80COMNTOOLS" ]; then
     export VSTOOLSDIR="$VS80COMNTOOLS"
@@ -232,7 +237,7 @@
     chmod 600 ~/.ssh/id_rsa >/dev/null 2>&1
   fi
 
-  for dir in $ddir $bdlibdir $bindir $statedir $statedir/rofs $brootdir $instdir $thandir $bundledir $licensedir; do
+  for dir in $ddir $bdlibdir $bindir $statedir $brootdir $instdir $thandir $bundledir $licensedir; do
     if [ ! -d $dir ]; then
       mkdir -p $dir
     fi
@@ -784,6 +789,18 @@
   cd /usr/src
   tar zxf thandy-latest.tar.gz
   cd thandy-latest
+  if [ -f /usr/src/$BITTORRENT_FILE ]; then
+    echo "Creating patched BitTorrent tree for Thandy use ..."
+    mkdir tmp_extract
+    (
+      cd tmp_extract
+      tar zxf /usr/src/$BITTORRENT_FILE
+      cd $BITTORRENT_DIR
+      patch -p1 < /usr/src/$BTPATCH_FILE
+    )
+    mv tmp_extract/$BITTORRENT_DIR/BitTorrent lib/
+    rm -rf tmp_extract
+  fi
   echo "Starting python Thandy build ..."
   python setup.py build
   if (( $? != 0 )); then
@@ -1338,6 +1355,36 @@
   mv bin lib state torvm.exe Tor_VM/
   mv save-bin bin
 
+  if [ -f $GEOIP_IMAGE ]; then
+    echo "Linking tor geoip data MSI installer package ..."
+    mkdir lib
+    cp $GEOIP_IMAGE lib/
+    heat.exe dir lib -gg -ke -sfrag -nologo -out torgeoip.wxs -template:product
+    tail +4c torgeoip.wxs > torgeoip.wxs.tmp; dos2unix torgeoip.wxs.tmp; cat torgeoip.wxs.tmp > torgeoip.wxs; rm -f torgeoip.wxs.tmp
+    wixtool.exe splice -i geoip.wxs -o geoip-tmpdir.wxs Directory:ProgramsLibDir=torgeoip.wxs:Directory:TARGETDIR
+    wixtool.exe splice -i geoip-tmpdir.wxs -o geoip-tmpall.wxs Feature:MainApplication=torgeoip.wxs:Feature:ProductFeature
+    wixtool.exe userlocal -i geoip-tmpall.wxs -o geoip-all.wxs "Software\\Tor GeoIP Data:MainApplication"
+    rm -f geoip-tmpdir.wxs geoip-tmpall.wxs
+    candle.exe $CANDLE_OPTS geoip-all.wxs
+    WIX_CAB_CACHE=_geoip.cabcache
+    WIX_LINKOUT=_geoip.wixout
+    if [ -e $WIX_CAB_CACHE ]; then
+      rm -rf $WIX_CAB_CACHE
+    fi  
+    if [ -e $WIX_LINKOUT ]; then
+      rm -rf $WIX_LINKOUT
+    fi  
+    light.exe $LIGHT_OPTS -sloc -out $WIX_LINKOUT -xo -cc $WIX_CAB_CACHE WixUI_Custom.wixobj geoip-all.wixobj -ext $WIX_UI
+    light.exe $LIGHT_OPTS -out geoip.msi -cc $WIX_CAB_CACHE $WIX_DEFAULT_LOC_LINK -reusecab $WIX_LINKOUT -ext $WIX_UI
+    if [ -f geoip.msi ]; then
+      cp geoip.msi $bundledir
+      ls -l geoip.msi
+    else
+      echo "ERROR: unable to build Tor GeoIP Data MSI installer."
+    fi  
+    rm -rf lib
+  fi
+
   echo "Linking tor MSI installer package ..."
   candle.exe $CANDLE_OPTS -dEXTLICENSE tor.wxs
   WIX_CAB_CACHE=_tor.cabcache
@@ -1610,6 +1657,10 @@
     rm -f $exename
   fi
   cp -a LicenseDocs Tor_VM/
+  # also make sure the GeoIP file is included in the stand alone Tor VM archive.
+  if [ -f $GEOIP_IMAGE ]; then
+    cp $GEOIP_IMAGE Tor_VM/lib/
+  fi
   7z.exe a -sfx7z.sfx $exename Tor_VM
   if [ -f $exename ]; then
     cp $exename $bundledir

Modified: torvm/trunk/build/win32/src/pkg/bundle.nsi
===================================================================
--- torvm/trunk/build/win32/src/pkg/bundle.nsi	2009-09-01 16:42:54 UTC (rev 20455)
+++ torvm/trunk/build/win32/src/pkg/bundle.nsi	2009-09-01 22:10:13 UTC (rev 20456)
@@ -2,7 +2,7 @@
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
   
-!define VERSION "0.0.2.1"
+!define VERSION "0.0.3.0"
 !define INSTALLER "TorVMBundle.exe"
 !define WEBSITE "https://www.torproject.org/";
 !define LICENSE "LICENSE"
@@ -42,6 +42,7 @@
 Function ExtractPackages
 	File "license.msi"
 	File "torvm.msi"
+	File "geoip.msi"
 	File "torbutton.msi"
 	File "thandy.msi"
 	File "polipo.msi"
@@ -50,6 +51,7 @@
 
 Function RunInstallers
 	ExecWait 'msiexec /i "$INSTDIR\torvm.msi" BUNDLE=1 /qn'
+	ExecWait 'msiexec /i "$INSTDIR\geoip.msi" /qn'
 	ExecWait 'msiexec /i "$INSTDIR\vidalia.msi" NOSC=1 /qn'
 	ExecWait 'msiexec /i "$INSTDIR\thandy.msi" NOSC=1 /qn'
 	ExecWait 'msiexec /i "$INSTDIR\polipo.msi" NOSC=1 /qn'

Added: torvm/trunk/build/win32/src/pkg/geoip.wxs
===================================================================
--- torvm/trunk/build/win32/src/pkg/geoip.wxs	                        (rev 0)
+++ torvm/trunk/build/win32/src/pkg/geoip.wxs	2009-09-01 22:10:13 UTC (rev 20456)
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="Windows-1252" ?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
+  <?define ThisProductVersion="0.0.2" ?>
+  <?define ThisProductVersionDisp="$(var.ThisProductVersion)" ?>
+  <?define UpgradeCode="27bcb81b-f12a-4ac6-88f7-481e085ffd98" ?>
+  <?define CurrProductGUID="1e449b48-dcf1-4da8-bc77-266c3c8cfbe1" ?>
+  <?define CurrTorVMProgramsGUID="be47134f-947c-4840-a720-c193bfc09c97" ?>
+
+  <Product Name="Tor GeoIP Data $(var.ThisProductVersionDisp)" Id="$(var.CurrProductGUID)"
+           Language="!(loc.LCID)"
+           Version="$(var.ThisProductVersion)"
+           Manufacturer="https://www.torproject.org";
+           UpgradeCode="$(var.UpgradeCode)">
+    
+    <Package Id="*" Keywords="Installer"
+             Description="Tor GeoIP Data $(var.ThisProductVersionDisp) Installer"
+             Manufacturer="https://www.torproject.org";
+             InstallerVersion="200" Compressed="yes"
+             InstallPrivileges="limited" />
+
+    <Media Id="1" Cabinet="License.cab" CompressionLevel="high"
+           EmbedCab="yes" DiskPrompt="CD-ROM #1" />
+    <Property Id="DiskPrompt" Value="Tor GeoIP Data $(var.ThisProductVersionDisp) Installation Volume [1]" />
+    <Property Id="ALLUSERS" Secure="yes"/>
+    <Property Id="ReinstallModeText">omus</Property>
+
+    <!-- Associate this package with the upgrade code for this series
+    to ensure that upgrade installations by Thandy or other means work
+    as expected.
+    The OnlyDetect option must be false to ensure that existing files
+    from an older version are removed and replaced with current files.
+      -->
+    <Upgrade Id="$(var.UpgradeCode)">
+      <UpgradeVersion
+        Property="UPGRADEFOUND"
+        OnlyDetect="no"
+        Minimum="0.0.1"
+        IncludeMinimum="yes"
+        Maximum="$(var.ThisProductVersion)"
+        IncludeMaximum="no"
+      />
+    </Upgrade>
+
+
+    <Directory Id="TARGETDIR" Name="SourceDir">
+      <Directory Id="ProgramFilesFolder" Name="ProgramFiles">
+        <Directory Id="ProgramsInstDir" Name="Tor VM">
+          <Component Id="TorVMProgramsFolderRef" Guid="$(var.CurrTorVMProgramsGUID)">
+            <CreateFolder />
+            <RemoveFolder Id="RemoveTorVMProgramsFolder" On="uninstall" />
+            <RegistryKey Root="HKCU" Key="Software\Tor GeoIP Data" Action="createAndRemoveOnUninstall">
+              <RegistryValue Name="Version" Value="$(var.ThisProductVersion)" Type="string" KeyPath="yes" />
+            </RegistryKey>
+          </Component>
+          <Directory Id="ProgramsLibDir" Name="lib">
+          </Directory>
+        </Directory>
+      </Directory>
+    </Directory>
+
+    <!-- Build up the feature hierarchy -->
+    <Feature Id="Complete" Title="Tor GeoIP Data"
+             Level="1" Display="expand"
+             Description="Tor GeoIP Data">
+      <Feature Id="MainApplication" Title="Tor GeoIP Data $(var.ThisProductVersionDisp)"
+               AllowAdvertise="no" Absent="disallow" Level="1"
+               Description="Main application">
+        <ComponentRef Id="TorVMProgramsFolderRef" />
+      </Feature>
+    </Feature>
+
+    <!-- Upgrade installation sequence. -->
+    <InstallExecuteSequence>
+      <RemoveExistingProducts After="InstallValidate" />
+    </InstallExecuteSequence>
+
+    <!-- Set the UI options -->
+    <UIRef Id="WixUI_Custom" />
+    <Icon Id="tor.ico" SourceFile="tor.ico" />
+    <WixVariable Id="WixUIBannerBmp" Value="header.bmp" />
+    <WixVariable Id="WixUIDialogBmp" Value="welcome.bmp" />
+  </Product>
+</Wix>

Modified: torvm/trunk/build/win32/src/pkg/netinst.nsi
===================================================================
--- torvm/trunk/build/win32/src/pkg/netinst.nsi	2009-09-01 16:42:54 UTC (rev 20455)
+++ torvm/trunk/build/win32/src/pkg/netinst.nsi	2009-09-01 22:10:13 UTC (rev 20456)
@@ -2,7 +2,7 @@
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
   
-!define VERSION "0.0.2.1"
+!define VERSION "0.0.3.0"
 !define INSTALLER "TorVMNetInstaller.exe"
 !define WEBSITE "https://www.torproject.org/";
 !define LICENSE "LICENSE"
@@ -47,10 +47,10 @@
 Function RunInstallers
 	ExecWait 'msiexec /i "$INSTDIR\thandy.msi" NOSC=1 /qn'
 	ExecWait 'msiexec /i "$INSTDIR\license.msi" NOSC=1 /qn'
-	ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\TorVM Updates" /bundleinfo/torvm/win32/'
-	ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\Polipo Updates" /bundleinfo/polipo/win32/'
-	ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\TorButton Updates" /bundleinfo/torbutton/win32/'
-	ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\Vidalia Updates" /bundleinfo/vidalia/win32/'
+	ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --force-check "--repo=$LOCALAPPDATA\Thandy\TorVM Updates" /bundleinfo/torvm/win32/'
+	ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --force-check "--repo=$LOCALAPPDATA\Thandy\Polipo Updates" /bundleinfo/polipo/win32/'
+	ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --force-check "--repo=$LOCALAPPDATA\Thandy\TorButton Updates" /bundleinfo/torbutton/win32/'
+	ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --force-check "--repo=$LOCALAPPDATA\Thandy\Vidalia Updates" /bundleinfo/vidalia/win32/'
 	ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --install "--repo=$LOCALAPPDATA\Thandy\TorVM Updates" /bundleinfo/torvm/win32/'
 	ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --install "--repo=$LOCALAPPDATA\Thandy\Polipo Updates" /bundleinfo/polipo/win32/'
 	ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --install "--repo=$LOCALAPPDATA\Thandy\TorButton Updates" /bundleinfo/torbutton/win32/'