From 861c0955dde202fbbc53e972293f449f72bb7a1a Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Sat, 5 Jun 2021 21:48:14 +0800 Subject: libldb: upgrade 1.5.8 -> 2.3.0 Refresh patches: do-not-import-target-module-while-cross-compile.patch options-1.5.4.patch avoid-openldap-unless-wanted.patch libldb-fix-musl-libc-conflict-type-error.patch Drop patches: 0001-waf-add-support-of-cross_compile.patch libldb-fix-musl-libc-unkown-type-error.patch Signed-off-by: Yi Zhao Signed-off-by: Khem Raj --- ...-import-target-module-while-cross-compile.patch | 71 +++++++++ .../0001-waf-add-support-of-cross_compile.patch | 62 -------- ...02-ldb-Add-configure-options-for-packages.patch | 173 +++++++++++++++++++++ .../libldb/0003-avoid-openldap-unless-wanted.patch | 30 ++++ .../libldb/avoid-openldap-unless-wanted.patch | 23 --- ...-import-target-module-while-cross-compile.patch | 67 -------- .../libldb-fix-musl-libc-unkown-type-error.patch | 31 ---- .../libldb/libldb/options-1.5.4.patch | 171 -------------------- .../recipes-support/libldb/libldb_1.5.8.bb | 71 --------- .../recipes-support/libldb/libldb_2.3.0.bb | 69 ++++++++ 10 files changed, 343 insertions(+), 425 deletions(-) create mode 100644 meta-networking/recipes-support/libldb/libldb/0001-do-not-import-target-module-while-cross-compile.patch delete mode 100644 meta-networking/recipes-support/libldb/libldb/0001-waf-add-support-of-cross_compile.patch create mode 100644 meta-networking/recipes-support/libldb/libldb/0002-ldb-Add-configure-options-for-packages.patch create mode 100644 meta-networking/recipes-support/libldb/libldb/0003-avoid-openldap-unless-wanted.patch delete mode 100644 meta-networking/recipes-support/libldb/libldb/avoid-openldap-unless-wanted.patch delete mode 100644 meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch delete mode 100644 meta-networking/recipes-support/libldb/libldb/libldb-fix-musl-libc-unkown-type-error.patch delete mode 100644 meta-networking/recipes-support/libldb/libldb/options-1.5.4.patch delete mode 100644 meta-networking/recipes-support/libldb/libldb_1.5.8.bb create mode 100644 meta-networking/recipes-support/libldb/libldb_2.3.0.bb (limited to 'meta-networking') diff --git a/meta-networking/recipes-support/libldb/libldb/0001-do-not-import-target-module-while-cross-compile.patch b/meta-networking/recipes-support/libldb/libldb/0001-do-not-import-target-module-while-cross-compile.patch new file mode 100644 index 0000000000..74f8d8ad0b --- /dev/null +++ b/meta-networking/recipes-support/libldb/libldb/0001-do-not-import-target-module-while-cross-compile.patch @@ -0,0 +1,71 @@ +From 00500909ebb0f51dd3b4e90c665f07158e7fe255 Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Tue, 25 Jun 2019 14:25:08 +0800 +Subject: [PATCH] do not import target module while cross compile + +Some modules such as dynamic library maybe cann't be imported +while cross compile, we just check whether does the module exist. + +Signed-off-by: Bian Naimeng + +update to version 4.10.5, and switch to python3 +Signed-off-by: Changqing Li + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao +--- + buildtools/wafsamba/samba_bundled.py | 27 +++++++++++++++++++-------- + 1 file changed, 19 insertions(+), 8 deletions(-) + +diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py +index 5f080dd..cdc115e 100644 +--- a/buildtools/wafsamba/samba_bundled.py ++++ b/buildtools/wafsamba/samba_bundled.py +@@ -4,6 +4,7 @@ import sys + from waflib import Build, Options, Logs + from waflib.Configure import conf + from wafsamba import samba_utils ++import importlib.util, os + + def PRIVATE_NAME(bld, name, private_extension, private_library): + '''possibly rename a library to include a bundled extension''' +@@ -249,17 +250,27 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'): + # versions + minversion = minimum_library_version(conf, libname, minversion) + +- try: +- m = __import__(modulename) +- except ImportError: +- found = False +- else: ++ # Find module in PYTHONPATH ++ spec = importlib.util._find_spec_from_path(modulename, [os.environ["PYTHONPATH"]]) ++ if spec: + try: +- version = m.__version__ +- except AttributeError: ++ module = importlib.util.module_from_spec(spec) ++ spec.loader.load_module(module) ++ except ImportError: + found = False ++ ++ if conf.env.CROSS_COMPILE: ++ # Some modules such as dynamic library maybe cann't be imported ++ # while cross compile, we just check whether the module exist ++ Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (spec.name)) ++ found = True + else: +- found = tuplize_version(version) >= tuplize_version(minversion) ++ try: ++ version = module.__version__ ++ except AttributeError: ++ found = False ++ else: ++ found = tuplize_version(version) >= tuplize_version(minversion) + if not found and not conf.LIB_MAY_BE_BUNDLED(libname): + Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion)) + sys.exit(1) +-- +2.17.1 + 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 deleted file mode 100644 index 45c5acabb3..0000000000 --- a/meta-networking/recipes-support/libldb/libldb/0001-waf-add-support-of-cross_compile.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 4b8463ff43f8983a706b181c5292491f9f954be1 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Fri, 25 Jan 2019 15:00:59 +0800 -Subject: [PATCH] waf: add support of cross_compile - -After upgrade, waf build system also upgraded. - -on 1.5.19, for cross_compile, subprocess.Popen is set to be -samba_cross.cross_Popen, which will not execute testprog on -host, but only read result from cross-answers.txt which is -passed by option --cross-answer - -part of old code: - args = Utils.to_list(kw.get('exec_args', [])) - proc = Utils.pproc.Popen([lastprog] + args, stdout=Utils.pproc.PIPE, stderr=Utils.pproc.PIPE) - -but on new version, exec_args is not used and cause do_configure -failed with Exec format error - -fixed by append cross anser related args to cmd - -Upstream-Status: Submitted [https://gitlab.com/samba-team/samba/merge_requests/211] - -Signed-off-by: Changqing Li ---- - third_party/waf/waflib/Tools/c_config.py | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/third_party/waf/waflib/Tools/c_config.py b/third_party/waf/waflib/Tools/c_config.py -index 7608215..767cf33 100644 ---- a/third_party/waf/waflib/Tools/c_config.py -+++ b/third_party/waf/waflib/Tools/c_config.py -@@ -660,20 +660,21 @@ class test_exec(Task.Task): - """ - color = 'PINK' - def run(self): -+ args = self.generator.bld.kw.get('exec_args', []) - if getattr(self.generator, 'rpath', None): - if getattr(self.generator, 'define_ret', False): -- self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()]) -- else: -- self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()]) -+ self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args) -+ else: -+ self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args) - else: - env = self.env.env or {} - env.update(dict(os.environ)) - for var in ('LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PATH'): - env[var] = self.inputs[0].parent.abspath() + os.path.pathsep + env.get(var, '') - if getattr(self.generator, 'define_ret', False): -- self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env) -+ self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args, env=env) - else: -- self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env) -+ self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args, env=env) - - @feature('test_exec') - @after_method('apply_link') --- -2.7.4 - diff --git a/meta-networking/recipes-support/libldb/libldb/0002-ldb-Add-configure-options-for-packages.patch b/meta-networking/recipes-support/libldb/libldb/0002-ldb-Add-configure-options-for-packages.patch new file mode 100644 index 0000000000..a55d46bf75 --- /dev/null +++ b/meta-networking/recipes-support/libldb/libldb/0002-ldb-Add-configure-options-for-packages.patch @@ -0,0 +1,173 @@ +From 100d16aaa6fe9a28a5ba77b2de2bde81a3fa3dac Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Mon, 1 Jul 2019 16:14:16 +0800 +Subject: [PATCH] ldb: Add configure options for packages + +Add configure options for the following packages: + - acl + - attr + - libaio + - libbsd + - libcap + - valgrind + +Upstream-Status: Inappropriate [oe deterministic build specific] + +Signed-off-by: Jackie Huang + +upgrade to version 1.5.4 +Signed-off-by: Changqing Li + +Rebase to 2.3.0 +Signed-off-by: Yi Zhao +--- + lib/replace/wscript | 90 +++++++++++++++++++++++++++++++++++---------- + wscript | 8 ++++ + 2 files changed, 78 insertions(+), 20 deletions(-) + +diff --git a/lib/replace/wscript b/lib/replace/wscript +index 2c856b6..36b696d 100644 +--- a/lib/replace/wscript ++++ b/lib/replace/wscript +@@ -25,6 +25,41 @@ def options(opt): + opt.PRIVATE_EXTENSION_DEFAULT('') + opt.RECURSE('buildtools/wafsamba') + ++ opt.add_option('--with-acl', ++ help=("Enable use of acl"), ++ action="store_true", dest='enable_acl') ++ opt.add_option('--without-acl', ++ help=("Disable use of acl"), ++ action="store_false", dest='enable_acl', default=False) ++ ++ opt.add_option('--with-attr', ++ help=("Enable use of attr"), ++ action="store_true", dest='enable_attr') ++ opt.add_option('--without-attr', ++ help=("Disable use of attr"), ++ action="store_false", dest='enable_attr', default=False) ++ ++ opt.add_option('--with-libaio', ++ help=("Enable use of libaio"), ++ action="store_true", dest='enable_libaio') ++ opt.add_option('--without-libaio', ++ help=("Disable use of libaio"), ++ action="store_false", dest='enable_libaio', default=False) ++ ++ opt.add_option('--with-libbsd', ++ help=("Enable use of libbsd"), ++ action="store_true", dest='enable_libbsd') ++ opt.add_option('--without-libbsd', ++ help=("Disable use of libbsd"), ++ action="store_false", dest='enable_libbsd', default=False) ++ ++ opt.add_option('--with-libcap', ++ help=("Enable use of libcap"), ++ action="store_true", dest='enable_libcap') ++ opt.add_option('--without-libcap', ++ help=("Disable use of libcap"), ++ action="store_false", dest='enable_libcap', default=False) ++ + @Utils.run_once + def configure(conf): + conf.RECURSE('buildtools/wafsamba') +@@ -35,12 +70,25 @@ def configure(conf): + conf.DEFINE('HAVE_LIBREPLACE', 1) + conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1) + +- conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h') +- conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h') ++ conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h') ++ conf.CHECK_HEADERS('compat.h ctype.h dustat.h') + conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h') + conf.CHECK_HEADERS('locale.h ndir.h pwd.h') +- conf.CHECK_HEADERS('shadow.h sys/acl.h') +- conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h') ++ conf.CHECK_HEADERS('shadow.h') ++ conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h') ++ ++ if Options.options.enable_acl: ++ conf.CHECK_HEADERS('acl/libacl.h sys/acl.h') ++ ++ if Options.options.enable_attr: ++ conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h') ++ ++ if Options.options.enable_libaio: ++ conf.CHECK_HEADERS('libaio.h') ++ ++ if Options.options.enable_libcap: ++ conf.CHECK_HEADERS('sys/capability.h') ++ + conf.CHECK_HEADERS('port.h') + conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h') + conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h') +@@ -121,8 +169,9 @@ def configure(conf): + conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h') + conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h') + +- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') +- conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') ++ if Options.options.enable_valgrind: ++ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') ++ conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') + conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') + conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') + conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') +@@ -418,20 +467,21 @@ def configure(conf): + + strlcpy_in_bsd = False + +- # libbsd on some platforms provides strlcpy and strlcat +- if not conf.CHECK_FUNCS('strlcpy strlcat'): +- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', +- checklibc=True): +- strlcpy_in_bsd = True +- if not conf.CHECK_FUNCS('getpeereid'): +- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') +- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): +- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') +- if not conf.CHECK_FUNCS('setproctitle_init'): +- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h') +- +- if not conf.CHECK_FUNCS('closefrom'): +- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') ++ if Options.options.enable_libbsd: ++ # libbsd on some platforms provides strlcpy and strlcat ++ if not conf.CHECK_FUNCS('strlcpy strlcat'): ++ if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', ++ checklibc=True): ++ strlcpy_in_bsd = True ++ if not conf.CHECK_FUNCS('getpeereid'): ++ conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') ++ if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): ++ conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') ++ if not conf.CHECK_FUNCS('setproctitle_init'): ++ conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h') ++ ++ if not conf.CHECK_FUNCS('closefrom'): ++ conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') + + conf.CHECK_CODE(''' + struct ucred cred; +diff --git a/wscript b/wscript +index bf6129b..722fdf6 100644 +--- a/wscript ++++ b/wscript +@@ -39,6 +39,14 @@ def options(opt): + help='disable new LMDB backend for LDB', + action='store_true', dest='without_ldb_lmdb', default=False) + ++ opt.add_option('--with-valgrind', ++ help=("enable use of valgrind"), ++ action="store_true", dest='enable_valgrind') ++ opt.add_option('--without-valgrind', ++ help=("disable use of valgrind"), ++ action="store_false", dest='enable_valgrind', default=False) ++ ++ + + def configure(conf): + conf.RECURSE('lib/tdb') +-- +2.17.1 + diff --git a/meta-networking/recipes-support/libldb/libldb/0003-avoid-openldap-unless-wanted.patch b/meta-networking/recipes-support/libldb/libldb/0003-avoid-openldap-unless-wanted.patch new file mode 100644 index 0000000000..dd1246538c --- /dev/null +++ b/meta-networking/recipes-support/libldb/libldb/0003-avoid-openldap-unless-wanted.patch @@ -0,0 +1,30 @@ +From 1f24231095a59debcf25d0e3309dc5d1056a7fad Mon Sep 17 00:00:00 2001 +From: Jens Rehsack +Date: Thu, 19 Nov 2015 20:45:56 +0100 +Subject: [PATCH] avoid openldap unless wanted + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao +--- + wscript | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/wscript b/wscript +index 722fdf6..22700d5 100644 +--- a/wscript ++++ b/wscript +@@ -153,9 +153,7 @@ def configure(conf): + if conf.env.standalone_ldb: + conf.CHECK_XSLTPROC_MANPAGES() + +- # we need this for the ldap backend +- if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'): +- conf.env.ENABLE_LDAP_BACKEND = True ++ conf.env.ENABLE_LDAP_BACKEND = False + + # we don't want any libraries or modules to rely on runtime + # resolution of symbols +-- +2.17.1 + diff --git a/meta-networking/recipes-support/libldb/libldb/avoid-openldap-unless-wanted.patch b/meta-networking/recipes-support/libldb/libldb/avoid-openldap-unless-wanted.patch deleted file mode 100644 index b30afeee20..0000000000 --- a/meta-networking/recipes-support/libldb/libldb/avoid-openldap-unless-wanted.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 63570b98ef63c91d8508478fcbe6b89c90c8398f Mon Sep 17 00:00:00 2001 -From: Jens Rehsack -Date: Thu, 19 Nov 2015 20:45:56 +0100 - ---- - wscript | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/wscript b/wscript -index e7c05d2..1633593 100644 ---- a/wscript -+++ b/wscript -@@ -161,9 +161,7 @@ def configure(conf): - if conf.env.standalone_ldb: - conf.CHECK_XSLTPROC_MANPAGES() - -- # we need this for the ldap backend -- if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'): -- conf.env.ENABLE_LDAP_BACKEND = True -+ conf.env.ENABLE_LDAP_BACKEND = False - - # we don't want any libraries or modules to rely on runtime - # resolution of symbols 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 deleted file mode 100644 index 3f2921ed33..0000000000 --- a/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch +++ /dev/null @@ -1,67 +0,0 @@ -From cc0576405803bcae45ee353c4333c449cead9207 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Tue, 25 Jun 2019 14:25:08 +0800 -Subject: [PATCH] do not import target module while cross compile - -Some modules such as dynamic library maybe cann't be imported -while cross compile, we just check whether does the module exist. - -Signed-off-by: Bian Naimeng - -update to version 4.10.5, and switch to python3 -Signed-off-by: Changqing Li ---- - buildtools/wafsamba/samba_bundled.py | 27 +++++++++++++++++++-------- - 1 file changed, 18 insertions(+), 8 deletions(-) - -diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py -index 60ce7da..5468a36 100644 ---- a/buildtools/wafsamba/samba_bundled.py -+++ b/buildtools/wafsamba/samba_bundled.py -@@ -4,6 +4,7 @@ import sys - from waflib import Build, Options, Logs - from waflib.Configure import conf - from wafsamba import samba_utils -+import importlib.util, os - - def PRIVATE_NAME(bld, name, private_extension, private_library): - '''possibly rename a library to include a bundled extension''' -@@ -249,17 +250,27 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'): - # versions - minversion = minimum_library_version(conf, libname, minversion) - -- try: -- m = __import__(modulename) -- except ImportError: -- found = False -- else: -+ # Find module in PYTHONPATH -+ spec = importlib.util._find_spec_from_path(modulename, [os.environ["PYTHONPATH"]]) -+ if spec: - try: -- version = m.__version__ -- except AttributeError: -+ module = importlib.util.module_from_spec(spec) -+ spec.loader.load_module(module) -+ except ImportError: - found = False -+ -+ if conf.env.CROSS_COMPILE: -+ # Some modules such as dynamic library maybe cann't be imported -+ # while cross compile, we just check whether the module exist -+ Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (spec.name)) -+ found = True - else: -- found = tuplize_version(version) >= tuplize_version(minversion) -+ try: -+ version = module.__version__ -+ except AttributeError: -+ found = False -+ else: -+ found = tuplize_version(version) >= tuplize_version(minversion) - if not found and not conf.LIB_MAY_BE_BUNDLED(libname): - Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion)) - sys.exit(1) --- -2.7.4 - diff --git a/meta-networking/recipes-support/libldb/libldb/libldb-fix-musl-libc-unkown-type-error.patch b/meta-networking/recipes-support/libldb/libldb/libldb-fix-musl-libc-unkown-type-error.patch deleted file mode 100644 index c0e7e8907d..0000000000 --- a/meta-networking/recipes-support/libldb/libldb/libldb-fix-musl-libc-unkown-type-error.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d90534469c5c43bf2a97e5698a5ddb4b7471f92a Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Tue, 24 Jul 2018 10:53:16 +0800 -Subject: [PATCH] libldb: fix musl libc unkoown type error - -tevent.h:1440:8: error: unknown type name 'pid_t'; did you mean 'div_t'? - pid_t *pid, - ^~~~~ - div_t - -Signed-off-by: Changqing Li ---- - lib/tevent/tevent.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h -index aa6fe0d..2572696 100644 ---- a/lib/tevent/tevent.h -+++ b/lib/tevent/tevent.h -@@ -32,6 +32,8 @@ - #include - #include - #include -+#include -+#include - - struct tevent_context; - struct tevent_ops; --- -2.7.4 - diff --git a/meta-networking/recipes-support/libldb/libldb/options-1.5.4.patch b/meta-networking/recipes-support/libldb/libldb/options-1.5.4.patch deleted file mode 100644 index bffd0653b7..0000000000 --- a/meta-networking/recipes-support/libldb/libldb/options-1.5.4.patch +++ /dev/null @@ -1,171 +0,0 @@ -From 0841c3ed69c388251c1aeae63f2c3813555a54f6 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Mon, 1 Jul 2019 16:14:16 +0800 -Subject: [PATCH] ldb: Add configure options for packages - -Add configure options for the following packages: - - acl - - attr - - libaio - - libbsd - - libcap - - valgrind - -Upstream-Status: Inappropriate [oe deterministic build specific] - -Signed-off-by: Jackie Huang - -upgrade to version 1.5.4 -Signed-off-by: Changqing Li ---- - lib/replace/wscript | 92 +++++++++++++++++++++++++++++++++++++++++------------ - wscript | 8 +++++ - 2 files changed, 79 insertions(+), 21 deletions(-) - -diff --git a/lib/replace/wscript b/lib/replace/wscript -index a7fd25d..ad26041 100644 ---- a/lib/replace/wscript -+++ b/lib/replace/wscript -@@ -24,6 +24,41 @@ def options(opt): - opt.BUILTIN_DEFAULT('NONE') - opt.PRIVATE_EXTENSION_DEFAULT('') - opt.RECURSE('buildtools/wafsamba') -+ -+ opt.add_option('--with-acl', -+ help=("Enable use of acl"), -+ action="store_true", dest='enable_acl') -+ opt.add_option('--without-acl', -+ help=("Disable use of acl"), -+ action="store_false", dest='enable_acl', default=False) -+ -+ opt.add_option('--with-attr', -+ help=("Enable use of attr"), -+ action="store_true", dest='enable_attr') -+ opt.add_option('--without-attr', -+ help=("Disable use of attr"), -+ action="store_false", dest='enable_attr', default=False) -+ -+ opt.add_option('--with-libaio', -+ help=("Enable use of libaio"), -+ action="store_true", dest='enable_libaio') -+ opt.add_option('--without-libaio', -+ help=("Disable use of libaio"), -+ action="store_false", dest='enable_libaio', default=False) -+ -+ opt.add_option('--with-libbsd', -+ help=("Enable use of libbsd"), -+ action="store_true", dest='enable_libbsd') -+ opt.add_option('--without-libbsd', -+ help=("Disable use of libbsd"), -+ action="store_false", dest='enable_libbsd', default=False) -+ -+ opt.add_option('--with-libcap', -+ help=("Enable use of libcap"), -+ action="store_true", dest='enable_libcap') -+ opt.add_option('--without-libcap', -+ help=("Disable use of libcap"), -+ action="store_false", dest='enable_libcap', default=False) - - @Utils.run_once - def configure(conf): -@@ -34,12 +69,25 @@ def configure(conf): - conf.DEFINE('HAVE_LIBREPLACE', 1) - conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1) - -- conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h') -- conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h') -+ conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h') -+ conf.CHECK_HEADERS('compat.h ctype.h dustat.h') - conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h') -- conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h') -- conf.CHECK_HEADERS('shadow.h sys/acl.h') -- conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h') -+ conf.CHECK_HEADERS('locale.h ndir.h pwd.h') -+ conf.CHECK_HEADERS('shadow.h') -+ conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h') -+ -+ if Options.options.enable_acl: -+ conf.CHECK_HEADERS('acl/libacl.h sys/acl.h') -+ -+ if Options.options.enable_attr: -+ conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h') -+ -+ if Options.options.enable_libaio: -+ conf.CHECK_HEADERS('libaio.h') -+ -+ if Options.options.enable_libcap: -+ conf.CHECK_HEADERS('sys/capability.h') -+ - conf.CHECK_HEADERS('port.h') - conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h') - conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h') -@@ -110,8 +158,9 @@ def configure(conf): - conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h') - conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h') - -- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') -- conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') -+ if Options.options.enable_valgrind: -+ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') -+ conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') - conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') - conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') - conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') -@@ -380,20 +429,21 @@ def configure(conf): - - strlcpy_in_bsd = False - -- # libbsd on some platforms provides strlcpy and strlcat -- if not conf.CHECK_FUNCS('strlcpy strlcat'): -- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', -- checklibc=True): -- strlcpy_in_bsd = True -- if not conf.CHECK_FUNCS('getpeereid'): -- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') -- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): -- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') -- if not conf.CHECK_FUNCS('setproctitle_init'): -- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h') -- -- if not conf.CHECK_FUNCS('closefrom'): -- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') -+ if Options.options.enable_libbsd: -+ # libbsd on some platforms provides strlcpy and strlcat -+ if not conf.CHECK_FUNCS('strlcpy strlcat'): -+ if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', -+ checklibc=True): -+ strlcpy_in_bsd = True -+ if not conf.CHECK_FUNCS('getpeereid'): -+ conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') -+ if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): -+ conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') -+ if not conf.CHECK_FUNCS('setproctitle_init'): -+ conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h') -+ -+ if not conf.CHECK_FUNCS('closefrom'): -+ conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') - - conf.CHECK_CODE(''' - struct ucred cred; -diff --git a/wscript b/wscript -index d3402a7..d4e0ce1 100644 ---- a/wscript -+++ b/wscript -@@ -38,6 +38,14 @@ def options(opt): - help='disable new LMDB backend for LDB', - action='store_true', dest='without_ldb_lmdb', default=False) - -+ opt.add_option('--with-valgrind', -+ help=("enable use of valgrind"), -+ action="store_true", dest='enable_valgrind') -+ opt.add_option('--without-valgrind', -+ help=("disable use of valgrind"), -+ action="store_false", dest='enable_valgrind', default=False) -+ -+ - - def configure(conf): - conf.RECURSE('lib/tdb') --- -2.7.4 - diff --git a/meta-networking/recipes-support/libldb/libldb_1.5.8.bb b/meta-networking/recipes-support/libldb/libldb_1.5.8.bb deleted file mode 100644 index 199db797a1..0000000000 --- a/meta-networking/recipes-support/libldb/libldb_1.5.8.bb +++ /dev/null @@ -1,71 +0,0 @@ -SUMMARY = "Hierarchical, reference counted memory pool system with destructors" -HOMEPAGE = "http://ldb.samba.org" -SECTION = "libs" -LICENSE = "LGPL-3.0+ & LGPL-2.1+ & GPL-3.0+" - -DEPENDS += "libtdb libtalloc libtevent popt" -RDEPENDS_pyldb += "python3" - -SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \ - file://do-not-import-target-module-while-cross-compile.patch \ - file://libldb-fix-musl-libc-unkown-type-error.patch \ - file://libldb-fix-musl-libc-conflict-type-error.patch \ - file://0001-waf-add-support-of-cross_compile.patch \ - file://options-1.5.4.patch \ - " - -PACKAGECONFIG ??= "\ - ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \ -" -PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl" -PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" -PACKAGECONFIG[ldap] = ",,openldap" -PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio" -PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd" -PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap" -PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind" -PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb," - -SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'ldap', '', 'file://avoid-openldap-unless-wanted.patch', d)}" - -LIC_FILES_CHKSUM = "file://pyldb.h;endline=24;md5=dfbd238cecad76957f7f860fbe9adade \ - file://man/ldb.3.xml;beginline=261;endline=262;md5=137f9fd61040c1505d1aa1019663fd08 \ - file://tools/ldbdump.c;endline=19;md5=a7d4fc5d1f75676b49df491575a86a42" - -SRC_URI[md5sum] = "d9b4bea8b48cd4c4d0c492e65881164b" -SRC_URI[sha256sum] = "ddf7f770643e0a0dda60f2818913f883caeed37fa1e8d6eda0dfe9588c1e3a83" - -inherit waf-samba - -S = "${WORKDIR}/ldb-${PV}" - -#cross_compile cannot use preforked process, since fork process earlier than point subproces.popen -#to cross Popen -export WAF_NO_PREFORK="yes" - -EXTRA_OECONF += "--disable-rpath \ - --disable-rpath-install \ - --bundled-libraries=cmocka \ - --builtin-libraries=replace \ - --with-modulesdir=${libdir}/ldb/modules \ - --with-privatelibdir=${libdir}/ldb \ - --with-libiconv=${STAGING_DIR_HOST}${prefix}\ - " - -PACKAGES =+ "pyldb pyldb-dbg pyldb-dev" - -NOAUTOPACKAGEDEBUG = "1" - -FILES_${PN} += "${libdir}/ldb/*" -FILES_${PN}-dbg += "${bindir}/.debug/* \ - ${libdir}/.debug/* \ - ${libdir}/ldb/.debug/* \ - ${libdir}/ldb/modules/ldb/.debug/*" - -FILES_pyldb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \ - ${libdir}/libpyldb-util.*.so.* \ - " -FILES_pyldb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \ - ${libdir}/.debug/libpyldb-util.*.so.*" -FILES_pyldb-dev = "${libdir}/libpyldb-util.*.so" diff --git a/meta-networking/recipes-support/libldb/libldb_2.3.0.bb b/meta-networking/recipes-support/libldb/libldb_2.3.0.bb new file mode 100644 index 0000000000..3731c260b6 --- /dev/null +++ b/meta-networking/recipes-support/libldb/libldb_2.3.0.bb @@ -0,0 +1,69 @@ +SUMMARY = "Hierarchical, reference counted memory pool system with destructors" +HOMEPAGE = "http://ldb.samba.org" +SECTION = "libs" +LICENSE = "LGPL-3.0+ & LGPL-2.1+ & GPL-3.0+" + +DEPENDS += "libtdb libtalloc libtevent popt" +RDEPENDS_pyldb += "python3" + +SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \ + file://0001-do-not-import-target-module-while-cross-compile.patch \ + file://0002-ldb-Add-configure-options-for-packages.patch \ + file://libldb-fix-musl-libc-conflict-type-error.patch \ + " + +PACKAGECONFIG ??= "\ + ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \ +" +PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl" +PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" +PACKAGECONFIG[ldap] = ",,openldap" +PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio" +PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd" +PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap" +PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind" +PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb," + +SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'ldap', '', 'file://0003-avoid-openldap-unless-wanted.patch', d)}" + +LIC_FILES_CHKSUM = "file://pyldb.h;endline=24;md5=dfbd238cecad76957f7f860fbe9adade \ + file://man/ldb.3.xml;beginline=261;endline=262;md5=137f9fd61040c1505d1aa1019663fd08 \ + file://tools/ldbdump.c;endline=19;md5=a7d4fc5d1f75676b49df491575a86a42" + +SRC_URI[md5sum] = "fe4b1f17f77e2ea52b4e1320d927844c" +SRC_URI[sha256sum] = "a4d308b3d0922ef01f3661a69ebc373e772374defa76cf0979ad21b21f91922d" + +inherit waf-samba + +S = "${WORKDIR}/ldb-${PV}" + +#cross_compile cannot use preforked process, since fork process earlier than point subproces.popen +#to cross Popen +export WAF_NO_PREFORK="yes" + +EXTRA_OECONF += "--disable-rpath \ + --disable-rpath-install \ + --bundled-libraries=cmocka \ + --builtin-libraries=replace \ + --with-modulesdir=${libdir}/ldb/modules \ + --with-privatelibdir=${libdir}/ldb \ + --with-libiconv=${STAGING_DIR_HOST}${prefix}\ + " + +PACKAGES =+ "pyldb pyldb-dbg pyldb-dev" + +NOAUTOPACKAGEDEBUG = "1" + +FILES_${PN} += "${libdir}/ldb/*" +FILES_${PN}-dbg += "${bindir}/.debug/* \ + ${libdir}/.debug/* \ + ${libdir}/ldb/.debug/* \ + ${libdir}/ldb/modules/ldb/.debug/*" + +FILES_pyldb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \ + ${libdir}/libpyldb-util.*.so.* \ + " +FILES_pyldb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \ + ${libdir}/.debug/libpyldb-util.*.so.*" +FILES_pyldb-dev = "${libdir}/libpyldb-util.*.so" -- cgit v1.2.3-54-g00ecf