vendorsetup: Override hostname to avoid leaking info

Matches the Android 12 build sandbox: https://android.googlesource.com/platform/build/+/refs/tags/android-12.0.0_r2/Changes.md

Change-Id: I8a9790937641ff35d49cdfc974abae1392175a4d
Signed-off-by: Omkar Chandorkar <gotenksIN@aospa.co>
This commit is contained in:
Danny Lin 2024-03-11 12:07:46 +09:00 committed by Omkar Chandorkar
parent 88899f3e63
commit fd44c1b5e3
No known key found for this signature in database
2 changed files with 6 additions and 7 deletions

View File

@ -84,6 +84,7 @@ if [ $# -eq 0 ]; then
showHelpAndExit
fi
export DEVICE="$1"; shift
export FILE_NAME_TAG=eng.nobody
# Make sure we are running on 64-bit before carrying on with anything
ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/')
@ -196,13 +197,6 @@ fi
echo -e "${CLR_BLD_BLU}Starting compilation${CLR_RST}"
echo -e ""
# If we aren't in Jenkins, use the engineering tag
if [ -z "${BUILD_NUMBER}" ]; then
export FILE_NAME_TAG=eng.$USER
else
export FILE_NAME_TAG=$BUILD_NUMBER
fi
# Build a specific module(s)
if [ "${MODULES}" ]; then
m ${MODULES[@]} "$CMD"

5
vendorsetup.sh Normal file
View File

@ -0,0 +1,5 @@
# Shebang is intentionally missing - do not run as a script
# Override host metadata to make builds more reproducible and avoid leaking info
export BUILD_USERNAME=nobody
export BUILD_HOSTNAME=android-build