boklm pushed to branch maint-12.0 at The Tor Project / Applications / tor-browser-build
Commits:
-
530ece27
by Nicolas Vigier at 2022-12-09T11:30:15+01:00
-
6b48ead1
by Nicolas Vigier at 2022-12-09T11:30:50+01:00
-
bf8ef3b5
by Nicolas Vigier at 2022-12-09T11:30:55+01:00
-
4d2e38cd
by Pier Angelo Vendrame at 2022-12-09T11:31:31+01:00
9 changed files:
- projects/clang/build
- projects/clang/config
- + projects/compiler-rt/build
- + projects/compiler-rt/config
- projects/container-image/config
- projects/geckoview/build
- projects/geckoview/config
- + projects/mmdebstrap-image/apt-key-allow-expired-key.patch
- projects/mmdebstrap-image/config
Changes:
... | ... | @@ -3,16 +3,12 @@ |
3 | 3 | distdir=/var/tmp/dist/[% project %]
|
4 | 4 | mkdir -p /var/tmp/dist
|
5 | 5 | tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %]
|
6 | -export PATH="/var/tmp/dist/cmake/bin:$PATH"
|
|
6 | +tar -C /var/tmp/dist -xf [% c('input_files_by_name/ninja') %]
|
|
7 | +export PATH="/var/tmp/dist/ninja:/var/tmp/dist/cmake/bin:$PATH"
|
|
7 | 8 | [% IF c("var/linux") %]
|
8 | 9 | [% pc('gcc', 'var/setup', { compiler_tarfile => c('input_files_by_name/gcc'),
|
9 | 10 | hardened_gcc => 0 }) %]
|
10 | 11 | [% pc('python', 'var/setup', { python_tarfile => c('input_files_by_name/python') }) %]
|
11 | -[% END -%]
|
|
12 | -[% IF c("var/android") %]
|
|
13 | - [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
|
|
14 | -[% END -%]
|
|
15 | -[% IF c("var/linux") || c("var/android") -%]
|
|
16 | 12 | tar -C /var/tmp/dist -xf [% c('input_files_by_name/binutils') %]
|
17 | 13 | export PATH="/var/tmp/dist/binutils/bin:$PATH"
|
18 | 14 | [% END -%]
|
... | ... | @@ -25,57 +21,15 @@ mkdir build |
25 | 21 | cd build
|
26 | 22 | # LLVM_ENABLE_ZLIB solves the "contains a compressed section, but zlib is not available" on lld
|
27 | 23 | # LLVM_INSTALL_UTILS allows this LLVM to be used to compile Rust
|
28 | -cmake ../llvm -G "Unix Makefiles" \
|
|
24 | +cmake ../llvm -GNinja \
|
|
29 | 25 | -DCMAKE_INSTALL_PREFIX=$distdir \
|
30 | 26 | -DCMAKE_BUILD_TYPE=Release \
|
31 | - [% IF c("var/android") || c("var/macos") -%]
|
|
32 | - -DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" \
|
|
33 | - [% END -%]
|
|
34 | - [% IF c("var/rlbox") -%]-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly[% END %] \
|
|
35 | - -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;lld" \
|
|
27 | + -DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64[% IF c("var/rlbox") -%];WebAssembly[% END %]" \
|
|
28 | + -DLLVM_ENABLE_PROJECTS="clang;lld" \
|
|
36 | 29 | -DLLVM_ENABLE_ZLIB=ON \
|
37 | 30 | -DLLVM_INSTALL_UTILS=ON \
|
38 | 31 | |
39 | -make -j[% c("num_procs") %]
|
|
40 | -make install
|
|
41 | -cd ..
|
|
42 | - |
|
43 | -[% IF c("var/android") -%]
|
|
44 | - echo "Compiling compiler-rt (Android only)"
|
|
45 | - rtdistdir=/var/tmp/build/rtdist
|
|
46 | - mkdir $rtdistdir
|
|
47 | - |
|
48 | - make_compilerrt () {
|
|
49 | - mkdir "build-compilerrt-$1"
|
|
50 | - cd "build-compilerrt-$1"
|
|
51 | - cmake ../compiler-rt/ -G "Unix Makefiles" \
|
|
52 | - -DCMAKE_INSTALL_PREFIX=$rtdistdir \
|
|
53 | - -DCMAKE_BUILD_TYPE=Release \
|
|
54 | - -DCMAKE_SYSTEM_NAME=Android \
|
|
55 | - -DCMAKE_ANDROID_ARCH_ABI=$1 \
|
|
56 | - -DCMAKE_ANDROID_NDK="$ANDROID_NDK_HOME" \
|
|
57 | - -DCMAKE_C_FLAGS="$3 -fuse-ld=lld --rtlib=compiler-rt" \
|
|
58 | - -DCMAKE_CXX_FLAGS="$3 -fuse-ld=lld --rtlib=compiler-rt" \
|
|
59 | - -DCMAKE_EXE_LINKER_FLAGS="-L$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/$2" \
|
|
60 | - -DCOMPILER_RT_BUILD_BUILTINS=ON \
|
|
61 | - -DCOMPILER_RT_BUILD_LIBFUZZER=OFF \
|
|
62 | - -DCOMPILER_RT_BUILD_MEMPROF=OFF \
|
|
63 | - -DCOMPILER_RT_BUILD_ORC=OFF \
|
|
64 | - -DCOMPILER_RT_BUILD_PROFILE=OFF \
|
|
65 | - -DCOMPILER_RT_BUILD_SANITIZERS=OFF \
|
|
66 | - -DCOMPILER_RT_BUILD_XRAY=OFF
|
|
67 | - make -j[% c("num_procs") %]
|
|
68 | - make install
|
|
69 | - cd ..
|
|
70 | - }
|
|
71 | - |
|
72 | - make_compilerrt "armeabi-v7a" "arm-linux-androideabi/lib" "-DARMEABI_V7A"
|
|
73 | - make_compilerrt "arm64-v8a" "aarch64-linux-android/lib64"
|
|
74 | - make_compilerrt "x86" "i686-linux-android/lib"
|
|
75 | - make_compilerrt "x86_64" "x86_64-linux-android/lib64"
|
|
76 | - |
|
77 | - mv $rtdistdir/lib/linux/libclang_rt.builtins-*-android.a $distdir/lib/clang/[% c("var/llvm_version") %]/lib/linux/
|
|
78 | -[% END -%]
|
|
32 | +ninja -j[% c("num_procs") %] -v install
|
|
79 | 33 | |
80 | 34 | cd /var/tmp/dist
|
81 | 35 | [% c('tar', {
|
... | ... | @@ -11,14 +11,16 @@ input_files: |
11 | 11 | - project: container-image
|
12 | 12 | - name: '[% c("var/compiler") %]'
|
13 | 13 | project: '[% c("var/compiler") %]'
|
14 | - enable: '[% c("var/linux") || c("var/android") %]'
|
|
14 | + enable: '[% c("var/linux") %]'
|
|
15 | 15 | - name: binutils
|
16 | 16 | project: binutils
|
17 | - enable: '[% c("var/linux") || c("var/android") %]'
|
|
17 | + enable: '[% c("var/linux") %]'
|
|
18 | 18 | - project: cmake
|
19 | 19 | name: cmake
|
20 | 20 | - project: llvm-project
|
21 | 21 | name: clang-source
|
22 | + - project: ninja
|
|
23 | + name: ninja
|
|
22 | 24 | - project: python
|
23 | 25 | name: python
|
24 | 26 | enable: '[% c("var/linux") %]' |
1 | +#!/bin/bash
|
|
2 | +[% c("var/set_default_env") -%]
|
|
3 | +distdir=/var/tmp/dist/[% project %]
|
|
4 | +mkdir -p /var/tmp/dist
|
|
5 | +tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %]
|
|
6 | +tar -C /var/tmp/dist -xf [% c('input_files_by_name/ninja') %]
|
|
7 | +export PATH="/var/tmp/dist/ninja:/var/tmp/dist/cmake/bin:$PATH"
|
|
8 | + |
|
9 | +[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
|
|
10 | + |
|
11 | +tar -C /var/tmp/dist -xf [% c('input_files_by_name/binutils') %]
|
|
12 | +export PATH="/var/tmp/dist/binutils/bin:$PATH"
|
|
13 | + |
|
14 | +mkdir -p /var/tmp/build
|
|
15 | +cd /var/tmp/build
|
|
16 | +tar -xf $rootdir/[% c('input_files_by_name/clang-source') %]
|
|
17 | +cd clang-source
|
|
18 | +export LLVM_HOME=$(pwd)
|
|
19 | +mkdir build
|
|
20 | +cd build
|
|
21 | + |
|
22 | +installdir=/var/tmp/build/install
|
|
23 | +mkdir -p $installdir
|
|
24 | + |
|
25 | +cmake ../compiler-rt/ -GNinja \
|
|
26 | + -DCMAKE_INSTALL_PREFIX=$installdir \
|
|
27 | + -DCMAKE_BUILD_TYPE=Release \
|
|
28 | + -DCMAKE_SYSTEM_NAME=Android \
|
|
29 | + -DCMAKE_ANDROID_ARCH_ABI="[% c('var/abi') %]" \
|
|
30 | + -DCMAKE_ANDROID_NDK="$ANDROID_NDK_HOME" \
|
|
31 | + -DCMAKE_C_FLAGS="-fuse-ld=lld --rtlib=compiler-rt $defines" \
|
|
32 | + -DCMAKE_CXX_FLAGS="-fuse-ld=lld --rtlib=compiler-rt $defines" \
|
|
33 | + -DCMAKE_EXE_LINKER_FLAGS="-L$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/[% c('var/libdir') %]" \
|
|
34 | + -DCOMPILER_RT_BUILD_BUILTINS=ON \
|
|
35 | + -DCOMPILER_RT_BUILD_LIBFUZZER=OFF \
|
|
36 | + -DCOMPILER_RT_BUILD_MEMPROF=OFF \
|
|
37 | + -DCOMPILER_RT_BUILD_ORC=OFF \
|
|
38 | + -DCOMPILER_RT_BUILD_PROFILE=OFF \
|
|
39 | + -DCOMPILER_RT_BUILD_SANITIZERS=OFF \
|
|
40 | + -DCOMPILER_RT_BUILD_XRAY=OFF
|
|
41 | + |
|
42 | +ninja -j[% c("num_procs") %] -v install
|
|
43 | + |
|
44 | +mkdir -p $distdir/lib/clang/[% c("var/llvm_version") %]/lib/linux/
|
|
45 | +mv $installdir/lib/linux/libclang_rt.builtins-*-android.a $distdir/lib/clang/[% c("var/llvm_version") %]/lib/linux/
|
|
46 | + |
|
47 | +cd /var/tmp/dist
|
|
48 | +[% c('tar', {
|
|
49 | + tar_src => [ project ],
|
|
50 | + tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
|
|
51 | + }) %] |
1 | +# vim: filetype=yaml sw=2
|
|
2 | +version: '[% c("var/llvm_version") %]'
|
|
3 | +filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
|
|
4 | +container:
|
|
5 | + use_container: 1
|
|
6 | + |
|
7 | +var:
|
|
8 | + llvm_version: '[% pc("llvm-project", "version") %]'
|
|
9 | + |
|
10 | +targets:
|
|
11 | + android-armv7:
|
|
12 | + var:
|
|
13 | + libdir: 'arm-linux-androideabi/lib'
|
|
14 | + android-aarch64:
|
|
15 | + var:
|
|
16 | + libdir: 'aarch64-linux-android/lib64'
|
|
17 | + android-x86:
|
|
18 | + var:
|
|
19 | + libdir: 'i686-linux-android/lib'
|
|
20 | + android-x86_64:
|
|
21 | + var:
|
|
22 | + libdir: 'x86_64-linux-android/lib64'
|
|
23 | + |
|
24 | +input_files:
|
|
25 | + - project: container-image
|
|
26 | + - name: '[% c("var/compiler") %]'
|
|
27 | + project: '[% c("var/compiler") %]'
|
|
28 | + - name: binutils
|
|
29 | + project: binutils
|
|
30 | + - project: cmake
|
|
31 | + name: cmake
|
|
32 | + - project: llvm-project
|
|
33 | + name: clang-source
|
|
34 | + - project: ninja
|
|
35 | + name: ninja
|
|
36 | + - project: python
|
|
37 | + name: python
|
|
38 | + enable: '[% c("var/linux") %]' |
... | ... | @@ -37,9 +37,14 @@ pre: | |
37 | 37 | [% IF c("var/linux-cross") -%]
|
38 | 38 | dpkg --add-architecture [% c("var/arch_debian") %]
|
39 | 39 | [% END -%]
|
40 | + [% IF c("var/container/suite") == "jessie" -%]
|
|
41 | + # We need to use faketime to run `apt-get update` on jessie, because of
|
|
42 | + # expired key. See tor-browser-build#40693
|
|
43 | + dpkg -i ./libfaketime_0.9.6-3_amd64.deb ./faketime_0.9.6-3_amd64.deb
|
|
44 | + [% END -%]
|
|
40 | 45 | # Update the package cache again because `pre_pkginst` may change the
|
41 | 46 | # package manager configuration.
|
42 | - apt-get update -y -q
|
|
47 | + [% IF c("var/container/suite") == "jessie" %]faketime '2018-12-24 08:15:42' [% END %]apt-get update -y -q
|
|
43 | 48 | [% END -%]
|
44 | 49 | apt-get upgrade -y -q
|
45 | 50 | [%
|
... | ... | @@ -82,3 +87,9 @@ input_files: |
82 | 87 | - project: mmdebstrap-image
|
83 | 88 | target:
|
84 | 89 | - '[% c("var/container/suite") %]-[% c("var/container/arch") %]'
|
90 | + - URL: http://deb.debian.org/debian/pool/main/f/faketime/faketime_0.9.6-3_amd64.deb
|
|
91 | + sha256sum: 19b2a01a2fae7e6d5a8b741fc0bc626451cb4c2cc884ee79f1136dd3c2c26213
|
|
92 | + enable: '[% c("var/container/suite") == "jessie" %]'
|
|
93 | + - URL: http://deb.debian.org/debian/pool/main/f/faketime/libfaketime_0.9.6-3_amd64.deb
|
|
94 | + sha256sum: 82747d5815b226cfed7f6f9a751bf8c20d457f3ba786add6017d6904dea4fdb4
|
|
95 | + enable: '[% c("var/container/suite") == "jessie" %]' |
... | ... | @@ -21,6 +21,8 @@ tar -C /var/tmp/dist -xf [% c('input_files_by_name/nasm') %] |
21 | 21 | tar -C /var/tmp/dist -xf [% c('input_files_by_name/node') %]
|
22 | 22 | tar -C /var/tmp/dist -xf [% c('input_files_by_name/clang') %]
|
23 | 23 | export LLVM_CONFIG="/var/tmp/dist/clang/bin/llvm-config"
|
24 | +tar -C /var/tmp/dist -xf [% c('input_files_by_name/compiler-rt') %]
|
|
25 | +cp -r /var/tmp/dist/compiler-rt/* /var/tmp/dist/clang/
|
|
24 | 26 | tar -C /var/tmp/dist -xf [% c('input_files_by_name/binutils') %]
|
25 | 27 | export PATH="/var/tmp/dist/rust/bin:/var/tmp/dist/cbindgen:/var/tmp/dist/nasm/bin:/var/tmp/dist/node/bin:/var/tmp/dist/clang/bin:/var/tmp/dist/binutils/bin:$PATH"
|
26 | 28 |
... | ... | @@ -171,6 +171,8 @@ input_files: |
171 | 171 | name: nasm
|
172 | 172 | - project: clang
|
173 | 173 | name: clang
|
174 | + - project: 'compiler-rt'
|
|
175 | + name: 'compiler-rt'
|
|
174 | 176 | - filename: 'gradle-dependencies-[% c("var/gradle_dependencies_version") %]'
|
175 | 177 | name: gradle-dependencies
|
176 | 178 | exec: '[% INCLUDE "fetch-gradle-dependencies" %]' |
1 | +--- o/apt-key 2022-11-30 14:57:12.742026261 +0000
|
|
2 | ++++ n/apt-key 2022-12-01 08:38:08.170140893 +0000
|
|
3 | +@@ -815,11 +815,18 @@
|
|
4 | + create_gpg_home
|
|
5 | + fi
|
|
6 | + setup_merged_keyring
|
|
7 | ++ tmpfile=$(mktemp)
|
|
8 | ++ set +e
|
|
9 | + if [ -n "$FORCED_KEYRING" ]; then
|
|
10 | +- "$GPGV" --homedir "${GPGHOMEDIR}" --keyring "$(dearmor_filename "${FORCED_KEYRING}")" --ignore-time-conflict "$@"
|
|
11 | ++ (eval "exec ${GPGSTATUSFD}>$tmpfile"; "$GPGV" --homedir "${GPGHOMEDIR}" --keyring "$(dearmor_filename "${FORCED_KEYRING}")" --ignore-time-conflict "$@")
|
|
12 | + else
|
|
13 | +- "$GPGV" --homedir "${GPGHOMEDIR}" --keyring "${GPGHOMEDIR}/pubring.gpg" --ignore-time-conflict "$@"
|
|
14 | ++ (eval "exec ${GPGSTATUSFD}>$tmpfile"; "$GPGV" --homedir "${GPGHOMEDIR}" --keyring "${GPGHOMEDIR}/pubring.gpg" --ignore-time-conflict "$@")
|
|
15 | + fi
|
|
16 | ++ err=$?
|
|
17 | ++ set -e
|
|
18 | ++ cat "$tmpfile" | sed 's/^\[GNUPG:\] EXPKEYSIG /\[GNUPG:\] GOODSIG /' >&${GPGSTATUSFD}
|
|
19 | ++ rm -f "$tmpfile"
|
|
20 | ++ exit $err
|
|
21 | + ;;
|
|
22 | + help)
|
|
23 | + usage |
... | ... | @@ -6,7 +6,7 @@ container: |
6 | 6 | use_container: 1
|
7 | 7 | |
8 | 8 | var:
|
9 | - ubuntu_version: 22.04
|
|
9 | + ubuntu_version: 22.04.1
|
|
10 | 10 | |
11 | 11 | pre: |
|
12 | 12 | #!/bin/sh
|
... | ... | @@ -16,6 +16,14 @@ pre: | |
16 | 16 | apt-get update -y -q
|
17 | 17 | apt-get install -y -q debian-archive-keyring ubuntu-keyring mmdebstrap gnupg
|
18 | 18 | |
19 | + [% IF c("var/container/suite") == "jessie" -%]
|
|
20 | + apt-get install -y -q patch
|
|
21 | + cd /usr/bin
|
|
22 | + # The gpg key for jessie is expired. We patch apt-key to accept expired keys.
|
|
23 | + patch -p1 < $rootdir/apt-key-allow-expired-key.patch
|
|
24 | + cd $rootdir
|
|
25 | + [% END -%]
|
|
26 | + |
|
19 | 27 | export SOURCE_DATE_EPOCH='[% c("timestamp") %]'
|
20 | 28 | tar -xf [% c('input_files_by_name/mmdebstrap') %]
|
21 | 29 | ./mmdebstrap/mmdebstrap --mode=unshare [% c("var/container/mmdebstrap_opt") %] [% c("var/container/suite") %] output.tar.gz [% c("var/container/debian_mirror") %]
|
... | ... | @@ -55,4 +63,6 @@ input_files: |
55 | 63 | name: mmdebstrap
|
56 | 64 | - URL: 'https://cdimage.ubuntu.com/ubuntu-base/releases/[% c("var/ubuntu_version") %]/release/ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
|
57 | 65 | filename: 'container-image_ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
|
58 | - sha256sum: df6fe77cee11bd216ac532f0ee082bdc4da3c0cc1f1d9cb20f3f743196bc4b07 |
|
66 | + sha256sum: e1f9200c99da008a473c9ae7b51e13f5ea05dc4c2e12beb43f0f9cbbbf6216f4
|
|
67 | + - filename: apt-key-allow-expired-key.patch
|
|
68 | + enable: '[% c("var/container/suite") == "jessie" %]' |