RPM Community Forums

Mailing List Message of <rpm-users>

Re: Building a spripped-down RPM5

From: Jeff Johnson <n3npq@mac.com>
Date: Tue 16 Dec 2008 - 16:43:09 CET
Message-id: <63A6F896-1594-4248-89BF-5D7C17F5F796@mac.com>

On Dec 16, 2008, at 9:59 AM, Eric MSP Veith wrote:

> Hash: SHA1
> Hello,
> for my build environment I want to create a basic distro that comes  
> with
> only the minimal requirements. This works quite well, except for RPM 5
> whose dependencies I do not dare to touch.

Wuss ;-) In fact, you absolutely must touch rpm5's dependencies
in order to use, since @rpm5.org distributes only source, not binaries.

> Two things disturb me: First the sqlite3 dependency and the need to  
> have
> BerkeleyDB libraries around. The sqlite3 problem can be solved quite  
> easily
> by just disabling it when running configure; however, the latter I  
> don't
> understand: rpm5 brings it's own bdb, why does it rely on an  
> external set
> of libraries?

The rpm internal BerkeleyDB uses --with-uniquename=_rpmdb appended
to every symbol and so (by definition) cannot ever depend on anything
from external BerkeleyDB.

That also avoids symbol collisions when -lrpm and some other version
of BerekeleyDB happened to be bundled with, say, Oracle in a LAMP
stack, that has happened repeatedly in the past, and is why
--with-uniquename is being done within RPM.

So I don't understand what you are asking
	why does it rely on an external set of libraries?
What is "it"? What libraries are you asking?

> I assume that this comes from dynamic linking (?), and I guess that  
> doing
> static linking would solve the problem. Is there an *elegant* way to  
> link
> the supplied bdb distributions statically?

If you link rpm (and BerkeleyDB) statically, you will have 6-8 copies
of BerkeleyDB included in the executables. But that usually leads
to outcries of Bloat!

Partial static linking, and even run-time dlopen, of BerkeleyDB could  
all be attempted.

But without a proper engineering definition, "elegance" is all in the  
eye of the beholder.

73 de Jeff

  • application/pkcs7-signature attachment: smime.p7s
Received on Tue Dec 16 16:43:14 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.