add -alf parameter to aarch64 container script

This commit is contained in:
Tobias Powalowski 2022-01-08 09:23:06 +01:00
parent 522d410428
commit e4f7f54651
3 changed files with 12 additions and 7 deletions

View file

@ -18,6 +18,7 @@ usage () {
echo " Options:"
echo " -cc Cleanup container eg. remove manpages, includes ..."
echo " -cp Cleanup container package cache"
echo " -alf add archboot-linux-firmware to container"
exit 0
}
@ -29,6 +30,7 @@ while [ $# -gt 0 ]; do
case ${1} in
-cc|--cc) _SAVE_RAM="1" ;;
-cp|--cp) _CLEANUP_CACHE="1" ;;
-alf|-alf) _LINUX_FIRMWARE="archboot-linux-firmware" ;;
esac
shift
done
@ -69,11 +71,13 @@ systemd-nspawn -D "${_DIR}" pacman -Syu --noconfirm >/dev/null 2>&1
# remove linux hook to speedup
echo "Remove 60-linux-aarch64.hook from container..."
rm "${_DIR}/usr/share/libalpm/hooks/60-linux-aarch64.hook"
echo "Download archboot-linux-firmware to container..."
wget -P "${_DIR}/" "${AARCH64_ARCHBOOT_FIRMWARE}" >/dev/null 2>&1
# install archboot-arm
echo "Installing archboot-linux-firmware to container..."
systemd-nspawn -D "${_DIR}" /bin/bash -c "yes | pacman -U /archboot-linux-firmware-latest.tar.zst" >/dev/null 2>&1
if [[ "${_LINUX_FIRMWARE}" == "archboot-linux-firmware" ]]; then
echo "Download archboot-linux-firmware to container..."
wget -P "${_DIR}/" "${AARCH64_ARCHBOOT_FIRMWARE}" >/dev/null 2>&1
# install archboot-arm
echo "Installing archboot-linux-firmware to container..."
systemd-nspawn -D "${_DIR}" /bin/bash -c "yes | pacman -U /archboot-linux-firmware-latest.tar.zst" >/dev/null 2>&1
fi
echo "Installing archboot-arm container..."
systemd-nspawn -D "${_DIR}" /bin/bash -c "yes | pacman -S archboot-arm" >/dev/null 2>&1
echo "Setting hostname to archboot ..."

View file

@ -25,7 +25,7 @@ echo "Start release creation in $1 ..."
mkdir -p $1
cd $1
# create container
archboot-aarch64-create-container.sh "${W_DIR}" -cc -cp
archboot-aarch64-create-container.sh "${W_DIR}" -cc -cp -alf
# generate tarball in container, umount tmp it's a tmpfs and weird things could happen then
echo "Generate ISO ..."
systemd-nspawn -q -D "${W_DIR}" /bin/bash -c "umount /tmp;archboot-aarch64-iso.sh -t -i=archrelease"

View file

@ -29,8 +29,9 @@ archboot-"${ARCH}"-release.sh "${DIRECTORY}"
chown -R "${USER}" "${DIRECTORY}"
chgrp -R "${GROUP}" "${DIRECTORY}"
cd "${DIRECTORY}"
# remove sha256sum
# remove sha256sum and install image
rm sha256sum.txt
rm ArchLinuxARM-aarch64-latest.tar.gz
# sign files and create new sha256sum.txt
for i in *; do
[[ -f "${i}" ]] && sudo -u "${USER}" gpg ${GPG} "${i}"