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