From b33c84eaa3a75bd924e0b1a830271166ca0668a4 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Thu, 9 Jun 2022 21:13:52 +0200 Subject: [PATCH] adapt recent glibc changes with included C.UTF-8 --- usr/bin/archboot-aarch64-create-container.sh | 2 -- usr/bin/archboot-aarch64-pacman-chroot-tarball.sh | 5 +---- usr/lib/archboot/common.sh | 9 --------- usr/lib/archboot/installer/common.sh | 11 ----------- usr/lib/archboot/server.sh | 1 - usr/lib/archboot/update-installer.sh | 3 --- usr/lib/initcpio/install/archboot_base | 6 ++++-- 7 files changed, 5 insertions(+), 32 deletions(-) diff --git a/usr/bin/archboot-aarch64-create-container.sh b/usr/bin/archboot-aarch64-create-container.sh index fe63d0062..9b5286c3e 100755 --- a/usr/bin/archboot-aarch64-create-container.sh +++ b/usr/bin/archboot-aarch64-create-container.sh @@ -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 diff --git a/usr/bin/archboot-aarch64-pacman-chroot-tarball.sh b/usr/bin/archboot-aarch64-pacman-chroot-tarball.sh index ec4a60c09..fcc11dfc7 100755 --- a/usr/bin/archboot-aarch64-pacman-chroot-tarball.sh +++ b/usr/bin/archboot-aarch64-pacman-chroot-tarball.sh @@ -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 diff --git a/usr/lib/archboot/common.sh b/usr/lib/archboot/common.sh index b05081837..f4aaf90af 100644 --- a/usr/lib/archboot/common.sh +++ b/usr/lib/archboot/common.sh @@ -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 diff --git a/usr/lib/archboot/installer/common.sh b/usr/lib/archboot/installer/common.sh index ac7690725..0d0d59698 100644 --- a/usr/lib/archboot/installer/common.sh +++ b/usr/lib/archboot/installer/common.sh @@ -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 -} diff --git a/usr/lib/archboot/server.sh b/usr/lib/archboot/server.sh index b554c21af..c53db8e73 100644 --- a/usr/lib/archboot/server.sh +++ b/usr/lib/archboot/server.sh @@ -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 diff --git a/usr/lib/archboot/update-installer.sh b/usr/lib/archboot/update-installer.sh index a234cc21a..014eed9ca 100644 --- a/usr/lib/archboot/update-installer.sh +++ b/usr/lib/archboot/update-installer.sh @@ -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 diff --git a/usr/lib/initcpio/install/archboot_base b/usr/lib/initcpio/install/archboot_base index a7b7e1edc..383bbd91f 100644 --- a/usr/lib/initcpio/install/archboot_base +++ b/usr/lib/initcpio/install/archboot_base @@ -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"