From: Stefan Metzmacher Date: Fri, 13 Aug 2021 13:16:59 +0000 (+0200) Subject: wafsamba: use private extentions also for bundled public libraries X-Git-Tag: tdb-1.4.6~522 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da7c41e26016845f0dfd78601987c075ef8711a6;p=thirdparty%2Fsamba.git wafsamba: use private extentions also for bundled public libraries Playing tricks with redefining libraries, which may also be installed in the system with the same version, isn't really a good thing. It may work in some cases, but there are so many things which may go wrong. So if we build a library as private/bundled library we should change the soname of the library. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14780 Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett Reviewed-by: Andreas Schneider --- diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py index 72eca18cb28..7d2d855cd9c 100644 --- a/buildtools/wafsamba/samba_bundled.py +++ b/buildtools/wafsamba/samba_bundled.py @@ -5,16 +5,9 @@ from waflib import Build, Options, Logs from waflib.Configure import conf from wafsamba import samba_utils -def PRIVATE_NAME(bld, name, private_extension): +def PRIVATE_NAME(bld, name): '''possibly rename a library to include a bundled extension''' - # we now use the same private name for libraries as the public name. - # see http://git.samba.org/?p=tridge/junkcode.git;a=tree;f=shlib for a - # demonstration that this is the right thing to do - # also see http://lists.samba.org/archive/samba-technical/2011-January/075816.html - if private_extension: - return name - extension = bld.env.PRIVATE_EXTENSION if extension and name.startswith('%s' % extension): diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 3a5d8460336..f6ed3a73947 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -122,7 +122,6 @@ def SAMBA_LIBRARY(bld, libname, source, pyembed=False, pyext=False, target_type='LIBRARY', - bundled_extension=False, bundled_name=None, link_name=None, abi_directory=None, @@ -232,10 +231,7 @@ def SAMBA_LIBRARY(bld, libname, source, bundled_name = libname.replace('_', '-') else: assert (private_library == True and realname is None) - if abi_directory or vnum or soname: - bundled_extension=True - bundled_name = PRIVATE_NAME(bld, libname.replace('_', '-'), - bundled_extension) + bundled_name = PRIVATE_NAME(bld, libname.replace('_', '-')) ldflags = TO_LIST(ldflags) if bld.env['ENABLE_RELRO'] is True: