From: Stefan Metzmacher Date: Fri, 16 Jan 2015 23:24:53 +0000 (+0100) Subject: wafsamba: create unique names when building shared modules X-Git-Tag: samba-4.2.0rc5~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4fdd14b366ea145678ea3387a894d596358003a;p=thirdparty%2Fsamba.git wafsamba: create unique names when building shared modules After commit 76fdcf5c15bd904c3686f0c2dd93d27486c61ca4, we could endup with bin/default/source3/auth/libauth-samba4.so being created two times. Once by SAMBA3_LIBRARY('auth',...) and once again by SAMBA3_MODULE('auth_samba4', ...). As a result bin/default/source3/auth/libauth-samba4.so gets randomly overwritten. SAMBA3_MODULE('auth_samba4', ...) results in bin/default/source3/auth/libauth_module_samba4.so now. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112 Signed-off-by: Stefan Metzmacher Reviewed-by: Jelmer Vernooij Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Mon Jan 19 04:43:53 CET 2015 on sn-devel-104 (cherry picked from commit 47155641cb48d39d3ee7d8b8962f5ed6b23617d4) Autobuild-User(v4-2-test): Karolin Seeger Autobuild-Date(v4-2-test): Tue Jan 27 13:22:33 CET 2015 on sn-devel-104 --- diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 1319751702f..188e5355d4d 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -484,6 +484,8 @@ def SAMBA_MODULE(bld, modname, source, while realname.startswith(subsystem+"_"): realname = realname[len(subsystem+"_"):] + build_name = "%s_module_%s" % (subsystem, realname) + realname = bld.make_libname(realname) while realname.startswith("lib"): realname = realname[len("lib"):] @@ -503,6 +505,7 @@ def SAMBA_MODULE(bld, modname, source, local_include=local_include, global_include=global_include, vars=vars, + bundled_name=build_name, link_name=build_link_name, install_path="${MODULESDIR}/%s" % subsystem, pyembed=pyembed,