| |
@@ -8,9 +8,52 @@
|
| |
# 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' {} \;
|
| |
|
| |
+ # The loops below are too spammy otherwise...
|
| |
+ set +x
|
| |
+
|
| |
# 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
|
| |
+ # and: https://bugzilla.redhat.com/show_bug.cgi?id=1186757
|
| |
+ KEEPLANGS="
|
| |
+ pt_BR
|
| |
+ fr_FR
|
| |
+ de_DE
|
| |
+ it_IT
|
| |
+ ru_RU
|
| |
+ es_ES
|
| |
+ en_US
|
| |
+ zh_CN
|
| |
+ ja_JP
|
| |
+ ko_KR
|
| |
+ zh_TW
|
| |
+ as_IN
|
| |
+ bn_IN
|
| |
+ gu_IN
|
| |
+ hi_IN
|
| |
+ kn_IN
|
| |
+ ml_IN
|
| |
+ mr_IN
|
| |
+ or_IN
|
| |
+ pa_IN
|
| |
+ ta_IN
|
| |
+ te_IN
|
| |
+ "
|
| |
+
|
| |
+ find /usr/share/locale -mindepth 1 -maxdepth 1 -type d | while read locale; do
|
| |
+ locale=$(basename $locale)
|
| |
+ if ! grep -q "^$locale\$" <<< "$KEEPLANGS"; then
|
| |
+ rm -rf "/usr/share/locale/$locale"
|
| |
+ fi
|
| |
+ done
|
| |
+
|
| |
+ localedef --list-archive | while read locale; do
|
| |
+ lang=${locale%%.*}
|
| |
+ lang=${lang%%@*}
|
| |
+ if [[ $locale != *.utf8 ]] || ! grep -q "$lang" <<< "$KEEPLANGS"; then
|
| |
+ localedef --delete-from-archive "$locale"
|
| |
+ fi
|
| |
+ done
|
| |
+
|
| |
+ set -x
|
| |
+
|
| |
cp -f /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl
|
| |
build-locale-archive
|
| |
Is there a literal *.utf8 locale? Did you mean something like
lang=${locale%%.}
charset=${locale%%@}
if test ${charset} != utf8; then
continue
fi
...
?