[systemd-devel] [packaging] split of systemd package

Karel Zak kzak at redhat.com
Thu Nov 12 06:39:38 PST 2015


On Thu, Nov 12, 2015 at 09:59:34AM +0100, Lennart Poettering wrote:
> The other option of course is to declare all internal APIs exported
> .so symbols, but that would mean to commit to a stable API for them
> (which is completely out of the question), or to bump the soname on
> each release (which is not an option either).

You don't have to change soname, but all you need it use symbols
versioning with package (or build) specific version for private-API.
This method uses libvirt.so where is large number of private but 
exported symbols.

 https://github.com/libvirt/libvirt/blob/master/src/Makefile.am#L2031

so something like:

 ...
 LIBSYSTEMD_227 {
 global:  
         sd_bus_default_flush_close;
         sd_bus_path_decode_many;
         sd_bus_path_encode_many;
         sd_listen_fds_with_names;
 } LIBSYSTEMD_226;
 

 LIBSYSTEMD_PRIVATE_$(VERSION) {
 global:
        funcA;
        funcB;
 };

where $(VERSION) is always different, then you can be sure that people
won't be able to link against the symbols and mix libsystemd with
systemd binaries from different versions.

    Karel

-- 
 Karel Zak  <kzak at redhat.com>
 http://karelzak.blogspot.com


More information about the systemd-devel mailing list