[csw-maintainers] Better shared object dependency checking in checkpkg out for testing

Maciej (Matchek) Blizinski maciej at opencsw.org
Thu Dec 24 19:46:46 CET 2009


I've spent some time hacking away at checkpkg, the one to which I have
write access.  I've created a v2-checkpkg branch in gar and
re-implemented the part of checkpkg which analyzes shared library
dependencies.  My implementation takes into account the RPATH set in
the analyzed shared libraries, which allows it to correctly identify
GCC runtime dependencies.

To test it, set the svn:externals property on the 'trunk' directory to
https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2-checkpkg

The output of the modified checkpkg is slightly different.  When it
checks multiple packages, it prints the dependency report at the end
of the run, reporting each package in a separate section. For example:

CSWgnupg-agent:
    SUGGESTION: you may want to add some or all of the following as depends:
        (Feel free to ignore SUNW or SPRO packages)
    > SUNWcsl

    The following dependencies might be unnecessary:
    < CSWpinentry

CSWgnupg2:
    SUGGESTION: you may want to add some or all of the following as depends:
        (Feel free to ignore SUNW or SPRO packages)
    > SUNWcsl

    The following dependencies might be unnecessary:
    < CSWlibidn
    < CSWosslrt
    < CSWgnupg-agent
    < CSWlibassuan

The potentially unnecessary dependencies are a new feature.

I'd be happy if people tested this change to see if it works with
their builds.  I'd also like to ask Dago for review if he's happy with
the change. Here's the diff: http://tinyurl.com/yj9pgr9

I talked with Ben who was also working on a checkpkg replacement.  He
didn't mind me coding up an update to checkpkg, and offered his code
if I wanted to use it.  I've looked at it and I think there's a large
portion of design views that we share, and I think that I'll be able
to use some parts of his code.  The main difference in approach is
that Ben wanted to remove the existing code and deploy a complete
rewrite.  I took a more gradual approach, where I started to make
smaller changes, which allow to gradually replace old code with new
one.  It also allows to easily write new, isolated tests which don't
need any changes to the main checkpkg code.

I've tested my new code against a number of builds, but I guess there
will be some corner cases, and the sooner we find them, the better.
If there are no objections, I'll merge the change to the v2 branch in
few days.

Maciej



More information about the maintainers mailing list