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

[tor-commits] [tor-browser-build/master] Bug 22115: use i386 containers for the linux32 build



commit d067aa03629fb87c47acf19f81ed51940ebc3ebb
Author: Nicolas Vigier <boklm@xxxxxxxxxxxxxx>
Date:   Mon May 1 19:58:30 2017 +0200

    Bug 22115: use i386 containers for the linux32 build
---
 projects/binutils/build           |  3 ++-
 projects/common/runc-config.json  |  6 +++++-
 projects/debootstrap-image/config | 22 ++++++++++++++++++++++
 projects/firefox/config           | 21 ++++-----------------
 projects/gcc/build                |  1 +
 projects/gcc/config               | 17 ++++++++++++-----
 projects/go-webrtc/config         |  8 +-------
 projects/go/build                 |  1 +
 projects/go/config                |  1 +
 projects/snowflake/config         |  8 +-------
 projects/tor/config               | 14 +++++---------
 projects/webrtc/config            | 30 ++++++++----------------------
 rbm.conf                          | 35 ++++++++++++++++-------------------
 13 files changed, 79 insertions(+), 88 deletions(-)

diff --git a/projects/binutils/build b/projects/binutils/build
index 8d4f09f..bd949a5 100644
--- a/projects/binutils/build
+++ b/projects/binutils/build
@@ -8,7 +8,8 @@ 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.
diff --git a/projects/common/runc-config.json b/projects/common/runc-config.json
index 4c231cd..3da6c24 100644
--- a/projects/common/runc-config.json
+++ b/projects/common/runc-config.json
@@ -2,7 +2,11 @@
 	"ociVersion": "1.0.0-rc1",
 	"platform": {
 		"os": "linux",
-		"arch": "amd64"
+[% IF c("var/container/arch") == 'i386' -%]
+		"arch": "386"
+[% ELSE -%]
+		"arch": "[% c("var/container/arch") %]"
+[% END -%]
 	},
 	"process": {
 		"terminal": true,
diff --git a/projects/debootstrap-image/config b/projects/debootstrap-image/config
index bd204f5..15eec3b 100644
--- a/projects/debootstrap-image/config
+++ b/projects/debootstrap-image/config
@@ -27,23 +27,45 @@ targets:
       container:
         suite: wheezy
         arch: amd64
+  wheezy-i386:
+    var:
+      container:
+        suite: wheezy
+        arch: i386
   jessie-amd64:
     var:
       container:
         suite: jessie
         arch: amd64
+  jessie-i386:
+    var:
+      container:
+        suite: jessie
+        arch: i386
   precise-amd64:
     var:
       container:
         suite: precise
         arch: amd64
         debootstrap_opt: --keyring=/usr/share/keyrings/ubuntu-archive-removed-keys.gpg
+  precise-i386:
+    var:
+      container:
+        suite: precise
+        arch: i386
+        debootstrap_opt: --keyring=/usr/share/keyrings/ubuntu-archive-removed-keys.gpg
   utopic-amd64:
     var:
       container:
         suite: utopic
         arch: amd64
         debootstrap_mirror: http://old-releases.ubuntu.com/ubuntu/
+  utopic-i386:
+    var:
+      container:
+        suite: utopic
+        arch: i386
+        debootstrap_mirror: http://old-releases.ubuntu.com/ubuntu/
 
 input_files:
   - URL: 'http://cdimage.ubuntu.com/ubuntu-base/releases/[% c("var/ubuntu_version") %]/release/ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
diff --git a/projects/firefox/config b/projects/firefox/config
index d6a68fe..f5c765f 100644
--- a/projects/firefox/config
+++ b/projects/firefox/config
@@ -28,9 +28,8 @@ targets:
     var:
       torbrowser_update_channel: default
 
-  linux-x86_64:
+  linux:
     var:
-      martools_filename: mar-tools-linux64.zip
       arch_deps:
         - libgtk2.0-dev
         - libdbus-glib-1-dev
@@ -44,25 +43,13 @@ targets:
         - libx11-xcb-dev
         # We built GCC but not the libmpc2, thus we need to install it
         - libmpc2
+  linux-x86_64:
+    var:
+      martools_filename: mar-tools-linux64.zip
 
   linux-i686:
     var:
       martools_filename: mar-tools-linux32.zip
-      sort_deps: 0
-      arch_deps:
-        - libc6-dev-i386
-        - libgtk2.0-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
-        - hardening-wrapper
 
   osx-x86_64:
     var:
diff --git a/projects/gcc/build b/projects/gcc/build
index 1c24af7..e509aac 100644
--- a/projects/gcc/build
+++ b/projects/gcc/build
@@ -1,5 +1,6 @@
 #!/bin/sh
 [% c("var/set_default_env") -%]
+[% c("var/setarch") -%]
 distdir=/var/tmp/dist/[% project %]
 mkdir /var/tmp/build
 tar -C /var/tmp/build -xf [% project %]-[% c("version") %].tar.bz2
diff --git a/projects/gcc/config b/projects/gcc/config
index 1acf30a..676d1fb 100644
--- a/projects/gcc/config
+++ b/projects/gcc/config
@@ -4,12 +4,11 @@ version: 5.1.0
 var:
   container:
     use_container: 1
-  configure_opt: --enable-multilib --enable-languages=c,c++ --with-arch_32=i686
   deps:
     - build-essential
     - libmpc-dev
-    - libc6-dev-i386
   setup: |
+    [% c("var/setarch") -%]
     mkdir -p /var/tmp/dist
     tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
     export PATH="/var/tmp/dist/gcc/bin:$PATH"
@@ -36,12 +35,20 @@ var:
     popd
 
 targets:
-  osx-x86_64:
-    var:
-      configure_opt: --enable-multilib --enable-languages=c,c++
   windows-i686:
     var:
       configure_opt: --disable-multilib --enable-languages=c,c++
+  linux-i686:
+    var:
+      configure_opt: --enable-multilib --enable-languages=c,c++ --with-system-zlib
+      arch_deps:
+        - libc6-dev
+        - zlib1g-dev
+  linux-x86_64:
+    var:
+      configure_opt: --enable-multilib --enable-languages=c,c++ --with-arch_32=i686
+      arch_deps:
+        - libc6-dev-i386
 input_files:
   - project: container-image
   - URL: 'https://ftp.gnu.org/gnu/gcc/gcc-[% c("version") %]/gcc-[% c("version") %].tar.bz2'
diff --git a/projects/go-webrtc/config b/projects/go-webrtc/config
index d7c31d6..673215b 100644
--- a/projects/go-webrtc/config
+++ b/projects/go-webrtc/config
@@ -31,17 +31,11 @@ var:
 targets:
   master:
     git_hash: master
-  linux-x86_64:
+  linux:
     var:
       arch_deps:
         - pkg-config
         - libx11-dev
-  linux-i686:
-    var:
-      arch_deps:
-        - pkg-config:i386
-        - libx11-dev:i386
-        - lib32stdc++6
 
 input_files:
   - project: container-image
diff --git a/projects/go/build b/projects/go/build
index 2f87bf5..b7fac08 100644
--- a/projects/go/build
+++ b/projects/go/build
@@ -1,5 +1,6 @@
 #!/bin/bash
 [% c("var/set_default_env") -%]
+[% c("var/setarch") -%]
 distdir=/var/tmp/dist/[% project %]
 mkdir -p /var/tmp/dist
 
diff --git a/projects/go/config b/projects/go/config
index ef9c411..b36f211 100644
--- a/projects/go/config
+++ b/projects/go/config
@@ -8,6 +8,7 @@ var:
     use_container: 1
 
   setup: |
+    [% c("var/setarch") -%]
     mkdir -p /var/tmp/dist
     tar -C /var/tmp/dist -xf $rootdir/[% c("go_tarfile") %]
     export GOOS=[% c("var/GOOS") %]
diff --git a/projects/snowflake/config b/projects/snowflake/config
index 212e86c..89e3eb6 100644
--- a/projects/snowflake/config
+++ b/projects/snowflake/config
@@ -9,13 +9,7 @@ var:
     use_container: 1
 
 targets:
-  linux-i686:
-    var:
-      arch_deps:
-        - pkg-config
-        - libx11-dev:i386
-        - lib32stdc++6
-  linux-x86_64:
+  linux:
     var:
       arch_deps:
         - pkg-config
diff --git a/projects/tor/config b/projects/tor/config
index a9da811..c2d359c 100644
--- a/projects/tor/config
+++ b/projects/tor/config
@@ -21,22 +21,18 @@ targets:
     git_hash: master
     tag_gpg_id: 0
 
-  linux-i686:
+  linux:
     var:
-      libdir: lib32
-      sort_deps: 0
       arch_deps:
-        - libc6-dev-i386
         - libtool
-        - zlib1g-dev:i386
+        - zlib1g-dev
         - 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:
diff --git a/projects/webrtc/config b/projects/webrtc/config
index d46d821..6882e87 100644
--- a/projects/webrtc/config
+++ b/projects/webrtc/config
@@ -26,28 +26,6 @@ targets:
     var:
       webrtc:
         os: linux
-  linux-i686:
-    var:
-      sort_deps: 0
-      arch_deps:
-        - lib32asound2-dev
-        - lib64expat1
-        - libexpat1-dev:i386
-        - libglib2.0-dev:i386
-        - libgtk2.0-dev:i386
-        - libudev-dev:i386
-        - libx11-dev:i386
-        - libxext-dev:i386
-        - libxrandr-dev:i386
-        - lib32stdc++6
-        - pkg-config
-        - hardening-wrapper
-      webrtc:
-        arch: ia32
-        lib_arch: 386
-        lib_path: lib/libwebrtc-linux-386-magic.a
-  linux-x86_64:
-    var:
       arch_deps:
         - libasound2-dev
         - libexpat1-dev
@@ -58,6 +36,14 @@ targets:
         - libxext-dev
         - libxrandr-dev
         - pkg-config
+  linux-i686:
+    var:
+      webrtc:
+        arch: ia32
+        lib_arch: 386
+        lib_path: lib/libwebrtc-linux-386-magic.a
+  linux-x86_64:
+    var:
       webrtc:
         arch: x64
         lib_arch: amd64
diff --git a/rbm.conf b/rbm.conf
index 722c85a..2060132 100644
--- a/rbm.conf
+++ b/rbm.conf
@@ -111,26 +111,30 @@ targets:
     var:
       linux-x86_64: 1
       osname: linux-x86_64
-      deps:
-        - build-essential
-        - python
-        - bison
-        - hardening-wrapper
-        - automake
-        - libtool
-        - zip
-        - unzip
       # We only build snowflake on linux-x86_64 for now
       snowflake: 1
+      container:
+        arch: amd64
   linux-i686:
     arch: i686
     var:
       linux-i686: 1
       osname: linux-i686
-      configure_opt: '--host=i686-linux-gnu CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32'
-      pre_pkginst: dpkg --add-architecture i386
+      container:
+        arch: i386
+      setarch: |
+        if test -z "$RBM_SETARCH"
+        then
+           export RBM_SETARCH=1
+           exec setarch i686 ./build
+        fi
+  linux:
+    var:
+      linux: 1
+      compiler: gcc
+      container:
+        suite: wheezy
       deps:
-        - libc6-dev-i386
         - build-essential
         - python
         - bison
@@ -139,13 +143,6 @@ targets:
         - libtool
         - zip
         - unzip
-  linux:
-    var:
-      linux: 1
-      compiler: gcc
-      container:
-        suite: wheezy
-        arch: amd64
 
   torbrowser-windows-i686:
     - windows-i686

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