This is a continuation from commit 9456429624, which tried to
ensure that all languages are present in the fedora-toolbox OCI image by
removing --inst-langs=en from fedora-container-toolbox.ks. Sadly, this
wasn't enough.
The image was still missing various localization bits like translations
for programs and manuals. All translations for all programs, such as
LC_MESSAGES and LC_TIME, were missing, except for those coming from
glibc-all-langpacks. eg., see:
$ LANG=cs_CZ.UTF-8 cp foo bar
cp: cannot stat 'foo': Adresář nebo soubor neexistuje
Only the part coming from glibc is translated. The part coming from
coreutils isn't. There are lots and lots of such packages. eg., bash,
coreutils, dnf, grep, rpm, sed, tar, etc..
Any package with translated manuals marked with %lang() in their %files
section were missing them. eg., man-db, passwd, psmisc, etc..
Finally, even though the %pre section in fedora-container-toolbox.ks
removes %_install_langs from /etc/rpm/macros.image-language-conf, it was
still set to en_US in the final image.
This was happening because fedora-container-toolbox.ks includes
fedora-container-common.ks, and some unintended bits from the latter
were leaking into the fedora-toolbox OCI image's build.
The image was still being built with '%packages --inst-langs=en',
possibly since fedora-container-common.ks has '%package --instLangs=en'.
That option wasn't just being applied to the packages being installed by
fedora-container-common.ks, but also to those being installed by
fedora-container-toolbox.ks [1].
Secondly, fedora-container-common.ks sets %_install_langs to en_US in
its %post section. This will strip out all non-English languages from
future RPM transactions in containers created from the image.
To address this, fedora-container-toolbox.ks has now been decoupled from
fedora-container-common.ks, by copying over the relevant bits.
[1] https://koji.fedoraproject.org/koji/buildinfo?buildID=2311452https://kojipkgs.fedoraproject.org//packages/Fedora-Container-Toolbox/Rawhide/20231025.n.0/images/fedora-container-toolbox.kshttps://kojipkgs.fedoraproject.org//packages/Fedora-Container-Toolbox/Rawhide/20231025.n.0/images/koji-f40-build-108073454-base.kshttps://kojipkgs.fedoraproject.org//packages/Fedora-Container-Toolbox/Rawhide/20231025.n.0/data/logs/image/oz-aarch64.loghttps://bugzilla.redhat.com/show_bug.cgi?id=2244503https://pagure.io/fedora-kickstarts/pull-request/1004
The Container/Dockerfile equivalent of the fedora-toolbox OCI images
installed all languages by removing %_install_langs (set to en_US by the
fedora base image) from /etc/rpm/macros.image-language-conf [1]. The
Kickstart does the same in the %pre section.
Therefore, it's self-contradictory to have '%packages --inst-langs=en'.
The fedora-toolbox OCI image is meant for interactive command line
environments, not for deploying server applications. Therefore, they
need a fully featured CLI user experience at par with what's offered on
Fedora Silverblue and Workstation. Among the Kickstart files defined
here, other than fedora-container-toolbox.ks, only these ones don't
install all languages:
* fedora-cloud-base.ks
* fedora-container-base-minimal.ks
* fedora-container-base.ks
* fedora-container-common.ks
* fedora-eln-container-base.ks
* fedora-server-vm-full.ks
All the other Kickstarts, and definitely those for Fedora Workstation,
install all languages.
[1] https://src.fedoraproject.org/container/fedora-toolboxhttps://github.com/containers/toolbox/tree/main/images/fedorahttps://bugzilla.redhat.com/show_bug.cgi?id=2244503https://pagure.io/fedora-kickstarts/pull-request/998
The Container/Dockerfile equivalent of the fedora-toolbox OCI images
didn't exclude weak dependencies [1] so the Kickstart shouldn't either.
The fedora-toolbox OCI image is meant for interactive command line
environments, not for deploying server applications. Therefore, they
need a fully featured CLI user experience at par with what's offered on
Fedora Silverblue and Workstation. Among the Kickstart files defined
here, other than fedora-container-toolbox.ks, only these ones exclude
weak dependencies:
* fedora-container-base-minimal.ks
* fedora-container-base.ks
* fedora-container-common.ks
* fedora-eln-container-base.ks
* fedora-modular-disk-minimal.ks
None of the other Kickstarts, and definitely not those for Fedora
Workstation, exclude weak dependencies.
[1] https://src.fedoraproject.org/container/fedora-toolboxhttps://github.com/containers/toolbox/tree/main/images/fedorahttps://bugzilla.redhat.com/show_bug.cgi?id=2244503https://pagure.io/fedora-kickstarts/pull-request/996
standard pulls in sssd
core pulls in sssd-common
both of those pull in sssd-client, which is excluded in container-common
(to minimize size/deps).
If we need these, we can look at another solution.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>