[csw-maintainers] library package names and unusual SONAME

Maciej (Matchek) Bliziński maciej at opencsw.org
Fri Nov 25 15:34:23 CET 2011


2011/11/25 Daniel Pocock <daniel at opencsw.org>:
> I'm uncertain about this output from checkpkg - I want to call the
> package CSWlibganglia0, and mgar has successfully built CSWlibganglia0,
> but checkpkg wants me to call it CSWlibganglia3-1-7-0
>
> I realise that the SONAME in the library should be fixed by the upstream
> maintainer - however, to make a package of this version
>
> a) should I implement some hack in my Makefile to work around this?
>
> b) or should my Makefile patch the package contents to build a library
> with a different SONAME?

Looking through ganglia source code, it looks like the shared library
might be something intended only for ganglia-internal use, meaning
that no packages other than ganglia's own package can link against it.
 If this is true, then there is no benefit in splitting out the shared
library.

Line 93 of:
http://ganglia.svn.sourceforge.net/viewvc/ganglia/trunk/monitor-core/configure.in?revision=2638&view=markup

Line 34 of:
http://ganglia.svn.sourceforge.net/viewvc/ganglia/trunk/monitor-core/lib/Makefile.am?revision=2638&view=markup

> Notice I already use
>
> CHECKPKG_OVERRIDES_CSWlibganglia0 +=
> shared-lib-pkgname-mismatch|file=opt/csw/li
> b/libganglia-3.1.7.so.0.0.0|soname=libganglia-3.1.7.so.0|pkgname=CSWlibganglia0|
> expected=CSWlibganglia3-1-7-0

If the soname is libganglia-3.1.7.so.0, and you're creating a separate
package, the package name should be exactly CSWlibganglia3-1-7-0.  The
way linking works, if you build a package named libganglia0, and you
put the library "libganglia-3.1.7.so.0" inside, what happens next?  A
third party links against libganglia-3.1.7.so.0, now
libganglia-3.1.8.so.0 comes out, and you want to remove
libganglia-3.1.7.so.0, but you can't, because of the third party
program. Now you have to put two libraries, libganglia-3.1.7.so.0 and
libganglia-3.1.8.so.0 inside libganglia0, and you're in the situation
we're trying hard to get out of.

libganglia-3.1.7.so.0 might be a stupid soname, but if the package
name should still match it.

The other option is that libganglia-3.1.7.so.0 is a private (to
ganglia) library, and there's no need to split it out, because no
third party binary can link to it.

> and that doesn't seem to make the message go away
>
> http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/ganglia/trunk/Makefile
>
> This is the message from checkpkg:
>
> # Checkpkg suggests adding the following lines to the GAR recipe:
> # This is a summary; see above for details.
> # The following lines define a new package: CSWlibganglia3-1-7-0
> PACKAGES += CSWlibganglia3-1-7-0
> CATALOGNAME_CSWlibganglia3-1-7-0 = libganglia3_1_7_0
> PKGFILES_CSWlibganglia3-1-7-0 += $(call
> baseisadirs,$(libdir),libganglia-3\.1\.7\.so\.0\.0\.0)
> PKGFILES_CSWlibganglia3-1-7-0 += $(call
> baseisadirs,$(libdir),libganglia-3\.1\.7\.so\.0(\.\d+)*)
> SPKG_DESC_CSWlibganglia3-1-7-0 += $(DESCRIPTION), libganglia-3.1.7.so.0
> RUNTIME_DEP_PKGS_CSWlibganglia0 += CSWlibganglia3-1-7-0
> # The end of CSWlibganglia3-1-7-0 definition

This is a non-error message; this gets only printed to screen.

Maciej


More information about the maintainers mailing list