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

[tor-commits] [tor-browser-build/master] Add some indentation in various places



commit 1c9ccca6e097a988283d9474d30118670cbbded8
Author: Nicolas Vigier <boklm@xxxxxxxxxxxxxx>
Date:   Mon Apr 10 21:17:06 2017 +0200

    Add some indentation in various places
    
    Add some indentation to make things more clear.
---
 projects/binutils/build          |  26 ++++----
 projects/firefox-langpacks/build |  14 ++---
 projects/firefox/build           | 124 +++++++++++++++++++--------------------
 projects/fonts/build             |   8 +--
 projects/tor/build               |  90 ++++++++++++++--------------
 5 files changed, 131 insertions(+), 131 deletions(-)

diff --git a/projects/binutils/build b/projects/binutils/build
index e3064cf..8d4f09f 100644
--- a/projects/binutils/build
+++ b/projects/binutils/build
@@ -18,25 +18,25 @@ distdir=/var/tmp/dist/binutils
 tar xf [% project %]-[% c("version") %].tar.bz2
 cd [% project %]-[% c("version") %]
 [% IF c('var/windows') -%]
-# XXX: This is needed due to bug 10102.
-sed 's/= extern_rt_rel_d;/= extern_rt_rel_d;\n  memset (extern_rt_rel_d, 0, PE_IDATA5_SIZE);/' -i ld/pe-dll.c
-# Needed for the hardening...
-patch -p1 < ../enable-reloc-section-ld.patch
-# Zeroing timestamps in PE headers reliably, see bug 12753.
-patch -p1 < ../peXXigen.patch
+  # XXX: This is needed due to bug 10102.
+  sed 's/= extern_rt_rel_d;/= extern_rt_rel_d;\n  memset (extern_rt_rel_d, 0, PE_IDATA5_SIZE);/' -i ld/pe-dll.c
+  # Needed for the hardening...
+  patch -p1 < ../enable-reloc-section-ld.patch
+  # Zeroing timestamps in PE headers reliably, see bug 12753.
+  patch -p1 < ../peXXigen.patch
 [% END -%]
 ./configure --prefix=$distdir [% c('var/configure_opt') %]
 make -j4
 make install
 
 [% IF c("var/linux") %]
-# Make sure gold is used with the hardening wrapper for full RELRO, see #13031.
-cd $distdir/bin
-rm ld
-cp /usr/bin/hardened-ld ./
-mv ld.gold ld.gold.real
-ln -sf hardened-ld ld.gold
-ln -sf ld.gold ld
+  # Make sure gold is used with the hardening wrapper for full RELRO, see #13031.
+  cd $distdir/bin
+  rm ld
+  cp /usr/bin/hardened-ld ./
+  mv ld.gold ld.gold.real
+  ln -sf hardened-ld ld.gold
+  ln -sf ld.gold ld
 [% END %]
 
 cd /var/tmp/dist
diff --git a/projects/firefox-langpacks/build b/projects/firefox-langpacks/build
index 9ac07cb..6bc1810 100644
--- a/projects/firefox-langpacks/build
+++ b/projects/firefox-langpacks/build
@@ -2,15 +2,15 @@
 [% c("var/set_default_env") -%]
 
 [% FOREACH lang = c('var/locales') %]
-[% SET lang = tmpl(lang) %]
-[% SET filename = c("var/input_filename") _ '/' _ lang _ '.xpi'; %]
-shasum=$(grep '[% c("var/ff_arch") %]/xpi/[% lang %].xpi$' SHA512SUMS-[% c("version") %] | sed 's|  [% c("var/ff_arch") %]/xpi/[% lang %].xpi$||')
-echo "$shasum  [% filename %]" | sha512sum -c
+  [% SET lang = tmpl(lang) %]
+  [% SET filename = c("var/input_filename") _ '/' _ lang _ '.xpi'; %]
+  shasum=$(grep '[% c("var/ff_arch") %]/xpi/[% lang %].xpi$' SHA512SUMS-[% c("version") %] | sed 's|  [% c("var/ff_arch") %]/xpi/[% lang %].xpi$||')
+  echo "$shasum  [% filename %]" | sha512sum -c
 [% END %]
 
 mkdir -p [% dest_dir %]/[% c("filename") %]
 [% FOREACH lang = c('var/locales') %]
-[% SET lang = tmpl(lang) %]
-[% SET filename = c("var/input_filename") _ '/' _ lang _ '.xpi'; %]
-cp -a [% filename %] [% dest_dir %]/[% c("filename") %]/
+  [% SET lang = tmpl(lang) %]
+  [% SET filename = c("var/input_filename") _ '/' _ lang _ '.xpi'; %]
+  cp -a [% filename %] [% dest_dir %]/[% c("filename") %]/
 [% END %]
diff --git a/projects/firefox/build b/projects/firefox/build
index 4d83b28..b10bab4 100644
--- a/projects/firefox/build
+++ b/projects/firefox/build
@@ -21,21 +21,21 @@ distdir=/var/tmp/dist/[% project %]
 mkdir -p /var/tmp/build
 
 [% IF c("var/linux") %]
-mkdir -p /var/tmp/dist
-tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
-export PATH="/var/tmp/dist/binutils/bin:$PATH"
+  mkdir -p /var/tmp/dist
+  tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
+  export PATH="/var/tmp/dist/binutils/bin:$PATH"
 [% END -%]
 
 tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
 
 [% IF c("var/osx") %]
-mkdir -p $distdir/TorBrowser.app/Contents/MacOS
+  mkdir -p $distdir/TorBrowser.app/Contents/MacOS
 [% ELSE %]
-mkdir -p $distdir/Browser
+  mkdir -p $distdir/Browser
 [% END %]
 
 [% IF c("var/linux") %]
-mkdir -p $distdir/Debug/Browser/gmp-clearkey/0.1
+  mkdir -p $distdir/Debug/Browser/gmp-clearkey/0.1
 [% END %]
 
 cd /var/tmp/build/[% project %]-[% c("version") %]
@@ -49,29 +49,29 @@ then
 fi
 
 [% IF c("var/windows") %]
-# FIXME
-# Ideally, using LDFLAGS (and e.g. DLLFLAGS for NSS) would be enough to get
-# all Firefox libraries linked against msvcr100. Alas, this does not hold for
-# NSPR. Without patching it we get a "missing entry points for _strcmpi in
-# msvcr100.dll". Now, this should be fixed in rev>=6179 as the def file there
-# contains a proper patch according to the mingw-w64 developers.
-# However, even with this patch the _strcmpi issue is still popping up,
-# probably due to a bug in our current linking setup. The small patch below
-# is therefore just a workaround which should get fixed but is at least
-# justified as the signature of _strcmpi and _stricmp is the same, see:
-# http://msdn.microsoft.com/en-us/library/k59z8dwe.aspx.
-sed 's/strcmpi/stricmp/' -i nsprpub/pr/src/linking/prlink.c
-export HOST_LDFLAGS=" "
-export LDFLAGS="-specs=/var/tmp/dist/mingw-w64/msvcr100.spec"
-# Our flags don't get passed to NSS. We need to do that manually using an
-# obscure one.
-export DLLFLAGS="-specs=/var/tmp/dist/mingw-w64/msvcr100.spec"
+  # FIXME
+  # Ideally, using LDFLAGS (and e.g. DLLFLAGS for NSS) would be enough to get
+  # all Firefox libraries linked against msvcr100. Alas, this does not hold for
+  # NSPR. Without patching it we get a "missing entry points for _strcmpi in
+  # msvcr100.dll". Now, this should be fixed in rev>=6179 as the def file there
+  # contains a proper patch according to the mingw-w64 developers.
+  # However, even with this patch the _strcmpi issue is still popping up,
+  # probably due to a bug in our current linking setup. The small patch below
+  # is therefore just a workaround which should get fixed but is at least
+  # justified as the signature of _strcmpi and _stricmp is the same, see:
+  # http://msdn.microsoft.com/en-us/library/k59z8dwe.aspx.
+  sed 's/strcmpi/stricmp/' -i nsprpub/pr/src/linking/prlink.c
+  export HOST_LDFLAGS=" "
+  export LDFLAGS="-specs=/var/tmp/dist/mingw-w64/msvcr100.spec"
+  # Our flags don't get passed to NSS. We need to do that manually using an
+  # obscure one.
+  export DLLFLAGS="-specs=/var/tmp/dist/mingw-w64/msvcr100.spec"
 [% END %]
 
 [% IF c("var/osname") == "linux-i686" -%]
-export LDFLAGS=-m32
-export CFLAGS=-m32
-export CC='gcc -m32'
+  export LDFLAGS=-m32
+  export CFLAGS=-m32
+  export CC='gcc -m32'
 [% END -%]
 
 rm -f configure
@@ -82,31 +82,31 @@ make -j8 -f client.mk build
 make -C obj-* package INNER_MAKE_PACKAGE=true
 
 [% IF c("var/osx") %]
-cp -a obj-macos/dist/firefox/* $distdir
-# Remove firefox-bin (we don't use it, see ticket #10126)
-rm -f $distdir/TorBrowser.app/Contents/MacOS/firefox-bin
-
-# Adjust the Info.plist file
-INFO_PLIST=$distdir/TorBrowser.app/Contents/Info.plist
-mv $INFO_PLIST tmp.plist
-python $rootdir/fix-info-plist.py '[% c("var/torbrowser_version") %]' '[% c("var/copyright_year") %]' < tmp.plist > $INFO_PLIST
-rm -f tmp.plist
+  cp -a obj-macos/dist/firefox/* $distdir
+  # Remove firefox-bin (we don't use it, see ticket #10126)
+  rm -f $distdir/TorBrowser.app/Contents/MacOS/firefox-bin
+
+  # Adjust the Info.plist file
+  INFO_PLIST=$distdir/TorBrowser.app/Contents/Info.plist
+  mv $INFO_PLIST tmp.plist
+  python $rootdir/fix-info-plist.py '[% c("var/torbrowser_version") %]' '[% c("var/copyright_year") %]' < tmp.plist > $INFO_PLIST
+  rm -f tmp.plist
 [% END %]
 
 [% IF c("var/linux") %]
-cp -a obj-*/dist/firefox/* $distdir/Browser/
-# Remove firefox-bin (we don't use it, see ticket #10126)
-rm -f $distdir/Browser/firefox-bin
-# TODO: There goes FIPS-140.. We could upload these somewhere unique and
-# subsequent builds could test to see if they've been uploaded before...
-# But let's find out if it actually matters first..
-rm -f $distdir/Browser/*.chk
+  cp -a obj-*/dist/firefox/* $distdir/Browser/
+  # Remove firefox-bin (we don't use it, see ticket #10126)
+  rm -f $distdir/Browser/firefox-bin
+  # TODO: There goes FIPS-140.. We could upload these somewhere unique and
+  # subsequent builds could test to see if they've been uploaded before...
+  # But let's find out if it actually matters first..
+  rm -f $distdir/Browser/*.chk
 [% END %]
 
 [% IF c("var/windows") %]
-cp -a obj-*/dist/firefox/* $distdir/Browser/
-cp -a $rootdir/msvcr100.dll $distdir/Browser
-cp -a $gcclibs/libssp-0.dll $distdir/Browser
+  cp -a obj-*/dist/firefox/* $distdir/Browser/
+  cp -a $rootdir/msvcr100.dll $distdir/Browser
+  cp -a $gcclibs/libssp-0.dll $distdir/Browser
 [% END %]
 
 # Make MAR-based update tools available for use during the bundle phase.
@@ -121,26 +121,26 @@ cp -p tools/update-packaging/*.sh $MARTOOLS/
 cp -p obj-*/dist/host/bin/mar $MARTOOLS/
 cp -p obj-*/dist/host/bin/mbsdiff $MARTOOLS/
 [% IF c("var/linux") %]
-cp -p obj-*/modules/libmar/tool/signmar $MARTOOLS/
-cp -p obj-*/security/nss/cmd/certutil/certutil $MARTOOLS/
-NSS_LIBS="libmozsqlite3.so libnss3.so libnssdbm3.so libnssutil3.so libsmime3.so libssl3.so"
-NSPR_LIBS="libnspr4.so libplc4.so libplds4.so"
-for LIB in $NSS_LIBS $NSPR_LIBS; do
-    cp -p obj-*/dist/bin/$LIB $MARTOOLS/
-done
+  cp -p obj-*/modules/libmar/tool/signmar $MARTOOLS/
+  cp -p obj-*/security/nss/cmd/certutil/certutil $MARTOOLS/
+  NSS_LIBS="libmozsqlite3.so libnss3.so libnssdbm3.so libnssutil3.so libsmime3.so libssl3.so"
+  NSPR_LIBS="libnspr4.so libplc4.so libplds4.so"
+  for LIB in $NSS_LIBS $NSPR_LIBS; do
+      cp -p obj-*/dist/bin/$LIB $MARTOOLS/
+  done
 [% END %]
 
 cd $distdir
 
 [% IF c("var/linux") %]
-# Strip and generate debuginfo for the firefox binary that we keep, all *.so
-# files, the plugin-container, and the updater (see ticket #10126)
-for LIB in Browser/*.so Browser/firefox Browser/plugin-container Browser/gmp-clearkey/0.1/*.so Browser/updater
-do
-    objcopy --only-keep-debug $LIB Debug/$LIB
-    strip $LIB
-    objcopy --add-gnu-debuglink=./Debug/$LIB $LIB
-done
+  # Strip and generate debuginfo for the firefox binary that we keep, all *.so
+  # files, the plugin-container, and the updater (see ticket #10126)
+  for LIB in Browser/*.so Browser/firefox Browser/plugin-container Browser/gmp-clearkey/0.1/*.so Browser/updater
+  do
+      objcopy --only-keep-debug $LIB Debug/$LIB
+      strip $LIB
+      objcopy --add-gnu-debuglink=./Debug/$LIB $LIB
+  done
 [% END %]
 
 # Re-zipping the omni.ja files is not needed to make them reproductible,
@@ -156,8 +156,8 @@ done
 [% END %]
 
 [% IF c("var/windows") %]
-cp $rootdir/msvcr100.dll Browser/
-cp $gcclibs/libssp-0.dll Browser/
+  cp $rootdir/msvcr100.dll Browser/
+  cp $gcclibs/libssp-0.dll Browser/
 [% END %]
 
 mkdir -p [% dest_dir _ '/' _ c('filename') %]
diff --git a/projects/fonts/build b/projects/fonts/build
index e645c31..9b33da9 100644
--- a/projects/fonts/build
+++ b/projects/fonts/build
@@ -13,12 +13,12 @@ mkdir -p $distdir
    END; %]
 
 [% IF c("var/linux") || c("var/osx") %]
-unzip -o STIXv1.1.1-latex.zip -d STIX
-cp "STIX/Fonts/fonts/opentype/public/stix/STIXMath-Regular.otf" $distdir/
+  unzip -o STIXv1.1.1-latex.zip -d STIX
+  cp "STIX/Fonts/fonts/opentype/public/stix/STIXMath-Regular.otf" $distdir/
 [% END %]
 [% IF c("var/linux") %]
-cp NotoEmoji-Regular.ttf $distdir/
-cp {NotoSansJP-Regular.otf,NotoSansKR-Regular.otf,NotoSansSC-Regular.otf,NotoSansTC-Regular.otf} $distdir/
+  cp NotoEmoji-Regular.ttf $distdir/
+  cp {NotoSansJP-Regular.otf,NotoSansKR-Regular.otf,NotoSansSC-Regular.otf,NotoSansTC-Regular.otf} $distdir/
 [% END %]
 cd /var/tmp/dist
 [% c('tar', {
diff --git a/projects/tor/build b/projects/tor/build
index c1296fe..85e158f 100644
--- a/projects/tor/build
+++ b/projects/tor/build
@@ -5,17 +5,17 @@ distdir=/var/tmp/dist/[% project %]
 mkdir -p /var/tmp/build
 
 [% IF c("var/linux") || c("var/windows") %]
-TORCONFIGDIR="$distdir/Data/Tor"
-mkdir -p $TORCONFIGDIR
-mkdir -p "$distdir/Tor"
+  TORCONFIGDIR="$distdir/Data/Tor"
+  mkdir -p $TORCONFIGDIR
+  mkdir -p "$distdir/Tor"
 [% END %]
 
 [% IF c("var/osx") %]
-TORBINDIR="$distdir/Contents/MacOS/Tor"
-TORCONFIGDIR="$distdir/Contents/Resources/TorBrowser/Tor"
-mkdir -p $distdir/bin
-mkdir -p $TORBINDIR
-mkdir -p $TORCONFIGDIR
+  TORBINDIR="$distdir/Contents/MacOS/Tor"
+  TORCONFIGDIR="$distdir/Contents/Resources/TorBrowser/Tor"
+  mkdir -p $distdir/bin
+  mkdir -p $TORBINDIR
+  mkdir -p $TORCONFIGDIR
 [% END %]
 
 tar -C /var/tmp/dist -xf [% c('input_files_by_name/openssl') %]
@@ -25,32 +25,32 @@ libeventdir=/var/tmp/dist/libevent
 openssldir=/var/tmp/dist/openssl
 
 [% IF c("var/windows") %]
-tar -C /var/tmp/build -xf [% c('input_files_by_name/zlib') %]
-zlibdir=/var/tmp/build/zlib
-cp $zlibdir/lib/*.dll $openssldir/bin/*.dll $libeventdir/bin/*.dll \
-    $gcclibs/*.dll $distdir/Tor/
+  tar -C /var/tmp/build -xf [% c('input_files_by_name/zlib') %]
+  zlibdir=/var/tmp/build/zlib
+  cp $zlibdir/lib/*.dll $openssldir/bin/*.dll $libeventdir/bin/*.dll \
+      $gcclibs/*.dll $distdir/Tor/
 [% END %]
 
 
 [% IF c("var/linux") %]
-mkdir -p "$distdir/Debug/Tor"
-cp $openssldir/lib/libssl.so.1.0.0 "$distdir/Tor/"
-cp $openssldir/lib/libcrypto.so.1.0.0 "$distdir/Tor/"
-cp $libeventdir/lib/libevent-2.0.so.5 "$distdir/Tor/"
-# We need to copy the libstdc++.so.6 for Tor Browser on older Linux distros.
-# Copying it into /Browser, which feels more natural, and amending
-# LD_LIBRARY_PATH breaks updates from a Tor Browser with the old
-# LD_LIBRARY_PATH value to the Tor Browser with the newer one. Thus, we copy
-# the libstdc++ into the directory with the libs tor depends on, too. See bug
-# 13359 for further details.
-cp /var/tmp/dist/gcc/[% c("var/libdir") %]/libstdc++.so.6 "$distdir/Tor/"
-chmod 700 "$distdir"/Tor/*.so*
-# This is needed to make RPATH unavailable. See bug 9150.
-export LD_LIBRARY_PATH="$distdir/Tor/"
+  mkdir -p "$distdir/Debug/Tor"
+  cp $openssldir/lib/libssl.so.1.0.0 "$distdir/Tor/"
+  cp $openssldir/lib/libcrypto.so.1.0.0 "$distdir/Tor/"
+  cp $libeventdir/lib/libevent-2.0.so.5 "$distdir/Tor/"
+  # We need to copy the libstdc++.so.6 for Tor Browser on older Linux distros.
+  # Copying it into /Browser, which feels more natural, and amending
+  # LD_LIBRARY_PATH breaks updates from a Tor Browser with the old
+  # LD_LIBRARY_PATH value to the Tor Browser with the newer one. Thus, we copy
+  # the libstdc++ into the directory with the libs tor depends on, too. See bug
+  # 13359 for further details.
+  cp /var/tmp/dist/gcc/[% c("var/libdir") %]/libstdc++.so.6 "$distdir/Tor/"
+  chmod 700 "$distdir"/Tor/*.so*
+  # This is needed to make RPATH unavailable. See bug 9150.
+  export LD_LIBRARY_PATH="$distdir/Tor/"
 [% END %]
 
 [% IF c("var/osx") %]
-cp $libeventdir/lib/libevent-*.dylib $TORBINDIR/
+  cp $libeventdir/lib/libevent-*.dylib $TORBINDIR/
 [% END %]
 
 cd /var/tmp/build/[% project %]-[% c('version') %]
@@ -73,33 +73,33 @@ cp $distdir/share/tor/geoip $TORCONFIGDIR
 cp $distdir/share/tor/geoip6 $TORCONFIGDIR
 
 [% IF c("var/osx") %]
-LIBEVENT_FILE=`basename $libeventdir/lib/libevent-*.dylib`
-cd $distdir
-cp bin/tor $TORBINDIR/
-cd $TORBINDIR/
-x86_64-apple-darwin10-install_name_tool -change $libeventdir/lib/$LIBEVENT_FILE @executable_path/$LIBEVENT_FILE tor
+  LIBEVENT_FILE=`basename $libeventdir/lib/libevent-*.dylib`
+  cd $distdir
+  cp bin/tor $TORBINDIR/
+  cd $TORBINDIR/
+  x86_64-apple-darwin10-install_name_tool -change $libeventdir/lib/$LIBEVENT_FILE @executable_path/$LIBEVENT_FILE tor
 [% END %]
 
 cd $distdir
 [% IF c("var/windows") %]
-install -s $distdir/bin/tor.exe $distdir/Tor/
+  install -s $distdir/bin/tor.exe $distdir/Tor/
 [% IF c("var/expert_bundle") %]
-install -s $distdir/bin/tor-gencert.exe $distdir/Tor/
+  install -s $distdir/bin/tor-gencert.exe $distdir/Tor/
 [% END %]
 [% END %]
 
 [% IF c("var/linux") %]
-# Strip and generate debuginfo for libs
-objcopy --only-keep-debug $distdir/bin/tor $distdir/Debug/Tor/tor
-install -s $distdir/bin/tor $distdir/Tor/
-objcopy --add-gnu-debuglink=./Debug/Tor/tor $distdir/Tor/tor
-for i in $distdir/Tor/*so*
-do
-    LIB=`basename $i`
-    objcopy --only-keep-debug $distdir/Tor/$LIB $distdir/Debug/Tor/$LIB
-    strip $distdir/Tor/$LIB
-    objcopy --add-gnu-debuglink=./Debug/Tor/$LIB $distdir/Tor/$LIB
-done
+  # Strip and generate debuginfo for libs
+  objcopy --only-keep-debug $distdir/bin/tor $distdir/Debug/Tor/tor
+  install -s $distdir/bin/tor $distdir/Tor/
+  objcopy --add-gnu-debuglink=./Debug/Tor/tor $distdir/Tor/tor
+  for i in $distdir/Tor/*so*
+  do
+      LIB=`basename $i`
+      objcopy --only-keep-debug $distdir/Tor/$LIB $distdir/Debug/Tor/$LIB
+      strip $distdir/Tor/$LIB
+      objcopy --add-gnu-debuglink=./Debug/Tor/$LIB $distdir/Tor/$LIB
+  done
 [% END %]
 
 mkdir -p [% dest_dir _ '/' _ c('filename') %]



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits