From e4f7f546518b017e0226e59e2d777d0879566fd4 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Sat, 8 Jan 2022 09:23:06 +0100 Subject: [PATCH] add -alf parameter to aarch64 container script --- usr/bin/archboot-aarch64-create-container.sh | 14 +++++++++----- usr/bin/archboot-aarch64-release.sh | 2 +- usr/bin/archboot-aarch64-server-release.sh | 3 ++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/usr/bin/archboot-aarch64-create-container.sh b/usr/bin/archboot-aarch64-create-container.sh index 35120df0f..2ed562e5d 100755 --- a/usr/bin/archboot-aarch64-create-container.sh +++ b/usr/bin/archboot-aarch64-create-container.sh @@ -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 ..." diff --git a/usr/bin/archboot-aarch64-release.sh b/usr/bin/archboot-aarch64-release.sh index 7f99b5f57..11595d083 100755 --- a/usr/bin/archboot-aarch64-release.sh +++ b/usr/bin/archboot-aarch64-release.sh @@ -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" diff --git a/usr/bin/archboot-aarch64-server-release.sh b/usr/bin/archboot-aarch64-server-release.sh index c1ecfe7b9..974bec8d7 100755 --- a/usr/bin/archboot-aarch64-server-release.sh +++ b/usr/bin/archboot-aarch64-server-release.sh @@ -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}"