[Pkg-samba-maint] Bug#1013259: samba-libs: Possible policy violation (now with unnecessary soname bump libndr.so.2 => libndr.so.3)

Michael Tokarev mjt at tls.msk.ru
Tue Nov 1 08:15:19 GMT 2022


Control: tag -1 + upstream

Original context was at http://bugs.debian.org/1013259 , but whole thing *now*
has is about completely unnecessary soname bump of libndr in 4.17 due to debugging
refinements.

01.11.2022 11:07, Michael Tokarev wrote:
> 01.11.2022 10:59, Michael Tokarev wrote:
> ..
>> And this revealed one more issue here, now with samba 4.17.  Where, the
>> same libndr.so again, has changed soname from libndr.so.2 to libndr.so.3!
>>
>> And it looks like *this* is what you're talking about now, once 4.17 with
>> this new libndr.so.3 hits unstable.
>>
>> *Sigh*.
>>
>> So now, samba-libs breaks not only bullseye sssd-ad, but also *bookworm*
>> sssd-ad!
>>
>> So:
>>   samba-libs 4.13: libndr.so.1
>>   samba-libs 4.15: libndr.so.2
>>   samba-libs 4.17: libndr.so.3
>>
>> and this is what we're facing now, 4.16=>4.17 update breaks things again.
>> and this new breakage went unnoticed, and I knew nothing about the soname
>> change before this very moment.
>>
>> Andrew, can you share some info about the new 2=>3 soname bumb in 4.17?
>>
>> I wonder if we should provide old libndr.so.1 and libndr.so.2 interface
>> in samba-libs forever... this shouldn't be that difficult.
> 
> This has come in 7b9f87b877bd385e8cec893cd282d4b3fc00206d:
> 
> Author: Pavel Filipenský <pfilipen at redhat.com>
> Date:   Wed Jun 22 11:13:34 2022 +0200
> 
>      librpc:ndr: Update ndr_print_debug() and add macro NDR_PRINT_DEBUG_LEVEL
> 
>      Bumping the ABI to 3.0.0
> 
>      This is enhancement of NDR_PRINT_DEBUG macro with following new features:
> 
>      * debug level can be specified (NDR_PRINT_DEBUG always uses level 1)
>      * the trace header shows the location and function of the caller
>        instead of function 'ndr_print_debug', which is not really useful.
> 
>      Signed-off-by: Pavel Filipenský <pfilipen at redhat.com>
>      Reviewed-by: Andreas Schneider <asn at samba.org>
> 
> Is it not possible to keep the soname after this change?
> I'm reviewing the changes now..

And it is/was definitely possible and was even trivial to do.
The only real change there is:

-void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr);
+bool ndr_print_debug(int level, ndr_print_fn_t fn, const char *name, void *ptr, const char *location, const char *function);

In order to avoid soname bump, a new function should be created, say,
ndr_print_debug_level(), with a new signature, and old function will
become a trivial wrapper around the new one.  This way, only the single
new signature should be added to the ABI file, and that's it.

C'mon...  there's really no reason to bump the soname just to refine
debugging output..

I can produce a patch to do just that, so the ABI will become compatible
with previous releases. But what to do with samba-4.17.[012] which were
released with libndr.so.3 already?

I'll sure revert this patch to librpc/ABI/ in Debian (after refining
the ndr_print_debug stuff)...

Anyway, I'll submit both changes, and let's see how it goes.

Thanks,

/mjt



More information about the Pkg-samba-maint mailing list