Browse Source

Update to 89.0.4389.114-1

master
wchen342 2 years ago
parent
commit
0f27e350f4
Signed by: wchen342 GPG Key ID: 9C19365D69B04CEC
  1. 14
      .build_config
  2. 4
      CHANGELOG.md
  3. 31
      build.sh
  4. 35
      bundle_generate_apk.sh
  5. 5
      misc/android_studio_setup.sh
  6. 2
      patches/Other/debug-fix.patch
  7. 4
      patches/Vanadium/0016-disable-seed-based-field-trials.patch
  8. 676
      patches/ungoogled-chromium-android/Add-more-search-engines.patch

14
.build_config

@ -0,0 +1,14 @@
#!/usr/bin/env bash
chrome_modern_target=chrome_modern_public_bundle
trichrome_chrome_bundle_target=trichrome_chrome_bundle
trichrome_chrome_64_bundle_target=trichrome_chrome_64_bundle
trichrome_chrome_apk_target=trichrome_library_apk
webview_target=system_webview_apk
trichrome_webview_target=trichrome_webview_apk
all=all
chromium_version=89.0.4389.114
ungoogled_chromium_version=89.0.4389.114
ungoogled_chromium_revision=1
ungoogled_chromium_android_revision=1

4
CHANGELOG.md

@ -1,3 +1,7 @@
# 89.0.4389.114-1
* Upstream security fixes
* Use 64-bit targets for arm64
# 89.0.4389.90-1
* Upstream security fixes

31
build.sh

@ -5,16 +5,7 @@ set -eu -o pipefail
# gn from OpenSUSE Tumbleweed.
# Assuming python2.
chrome_modern_target=chrome_modern_public_bundle
trichrome_chrome_bundle_target=trichrome_chrome_bundle
trichrome_chrome_apk_target=trichrome_library_apk
webview_target=system_webview_apk
trichrome_webview_target=trichrome_webview_apk
chromium_version=89.0.4389.90
ungoogled_chromium_version=89.0.4389.82
ungoogled_chromium_revision=1
ungoogled_chromium_android_revision=1
source .build_config
# Show env
pwd
@ -81,13 +72,19 @@ if [[ "$ARCH" != "arm64" ]] && [[ "$ARCH" != "arm" ]] && [[ "$ARCH" != "x86" ]];
exit 4
fi
if [[ "$TARGET" != "$chrome_modern_target" ]] && [[ "$TARGET" != "$trichrome_chrome_bundle_target" ]] && [[ "$TARGET" != "$webview_target" ]] && [[ "$TARGET" != "$trichrome_webview_target" ]] && [[ "$TARGET" != "all" ]]; then
if [[ "$TARGET" != "chrome_modern_target" ]] && [[ "$TARGET" != "trichrome_chrome_bundle_target" ]] && [[ "$TARGET" != "webview_target" ]] && [[ "$TARGET" != "trichrome_webview_target" ]] && [[ "$TARGET" != "all" ]]; then
echo "Wrong target"
exit 5
fi
echo "arch: $ARCH, target: $TARGET, debug: $DEBUG"
# 64-bit TriChrome
if [[ "$ARCH" == "arm64" ]] && [[ "$TARGET" == "trichrome_chrome_bundle_target" ]]; then
TARGET_EXPANDED=${trichrome_chrome_64_bundle_target}
else
TARGET_EXPANDED=${!TARGET}
fi
echo "arch: $ARCH, target: $TARGET, target expanded: ${TARGET_EXPANDED}, debug: $DEBUG"
path_modified=false
patch_applied=false
@ -353,14 +350,14 @@ apk_out_folder="apk_out"
mkdir "${apk_out_folder}"
pushd src
if [[ "$TARGET" != "all" ]]; then
ninja -C "${output_folder}" "$TARGET"
if [[ "$TARGET" == "$trichrome_chrome_bundle_target" ]] || [[ "$TARGET" == "$chrome_modern_target" ]]; then
../bundle_generate_apk.sh -o "${output_folder}" -t "$TARGET"
ninja -C "${output_folder}" "${TARGET_EXPANDED}"
if [[ "$TARGET" == "trichrome_chrome_bundle_target" ]] || [[ "$TARGET" == "chrome_modern_target" ]]; then
../bundle_generate_apk.sh -o "${output_folder}" -a "${ARCH}" -t "${TARGET_EXPANDED}"
fi
find . -iname "*.apk" -exec cp -f {} ../"${apk_out_folder}" \;
else
ninja -C out/Default "$chrome_modern_target"
../bundle_generate_apk.sh -o "${output_folder}" -t "$chrome_modern_target"
../bundle_generate_apk.sh -o "${output_folder}" -a "${ARCH}" -t "$chrome_modern_target"
ninja -C out/Default "$webview_target"
ninja -C out/Default "$trichrome_webview_target"
find . -iname "*.apk" -exec cp -f {} ../"${apk_out_folder}" \;
@ -368,7 +365,7 @@ else
# arm64+TriChrome needs to be run separately, otherwise it will fail
if [[ "$ARCH" != "arm64" ]]; then
ninja -C "${output_folder}" "$trichrome_chrome_bundle_target"
../bundle_generate_apk.sh -o "${output_folder}" -t "$trichrome_chrome_bundle_target"
../bundle_generate_apk.sh -o "${output_folder}" -a "${ARCH}" -t "$trichrome_chrome_bundle_target"
find . -iname "*.apk" -exec cp -f {} ../"${apk_out_folder}" \;
fi
fi

35
bundle_generate_apk.sh

@ -3,10 +3,8 @@
set -o errexit -o nounset -o pipefail
chrome_modern_target=chrome_modern_public_bundle
trichrome_chrome_bundle_target=trichrome_chrome_bundle
trichrome_chrome_apk_target=trichrome_library_apk
webview_target=system_webview_apk
SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source "${SCRIPT_PATH}/.build_config"
KEYSTORE=$PWD/../../uc_keystore/uc-release-key.keystore
KEYSTORE_PASS=$PWD/../../uc_keystore/keystore_pass
@ -23,8 +21,8 @@ if [[ ${PIPESTATUS[0]} -ne 4 ]]; then
exit 1
fi
OPTIONS=o:t:
LONGOPTS=output:,target:
OPTIONS=o:a:t:
LONGOPTS=output:,arch:,target:
# -regarding ! and PIPESTATUS see above
# -temporarily store output to be able to check for errors
@ -48,6 +46,10 @@ while true; do
OUTPUT="$2"
shift 2
;;
-a|--arch)
ARCH="$2"
shift 2
;;
-t|--target)
TARGET="$2"
shift 2
@ -63,6 +65,11 @@ while true; do
esac
done
if [[ "$ARCH" != "arm64" ]] && [[ "$ARCH" != "arm" ]] && [[ "$ARCH" != "x86" ]]; then
echo "Wrong architecture"
exit 4
fi
if [[ "$TARGET" != "$chrome_modern_target" ]] && [[ "$TARGET" != "$trichrome_chrome_bundle_target" ]]; then
echo "Wrong target"
exit 4
@ -76,9 +83,15 @@ fi
case "$TARGET" in
"$chrome_modern_target")
FILENAME="ChromeModernPublic"
FILENAME_OUT="ChromeModernPublic"
;;
"$trichrome_chrome_bundle_target")
FILENAME="TrichromeChrome"
FILENAME_OUT="TrichromeChrome"
;;
"$trichrome_chrome_64_bundle_target")
FILENAME="TrichromeChrome64"
FILENAME_OUT="TrichromeChrome"
;;
*)
echo "Filename parsing error"
@ -86,7 +99,7 @@ case "$TARGET" in
;;
esac
echo "output: $OUTPUT, target: $TARGET, filename: $FILENAME"
echo "output: $OUTPUT, arch: $ARCH, target: $TARGET, filename: $FILENAME"
cd $OUTPUT/apks
@ -96,12 +109,16 @@ cd release
$BUNDLETOOL build-apks --aapt2 $AAPT2 --bundle ../"$FILENAME".aab --output "$FILENAME".apks --mode=universal --ks $KEYSTORE --ks-pass file:$KEYSTORE_PASS --ks-key-alias uc
unzip "$FILENAME".apks universal.apk
mv universal.apk "$FILENAME".apk
mv universal.apk "${FILENAME_OUT}".apk
$APKSIGNER sign --ks $KEYSTORE --ks-pass file:$KEYSTORE_PASS --ks-key-alias uc --in "${FILENAME_OUT}".apk --out "${FILENAME_OUT}".apk
if [[ "$TARGET" == "$trichrome_chrome_bundle_target" ]]; then
for app in TrichromeLibrary TrichromeWebView; do
if [ -f ../${app}.apk ]; then
if [ -f "../${app}.apk" ]; then
$APKSIGNER sign --ks $KEYSTORE --ks-pass file:$KEYSTORE_PASS --ks-key-alias uc --in ../${app}.apk --out ${app}.apk
fi
if [ -f "../${app}64.apk" ]; then
$APKSIGNER sign --ks $KEYSTORE --ks-pass file:$KEYSTORE_PASS --ks-key-alias uc --in "../${app}64.apk" --out ${app}.apk
fi
done
fi

5
misc/android_studio_setup.sh

@ -1,10 +1,7 @@
#!/usr/bin/env bash
set -eu -o pipefail
chrome_modern_target=chrome_modern_public_bundle
trichrome_chrome_bundle_target=trichrome_chrome_bundle
trichrome_chrome_apk_target=trichrome_library_apk
webview_target=system_webview_apk
source .build_config
# Create symbol links to gn, depot-tools
pushd src

2
patches/Other/debug-fix.patch

@ -199,7 +199,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -879,7 +879,7 @@ LogMessage::~LogMessage() {
@@ -884,7 +884,7 @@ LogMessage::~LogMessage() {
#if defined(OFFICIAL_BUILD) && defined(NDEBUG)
IMMEDIATE_CRASH();
#else

4
patches/Vanadium/0016-disable-seed-based-field-trials.patch

@ -13,8 +13,8 @@ Subject: [PATCH 16/73] disable seed-based field trials
#endif // BUILDFLAG(FIELDTRIAL_TESTING_ENABLED)
bool used_seed = false;
if (!used_testing_config) {
- used_seed = CreateTrialsFromSeed(*low_entropy_provider, feature_list.get(),
- safe_seed_manager);
- used_seed = CreateTrialsFromSeed(low_entropy_provider.get(),
- feature_list.get(), safe_seed_manager);
}
platform_field_trials->SetupFeatureControllingFieldTrials(

676
patches/ungoogled-chromium-android/Add-more-search-engines.patch

File diff suppressed because it is too large
Loading…
Cancel
Save