Bug 1040428

Summary: Split binaries and libraries not requiring RPM DB out from the main rpm package
Product: [Fedora] Fedora Reporter: Vratislav Podzimek <vpodzime>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: ffesti, jzeleny, novyjindrich, packaging-team-maint, pknirsch, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-11 13:10:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Vratislav Podzimek 2013-12-11 12:22:46 UTC
Description of problem:
Binaries like rpm2cpio and probably some others that may be used to operate on standalone RPMs without the RPM DB should live in a separate subpackage that could be installed independently on the main rpm package. The same applies to libraries.

Version-Release number of selected component (if applicable):
rpm-4.11.1-7.fc20.x86_64

Actual results:
rpm2cpio cannot be installed without pulling in quite a big 'rpm' package that (correct me if I'm wrong) initializes the RPM DB as part of its installation process.

Expected results:
Possibility to install rpm2cpio + needed libraries without all the other things and RPM db being initialized.

Additional info:
e.g. lorax does this because it is not possible to install only libraries

removefrom rpm /usr/bin/* /usr/lib/rpm/platform/* /usr/share/locale/*

Comment 1 Panu Matilainen 2013-12-11 13:10:03 UTC
Erm... the act of installing ANY packages with rpm has to initialize an rpmdb if it doesn't already exist. Nothing to do with the rpm package (whether it initializes something on install would've been easy enough to check)

There are no easy savings possible here: rpm2cpio requires librpm which requires libdb and all, plus the librpmio which requires the big bad NSS. And initializing the rpm libraries does need the configuration bits as well. The translations take some amount of space of course, but they are just as much for the libraries as they are for the binaries. Rearranging the packaging somewhat would be possible, but in the end it'd drag practically all the same things in, aint worth the trouble trying to save a few tens of kilos.

The single actually BIG thing in rpm package is the upstream changelog, weighing at > 700kB which is roughly a third of the entire package size. Installing with --excludedocs helps with that.

Comment 2 Vratislav Podzimek 2013-12-12 16:34:37 UTC
Thanks for the explanation. I guess lorax should just leave all the executables from the RPM package in place. Does yum export the rpm's --excludedocs option somehow via its API?

Comment 3 Panu Matilainen 2013-12-16 09:41:28 UTC
Yum exports it as a config option at least, look for 'tsflags' in yum.conf manual.

Comment 4 Vratislav Podzimek 2013-12-16 11:14:05 UTC
Nice, thanks! And I see lorax already sets it. [1]

[1] https://git.fedorahosted.org/cgit/lorax.git/tree/src/sbin/lorax#n232