summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2016-09-21 13:41:07 +0800
committerJoe MacDonald <joe_macdonald@mentor.com>2016-10-20 11:16:38 -0400
commit529171574c66b42f3b82da6fb6bda66e564851c9 (patch)
treeedbb1e002de249de0053bc467a0e244d355cc7eb
parent778a2b6793f1a30eaef325797c57d45745788b4a (diff)
downloadmeta-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.patch180
-rw-r--r--meta-networking/recipes-support/libtevent/libtevent_0.9.29.bb17
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 @@
1From c00f6d35bdc06dffb54daa815e57b44210a5de04 Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Wed, 21 Sep 2016 09:57:49 +0800
4Subject: [PATCH] tevent: Add configure options for packages
5
6Add configure options for the following packages:
7 - acl
8 - attr
9 - libaio
10 - libbsd
11 - libcap
12 - valgrind
13
14Upstream-Status: Inappropriate [oe deterministic build specific]
15
16Signed-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
24diff --git a/lib/replace/system/wscript_configure b/lib/replace/system/wscript_configure
25index 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
40diff --git a/lib/replace/wscript b/lib/replace/wscript
41index 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;
158diff --git a/wscript b/wscript
159old mode 100755
160new mode 100644
161index 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--
1792.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"
3SECTION = "libs" 3SECTION = "libs"
4LICENSE = "LGPLv3+" 4LICENSE = "LGPLv3+"
5 5
6DEPENDS += "libaio libbsd libtalloc" 6DEPENDS += "libtalloc"
7RDEPENDS_python-tevent = "python" 7RDEPENDS_python-tevent = "python"
8 8
9SRC_URI = "http://samba.org/ftp/tevent/tevent-${PV}.tar.gz" 9SRC_URI = "http://samba.org/ftp/tevent/tevent-${PV}.tar.gz \
10 file://tevent-Add-configure-options-for-packages.patch \
11"
10LIC_FILES_CHKSUM = "file://tevent.h;endline=26;md5=4e458d658cb25e21efc16f720e78b85a" 12LIC_FILES_CHKSUM = "file://tevent.h;endline=26;md5=4e458d658cb25e21efc16f720e78b85a"
11 13
12SRC_URI[md5sum] = "4372c1430a1ecb7ea0adddfdf21c0d55" 14SRC_URI[md5sum] = "4372c1430a1ecb7ea0adddfdf21c0d55"
@@ -14,7 +16,16 @@ SRC_URI[sha256sum] = "a4f519b0bbb718fe2175bee9011ee4d199675f28c2ef80531be38e7bba
14 16
15inherit waf-samba 17inherit waf-samba
16 18
17PACKAGECONFIG[attr] = ",,attr" 19PACKAGECONFIG ??= "\
20 ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
21 ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
22"
23PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
24PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
25PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
26PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
27PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
28PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
18 29
19SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', '', 'file://avoid-attr-unless-wanted.patch', d)}" 30SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', '', 'file://avoid-attr-unless-wanted.patch', d)}"
20 31