RPM Community Forums

Mailing List Message of <rpm-devel>

Re: size of db_* files in lib/rpm

From: Peter Kalbus <peter.kalbus@gmx.de>
Date: Mon 28 Jan 2008 - 20:30:58 CET
Message-ID: <20080128193058.152790@gmx.net>
today, i played around with a version of rpm5 with sqlite and w/o db support.

the resulting images and objects are much smaller. i guess, that we can fit the whole installation (including the sqlite shared objects) on base of shared objects, within 1 mbyte (not installing any static library, header or documentation).

this a quite a great step.

i hope, that we can reach another 50% by disabling features not needed for our purpose or optimising (e.g.: strip --strip-???).

any ideas, which features can be interesting for disabling them in an embedded environment? i know, that the answer heavily depends on the context. perhaps anyone can give some options either.

-piet

btw: i will post the needed changes (rpm5 w/o db) in the next minutes.




-------- Original-Nachricht --------
> Datum: Sun, 27 Jan 2008 18:37:03 -0500
> Von: Jeff Johnson <n3npq@mac.com>
> An: rpm-devel@rpm5.org
> Betreff: Re: size of db_* files in lib/rpm

> 
> On Jan 27, 2008, at 6:12 PM, Peter Kalbus wrote:
> 
> > one of the last steps towards the qnx port, is to get a *.tgz binary  
> > package prepared.
> >
> > PLIST file is created and .tgz filled.
> >
> > but i wonder the size of the file: about 7.5 mbyte
> >
> > looking a little inside, i detected, that a lot is coming from db_*  
> > files from lib/rpm
> >
> 
> Yes.
> 
> > suprising is, that all are nearly the same size as if they have a  
> > common big part and same small add ons
> >
> > are my ideas right?
> 
> Yes, the executables are partially statically linked,
> leading to multiple copies of -ldb, one for each utility.
> 
> >
> > can it be changed to save space?
> >
> 
> You can do whatever you wish.
> 
> > we' will use the system for an embedded system. we're know fighting  
> > for every byte, but 7.5 mbyte is at least critical.
> >
> 
> On embedded, you can likely eliminate all the db_* utilities.
> 
> Of course when something breaks, you will be flying blind.
> 
> db_stat is useful for diagnosing locking problems.
> db_verify is useful if you need to check that the rpmdb is intact.
> db_dump/db_load are necessary to convert with possible format changes.
> 
> The other db_utilities are less useful.
> 
> There is also tools/db*tool.c that uses one copy of
> the library and uses argv[0] for selecting the db utility.
> 
> 73 de Jeff
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> Developer Communication List                        rpm-devel@rpm5.org
Received on Mon Jan 28 20:30:59 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.