mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-15 19:31:42 +00:00
Better logging for external userpatches path and generate a lot of empty folders only once (#1897)
* Better logging for external userpatches path. * Genrate a lot of empty folders only once * Better handling for COMPRESS_OUTPUTIMAGE
This commit is contained in:
parent
36e58385e7
commit
d07647e5ce
3 changed files with 17 additions and 12 deletions
|
@ -269,7 +269,7 @@ fi
|
|||
|
||||
# For user override
|
||||
if [[ -f $USERPATCHES_PATH/lib.config ]]; then
|
||||
display_alert "Using user configuration override" "userpatches/lib.config" "info"
|
||||
display_alert "Using user configuration override" "$USERPATCHES_PATH/lib.config" "info"
|
||||
source "$USERPATCHES_PATH"/lib.config
|
||||
fi
|
||||
|
||||
|
|
|
@ -540,7 +540,7 @@ prepare_partitions()
|
|||
# for cryptroot-unlock to work:
|
||||
# https://serverfault.com/questions/907254/cryproot-unlock-with-dropbear-timeout-while-waiting-for-askpass
|
||||
#
|
||||
# since Debian buster, it has to be called within create_image() on the $MOUNT
|
||||
# since Debian buster, it has to be called within create_image() on the $MOUNT
|
||||
# path instead of $SDCARD (which can be a tmpfs and breaks cryptsetup-initramfs).
|
||||
# see: https://github.com/armbian/build/issues/1584
|
||||
#
|
||||
|
@ -626,7 +626,9 @@ create_image()
|
|||
mv ${SDCARD}.raw $DESTIMG/${version}.img
|
||||
|
||||
if [[ $BUILD_ALL != yes ]]; then
|
||||
if [[ $COMPRESS_OUTPUTIMAGE == yes ]]; then
|
||||
if [[ $COMPRESS_OUTPUTIMAGE == "" || $COMPRESS_OUTPUTIMAGE == no ]]; then
|
||||
COMPRESS_OUTPUTIMAGE="sha,gpg,img"
|
||||
elif [[ $COMPRESS_OUTPUTIMAGE == yes ]]; then
|
||||
COMPRESS_OUTPUTIMAGE="sha,gpg,7z"
|
||||
fi
|
||||
|
||||
|
@ -663,13 +665,16 @@ create_image()
|
|||
f \( -name "${version}.img" -o -name "${version}.img.asc" -o -name "${version}.img.sha" \) -print0 \
|
||||
| xargs -0 rm >/dev/null 2>&1
|
||||
cd ..
|
||||
elif [[ $COMPRESS_OUTPUTIMAGE == *gz* ]]; then
|
||||
fi
|
||||
if [[ $COMPRESS_OUTPUTIMAGE == *gz* ]]; then
|
||||
display_alert "Compressing" "$DEST/images/${version}.img.gz" "info"
|
||||
pigz -3 < $DESTIMG/${version}.img > $DEST/images/${version}.img.gz
|
||||
elif [[ $COMPRESS_OUTPUTIMAGE == *xz* ]]; then
|
||||
fi
|
||||
if [[ $COMPRESS_OUTPUTIMAGE == *xz* ]]; then
|
||||
display_alert "Compressing" "$DEST/images/${version}.img.xz" "info"
|
||||
pixz -3 < $DESTIMG/${version}.img > $DEST/images/${version}.img.xz
|
||||
else
|
||||
fi
|
||||
if [[ $COMPRESS_OUTPUTIMAGE == *img* ]]; then
|
||||
[[ -f $DESTIMG/${version}.img.txt ]] && mv $DESTIMG/${version}.img.txt $DEST/images/${version}.img.txt
|
||||
mv $DESTIMG/${version}.img $DEST/images/${version}.img || exit 1
|
||||
fi
|
||||
|
|
|
@ -413,10 +413,10 @@ fingerprint_image()
|
|||
--------------------------------------------------------------------------------
|
||||
Verify GPG signature:
|
||||
gpg --verify $2.img.asc
|
||||
|
||||
|
||||
Verify image file integrity:
|
||||
sha256sum --check $2.img.sha
|
||||
|
||||
|
||||
Prepare SD card (four methodes):
|
||||
zcat $2.img.gz | pv | dd of=/dev/mmcblkX bs=1M
|
||||
dd if=$2.img of=/dev/mmcblkX bs=1M
|
||||
|
@ -676,7 +676,7 @@ repo-manipulate() {
|
|||
;;
|
||||
purgesource)
|
||||
for release in "${DISTROS[@]}"; do
|
||||
aptly repo remove -config=${SCRIPTPATH}config/${REPO_CONFIG} ${release} 'Name (% *-source*)'
|
||||
aptly repo remove -config=${SCRIPTPATH}config/${REPO_CONFIG} ${release} 'Name (% *-source*)'
|
||||
aptly -config="${SCRIPTPATH}"config/${REPO_CONFIG} -passphrase="${GPG_PASS}" publish update "${release}" > /dev/null 2>&1
|
||||
done
|
||||
aptly db cleanup -config=${SCRIPTPATH}config/${REPO_CONFIG} > /dev/null 2>&1
|
||||
|
@ -922,9 +922,6 @@ prepare_host()
|
|||
fi
|
||||
mkdir -p $DEST/debs-beta/extra $DEST/debs/extra $DEST/{config,debug,patch} $USERPATCHES_PATH/overlay $SRC/cache/{sources,toolchains,utility,rootfs} $SRC/.tmp
|
||||
|
||||
# create patches directory structure under USERPATCHES_PATH
|
||||
find $SRC/patch -maxdepth 2 -type d ! -name . | sed "s%/.*patch%/$USERPATCHES_PATH%" | xargs mkdir -p
|
||||
|
||||
display_alert "Checking for external GCC compilers" "" "info"
|
||||
# download external Linaro compiler and missing special dependencies since they are needed for certain sources
|
||||
|
||||
|
@ -973,6 +970,9 @@ prepare_host()
|
|||
rm -f $USERPATCHES_PATH/readme.txt
|
||||
echo 'Please read documentation about customizing build configuration' > $USERPATCHES_PATH/README
|
||||
echo 'http://www.armbian.com/using-armbian-tools/' >> $USERPATCHES_PATH/README
|
||||
|
||||
# create patches directory structure under USERPATCHES_PATH
|
||||
find $SRC/patch -maxdepth 2 -type d ! -name . | sed "s%/.*patch%/$USERPATCHES_PATH%" | xargs mkdir -p
|
||||
fi
|
||||
|
||||
# check free space (basic)
|
||||
|
|
Loading…
Add table
Reference in a new issue