Patches for bug #11458
Stefan Metzmacher
metze at samba.org
Sat Aug 29 09:10:14 UTC 2015
Hi Jelmer,
> On Thu, Aug 27, 2015 at 08:53:58PM +0200, Stefan Metzmacher wrote:
>> From 550eb499fddbf4846277cf51ea9c28f167c64ad0 Mon Sep 17 00:00:00 2001
>> From: Stefan Metzmacher <metze at samba.org>
>> Date: Thu, 27 Aug 2015 11:14:51 +0200
>> Subject: [PATCH 1/5] ldb:wscript: make it possible to build samba with a
>> system ldb again
>>
>> This fixes a regression in commit fcf4a891945b22dc6eccdc71fd441f1a879f556a.
>>
>> If we check for 'ldb' later the 'pyldb-util' can't depend on the 'ldb' check.
>>
>> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11458
>>
>> Signed-off-by: Stefan Metzmacher <metze at samba.org>
>> ---
>> lib/ldb/wscript | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/ldb/wscript b/lib/ldb/wscript
>> index 0e81932..0996f51 100755
>> --- a/lib/ldb/wscript
>> +++ b/lib/ldb/wscript
>> @@ -56,11 +56,11 @@ def configure(conf):
>>
>> if not conf.env.standalone_ldb:
>> if conf.CHECK_BUNDLED_SYSTEM_PKG('pyldb-util', minversion=VERSION,
>> - onlyif='talloc tdb tevent ldb',
>> + onlyif='talloc tdb tevent',
>> implied_deps='replace talloc tdb tevent ldb'):
>> conf.define('USING_SYSTEM_PYLDB_UTIL', 1)
> It means we can end up using the system pyldb-util even if ldb is not
> available (or unusable). This doesn't seem particularly realistic
> though.
>
>> if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb', minversion=VERSION,
>> - onlyif='talloc tdb tevent',
>> + onlyif='talloc tdb tevent pyldb-util',
>> implied_deps='replace talloc tdb tevent'):
>> conf.define('USING_SYSTEM_LDB', 1)
> This is problematic because it means we will only ever build
> against the system ldb if pyldb-util is also installed.
Yes, that's exactly would *your* commit
fcf4a891945b22dc6eccdc71fd441f1a879f556a
is about!
We can't use a system libldb and build our own pyldb-util.
> E.g. if the system build was built without Python support, we won't
> use it *at all*.
The standalone ldb build doesn't have a --disable-python.
>> From f330ae0a229dc540857ace08afafd0b55f729ed8 Mon Sep 17 00:00:00 2001
>> From: Stefan Metzmacher <metze at samba.org>
>> Date: Thu, 27 Aug 2015 11:05:08 +0200
>> Subject: [PATCH 3/5] script/autobuild.py: exclude !lib,!pylib,!pylib-util from
>> bundling in samba-libs
>>
>> We need to make sure we're really not bundling any of these.
>>
>> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11458
>>
>> Signed-off-by: Stefan Metzmacher <metze at samba.org>
>> ---
>> script/autobuild.py | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/script/autobuild.py b/script/autobuild.py
>> index c91ff2c..45eede9 100755
>> --- a/script/autobuild.py
>> +++ b/script/autobuild.py
>> @@ -46,7 +46,11 @@ samba_libs_envvars += " PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgco
>> samba_libs_envvars += " ADDITIONAL_CFLAGS='-Wmissing-prototypes'"
>> samba_libs_configure_base = samba_libs_envvars + " ./configure --abi-check --enable-debug --picky-developer -C ${PREFIX}"
>> samba_libs_configure_libs = samba_libs_configure_base + " --bundled-libraries=NONE"
>> -samba_libs_configure_samba = samba_libs_configure_base + " --bundled-libraries=!talloc,!tdb,!pytdb,!ldb,!pyldb,!tevent,!pytevent"
>> +# We use the pattern !lib,!pylib,!pylib-util for everything
>> +# some might not exist yet, but maybe added in future.
>> +samba_libs_systemlibs = ["talloc", "tdb", "tevent", "ldb"]
>> +samba_libs_configure_samba = samba_libs_configure_base + " --bundled-libraries="
>> +samba_libs_configure_samba += ",".join("!%s,!py%s,!py%s-util" % (l,l,l) for l in samba_libs_systemlibs)
> This would be clearer to read by just adding pytalloc-util and
> pyldb-util to the list.
I don't think so, if we add pytevent-util or pytdb-util in future
we'll forget to add that.
Could you live with my version, are do I really need to change it?
> Ideally --bundled-libraries should error if you give it unknown
> libraries.
Yes, but we don't have that.
>> From 7586e279b31ae1e9cd4777442f174999f8e40a97 Mon Sep 17 00:00:00 2001
>> From: Stefan Metzmacher <metze at samba.org>
>> Date: Thu, 27 Aug 2015 11:40:09 +0200
>> Subject: [PATCH 4/5] s4:heimdal_build: handle CHECK_BUNDLED_SYSTEM returning
>> False in check_system_heimdal_lib()
>>
>> Signed-off-by: Stefan Metzmacher <metze at samba.org>
>> ---
>> source4/heimdal_build/wscript_configure | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
>> index 710a53d..9e720e4 100755
>> --- a/source4/heimdal_build/wscript_configure
>> +++ b/source4/heimdal_build/wscript_configure
>> @@ -196,8 +196,9 @@ def check_system_heimdal_lib(name, functions='', headers='', onlyif=None):
>> return False
>> setattr(conf.env, "CPPPATH_%s" % name.upper(), heimdal_includedirs)
>> setattr(conf.env, "LIBPATH_%s" % name.upper(), heimdal_libdirs)
>> - conf.CHECK_BUNDLED_SYSTEM(name, checkfunctions=functions, headers=headers,
>> - onlyif=onlyif)
>> + if not conf.CHECK_BUNDLED_SYSTEM(name, checkfunctions=functions, headers=headers,
>> + onlyif=onlyif):
>> + return False
>> conf.define('USING_SYSTEM_%s' % name.upper(), 1)
>> return True
> Reviewed-By: me
>
>>
>> --
>> 1.9.1
>>
>>
>> From 25f3fd1d244234621ef4d491bf41d93ca0392d34 Mon Sep 17 00:00:00 2001
>> From: Stefan Metzmacher <metze at samba.org>
>> Date: Thu, 27 Aug 2015 11:44:23 +0200
>> Subject: [PATCH 5/5] s4:heimdal_build: also use check_system_heimdal_lib() for
>> "com_err"
>>
>> Signed-off-by: Stefan Metzmacher <metze at samba.org>
>> ---
>> source4/heimdal_build/wscript_configure | 5 ++---
>> 1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
>> index 9e720e4..37fa459 100755
>> --- a/source4/heimdal_build/wscript_configure
>> +++ b/source4/heimdal_build/wscript_configure
>> @@ -186,9 +186,6 @@ if krb5_config:
>> finally:
>> f.close()
>>
>> -if conf.CHECK_BUNDLED_SYSTEM('com_err', checkfunctions='com_right_r com_err', headers='com_err.h'):
>> - conf.define('USING_SYSTEM_COM_ERR', 1)
>> -
>> def check_system_heimdal_lib(name, functions='', headers='', onlyif=None):
>> # Only use system library if the user requested the bundled one not be
>> # used.
>> @@ -210,6 +207,8 @@ def check_system_heimdal_binary(name):
>> conf.define('USING_SYSTEM_%s' % name.upper(), 1)
>> return True
>>
>> +check_system_heimdal_lib("com_err", "com_right_r com_err", "com_err.h")
>> +
>> if check_system_heimdal_lib("roken", "rk_socket_set_reuseaddr", "roken.h"):
>> conf.env.CPPPATH_ROKEN_HOSTCC = conf.env.CPPPATH_ROKEN
>> conf.env.LIBPATH_ROKEN_HOSTCC = conf.env.LIBPATH_ROKEN
>
> Reviewed-By: me
Thanks!
metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150829/92aebb47/signature.sig>
More information about the samba-technical
mailing list