On 06/22/2015 10:59 AM, Alexander Larsson wrote:
On mån, 2015-06-22 at 06:16 -0400, Jan Kurik wrote:
> = Proposed System Wide Change: Glibc locale subpackaging =
> Change owner(s):
> * Mike Fabian <mfabian At redhat DOT com>
> * Siddhesh Poyarekar <spoyarek AT redhat DOT com>
> * Carlos O’Donell <codonell AT redhat DOT com>
> This change should make it possible to install or uninstall locales
> == Detailed Description ==
> Currently the file /usr/lib/locale/locale-archive contains all
> locales and is thus huge (103MB).
> For small systems (and containers) it would be useful to be able to
> install only a small number of locales.
> Recently we made it possible to install a small number of locales by
> supplying the rpm-macro “_install_langs”, for example
> rpm -i -D _install_langs="en:de_DE" glibc-common.rpm
> will install all English locales and all German locales which start
> with “de_DE”,
> rpm -i -D _install_langs="en_US.utf8" glibc-common.rpm
> will install only the en_US.utf8 locale,
> rpm -i -D _install_langs="POSIX" glibc-common.rpm
> will install nothing (but the POSIX/C is still available because it
> is builtin into glibc).
> But this approach works only during an Anaconda based install when
> Anaconda supplies the _install_langs rpm-macro.
> When glibc is updated later, the _install_langs macro will not be
> supplied on the command line during the update and the default value
> “all” of “_install_langs” from /usr/lib/rpm/macros will be used and
> all locales come back during an update.
> Therefore, this solution is far from perfect.
> It should be made possible to install and uninstall locales
> individually, for example by having a separate package for the
> locales for each language. Installing such a package would add these
> locales to locale-archive, uninstalling it would remove them.
Do they really have to modify locale-archive? Can't each package
install separate archive files (say, based on the locale name).
Packaging optional extra files is a lot easier for me in my work with
an xdg-app runtime based on fedora.
For now we are modifying locale-archive, but we are aware the this causes
problems with container overlays, and are looking for a solution where
this works on a per-file basis with each new subpackage langauge contributing
a new loadable optimized binary locale file.
The stepping stone will likely be:
_install_langs (to limit languages)
-> subpackages that modify locale-archive
-> subpackages that install their own files
Please remember the core runtimes are key part of the OS, and we make
these transitions slowly and gather metrics about how effective each
step was and how many bugs we got, and if the intermediate changes
In the end we may just skip the intermediate step depending on testing,
but I won't guarantee that.