commit eef7f8761aba04722f67a098b8a7aba72a5917cb Author: Georg Koppen gk@torproject.org Date: Tue Apr 15 09:06:07 2014 +0000
Bug 10356: Refactoring the bundle descriptors. --- gitian/build-helpers/dzip.sh | 2 +- gitian/descriptors/linux/gitian-bundle.yml | 54 ++++++++-------------- gitian/descriptors/mac/gitian-bundle.yml | 64 +++++++++++--------------- gitian/descriptors/windows/gitian-bundle.yml | 43 ++++++----------- 4 files changed, 62 insertions(+), 101 deletions(-)
diff --git a/gitian/build-helpers/dzip.sh b/gitian/build-helpers/dzip.sh index 2e38c89..2f7dc54 100755 --- a/gitian/build-helpers/dzip.sh +++ b/gitian/build-helpers/dzip.sh @@ -8,4 +8,4 @@ shift find $@ -executable -exec chmod 700 {} ; find $@ ! -executable -exec chmod 600 {} ;
-find $@ | sort | zip $ZIPOPTS -X -@ $ZIPFILE +find $@ | sort | zip $ZIPOPTS -X -@ "$ZIPFILE" diff --git a/gitian/descriptors/linux/gitian-bundle.yml b/gitian/descriptors/linux/gitian-bundle.yml index 3fa79cc..fa78928 100644 --- a/gitian/descriptors/linux/gitian-bundle.yml +++ b/gitian/descriptors/linux/gitian-bundle.yml @@ -5,11 +5,10 @@ suites: architectures: - "i386" - "amd64" -packages: +packages: - "git-core" - "unzip" - "zip" -- "mingw-w64" - "faketime" - "python" - "rnv" @@ -52,14 +51,12 @@ script: | export LC_ALL=C export TORBROWSER_VERSION=`cat bare-version` umask 0022 - # + # mkdir -p $OUTDIR/ - mkdir -p tor-browser/Data/Browser/Caches mkdir -p tor-browser/Data/Browser/profile.default/extensions/https-everywhere@eff.org + mkdir -p tor-browser/Data/Browser/Caches mkdir -p tor-browser/Docs/sources/ # - cp *.xpi tor-browser/Data/Browser/profile.default/extensions/ - # cd tor-launcher make clean make package @@ -85,19 +82,19 @@ script: | # makexpi.sh. See https://trac.torproject.org/projects/tor/ticket/10066 rm -f .git/refs/heads/master ./makexpi.sh - cp ./pkg/*.xpi ../tor-browser/Data/Browser/profile.default/extensions/https-everywhere@eff.org.xpi + cp pkg/*.xpi ../tor-browser/Data/Browser/profile.default/extensions/https-everywhere@eff.org.xpi cd .. # - mv tor-browser/Data/Browser/profile.default/extensions/noscript@noscript.net.xpi tor-browser/Data/Browser/profile.default/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi - cd tor-browser/Data/Browser/profile.default/extensions/https-everywhere@eff.org/ + cp *.xpi tor-browser/Data/Browser/profile.default/extensions/ + cd tor-browser/Data/Browser/profile.default/extensions + mv noscript@noscript.net.xpi {73a6fe31-595d-460b-a920-fcc0f8843232}.xpi + cd https-everywhere@eff.org/ unzip ../https-everywhere@eff.org.xpi rm ../https-everywhere@eff.org.xpi cd ~/build/ # unzip relativelink-src.zip - cd RelativeLink - cp RelativeLink.sh ../tor-browser/start-tor-browser - cd .. + cp RelativeLink/RelativeLink.sh tor-browser/start-tor-browser # cd tor-browser unzip ~/build/tor-browser-linux$GBUILD_BITS-gbuilt.zip @@ -115,22 +112,18 @@ script: | # # Copy reproducibility info cp versions tor-browser/Docs/sources/ - cp bundle.inputs tor-browser/Docs/sources/bundle.inputs + cp bundle.inputs tor-browser/Docs/sources/ # cp -a tor-browser tor-browser_en-US - # FF24 puts the prefs in a different jar: - if [ -f tor-browser_en-US/Browser/browser/omni.ja ]; then - pushd tor-browser_en-US/Browser/browser/ - else - pushd tor-browser_en-US/Browser/ - fi + # + pushd tor-browser_en-US/Browser/browser/ unzip omni.ja defaults/preferences/000-tor-browser.js + cp defaults/preferences/000-tor-browser.js ~/build/ + # Set the locale of the bundle. echo "pref("general.useragent.locale", "en-US");" >> defaults/preferences/000-tor-browser.js - zip -Xd omni.ja defaults/preferences/000-tor-browser.js zip -Xm omni.ja defaults/preferences/000-tor-browser.js popd - #7z a -sfx tor-browser.exe tor-browser_en-US - #mv tor-browser.exe $OUTDIR/tor-browser-linux${GBUILD_BITS}_en-US.7z-selfextract + # ~/build/dtar.sh $OUTDIR/tor-browser-linux${GBUILD_BITS}-${TORBROWSER_VERSION}_en-US.tar.xz tor-browser_en-US rm -rf tor-browser_en-US # @@ -143,23 +136,16 @@ script: | cp $xpi ../tor-browser_$LANG/Data/Browser/profile.default/extensions/langpack-$LANG@firefox.mozilla.org.xpi cd ..
- # FF24 puts the prefs in a different jar: - if [ -f tor-browser_$LANG/Browser/browser/omni.ja ]; then - pushd tor-browser_$LANG/Browser/browser/ - else - pushd tor-browser_$LANG/Browser/ - fi - - unzip omni.ja defaults/preferences/000-tor-browser.js + pushd tor-browser_$LANG/Browser/browser/ + mkdir -p defaults/preferences + cp ~/build/000-tor-browser.js defaults/preferences/ + # Set the locale of the bundle. echo "pref("general.useragent.locale", "$LANG");" >> defaults/preferences/000-tor-browser.js - zip -Xd omni.ja defaults/preferences/000-tor-browser.js zip -Xm omni.ja defaults/preferences/000-tor-browser.js popd
- #7z a -sfx tor-browser.exe tor-browser_$LANG - #mv tor-browser.exe $OUTDIR/tor-browser-linux${GBUILD_BITS}_$LANG.7z-selfextract ~/build/dtar.sh $OUTDIR/tor-browser-linux${GBUILD_BITS}-${TORBROWSER_VERSION}_$LANG.tar.xz tor-browser_$LANG
rm -rf tor-browser_$LANG cd linux-langpacks - done + done diff --git a/gitian/descriptors/mac/gitian-bundle.yml b/gitian/descriptors/mac/gitian-bundle.yml index 4325a1b..4928acb 100644 --- a/gitian/descriptors/mac/gitian-bundle.yml +++ b/gitian/descriptors/mac/gitian-bundle.yml @@ -4,12 +4,10 @@ suites: - "precise" architectures: - "i386" -packages: +packages: - "git-core" - "unzip" - "zip" -- "mingw-w64" -- "nsis" - "faketime" - "python" - "hfsprogs" @@ -65,13 +63,13 @@ script: | export TORBROWSER_APP="TorBrowser" export TORBROWSER_NAME="TorBrowserBundle" fi - # + # mkdir -p $OUTDIR/ - mkdir -p dmg mkdir -p $TORBROWSER_NAME.app/Data/Browser/profile.default/extensions/https-everywhere@eff.org mkdir -p $TORBROWSER_NAME.app/Data/Browser/Caches - mkdir -p $TORBROWSER_NAME.app/Contents/MacOS/TorBrowser.app/Contents/MacOS/ mkdir -p $TORBROWSER_NAME.app/Docs/sources + mkdir -p $TORBROWSER_NAME.app/Contents/MacOS/TorBrowser.app/Contents/MacOS/ + mkdir -p dmg # cd tor-launcher make clean @@ -80,9 +78,7 @@ script: | mkdir pkg/tmp cd pkg/tmp unzip ../*.xpi - rm ../*.xpi - ~/build/dzip.sh ../tor-launcher@torproject.org.xpi . - mv ../tor-launcher@torproject.org.xpi ../../../$TORBROWSER_NAME.app/Data/Browser/profile.default/extensions/tor-launcher@torproject.org.xpi + ~/build/dzip.sh ../../../$TORBROWSER_NAME.app/Data/Browser/profile.default/extensions/tor-launcher@torproject.org.xpi . cd ../../../ # cd torbutton @@ -92,9 +88,7 @@ script: | mkdir pkg/tmp cd pkg/tmp unzip ../*.xpi - rm ../*.xpi - ~/build/dzip.sh ../torbutton@torproject.org.xpi . - mv ../torbutton@torproject.org.xpi ../../../$TORBROWSER_NAME.app/Data/Browser/profile.default/extensions/torbutton@torproject.org.xpi + ~/build/dzip.sh ../../../$TORBROWSER_NAME.app/Data/Browser/profile.default/extensions/torbutton@torproject.org.xpi . cd ../../../ # cd https-everywhere @@ -102,11 +96,11 @@ script: | # makexpi.sh. See https://trac.torproject.org/projects/tor/ticket/10066 rm -f .git/refs/heads/master ./makexpi.sh - cp ./pkg/*.xpi ../$TORBROWSER_NAME.app/Data/Browser/profile.default/extensions/https-everywhere@eff.org.xpi + cp pkg/*.xpi ../$TORBROWSER_NAME.app/Data/Browser/profile.default/extensions/https-everywhere@eff.org.xpi cd .. # cp *.xpi ./$TORBROWSER_NAME.app/Data/Browser/profile.default/extensions/ - cd ./$TORBROWSER_NAME.app/Data/Browser/profile.default/extensions/ + cd $TORBROWSER_NAME.app/Data/Browser/profile.default/extensions/ mv noscript@noscript.net.xpi {73a6fe31-595d-460b-a920-fcc0f8843232}.xpi cd https-everywhere@eff.org unzip ../https-everywhere@eff.org.xpi @@ -114,13 +108,11 @@ script: | cd ~/build/ # unzip relativelink-src.zip - cd RelativeLink - cp RelativeLinkOSX.sh ../$TORBROWSER_NAME.app/Contents/MacOS/TorBrowserBundle - cd .. + cp RelativeLink/RelativeLinkOSX.sh $TORBROWSER_NAME.app/Contents/MacOS/TorBrowserBundle # - unzip ~/build/tor-mac$GBUILD_BITS-gbuilt.zip + unzip tor-mac$GBUILD_BITS-gbuilt.zip if [ $BUILD_PT_BUNDLES ]; then - unzip ~/build/pluggable-transports-mac$GBUILD_BITS-gbuilt.zip + unzip pluggable-transports-mac$GBUILD_BITS-gbuilt.zip fi cd $TORBROWSER_NAME.app unzip ~/build/mac-skeleton.zip @@ -139,7 +131,7 @@ script: | # # Copy reproducibility info cp versions $TORBROWSER_NAME.app/Docs/sources/ - cp bundle.inputs $TORBROWSER_NAME.app/Docs/sources/bundle.inputs + cp bundle.inputs $TORBROWSER_NAME.app/Docs/sources/ # # Set up DMG skeleton cd libdmg-hfsplus @@ -147,31 +139,31 @@ script: | cmake CMakeLists.txt cd dmg make - cd ../../ - cd dmg - tar -Jxvf ~/build/dmg-applications.tar.xz # FIXME: Desktop or Application as dest? + cd ../../dmg + # FIXME: Desktop or Application as dest? + tar -Jxvf ~/build/dmg-applications.tar.xz cd .. # - # FF24 puts the prefs in the browser jar: pushd $TORBROWSER_NAME.app/Contents/MacOS/TorBrowser.app/Contents/MacOS/browser/ unzip omni.ja defaults/preferences/000-tor-browser.js cp defaults/preferences/000-tor-browser.js ~/build/ + # Set the locale of the bundle. echo "pref("general.useragent.locale", "en-US");" >> defaults/preferences/000-tor-browser.js zip -Xm omni.ja defaults/preferences/000-tor-browser.js popd # if [ ${TORBROWSER_VERSION::3} == "3.5" ]; then - cp -a ~/build/$TORBROWSER_NAME.app ~/build/${TORBROWSER_NAME}_en-US.app + cp -a ~/build/$TORBROWSER_NAME.app ~/build/${TORBROWSER_NAME}_en-US.app ~/build/dzip.sh $OUTDIR/TorBrowserBundle-${TORBROWSER_VERSION}-osx${GBUILD_BITS}_en-US.zip ${TORBROWSER_NAME}_en-US.app - rm -rf ~/build/${TORBROWSER_NAME}_en-US.app + rm -rf ~/build/${TORBROWSER_NAME}_en-US.app else - # XXX: We need to insert these placeholders because otherwise mkisofs won't - # include these otherwise empty dirs: - touch ~/build/$TORBROWSER_NAME.app/Data/Browser/Caches/placeholder.txt - touch ~/build/$TORBROWSER_NAME.app/Contents/MacOS/TorBrowser.app/Contents/MacOS/browser/defaults/preferences/placeholder.txt - cp -a ~/build/$TORBROWSER_NAME.app ~/build/dmg/$TORBROWSER_APP.app + # XXX: We need to insert these placeholders because otherwise mkisofs won't + # include these otherwise empty dirs: + touch ~/build/$TORBROWSER_NAME.app/Data/Browser/Caches/placeholder.txt + touch ~/build/$TORBROWSER_NAME.app/Contents/MacOS/TorBrowser.app/Contents/MacOS/browser/defaults/preferences/placeholder.txt + cp -a ~/build/$TORBROWSER_NAME.app ~/build/dmg/$TORBROWSER_APP.app ~/build/ddmg.sh $OUTDIR/TorBrowser-${TORBROWSER_VERSION}-osx${GBUILD_BITS}_en-US.dmg ~/build/dmg - rm -rf ~/build/dmg/$TORBROWSER_APP.app + rm -rf ~/build/dmg/$TORBROWSER_APP.app fi mv $TORBROWSER_NAME.app ${TORBROWSER_NAME}_plain.app # @@ -189,11 +181,10 @@ script: | cp $xpi ~/build/dmg/$DEST.app/Data/Browser/profile.default/extensions/langpack-$LANG@firefox.mozilla.org.xpi cd ..
- # FF24 puts the prefs in the browser jar: pushd ~/build/dmg/$DEST.app/Contents/MacOS/TorBrowser.app/Contents/MacOS/browser/ - mkdir -p defaults/preferences - cp ~/build/000-tor-browser.js defaults/preferences/000-tor-browser.js + cp ~/build/000-tor-browser.js defaults/preferences/ + # Set the locale of the bundle. echo "pref("general.useragent.locale", "$LANG");" >> defaults/preferences/000-tor-browser.js zip -Xm omni.ja defaults/preferences/000-tor-browser.js popd @@ -208,5 +199,4 @@ script: | rm -rf ~/build/dmg/$DEST.app fi cd mac-langpacks - done - cd .. + done diff --git a/gitian/descriptors/windows/gitian-bundle.yml b/gitian/descriptors/windows/gitian-bundle.yml index c8b29c9..ac79d58 100644 --- a/gitian/descriptors/windows/gitian-bundle.yml +++ b/gitian/descriptors/windows/gitian-bundle.yml @@ -4,10 +4,11 @@ suites: - "precise" architectures: - "i386" -packages: +packages: - "git-core" - "unzip" - "zip" +# This is needed for compiling the StartTorBrowserBundle.exe. - "mingw-w64" - "nsis" - "faketime" @@ -48,7 +49,7 @@ script: | export TORBROWSER_VERSION=`cat bare-version` export LC_ALL=C umask 0022 - # + # mkdir -p $OUTDIR/ mkdir -p tbb-windows-installer/"Tor Browser"/Data/Browser/profile.default/extensions/https-everywhere@eff.org mkdir -p tbb-windows-installer/"Tor Browser"/Data/Browser/Caches @@ -61,9 +62,7 @@ script: | mkdir pkg/tmp cd pkg/tmp unzip ../*.xpi - rm ../*.xpi - ~/build/dzip.sh ../tor-launcher@torproject.org.xpi . - mv ../tor-launcher@torproject.org.xpi ../../../tbb-windows-installer/"Tor Browser"/Data/Browser/profile.default/extensions/tor-launcher@torproject.org.xpi + ~/build/dzip.sh ../../../tbb-windows-installer/"Tor Browser"/Data/Browser/profile.default/extensions/tor-launcher@torproject.org.xpi . cd ../../../ # cd torbutton @@ -72,9 +71,7 @@ script: | # FIXME: Switch to re-dzip.sh here? cd pkg/tmp unzip ../*.xpi - rm ../*.xpi - ~/build/dzip.sh ../torbutton@torproject.org.xpi . - mv ../torbutton@torproject.org.xpi ../../../tbb-windows-installer/"Tor Browser"/Data/Browser/profile.default/extensions/torbutton@torproject.org.xpi + ~/build/dzip.sh ../../../tbb-windows-installer/"Tor Browser"/Data/Browser/profile.default/extensions/torbutton@torproject.org.xpi . cd ../../../ # cd https-everywhere @@ -85,8 +82,8 @@ script: | cp ./pkg/*.xpi ../tbb-windows-installer/"Tor Browser"/Data/Browser/profile.default/extensions/https-everywhere@eff.org.xpi cd .. # - cp *.xpi ./tbb-windows-installer/"Tor Browser"/Data/Browser/profile.default/extensions - cd ./tbb-windows-installer/"Tor Browser"/Data/Browser/profile.default/extensions + cp *.xpi tbb-windows-installer/"Tor Browser"/Data/Browser/profile.default/extensions + cd tbb-windows-installer/"Tor Browser"/Data/Browser/profile.default/extensions mv noscript@noscript.net.xpi {73a6fe31-595d-460b-a920-fcc0f8843232}.xpi cd https-everywhere@eff.org unzip ../https-everywhere@eff.org.xpi @@ -100,8 +97,7 @@ script: | cp StartTorBrowserBundle.exe ../tbb-windows-installer/"Tor Browser"/"Start Tor Browser.exe" cd .. # - cd tbb-windows-installer - cd "Tor Browser" + cd tbb-windows-installer/"Tor Browser" unzip ~/build/tor-browser-win32-gbuilt.zip unzip ~/build/tor-win32-gbuilt.zip unzip ~/build/windows-skeleton.zip @@ -117,14 +113,10 @@ script: | cp ../versions "Tor Browser"/Docs/sources/ cp ../bundle.inputs "Tor Browser"/Docs/sources/ # - # FF24 puts the prefs in a different jar: - if [ -f "Tor Browser"/Browser/browser/omni.ja ]; then - pushd "Tor Browser"/Browser/browser/ - else - pushd "Tor Browser"/Browser/ - fi + pushd "Tor Browser"/Browser/browser/ unzip omni.ja defaults/preferences/000-tor-browser.js cp defaults/preferences/000-tor-browser.js ~/build/ + # Set the locale bundle. echo "pref("general.useragent.locale", "en-US");" >> defaults/preferences/000-tor-browser.js zip -Xm omni.ja defaults/preferences/000-tor-browser.js popd @@ -139,22 +131,15 @@ script: | cp $xpi ../"Tor Browser"/Data/Browser/profile.default/extensions/langpack-$LANG@firefox.mozilla.org.xpi cd ..
- # FF24 puts the prefs in a different jar: - if [ -f "Tor Browser"/Browser/browser/omni.ja ]; then - pushd "Tor Browser"/Browser/browser/ - else - pushd "Tor Browser"/Browser/ - fi - + pushd "Tor Browser"/Browser/browser/ mkdir -p defaults/preferences - cp ~/build/000-tor-browser.js defaults/preferences/000-tor-browser.js + cp ~/build/000-tor-browser.js defaults/preferences/ echo "pref("general.useragent.locale", "$LANG");" >> defaults/preferences/000-tor-browser.js zip -Xm omni.ja defaults/preferences/000-tor-browser.js popd
makensis torbrowser.nsi mv torbrowser-install.exe $OUTDIR/torbrowser-install-${TORBROWSER_VERSION}_$LANG.exe - rm ./"Tor Browser"/Data/Browser/profile.default/extensions/langpack-$LANG@firefox.mozilla.org.xpi + rm "Tor Browser"/Data/Browser/profile.default/extensions/langpack-$LANG@firefox.mozilla.org.xpi cd win32-langpacks - done - cd .. + done
tbb-commits@lists.torproject.org