diff options
| -rw-r--r-- | meta-networking/recipes-support/libtdb/libtdb/0001-Makefile-fix-problem-that-waf-cannot-found.patch | 35 | ||||
| -rw-r--r-- | meta-networking/recipes-support/libtdb/libtdb/0001-waf-add-support-of-cross_compile.patch | 63 | ||||
| -rw-r--r-- | meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch | 43 | ||||
| -rw-r--r-- | meta-networking/recipes-support/libtdb/libtdb_1.3.17.bb (renamed from meta-networking/recipes-support/libtdb/libtdb_1.3.16.bb) | 11 |
4 files changed, 133 insertions, 19 deletions
diff --git a/meta-networking/recipes-support/libtdb/libtdb/0001-Makefile-fix-problem-that-waf-cannot-found.patch b/meta-networking/recipes-support/libtdb/libtdb/0001-Makefile-fix-problem-that-waf-cannot-found.patch new file mode 100644 index 0000000000..10f2ef84d3 --- /dev/null +++ b/meta-networking/recipes-support/libtdb/libtdb/0001-Makefile-fix-problem-that-waf-cannot-found.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From 7205761d654636a6c1fad03a3ca40d38e253e192 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Changqing Li <changqing.li@windriver.com> | ||
| 3 | Date: Fri, 25 Jan 2019 16:01:07 +0800 | ||
| 4 | Subject: [PATCH] Makefile: fix problem that waf cannot found | ||
| 5 | |||
| 6 | tdb is subfolder of samba, but it can also build independently. | ||
| 7 | so both path need to be added into PATH | ||
| 8 | |||
| 9 | Upsteam-Status: Inappropriate [oe specific] | ||
| 10 | |||
| 11 | Fix reject by upstream since upsteam need to support both python2/3, | ||
| 12 | so drop add append PATH. refer link: | ||
| 13 | https://gitlab.com/samba-team/samba/merge_requests/209 | ||
| 14 | https://gitlab.com/samba-team/samba/merge_requests/211 | ||
| 15 | |||
| 16 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
| 17 | --- | ||
| 18 | Makefile | 2 +- | ||
| 19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 20 | |||
| 21 | diff --git a/Makefile b/Makefile | ||
| 22 | index 3e70146..64bb393 100644 | ||
| 23 | --- a/Makefile | ||
| 24 | +++ b/Makefile | ||
| 25 | @@ -1,6 +1,6 @@ | ||
| 26 | # simple makefile wrapper to run waf | ||
| 27 | |||
| 28 | -WAF_BINARY=$(PYTHON) ../../buildtools/bin/waf | ||
| 29 | +WAF_BINARY=PATH=buildtools/bin:../../buildtools/bin:$$PATH waf | ||
| 30 | WAF=PYTHONHASHSEED=1 WAF_MAKE=1 $(WAF_BINARY) | ||
| 31 | |||
| 32 | all: | ||
| 33 | -- | ||
| 34 | 2.7.4 | ||
| 35 | |||
diff --git a/meta-networking/recipes-support/libtdb/libtdb/0001-waf-add-support-of-cross_compile.patch b/meta-networking/recipes-support/libtdb/libtdb/0001-waf-add-support-of-cross_compile.patch new file mode 100644 index 0000000000..e20c9a2c24 --- /dev/null +++ b/meta-networking/recipes-support/libtdb/libtdb/0001-waf-add-support-of-cross_compile.patch | |||
| @@ -0,0 +1,63 @@ | |||
| 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 libtdb from 1.3.16 to 1.3.17, waf build system | ||
| 7 | which used by libtdb upgrade from 1.5.19 to 2.0.8 | ||
| 8 | |||
| 9 | on 1.5.19, for cross_compile, subprocess.Popen is set to be | ||
| 10 | samba_cross.cross_Popen, which will not execute testprog on | ||
| 11 | host, but only read result from cross-answers.txt which is | ||
| 12 | passed by option --cross-answer | ||
| 13 | |||
| 14 | part of old code: | ||
| 15 | args = Utils.to_list(kw.get('exec_args', [])) | ||
| 16 | proc = Utils.pproc.Popen([lastprog] + args, stdout=Utils.pproc.PIPE, stderr=Utils.pproc.PIPE) | ||
| 17 | |||
| 18 | but on 2.0.8, exec_args is not used and cause do_configure | ||
| 19 | failed with Exec format error | ||
| 20 | |||
| 21 | fixed by append cross anser related args to cmd | ||
| 22 | |||
| 23 | Upstream-Status: Submitted [https://gitlab.com/samba-team/samba/merge_requests/211] | ||
| 24 | |||
| 25 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
| 26 | --- | ||
| 27 | third_party/waf/waflib/Tools/c_config.py | 11 ++++++----- | ||
| 28 | 1 file changed, 6 insertions(+), 5 deletions(-) | ||
| 29 | |||
| 30 | diff --git a/third_party/waf/waflib/Tools/c_config.py b/third_party/waf/waflib/Tools/c_config.py | ||
| 31 | index 7608215..767cf33 100644 | ||
| 32 | --- a/third_party/waf/waflib/Tools/c_config.py | ||
| 33 | +++ b/third_party/waf/waflib/Tools/c_config.py | ||
| 34 | @@ -660,20 +660,21 @@ class test_exec(Task.Task): | ||
| 35 | """ | ||
| 36 | color = 'PINK' | ||
| 37 | def run(self): | ||
| 38 | + args = self.generator.bld.kw.get('exec_args', []) | ||
| 39 | if getattr(self.generator, 'rpath', None): | ||
| 40 | if getattr(self.generator, 'define_ret', False): | ||
| 41 | - self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()]) | ||
| 42 | - else: | ||
| 43 | - self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()]) | ||
| 44 | + self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args) | ||
| 45 | + else: | ||
| 46 | + self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args) | ||
| 47 | else: | ||
| 48 | env = self.env.env or {} | ||
| 49 | env.update(dict(os.environ)) | ||
| 50 | for var in ('LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PATH'): | ||
| 51 | env[var] = self.inputs[0].parent.abspath() + os.path.pathsep + env.get(var, '') | ||
| 52 | if getattr(self.generator, 'define_ret', False): | ||
| 53 | - self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env) | ||
| 54 | + self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args, env=env) | ||
| 55 | else: | ||
| 56 | - self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env) | ||
| 57 | + self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args, env=env) | ||
| 58 | |||
| 59 | @feature('test_exec') | ||
| 60 | @after_method('apply_link') | ||
| 61 | -- | ||
| 62 | 2.7.4 | ||
| 63 | |||
diff --git a/meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch b/meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch index 365b92da25..e6e10238f1 100644 --- a/meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch +++ b/meta-networking/recipes-support/libtdb/libtdb/tdb-Add-configure-options-for-packages.patch | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | From 6de1affddde4003a956523c330ecf24e22e094ac Mon Sep 17 00:00:00 2001 | 1 | From 13bbc851d9fd7396f087758e614abba60eeb2aad 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:20:32 +0800 | 3 | Date: Wed, 23 Jan 2019 10:14:05 +0800 |
| 4 | Subject: [PATCH] tdb: Add configure options for packages | 4 | Subject: [PATCH] tdb: Add configure options for packages |
| 5 | 5 | ||
| 6 | Add configure options for the following packages: | 6 | Add configure options for the following packages: |
| @@ -21,16 +21,19 @@ Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> | |||
| 21 | 21 | ||
| 22 | Update for libtdb_1.3.16 | 22 | Update for libtdb_1.3.16 |
| 23 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | 23 | Signed-off-by: Changqing Li <changqing.li@windriver.com> |
| 24 | |||
| 25 | Update for libtdb_1.3.17 | ||
| 26 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
| 24 | --- | 27 | --- |
| 25 | lib/replace/wscript | 89 +++++++++++++++++++++++++++++++++++++++++------------ | 28 | lib/replace/wscript | 95 ++++++++++++++++++++++++++++++++++++++++------------- |
| 26 | wscript | 6 ++++ | 29 | wscript | 6 ++++ |
| 27 | 2 files changed, 75 insertions(+), 20 deletions(-) | 30 | 2 files changed, 79 insertions(+), 22 deletions(-) |
| 28 | 31 | ||
| 29 | diff --git a/lib/replace/wscript b/lib/replace/wscript | 32 | diff --git a/lib/replace/wscript b/lib/replace/wscript |
| 30 | index fd00a42..2df83cd 100644 | 33 | index 6cbae93..7aeaf46 100644 |
| 31 | --- a/lib/replace/wscript | 34 | --- a/lib/replace/wscript |
| 32 | +++ b/lib/replace/wscript | 35 | +++ b/lib/replace/wscript |
| 33 | @@ -23,6 +23,41 @@ def set_options(opt): | 36 | @@ -25,6 +25,41 @@ def options(opt): |
| 34 | opt.PRIVATE_EXTENSION_DEFAULT('') | 37 | opt.PRIVATE_EXTENSION_DEFAULT('') |
| 35 | opt.RECURSE('buildtools/wafsamba') | 38 | opt.RECURSE('buildtools/wafsamba') |
| 36 | 39 | ||
| @@ -72,7 +75,7 @@ index fd00a42..2df83cd 100644 | |||
| 72 | @Utils.run_once | 75 | @Utils.run_once |
| 73 | def configure(conf): | 76 | def configure(conf): |
| 74 | conf.RECURSE('buildtools/wafsamba') | 77 | conf.RECURSE('buildtools/wafsamba') |
| 75 | @@ -32,12 +67,25 @@ def configure(conf): | 78 | @@ -34,12 +69,25 @@ def configure(conf): |
| 76 | conf.DEFINE('HAVE_LIBREPLACE', 1) | 79 | conf.DEFINE('HAVE_LIBREPLACE', 1) |
| 77 | conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1) | 80 | conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1) |
| 78 | 81 | ||
| @@ -103,21 +106,24 @@ index fd00a42..2df83cd 100644 | |||
| 103 | conf.CHECK_HEADERS('port.h') | 106 | conf.CHECK_HEADERS('port.h') |
| 104 | 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/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h') |
| 105 | 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 | conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h') |
| 106 | @@ -108,7 +156,9 @@ def configure(conf): | 109 | @@ -110,8 +158,10 @@ def configure(conf): |
| 107 | conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h') | 110 | conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h') |
| 108 | conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h') | 111 | conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h') |
| 109 | 112 | ||
| 110 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') | 113 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') |
| 114 | - conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') | ||
| 111 | + if Options.options.enable_valgrind: | 115 | + if Options.options.enable_valgrind: |
| 112 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') | 116 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') |
| 117 | + conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') | ||
| 113 | + | 118 | + |
| 114 | conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') | 119 | conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') |
| 115 | conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') | 120 | conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') |
| 116 | conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') | 121 | conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') |
| 117 | @@ -342,20 +392,19 @@ def configure(conf): | 122 | @@ -379,21 +429,22 @@ def configure(conf): |
| 123 | conf.CHECK_FUNCS('prctl dirname basename') | ||
| 118 | 124 | ||
| 119 | strlcpy_in_bsd = False | 125 | strlcpy_in_bsd = False |
| 120 | 126 | - | |
| 121 | - # libbsd on some platforms provides strlcpy and strlcat | 127 | - # libbsd on some platforms provides strlcpy and strlcat |
| 122 | - if not conf.CHECK_FUNCS('strlcpy strlcat'): | 128 | - if not conf.CHECK_FUNCS('strlcpy strlcat'): |
| 123 | - if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', | 129 | - if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', |
| @@ -132,27 +138,30 @@ index fd00a42..2df83cd 100644 | |||
| 132 | - | 138 | - |
| 133 | - if not conf.CHECK_FUNCS('closefrom'): | 139 | - if not conf.CHECK_FUNCS('closefrom'): |
| 134 | - conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') | 140 | - conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') |
| 141 | + | ||
| 135 | + if Options.options.enable_libbsd: | 142 | + if Options.options.enable_libbsd: |
| 136 | + # libbsd on some platforms provides strlcpy and strlcat | 143 | + # libbsd on some platforms provides strlcpy and strlcat |
| 137 | + if not conf.CHECK_FUNCS('strlcpy strlcat'): | 144 | + if not conf.CHECK_FUNCS('strlcpy strlcat'): |
| 138 | + conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', | 145 | + if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', |
| 139 | + checklibc=True) | 146 | + checklibc=True): |
| 147 | + strlcpy_in_bsd = True | ||
| 140 | + if not conf.CHECK_FUNCS('getpeereid'): | 148 | + if not conf.CHECK_FUNCS('getpeereid'): |
| 141 | + conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') | 149 | + conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') |
| 142 | + if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): | 150 | + if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): |
| 143 | + conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') | 151 | + conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') |
| 152 | + if not conf.CHECK_FUNCS('setproctitle_init'): | ||
| 153 | + conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
| 144 | + | 154 | + |
| 145 | + if not conf.CHECK_FUNCS('closefrom'): | 155 | + if not conf.CHECK_FUNCS('closefrom'): |
| 146 | + conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') | 156 | + conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') |
| 147 | + | ||
| 148 | 157 | ||
| 149 | conf.CHECK_CODE(''' | 158 | conf.CHECK_CODE(''' |
| 150 | struct ucred cred; | 159 | struct ucred cred; |
| 151 | diff --git a/wscript b/wscript | 160 | diff --git a/wscript b/wscript |
| 152 | index 6505648..6608481 100644 | 161 | index bc5ee26..9ac10b6 100644 |
| 153 | --- a/wscript | 162 | --- a/wscript |
| 154 | +++ b/wscript | 163 | +++ b/wscript |
| 155 | @@ -63,6 +63,12 @@ def set_options(opt): | 164 | @@ -69,6 +69,12 @@ def options(opt): |
| 156 | action="store_true", dest='disable_tdb_mutex_locking', | 165 | action="store_true", dest='disable_tdb_mutex_locking', |
| 157 | default=False) | 166 | default=False) |
| 158 | 167 | ||
diff --git a/meta-networking/recipes-support/libtdb/libtdb_1.3.16.bb b/meta-networking/recipes-support/libtdb/libtdb_1.3.17.bb index 0579ed6e3b..4c7755cba3 100644 --- a/meta-networking/recipes-support/libtdb/libtdb_1.3.16.bb +++ b/meta-networking/recipes-support/libtdb/libtdb_1.3.17.bb | |||
| @@ -9,15 +9,18 @@ LIC_FILES_CHKSUM = "file://tools/tdbdump.c;endline=18;md5=b59cd45aa8624578126a8c | |||
| 9 | SRC_URI = "https://samba.org/ftp/tdb/tdb-${PV}.tar.gz \ | 9 | SRC_URI = "https://samba.org/ftp/tdb/tdb-${PV}.tar.gz \ |
| 10 | file://do-not-check-xsltproc-manpages.patch \ | 10 | file://do-not-check-xsltproc-manpages.patch \ |
| 11 | file://tdb-Add-configure-options-for-packages.patch \ | 11 | file://tdb-Add-configure-options-for-packages.patch \ |
| 12 | file://0001-waf-add-support-of-cross_compile.patch \ | ||
| 13 | file://0001-Makefile-fix-problem-that-waf-cannot-found.patch \ | ||
| 12 | " | 14 | " |
| 13 | 15 | ||
| 14 | SRC_URI[md5sum] = "7d06d8709188e07df853d9e91db88927" | 16 | SRC_URI[md5sum] = "519d373ac72a66b0a2739dbb495de127" |
| 15 | SRC_URI[sha256sum] = "6a3fc2616567f23993984ada3cea97d953a27669ffd1bfbbe961f26e0cf96cc5" | 17 | SRC_URI[sha256sum] = "1cb4399394c60a773430ca54848359adcf54fb6f136afdcfcbbe62b5f4245614" |
| 16 | 18 | ||
| 17 | PACKAGECONFIG ??= "\ | 19 | PACKAGECONFIG ??= "\ |
| 18 | ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \ | 20 | ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \ |
| 19 | ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \ | 21 | ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \ |
| 20 | " | 22 | " |
| 23 | |||
| 21 | PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl" | 24 | PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl" |
| 22 | PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" | 25 | PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" |
| 23 | PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio" | 26 | PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio" |
| @@ -29,6 +32,10 @@ S = "${WORKDIR}/tdb-${PV}" | |||
| 29 | 32 | ||
| 30 | inherit waf-samba | 33 | inherit waf-samba |
| 31 | 34 | ||
| 35 | #cross_compile cannot use preforked process, since fork process earlier than point subproces.popen | ||
| 36 | #to cross Popen | ||
| 37 | export WAF_NO_PREFORK="yes" | ||
| 38 | |||
| 32 | EXTRA_OECONF += "--disable-rpath \ | 39 | EXTRA_OECONF += "--disable-rpath \ |
| 33 | --bundled-libraries=NONE \ | 40 | --bundled-libraries=NONE \ |
| 34 | --builtin-libraries=replace \ | 41 | --builtin-libraries=replace \ |
