Unverified Commit a76388bf authored by boklm's avatar boklm
Browse files

Bug 26323: Build 32bit Linux bundles on 64bit Debian Wheezy

parent 84e07663
......@@ -8,8 +8,6 @@ distdir=/var/tmp/dist/binutils
export DEB_BUILD_HARDENING_FORTIFY=1
export DEB_BUILD_HARDENING_FORMAT=1
export DEB_BUILD_HARDENING_PIE=1
[% END -%]
[% IF c("var/linux-x86_64") %]
# The libstdc++ shipped by default is non-PIC which breaks the binutils build
# if we build with DEB_BUILD_HARDENING_PIE=1. We need to install a PIC one AND
# make sure it gets used before the non-PIC one would.
......
......@@ -58,8 +58,9 @@ targets:
arch_deps:
- openjdk-8-jdk
linux:
linux-x86_64:
var:
martools_filename: mar-tools-linux64.zip
arch_deps:
- libgtk2.0-dev
- libgtk-3-dev
......@@ -76,13 +77,27 @@ targets:
- libmpc2
# needed to remove RUNPATH added by selfrando (see #22242)
- chrpath
linux-x86_64:
var:
martools_filename: mar-tools-linux64.zip
linux-i686:
var:
martools_filename: mar-tools-linux32.zip
sort_deps: 0
arch_deps:
- libgtk2.0-dev:i386
- libgtk-3-dev:i386
- libdbus-glib-1-dev:i386
- libxt-dev:i386
# To pass configure since ESR 31.
- libpulse-dev:i386
# To pass configure since ESR 45.
- libgconf2-dev:i386
# To pass configure since ESR 52
- libx11-xcb-dev:i386
# We built GCC but not the libmpc2, thus we need to install it
- libmpc2
# needed to remove RUNPATH added by selfrando (see #22242)
- chrpath
- hardening-wrapper
osx-x86_64:
var:
......
......@@ -11,7 +11,9 @@ export CXXFLAGS=-m32
export LDFLAGS=-m32
export XLDOPTS=-m32
export ASFLAGS=-m32
export BINDGEN_CFLAGS='-m32 --gcc-toolchain=/var/tmp/dist/gcc'
ac_add_options --target=i686-linux-gnu
ac_add_options --host=i686-linux-gnu
ac_add_options --enable-optimize
......
......@@ -12,11 +12,7 @@ var:
mkdir -p /var/tmp/dist
tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
export PATH="/var/tmp/dist/gcc/bin:$PATH"
[% IF c("var/osname") == "linux-i686" -%]
export LD_LIBRARY_PATH=/var/tmp/dist/gcc/lib
[% ELSE -%]
export LD_LIBRARY_PATH=/var/tmp/dist/gcc/lib64
[% END -%]
export LD_LIBRARY_PATH=/var/tmp/dist/gcc/lib64:/var/tmp/dist/gcc/lib32
[% IF c("hardened_gcc") -%]
# Config options for hardening-wrapper
......@@ -47,19 +43,12 @@ targets:
- zlib1g-dev
linux:
hardened_gcc: 1
linux-i686:
var:
configure_opt: --enable-multilib --enable-languages=c,c++ --with-system-zlib
arch_deps:
- hardening-wrapper
- libc6-dev
- zlib1g-dev
linux-x86_64:
var:
configure_opt: --enable-multilib --enable-languages=c,c++ --with-arch_32=i686
arch_deps:
- hardening-wrapper
- libc6-dev-i386
input_files:
- project: container-image
- URL: 'https://ftp.gnu.org/gnu/gcc/gcc-[% c("version") %]/gcc-[% c("version") %].tar.xz'
......
......@@ -35,7 +35,12 @@ var:
[% END -%]
targets:
linux:
linux-i686:
var:
arch_deps:
- pkg-config
- libx11-dev:i386
linux-x86_64:
var:
arch_deps:
- pkg-config
......
......@@ -15,6 +15,9 @@ var:
export GOARCH=[% c("var/GOARCH") %]
export GOPATH=/var/tmp/dist/gopath
export PATH=/var/tmp/dist/go/bin:/var/tmp/dist/gopath/bin:"$PATH"
[% IF c("var/linux-i686") -%]
export CGO_ENABLED=1
[% END -%]
# Template build script for building a go library.
# This can be called as projects/go/var/build_go_lib.
......
......@@ -12,6 +12,11 @@ tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/gmp') %]
ln -s /var/tmp/dist/gmp thirdparty/gmp
mkdir -p $distdir
tar -C $distdir -xf $rootdir/[% c('input_files_by_name/obfsproxy') %]
[% IF c("var/linux-i686") -%]
export CFLAGS=-m32
export CXXFLAGS=-m32
export LDFLAGS=-m32
[% END -%]
[% IF c("var/windows") -%]
patch -p1 < $rootdir/bug20302.patch
pydir=$distdir/python
......@@ -25,7 +30,7 @@ tar -C $distdir -xf $rootdir/[% c('input_files_by_name/obfsproxy') %]
$PYTHON setup.py install --prefix=$(wine winepath -w "$pydir")
$PYTHON setup.py install
[% ELSE -%]
export PYTHON=python2
export PYTHON=python2[% IF c("var/linux-i686") %].7[% END %]
make
cp -ra fte $PTDIR/
mkdir -p $PTDIR/fteproxy-lib
......
......@@ -9,11 +9,30 @@ var:
use_container: 1
targets:
linux:
linux-x86_64:
var:
arch_deps:
- python-setuptools
- python-dev
linux-i686:
var:
pre_pkginst: |
dpkg --add-architecture i386
# python2.7:i386 cannot be installed because the mime-support package
# in wheezy is not marked "Multi-Arch: foreign":
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695357
# We fix this by installing the jessie mime-support package.
wget http://ftp.debian.org/debian/pool/main/m/mime-support/mime-support_3.58_all.deb
echo 'c05ebe8f38da4ff19d028c9f4680414149e5c7a746de13bc9db0a562796ed213 mime-support_3.58_all.deb' | sha256sum -c
dpkg -i mime-support_3.58_all.deb
post_pkginst: |
export DEBIAN_FRONTEND=noninteractive
apt-get install -q -y libpython2.7:i386 python2.7:i386 python2.7-minimal:i386 python2.7-dev:i386
apt-get install -q -y hardening-wrapper
apt-get download -q -y python-setuptools python-pkg-resources
dpkg -i --force-depends python-setuptools*.deb python-pkg-resources*.deb
windows-i686:
var:
compiler: winpython
......
......@@ -29,9 +29,9 @@ cd /var/tmp/build/[% project %]-[% c('version') %]
$PYTHON setup.py build_ext -c mingw32
$PYTHON setup.py install --prefix=$(wine winepath -w $pydir)
[% ELSE -%]
export PYTHON=python2
export PYTHON=python2[% IF c("var/linux-i686") %].7[% END %]
./configure --build=i686-linux-gnu [% c("var/configure_opt") %]
python2 setup.py build --build-lib build
$PYTHON setup.py build --build-lib build
cp -a build/Crypto $PTDIR/
[% END -%]
cd $distdir
......
......@@ -6,12 +6,30 @@ var:
use_container: 1
targets:
linux:
linux-x86_64:
var:
arch_deps:
- python-dev
- python-setuptools
linux-i686:
var:
pre_pkginst: |
dpkg --add-architecture i386
# python2.7:i386 cannot be installed because the mime-support package
# in wheezy is not marked "Multi-Arch: foreign":
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695357
# We fix this by installing the jessie mime-support package.
wget http://ftp.debian.org/debian/pool/main/m/mime-support/mime-support_3.58_all.deb
echo 'c05ebe8f38da4ff19d028c9f4680414149e5c7a746de13bc9db0a562796ed213 mime-support_3.58_all.deb' | sha256sum -c
dpkg -i mime-support_3.58_all.deb
post_pkginst: |
export DEBIAN_FRONTEND=noninteractive
apt-get install -q -y libpython2.7:i386 python2.7:i386 python2.7-minimal:i386 python2.7-dev:i386
apt-get install -q -y hardening-wrapper
apt-get download -q -y python-setuptools python-pkg-resources
dpkg -i --force-depends python-setuptools*.deb python-pkg-resources*.deb
windows-i686:
var:
compiler: winpython
......
# vim: filetype=yaml sw=2
filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
version: '[% c("input_file_var/rust_version") %]'
# those values can be changed from the input_files section of other
......@@ -32,10 +32,16 @@ targets:
linux:
var:
arch_deps:
- hardening-wrapper
rust_arch: x86_64
deps:
- libc6-dev-i386
- lib32stdc++6
- build-essential
- python
- automake
- libssl-dev
- pkg-config
- hardening-wrapper
# We use
# `--enable-local-rust` to avoid downloading the required compiler during
# build time
......@@ -62,7 +68,7 @@ targets:
# version mismatch. We avoid that with this configure option. We need to
# build our own GCC in the first place as 4.7.2 is too old to get all the
# Rust pieces compiled.
configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --target=[% c("arch") %]-unknown-linux-gnu --set=target.[% c("arch") %]-unknown-linux-gnu.cc=gcc
configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --target=x86_64-unknown-linux-gnu,i686-unknown-linux-gnu --set=target.x86_64-unknown-linux-gnu.cc=gcc --set=target.i686-unknown-linux-gnu.cc=gcc
osx-x86_64:
var:
......
......@@ -9,7 +9,12 @@ var:
use_container: 1
targets:
linux:
linux-i686:
var:
arch_deps:
- pkg-config
- libx11-dev:i386
linux-x86_64:
var:
arch_deps:
- pkg-config
......
......@@ -44,6 +44,9 @@ openssldir=/var/tmp/dist/openssl
$gcclibs/*.dll $mingwlibs/libwinpthread-1.dll $distdir/Tor/
[% END %]
[% IF c("var/linux-i686") && c("var/nightly") -%]
export TOR_RUST_TARGET=i686-unknown-linux-gnu
[% END -%]
[% IF c("var/linux") %]
mkdir -p "$distdir/Debug/Tor"
cp $openssldir/lib/libssl.so.1.0.0 "$distdir/Tor/"
......@@ -64,9 +67,7 @@ openssldir=/var/tmp/dist/openssl
chmod 700 "$distdir"/Tor/*.so*
chmod 700 "$distdir"/Tor/libstdc++/*.so*
# This is needed to make RPATH unavailable. See bug 9150.
export LD_LIBRARY_PATH="$distdir/Tor/"
# Add libstdc++ to LD_LIBRARY_PATH to avoid rust link issue (bug 27101)
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$distdir/Tor/libstdc++/"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$distdir/Tor/"
[% END %]
[% IF c("var/osx") %]
......
......@@ -22,18 +22,21 @@ targets:
git_hash: master
tag_gpg_id: 0
linux:
linux-i686:
var:
libdir: lib32
sort_deps: 0
arch_deps:
- libtool
- zlib1g-dev
- zlib1g-dev:i386
- hardening-wrapper
linux-i686:
var:
libdir: lib
linux-x86_64:
var:
libdir: lib64
arch_deps:
- libtool
- zlib1g-dev
- hardening-wrapper
osx-x86_64:
var:
arch_deps:
......
#!/bin/bash
[% c("var/set_default_env") -%]
distdir="/var/tmp/dist/[% project %]"
[% IF c("var/windows") -%]
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
[% ELSE -%]
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
[% IF ! c("var/windows") -%]
[% c("var/set_PTDIR_DOCSDIR") -%]
mkdir -p $PTDIR
[% END -%]
mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf $rootdir/Twisted-[% c('version') %].tar.bz2
cd /var/tmp/build/Twisted-[% c('version') %]
[% IF c("var/linux-i686") -%]
export CFLAGS=-m32
export CXXFLAGS=-m32
export LDFLAGS=-m32
[% END -%]
[% IF c("var/windows") -%]
pydir="$distdir/python"
export FAKETIME="[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]"
......@@ -27,7 +31,7 @@ cd /var/tmp/build/Twisted-[% c('version') %]
export PYTHONPATH="$(wine winepath -w $pydir)\\Lib\\site-packages"
LD_PRELOAD= $PYTHON setup.py install --single-version-externally-managed --record /dev/null --prefix=$(wine winepath -w $pydir)
[% ELSE -%]
export PYTHON=python2
export PYTHON=python2[% IF c("var/linux-i686") %].7[% END %]
$PYTHON setup.py build --build-lib build
cp -a build/twisted $PTDIR/
[% END -%]
......
......@@ -7,11 +7,30 @@ var:
use_container: 1
targets:
linux:
linux-x86_64:
var:
arch_deps:
- python-setuptools
- python-dev
linux-i686:
var:
pre_pkginst: |
dpkg --add-architecture i386
# python2.7:i386 cannot be installed because the mime-support package
# in wheezy is not marked "Multi-Arch: foreign":
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695357
# We fix this by installing the jessie mime-support package.
wget http://ftp.debian.org/debian/pool/main/m/mime-support/mime-support_3.58_all.deb
echo 'c05ebe8f38da4ff19d028c9f4680414149e5c7a746de13bc9db0a562796ed213 mime-support_3.58_all.deb' | sha256sum -c
dpkg -i mime-support_3.58_all.deb
post_pkginst: |
export DEBIAN_FRONTEND=noninteractive
apt-get install -q -y libpython2.7:i386 python2.7:i386 python2.7-minimal:i386 python2.7-dev:i386
apt-get install -q -y hardening-wrapper
apt-get download -q -y python-setuptools python-pkg-resources
dpkg -i --force-depends python-setuptools*.deb python-pkg-resources*.deb
windows-i686:
var:
compiler: winpython
......@@ -26,4 +45,3 @@ input_files:
sha256sum: 095175638c019ac7c0604f4c291724a16ff1acd062e181b01293bf4dcbc62cf3
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
enable: '[% c("var/windows") %]'
......@@ -28,6 +28,28 @@ targets:
var:
webrtc:
os: linux
linux-i686:
var:
webrtc:
lib_path: lib/libwebrtc-linux-386-magic.a
sort_deps: 0
arch_deps:
- lib32asound2-dev
- lib64expat1
- libexpat1-dev:i386
- libglib2.0-dev:i386
- libgtk2.0-dev:i386
- libgtk-3-dev:i386
- libudev-dev:i386
- libx11-dev:i386
- libxext-dev:i386
- libxrandr-dev:i386
- pkg-config
- hardening-wrapper
linux-x86_64:
var:
webrtc:
lib_path: lib/libwebrtc-linux-amd64-magic.a
arch_deps:
- libasound2-dev
- libexpat1-dev
......@@ -39,14 +61,6 @@ targets:
- libxext-dev
- libxrandr-dev
- pkg-config
linux-i686:
var:
webrtc:
lib_path: lib/libwebrtc-linux-386-magic.a
linux-x86_64:
var:
webrtc:
lib_path: lib/libwebrtc-linux-amd64-magic.a
osx-x86_64:
var:
webrtc:
......
......@@ -215,21 +215,13 @@ targets:
var:
linux-x86_64: 1
osname: linux-x86_64
container:
arch: amd64
linux-i686:
arch: i686
var:
linux-i686: 1
osname: linux-i686
container:
arch: i386
setarch: |
if test -z "$RBM_SETARCH"
then
export RBM_SETARCH=1
exec setarch i686 ./build
fi
configure_opt_i686: '--host=i686-linux-gnu CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32'
configure_opt: '[% c("var/configure_opt_i686") %]'
linux:
var:
linux: 1
......@@ -241,7 +233,11 @@ targets:
selfrando: '[% c("var/linux-x86_64") && ! c("var/release") %]'
container:
suite: wheezy
arch: amd64
pre_pkginst: dpkg --add-architecture i386
deps:
- libc6-dev-i386
- lib32stdc++6
- build-essential
- python
- bison
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment