diff options
author | Jackie Huang <jackie.huang@windriver.com> | 2016-09-21 13:41:07 +0800 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2016-10-20 11:16:38 -0400 |
commit | 529171574c66b42f3b82da6fb6bda66e564851c9 (patch) | |
tree | edbb1e002de249de0053bc467a0e244d355cc7eb | |
parent | 778a2b6793f1a30eaef325797c57d45745788b4a (diff) | |
download | meta-openembedded-529171574c66b42f3b82da6fb6bda66e564851c9.tar.gz |
libtevent: fixes for deterministic builds
* Add configure option and PACKAGECONFIG for
the following packages:
- acl
- attr
- libaio
- libbsd
- libcap
- valgrind
* They are all optional, so disable by default
or control them based on DISTRO_FEATURES.
* Remove the direct dependency on libaio and libbsd
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r-- | meta-networking/recipes-support/libtevent/libtevent/tevent-Add-configure-options-for-packages.patch | 180 | ||||
-rw-r--r-- | meta-networking/recipes-support/libtevent/libtevent_0.9.29.bb | 17 |
2 files changed, 194 insertions, 3 deletions
diff --git a/meta-networking/recipes-support/libtevent/libtevent/tevent-Add-configure-options-for-packages.patch b/meta-networking/recipes-support/libtevent/libtevent/tevent-Add-configure-options-for-packages.patch new file mode 100644 index 0000000000..ddb8e4e23b --- /dev/null +++ b/meta-networking/recipes-support/libtevent/libtevent/tevent-Add-configure-options-for-packages.patch | |||
@@ -0,0 +1,180 @@ | |||
1 | From c00f6d35bdc06dffb54daa815e57b44210a5de04 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jackie Huang <jackie.huang@windriver.com> | ||
3 | Date: Wed, 21 Sep 2016 09:57:49 +0800 | ||
4 | Subject: [PATCH] tevent: Add configure options for packages | ||
5 | |||
6 | Add configure options for the following packages: | ||
7 | - acl | ||
8 | - attr | ||
9 | - libaio | ||
10 | - libbsd | ||
11 | - libcap | ||
12 | - valgrind | ||
13 | |||
14 | Upstream-Status: Inappropriate [oe deterministic build specific] | ||
15 | |||
16 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
17 | --- | ||
18 | lib/replace/system/wscript_configure | 6 ++- | ||
19 | lib/replace/wscript | 85 ++++++++++++++++++++++++++++-------- | ||
20 | wscript | 7 ++- | ||
21 | 3 files changed, 79 insertions(+), 19 deletions(-) | ||
22 | mode change 100755 => 100644 wscript | ||
23 | |||
24 | diff --git a/lib/replace/system/wscript_configure b/lib/replace/system/wscript_configure | ||
25 | index 2035474..10f9ae7 100644 | ||
26 | --- a/lib/replace/system/wscript_configure | ||
27 | +++ b/lib/replace/system/wscript_configure | ||
28 | @@ -1,6 +1,10 @@ | ||
29 | #!/usr/bin/env python | ||
30 | |||
31 | -conf.CHECK_HEADERS('sys/capability.h') | ||
32 | +import Options | ||
33 | + | ||
34 | +if Options.options.enable_libcap: | ||
35 | + conf.CHECK_HEADERS('sys/capability.h') | ||
36 | + | ||
37 | conf.CHECK_FUNCS('getpwnam_r getpwuid_r getpwent_r') | ||
38 | |||
39 | # solaris varients of getXXent_r | ||
40 | diff --git a/lib/replace/wscript b/lib/replace/wscript | ||
41 | index fc43e1a..12d2a70 100644 | ||
42 | --- a/lib/replace/wscript | ||
43 | +++ b/lib/replace/wscript | ||
44 | @@ -23,6 +23,41 @@ def set_options(opt): | ||
45 | opt.PRIVATE_EXTENSION_DEFAULT('') | ||
46 | opt.RECURSE('buildtools/wafsamba') | ||
47 | |||
48 | + opt.add_option('--with-acl', | ||
49 | + help=("Enable use of acl"), | ||
50 | + action="store_true", dest='enable_acl') | ||
51 | + opt.add_option('--without-acl', | ||
52 | + help=("Disable use of acl"), | ||
53 | + action="store_false", dest='enable_acl', default=False) | ||
54 | + | ||
55 | + opt.add_option('--with-attr', | ||
56 | + help=("Enable use of attr"), | ||
57 | + action="store_true", dest='enable_attr') | ||
58 | + opt.add_option('--without-attr', | ||
59 | + help=("Disable use of attr"), | ||
60 | + action="store_false", dest='enable_attr', default=False) | ||
61 | + | ||
62 | + opt.add_option('--with-libaio', | ||
63 | + help=("Enable use of libaio"), | ||
64 | + action="store_true", dest='enable_libaio') | ||
65 | + opt.add_option('--without-libaio', | ||
66 | + help=("Disable use of libaio"), | ||
67 | + action="store_false", dest='enable_libaio', default=False) | ||
68 | + | ||
69 | + opt.add_option('--with-libbsd', | ||
70 | + help=("Enable use of libbsd"), | ||
71 | + action="store_true", dest='enable_libbsd') | ||
72 | + opt.add_option('--without-libbsd', | ||
73 | + help=("Disable use of libbsd"), | ||
74 | + action="store_false", dest='enable_libbsd', default=False) | ||
75 | + | ||
76 | + opt.add_option('--with-libcap', | ||
77 | + help=("Enable use of libcap"), | ||
78 | + action="store_true", dest='enable_libcap') | ||
79 | + opt.add_option('--without-libcap', | ||
80 | + help=("Disable use of libcap"), | ||
81 | + action="store_false", dest='enable_libcap', default=False) | ||
82 | + | ||
83 | @Utils.run_once | ||
84 | def configure(conf): | ||
85 | conf.RECURSE('buildtools/wafsamba') | ||
86 | @@ -32,12 +67,25 @@ def configure(conf): | ||
87 | conf.DEFINE('HAVE_LIBREPLACE', 1) | ||
88 | conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1) | ||
89 | |||
90 | - conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h') | ||
91 | - conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h') | ||
92 | + conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h') | ||
93 | + conf.CHECK_HEADERS('compat.h ctype.h dustat.h') | ||
94 | conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h') | ||
95 | - conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h') | ||
96 | - conf.CHECK_HEADERS('shadow.h sys/acl.h') | ||
97 | - conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h') | ||
98 | + conf.CHECK_HEADERS('locale.h ndir.h pwd.h') | ||
99 | + conf.CHECK_HEADERS('shadow.h') | ||
100 | + conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h') | ||
101 | + | ||
102 | + if Options.options.enable_acl: | ||
103 | + conf.CHECK_HEADERS('acl/libacl.h sys/acl.h') | ||
104 | + | ||
105 | + if Options.options.enable_attr: | ||
106 | + conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h') | ||
107 | + | ||
108 | + if Options.options.enable_libaio: | ||
109 | + conf.CHECK_HEADERS('libaio.h') | ||
110 | + | ||
111 | + if Options.options.enable_libcap: | ||
112 | + conf.CHECK_HEADERS('sys/capability.h') | ||
113 | + | ||
114 | conf.CHECK_HEADERS('port.h') | ||
115 | conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h') | ||
116 | conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h') | ||
117 | @@ -73,7 +121,9 @@ def configure(conf): | ||
118 | |||
119 | conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H') | ||
120 | |||
121 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') | ||
122 | + if Options.options.enable_valgrind: | ||
123 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') | ||
124 | + | ||
125 | conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') | ||
126 | conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') | ||
127 | conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') | ||
128 | @@ -248,17 +298,18 @@ def configure(conf): | ||
129 | |||
130 | conf.CHECK_FUNCS('prctl dirname basename') | ||
131 | |||
132 | - # libbsd on some platforms provides strlcpy and strlcat | ||
133 | - if not conf.CHECK_FUNCS('strlcpy strlcat'): | ||
134 | - conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', | ||
135 | - checklibc=True) | ||
136 | - if not conf.CHECK_FUNCS('getpeereid'): | ||
137 | - conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
138 | - if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): | ||
139 | - conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
140 | - | ||
141 | - if not conf.CHECK_FUNCS('closefrom'): | ||
142 | - conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') | ||
143 | + if Options.options.enable_libbsd: | ||
144 | + # libbsd on some platforms provides strlcpy and strlcat | ||
145 | + if not conf.CHECK_FUNCS('strlcpy strlcat'): | ||
146 | + conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', | ||
147 | + checklibc=True) | ||
148 | + if not conf.CHECK_FUNCS('getpeereid'): | ||
149 | + conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
150 | + if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): | ||
151 | + conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
152 | + | ||
153 | + if not conf.CHECK_FUNCS('closefrom'): | ||
154 | + conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') | ||
155 | |||
156 | conf.CHECK_CODE(''' | ||
157 | struct ucred cred; | ||
158 | diff --git a/wscript b/wscript | ||
159 | old mode 100755 | ||
160 | new mode 100644 | ||
161 | index 71b9475..50793db | ||
162 | --- a/wscript | ||
163 | +++ b/wscript | ||
164 | @@ -26,7 +26,12 @@ def set_options(opt): | ||
165 | opt.add_option('--disable-python', | ||
166 | help=("disable the pytevent module"), | ||
167 | action="store_true", dest='disable_python', default=False) | ||
168 | - | ||
169 | + opt.add_option('--with-valgrind', | ||
170 | + help=("enable use of valgrind"), | ||
171 | + action="store_true", dest='enable_valgrind') | ||
172 | + opt.add_option('--without-valgrind', | ||
173 | + help=("disable use of valgrind"), | ||
174 | + action="store_false", dest='enable_valgrind', default=False) | ||
175 | |||
176 | def configure(conf): | ||
177 | conf.RECURSE('lib/replace') | ||
178 | -- | ||
179 | 2.8.3 | ||
180 | |||
diff --git a/meta-networking/recipes-support/libtevent/libtevent_0.9.29.bb b/meta-networking/recipes-support/libtevent/libtevent_0.9.29.bb index 222a22aa32..9f4e235c5d 100644 --- a/meta-networking/recipes-support/libtevent/libtevent_0.9.29.bb +++ b/meta-networking/recipes-support/libtevent/libtevent_0.9.29.bb | |||
@@ -3,10 +3,12 @@ HOMEPAGE = "http://tevent.samba.org" | |||
3 | SECTION = "libs" | 3 | SECTION = "libs" |
4 | LICENSE = "LGPLv3+" | 4 | LICENSE = "LGPLv3+" |
5 | 5 | ||
6 | DEPENDS += "libaio libbsd libtalloc" | 6 | DEPENDS += "libtalloc" |
7 | RDEPENDS_python-tevent = "python" | 7 | RDEPENDS_python-tevent = "python" |
8 | 8 | ||
9 | SRC_URI = "http://samba.org/ftp/tevent/tevent-${PV}.tar.gz" | 9 | SRC_URI = "http://samba.org/ftp/tevent/tevent-${PV}.tar.gz \ |
10 | file://tevent-Add-configure-options-for-packages.patch \ | ||
11 | " | ||
10 | LIC_FILES_CHKSUM = "file://tevent.h;endline=26;md5=4e458d658cb25e21efc16f720e78b85a" | 12 | LIC_FILES_CHKSUM = "file://tevent.h;endline=26;md5=4e458d658cb25e21efc16f720e78b85a" |
11 | 13 | ||
12 | SRC_URI[md5sum] = "4372c1430a1ecb7ea0adddfdf21c0d55" | 14 | SRC_URI[md5sum] = "4372c1430a1ecb7ea0adddfdf21c0d55" |
@@ -14,7 +16,16 @@ SRC_URI[sha256sum] = "a4f519b0bbb718fe2175bee9011ee4d199675f28c2ef80531be38e7bba | |||
14 | 16 | ||
15 | inherit waf-samba | 17 | inherit waf-samba |
16 | 18 | ||
17 | PACKAGECONFIG[attr] = ",,attr" | 19 | PACKAGECONFIG ??= "\ |
20 | ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ | ||
21 | ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \ | ||
22 | " | ||
23 | PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl" | ||
24 | PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" | ||
25 | PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio" | ||
26 | PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd" | ||
27 | PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap" | ||
28 | PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind" | ||
18 | 29 | ||
19 | SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', '', 'file://avoid-attr-unless-wanted.patch', d)}" | 30 | SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', '', 'file://avoid-attr-unless-wanted.patch', d)}" |
20 | 31 | ||