mirror of
https://github.com/lineageos4microg/docker-lineage-cicd
synced 2024-06-19 18:09:11 +02:00
Multiple changes
* Add MicroG's signature spoofing patch * Add ENVs for custom packages, custom Java libraries and keys path * Change git protocol from git:// to https:// * Increase ccache limit to 100 GB
This commit is contained in:
parent
4c0f2f2629
commit
fd59136e29
11
Dockerfile
11
Dockerfile
|
@ -1,5 +1,5 @@
|
|||
FROM finalduty/archlinux
|
||||
MAINTAINER Julian Xhokaxhiu <info at julianxhokaxhiu dot com>
|
||||
MAINTAINER Nicola Corna <nicola@corna.info>
|
||||
|
||||
# Environment variables
|
||||
#######################
|
||||
|
@ -54,6 +54,15 @@ ENV WITH_SU true
|
|||
# Provide a default JACK configuration in order to avoid out-of-memory issues
|
||||
ENV ANDROID_JACK_VM_ARGS "-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
|
||||
|
||||
# Custom packages to be installed
|
||||
ENV CUSTOM_PACKAGES ''
|
||||
|
||||
# Custom static Java libraries to be installed
|
||||
ENV CUSTOM_STATIC_JAVA_LIBRARY ''
|
||||
|
||||
# Key path (from the root of the android source)
|
||||
ENV RELEASEKEY_PATH ''
|
||||
|
||||
# Create Volume entry points
|
||||
############################
|
||||
|
||||
|
|
32
src/build.sh
32
src/build.sh
|
@ -19,7 +19,7 @@ if ! [ -z "$DEVICE_LIST" ]; then
|
|||
if ! [ "$(ls -A $SRC_DIR)" ]; then
|
||||
# Initialize repository
|
||||
echo ">> [$(date)] Initializing repository" >> $DOCKER_LOG
|
||||
yes | repo init -u git://github.com/lineageos/android.git -b $BRANCH_NAME 2>&1 >&$DEBUG_LOG
|
||||
yes | repo init -u https://github.com/lineageos/android.git -b $BRANCH_NAME 2>&1 >&$DEBUG_LOG
|
||||
fi
|
||||
|
||||
# Copy local manifests to the appropriate folder in order take them into consideration
|
||||
|
@ -37,6 +37,18 @@ if ! [ -z "$DEVICE_LIST" ]; then
|
|||
echo ">> [$(date)] Syncing repository" >> $DOCKER_LOG
|
||||
repo sync 2>&1 >&$DEBUG_LOG
|
||||
|
||||
# If not yet done, apply the MicroG's signature spoofing patch
|
||||
cd frameworks/base
|
||||
if [ $(git rev-parse --abbrev-ref HEAD) != "signature_spoofing" ]; then
|
||||
echo ">> [$(date)] Applying signature spoofing patch to frameworks/base" >> $DOCKER_LOG
|
||||
repo start signature_spoofing
|
||||
wget -qO- https://raw.githubusercontent.com/microg/android_packages_apps_GmsCore/master/patches/android_frameworks_base-N.patch | patch -p1
|
||||
git clean -f
|
||||
git add .
|
||||
git commit -m "Add signature spoofing patch"
|
||||
fi
|
||||
cd $SRC_DIR
|
||||
|
||||
# If requested, clean the OUT dir in order to avoid clutter
|
||||
if [ "$CLEAN_OUTDIR" = true ]; then
|
||||
echo ">> [$(date)] Cleaning '$ZIP_DIR'" >> $DOCKER_LOG
|
||||
|
@ -55,6 +67,24 @@ if ! [ -z "$DEVICE_LIST" ]; then
|
|||
sed -i "1s;^;PRODUCT_PROPERTY_OVERRIDES += cm.updater.uri=$OTA_URL\n\n;" vendor/cm/config/common.mk >&$DEBUG_LOG
|
||||
fi
|
||||
|
||||
# Add custom packages to be installed
|
||||
if ! [ -z "$CUSTOM_PACKAGES" ]; then
|
||||
echo ">> [$(date)] Adding custom packages ($CUSTOM_PACKAGES)" >> $DOCKER_LOG
|
||||
echo "PRODUCT_PACKAGES += $CUSTOM_PACKAGES" >> vendor/cm/config/common.mk
|
||||
fi
|
||||
|
||||
# Add custom static Java libraries to be installed
|
||||
if ! [ -z "$CUSTOM_STATIC_JAVA_LIBRARY" ]; then
|
||||
echo ">> [$(date)] Adding custom static Java libraries ($CUSTOM_STATIC_JAVA_LIBRARY)" >> $DOCKER_LOG
|
||||
echo "LOCAL_STATIC_JAVA_LIBRARIES += $CUSTOM_STATIC_JAVA_LIBRARY" >> vendor/cm/config/common.mk
|
||||
fi
|
||||
|
||||
# Add keys
|
||||
if ! [ -z "$RELEASEKEY_PATH" ]; then
|
||||
echo ">> [$(date)] Adding keys path ($SRC_DIR/$RELEASEKEY_PATH)" >> $DOCKER_LOG
|
||||
echo "PRODUCT_DEFAULT_DEV_CERTIFICATE := $SRC_DIR/$RELEASEKEY_PATH" >> vendor/cm/config/common.mk
|
||||
fi
|
||||
|
||||
# Cycle DEVICE_LIST environment variable, to know which one may be executed next
|
||||
IFS=','
|
||||
for codename in $DEVICE_LIST; do
|
||||
|
|
|
@ -12,7 +12,7 @@ fi
|
|||
|
||||
# Initialize CCache if it will be used
|
||||
if [ "$USE_CCACHE" = 1 ]; then
|
||||
ccache -M 50G 2>&1 >&$DEBUG_LOG
|
||||
ccache -M 100G 2>&1 >&$DEBUG_LOG
|
||||
fi
|
||||
|
||||
# Initialize Git user information
|
||||
|
|
Loading…
Reference in New Issue