
Dan Ballard pushed to branch tor-browser-128.11.0esr-14.5-1 at The Tor Project / Applications / Tor Browser Commits: bac0c232 by Dan Ballard at 2025-05-22T15:49:17+02:00 fixup! [android] Modify build system Bug 43809: allow tba-fetch-deps to download from nightlies - - - - - 33b39bf7 by Dan Ballard at 2025-05-22T15:51:06+02:00 fixup! TB 42669: [android] Use custom no-op app-services Bug 43809: allow tba-fetch-deps to download nightlies - - - - - 1 changed file: - mobile/android/fenix/tools/tba-fetch-deps.sh Changes: ===================================== mobile/android/fenix/tools/tba-fetch-deps.sh ===================================== @@ -1,24 +1,55 @@ #!/bin/bash +if [ $# -eq 0 ]; then + echo "Usage: ./tba-fetch-deps.sh --\$MODE" + echo " modes:" + echo " --nightly Downloads the needed assets from the nightlies build server. Use when local version matches nightly build server version." + echo " --tbb PATH Harvest most recently built assets from PATH assuming it points to a tor-browser-build dir. Use when local version does NOT match nightly build server version." + exit -1 +fi + +TBB_BUILD_06="https://tb-build-06.torproject.org/~tb-builder/tor-browser-build/out" + +if [[ $1 == "--tbb" && -z $2 ]]; then + echo "--tbb needs path to tor-browser-build dir" + exit -1 +fi +TBB_PATH=$2 + cd "$(dirname $(realpath "$0"))/.." if [ -z "$TOR_BROWSER_BUILD" ]; then TOR_BROWSER_BUILD=../../../../tor-browser-build fi -tor_expert_bundle_aar="$(ls -1td "$TOR_BROWSER_BUILD/out/tor-expert-bundle-aar/"tor-expert-bundle-aar-* | head -1)" -if [ -z "tor_expert_bundle_aar" ]; then +echo "Fetching tor-expert-bundle.aar..." + +if [[ $1 == "--tbb" ]]; then + tor_expert_bundle_aar="$(ls -1td "$TOR_BROWSER_BUILD/out/tor-expert-bundle-aar/"tor-expert-bundle-aar-* | head -1)" + cp "$tor_expert_bundle_aar"/* app/ +else + tor_expert_bundle_aar_dirname="$(curl -s $TBB_BUILD_06/tor-expert-bundle-aar/ | sed -nE 's/.*href=\"(tor-expert-bundle-aar-[0-9a-z\.\-]*).*/\1/p')" + curl -o app/tor-expert-bundle.aar $TBB_BUILD_06/tor-expert-bundle-aar/$tor_expert_bundle_aar_dirname/tor-expert-bundle.aar +fi + +if [ -z app/tor_expert_bundle.aar ]; then echo "Cannot find Tor Expert Bundle arr artifacts!" exit 2 fi +echo "" -cp "$tor_expert_bundle_aar"/* app/ +echo "Fetching noscript..." -noscript="$(find "$TOR_BROWSER_BUILD/out/browser" -name 'noscript*.xpi' -print | sort | tail -1)" mkdir -p "app/src/main/assets/extensions" -if [ -f "$noscript" ]; then - cp "$noscript" "app/src/main/assets/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" + +if [[ $1 == "--tbb" ]]; then + noscript="$(find "$TOR_BROWSER_BUILD/out/browser" -name 'noscript*.xpi' -print | sort | tail -1)" + cp "$noscript" "app/src/main/assets/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" +else + noscript_fname="$(curl -s $TBB_BUILD_06/browser/ | sed -nE 's/.*href=\"(noscript-[0-9a-z\.\-]*).*/\1/p')" + curl -o "app/src/main/assets/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" $TBB_BUILD_06/browser/$noscript_fname fi +echo "" if [ -z "$GRADLE_MAVEN_REPOSITORIES" ]; then GRADLE_MAVEN_REPOSITORIES="$HOME/.m2/repository" @@ -47,7 +78,18 @@ if [ "$os" = "unsupported" ] || [ "$arch" = "unsupported" ]; then exit 2 fi -app_services="$(ls -1t "$TOR_BROWSER_BUILD/out/application-services/"application-services*.tar.zst | head -1)" +echo "Fetching application-services..." + +if [[ $1 == "--tbb" ]]; then + app_services="$(ls -1t "$TOR_BROWSER_BUILD/out/application-services/"application-services*.tar.zst | head -1)" + tar -C /tmp -xf "$app_services" +else + app_services_fname="$(curl -s $TBB_BUILD_06/application-services/ | sed -nE 's/.*href=\"(application-services-[0-9a-z\.\-]*).*/\1/p')" + app_services=/tmp/$app_services_fname + curl -o $app_services $TBB_BUILD_06/application-services/$app_services_fname + tar -C /tmp -xf "$app_services" + rm "$app_services" +fi mkdir -p "$GRADLE_MAVEN_REPOSITORIES/org/mozilla" if [ -f "$app_services" ]; then tar -C /tmp -xf "$app_services" View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/cfd69fc... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/cfd69fc... You're receiving this email because of your account on gitlab.torproject.org.
participants (1)
-
Dan Ballard (@dan)