[tbb-commits] [tor-browser-bundle/hardened-builds] Bug 13819: Ship expert bundles with console
gk at torproject.org
gk at torproject.org
Tue Nov 24 12:57:57 UTC 2015
commit e4b449bef3f7d44f8533c7d1bdd54cdf0535887f
Author: Georg Koppen <gk at torproject.org>
Date: Mon Sep 21 08:47:47 2015 +0000
Bug 13819: Ship expert bundles with console
Currently, the expert bundles are identical to the tor software we ship
in Tor Browser. This means there is no console showing up displaying
status messages while tor and the browser are running.
This commit fixes this by compiling tor twice, once for Tor Browser
without console showing up and the second time with the console enabled.
The first goes into Tor Browser and the second one is used for the
expert bundle.
---
gitian/descriptors/windows/gitian-tor.yml | 50 ++++++++++++++++++++---------
gitian/mkbundle-windows.sh | 7 ++--
2 files changed, 38 insertions(+), 19 deletions(-)
diff --git a/gitian/descriptors/windows/gitian-tor.yml b/gitian/descriptors/windows/gitian-tor.yml
index 9d6838c..601dc4e 100644
--- a/gitian/descriptors/windows/gitian-tor.yml
+++ b/gitian/descriptors/windows/gitian-tor.yml
@@ -65,20 +65,38 @@ script: |
fi
mkdir -p $OUTDIR/src
#git archive HEAD | tar -x -C $OUTDIR/src
- # Let's avoid the console window popping up.
- export CFLAGS="-mwindows -fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 -fno-strict-overflow -Wno-missing-field-initializers -Wformat -Wformat-security"
- export LDFLAGS="-mwindows -Wl,--dynamicbase -Wl,--nxcompat -Wl,--enable-reloc-section -lssp -L$INSTDIR/gcclibs"
- ./autogen.sh
- find -type f -print0 | xargs -0 touch --date="$REFERENCE_DATETIME"
- ./configure --disable-asciidoc --host=i686-w64-mingw32 --with-libevent-dir=$INSTDIR/libevent --with-openssl-dir=$INSTDIR/openssl --prefix=$INSTDIR --with-zlib-dir=$INSTDIR/zlib/
- make $MAKEOPTS
- make install
- cd ..
- install -s $INSTDIR/bin/tor.exe $INSTDIR/Tor/
- cp $INSTDIR/share/tor/geoip $INSTDIR/Data/Tor/
- cp $INSTDIR/share/tor/geoip6 $INSTDIR/Data/Tor/
+ # We are building normal bundles without the console popping up and expert
+ # ones with. See bug 13819 for the request and details.
+ mkdir build
+ BUILDS="normal expert"
+ for BUILD in $BUILDS
+ do
+ if [ "$BUILD" == "expert" ]
+ then
+ FLAG=""
+ BUNDLE="expert-"
+ else
+ FLAG="-mwindows"
+ BUNDLE=""
+ fi
+ export CFLAGS="$FLAG -fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 -fno-strict-overflow -Wno-missing-field-initializers -Wformat -Wformat-security"
+ export LDFLAGS="$FLAG -Wl,--dynamicbase -Wl,--nxcompat -Wl,--enable-reloc-section -lssp -L$INSTDIR/gcclibs"
+ ./autogen.sh
+ find -type f -print0 | xargs -0 touch --date="$REFERENCE_DATETIME"
+ cd build
+ ../configure --disable-asciidoc --host=i686-w64-mingw32 --with-libevent-dir=$INSTDIR/libevent --with-openssl-dir=$INSTDIR/openssl --prefix=$INSTDIR --with-zlib-dir=$INSTDIR/zlib/
+ make $MAKEOPTS
+ make install
+ cd ../..
+ install -s $INSTDIR/bin/tor.exe $INSTDIR/Tor/
+ cp $INSTDIR/share/tor/geoip $INSTDIR/Data/Tor/
+ cp $INSTDIR/share/tor/geoip6 $INSTDIR/Data/Tor/
- # Grabbing the result
- cd $INSTDIR
- ~/build/dzip.sh tor-win32-gbuilt.zip Tor/ Data/
- cp tor-win32-gbuilt.zip $OUTDIR/
+ # Grabbing the result
+ cd $INSTDIR
+ ~/build/dzip.sh tor-win32-${BUNDLE}gbuilt.zip Tor/ Data/
+ cp tor-win32-${BUNDLE}gbuilt.zip $OUTDIR/
+ cd ~/build/tor
+ # Remove artifacts of the previous build
+ rm -rf build/*
+ done
diff --git a/gitian/mkbundle-windows.sh b/gitian/mkbundle-windows.sh
index 8f89123..6aeec8a 100755
--- a/gitian/mkbundle-windows.sh
+++ b/gitian/mkbundle-windows.sh
@@ -148,7 +148,8 @@ else
cd ..
fi
-if [ ! -f inputs/tor-win32-gbuilt.zip ];
+if [ ! -f inputs/tor-win32-gbuilt.zip -o \
+ ! -f inputs/tor-win32-expert-gbuilt.zip ];
then
echo
echo "****** Starting Tor Component of Windows Bundle (2/5 for Windows) ******"
@@ -161,7 +162,7 @@ then
exit 1
fi
- cp -a build/out/tor-win32-gbuilt.zip inputs/
+ cp -a build/out/tor-win32-*gbuilt.zip inputs/
#cp -a result/tor-windows-res.yml inputs/
else
echo
@@ -230,7 +231,7 @@ then
mkdir -p $WRAPPER_DIR/$TORBROWSER_BUILDDIR/
cp -a build/out/*.exe $WRAPPER_DIR/$TORBROWSER_BUILDDIR/ || exit 1
cp -a build/out/*.mar $WRAPPER_DIR/$TORBROWSER_BUILDDIR/ || exit 1
- cp -a inputs/tor-win32-gbuilt.zip $WRAPPER_DIR/$TORBROWSER_BUILDDIR/tor-win32-${TOR_TAG_ORIG:4}.zip || exit 1
+ cp -a inputs/tor-win32-expert-gbuilt.zip $WRAPPER_DIR/$TORBROWSER_BUILDDIR/tor-win32-${TOR_TAG_ORIG:4}.zip || exit 1
touch inputs/bundle-windows.gbuilt
else
echo
More information about the tbb-commits
mailing list