We're finalizing the Zenoss 1.1 core product, and part of this process involves the creation of distribution RPMs. We then take those RPMs and install them on various servers in our lab in order to shake-out the software and verify that the software operates as we expect it to. A strange dependency has arisen in the RPM, and I thought I'd blog about it to see if anyone posts a comment with an idea of how this dependency was created.
When we build the rrdtool package we pass --disable-perl as an option to the configure script. Then we run make, followed by make install. When rpmbuild creates the RPM it walks through the directories and determines what dependencies our RPM depends on. This is where the black magic (and problems) occur. I don't understand how rpmbuild creates this dependency list but it started adding perl(RRDs) and perl(RRDp) to the list.
My first thought was that rpmbuild looked for .so files, and then ran ldd against them to see what they are linked against. Then it cross-referenced that list with the list of installed files, and from that list then determined that our RPM depends on another package. The problem with that logic is that none of our .so files are linked against anything related to perl or perl-rrdtoolmodule.
I eventually traced it down to some .pl example files that rrdtool installs even tho you say --disable perl. I suspect that rpmbuild looks at all files, including ones ending in .pl, and then has some logic built into it that looks to see what modules are being loaded. How rpmbuild makes the leap from an import of rrdtool in perl to perl(RRDs) and perl(RRDp) is beyond me.
If you have some ideas or know how rpmbuild does it's dependency determination magic I would like to know more...