Bug 1295268 - Fix HSTS updates r=nthomas draft
authorChris AtLee <catlee@mozilla.com>
Tue, 23 Aug 2016 13:46:53 -0400
changeset 7112 406e17ecac77936ba11a6841196c55a369fd11c2
parent 7111 3acef9fc9b22cbc51506669275689911d4a5f3e9
push id111
push usercatlee@mozilla.com
push dateTue, 23 Aug 2016 17:47:07 +0000
reviewersnthomas
bugs1295268
Bug 1295268 - Fix HSTS updates r=nthomas MozReview-Commit-ID: K7roNOt6Ior
scripts/periodic_file_updates/periodic_file_updates.manifest
scripts/periodic_file_updates/periodic_file_updates.sh
--- a/scripts/periodic_file_updates/periodic_file_updates.manifest
+++ b/scripts/periodic_file_updates/periodic_file_updates.manifest
@@ -1,9 +1,18 @@
 [
 {
-"size": 4431740,
-"digest": "68fc56b0fb0cdba629b95683d6649ff76b00dccf97af90960c3d7716f6108b2162ffd5ffcd5c3a60a21b28674df688fe4dabc67345e2da35ec5abeae3d48c8e3",
+"version": "gcc 4.8.5 + PR64905",
+"size": 80160264,
+"digest": "c1a9dc9da289b8528874d16300b9d13a997cec99195bb0bc46ff665216d8535d6d6cb5af6b4b1f2749af6815dab12e703fdb3849014e5c23a70eff351a0baf4e",
+"algorithm": "sha512",
+"filename": "gcc.tar.xz",
+"unpack": true
+},
+{
+"size": 12072532,
+"digest": "3915f8ec396c56a8a92e6f9695b70f09ce9d1582359d1258e37e3fd43a143bc974410e4cfc27f500e095f34a8956206e0ebf799b7287f0f38def0d5e34ed71c9",
 "algorithm": "sha512",
 "filename": "gtk3.tar.xz",
+"setup": "setup.sh",
 "unpack": true
 }
 ]
--- a/scripts/periodic_file_updates/periodic_file_updates.sh
+++ b/scripts/periodic_file_updates/periodic_file_updates.sh
@@ -161,19 +161,25 @@ function download_shared_artifacts {
     ${UNPACK_CMD} "${BROWSER_ARCHIVE}"
     mkdir tests && cd tests
     ${UNZIP} "../${TESTS_ARCHIVE}"
     cd "${BASEDIR}"
     cp tests/bin/xpcshell "${PRODUCT}"
 }
 
 # gtk3 is required to run xpcshell as of Gecko 42.
-function download_gtk3 {
+function run_tooltool {
     sh ${SCRIPTDIR}/../tooltool/tooltool_wrapper.sh ${SCRIPTDIR}/periodic_file_updates.manifest https://api.pub.build.mozilla.org/tooltool/ setup.sh /builds/tooltool.py --authentication-file /builds/relengapi.tok
     LD_LIBRARY_PATH=${BASEDIR}/gtk3/usr/local/lib
+    if [ -f "${BASEDIR}/gcc/lib/libstdc++.so" ]; then
+        # We put both 32-bits and 64-bits library path in LD_LIBRARY_PATH: ld.so
+        # will prefer the files in the 32-bits path when loading 32-bits executables,
+        # and the files in the 64-bits path when loading 64-bits executables.
+        LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}${BASEDIR}/gcc/lib64:${BASEDIR}/gcc/lib
+    fi
 }
 
 # In bug 1164714, the public/src subdirectories were flattened away under security/manager.
 # We need to check whether the HGREPO were processing has had that change uplifted yet so
 # that we can find the files we need to update.
 function is_flattened {
     # This URL will only be present in repos that have *not* been flattened.
     TEST_URL="${HGREPO}/raw-file/default/security/manager/boot/src/"
@@ -630,17 +636,17 @@ fi
 # Try to find hgtool if it hasn't been set.
 if [ ! -f "${HGTOOL}" ]; then
     HGTOOL=`which hgtool.py 2>/dev/null | head -n1`
 fi
 
 preflight_cleanup
 if [ "${DO_HSTS}" == "true" -o "${DO_HPKP}" == "true" ]; then
     download_shared_artifacts
-    download_gtk3
+    run_tooltool
 fi
 is_flattened
 if [ "${DO_HSTS}" == "true" ]; then
     compare_hsts_files
     if [ $? != 0 ]; then
         HSTS_UPDATED=true
     fi
 fi