mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
rename chroot to container
This commit is contained in:
parent
e1fe150cd0
commit
b52324927d
7 changed files with 16 additions and 16 deletions
|
@ -46,10 +46,10 @@ _ISO_HOME_SOURCE="${_ISO_HOME}/${_ARCH}/sources"
|
||||||
_SERVER="archboot.com"
|
_SERVER="archboot.com"
|
||||||
_SERVER_IMAGE_DIR="/release"
|
_SERVER_IMAGE_DIR="/release"
|
||||||
_SERVER_SOURCE_DIR="/src/release"
|
_SERVER_SOURCE_DIR="/src/release"
|
||||||
_PACMAN_AARCH64="pacman-aarch64-chroot"
|
_PACMAN_AARCH64="pacman-aarch64-container"
|
||||||
_PACMAN_AARCH64_CHROOT="${_PACMAN_AARCH64}-latest.tar.zst"
|
_PACMAN_AARCH64_CHROOT="${_PACMAN_AARCH64}-latest.tar.zst"
|
||||||
_SERVER_PACMAN_AARCH64="/src/${_PACMAN_AARCH64}"
|
_SERVER_PACMAN_AARCH64="/src/${_PACMAN_AARCH64}"
|
||||||
_PACMAN_RISCV64="pacman-riscv64-chroot"
|
_PACMAN_RISCV64="pacman-riscv64-container"
|
||||||
_PACMAN_RISCV64_CHROOT="${_PACMAN_RISCV64}-latest.tar.zst"
|
_PACMAN_RISCV64_CHROOT="${_PACMAN_RISCV64}-latest.tar.zst"
|
||||||
_SERVER_PACMAN_RISCV64="/src/${_PACMAN_RISCV64}"
|
_SERVER_PACMAN_RISCV64="/src/${_PACMAN_RISCV64}"
|
||||||
# public download paths
|
# public download paths
|
||||||
|
|
|
@ -40,7 +40,7 @@ _clean_cache() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
_pacman_chroot() {
|
_pacman_container() {
|
||||||
if ! [[ -f ${3} && -f ${3}.sig ]]; then
|
if ! [[ -f ${3} && -f ${3}.sig ]]; then
|
||||||
echo "Downloading ${3}..."
|
echo "Downloading ${3}..."
|
||||||
${_DLPROG} -O "${2}"/"${3}"
|
${_DLPROG} -O "${2}"/"${3}"
|
||||||
|
|
|
@ -25,7 +25,7 @@ fi
|
||||||
_usage () {
|
_usage () {
|
||||||
echo "CREATE ${_CAP_ARCH} PACMAN CHROOT"
|
echo "CREATE ${_CAP_ARCH} PACMAN CHROOT"
|
||||||
echo "-----------------------------"
|
echo "-----------------------------"
|
||||||
echo "This will create the ${_ARCH} pacman chroot tarball."
|
echo "This will create the ${_ARCH} pacman container tarball."
|
||||||
echo "usage: ${_BASENAME} <build-directory>"
|
echo "usage: ${_BASENAME} <build-directory>"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,11 +35,11 @@ else
|
||||||
# running system != creating system
|
# running system != creating system
|
||||||
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_container "${1}" "${_ARCHBOOT_AARCH64_CHROOT_PUBLIC}" \
|
||||||
"${_ISO_HOME}/${_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_container "${1}" "${_ARCHBOOT_RISCV64_CHROOT_PUBLIC}" \
|
||||||
"${_ISO_HOME}/${_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"
|
||||||
|
|
|
@ -24,12 +24,12 @@ else
|
||||||
# running system != creating system
|
# running system != creating system
|
||||||
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 "${_REPODIR}" "${_ARCHBOOT_AARCH64_CHROOT_PUBLIC}" \
|
_pacman_container "${_REPODIR}" "${_ARCHBOOT_AARCH64_CHROOT_PUBLIC}" \
|
||||||
"${_ISO_HOME}/${_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 "${_REPODIR}" "${_ARCHBOOT_RISCV64_CHROOT_PUBLIC}" \
|
_pacman_container "${_REPODIR}" "${_ARCHBOOT_RISCV64_CHROOT_PUBLIC}" \
|
||||||
"${_ISO_HOME}/${_PACMAN_RISCV64_CHROOT}" || exit 1
|
"${_ISO_HOME}/${_PACMAN_RISCV64_CHROOT}" || exit 1
|
||||||
fi
|
fi
|
||||||
_create_pacman_conf "${_REPODIR}" "use_binfmt"
|
_create_pacman_conf "${_REPODIR}" "use_binfmt"
|
||||||
_pacman_parameters "${_REPODIR}" "use_binfmt"
|
_pacman_parameters "${_REPODIR}" "use_binfmt"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
_root_check
|
_root_check
|
||||||
_container_check
|
_container_check
|
||||||
if echo "${_BASENAME}" | rg -qw 'riscv64' || echo "${_BASENAME}" | rg -qw 'aarch64'; then
|
if echo "${_BASENAME}" | rg -qw 'riscv64' || echo "${_BASENAME}" | rg -qw 'aarch64'; then
|
||||||
_update_pacman_chroot || exit 1
|
_update_pacman_container || exit 1
|
||||||
fi
|
fi
|
||||||
_update_source
|
_update_source
|
||||||
if echo "${_BASENAME}" | rg -qw 'x86_64'; then
|
if echo "${_BASENAME}" | rg -qw 'x86_64'; then
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
. /usr/lib/archboot/container.sh
|
. /usr/lib/archboot/container.sh
|
||||||
_ISO_BUILD_DIR="$(mktemp -d "${_ISO_HOME_ARCH}"/server-release.XXX)"
|
_ISO_BUILD_DIR="$(mktemp -d "${_ISO_HOME_ARCH}"/server-release.XXX)"
|
||||||
|
|
||||||
_update_pacman_chroot() {
|
_update_pacman_container() {
|
||||||
if [[ "${_ARCH}" == "aarch64" ]]; then
|
if [[ "${_ARCH}" == "aarch64" ]]; then
|
||||||
_ARCH_DIR="${_PACMAN_AARCH64}"
|
_ARCH_DIR="${_PACMAN_AARCH64}"
|
||||||
_ARCH_CHROOT_PUBLIC="${_ARCHBOOT_AARCH64_CHROOT_PUBLIC}"
|
_ARCH_CHROOT_PUBLIC="${_ARCHBOOT_AARCH64_CHROOT_PUBLIC}"
|
||||||
|
@ -17,15 +17,15 @@ _update_pacman_chroot() {
|
||||||
_PACMAN_CHROOT="${_PACMAN_RISCV64_CHROOT}"
|
_PACMAN_CHROOT="${_PACMAN_RISCV64_CHROOT}"
|
||||||
_SERVER_PACMAN="${_SERVER_PACMAN_RISCV64}"
|
_SERVER_PACMAN="${_SERVER_PACMAN_RISCV64}"
|
||||||
fi
|
fi
|
||||||
# update pacman chroot
|
# update pacman container
|
||||||
cd "${_ISO_HOME}" || exit 1
|
cd "${_ISO_HOME}" || exit 1
|
||||||
[[ -d "${_ARCH_DIR}" ]] || mkdir "${_ARCH_DIR}"
|
[[ -d "${_ARCH_DIR}" ]] || mkdir "${_ARCH_DIR}"
|
||||||
if ! [[ -f pacman-${_ARCH}-chroot-latest.tar.zst ]]; then
|
if ! [[ -f pacman-${_ARCH}-container-latest.tar.zst ]]; then
|
||||||
echo "Downloading pacman ${_ARCH} chroot..."
|
echo "Downloading pacman ${_ARCH} container..."
|
||||||
${_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
|
||||||
else
|
else
|
||||||
echo "Using local pacman ${_ARCH} chroot..."
|
echo "Using local pacman ${_ARCH} container..."
|
||||||
fi
|
fi
|
||||||
# verify download
|
# verify download
|
||||||
#shellcheck disable=SC2024
|
#shellcheck disable=SC2024
|
||||||
|
|
Loading…
Reference in a new issue