Use relative paths

Use verbose shell commands

Update sorting of deps

Fix license auto-accept

Many other fixes for proper building
This commit is contained in:
csagan5 2018-01-27 23:26:41 +01:00
parent 7c926008fe
commit 2291cbe5d0
9 changed files with 809 additions and 831 deletions

27
fdroid/GN_ARGS Normal file
View file

@ -0,0 +1,27 @@
## is_official_build enables some optimizations
target_os="android" symbol_level=1 remove_webcore_debug_symbols=true is_debug=false is_official_build=true use_errorprone_java_compiler=false
## codec settings
enable_ac3_eac3_audio_demuxing=true enable_hevc_demuxing=true enable_iterator_debugging=false
enable_mse_mpeg2ts_stream_parser=true ffmpeg_branding="Chrome" proprietary_codecs=true enable_widevine=true
use_openh264=true chrome_pgo_phase=0 full_wpo_on_official=true
## disable some features that don't work anymore/undesired
enable_google_now=false
enable_webrtc=false
use_official_google_api_keys=false
enable_nacl=false
android_channel="stable"
enable_resource_whitelist_generation=false
use_sysroot=false
## reduce from the default of 50 since the build box has limited resources
jumbo_file_merge_limit=30
## signing is deletegated to F-Droid
#android_keystore_path="//build/android/bromite.keystore"
#android_keystore_name = "bromitekey"
#android_keystore_password = "bromite"

View file

@ -1,9 +1,49 @@
#!/bin/bash
if [ ! $# -eq 5 ]; then
echo "Usage: build.sh release version-code arch ninja-target" 1>&2
exit 1
fi
RELEASE="$1"
VER_CODE="$2"
ARCH="$3"
NINJA_TARGET="$4"
OUTPUT="out/Release_${RELEASE}_${ARCH}"
set -e
## sync starts in fdroiddata/build/$PKG
echo "BUILD from $PWD"
. depot-tools.env
. common
echo "BUILD"
cd ../..
## create output directory - preserve if exists but make sure it's a symlink within srclibs/src
mkdir -p "$OUTPUT"
if [ -e srclib/src/out ]; then
unlink srclib/src/out
fi
ln -s "$PWD/out" srclib/src/out
## from base/build_time.cc
# BUILD_DATE is exactly "Mmm DD YYYY HH:MM:SS".
# See //build/write_build_date_header.py. "HH:MM:SS" is normally expected to
# be "05:00:00"
BDATE="$(date +'%b %d %Y') 05:00:00"
## read all arguments from file, skip comments
GN_ARGS="$(sed 's~ *#.*$~~' $PKG/fdroid/GN_ARGS | grep -v ^$ | tr '\n' ' ')"
cd srclib/src
gn gen "--args=android_default_version_code=\"${VER_CODE}\" android_default_version_name=\"$RELEASE\" override_build_date=\"$BDATE\" target_cpu=\"$ARCH\" $GN_ARGS" "$OUTPUT"
## concurrency level for ninja
CONC=$(nproc)
let CONC+=1
##NOTE: can't use exit code to identify interrupts until https://github.com/ninja-build/ninja/issues/430 is addressed
NINJA_STATUS="%f/%t (%p) %es | " ionice --class 3 nice --adjustment=5 ninja -j$CONC -C "$OUTPUT" ${NINJA_TARGET}

9
fdroid/common Normal file
View file

@ -0,0 +1,9 @@
## rename main repo & restore it on exit
mv ../../srclib/chromium ../../srclib/src
trap "mv '$PWD/../../srclib/src' '$PWD/../../srclib/chromium'" EXIT
export DEPOT_TOOLS="$PWD/../../srclib/DepotTools"
export PATH="$DEPOT_TOOLS:$PATH"
PKG=org.bromite.bromite

View file

@ -1,3 +0,0 @@
export DEPOT_TOOLS="$PWD/build/srclibs/DepotTools
export PATH="$DEPOT_TOOLS:$PATH"

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,9 @@ solutions = [
"managed" : True,
"custom_deps" : {
},
"custom_vars": {},
"custom_vars": {
'checkout_nacl': False
},
},
]
cache_dir = None

View file

@ -1,30 +1,29 @@
entries = {
'src': 'https://chromium.googlesource.com/chromium/src.git',
'src/buildtools': 'https://chromium.googlesource.com/chromium/buildtools.git@437a616be5b2056336ed3ca5c33c41f7788ede09',
'src/buildtools': 'https://chromium.googlesource.com/chromium/buildtools.git@f115f4786771afdfacb18a2299541b23e21f4792',
'src/chrome/test/data/perf/canvas_bench': 'https://chromium.googlesource.com/chromium/canvas_bench.git@a7b40ea5ae0239517d78845a5fc9b12976bfc732',
'src/chrome/test/data/perf/frame_rate/content': 'https://chromium.googlesource.com/chromium/frame_rate/content.git@c10272c88463efeef6bb19c9ec07c42bc8fe22b9',
'src/chrome/test/data/vr/webvr_info': 'https://chromium.googlesource.com/external/github.com/toji/webvr.info.git@c58ae99b9ff9e2aa4c524633519570bf33536248',
'src/media/cdm/api': 'https://chromium.googlesource.com/chromium/cdm.git@ca7130aa8fe6dd6c0664b52768d1957af31ae91b',
'src/native_client': 'https://chromium.googlesource.com/native_client/src/native_client.git@7f07816e463da403255f0ab4f6d88004450dd09d',
'src/third_party/SPIRV-Tools/src': 'https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git@9166854ac93ef81b026e943ccd230fed6c8b8d3c',
'src/third_party/android_ndk': 'https://chromium.googlesource.com/android_ndk.git@e951c37287c7d8cd915bf8d4149fd4a06d808b55',
'src/third_party/android_protobuf/src': 'https://chromium.googlesource.com/external/android_protobuf.git@7fca48d8ce97f7ba3ab8eea5c472f1ad3711762f',
'src/third_party/android_tools': 'https://chromium.googlesource.com/android_tools.git@c9f9bbf0a6c862fbef6115e80e8617093cd58e6b',
'src/third_party/angle': 'https://chromium.googlesource.com/angle/angle.git@379681336ba11f33b95b337b7fa324e6336a780e',
'src/third_party/angle': 'https://chromium.googlesource.com/angle/angle.git@aba14ff52bea59b0111ba536843209134479a37c',
'src/third_party/apache-portable-runtime/src': 'https://chromium.googlesource.com/external/apache-portable-runtime.git@c3f11fcd86b42922834cae91103cf068246c6bb6',
'src/third_party/auto/src': 'https://chromium.googlesource.com/external/github.com/google/auto.git@8a81a858ae7b78a1aef71ac3905fade0bbd64e82',
'src/third_party/bidichecker': 'https://chromium.googlesource.com/external/bidichecker/lib.git@97f2aa645b74c28c57eca56992235c79850fa9e0',
'src/third_party/boringssl/src': 'https://boringssl.googlesource.com/boringssl.git@94cd196a80252c98e329e979870f2a462cc4f402',
'src/third_party/breakpad/breakpad': 'https://chromium.googlesource.com/breakpad/breakpad.git@4a02ec03038d9d6f870f42d5070591512f488db0',
'src/third_party/catapult': 'https://chromium.googlesource.com/catapult.git@20b4aa3deae83d8f689859aebd27601056403c82',
'src/third_party/catapult': 'https://chromium.googlesource.com/catapult.git@82f653f9a44e39589c490ee2122663cbd95ab21e',
'src/third_party/ced/src': 'https://chromium.googlesource.com/external/github.com/google/compact_enc_det.git@94c367a1fe3a13207f4b22604fcfd1d9f9ddf6d9',
'src/third_party/chromite': 'https://chromium.googlesource.com/chromiumos/chromite.git@10ace85c7a3e6c42cbc0805da3379fe70be70d68',
'src/third_party/chromite': 'https://chromium.googlesource.com/chromiumos/chromite.git@5b16d08cfaf8b1fc689a9c68258c258f4ad0fff8',
'src/third_party/cld_3/src': 'https://chromium.googlesource.com/external/github.com/google/cld_3.git@ae02d6b8a2af41e87c956c7c7d3f651a8b7b9e79',
'src/third_party/colorama/src': 'https://chromium.googlesource.com/external/colorama.git@799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8',
'src/third_party/crc32c/src': 'https://chromium.googlesource.com/external/github.com/google/crc32c.git@0f771ed5ef83556451e1736f22b1a11054dc81c3',
'src/third_party/cros_system_api': 'https://chromium.googlesource.com/chromiumos/platform/system_api.git@5c8aa4d8a30e89added6423a242360225661c554',
'src/third_party/cros_system_api': 'https://chromium.googlesource.com/chromiumos/platform/system_api.git@55af1ecf95886bd60661dd7c62a9e32ec364afc1',
'src/third_party/custom_tabs_client/src': 'https://chromium.googlesource.com/custom-tabs-client.git@a0b6c6f7db4127c191ebb9ef008609224658edb2',
'src/third_party/depot_tools': 'https://chromium.googlesource.com/chromium/tools/depot_tools.git@fd4ad2416554c43f6ecd2c9c62ab5914f521c9ad',
'src/third_party/depot_tools': 'https://chromium.googlesource.com/chromium/tools/depot_tools.git@23c165f3c831e6b045b1ce914170f42fed86d0dc',
'src/third_party/devtools-node-modules': 'https://chromium.googlesource.com/external/github.com/ChromeDevTools/devtools-node-modules@5f7cd2497d7a643125c3b6eb910d99ba28be6899',
'src/third_party/dom_distiller_js/dist': 'https://chromium.googlesource.com/chromium/dom-distiller/dist.git@60b46718e28f553ab57e3d2bbda5b3b41456f417',
'src/third_party/elfutils/src': 'https://chromium.googlesource.com/external/elfutils.git@249673729a7e5dbd5de4f3760bdcaa3d23d154d7',
@ -56,10 +55,10 @@ entries = {
'src/third_party/libphonenumber/dist': 'https://chromium.googlesource.com/external/libphonenumber.git@a4da30df63a097d67e3c429ead6790ad91d36cf4',
'src/third_party/libprotobuf-mutator/src': 'https://chromium.googlesource.com/external/github.com/google/libprotobuf-mutator.git@3fc43a01d721ef1bacfefed170bc22abf1b8b051',
'src/third_party/libsrtp': 'https://chromium.googlesource.com/chromium/deps/libsrtp.git@1d45b8e599dc2db6ea3ae22dbc94a8c504652423',
'src/third_party/libsync/src': 'https://chromium.googlesource.com/aosp/platform/system/core/libsync.git@aa6cda6f638bd57d3a024f0d201f723a5c3bb875',
'src/third_party/libvpx/source/libvpx': 'https://chromium.googlesource.com/webm/libvpx.git@373e08f921e5bfd5a96963fabbbbe16ec793d44e',
'src/third_party/libsync/src': 'https://chromium.googlesource.com/aosp/platform/system/core/libsync.git@f4f4387b6bf2387efbcfd1453af4892e8982faf6',
'src/third_party/libvpx/source/libvpx': 'https://chromium.googlesource.com/webm/libvpx.git@742ae4b24d28342a1642c9749826ee8428b20d6e',
'src/third_party/libwebm/source': 'https://chromium.googlesource.com/webm/libwebm.git@b03c65468b06d097f27235d93d76bfc45f490ede',
'src/third_party/libyuv': 'https://chromium.googlesource.com/libyuv/libyuv.git@09db0c4ce2008008f73b247f1a5b64cfbb29b72e',
'src/third_party/libyuv': 'https://chromium.googlesource.com/libyuv/libyuv.git@92e22cf5b66173d5d5056751ca62bc2254e4ff86',
'src/third_party/lss': 'https://chromium.googlesource.com/linux-syscall-support.git@e6527b0cd469e3ff5764785dadcb39bf7d787154',
'src/third_party/mesa/src': 'https://chromium.googlesource.com/chromium/deps/mesa.git@ef811c6bd4de74e13e7035ca882cc77f85793fef',
'src/third_party/minigbm/src': 'https://chromium.googlesource.com/chromiumos/platform/minigbm.git@27a7e6a24709564e18c3382d0aeda0b40c7ae03b',
@ -69,7 +68,7 @@ entries = {
'src/third_party/netty4/src': 'https://chromium.googlesource.com/external/netty4.git@cc4420b13bb4eeea5b1cf4f93b2755644cd3b120',
'src/third_party/openh264/src': 'https://chromium.googlesource.com/external/github.com/cisco/openh264@2e96d62426547ac4fb5cbcd122e5f6eb68d66ee6',
'src/third_party/openmax_dl': 'https://webrtc.googlesource.com/deps/third_party/openmax.git@b611996df3b8f6b151339d22c12c21f167009cb6',
'src/third_party/pdfium': 'https://pdfium.googlesource.com/pdfium.git@003e96c7c3e15afd2969d33bc91ca459bb73a3b5',
'src/third_party/pdfium': 'https://pdfium.googlesource.com/pdfium.git@6e8a3e62e1718c3739f44e94c128123276d85682',
'src/third_party/perfetto': 'https://android.googlesource.com/platform/external/perfetto.git@135841c8077f13f14c6b80e32d391da84d2ee131',
'src/third_party/pyelftools': 'https://chromium.googlesource.com/chromiumos/third_party/pyelftools.git@19b3e610c86fcadb837d252c794cb5e8008826ae',
'src/third_party/pyftpdlib/src': 'https://chromium.googlesource.com/external/pyftpdlib.git@2be6d65e31c7ee6320d059f581f05ae8d89d7e45',
@ -79,29 +78,29 @@ entries = {
'src/third_party/robolectric/robolectric': 'https://chromium.googlesource.com/external/robolectric.git@7e067f1112e1502caa742f7be72d37b5678d3403',
'src/third_party/sfntly/src': 'https://chromium.googlesource.com/external/github.com/googlei18n/sfntly.git@16f3404e41edc9708a51fbce481f22e46b809686',
'src/third_party/shaderc/src': 'https://chromium.googlesource.com/external/github.com/google/shaderc.git@cd8793c34907073025af2622c28bcee64e9879a4',
'src/third_party/skia': 'https://skia.googlesource.com/skia.git@3da15bb1c813d7a3c563c372fbfb3931e5b6c27c',
'src/third_party/skia': 'https://skia.googlesource.com/skia.git@fbe6620284a5df423f00ef5b935a24f0682cba29',
'src/third_party/smhasher/src': 'https://chromium.googlesource.com/external/smhasher.git@e87738e57558e0ec472b2fc3a643b838e5b6e88f',
'src/third_party/snappy/src': 'https://chromium.googlesource.com/external/github.com/google/snappy.git@b02bfa754ebf27921d8da3bd2517eab445b84ff9',
'src/third_party/swiftshader': 'https://swiftshader.googlesource.com/SwiftShader.git@b1d452eaeeb8272e37b87446511f2e0e95d27e6f',
'src/third_party/ub-uiautomator/lib': 'https://chromium.googlesource.com/chromium/third_party/ub-uiautomator.git@00270549ce3161ae72ceb24712618ea28b4f9434',
'src/third_party/usrsctp/usrsctplib': 'https://chromium.googlesource.com/external/github.com/sctplab/usrsctp@0e076261b832121cf120ddc04aaff87ac3a34d30',
'src/third_party/visualmetrics/src': 'https://chromium.googlesource.com/external/github.com/WPO-Foundation/visualmetrics.git@1edde9d2fe203229c895b648fdec355917200ad6',
'src/third_party/wayland-protocols/src': 'https://chromium.googlesource.com/external/anongit.freedesktop.org/git/wayland/wayland-protocols.git@26c99346ab5f2273fe5581bc4f6397bbb834f747',
'src/third_party/wayland-protocols/src': 'https://chromium.googlesource.com/external/anongit.freedesktop.org/git/wayland/wayland-protocols.git@4f789286e4ab7f6fecc2ccb895d79362a9b2382a',
'src/third_party/wayland/src': 'https://chromium.googlesource.com/external/anongit.freedesktop.org/git/wayland/wayland.git@1361da9cd5a719b32d978485a29920429a31ed25',
'src/third_party/wds/src': 'https://chromium.googlesource.com/external/github.com/01org/wds@ac3d8210d95f3000bf5c8e16a79dbbbf22d554a5',
'src/third_party/webdriver/pylib': 'https://chromium.googlesource.com/external/selenium/py.git@5fd78261a75fe08d27ca4835fb6c5ce4b42275bd',
'src/third_party/webgl/src': 'https://chromium.googlesource.com/external/khronosgroup/webgl.git@d458ada06171a85af00367251a4ed55db7fe2018',
'src/third_party/webrtc': 'https://webrtc.googlesource.com/src.git@5864639a46501501c9f7fe8a22ae485886a9965f',
'src/third_party/webrtc': 'https://webrtc.googlesource.com/src.git@22da89f502ab7ed618b7099f5010da021333bf71',
'src/third_party/xdg-utils': 'https://chromium.googlesource.com/chromium/deps/xdg-utils.git@d80274d5869b17b8c9067a1022e4416ee7ed5e0d',
'src/third_party/yasm/source/patched-yasm': 'https://chromium.googlesource.com/chromium/deps/yasm/patched-yasm.git@b98114e18d8b9b84586b10d24353ab8616d4c5fc',
'src/tools/gyp': 'https://chromium.googlesource.com/external/gyp.git@d61a9397e668fa9843c4aa7da9e79460fe590bfb',
'src/tools/page_cycler/acid3': 'https://chromium.googlesource.com/chromium/deps/acid3.git@6be0a66a1ebd7ebc5abc1b2f405a945f6d871521',
'src/tools/swarming_client': 'https://chromium.googlesource.com/infra/luci/client-py.git@88229872dd17e71658fe96763feaa77915d8cbd6',
'src/v8': 'https://chromium.googlesource.com/v8/v8.git@8d2dfd44e66ec72702b1ebdaa667623387f4dcd1',
'src/v8': 'https://chromium.googlesource.com/v8/v8.git@b4e468e1bc7c9aca1c0e5f33769d23634e30796e',
'src/buildtools/clang_format/script': 'https://chromium.googlesource.com/chromium/llvm-project/cfe/tools/clang-format.git@0653eee0c81ea04715c635dd0885e8096ff6ba6d',
'src/buildtools/third_party/libc++/trunk': 'https://chromium.googlesource.com/chromium/llvm-project/libcxx.git@f56f1bba1ade4a408d403ff050d50e837bae47df',
'src/buildtools/third_party/libc++abi/trunk': 'https://chromium.googlesource.com/chromium/llvm-project/libcxxabi.git@05ba3281482304ae8de31123a594972a495da06d',
'src/buildtools/third_party/libunwind/trunk': 'https://chromium.googlesource.com/external/llvm.org/libunwind.git@fc0a910c25d5415dd72ba9451b7cba380e3cc1e7',
'src/buildtools/third_party/libc++/trunk': 'https://chromium.googlesource.com/chromium/llvm-project/libcxx.git@27c341db41bc9df5c6f19cde65f002d6f1c2eb3c',
'src/buildtools/third_party/libc++abi/trunk': 'https://chromium.googlesource.com/chromium/llvm-project/libcxxabi.git@e1601db2504857d44db88a5d4e2ca50b32bbb7d9',
'src/buildtools/third_party/libunwind/trunk': 'https://chromium.googlesource.com/external/llvm.org/libunwind.git@86ab23972978242b6f9e27cebc239f3e8428b1af',
'src/third_party/android_tools/ndk': 'https://chromium.googlesource.com/android_ndk.git@e951c37287c7d8cd915bf8d4149fd4a06d808b55',
'src/third_party/deqp/src': 'https://android.googlesource.com/platform/external/deqp@455d82c60b096e7bd83b6a2f5ed70c61e4bfa759',
'src/third_party/glslang-angle/src': 'https://android.googlesource.com/platform/external/shaderc/glslang@2edde6665d9a56ead5ea0e55b4e64d9a803e6164',

View file

@ -1,5 +1,20 @@
#!/bin/bash
if [ ! $# -eq 1 ]; then
echo "Usage: install-deps.sh release" 1>&2
exit 1
fi
RELEASE="$1"
## sudo starts in fdroiddata/
echo "SUDO from $PWD"
echo "INSTALL DEPS"
set -e
## the main srclib must already be present
cd build/srclib/chromium
git checkout "$RELEASE"
exec build/install-build-deps-android.sh

View file

@ -2,28 +2,35 @@
set -e
## sync starts in fdroiddata/build/$PKG
echo "SYNC from $PWD"
mkdir -p srcvol
. common
if [ -e srcvol/src ]; then
unlink srcvol/src
fi
ln -s build/srclib/chromium srcvol/src
## install gclient configuration files
cp gclient_android.default ../../srclib/.gclient
cp gclient_entries ../../srclib/.gclient_entries
./gclient-prepare.sh
## create all necessary srclib symlinks so that gclient does not fetch them again
cd ../../srclib
../$PKG/fdroid/gclient-prepare.sh
## create output directory - preserve if exists but make sure it's a symlink
mkdir -p srcvol/out
if [ -e srcvol/src/out ]; then
unlink srcvol/src/out
fi
ln -s "$PWD/srcvol/out" srcvol/src/out
. depot-tools.env
cp gclient_android.default srcvol/.gclient
cp gclient_entries srcvol/.gclient_entries
## gclient must run in the chromium directory and it cannot be a symlink
cd src
set +e
#gclient sync --with_branch_heads --delete_unversioned_trees
exec gclient sync
echo y | gclient sync --reset
RV=$?
## revert the license workaround
git checkout DEPS
cd ..
if [ $RV -eq 0 ]; then
## success, copy the new gclient_entries
cp .gclient_entries ../$PKG/fdroid/gclient_entries
exit 0
fi
exit $RV