diff --git a/filesystem.spec b/filesystem.spec index 9090482..990ce3b 100644 --- a/filesystem.spec +++ b/filesystem.spec @@ -1,11 +1,13 @@ Summary: The basic directory layout for a Linux system. Name: filesystem -Version: 2.3.8 +Version: 2.4.0 Release: 1 License: Public Domain Group: System Environment/Base Buildroot: %{_tmppath}/%{name}-%{version}-root +Source1: lang-exceptions Prereq: setup >= 2.5.4-1 +BuildRequires: iso-codes %description The filesystem package is one of the basic packages that is installed @@ -14,6 +16,7 @@ layout for a Linux operating system, including the correct permissions for the directories. %prep +rm -f $RPM_BUILD_DIR/filelist %install rm -rf %{buildroot} @@ -31,10 +34,40 @@ mkdir -p mnt/{floppy,cdrom} \ ln -snf ../var/tmp usr/tmp ln -snf spool/mail var/mail +grep -v "^$" /usr/share/iso-codes/iso_639.tab | grep -v "^#" | while read a b c d ; do + [[ "$d" =~ "^Reserved" ]] && continue + [[ "$d" =~ "^No linguistic" ]] && continue + + locale=$c + if [ "$locale" = "XX" ]; then + locale=$b + fi + echo "%lang(${locale}) /usr/share/locale/${locale}" >> $RPM_BUILD_DIR/filelist +done +cat %{SOURCE1} | grep -v "^#" | grep -v "^$" | while read loc ; do + locale=$loc + locality= + [[ "$locale" =~ "@" ]] && locale=${locale%%@*} + [[ "$locale" =~ "_" ]] && locality=${locale##*_} + + # If the locality is not official, skip it + if [ -n "$locality" ]; then + grep -q "^$locality" /usr/share/iso-codes/iso_3166.tab || continue + fi + # If the locale is not official, skip it + egrep -q "[[:space:]]${locale%_*}[[:space:]]" /usr/share/iso-codes/iso_639.tab || continue + echo "%lang(${locale}) /usr/share/locale/${loc}" >> $RPM_BUILD_DIR/filelist +done + + +cat $RPM_BUILD_DIR/filelist | while read a b ; do + mkdir -p -m 755 %{buildroot}/$b/LC_MESSAGES +done + %clean rm -rf %{buildroot} -%files +%files -f filelist %defattr(0755,root,root) %dir / /bin @@ -68,6 +101,7 @@ rm -rf %{buildroot} /usr/share/games %attr(555,root,root) %dir /usr/share/empty /usr/share/info +%dir /usr/share/locale /usr/share/man /usr/share/misc /usr/share/pixmaps @@ -95,6 +129,9 @@ rm -rf %{buildroot} /var/yp %changelog +* Tue Oct 10 2006 Bill Nottingham - 2.4.0-1 +- create and own /usr/share/locale/*/LC_MESSAGES (#196669) + * Tue Oct 10 2006 Phil Knirsch - 2.3.8-1 - Added the manXx directories to the ownership of filesystem (#208121) diff --git a/lang-exceptions b/lang-exceptions new file mode 100644 index 0000000..e5faae9 --- /dev/null +++ b/lang-exceptions @@ -0,0 +1,78 @@ +# This file contains a list of locality-specifc locales for which we ship +# translations. +# +# The easiest way to generate this file is something along the lines of: +# +# repoquery -qal | awk -F '/' '/^\/usr\/share\/locale\/[a-z]*[_@]+/ { print $5 }' | sort -u +# +# and then sorting out the various invalid entires. (all_languages, locales +# with charset definitions (.UTF-8, etc.)) +af_ZA +am_ET +ast_ES +az_IR +bn_IN +ca_ES +ca_ES@valencian +cs_CZ +de_AT +de_CH +de_DE +el_GR +en_AU +en_CA +en_GB +en_US +es_AR +es_CL +es_CO +es_CR +es_DO +es_EC +es_ES +es_GT +es_HN +es_MX +es_NI +es_PA +es_PE +es_PR +es_SV +es_UY +es_VE +et_EE +eu_ES +fa_IR +fr_BE +fr_CA +fr_CH +fr_FR +he_IL +hr_HR +hu_HU +it_CH +it_IT +ja_JP +ko_KR +my_MM +nb_NO +nl_BE +nl_NL +pl_PL +pt_BR +pt_PT +ru_RU +sl_SI +sq_AL +sv_SE +uk_UA +zh_CN +zh_HK +zh_TW +ca_ES@valencian +en@boldquot +en@quot +nds@NFE +sr@ije +sr@Latn +uz@Latn