diff --git a/usr/bin/archboot-aarch64-server-release.sh b/usr/bin/archboot-aarch64-server-release.sh index e00e776ad..ca601774e 100755 --- a/usr/bin/archboot-aarch64-server-release.sh +++ b/usr/bin/archboot-aarch64-server-release.sh @@ -5,4 +5,5 @@ source /usr/lib/archboot/server_functions _root_check _buildserver_check _update_aarch64_pacman_chroot || exit 1 +_update_source _server_release || exit 1 diff --git a/usr/bin/archboot-x86_64-server-release.sh b/usr/bin/archboot-x86_64-server-release.sh index ff70bcdd1..43e2b87c7 100755 --- a/usr/bin/archboot-x86_64-server-release.sh +++ b/usr/bin/archboot-x86_64-server-release.sh @@ -5,5 +5,6 @@ source /usr/lib/archboot/server_functions _root_check _buildserver_check _x86_64_pacman_use_default || exit 1 +_update_source _server_release || exit 1 _x86_64_pacman_restore || exit 1 diff --git a/usr/lib/archboot/container_functions b/usr/lib/archboot/container_functions index d31bf335b..74faab68b 100644 --- a/usr/lib/archboot/container_functions +++ b/usr/lib/archboot/container_functions @@ -156,7 +156,7 @@ _aarch64_install_archboot() { _download_packages() { echo "Downloading packages base linux ${_LINUX_FIRMWARE} and ${_ARCHBOOT} to ${1} ..." - CacheDir="" pacman --root "${1}" -Syw base linux "${_LINUX_FIRMWARE}" "${_ARCHBOOT}" --ignore systemd-resolvconf --noconfirm --cachedir "${_PWD}"/"${_CACHEDIR}" >/dev/null 2>&1 + pacman --root "${1}" -Syw base linux "${_LINUX_FIRMWARE}" "${_ARCHBOOT}" --ignore systemd-resolvconf --noconfirm --cachedir "${_CACHEDIR}" >/dev/null 2>&1 } _aarch64_download_packages() { diff --git a/usr/lib/archboot/server_functions b/usr/lib/archboot/server_functions index 50539588d..46c5e1b31 100644 --- a/usr/lib/archboot/server_functions +++ b/usr/lib/archboot/server_functions @@ -2,7 +2,8 @@ # created by Tobias Powalowski _DIRECTORY="$(date +%Y.%m)" _ISOHOME="/home/tobias/Arch/iso/${_ARCH}" -_BUILDDIR="$(mktemp -d ${_ISOHOME}/server-release.XXX)" +_SOURCEHOME="/home/tobias/Arch/iso/${_ARCH}/sources/${_DIRECTORY}" +_BUILDDIR="$(mktemp -d "${_ISOHOME}"/server-release.XXX)" _SERVER="pkgbuild.com" _SERVER_HOME="/home/tpowa/" _SERVER_DIR="/home/tpowa/public_html/archboot-images" @@ -14,7 +15,7 @@ _PACMAN_AARCH_SERVERDIR="/home/tpowa/public_html/archboot-helper/pacman-chroot-a _PACMAN_AARCH64="pacman-aarch64-chroot" _PACMAN_AARCH64_CHROOT_SERVER="https://pkgbuild.com/~tpowa/archboot-helper/pacman-chroot-aarch64" _PACMAN_AARCH64_CHROOT="pacman-aarch64-chroot-latest.tar.zst" -_ARCHBOOT_SOURCE="https://pkgbuild.com/~tpowa/archboot-sources/${_ARCH}/${_DIRECTORY}" +_ARCHBOOT_SOURCE="https://pkgbuild.com/~tpowa/archboot-sources" _update_aarch64_pacman_chroot() { # update aarch64 pacman chroot @@ -53,6 +54,20 @@ _update_aarch64_pacman_chroot() { sudo -u "${_USER}" scp ${_PACMAN_AARCH64_CHROOT}{,.sig} ${_SERVER}:${_PACMAN_AARCH_SERVERDIR} || exit 1 } +_update_source() { + [[ -d "${_SOURCEHOME}" ]] || mkdir -p "${_SOURCEHOME}" + "archboot-${_ARCH}-create-repository.sh" "${_SOURCEHOME}" || exit 1 + sudo -u "${_USER}" scp -r "${_SOURCEHOME}" "${_SERVER}":"${_SERVER_HOME}" || exit 1 + sudo -u "${_USER}" ssh "${_SERVER}" <