mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
use already local pacman chroot
This commit is contained in:
parent
2b690ad836
commit
173b771d6e
3 changed files with 6 additions and 9 deletions
|
@ -51,10 +51,6 @@ _pacman_chroot() {
|
||||||
echo "Verifying ${3}..."
|
echo "Verifying ${3}..."
|
||||||
gpg --verify "${3}.sig" &>"${_NO_LOG}" || exit 1
|
gpg --verify "${3}.sig" &>"${_NO_LOG}" || exit 1
|
||||||
bsdtar -C "${1}" -xf "${3}"
|
bsdtar -C "${1}" -xf "${3}"
|
||||||
if [[ -f "${3}" && -f "${3}".sig ]]; then
|
|
||||||
echo "Removing installation tarball ${3}..."
|
|
||||||
rm "${3}"{,.sig}
|
|
||||||
fi
|
|
||||||
echo "Updating container to latest packages..."
|
echo "Updating container to latest packages..."
|
||||||
${_NSPAWN} "${1}" pacman -Syu --noconfirm &>"${_NO_LOG}"
|
${_NSPAWN} "${1}" pacman -Syu --noconfirm &>"${_NO_LOG}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,11 +36,11 @@ else
|
||||||
if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then
|
if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then
|
||||||
if echo "${_BASENAME}" | rg -qw 'aarch64'; then
|
if echo "${_BASENAME}" | rg -qw 'aarch64'; then
|
||||||
_pacman_chroot "${1}" "${_ARCHBOOT_AARCH64_CHROOT_PUBLIC}" \
|
_pacman_chroot "${1}" "${_ARCHBOOT_AARCH64_CHROOT_PUBLIC}" \
|
||||||
"${_PACMAN_AARCH64_CHROOT}" || exit 1
|
"${_ISO_HOME}/${_PACMAN_AARCH64_CHROOT}" || exit 1
|
||||||
fi
|
fi
|
||||||
if echo "${_BASENAME}" | rg -qw 'riscv64'; then
|
if echo "${_BASENAME}" | rg -qw 'riscv64'; then
|
||||||
_pacman_chroot "${1}" "${_ARCHBOOT_RISCV64_CHROOT_PUBLIC}" \
|
_pacman_chroot "${1}" "${_ARCHBOOT_RISCV64_CHROOT_PUBLIC}" \
|
||||||
"${_PACMAN_RISCV64_CHROOT}" || exit 1
|
"${_ISO_HOME}/${_PACMAN_RISCV64_CHROOT}" || exit 1
|
||||||
fi
|
fi
|
||||||
_create_pacman_conf "${1}" "use_binfmt"
|
_create_pacman_conf "${1}" "use_binfmt"
|
||||||
_pacman_parameters "${1}" "use_binfmt"
|
_pacman_parameters "${1}" "use_binfmt"
|
||||||
|
|
|
@ -21,9 +21,10 @@ _update_pacman_chroot() {
|
||||||
cd "${_ISO_HOME}" || exit 1
|
cd "${_ISO_HOME}" || exit 1
|
||||||
[[ -d "${_ARCH_DIR}" ]] || mkdir "${_ARCH_DIR}"
|
[[ -d "${_ARCH_DIR}" ]] || mkdir "${_ARCH_DIR}"
|
||||||
echo "Downloading pacman ${_ARCH} chroot..."
|
echo "Downloading pacman ${_ARCH} chroot..."
|
||||||
[[ -f pacman-${_ARCH}-chroot-latest.tar.zst ]] && rm pacman-"${_ARCH}"-chroot-latest.tar.zst{,.sig} 2>"${_NO_LOG}"
|
if ! [[ -f pacman-${_ARCH}-chroot-latest.tar.zst ]]; then
|
||||||
${_DLPROG} -O "${_ARCH_CHROOT_PUBLIC}"/"${_PACMAN_CHROOT}"
|
${_DLPROG} -O "${_ARCH_CHROOT_PUBLIC}"/"${_PACMAN_CHROOT}"
|
||||||
${_DLPROG} -O "${_ARCH_CHROOT_PUBLIC}"/"${_PACMAN_CHROOT}".sig
|
${_DLPROG} -O "${_ARCH_CHROOT_PUBLIC}"/"${_PACMAN_CHROOT}".sig
|
||||||
|
fi
|
||||||
# verify download
|
# verify download
|
||||||
#shellcheck disable=SC2024
|
#shellcheck disable=SC2024
|
||||||
gpg --chuid "${_USER}" --verify "${_PACMAN_CHROOT}.sig" &>"${_NO_LOG}" || exit 1
|
gpg --chuid "${_USER}" --verify "${_PACMAN_CHROOT}.sig" &>"${_NO_LOG}" || exit 1
|
||||||
|
|
Loading…
Reference in a new issue