diff options
author | Changqing Li <changqing.li@windriver.com> | 2019-07-02 09:58:07 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-07-10 09:28:20 -0700 |
commit | 6207331f37679e81fcfa6b757e5d6f3f631d57f6 (patch) | |
tree | 561c2eea451bfa2f9d7d6488231f8b3fef1f34cd /meta-networking/recipes-support | |
parent | 517f7ba99ce9437ece3487f14aefa2d416cfb0a3 (diff) | |
download | meta-openembedded-6207331f37679e81fcfa6b757e5d6f3f631d57f6.tar.gz |
libldb: upgrade 1.4.1 -> 1.5.4
1. switch to python3
2. add cross-answer for lmdb check, so remove patch 0001-libldb-fix-config-error
3. fix cross-compile problem caused by waf
4. refresh patch
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-support')
-rw-r--r-- | meta-networking/recipes-support/libldb/libldb/0001-libldb-fix-config-error.patch | 87 | ||||
-rw-r--r-- | meta-networking/recipes-support/libldb/libldb/0001-waf-add-support-of-cross_compile.patch | 62 | ||||
-rw-r--r-- | meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch | 56 | ||||
-rw-r--r-- | meta-networking/recipes-support/libldb/libldb/options-1.5.4.patch (renamed from meta-networking/recipes-support/libldb/libldb/options-1.4.1.patch) | 67 | ||||
-rw-r--r-- | meta-networking/recipes-support/libldb/libldb_1.5.4.bb (renamed from meta-networking/recipes-support/libldb/libldb_1.4.1.bb) | 24 |
5 files changed, 130 insertions, 166 deletions
diff --git a/meta-networking/recipes-support/libldb/libldb/0001-libldb-fix-config-error.patch b/meta-networking/recipes-support/libldb/libldb/0001-libldb-fix-config-error.patch deleted file mode 100644 index 5818d57f7..000000000 --- a/meta-networking/recipes-support/libldb/libldb/0001-libldb-fix-config-error.patch +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | From bc4ff7e37ce120c257e52a81fe3475499dfd2573 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Tue, 24 Jul 2018 10:10:24 +0800 | ||
4 | Subject: [PATCH] libldb: fix config error | ||
5 | |||
6 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
7 | --- | ||
8 | wscript | 58 +++++++++++++++++++++++++++++----------------------------- | ||
9 | 1 file changed, 29 insertions(+), 29 deletions(-) | ||
10 | |||
11 | diff --git a/wscript b/wscript | ||
12 | index b0af7b6..8ad9f96 100644 | ||
13 | --- a/wscript | ||
14 | +++ b/wscript | ||
15 | @@ -115,40 +115,40 @@ def configure(conf): | ||
16 | onlyif='talloc tdb tevent pyldb-util', | ||
17 | implied_deps='replace talloc tdb tevent'): | ||
18 | conf.define('USING_SYSTEM_LDB', 1) | ||
19 | + if not Options.options.without_ldb_lmdb: | ||
20 | + if not conf.CHECK_CODE('return !(sizeof(size_t) >= 8)', | ||
21 | + "HAVE_64_BIT_SIZE_T_FOR_LMDB", | ||
22 | + execute=True, | ||
23 | + msg='Checking for a 64-bit host to ' | ||
24 | + 'support lmdb'): | ||
25 | + Logs.warn("--without-ldb-lmdb implied as this " | ||
26 | + "host is not 64-bit") | ||
27 | + | ||
28 | + if not conf.env.standalone_ldb and \ | ||
29 | + not Options.options.without_ad_dc and \ | ||
30 | + conf.CONFIG_GET('ENABLE_SELFTEST'): | ||
31 | + Logs.warn("NOTE: Some AD DC parts of selftest will fail") | ||
32 | |||
33 | - if not conf.CHECK_CODE('return !(sizeof(size_t) >= 8)', | ||
34 | - "HAVE_64_BIT_SIZE_T_FOR_LMDB", | ||
35 | - execute=True, | ||
36 | - msg='Checking for a 64-bit host to ' | ||
37 | - 'support lmdb'): | ||
38 | - Logs.warn("--without-ldb-lmdb implied as this " | ||
39 | - "host is not 64-bit") | ||
40 | - | ||
41 | - if not conf.env.standalone_ldb and \ | ||
42 | - not Options.options.without_ad_dc and \ | ||
43 | - conf.CONFIG_GET('ENABLE_SELFTEST'): | ||
44 | - Logs.warn("NOTE: Some AD DC parts of selftest will fail") | ||
45 | - | ||
46 | - conf.env.REQUIRE_LMDB = False | ||
47 | - else: | ||
48 | - if conf.env.standalone_ldb: | ||
49 | - if Options.options.without_ldb_lmdb: | ||
50 | - conf.env.REQUIRE_LMDB = False | ||
51 | - else: | ||
52 | - conf.env.REQUIRE_LMDB = True | ||
53 | - elif Options.options.without_ad_dc: | ||
54 | conf.env.REQUIRE_LMDB = False | ||
55 | else: | ||
56 | - if Options.options.without_ldb_lmdb: | ||
57 | - if not Options.options.without_ad_dc and \ | ||
58 | - conf.CONFIG_GET('ENABLE_SELFTEST'): | ||
59 | - raise Utils.WafError('--without-ldb-lmdb conflicts ' | ||
60 | - 'with --enable-selftest while ' | ||
61 | - 'building the AD DC') | ||
62 | - | ||
63 | + if conf.env.standalone_ldb: | ||
64 | + if Options.options.without_ldb_lmdb: | ||
65 | + conf.env.REQUIRE_LMDB = False | ||
66 | + else: | ||
67 | + conf.env.REQUIRE_LMDB = True | ||
68 | + elif Options.options.without_ad_dc: | ||
69 | conf.env.REQUIRE_LMDB = False | ||
70 | else: | ||
71 | - conf.env.REQUIRE_LMDB = True | ||
72 | + if Options.options.without_ldb_lmdb: | ||
73 | + if not Options.options.without_ad_dc and \ | ||
74 | + conf.CONFIG_GET('ENABLE_SELFTEST'): | ||
75 | + raise Utils.WafError('--without-ldb-lmdb conflicts ' | ||
76 | + 'with --enable-selftest while ' | ||
77 | + 'building the AD DC') | ||
78 | + | ||
79 | + conf.env.REQUIRE_LMDB = False | ||
80 | + else: | ||
81 | + conf.env.REQUIRE_LMDB = True | ||
82 | |||
83 | |||
84 | if conf.CONFIG_SET('USING_SYSTEM_LDB'): | ||
85 | -- | ||
86 | 2.7.4 | ||
87 | |||
diff --git a/meta-networking/recipes-support/libldb/libldb/0001-waf-add-support-of-cross_compile.patch b/meta-networking/recipes-support/libldb/libldb/0001-waf-add-support-of-cross_compile.patch new file mode 100644 index 000000000..45c5acabb --- /dev/null +++ b/meta-networking/recipes-support/libldb/libldb/0001-waf-add-support-of-cross_compile.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From 4b8463ff43f8983a706b181c5292491f9f954be1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Fri, 25 Jan 2019 15:00:59 +0800 | ||
4 | Subject: [PATCH] waf: add support of cross_compile | ||
5 | |||
6 | After upgrade, waf build system also upgraded. | ||
7 | |||
8 | on 1.5.19, for cross_compile, subprocess.Popen is set to be | ||
9 | samba_cross.cross_Popen, which will not execute testprog on | ||
10 | host, but only read result from cross-answers.txt which is | ||
11 | passed by option --cross-answer | ||
12 | |||
13 | part of old code: | ||
14 | args = Utils.to_list(kw.get('exec_args', [])) | ||
15 | proc = Utils.pproc.Popen([lastprog] + args, stdout=Utils.pproc.PIPE, stderr=Utils.pproc.PIPE) | ||
16 | |||
17 | but on new version, exec_args is not used and cause do_configure | ||
18 | failed with Exec format error | ||
19 | |||
20 | fixed by append cross anser related args to cmd | ||
21 | |||
22 | Upstream-Status: Submitted [https://gitlab.com/samba-team/samba/merge_requests/211] | ||
23 | |||
24 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
25 | --- | ||
26 | third_party/waf/waflib/Tools/c_config.py | 11 ++++++----- | ||
27 | 1 file changed, 6 insertions(+), 5 deletions(-) | ||
28 | |||
29 | diff --git a/third_party/waf/waflib/Tools/c_config.py b/third_party/waf/waflib/Tools/c_config.py | ||
30 | index 7608215..767cf33 100644 | ||
31 | --- a/third_party/waf/waflib/Tools/c_config.py | ||
32 | +++ b/third_party/waf/waflib/Tools/c_config.py | ||
33 | @@ -660,20 +660,21 @@ class test_exec(Task.Task): | ||
34 | """ | ||
35 | color = 'PINK' | ||
36 | def run(self): | ||
37 | + args = self.generator.bld.kw.get('exec_args', []) | ||
38 | if getattr(self.generator, 'rpath', None): | ||
39 | if getattr(self.generator, 'define_ret', False): | ||
40 | - self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()]) | ||
41 | - else: | ||
42 | - self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()]) | ||
43 | + self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args) | ||
44 | + else: | ||
45 | + self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args) | ||
46 | else: | ||
47 | env = self.env.env or {} | ||
48 | env.update(dict(os.environ)) | ||
49 | for var in ('LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PATH'): | ||
50 | env[var] = self.inputs[0].parent.abspath() + os.path.pathsep + env.get(var, '') | ||
51 | if getattr(self.generator, 'define_ret', False): | ||
52 | - self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env) | ||
53 | + self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args, env=env) | ||
54 | else: | ||
55 | - self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env) | ||
56 | + self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args, env=env) | ||
57 | |||
58 | @feature('test_exec') | ||
59 | @after_method('apply_link') | ||
60 | -- | ||
61 | 2.7.4 | ||
62 | |||
diff --git a/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch b/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch index ee4936a5a..3f2921ed3 100644 --- a/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch +++ b/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch | |||
@@ -1,30 +1,32 @@ | |||
1 | From f4cda3a71311e4496b725bc5f46af93413ec7a1c Mon Sep 17 00:00:00 2001 | 1 | From cc0576405803bcae45ee353c4333c449cead9207 Mon Sep 17 00:00:00 2001 |
2 | From: Bian Naimeng <biannm@cn.fujitsu.com> | 2 | From: Changqing Li <changqing.li@windriver.com> |
3 | Date: Fri, 17 Jul 2015 11:58:49 +0800 | 3 | Date: Tue, 25 Jun 2019 14:25:08 +0800 |
4 | Subject: [PATCH] libldb: add new recipe | 4 | Subject: [PATCH] do not import target module while cross compile |
5 | 5 | ||
6 | Some modules such as dynamic library maybe cann't be imported while cross compile, | 6 | Some modules such as dynamic library maybe cann't be imported |
7 | we just check whether does the module exist. | 7 | while cross compile, we just check whether does the module exist. |
8 | 8 | ||
9 | Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> | 9 | Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> |
10 | 10 | ||
11 | update to version 4.10.5, and switch to python3 | ||
12 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
11 | --- | 13 | --- |
12 | buildtools/wafsamba/samba_bundled.py | 32 ++++++++++++++++++++++++-------- | 14 | buildtools/wafsamba/samba_bundled.py | 27 +++++++++++++++++++-------- |
13 | 1 file changed, 24 insertions(+), 8 deletions(-) | 15 | 1 file changed, 18 insertions(+), 8 deletions(-) |
14 | 16 | ||
15 | diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py | 17 | diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py |
16 | index 253d604..398cc6a 100644 | 18 | index 60ce7da..5468a36 100644 |
17 | --- a/buildtools/wafsamba/samba_bundled.py | 19 | --- a/buildtools/wafsamba/samba_bundled.py |
18 | +++ b/buildtools/wafsamba/samba_bundled.py | 20 | +++ b/buildtools/wafsamba/samba_bundled.py |
19 | @@ -2,6 +2,7 @@ | 21 | @@ -4,6 +4,7 @@ import sys |
22 | from waflib import Build, Options, Logs | ||
23 | from waflib.Configure import conf | ||
24 | from wafsamba import samba_utils | ||
25 | +import importlib.util, os | ||
20 | 26 | ||
21 | import sys | 27 | def PRIVATE_NAME(bld, name, private_extension, private_library): |
22 | import Build, Options, Logs | 28 | '''possibly rename a library to include a bundled extension''' |
23 | +import imp, os | 29 | @@ -249,17 +250,27 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'): |
24 | from Configure import conf | ||
25 | from samba_utils import TO_LIST | ||
26 | |||
27 | @@ -249,17 +250,32 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'): | ||
28 | # versions | 30 | # versions |
29 | minversion = minimum_library_version(conf, libname, minversion) | 31 | minversion = minimum_library_version(conf, libname, minversion) |
30 | 32 | ||
@@ -34,34 +36,32 @@ index 253d604..398cc6a 100644 | |||
34 | - found = False | 36 | - found = False |
35 | - else: | 37 | - else: |
36 | + # Find module in PYTHONPATH | 38 | + # Find module in PYTHONPATH |
37 | + stuff = imp.find_module(modulename, [os.environ["PYTHONPATH"]]) | 39 | + spec = importlib.util._find_spec_from_path(modulename, [os.environ["PYTHONPATH"]]) |
38 | + if stuff: | 40 | + if spec: |
39 | try: | 41 | try: |
40 | - version = m.__version__ | 42 | - version = m.__version__ |
41 | - except AttributeError: | 43 | - except AttributeError: |
42 | + m = imp.load_module(modulename, stuff[0], stuff[1], stuff[2]) | 44 | + module = importlib.util.module_from_spec(spec) |
45 | + spec.loader.load_module(module) | ||
43 | + except ImportError: | 46 | + except ImportError: |
44 | found = False | 47 | found = False |
45 | + | 48 | + |
46 | + if conf.env.CROSS_COMPILE: | 49 | + if conf.env.CROSS_COMPILE: |
47 | + # Some modules such as dynamic library maybe cann't be imported | 50 | + # Some modules such as dynamic library maybe cann't be imported |
48 | + # while cross compile, we just check whether the module exist | 51 | + # while cross compile, we just check whether the module exist |
49 | + Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (stuff[1])) | 52 | + Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (spec.name)) |
50 | + found = True | 53 | + found = True |
51 | else: | 54 | else: |
52 | - found = tuplize_version(version) >= tuplize_version(minversion) | 55 | - found = tuplize_version(version) >= tuplize_version(minversion) |
53 | + try: | 56 | + try: |
54 | + version = m.__version__ | 57 | + version = module.__version__ |
55 | + except AttributeError: | 58 | + except AttributeError: |
56 | + found = False | 59 | + found = False |
57 | + else: | 60 | + else: |
58 | + found = tuplize_version(version) >= tuplize_version(minversion) | 61 | + found = tuplize_version(version) >= tuplize_version(minversion) |
59 | + finally: | ||
60 | + if stuff[0]: | ||
61 | + stuff[0].close() | ||
62 | + else: | ||
63 | + found = False | ||
64 | + | ||
65 | if not found and not conf.LIB_MAY_BE_BUNDLED(libname): | 62 | if not found and not conf.LIB_MAY_BE_BUNDLED(libname): |
66 | Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion)) | 63 | Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion)) |
67 | sys.exit(1) | 64 | sys.exit(1) |
65 | -- | ||
66 | 2.7.4 | ||
67 | |||
diff --git a/meta-networking/recipes-support/libldb/libldb/options-1.4.1.patch b/meta-networking/recipes-support/libldb/libldb/options-1.5.4.patch index 357afbea5..bffd0653b 100644 --- a/meta-networking/recipes-support/libldb/libldb/options-1.4.1.patch +++ b/meta-networking/recipes-support/libldb/libldb/options-1.5.4.patch | |||
@@ -1,6 +1,6 @@ | |||
1 | From ffffd29bc6303d60b3d77048fbbf6776f6fbbe01 Mon Sep 17 00:00:00 2001 | 1 | From 0841c3ed69c388251c1aeae63f2c3813555a54f6 Mon Sep 17 00:00:00 2001 |
2 | From: Changqing Li <changqing.li@windriver.com> | 2 | From: Changqing Li <changqing.li@windriver.com> |
3 | Date: Thu, 19 Jul 2018 16:40:31 +0800 | 3 | Date: Mon, 1 Jul 2019 16:14:16 +0800 |
4 | Subject: [PATCH] ldb: Add configure options for packages | 4 | Subject: [PATCH] ldb: Add configure options for packages |
5 | 5 | ||
6 | Add configure options for the following packages: | 6 | Add configure options for the following packages: |
@@ -15,27 +15,22 @@ Upstream-Status: Inappropriate [oe deterministic build specific] | |||
15 | 15 | ||
16 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | 16 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> |
17 | 17 | ||
18 | Update to version 1.4.1, and fix one configure error | 18 | upgrade to version 1.5.4 |
19 | |||
20 | Cross answers file cross-answers-i586.txt is incomplete with | ||
21 | "Checking for a 64-bit host to support lmdb: UNKNOWN" | ||
22 | |||
23 | we don't support lmdb, so only check when lmdb is support | ||
24 | |||
25 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | 19 | Signed-off-by: Changqing Li <changqing.li@windriver.com> |
26 | --- | 20 | --- |
27 | lib/replace/wscript | 94 ++++++++++++++++++++++++++++++++++++++++------------- | 21 | lib/replace/wscript | 92 +++++++++++++++++++++++++++++++++++++++++------------ |
28 | wscript | 6 ++++ | 22 | wscript | 8 +++++ |
29 | 2 files changed, 77 insertions(+), 23 deletions(-) | 23 | 2 files changed, 79 insertions(+), 21 deletions(-) |
30 | 24 | ||
31 | diff --git a/lib/replace/wscript b/lib/replace/wscript | 25 | diff --git a/lib/replace/wscript b/lib/replace/wscript |
32 | index fd00a42..434192e 100644 | 26 | index a7fd25d..ad26041 100644 |
33 | --- a/lib/replace/wscript | 27 | --- a/lib/replace/wscript |
34 | +++ b/lib/replace/wscript | 28 | +++ b/lib/replace/wscript |
35 | @@ -23,6 +23,41 @@ def set_options(opt): | 29 | @@ -24,6 +24,41 @@ def options(opt): |
30 | opt.BUILTIN_DEFAULT('NONE') | ||
36 | opt.PRIVATE_EXTENSION_DEFAULT('') | 31 | opt.PRIVATE_EXTENSION_DEFAULT('') |
37 | opt.RECURSE('buildtools/wafsamba') | 32 | opt.RECURSE('buildtools/wafsamba') |
38 | 33 | + | |
39 | + opt.add_option('--with-acl', | 34 | + opt.add_option('--with-acl', |
40 | + help=("Enable use of acl"), | 35 | + help=("Enable use of acl"), |
41 | + action="store_true", dest='enable_acl') | 36 | + action="store_true", dest='enable_acl') |
@@ -70,11 +65,10 @@ index fd00a42..434192e 100644 | |||
70 | + opt.add_option('--without-libcap', | 65 | + opt.add_option('--without-libcap', |
71 | + help=("Disable use of libcap"), | 66 | + help=("Disable use of libcap"), |
72 | + action="store_false", dest='enable_libcap', default=False) | 67 | + action="store_false", dest='enable_libcap', default=False) |
73 | + | 68 | |
74 | @Utils.run_once | 69 | @Utils.run_once |
75 | def configure(conf): | 70 | def configure(conf): |
76 | conf.RECURSE('buildtools/wafsamba') | 71 | @@ -34,12 +69,25 @@ def configure(conf): |
77 | @@ -32,12 +67,25 @@ def configure(conf): | ||
78 | conf.DEFINE('HAVE_LIBREPLACE', 1) | 72 | conf.DEFINE('HAVE_LIBREPLACE', 1) |
79 | conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1) | 73 | conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1) |
80 | 74 | ||
@@ -105,23 +99,22 @@ index fd00a42..434192e 100644 | |||
105 | conf.CHECK_HEADERS('port.h') | 99 | conf.CHECK_HEADERS('port.h') |
106 | conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h') | 100 | conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h') |
107 | conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h') | 101 | conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h') |
108 | @@ -108,7 +156,9 @@ def configure(conf): | 102 | @@ -110,8 +158,9 @@ def configure(conf): |
109 | conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h') | 103 | conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h') |
110 | conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h') | 104 | conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h') |
111 | 105 | ||
112 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') | 106 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') |
107 | - conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') | ||
113 | + if Options.options.enable_valgrind: | 108 | + if Options.options.enable_valgrind: |
114 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') | 109 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') |
115 | + | 110 | + conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') |
116 | conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') | 111 | conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') |
117 | conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') | 112 | conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') |
118 | conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') | 113 | conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') |
119 | @@ -340,22 +390,20 @@ def configure(conf): | 114 | @@ -380,20 +429,21 @@ def configure(conf): |
120 | 115 | ||
121 | conf.CHECK_FUNCS('prctl dirname basename') | 116 | strlcpy_in_bsd = False |
122 | 117 | ||
123 | - strlcpy_in_bsd = False | ||
124 | - | ||
125 | - # libbsd on some platforms provides strlcpy and strlcat | 118 | - # libbsd on some platforms provides strlcpy and strlcat |
126 | - if not conf.CHECK_FUNCS('strlcpy strlcat'): | 119 | - if not conf.CHECK_FUNCS('strlcpy strlcat'): |
127 | - if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', | 120 | - if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', |
@@ -136,11 +129,12 @@ index fd00a42..434192e 100644 | |||
136 | - | 129 | - |
137 | - if not conf.CHECK_FUNCS('closefrom'): | 130 | - if not conf.CHECK_FUNCS('closefrom'): |
138 | - conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') | 131 | - conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') |
139 | + if Options.options.enable_libbsd: | 132 | + if Options.options.enable_libbsd: |
140 | + # libbsd on some platforms provides strlcpy and strlcat | 133 | + # libbsd on some platforms provides strlcpy and strlcat |
141 | + if not conf.CHECK_FUNCS('strlcpy strlcat'): | 134 | + if not conf.CHECK_FUNCS('strlcpy strlcat'): |
142 | + conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', | 135 | + if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', |
143 | + checklibc=True) | 136 | + checklibc=True): |
137 | + strlcpy_in_bsd = True | ||
144 | + if not conf.CHECK_FUNCS('getpeereid'): | 138 | + if not conf.CHECK_FUNCS('getpeereid'): |
145 | + conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') | 139 | + conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') |
146 | + if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): | 140 | + if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): |
@@ -153,20 +147,11 @@ index fd00a42..434192e 100644 | |||
153 | 147 | ||
154 | conf.CHECK_CODE(''' | 148 | conf.CHECK_CODE(''' |
155 | struct ucred cred; | 149 | struct ucred cred; |
156 | @@ -699,7 +747,7 @@ def configure(conf): | ||
157 | # look for a method of finding the list of network interfaces | ||
158 | for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']: | ||
159 | bsd_for_strlcpy = '' | ||
160 | - if strlcpy_in_bsd: | ||
161 | + if Options.options.enable_libbsd: | ||
162 | bsd_for_strlcpy = ' bsd' | ||
163 | if conf.CHECK_CODE(''' | ||
164 | #define %s 1 | ||
165 | diff --git a/wscript b/wscript | 150 | diff --git a/wscript b/wscript |
166 | index ad91bc6..2d20fee 100644 | 151 | index d3402a7..d4e0ce1 100644 |
167 | --- a/wscript | 152 | --- a/wscript |
168 | +++ b/wscript | 153 | +++ b/wscript |
169 | @@ -36,6 +36,12 @@ def set_options(opt): | 154 | @@ -38,6 +38,14 @@ def options(opt): |
170 | help='disable new LMDB backend for LDB', | 155 | help='disable new LMDB backend for LDB', |
171 | action='store_true', dest='without_ldb_lmdb', default=False) | 156 | action='store_true', dest='without_ldb_lmdb', default=False) |
172 | 157 | ||
@@ -176,6 +161,8 @@ index ad91bc6..2d20fee 100644 | |||
176 | + opt.add_option('--without-valgrind', | 161 | + opt.add_option('--without-valgrind', |
177 | + help=("disable use of valgrind"), | 162 | + help=("disable use of valgrind"), |
178 | + action="store_false", dest='enable_valgrind', default=False) | 163 | + action="store_false", dest='enable_valgrind', default=False) |
164 | + | ||
165 | + | ||
179 | 166 | ||
180 | def configure(conf): | 167 | def configure(conf): |
181 | conf.RECURSE('lib/tdb') | 168 | conf.RECURSE('lib/tdb') |
diff --git a/meta-networking/recipes-support/libldb/libldb_1.4.1.bb b/meta-networking/recipes-support/libldb/libldb_1.5.4.bb index f3608c6ab..65a643113 100644 --- a/meta-networking/recipes-support/libldb/libldb_1.4.1.bb +++ b/meta-networking/recipes-support/libldb/libldb_1.5.4.bb | |||
@@ -4,16 +4,14 @@ SECTION = "libs" | |||
4 | LICENSE = "LGPL-3.0+ & LGPL-2.1+ & GPL-3.0+" | 4 | LICENSE = "LGPL-3.0+ & LGPL-2.1+ & GPL-3.0+" |
5 | 5 | ||
6 | DEPENDS += "libtdb libtalloc libtevent popt" | 6 | DEPENDS += "libtdb libtalloc libtevent popt" |
7 | RDEPENDS_pyldb += "python samba" | 7 | RDEPENDS_pyldb += "python3" |
8 | RCONFLICTS_${PN} = "samba" | ||
9 | RCONFLICTS_pyldb = "samba-python" | ||
10 | 8 | ||
11 | SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \ | 9 | SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \ |
12 | file://do-not-import-target-module-while-cross-compile.patch \ | 10 | file://do-not-import-target-module-while-cross-compile.patch \ |
13 | file://options-1.4.1.patch \ | ||
14 | file://0001-libldb-fix-config-error.patch \ | ||
15 | file://libldb-fix-musl-libc-unkown-type-error.patch \ | 11 | file://libldb-fix-musl-libc-unkown-type-error.patch \ |
16 | file://libldb-fix-musl-libc-conflict-type-error.patch \ | 12 | file://libldb-fix-musl-libc-conflict-type-error.patch \ |
13 | file://0001-waf-add-support-of-cross_compile.patch \ | ||
14 | file://options-1.5.4.patch \ | ||
17 | " | 15 | " |
18 | 16 | ||
19 | PACKAGECONFIG ??= "\ | 17 | PACKAGECONFIG ??= "\ |
@@ -27,6 +25,7 @@ PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio" | |||
27 | PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd" | 25 | PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd" |
28 | PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap" | 26 | PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap" |
29 | PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind" | 27 | PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind" |
28 | PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb," | ||
30 | 29 | ||
31 | SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'ldap', '', 'file://avoid-openldap-unless-wanted.patch', d)}" | 30 | SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'ldap', '', 'file://avoid-openldap-unless-wanted.patch', d)}" |
32 | 31 | ||
@@ -34,14 +33,18 @@ LIC_FILES_CHKSUM = "file://pyldb.h;endline=24;md5=dfbd238cecad76957f7f860fbe9ada | |||
34 | file://man/ldb.3.xml;beginline=261;endline=262;md5=137f9fd61040c1505d1aa1019663fd08 \ | 33 | file://man/ldb.3.xml;beginline=261;endline=262;md5=137f9fd61040c1505d1aa1019663fd08 \ |
35 | file://tools/ldbdump.c;endline=19;md5=a7d4fc5d1f75676b49df491575a86a42" | 34 | file://tools/ldbdump.c;endline=19;md5=a7d4fc5d1f75676b49df491575a86a42" |
36 | 35 | ||
37 | SRC_URI[md5sum] = "159a1b1a56dcccf410d1bba911be6076" | 36 | SRC_URI[md5sum] = "24d9f18b085ba27f96d4dec643abea39" |
38 | SRC_URI[sha256sum] = "2df13aa25b376b314ce24182c37691959019523de3cc5356c40c1a333b0890a2" | 37 | SRC_URI[sha256sum] = "db5beea64e305ef002a28fc6b6ca8e42b5fbee268bd713ff41e76c56a0a071d3" |
39 | 38 | ||
40 | inherit waf-samba distro_features_check | 39 | inherit waf-samba distro_features_check |
41 | REQUIRED_DISTRO_FEATURES = "pam" | 40 | REQUIRED_DISTRO_FEATURES = "pam" |
42 | 41 | ||
43 | S = "${WORKDIR}/ldb-${PV}" | 42 | S = "${WORKDIR}/ldb-${PV}" |
44 | 43 | ||
44 | #cross_compile cannot use preforked process, since fork process earlier than point subproces.popen | ||
45 | #to cross Popen | ||
46 | export WAF_NO_PREFORK="yes" | ||
47 | |||
45 | EXTRA_OECONF += "--disable-rpath \ | 48 | EXTRA_OECONF += "--disable-rpath \ |
46 | --disable-rpath-install \ | 49 | --disable-rpath-install \ |
47 | --bundled-libraries=cmocka \ | 50 | --bundled-libraries=cmocka \ |
@@ -49,7 +52,6 @@ EXTRA_OECONF += "--disable-rpath \ | |||
49 | --with-modulesdir=${libdir}/ldb/modules \ | 52 | --with-modulesdir=${libdir}/ldb/modules \ |
50 | --with-privatelibdir=${libdir}/ldb \ | 53 | --with-privatelibdir=${libdir}/ldb \ |
51 | --with-libiconv=${STAGING_DIR_HOST}${prefix}\ | 54 | --with-libiconv=${STAGING_DIR_HOST}${prefix}\ |
52 | --without-ldb-lmdb \ | ||
53 | " | 55 | " |
54 | 56 | ||
55 | PACKAGES =+ "pyldb pyldb-dbg pyldb-dev" | 57 | PACKAGES =+ "pyldb pyldb-dbg pyldb-dev" |
@@ -63,8 +65,8 @@ FILES_${PN}-dbg += "${bindir}/.debug/* \ | |||
63 | ${libdir}/ldb/modules/ldb/.debug/*" | 65 | ${libdir}/ldb/modules/ldb/.debug/*" |
64 | 66 | ||
65 | FILES_pyldb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \ | 67 | FILES_pyldb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \ |
66 | ${libdir}/libpyldb-util.so.* \ | 68 | ${libdir}/libpyldb-util.*.so.* \ |
67 | " | 69 | " |
68 | FILES_pyldb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \ | 70 | FILES_pyldb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \ |
69 | ${libdir}/.debug/libpyldb-util.so.*" | 71 | ${libdir}/.debug/libpyldb-util.*.so.*" |
70 | FILES_pyldb-dev = "${libdir}/libpyldb-util.so" | 72 | FILES_pyldb-dev = "${libdir}/libpyldb-util.*.so" |