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

Maciej (Matchek) Blizinski maciej at opencsw.org
Wed Dec 30 00:58:47 CET 2009


On Thu, Dec 24, 2009 at 6:59 PM, Philip Brown <phil at bolthole.com> wrote:
> On Thu, Dec 24, 2009 at 10:46 AM, Maciej (Matchek) Blizinski
> <maciej at opencsw.org> wrote:
>> 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.
>>...(n more!)
>
> Wow, great!
>
> I'm really glad someone has sat down to code this. Thanks

It needed a fair bit of work to get it to work properly.  I used my
MySQL and PostgreSQL builds to test it some more, and squashed more
bugs.

Two main things I've added since:

1. expanding the $ISALIST from the runtime search path
2. emulating the /opt/csw/lib/64 --> amd64 symlink

There are also smaller changes, mainly related to the output
formatting.  For instance, the most basic SUNW libraries aren't
reported as missing, since they're needed by virtually any package, so
they don't carry any signal; they're noise.  Here's a sample output
from the current version:

libmysqlclient.so.15 is provided by the package itself
libCstd.so.1 is provided by u'*SUNWlibC' and required by:
  mysql mysql_tzinfo_to_sql mysqladmin mysqlbinlog mysqld mysqlmanager
libCrun.so.1 is provided by u'*SUNWlibC' and required by:
  mysql mysql_tzinfo_to_sql mysqladmin mysqlbinlog mysqld mysqlmanager
librt.so.1 is provided by u'SUNWcsl' and required by:
  comp_err innochecksum libmysqlclient.so.15.0.0 my_print_defaults
  myisam_ftdump myisamchk myisamlog myisampack mysql mysql_client_test
  mysql_tzinfo_to_sql mysql_upgrade mysql_waitpid mysqladmin mysqlbinlog
  mysqlcheck mysqld mysqldump mysqlimport mysqlmanager mysqlshow mysqltest
  mysqltestmanager-pwgen mysqltestmanagerc perror replace resolve_stack_dump
(...)

CSWmysql5rt:
+  Dependencies of CSWmysql5rt look good.

CSWmysql5client:
+  Dependencies of CSWmysql5client look good.

CSWmysql5:
The following packages might be unnecessary dependencies:
?  CSWmysql5client

The reason why it thinks that CSWmysql5 might not need to depend on
CSWmysql5client is that there are no libraries in CSWmysql5client that
CSWmysql5 would use.  We know that if one runs a server, client
binaries are also necessary.  There's no obvious way in which this
could be automated.

Other dependencies can be automated, for instance the checker will
guess that CSWfoo-devel should depend on CSWfoo, and will suggest
adding the dependency.

The main worry I have about the code is that has grew in line count
beyond what I initially anticipated, and I doubt that it's easy to
understand at the first glance.  There is a number of unit tests,
which should make code refactoring easier.

I have one more bit to implement: checking the data modification
timestamp of /var/sadm/install/contents and updating the cache.  I
should be able to implement it this week.

I'd be interested to hear if anybody has tested this code.  It should
make the biggest difference when used with packages built with gcc.

Maciej



More information about the maintainers mailing list