diff options
| author | Changqing Li <changqing.li@windriver.com> | 2019-07-02 09:58:08 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2019-07-10 09:24:32 -0700 |
| commit | 6b820663d992c4e442205e9c48ba4f8b7be63727 (patch) | |
| tree | ea876c36f3fc8d2761745aace7bd0e7a6fd015cc /meta-networking | |
| parent | 9c74be25c9380cfd6015117c276ce19f253729a8 (diff) | |
| download | meta-openembedded-6b820663d992c4e442205e9c48ba4f8b7be63727.tar.gz | |
libtevent: upgrade 0.9.37 -> 0.10.0
1. switch to python3
2. fix cross-compile problem caused by waf
3. 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')
| -rw-r--r-- | meta-networking/recipes-support/libtevent/libtevent/0001-waf-add-support-of-cross_compile.patch | 62 | ||||
| -rw-r--r-- | meta-networking/recipes-support/libtevent/libtevent/options-0.10.0.patch (renamed from meta-networking/recipes-support/libtevent/libtevent/options-0.9.36.patch) | 62 | ||||
| -rw-r--r-- | meta-networking/recipes-support/libtevent/libtevent_0.10.0.bb (renamed from meta-networking/recipes-support/libtevent/libtevent_0.9.37.bb) | 26 |
3 files changed, 109 insertions, 41 deletions
diff --git a/meta-networking/recipes-support/libtevent/libtevent/0001-waf-add-support-of-cross_compile.patch b/meta-networking/recipes-support/libtevent/libtevent/0001-waf-add-support-of-cross_compile.patch new file mode 100644 index 0000000000..a717f1bbbc --- /dev/null +++ b/meta-networking/recipes-support/libtevent/libtevent/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 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/libtevent/libtevent/options-0.9.36.patch b/meta-networking/recipes-support/libtevent/libtevent/options-0.10.0.patch index 363c5867cc..882af0644a 100644 --- a/meta-networking/recipes-support/libtevent/libtevent/options-0.9.36.patch +++ b/meta-networking/recipes-support/libtevent/libtevent/options-0.10.0.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From c3e2e4f89cf37b27609fd02ad67eb02d0015cc1e Mon Sep 17 00:00:00 2001 | 1 | From b2b19aa9968258b22cf31db0b9dba6bcf96046cf Mon Sep 17 00:00:00 2001 |
| 2 | From: Jackie Huang <jackie.huang@windriver.com> | 2 | From: Changqing Li <changqing.li@windriver.com> |
| 3 | Date: Wed, 21 Sep 2016 09:57:49 +0800 | 3 | Date: Thu, 20 Jun 2019 13:55:44 +0800 |
| 4 | Subject: [PATCH 1/1] tevent: Add configure options for packages | 4 | Subject: [PATCH] Add configure options for packages |
| 5 | 5 | ||
| 6 | Add configure options for the following packages: | 6 | Add configure options for the following packages: |
| 7 | - acl | 7 | - acl |
| @@ -18,16 +18,19 @@ Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | |||
| 18 | Modified to apply to version 0.9.33. | 18 | Modified to apply to version 0.9.33. |
| 19 | 19 | ||
| 20 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | 20 | Signed-off-by: Joe Slater <joe.slater@windriver.com> |
| 21 | |||
| 22 | Update patch to version 0.10.0 | ||
| 23 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
| 21 | --- | 24 | --- |
| 22 | lib/replace/wscript | 89 ++++++++++++++++++++++++++++++++++++++++------------- | 25 | lib/replace/wscript | 89 ++++++++++++++++++++++++++++++++++++++++------------- |
| 23 | wscript | 7 ++++- | 26 | wscript | 6 ++++ |
| 24 | 2 files changed, 73 insertions(+), 23 deletions(-) | 27 | 2 files changed, 74 insertions(+), 21 deletions(-) |
| 25 | 28 | ||
| 26 | diff --git a/lib/replace/wscript b/lib/replace/wscript | 29 | diff --git a/lib/replace/wscript b/lib/replace/wscript |
| 27 | index 2c638b7..079761d 100644 | 30 | index 1d01e1e..5cf444a 100644 |
| 28 | --- a/lib/replace/wscript | 31 | --- a/lib/replace/wscript |
| 29 | +++ b/lib/replace/wscript | 32 | +++ b/lib/replace/wscript |
| 30 | @@ -23,6 +23,41 @@ def set_options(opt): | 33 | @@ -25,6 +25,41 @@ def options(opt): |
| 31 | opt.PRIVATE_EXTENSION_DEFAULT('') | 34 | opt.PRIVATE_EXTENSION_DEFAULT('') |
| 32 | opt.RECURSE('buildtools/wafsamba') | 35 | opt.RECURSE('buildtools/wafsamba') |
| 33 | 36 | ||
| @@ -69,7 +72,7 @@ index 2c638b7..079761d 100644 | |||
| 69 | @Utils.run_once | 72 | @Utils.run_once |
| 70 | def configure(conf): | 73 | def configure(conf): |
| 71 | conf.RECURSE('buildtools/wafsamba') | 74 | conf.RECURSE('buildtools/wafsamba') |
| 72 | @@ -32,12 +67,25 @@ def configure(conf): | 75 | @@ -34,12 +69,25 @@ def configure(conf): |
| 73 | conf.DEFINE('HAVE_LIBREPLACE', 1) | 76 | conf.DEFINE('HAVE_LIBREPLACE', 1) |
| 74 | conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1) | 77 | conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1) |
| 75 | 78 | ||
| @@ -98,24 +101,24 @@ index 2c638b7..079761d 100644 | |||
| 98 | + conf.CHECK_HEADERS('sys/capability.h') | 101 | + conf.CHECK_HEADERS('sys/capability.h') |
| 99 | + | 102 | + |
| 100 | conf.CHECK_HEADERS('port.h') | 103 | conf.CHECK_HEADERS('port.h') |
| 101 | conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h') | 104 | conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h') |
| 102 | conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.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') |
| 103 | @@ -101,7 +149,8 @@ def configure(conf): | 106 | @@ -110,8 +158,9 @@ def configure(conf): |
| 104 | conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h') | 107 | conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h') |
| 105 | conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h') | 108 | conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h') |
| 106 | 109 | ||
| 107 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') | 110 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') |
| 111 | - conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') | ||
| 108 | + if Options.options.enable_valgrind: | 112 | + if Options.options.enable_valgrind: |
| 109 | + 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') | ||
| 110 | conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') | 115 | conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') |
| 111 | conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') | 116 | conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') |
| 112 | conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') | 117 | conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') |
| 113 | @@ -294,22 +343,18 @@ def configure(conf): | 118 | @@ -380,20 +429,18 @@ def configure(conf): |
| 114 | 119 | ||
| 115 | conf.CHECK_FUNCS('prctl dirname basename') | 120 | strlcpy_in_bsd = False |
| 116 | 121 | ||
| 117 | - strlcpy_in_bsd = False | ||
| 118 | - | ||
| 119 | - # libbsd on some platforms provides strlcpy and strlcat | 122 | - # libbsd on some platforms provides strlcpy and strlcat |
| 120 | - if not conf.CHECK_FUNCS('strlcpy strlcat'): | 123 | - if not conf.CHECK_FUNCS('strlcpy strlcat'): |
| 121 | - if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', | 124 | - if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', |
| @@ -127,6 +130,9 @@ index 2c638b7..079761d 100644 | |||
| 127 | - conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') | 130 | - conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') |
| 128 | - if not conf.CHECK_FUNCS('setproctitle_init'): | 131 | - if not conf.CHECK_FUNCS('setproctitle_init'): |
| 129 | - conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h') | 132 | - conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h') |
| 133 | - | ||
| 134 | - if not conf.CHECK_FUNCS('closefrom'): | ||
| 135 | - conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') | ||
| 130 | + if Options.options.enable_libbsd: | 136 | + if Options.options.enable_libbsd: |
| 131 | + # libbsd on some platforms provides strlcpy and strlcat | 137 | + # libbsd on some platforms provides strlcpy and strlcat |
| 132 | + if not conf.CHECK_FUNCS('strlcpy strlcat'): | 138 | + if not conf.CHECK_FUNCS('strlcpy strlcat'): |
| @@ -136,32 +142,20 @@ index 2c638b7..079761d 100644 | |||
| 136 | + conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') | 142 | + conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') |
| 137 | + if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): | 143 | + if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): |
| 138 | + conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') | 144 | + conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') |
| 139 | 145 | + | |
| 140 | - if not conf.CHECK_FUNCS('closefrom'): | ||
| 141 | - conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') | ||
| 142 | + if not conf.CHECK_FUNCS('closefrom'): | 146 | + if not conf.CHECK_FUNCS('closefrom'): |
| 143 | + conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') | 147 | + conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') |
| 144 | 148 | ||
| 145 | conf.CHECK_CODE(''' | 149 | conf.CHECK_CODE(''' |
| 146 | struct ucred cred; | 150 | struct ucred cred; |
| 147 | @@ -660,7 +705,7 @@ removeea setea | ||
| 148 | # look for a method of finding the list of network interfaces | ||
| 149 | for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']: | ||
| 150 | bsd_for_strlcpy = '' | ||
| 151 | - if strlcpy_in_bsd: | ||
| 152 | + if Options.options.enable_libbsd: | ||
| 153 | bsd_for_strlcpy = ' bsd' | ||
| 154 | if conf.CHECK_CODE(''' | ||
| 155 | #define %s 1 | ||
| 156 | diff --git a/wscript b/wscript | 151 | diff --git a/wscript b/wscript |
| 157 | index 94d190f..742f779 100644 | 152 | index ded182a..824a6dd 100644 |
| 158 | --- a/wscript | 153 | --- a/wscript |
| 159 | +++ b/wscript | 154 | +++ b/wscript |
| 160 | @@ -22,7 +22,12 @@ def set_options(opt): | 155 | @@ -25,6 +25,12 @@ def options(opt): |
| 161 | opt.PRIVATE_EXTENSION_DEFAULT('tevent', noextension='tevent') | ||
| 162 | opt.RECURSE('lib/replace') | 156 | opt.RECURSE('lib/replace') |
| 163 | opt.RECURSE('lib/talloc') | 157 | opt.RECURSE('lib/talloc') |
| 164 | - | 158 | |
| 165 | + opt.add_option('--with-valgrind', | 159 | + opt.add_option('--with-valgrind', |
| 166 | + help=("enable use of valgrind"), | 160 | + help=("enable use of valgrind"), |
| 167 | + action="store_true", dest='enable_valgrind') | 161 | + action="store_true", dest='enable_valgrind') |
| @@ -172,5 +166,5 @@ index 94d190f..742f779 100644 | |||
| 172 | def configure(conf): | 166 | def configure(conf): |
| 173 | conf.RECURSE('lib/replace') | 167 | conf.RECURSE('lib/replace') |
| 174 | -- | 168 | -- |
| 175 | 2.16.2 | 169 | 2.7.4 |
| 176 | 170 | ||
diff --git a/meta-networking/recipes-support/libtevent/libtevent_0.9.37.bb b/meta-networking/recipes-support/libtevent/libtevent_0.10.0.bb index 4df251c7f3..25ad7c1d1e 100644 --- a/meta-networking/recipes-support/libtevent/libtevent_0.9.37.bb +++ b/meta-networking/recipes-support/libtevent/libtevent_0.10.0.bb | |||
| @@ -4,16 +4,17 @@ SECTION = "libs" | |||
| 4 | LICENSE = "LGPLv3+" | 4 | LICENSE = "LGPLv3+" |
| 5 | 5 | ||
| 6 | DEPENDS += "libtalloc libtirpc" | 6 | DEPENDS += "libtalloc libtirpc" |
| 7 | RDEPENDS_python-tevent = "python" | 7 | RDEPENDS_python3-tevent = "python3" |
| 8 | 8 | ||
| 9 | SRC_URI = "https://samba.org/ftp/tevent/tevent-${PV}.tar.gz \ | 9 | SRC_URI = "https://samba.org/ftp/tevent/tevent-${PV}.tar.gz \ |
| 10 | file://options-0.9.36.patch \ | 10 | file://options-0.10.0.patch \ |
| 11 | file://0001-libtevent-fix-musl-libc-compile-error.patch \ | 11 | file://0001-libtevent-fix-musl-libc-compile-error.patch \ |
| 12 | file://0001-waf-add-support-of-cross_compile.patch \ | ||
| 12 | " | 13 | " |
| 13 | LIC_FILES_CHKSUM = "file://tevent.h;endline=26;md5=4e458d658cb25e21efc16f720e78b85a" | 14 | LIC_FILES_CHKSUM = "file://tevent.h;endline=26;md5=4e458d658cb25e21efc16f720e78b85a" |
| 14 | 15 | ||
| 15 | SRC_URI[md5sum] = "6859cd4081fdb2a76b1cb4bf1c803a59" | 16 | SRC_URI[md5sum] = "97ea9861252e52c24adf6c45ab676a60" |
| 16 | SRC_URI[sha256sum] = "168345ed65eac03785cf77b95238e7dc66cbb473a42811693a6b0916e5dae7e0" | 17 | SRC_URI[sha256sum] = "33f39612cd6d1ae6a737245784581494846f5bb07827983d2f41f942446aa4e6" |
| 17 | 18 | ||
| 18 | inherit waf-samba | 19 | inherit waf-samba |
| 19 | 20 | ||
| @@ -32,15 +33,26 @@ SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', '', 'file://avoid-attr | |||
| 32 | 33 | ||
| 33 | S = "${WORKDIR}/tevent-${PV}" | 34 | S = "${WORKDIR}/tevent-${PV}" |
| 34 | 35 | ||
| 36 | #cross_compile cannot use preforked process, since fork process earlier than point subproces.popen | ||
| 37 | #to cross Popen | ||
| 38 | export WAF_NO_PREFORK="yes" | ||
| 39 | |||
| 35 | EXTRA_OECONF += "--disable-rpath \ | 40 | EXTRA_OECONF += "--disable-rpath \ |
| 36 | --bundled-libraries=NONE \ | 41 | --bundled-libraries=NONE \ |
| 37 | --builtin-libraries=replace \ | 42 | --builtin-libraries=replace \ |
| 38 | --with-libiconv=${STAGING_DIR_HOST}${prefix}\ | 43 | --with-libiconv=${STAGING_DIR_HOST}${prefix}\ |
| 39 | --without-gettext \ | 44 | --without-gettext \ |
| 40 | " | 45 | " |
| 46 | do_install_append() { | ||
| 47 | # add this link for cross check python module existence. eg: on x86-64 host, check python module | ||
| 48 | # under recipe-sysroot which is mips64. | ||
| 49 | cd ${D}${PYTHON_SITEPACKAGES_DIR}; ln -s _tevent.*.so _tevent.so | ||
| 50 | } | ||
| 51 | |||
| 52 | PACKAGES += "python3-tevent" | ||
| 41 | 53 | ||
| 42 | PACKAGES += "python-tevent" | 54 | RPROVIDES_${PN}-dbg += "python3-tevent-dbg" |
| 43 | 55 | ||
| 44 | RPROVIDES_${PN}-dbg += "python-tevent-dbg" | 56 | FILES_python3-tevent = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" |
| 45 | 57 | ||
| 46 | FILES_python-tevent = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | 58 | INSANE_SKIP_python3-tevent = "dev-so" |
