Description of problem: TL;DR: this is a request to allow install envsubst binary without other unnecessary stuff from the gettext package. Background: The tool envsubst seems to be quite handy when working with configuration files in environments with a minimal footprint, like container images. Containers are typically configured via environment variables, which are then put into files. We therefore often use envsubst to evaluate some variables in the config files. However, when installing entire gettext for having envsubst binary available, it pulls in additional 7MB. This is similar to what is being done when building small containers (installing into a directory): $> mkdir rootfs-with-gettext rootfs-without-gettext $> PACKAGES="bash" $> dnf -y --releasever 35 --setopt install_weak_deps=false --nodocs --installroot $(pwd)/rootfs-without-gettext --disablerepo='*' --enablerepo=fedora install $PACKAGES $> PACKAGES="bash gettext" $> dnf -y --releasever 35 --setopt install_weak_deps=false --nodocs --installroot $(pwd)/rootfs-with-gettext --disablerepo='*' --enablerepo=fedora install $PACKAGES $> rm -rf rootfs-without-gettext/var/cache/dnf/* $> rm -rf rootfs-with-gettext/var/cache/dnf/* $> du -d 0 -h rootfs-without-gettext 25M rootfs-without-gettext $> du -d 0 -h rootfs-with-gettext 38M rootfs-with-gettext Re-implementing the envsubst does not seem to be necessary, as it might likely work without additional stuff from the gettext package.
There is a PoC that worked for me, althoug might need some changes (I didn't put much thinking into which files the envsubst binary actually really needs from the gettext package): https://src.fedoraproject.org/rpms/gettext/pull-request/14
Another way looking at it could be separating out tools from the gettext main package, which is rather a larger chunk. We had some ideas around https://src.fedoraproject.org/rpms/gettext/pull-request/7 This will reduce the footprint, and envsubst may continue a part of gettext main package.
How do you feel Honza?
I like the idea of splitting the tools. Still, when trying this change, I still see the size difference being 8MB (uncompressed installed files). So, it's quite far from the option of having just envsubst without anything else.
gettext split PR: https://src.fedoraproject.org/rpms/gettext/pull-request/15 scratch build repo: https://fedora.softwarefactory-project.io/logs/15/15/8e84a29c75f635efaa363ab14bebabf7e0fc30f2/check/rpm-scratch-build/734ab04/repo/ After the split, envsubst binary would be a part of gettext (main) package. I take a re-look and find following: gettext package -------------------- compressed size: 172 kB uncompressed size: 749.6 kB gettext-tools subpackage ------------------------ compressed size: 1.0 MB uncompressed size: 4.7 MB As gettext depends on gettext-libs: gettext-libs subpackage ----------------------- compressed size: 322K uncompressed size: 933.7 kB so, total uncompressed size for envsubst would be 1413.3 kB
Considering that envsubst doesn't depend on gettext-libs, maybe it does make sense to subpackage separately (so then gettext-runtime would requires it). (Admittedly I have never actually used envsubst myself. :)
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle. Changing version to 37.
Changes have been merged and built in rawhide: gettext-0.21-18.fc38.0.20220203 PR https://src.fedoraproject.org/rpms/gettext/pull-request/19 Copr https://copr.fedorainfracloud.org/coprs/suanand/envsubst/ Koji https://koji.fedoraproject.org/koji/taskinfo?taskID=90907290
Thanks a lot, this change looks good, nothing else is installed when pulling in gettext-envsubst. I'm closing the original PR.
FEDORA-2022-a8cde2a93d has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-a8cde2a93d
FEDORA-2022-a8cde2a93d has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-a8cde2a93d` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-a8cde2a93d See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.