RIPE-NCC / bgpdump

Utility and C Library for parsing MRT files
Other
64 stars 10 forks source link

Upstream .so name versioning? #11

Open robert-scheck opened 1 year ago

robert-scheck commented 1 year ago

I'm the Fedora and EPEL package maintainer of bgpdump since 2019. As of writing, there still doesn't seem to be proper upstream .so name versioning in libbgpdump.

Yes, I'm aware that something like SOFLAGS="-shared -Wl,-soname,libbgpdump.so.0" could be passed while building (even the correct symlinks need to be generated manually then), but this still doesn't let downstreams know whether the old and the new version are ABI compatible or not, thus this should be IMHO really handled by upstream.

Quoting from section "SONAME handling" from https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_name_versioning:

The SONAME field is written to the shared object by linker, using (at least in case of ld) the -soname SONAME flags. This can be passed as an option to gcc like this:

$ gcc $CFLAGS -Wl,-soname,libfoo.so.0.n -o libfoo.so.0.n

If you want to check if the SONAME field is set and what value it has, use the objdump command (from binutils):

$ objdump -p /path/to/libfoo.so.0.n | grep 'SONAME'

Please note that this issue is also meant as very kind try to convince you as upstream to start versioning your .so library (as our Fedora Packaging Guidelines request).

spakka commented 1 year ago

Hi Robert, Thanks for this and the pull request. Sorry this got lost in the move from bitbucket. I appreciate it, I'll try to find some time to look at this soon :)