Skip to content
Snippets Groups Projects
Commit 7b5c3f32 authored by Tobias Powalowski's avatar Tobias Powalowski :sunglasses:
Browse files

set german mirror on aarch64 to avoid CDN not synced errors, run depmod -a on...

set german mirror on aarch64 to avoid CDN not synced errors, run depmod -a on container creation to fix modules on aarch64
parent 3480f8d8
No related branches found
Tags 202409241120
No related merge requests found
......@@ -102,7 +102,14 @@ _prepare_pacman() {
_create_pacman_conf() {
if [[ -z "${_INSTALL_SOURCE}" ]]; then
echo "Using default pacman.conf..."
[[ "${2}" == "use_binfmt" ]] && _PACMAN_CONF="${1}${_PACMAN_CONF}"
if [[ "${2}" == "use_binfmt" ]]; then
_PACMAN_CONF="${1}${_PACMAN_CONF}"
# CDN on aarch64 is broken sometimes
sd '^Server = http://mirror.archlinuxarm.org/$arch/$repo' \
'# Server = http://mirror.archlinuxarm.org/$arch/$repo' ${1}/etc/pacman.d/mirrorlist
sd '# Server = http://de.mirror.archlinuxarm.org/$arch/$repo' \
'Server = http://de.mirror.archlinuxarm.org/$arch/$repo' ${1}/etc/pacman.d/mirrorlist
fi
if ! rg -qw "\[archboot\]" "${_PACMAN_CONF}"; then
echo "Adding Archboot repository to ${_PACMAN_CONF}..."
echo "[archboot]" >> "${_PACMAN_CONF}"
......@@ -247,4 +254,9 @@ _container_reproducibility() {
_set_hostname() {
echo "Setting hostname to archboot..."
echo 'archboot' > "${1}/etc/hostname"
_depmod() {
echo "Running depmod..."
${_NSPAWN} "${1}" depmod -a
}
}
......@@ -56,4 +56,5 @@ _change_pacman_conf "${1}" || exit 1
_container_reproducibility "${1}"
_set_hostname "${1}" || exit 1
_ssh_keys "${1}" || exit 1
_depmod "${1}" || exit 1
echo "Finished container setup in ${1}."
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment