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

[tor-commits] [tor-browser-bundle/master] Bug 18831: Use own Yasm for Firefox cross-compilation



commit 910094fc33ae4e75e10fee754bec106e83e0eac5
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
Date:   Wed Mar 29 11:00:23 2017 +0000

    Bug 18831: Use own Yasm for Firefox cross-compilation
    
    Starting with Firefox ESR52 Yasm < 1.2.0 is not sufficient anymore to
    compile our browser part for Windows. Ubuntu Precise still ships with
    such a version, though. We compile our own version until we get off of
    Precise.
---
 gitian/descriptors/windows/gitian-firefox.yml |  6 ++++--
 gitian/descriptors/windows/gitian-utils.yml   | 11 +++++++++++
 gitian/fetch-inputs.sh                        |  5 +++--
 gitian/mkbundle-windows.sh                    |  5 ++++-
 gitian/verify-tags.sh                         |  2 +-
 gitian/versions                               |  4 ++++
 gitian/versions.alpha                         |  4 ++++
 gitian/versions.nightly                       |  4 ++++
 8 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/gitian/descriptors/windows/gitian-firefox.yml b/gitian/descriptors/windows/gitian-firefox.yml
index fabc40d..7ba0615 100644
--- a/gitian/descriptors/windows/gitian-firefox.yml
+++ b/gitian/descriptors/windows/gitian-firefox.yml
@@ -6,7 +6,6 @@ architectures:
 packages:
 - "unzip"
 - "autoconf2.13"
-- "yasm"
 - "zip"
 reference_datetime: "2000-01-01 00:00:00"
 remotes:
@@ -14,6 +13,7 @@ remotes:
   "dir": "tor-browser"
 files:
 - "gcc-linux32-precise-utils.zip"
+- "yasm-linux32-precise-utils.zip"
 - "mingw-w64-win32-utils.zip"
 - "get-moz-build-date"
 - "re-dzip.sh"
@@ -34,6 +34,8 @@ script: |
   #
   mkdir -p $INSTDIR/Browser/
   mkdir -p $OUTDIR/
+  # Firefox ESR52 needs Yasm >= 1.2.0 which Ubuntu Precise does not ship.
+  unzip -d $INSTDIR yasm-linux32-precise-utils.zip
   unzip -d $INSTDIR gcc-linux32-precise-utils.zip
   # We need a link to our GCC, otherwise the system cc gets used which points to
   # /usr/bin/gcc.
@@ -42,7 +44,7 @@ script: |
   unzip -d $INSTDIR gcclibs-win32-utils.zip
   # Make sure our custom mingw and GCC (as host compiler) get used.
   export LD_LIBRARY_PATH=$INSTDIR/gcc/lib
-  export PATH=$INSTDIR/mingw-w64/bin:$INSTDIR/gcc/bin:$PATH
+  export PATH=$INSTDIR/mingw-w64/bin:$INSTDIR/gcc/bin:$INSTDIR/yasm/bin:$PATH
 
   # We don't want to link against msvcrt.dll due to bug 9084.
   i686-w64-mingw32-g++ -dumpspecs > msvcr100.spec
diff --git a/gitian/descriptors/windows/gitian-utils.yml b/gitian/descriptors/windows/gitian-utils.yml
index 9c31834..6cfbbf1 100644
--- a/gitian/descriptors/windows/gitian-utils.yml
+++ b/gitian/descriptors/windows/gitian-utils.yml
@@ -26,6 +26,7 @@ remotes:
 files:
 - "binutils.tar.bz2"
 - "gcc.tar.bz2"
+- "yasm.tar.gz"
 - "openssl.tar.gz"
 - "gmp.tar.bz2"
 - "enable-reloc-section-ld.patch"
@@ -52,6 +53,15 @@ script: |
   make install
   cd ..
 
+  # Building Yasm to use it for our Firefox compilation later. Firefox ESR52
+  # requires Yasm >= 1.2.0 which Ubuntu Precise does not ship.
+  tar xaf yasm.tar.gz
+  cd yasm-*
+  ./configure --prefix=$INSTDIR/yasm
+  make $MAKEOPTS
+  make install
+  cd ..
+
   # Building binutils
   tar xjf binutils.tar.bz2
   cd binutils*
@@ -186,6 +196,7 @@ script: |
   # We might want to bump binutils independent of bumping mingw-w64.
   touch binutils-$BINUTILS_VER-win32-utils.zip
   ~/build/dzip.sh gcc-$GCC_VER-linux32-precise-utils.zip gcc
+  ~/build/dzip.sh yasm-$YASM_VER-linux32-precise-utils.zip yasm
   ~/build/dzip.sh mingw-w64-$GCC_VER-win32-utils.zip mingw-w64
   ~/build/dzip.sh zlib-${ZLIB_TAG#v}-win32-utils.zip zlib
   ~/build/dzip.sh libevent-${LIBEVENT_TAG#release-}-win32-utils.zip libevent
diff --git a/gitian/fetch-inputs.sh b/gitian/fetch-inputs.sh
index 44f96aa..b7fcf36 100755
--- a/gitian/fetch-inputs.sh
+++ b/gitian/fetch-inputs.sh
@@ -162,7 +162,7 @@ do
   get "${!PACKAGE}" "${MIRROR_URL_ASN}${!PACKAGE}"
 done
 
-for i in ZOPEINTERFACE TWISTED PY2EXE SETUPTOOLS PARSLEY GO14 GO STIXMATHFONT NOTOEMOJIFONT NOTOJPFONT NOTOKRFONT NOTOSCFONT NOTOTCFONT NSIS NSIS_DEBIAN PYCRYPTO
+for i in ZOPEINTERFACE TWISTED PY2EXE SETUPTOOLS PARSLEY GO14 GO STIXMATHFONT NOTOEMOJIFONT NOTOJPFONT NOTOKRFONT NOTOSCFONT NOTOTCFONT NSIS NSIS_DEBIAN PYCRYPTO YASM
 do
   URL="${i}_URL"
   PACKAGE="${i}_PACKAGE"
@@ -174,7 +174,7 @@ wget -U "" -N ${NOSCRIPT_URL}
 
 # Verify packages with weak or no signatures via direct sha256 check
 # (OpenSSL is signed with MD5, and OSXSDK are not signed at all)
-for i in OSXSDK CCTOOLS NOSCRIPT MSVCR100 PYCRYPTO ARGPARSE PYYAML ZOPEINTERFACE TWISTED SETUPTOOLS OPENSSL GMP PARSLEY GO14 GO GCC STIXMATHFONT NOTOEMOJIFONT NOTOJPFONT NOTOKRFONT NOTOSCFONT NOTOTCFONT NSIS NSIS_DEBIAN
+for i in OSXSDK CCTOOLS NOSCRIPT MSVCR100 PYCRYPTO ARGPARSE PYYAML ZOPEINTERFACE TWISTED SETUPTOOLS OPENSSL GMP PARSLEY GO14 GO GCC STIXMATHFONT NOTOEMOJIFONT NOTOJPFONT NOTOKRFONT NOTOSCFONT NOTOTCFONT NSIS NSIS_DEBIAN YASM
 do
    PACKAGE="${i}_PACKAGE"
    HASH="${i}_HASH"
@@ -251,6 +251,7 @@ ln -sf "$GO14_PACKAGE" go14.tar.gz
 ln -sf "$GO_PACKAGE" go.tar.gz
 ln -sf "$NSIS_PACKAGE" nsis.tar.bz2
 ln -sf "$NSIS_DEBIAN_PACKAGE" nsis-debian.tar.xz
+ln -sf "$YASM_PACKAGE" yasm.tar.gz
 
 # Fetch latest gitian-builder itself
 # XXX - this is broken if a non-standard inputs dir is selected using the command line flag.
diff --git a/gitian/mkbundle-windows.sh b/gitian/mkbundle-windows.sh
index 6254937..451bb29 100755
--- a/gitian/mkbundle-windows.sh
+++ b/gitian/mkbundle-windows.sh
@@ -108,7 +108,8 @@ if [ ! -f inputs/binutils-$BINUTILS_VER-win32-utils.zip -o \
      ! -f inputs/libevent-${LIBEVENT_TAG_ORIG#release-}-win32-utils.zip -o \
      ! -f inputs/openssl-$OPENSSL_VER-win32-utils.zip -o \
      ! -f inputs/gmp-$GMP_VER-win32-utils.zip -o \
-     ! -f inputs/nsis-$NSIS_VER-win32-utils.zip ];
+     ! -f inputs/nsis-$NSIS_VER-win32-utils.zip -o \
+     ! -f inputs/yasm-$YASM_VER-linux32-precise-utils.zip ];
 then
   echo
   echo "****** Starting Utilities Component of Windows Bundle (1/5 for Windows) ******"
@@ -131,6 +132,7 @@ then
   ln -sf gcclibs-$GCC_VER-win32-utils.zip gcclibs-win32-utils.zip
   ln -sf gcc-$GCC_VER-linux32-precise-utils.zip gcc-linux32-precise-utils.zip
   ln -sf nsis-$NSIS_VER-win32-utils.zip nsis-win32-utils.zip
+  ln -sf yasm-$YASM_VER-linux32-precise-utils.zip yasm-linux32-precise-utils.zip
   cd ..
   #cp -a result/utils-win-res.yml inputs/
 else
@@ -148,6 +150,7 @@ else
   ln -sf gcclibs-$GCC_VER-win32-utils.zip gcclibs-win32-utils.zip
   ln -sf gcc-$GCC_VER-linux32-precise-utils.zip gcc-linux32-precise-utils.zip
   ln -sf nsis-$NSIS_VER-win32-utils.zip nsis-win32-utils.zip
+  ln -sf yasm-$YASM_VER-linux32-precise-utils.zip yasm-linux32-precise-utils.zip
   cd ..
 fi
 
diff --git a/gitian/verify-tags.sh b/gitian/verify-tags.sh
index 4facfa5..dc207f5 100755
--- a/gitian/verify-tags.sh
+++ b/gitian/verify-tags.sh
@@ -147,7 +147,7 @@ done
 
 # Verify packages with weak or no signatures via direct sha256 check
 # (OpenSSL is signed with MD5, and OSXSDK are not signed at all)
-for i in OSXSDK CCTOOLS NOSCRIPT MSVCR100 PYCRYPTO ARGPARSE PYYAML ZOPEINTERFACE TWISTED SETUPTOOLS OPENSSL GMP PARSLEY GO14 GO GCC STIXMATHFONT NOTOEMOJIFONT NOTOJPFONT NOTOKRFONT NOTOSCFONT NOTOTCFONT NSIS NSIS_DEBIAN
+for i in OSXSDK CCTOOLS NOSCRIPT MSVCR100 PYCRYPTO ARGPARSE PYYAML ZOPEINTERFACE TWISTED SETUPTOOLS OPENSSL GMP PARSLEY GO14 GO GCC STIXMATHFONT NOTOEMOJIFONT NOTOJPFONT NOTOKRFONT NOTOSCFONT NOTOTCFONT NSIS NSIS_DEBIAN YASM
 do
    PACKAGE="${i}_PACKAGE"
    HASH="${i}_HASH"
diff --git a/gitian/versions b/gitian/versions
index a13cc08..caaa487 100755
--- a/gitian/versions
+++ b/gitian/versions
@@ -67,6 +67,7 @@ PARSLEY_VER=1.2
 GO14_VER=1.4.3
 GO_VER=1.7.5
 NSIS_VER=2.51
+YASM_VER=1.2.0
 
 ## File names for the source packages
 OPENSSL_PACKAGE=openssl-${OPENSSL_VER}.tar.gz
@@ -100,6 +101,7 @@ NOTOJPFONT_PACKAGE=NotoSansJP-Regular.otf
 NOTOKRFONT_PACKAGE=NotoSansKR-Regular.otf
 NOTOSCFONT_PACKAGE=NotoSansSC-Regular.otf
 NOTOTCFONT_PACKAGE=NotoSansTC-Regular.otf
+YASM_PACKAGE=yasm-${YASM_VER}.tar.gz
 
 # Hashes for packages with weak sigs or no sigs
 OPENSSL_HASH=4a6ee491a2fdb22e519c76fdc2a628bb3cec12762cd456861d207996c8a07088
@@ -127,6 +129,7 @@ NOTOJPFONT_HASH=3e8146c4ce0945f255cb9dbc12b392380af80bd117e0a60eae555c99c7e618da
 NOTOKRFONT_HASH=b21817200abcb37a8ee865befce588d65babd1c35c2c4d32d3cd3f5b4780a7a3
 NOTOSCFONT_HASH=8c37936063c7c8ab747a939e13833894f9edc80dd41b98874ca8f3938a33c32f
 NOTOTCFONT_HASH=e6b82f7d3dab605c428161124ceb5e169cde93de632d800297b167cdd88e7baa
+YASM_HASH=768ffab457b90a20a6d895c39749adb547c1b7cb5c108e84b151a838a23ccf31
 
 ## Non-git package URLs
 OPENSSL_URL=https://www.openssl.org/source/${OPENSSL_PACKAGE}
@@ -160,3 +163,4 @@ NOTOJPFONT_URL=${NOTOCJKBASE_URL}/${NOTOJPFONT_PACKAGE}
 NOTOKRFONT_URL=${NOTOCJKBASE_URL}/${NOTOKRFONT_PACKAGE}
 NOTOSCFONT_URL=${NOTOCJKBASE_URL}/${NOTOSCFONT_PACKAGE}
 NOTOTCFONT_URL=${NOTOCJKBASE_URL}/${NOTOTCFONT_PACKAGE}
+YASM_URL=https://www.tortall.net/projects/yasm/releases/${YASM_PACKAGE}
diff --git a/gitian/versions.alpha b/gitian/versions.alpha
index 2655f23..0fe1846 100755
--- a/gitian/versions.alpha
+++ b/gitian/versions.alpha
@@ -70,6 +70,7 @@ PARSLEY_VER=1.2
 GO14_VER=1.4.3
 GO_VER=1.7.5
 NSIS_VER=2.51
+YASM_VER=1.2.0
 
 ## File names for the source packages
 OPENSSL_PACKAGE=openssl-${OPENSSL_VER}.tar.gz
@@ -103,6 +104,7 @@ NOTOJPFONT_PACKAGE=NotoSansJP-Regular.otf
 NOTOKRFONT_PACKAGE=NotoSansKR-Regular.otf
 NOTOSCFONT_PACKAGE=NotoSansSC-Regular.otf
 NOTOTCFONT_PACKAGE=NotoSansTC-Regular.otf
+YASM_PACKAGE=yasm-${YASM_VER}.tar.gz
 
 # Hashes for packages with weak sigs or no sigs
 OPENSSL_HASH=6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0
@@ -130,6 +132,7 @@ NOTOJPFONT_HASH=3e8146c4ce0945f255cb9dbc12b392380af80bd117e0a60eae555c99c7e618da
 NOTOKRFONT_HASH=b21817200abcb37a8ee865befce588d65babd1c35c2c4d32d3cd3f5b4780a7a3
 NOTOSCFONT_HASH=8c37936063c7c8ab747a939e13833894f9edc80dd41b98874ca8f3938a33c32f
 NOTOTCFONT_HASH=e6b82f7d3dab605c428161124ceb5e169cde93de632d800297b167cdd88e7baa
+YASM_HASH=768ffab457b90a20a6d895c39749adb547c1b7cb5c108e84b151a838a23ccf31
 
 ## Non-git package URLs
 OPENSSL_URL=https://www.openssl.org/source/${OPENSSL_PACKAGE}
@@ -163,3 +166,4 @@ NOTOJPFONT_URL=${NOTOCJKBASE_URL}/${NOTOJPFONT_PACKAGE}
 NOTOKRFONT_URL=${NOTOCJKBASE_URL}/${NOTOKRFONT_PACKAGE}
 NOTOSCFONT_URL=${NOTOCJKBASE_URL}/${NOTOSCFONT_PACKAGE}
 NOTOTCFONT_URL=${NOTOCJKBASE_URL}/${NOTOTCFONT_PACKAGE}
+YASM_URL=https://www.tortall.net/projects/yasm/releases/${YASM_PACKAGE}
diff --git a/gitian/versions.nightly b/gitian/versions.nightly
index 4fdc685..c0b68f5 100755
--- a/gitian/versions.nightly
+++ b/gitian/versions.nightly
@@ -77,6 +77,7 @@ PARSLEY_VER=1.2
 GO14_VER=1.4.3
 GO_VER=1.7.5
 NSIS_VER=2.51
+YASM_VER=1.2.0
 
 ## File names for the source packages
 OPENSSL_PACKAGE=openssl-${OPENSSL_VER}.tar.gz
@@ -110,6 +111,7 @@ NOTOJPFONT_PACKAGE=NotoSansJP-Regular.otf
 NOTOKRFONT_PACKAGE=NotoSansKR-Regular.otf
 NOTOSCFONT_PACKAGE=NotoSansSC-Regular.otf
 NOTOTCFONT_PACKAGE=NotoSansTC-Regular.otf
+YASM_PACKAGE=yasm-${YASM_VER}.tar.gz
 
 # Hashes for packages with weak sigs or no sigs
 OPENSSL_HASH=6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0
@@ -137,6 +139,7 @@ NOTOJPFONT_HASH=3e8146c4ce0945f255cb9dbc12b392380af80bd117e0a60eae555c99c7e618da
 NOTOKRFONT_HASH=b21817200abcb37a8ee865befce588d65babd1c35c2c4d32d3cd3f5b4780a7a3
 NOTOSCFONT_HASH=8c37936063c7c8ab747a939e13833894f9edc80dd41b98874ca8f3938a33c32f
 NOTOTCFONT_HASH=e6b82f7d3dab605c428161124ceb5e169cde93de632d800297b167cdd88e7baa
+YASM_HASH=768ffab457b90a20a6d895c39749adb547c1b7cb5c108e84b151a838a23ccf31
 
 ## Non-git package URLs
 OPENSSL_URL=https://www.openssl.org/source/${OPENSSL_PACKAGE}
@@ -170,3 +173,4 @@ NOTOJPFONT_URL=${NOTOCJKBASE_URL}/${NOTOJPFONT_PACKAGE}
 NOTOKRFONT_URL=${NOTOCJKBASE_URL}/${NOTOKRFONT_PACKAGE}
 NOTOSCFONT_URL=${NOTOCJKBASE_URL}/${NOTOSCFONT_PACKAGE}
 NOTOTCFONT_URL=${NOTOCJKBASE_URL}/${NOTOTCFONT_PACKAGE}
+YASM_URL=https://www.tortall.net/projects/yasm/releases/${YASM_PACKAGE}



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