From 7c254d7c6085dcb9f066418ada76d35aebdb6a4a Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Jul 07 2019 08:56:56 +0000 Subject: Setup the correct locale in the base image. Since the base image is now using the minimal glibc langpack we need to use the POSIX locale. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1727489 Signed-off-by: Clement Verna --- diff --git a/fedora-container-base.ks b/fedora-container-base.ks index 59a2eb4..96c3488 100644 --- a/fedora-container-base.ks +++ b/fedora-container-base.ks @@ -47,3 +47,15 @@ systemd-tmpfiles --prefix=/run/ --prefix=/var/run/ --create --boot || true rm /run/nologin # https://pagure.io/atomic-wg/issue/316 %end + +%post --nochroot --erroronfail --log=/mnt/sysimage/root/anaconda-post-nochroot.log +set -eux + +# See: https://bugzilla.redhat.com/show_bug.cgi?id=1051816 +# NOTE: run this in nochroot because "find" does not exist in chroot +KEEPLANG=en_US +for dir in locale i18n; do + find /mnt/sysimage/usr/share/${dir} -mindepth 1 -maxdepth 1 -type d -not \( -name "${KEEPLANG}" -o -name POSIX \) -exec rm -rfv {} + +done + +%end