From 5a5edddc9a6b943e6fe902defad177009c43867a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Dec 13 2016 17:39:13 +0000 Subject: treecompose-post.sh: keep all supported LANGs In https://bugzilla.redhat.com/show_bug.cgi?id=1186757, it was acknowledged that a just middle between deleting all the locales and keeping them all was to only keep "supported" locales. There doesn't seem to be such a list for Fedora, though RHEL does have one. So for now, we piggyback on the RHEL definition as to what "supported" means. As of right now, this increases the on-disk size of an F25AH tree by ~50M. The compressed size should be notably smaller. Note this requires https://github.com/projectatomic/rpm-ostree/pull/525 Based originally on a patch from Jonathan Lebon --- diff --git a/fedora-atomic-docker-host.json b/fedora-atomic-docker-host.json index 5bc2692..e8dbb7d 100644 --- a/fedora-atomic-docker-host.json +++ b/fedora-atomic-docker-host.json @@ -12,7 +12,49 @@ "initramfs-args": ["--no-hostonly", "--add", "iscsi"], - "install-langs": ["en_US"], + "install-langs-comment": "Keep this in sync with treecompose-post.sh", + "install-langs": [ + "pt_BR", + "fr", + "fr_FR", + "de", + "de_DE", + "it", + "it_IT", + "ru", + "ru_RU", + "es", + "es_ES", + "en_US", + "zh_CN", + "ja", + "ja_JP", + "ko", + "ko_KR", + "zh_TW", + "as", + "as_IN", + "bn", + "bn_IN", + "gu", + "gu_IN", + "hi", + "hi_IN", + "kn", + "kn_IN", + "ml", + "ml_IN", + "mr", + "mr_IN", + "or", + "or_IN", + "pa", + "pa_IN", + "ta", + "ta_IN", + "te", + "te_IN" + ], "postprocess-script": "treecompose-post.sh", diff --git a/treecompose-post.sh b/treecompose-post.sh index b1221c2..5bb7034 100755 --- a/treecompose-post.sh +++ b/treecompose-post.sh @@ -7,10 +7,3 @@ echo 'Storage=persistent' >> /etc/systemd/journald.conf # Work around https://github.com/systemd/systemd/issues/4082 find /usr/lib/systemd/system/ -type f -exec sed -i -e '/^PrivateTmp=/d' -e '/^Protect\(Home\|System\)=/d' {} \; - -# See: https://bugzilla.redhat.com/show_bug.cgi?id=1051816 -KEEPLANG=en_US -find /usr/share/locale -mindepth 1 -maxdepth 1 -type d -not -name "${KEEPLANG}" -exec rm -rf {} + -localedef --list-archive | grep -a -v ^"${KEEPLANG}" | xargs localedef --delete-from-archive -cp -f /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl -build-locale-archive