https://bugzilla.redhat.com/show_bug.cgi?id=2068556
Bug ID: 2068556 Summary: Allow installing envsubst binary without unnecessary dependencies Product: Fedora Version: rawhide Status: NEW Component: gettext Assignee: suanand@redhat.com Reporter: hhorak@redhat.com QA Contact: extras-qa@fedoraproject.org CC: dueno@redhat.com, i18n-bugs@lists.fedoraproject.org, jjanco@redhat.com, nphilipp@redhat.com, petersen@redhat.com, praiskup@redhat.com, suanand@redhat.com Target Milestone: --- Classification: Fedora
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.
https://bugzilla.redhat.com/show_bug.cgi?id=2068556
--- Comment #1 from Honza Horak hhorak@redhat.com --- 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
https://bugzilla.redhat.com/show_bug.cgi?id=2068556
Red Hat One Jira (issues.redhat.com) redhat-one-jira@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Link ID| |Red Hat Issue Tracker | |FC-409
https://bugzilla.redhat.com/show_bug.cgi?id=2068556
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
https://bugzilla.redhat.com/show_bug.cgi?id=2068556
--- Comment #2 from Sundeep Anand suanand@redhat.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=2068556
Sundeep Anand suanand@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(hhorak@redhat.com | |)
--- Comment #3 from Sundeep Anand suanand@redhat.com --- How do you feel Honza?
https://bugzilla.redhat.com/show_bug.cgi?id=2068556
Honza Horak hhorak@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(hhorak@redhat.com | |) |
--- Comment #4 from Honza Horak hhorak@redhat.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=2068556
--- Comment #5 from Sundeep Anand suanand@redhat.com --- gettext split PR: https://src.fedoraproject.org/rpms/gettext/pull-request/15 scratch build repo: https://fedora.softwarefactory-project.io/logs/15/15/8e84a29c75f635efaa363ab... 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
https://bugzilla.redhat.com/show_bug.cgi?id=2068556
--- Comment #6 from Jens Petersen petersen@redhat.com --- 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. :)
https://bugzilla.redhat.com/show_bug.cgi?id=2068556
Sundeep Anand suanand@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |MODIFIED
--- Comment #8 from Sundeep Anand suanand@redhat.com --- 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
https://bugzilla.redhat.com/show_bug.cgi?id=2068556
--- Comment #9 from Honza Horak hhorak@redhat.com --- Thanks a lot, this change looks good, nothing else is installed when pulling in gettext-envsubst. I'm closing the original PR.
https://bugzilla.redhat.com/show_bug.cgi?id=2068556
--- Comment #10 from Fedora Update System updates@fedoraproject.org --- FEDORA-2022-a8cde2a93d has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-a8cde2a93d
https://bugzilla.redhat.com/show_bug.cgi?id=2068556
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |ON_QA
--- Comment #11 from Fedora Update System updates@fedoraproject.org --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=2068556
Sundeep Anand suanand@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ON_QA |CLOSED Resolution|--- |RAWHIDE Last Closed| |2022-09-27 06:09:49
i18n-bugs@lists.fedoraproject.org