[csw-maintainers] library package names and unusual SONAME

Daniel Pocock daniel at opencsw.org
Fri Nov 25 16:08:40 CET 2011


On 25/11/11 22:34, Maciej (Matchek) Bliziński wrote:
> 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
>
>   
Having made several Ganglia releases upstream, I'm quite familiar with
that code, and I don't think it's ideal - but there are various things
related to configure that I never finished sorting out. Some of it is
sitting on this branch:

http://ganglia.svn.sourceforge.net/viewvc/ganglia/branches/d_pocock-monitor-core-configure/

I've also seen numerous other packages where the libraries have some
less than conventional approach to SONAME and ABI numbers.

Wearing my OpenCSW maintainer hat, I look at it like this:
- the library is used by either of the packages gangliaagent or
gangliagmetad
- the user is not obliged to install both packages - they can just
install one or the other
- therefore, there is a good case for splitting it
- if SONAME is going to start following a different convention in
future, I want to try and start numbering from 0, and then
CSWlibganglia1 will be the first version that follows the new standard
when it is adopted

although I'm quite happy to consider other approaches.
>> 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.
>
>   
I wouldn't completely rule that out - the long term strategy for the
library was to enable people to link it with applications that would
send out metrics into the Ganglia platform. The current solution
involves spawning the gmetric binary every time a new metric value is
available, or writing a custom module within gmond (the opposite of
having the Ganglia library within an app).

>> 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.
>   
Ok, thanks for clarifying that


More information about the maintainers mailing list