[csw-maintainers] GAR: Changes to checkpkg: shared libraries and modularity

Maciej (Matchek) Blizinski maciej at opencsw.org
Thu Jan 14 12:11:11 CET 2010


On Thu, Jan 14, 2010 at 3:16 AM, Sebastian Kayser <skayser at opencsw.org> wrote:
> Hi Maciej,
>
> Maciej (Matchek) Blizinski wrote on 04.01.2010 16:43:
>> The v2-checkpkg branch has been merged to v2 today.  It means that the
>> new shared library checking code is now live.  The next time you
>> update your GAR sources, the new code will be pulled in.
>>
>> [...]
>>
>> If you have any questions, I'll be happy to answer them.
>
> checkpkg-libs.py seems to have troubles picking up some libs.
> libdb-4.2.so is in /opt/csw/bdb42/lib and libpq.so.5 is in
> /opt/csw/postgresql/lib.
>
> Excerpt of the results from running checkpkg on a postfix package:
> ~skayser/pkgs/postfix-2.6.2\,REV\=2010.01.14-SunOS5.8-sparc-UNCOMMITTED.pkg.gz

Thanks for the path, I could reproduce the issue.

> CSWpostfix:
> SUGGESTION: you may want to add some or all of the following as depends:
>   (Feel free to ignore SUNW or SPRO packages)
>> SUNWcslx
> The following packages might be unnecessary dependencies:
> ? CSWbdb4
> ? CSWlibpq
> The following sonames don't belong to any package:
> ! libdb-4.2.so
> ! libpq.so.5

There were two problems.

One was that '/opt/csw/postgresql/lib/' != '/opt/csw/postgresql/lib'.
I added code to handle trailing slashes (and double slashes too).  The
RPATH of postgresql binaries was: 'runpath': ['/opt/csw/lib/$ISALIST',
'/opt/csw/lib', '/opt/csw/bdb4/lib', '/opt/csw/mysql5/lib/mysql',
'/opt/csw/postgresql/lib/', /* <-- the problem! */
'/usr/lib/$ISALIST', '/usr/lib', '/lib/$ISALIST', '/lib']

The second problem was that my code did not know about the symlink
from /opt/csw/bdb4 to /opt/csw/bdb42.  For now, there's a relatively
dumb code which substitutes paths like this one.  I didn't go for
reimplementing the complete symlink handling.

Here's the change:
https://sourceforge.net/apps/trac/gar/changeset/7999

The new output is as expected:

CSWpostfix:
SUGGESTION: you may want to add some or all of the following as depends:
   (Feel free to ignore SUNW or SPRO packages)
> CSWbdb42
> SUNWcslx
The following packages might be unnecessary dependencies:
? CSWbdb4

> Traceback (most recent call last):
>  File "gar/bin/checkpkg.d/checkpkg-libs.py", line 206, in <module>
>    main()
>  File "gar/bin/checkpkg.d/checkpkg-libs.py", line 195, in main
>    "any package: %s" % checker.soname))
> AttributeError: 'CheckpkgBase' object has no attribute 'soname'
>
> LOG END: /var/tmp/dissect.22044/checkpkg-libs.py.log
>
> ERROR: One or more tests have failed.
> gmake: *** [pkgcheck] Error 2
>
> </snip>
>
> Observed on build8s. Besides tweaking the lib detection, could you
> fix/catch the error?

Fixed.

> And maybe get rid of the surrounding set() in
> the error messages (re-format the output to match its appearance
> to the regular "libfoo is required by" output?)?

Yup, good idea, but I'm putting in on the todo stack for now.



More information about the maintainers mailing list