#298 Switch from glibc locale archive filtering to glibc-langpack-*
Closed: fixed 3 years ago by dustymabe. Opened 5 years ago by fweimer.

The kickstart files (e.g. https://pagure.io/fedora-kickstarts/blob/master/f/fedora-cloud-base.ks) still use the old glibc locale archive filtering approach:

# Package list.
# FIXME: instLangs does not work, so there's a hack below
# (see https://bugzilla.redhat.com/show_bug.cgi?id=1051816)
# FIXME: instLangs bug has been fixed but now having instLangs
# with an arg causes no langs to get installed because of BZ1262040
# which yields the errors in BZ1261249. For now fix by not using
# --instLangs at all
#%packages --instLangs=en
%packages

And:

# instlang hack. (Note! See bug referenced above package list)

find /usr/share/locale -mindepth  1 -maxdepth 1 -type d -not -name en_US -exec rm -rf {} +
localedef --list-archive | grep -v ^en_US | xargs localedef --delete-from-archive
# this will kill a live system (since it's memory mapped) but should be safe offline
mv -f /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl
build-locale-archive
echo '%_install_langs C:en:en_US:en_US.UTF-8' >> /etc/rpm/macros.image-language-conf

This mechanism is virtually unknown, poorly documented, and confuses users:

Please install glibc-langpack-en instead, and drop the RPM configuration variable.


hey @fweimer, thanks for opening the issue.

I think the original point was to remove any unneeded language support to try to get the size of the base image down. If you're telling me we can easily achieve this in a different and more supported way then I support it. Unfortunately right now in the cloud sig we are a bit swamped (at least I am). Any chance you could open the suggested change as a PR to the fedora-kickstarts master branch. I'd like to test out in rawhide and observe the difference in image size after we merge it there.

@dustymabe Sorry, I lack the domain-specific knowledge for implementing this change.

@dustymabe Sorry, I lack the domain-specific knowledge for implementing this change.

That's odd. Seems like you described exactly the change you wanted in the original description. Am I missing something?

I don't have a way to test this, and I don't know which documentation needs updating as a result of the change.

I don't have a way to test this, and I don't know which documentation needs updating as a result of the change.

If you open a PR to the fedora-kickstarts repo against the master branch we can test against rawhide (which will make it into f31). We don't have any docs that would need updating AFAIK.

Just for kicks here is a link to the last succesful rawhide composes cloud images: https://kojipkgs.fedoraproject.org/compose/rawhide/Fedora-Rawhide-20190409.n.0/compose/Cloud/x86_64/images/ . After your change merges we could make sure the before and after look as we expect.

I'm not sure if this is resolved but we recently overhauled our kickstart and now we just use %packages --instLangs=en as of this commit.

I'll close this. Please re-open if the above is not sufficient.

Metadata Update from @dustymabe:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

3 years ago

You really need both. You end up inconsistent if instLangs is used without placing the RPM macro on the installed system. (It's probably reasonable tip fixanaconda to do that for you.) To avoid installing the locale archive, add glibc-minimal-langpack

It might be easier to just change this to install glibc-minimal-langpack and glibc-langpack-en.

Login to comment on this ticket.

Metadata