additional patches for https://bugzilla.samba.org/show_bug.cgi?id=10112
Stefan (metze) Metzmacher
metze at samba.org
Sun Jan 18 08:06:47 MST 2015
Hi,
here're some additional patches to fix a regression in
commit 76fdcf5c15bd904c3686f0c2dd93d27486c61ca4.
Please review and push.
Thanks!
metze
-------------- next part --------------
From 1f5b03fe68f39a24fcac40db949a9e2a3aee5520 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Sat, 17 Jan 2015 00:24:53 +0100
Subject: [PATCH 1/4] wafsamba: make it possible to pass bundled_name to
SAMBA_LIBRARY()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112
Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
buildtools/wafsamba/wafsamba.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 82a9d6f..fb5934d 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -130,6 +130,7 @@ def SAMBA_LIBRARY(bld, libname, source,
pyext=False,
target_type='LIBRARY',
bundled_extension=False,
+ bundled_name=None,
link_name=None,
abi_directory=None,
abi_match=None,
@@ -223,7 +224,9 @@ def SAMBA_LIBRARY(bld, libname, source,
raise Utils.WafError("public library '%s' must have header files" %
libname)
- if target_type == 'PYTHON' or realname or not private_library:
+ if bundled_name is not None:
+ pass
+ elif target_type == 'PYTHON' or realname or not private_library:
if keep_underscore:
bundled_name = libname
else:
--
1.9.1
From dbab01976d3714b65342a7517c641ffce52a983f Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Sat, 17 Jan 2015 00:24:53 +0100
Subject: [PATCH 2/4] wafsamba: passing 'subsystem' to SAMBA_MODULE() is not
optional
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112
Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
buildtools/wafsamba/wafsamba.py | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index fb5934d..9a38900 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -445,13 +445,15 @@ def SAMBA_MODULE(bld, modname, source,
):
'''define a Samba module.'''
+ bld.ASSERT(subsystem, "You must specify a subsystem for SAMBA_MODULE(%s)" % modname)
+
source = bld.EXPAND_VARIABLES(source, vars=vars)
if subdir:
source = bld.SUBDIR(subdir, source)
if internal_module or BUILTIN_LIBRARY(bld, modname):
# Do not create modules for disabled subsystems
- if subsystem and GET_TARGET_TYPE(bld, subsystem) == 'DISABLED':
+ if GET_TARGET_TYPE(bld, subsystem) == 'DISABLED':
return
bld.SAMBA_SUBSYSTEM(modname, source,
deps=deps,
@@ -472,18 +474,17 @@ def SAMBA_MODULE(bld, modname, source,
return
# Do not create modules for disabled subsystems
- if subsystem and GET_TARGET_TYPE(bld, subsystem) == 'DISABLED':
+ if GET_TARGET_TYPE(bld, subsystem) == 'DISABLED':
return
obj_target = modname + '.objlist'
realname = modname
- if subsystem is not None:
- deps += ' ' + subsystem
- while realname.startswith("lib"+subsystem+"_"):
- realname = realname[len("lib"+subsystem+"_"):]
- while realname.startswith(subsystem+"_"):
- realname = realname[len(subsystem+"_"):]
+ deps += ' ' + subsystem
+ while realname.startswith("lib"+subsystem+"_"):
+ realname = realname[len("lib"+subsystem+"_"):]
+ while realname.startswith(subsystem+"_"):
+ realname = realname[len(subsystem+"_"):]
realname = bld.make_libname(realname)
while realname.startswith("lib"):
--
1.9.1
From 21ddb93bb491b98bcdf6365910d4f7c01710edce Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Sat, 17 Jan 2015 00:24:53 +0100
Subject: [PATCH 3/4] wafsamba: remove unused variable in SAMBA_MODULE()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112
Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
buildtools/wafsamba/wafsamba.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 9a38900..5931b68 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -477,8 +477,6 @@ def SAMBA_MODULE(bld, modname, source,
if GET_TARGET_TYPE(bld, subsystem) == 'DISABLED':
return
- obj_target = modname + '.objlist'
-
realname = modname
deps += ' ' + subsystem
while realname.startswith("lib"+subsystem+"_"):
--
1.9.1
From 51f9dd0d7ea63008db8b0b7b76669fccba931979 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Sat, 17 Jan 2015 00:24:53 +0100
Subject: [PATCH 4/4] 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 <metze at samba.org>
---
buildtools/wafsamba/wafsamba.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 5931b68..c054315 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,
--
1.9.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150118/061dd904/attachment.pgp>
More information about the samba-technical
mailing list