[arch-general] Locale packages

Daan De Meyer daan.j.demeyer at gmail.com
Mon Jun 22 19:11:55 UTC 2020


Hi,

While working on locale-gen support for systemd-firstboot (
https://github.com/systemd/systemd/pull/15994), I started wondering if it
wouldn't be simpler to delegate the installation of locales to pacman
instead. I haven't been following the mailing lists for very long so I
don't know if this has ever been discussed. I'd imagine Arch could provide
a package for each locale supported by glibc and users would install the
ones they need.

The PKGBUILD would use localedef to generate separate folders of compiled
locale files for each locale that would be stored in /usr/lib/locale. This
approach is already implemented by distros such as Fedora (and co) and
Ubuntu.

The main advantage of this approach is that there's no need to set up an
entire chroot to run locale-gen when pacstrapping a new Arch system image.
This might seem easy but becomes trickier when the image uses a different
architecture than the host system since emulation of that architecture has
to be set up first. Even if locale-gen had a --root option so using the
host's locale-gen would be an option, I'm not sure if there's any guarantee
that compiled locale definitions generated by the host system's locale-gen
would work with the glibc version used by the image (less of a problem with
Arch but the glibc on the host could still potentially be out-of-date
compared to the one installed in the image). Being able to install locales
with pacman would solve all these problems.

Any interest in something like this from the Arch developers? I'd be
willing to try my hand at a PKGBUILD for this but I'm not a TU so I'd need
some support to get this implemented (if there is any interest at all).

(This also doesn't imply that locale-gen wouldn't work anymore, locale-gen
stores everything in /usr/lib/locale/locale-archive which would be
independent from the files installed by the locale packages, so both
approaches should work side-by-side)

Cheers,

Daan De Meyer


More information about the arch-general mailing list