[Pkg-samba-maint] [Git][samba-team/samba][master] 6 commits: Revert "libndr-debug-level-compat.diff, libndr-revert-so3.diff: revert...
Michael Tokarev (@mjt)
gitlab at salsa.debian.org
Wed Nov 2 15:35:00 GMT 2022
Michael Tokarev pushed to branch master at Debian Samba Team / samba
Commits:
22e1aa95 by Michael Tokarev at 2022-11-02T14:37:15+03:00
Revert "libndr-debug-level-compat.diff, libndr-revert-so3.diff: revert libndr.so.2->3 soname bump (#1013259)"
This reverts commit ee3616a98bdb5a75ed8eee25a58d4ec582c31e56.
Upstream samba does not want to change this, so we'll do it the other way.
- - - - -
429ed1da by Michael Tokarev at 2022-11-02T18:31:05+03:00
revert libndr.so.2 changes and just provide a compat symlink for it
Upstream does not want to revert their - completely unwarranted -
libndr.so.2=>.3 soname bump, despite provided patches. So, in order
to stay compatible and eliminate possible further issues, revert the
revert, and provide the compatibility symlink at the filesystem level
since new libndr.so.3 is comletely compatible with libndr.so.2 besides
this internal ndr_print_debug() symbol (which is actually not used by
anything).
- - - - -
94b4e9dd by Michael Tokarev at 2022-11-02T18:31:07+03:00
d/samba-libs.links: add comments describing libndr.so.N issue
- - - - -
b7259b99 by Michael Tokarev at 2022-11-02T18:31:07+03:00
d/samba-libs.links: add libndr.so.1 compat symlink too
- - - - -
85604fe7 by Michael Tokarev at 2022-11-02T18:31:07+03:00
d/control: unbreak bullseye/jammy sssd-ad-common, sssd-ad, sssd-ipa by samba-libs once libndr.so.1 compat link is here
- - - - -
483afa1e by Michael Tokarev at 2022-11-02T18:31:07+03:00
update changelog
- - - - -
8 changed files:
- debian/changelog
- debian/control
- − debian/patches/libndr-debug-level-compat.diff
- − debian/patches/libndr-revert-so3.diff
- debian/patches/series
- debian/samba-libs.install
- + debian/samba-libs.links
- debian/samba-libs.symbols
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,18 @@
+samba (2:4.17.2+dfsg-7) UNRELEASED; urgency=medium
+
+ * another way to work around #1013259: provide a compatibility symlink
+ libndr.so.2 pointing to libndr.so.3:
+ - libndr-debug-level-compat.diff, libndr-revert-so3.diff: remove
+ - d/samba-libs.symbols: adjust symbols/versions
+ - d/samba-libs.install: libndr.so.2 => libndr.so.3
+ - d/samba-libs.links: provide the compat libndr.so.2 symlink
+ * d/samba-libs.links: add comments describing libndr.so.N issue
+ * d/samba-libs.links: add libndr.so.1 compat symlink too (for bullseye sssd)
+ * d/control: unbreak bullseye/jammy sssd-ad-common, sssd-ad, sssd-ipa
+ by samba-libs once libndr.so.1 compat link is here
+
+ -- Michael Tokarev <mjt at tls.msk.ru> Wed, 02 Nov 2022 18:17:34 +0300
+
samba (2:4.17.2+dfsg-6) unstable; urgency=medium
* d/control: fix comment in previous upload
=====================================
debian/control
=====================================
@@ -135,8 +135,6 @@ Replaces:
# libpac-samba4.so.0 moved from samba to samba-libs in 4.17.0+dfsg-2
samba (<< 2:4.17.0+dfsg-2~),
Breaks:
-# libndr.so.1=>.2 in samba 4.15 broke bullseye & jammy sssd (#1013259)
- sssd-ad-common (<< 2.4.6), sssd-ad (<< 2.6.4), sssd-ipa (<< 2.4.6),
libwbclient0 (<< 2:4.16.1+dfsg-7~),
samba (<< 2:4.17.0+dfsg-2~),
Description: Samba core libraries
=====================================
debian/patches/libndr-debug-level-compat.diff deleted
=====================================
@@ -1,122 +0,0 @@
-From eeaea8c9dc4bcae2e7956e469168908cda488670 Mon Sep 17 00:00:00 2001
-From: Michael Tokarev <mjt at tls.msk.ru>
-Date: Tue, 1 Nov 2022 12:05:20 +0300
-Subject: [PATCH 1/2] ndr: restore libndr.so.2 ABI compatibility: ndr_print_debug
-
-Commit 7b9f87b877bd385e8cec893cd282d4b3fc00206d changed signature of
-ndr_print_debug function and for this very purpose, incremented an
-soname of whole library, instead of providing a trivial compatibility
-symbol. Do this now to restore the damage for a bit.
-
-Rename the newly introduced function to ndr_print_debug_level(), modify
-it to accept NULL for the new "location" arguments, and introduce old
-ndr_print_debug() function with the old signature, making it a trivial
-wrapper around the new ndr_print_debug_level().
-
-Include this symbol change directly into ndr-3.0.0.sigs, since the next
-patch will rename this file into ndr-2.0.1.sigs.
-
-Signed-off-by: Michael Tokarev <mjt at tls.msk.ru>
----
- librpc/ABI/ndr-3.0.0.sigs | 3 ++-
- librpc/ndr/libndr.h | 6 +++---
- librpc/ndr/ndr.c | 28 +++++++++++++++++++++-------
- 3 files changed, 26 insertions(+), 11 deletions(-)
-
-diff --git a/librpc/ABI/ndr-3.0.0.sigs b/librpc/ABI/ndr-3.0.0.sigs
-index d3f3eca26ae..347f278fae7 100644
---- a/librpc/ABI/ndr-3.0.0.sigs
-+++ b/librpc/ABI/ndr-3.0.0.sigs
-@@ -42,7 +42,8 @@ ndr_print_array_uint8: void (struct ndr_print *, const char *, const uint8_t *,
- ndr_print_bad_level: void (struct ndr_print *, const char *, uint16_t)
- ndr_print_bitmap_flag: void (struct ndr_print *, size_t, const char *, uint32_t, uint32_t)
- ndr_print_bool: void (struct ndr_print *, const char *, const bool)
--ndr_print_debug: bool (int, ndr_print_fn_t, const char *, void *, const char *, const char *)
-+ndr_print_debug: void (ndr_print_fn_t, const char *, void *)
-+ndr_print_debug_level: bool (int, ndr_print_fn_t, const char *, void *, const char *, const char *)
- ndr_print_debug_helper: void (struct ndr_print *, const char *, ...)
- ndr_print_debugc: void (int, ndr_print_fn_t, const char *, void *)
- ndr_print_debugc_helper: void (struct ndr_print *, const char *, ...)
-diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
-index 98f8ff870d2..bfabd3a8b73 100644
---- a/librpc/ndr/libndr.h
-+++ b/librpc/ndr/libndr.h
-@@ -214,7 +214,7 @@ struct ndr_print {
- #define LIBNDR_FLAG_NO_NDR_SIZE (1U<<31)
-
- /* useful macro for debugging */
--#define NDR_PRINT_DEBUG(type, p) (void)ndr_print_debug(1, (ndr_print_fn_t)ndr_print_ ##type, #p, p, __location__, __func__)
-+#define NDR_PRINT_DEBUG(type, p) (void)ndr_print_debug_level(1, (ndr_print_fn_t)ndr_print_ ##type, #p, p, __location__, __func__)
- #define NDR_PRINT_DEBUGC(dbgc_class, type, p) ndr_print_debugc(dbgc_class, (ndr_print_fn_t)ndr_print_ ##type, #p, p)
- #define NDR_PRINT_UNION_DEBUG(type, level, p) ndr_print_union_debug((ndr_print_fn_t)ndr_print_ ##type, #p, level, p)
- #define NDR_PRINT_FUNCTION_DEBUG(type, flags, p) ndr_print_function_debug((ndr_print_function_t)ndr_print_ ##type, #type, flags, p)
-@@ -239,7 +239,7 @@ struct ndr_print {
- */
- #define NDR_PRINT_DEBUG_LEVEL(l, type, p) \
- (void) ( CHECK_DEBUGLVL(l) \
-- && ndr_print_debug(l, (ndr_print_fn_t)ndr_print_ ##type, #p, p, __location__, __func__) )
-+ && ndr_print_debug_level(l, (ndr_print_fn_t)ndr_print_ ##type, #p, p, __location__, __func__) )
-
- /* useful macro for debugging in strings */
- #define NDR_PRINT_STRUCT_STRING(ctx, type, p) ndr_print_struct_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, p)
-@@ -617,7 +617,7 @@ void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...) PRIN
- void ndr_print_debugc_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
- void ndr_print_printf_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
- void ndr_print_string_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
--bool ndr_print_debug(int level, ndr_print_fn_t fn, const char *name, void *ptr, const char *location, const char *function);
-+bool ndr_print_debug_level(int level, ndr_print_fn_t fn, const char *name, void *ptr, const char *location, const char *function);
- void ndr_print_debugc(int dbgc_class, ndr_print_fn_t fn, const char *name, void *ptr);
- void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr);
- void ndr_print_function_debug(ndr_print_function_t fn, const char *name, int flags, void *ptr);
-diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c
-index 25765880d8b..c9d6fb1de0a 100644
---- a/librpc/ndr/ndr.c
-+++ b/librpc/ndr/ndr.c
-@@ -428,16 +428,21 @@ _PUBLIC_ void ndr_print_debugc(int dbgc_class, ndr_print_fn_t fn, const char *na
- /*
- a useful helper function for printing idl structures via DEBUG()
- */
--_PUBLIC_ bool ndr_print_debug(int level,
-- ndr_print_fn_t fn,
-- const char *name,
-- void *ptr,
-- const char *location,
-- const char *function)
-+_PUBLIC_ bool ndr_print_debug_level(int level,
-+ ndr_print_fn_t fn,
-+ const char *name,
-+ void *ptr,
-+ const char *location,
-+ const char *function)
- {
- struct ndr_print *ndr;
-
-- DEBUGLF(level, (" "), location, function);
-+ if (location) {
-+ DEBUGLF(level, (" "), location, function);
-+ } else {
-+ /* called from ndr_print_debug() compatibility wrapper below */
-+ DEBUG(1,(" "));
-+ }
-
- ndr = talloc_zero(NULL, struct ndr_print);
- if (!ndr) return false;
-@@ -455,6 +460,15 @@ _PUBLIC_ bool ndr_print_debug(int level,
- return true;
- }
-
-+/*
-+ old compatibility wrapper without location information for libndr before 4.17
-+ (do not change the signature!)
-+*/
-+_PUBLIC_ void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr)
-+{
-+ ndr_print_debug_level(1, fn, name, ptr, NULL, NULL);
-+}
-+
- /*
- a useful helper function for printing idl unions via DEBUG()
- */
---
-2.30.2
-
=====================================
debian/patches/libndr-revert-so3.diff deleted
=====================================
@@ -1,36 +0,0 @@
-From 1c531d27853427bda74cf52df5b07a36d1d8f87e Mon Sep 17 00:00:00 2001
-From: Michael Tokarev <mjt at tls.msk.ru>
-Date: Tue, 1 Nov 2022 12:09:38 +0300
-Subject: [PATCH 2/2] ndr: revert libndr.so.3 soname bump
-
-After the previous change adding compatibility symbol, revert
-libndr soname bump from 2.0.0 to 3.0.0, and bump it to 2.0.1
-instead. This renames whole ndr-3.0.0.sigs to ndr-2.0.1.sigs.
-
-Signed-off-by: Michael Tokarev <mjt at tls.msk.ru>
----
- librpc/ABI/{ndr-3.0.0.sigs => ndr-2.0.1.sigs} | 0
- librpc/wscript_build | 2 +-
- 2 files changed, 1 insertion(+), 1 deletion(-)
- rename librpc/ABI/{ndr-3.0.0.sigs => ndr-2.0.1.sigs} (100%)
-
-diff --git a/librpc/ABI/ndr-3.0.0.sigs b/librpc/ABI/ndr-2.0.1.sigs
-similarity index 100%
-rename from librpc/ABI/ndr-3.0.0.sigs
-rename to librpc/ABI/ndr-2.0.1.sigs
-diff --git a/librpc/wscript_build b/librpc/wscript_build
-index cf9085c0884..dbe66a23f45 100644
---- a/librpc/wscript_build
-+++ b/librpc/wscript_build
-@@ -654,7 +654,7 @@ bld.SAMBA_LIBRARY('ndr',
- public_deps='samba-errors talloc samba-util util_str_hex',
- public_headers='gen_ndr/misc.h gen_ndr/ndr_misc.h ndr/libndr.h:ndr.h',
- header_path= [('*gen_ndr*', 'gen_ndr')],
-- vnum='3.0.0',
-+ vnum='2.0.1',
- abi_directory='ABI',
- abi_match='!ndr_table_* ndr_* GUID_* _ndr_pull_error* _ndr_push_error*',
- )
---
-2.30.2
-
=====================================
debian/patches/series
=====================================
@@ -17,5 +17,3 @@ move-msg.sock-from-var-lib-samba-to-run-samba.patch
testparm-do-not-fail-if-pid-dir-does-not-exist.patch
add-missing-libs-deps.diff
spelling.patch
-libndr-debug-level-compat.diff
-libndr-revert-so3.diff
=====================================
debian/samba-libs.install
=====================================
@@ -11,7 +11,7 @@ usr/lib/*/libdcerpc.so.0*
usr/lib/*/libndr-krb5pac.so.0*
usr/lib/*/libndr-nbt.so.0*
usr/lib/*/libndr-standard.so.0*
-usr/lib/*/libndr.so.2*
+usr/lib/*/libndr.so.3*
usr/lib/*/libnetapi.so.1*
usr/lib/*/libsamba-credentials.so.1*
usr/lib/*/libsamba-errors.so.1*
=====================================
debian/samba-libs.links
=====================================
@@ -0,0 +1,18 @@
+# libndr.so.X mess. This library does not have stable ABI and can change.
+# But it is used by other software (eg, sssd, openchange, evolution-mapi).
+# openchange and evolution-mapi are not in debian (bullseye/bookworm).
+# Only a small subset of the symbols is actually used.
+# Since we package libndr.so.N inside samba-libs package, not inside its own
+# libndrN package (because it links with all internal samba libs, and different
+# libndrNs can't co-exist), we have to deal with the soname bumps somehow.
+
+# 4.15 changed soname of libndr.so.1 in incompatible way and bumbed soname to .2
+# Only small subset of symbols is actually used by sssd, neither of which were
+# affected, so we can "assume" the ABI in .2 is "sufficienly compatible" with .1
+# Provide compat symlink.
+# This is a gross hack, but it let us to survive.
+# Remove past bookworm.
+usr/lib/${DEB_HOST_MULTIARCH}/libndr.so.3 usr/lib/${DEB_HOST_MULTIARCH}/libndr.so.1
+
+# 4.17 changed soname of libndr without a reason, provide compat symlink
+usr/lib/${DEB_HOST_MULTIARCH}/libndr.so.3 usr/lib/${DEB_HOST_MULTIARCH}/libndr.so.2
=====================================
debian/samba-libs.symbols
=====================================
@@ -1,4 +1,4 @@
-libndr.so.2 #PACKAGE# #MINVER#
+libndr.so.3 #PACKAGE# #MINVER#
* Build-Depends-Package: samba-dev
GUID_all_zero at NDR_0.0.1 2:4.17.2
GUID_buf_string at NDR_0.0.4 2:4.17.2
@@ -32,7 +32,7 @@ libndr.so.2 #PACKAGE# #MINVER#
NDR_1.0.1 at NDR_1.0.1 2:4.17.2
NDR_1.0.2 at NDR_1.0.2 2:4.17.2
NDR_2.0.0 at NDR_2.0.0 2:4.17.2
- NDR_2.0.1 at NDR_2.0.1 2:4.17.2
+ NDR_3.0.0 at NDR_3.0.0 2:4.17.2
_ndr_pull_error at NDR_1.0.0 2:4.17.2
_ndr_push_error at NDR_1.0.0 2:4.17.2
ndr_align_size at NDR_0.0.1 2:4.17.2
@@ -65,7 +65,6 @@ libndr.so.2 #PACKAGE# #MINVER#
ndr_print_bool at NDR_0.0.1 2:4.17.2
ndr_print_debug at NDR_0.0.1 2:4.17.2
ndr_print_debug_helper at NDR_0.0.1 2:4.17.2
- ndr_print_debug_level at NDR_2.0.1 2:4.17.2
ndr_print_debugc at NDR_0.0.2 2:4.17.2
ndr_print_debugc_helper at NDR_0.0.2 2:4.17.2
ndr_print_dlong at NDR_0.0.1 2:4.17.2
View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/6aed82654812a447972b6da5c01aab6f6585615b...483afa1e07dac801406214506e45316be7f120dd
--
View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/6aed82654812a447972b6da5c01aab6f6585615b...483afa1e07dac801406214506e45316be7f120dd
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-samba-maint/attachments/20221102/d9956858/attachment-0001.htm>
More information about the Pkg-samba-maint
mailing list