adapt recent glibc changes with included C.UTF-8

This commit is contained in:
Tobias Powalowski 2022-06-09 21:13:52 +02:00
parent 7af0c9b206
commit b33c84eaa3
7 changed files with 5 additions and 32 deletions

View file

@ -18,7 +18,6 @@ if [[ "${_RUNNING_ARCH}" == "aarch64" ]]; then
_install_archboot "${1}" || exit 1
_clean_cache "${1}"
_umount_special "${1}" || exit 1
_generate_locales "${1}"
_fix_groups "${1}"
_clean_container "${1}"
_clean_archboot_cache
@ -33,7 +32,6 @@ if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then
_fix_groups "${1}"
_clean_mkinitcpio "${1}"
_clean_cache "${1}"
_generate_locales "${1}"
_clean_container "${1}" 2>/dev/null
fi
_change_pacman_conf "${1}" || exit 1

View file

@ -30,15 +30,12 @@ echo "Downloading archlinuxarm aarch64 ..."
bsdtar -xf ArchLinuxARM-aarch64-latest.tar.gz -C "${1}"
echo "Removing installation tarball ..."
rm ArchLinuxARM-aarch64-latest.tar.gz
_generate_locales "${1}"
_generate_keyring "${1}" || exit 1
_fix_aarch64_network "${1}"
# update container to latest packages
echo "Installing pacman to container ..."
mkdir -p "${1}/${_PACMAN_AARCH64}/var/lib/pacman"
# gzip and sed for locale-gen
systemd-nspawn -D "${1}" pacman --root "/${_PACMAN_AARCH64}" -Sy awk sed gzip pacman --ignore systemd-resolvconf --noconfirm >/dev/null 2>&1
_generate_locales "${1}/${_PACMAN_AARCH64}"
systemd-nspawn -D "${1}" pacman --root "/${_PACMAN_AARCH64}" -Sy awk pacman --ignore systemd-resolvconf --noconfirm >/dev/null 2>&1
_generate_keyring "${1}/${_PACMAN_AARCH64}" || exit 1
_fix_aarch64_network "${1}/${_PACMAN_AARCH64}"
_CLEANUP_CONTAINER="1" _clean_container "${1}/${_PACMAN_AARCH64}" 2>/dev/null

View file

@ -45,15 +45,6 @@ _buildserver_check() {
fi
}
# generate locales
_generate_locales() {
if [[ -d ${1}/usr/share/i18n ]]; then
echo "Generate locales in container ..."
sed -i -e 's:#C.UTF-8 UTF-8:C.UTF-8 UTF-8:g' "${1}/etc/locale.gen"
systemd-nspawn -q -D "${1}" locale-gen >/dev/null 2>&1 || exit 1
fi
}
_generate_keyring() {
# use fresh one on normal systems
# copy existing gpg cache on archboot usage

View file

@ -158,14 +158,3 @@ auto_packages() {
PACKAGES="${PACKAGES//\ filesystem\ / }"
PACKAGES="filesystem ${PACKAGES}"
}
# /etc/locale.gen
# enable at least C.UTF-8 if nothing was changed, else weird things happen on reboot!
locale_gen() {
! grep -q "^[a-z]" "${DESTDIR}/etc/locale.gen" && sed -i -e 's:^#C.UTF-8:C.UTF-8:g' "${DESTDIR}/etc/locale.gen"
if [[ "${DESTDIR}" == "/install" ]]; then
systemd-nspawn -q -D "${DESTDIR}" locale-gen >/dev/null 2>&1
else
locale-gen >/dev/null 2>&1
fi
}

View file

@ -19,7 +19,6 @@ _update_aarch64_pacman_chroot() {
# update container to latest packages
echo "Update container to latest packages..."
systemd-nspawn -D "${_PACMAN_AARCH64}" pacman -Syu --noconfirm >/dev/null 2>&1 || exit 1
_generate_locales "${_PACMAN_AARCH64}"
_fix_aarch64_network "${_PACMAN_AARCH64}"
_CLEANUP_CONTAINER="1" _clean_container "${_PACMAN_AARCH64}" >/dev/null 2>&1
_CLEANUP_CACHE="1" _clean_cache "${_PACMAN_AARCH64}" >/dev/null 2>&1

View file

@ -348,9 +348,6 @@ _prepare_graphic() {
fi
echo "Removing not used icons ..."
rm -rf /usr/share/icons/breeze-dark
echo "Recreating C.UTF-8 locale ..."
sed -i -e 's:#C.UTF-8 UTF-8:C.UTF-8 UTF-8:g' "/etc/locale.gen"
locale-gen >/dev/null 2>&1
echo "Cleanup locale and i18n ..."
rm -rf /usr/share/{locale,i18n}
# needed for environments which check disk space

View file

@ -31,8 +31,10 @@ build ()
### add zsh
map add_full_dir "/etc/zsh" "/usr/share/zsh" "/usr/lib/zsh"
### add en_US.utf8 locale
add_file "/usr/lib/locale/locale-archive"
### add C.UTF-8 locale
add_full_dir /usr/lib/locale/C.UTF-8
### add custom locale
[[ -e "/usr/lib/locale/locale-archive" ]] && add_file "/usr/lib/locale/locale-archive"
### fix file
add_file "/usr/share/file/misc/magic.mgc"