1
0
Fork 0
mirror of https://github.com/lineageos4microg/docker-lineage-cicd synced 2024-05-23 04:46:07 +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:
Nicola Corna 2017-05-03 17:32:18 +02:00
parent 4c0f2f2629
commit fd59136e29
3 changed files with 43 additions and 4 deletions

View File

@ -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
############################
@ -159,4 +168,4 @@ RUN yes | pacman -Scc
# Set the entry point to init.sh
###########################################
ENTRYPOINT /root/init.sh
ENTRYPOINT /root/init.sh

View File

@ -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

View File

@ -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