Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 1 | From 13bbc851d9fd7396f087758e614abba60eeb2aad Mon Sep 17 00:00:00 2001 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 2 | From: Changqing Li <changqing.li@windriver.com> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 3 | Date: Wed, 23 Jan 2019 10:14:05 +0800 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 4 | Subject: [PATCH] tdb: Add configure options for packages |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 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> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 17 | |
| 18 | Update for libtdb_1.3.14. |
| 19 | |
| 20 | Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 21 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 22 | Update for libtdb_1.3.16 |
| 23 | Signed-off-by: Changqing Li <changqing.li@windriver.com> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 24 | |
| 25 | Update for libtdb_1.3.17 |
| 26 | Signed-off-by: Changqing Li <changqing.li@windriver.com> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 27 | --- |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 28 | lib/replace/wscript | 95 ++++++++++++++++++++++++++++++++++++++++------------- |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 29 | wscript | 6 ++++ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 30 | 2 files changed, 79 insertions(+), 22 deletions(-) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 31 | |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 32 | diff --git a/lib/replace/wscript b/lib/replace/wscript |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 33 | index 6cbae93..7aeaf46 100644 |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 34 | --- a/lib/replace/wscript |
| 35 | +++ b/lib/replace/wscript |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 36 | @@ -25,6 +25,41 @@ def options(opt): |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 37 | opt.PRIVATE_EXTENSION_DEFAULT('') |
| 38 | opt.RECURSE('buildtools/wafsamba') |
| 39 | |
| 40 | + opt.add_option('--with-acl', |
| 41 | + help=("Enable use of acl"), |
| 42 | + action="store_true", dest='enable_acl') |
| 43 | + opt.add_option('--without-acl', |
| 44 | + help=("Disable use of acl"), |
| 45 | + action="store_false", dest='enable_acl', default=False) |
| 46 | + |
| 47 | + opt.add_option('--with-attr', |
| 48 | + help=("Enable use of attr"), |
| 49 | + action="store_true", dest='enable_attr') |
| 50 | + opt.add_option('--without-attr', |
| 51 | + help=("Disable use of attr"), |
| 52 | + action="store_false", dest='enable_attr', default=False) |
| 53 | + |
| 54 | + opt.add_option('--with-libaio', |
| 55 | + help=("Enable use of libaio"), |
| 56 | + action="store_true", dest='enable_libaio') |
| 57 | + opt.add_option('--without-libaio', |
| 58 | + help=("Disable use of libaio"), |
| 59 | + action="store_false", dest='enable_libaio', default=False) |
| 60 | + |
| 61 | + opt.add_option('--with-libbsd', |
| 62 | + help=("Enable use of libbsd"), |
| 63 | + action="store_true", dest='enable_libbsd') |
| 64 | + opt.add_option('--without-libbsd', |
| 65 | + help=("Disable use of libbsd"), |
| 66 | + action="store_false", dest='enable_libbsd', default=False) |
| 67 | + |
| 68 | + opt.add_option('--with-libcap', |
| 69 | + help=("Enable use of libcap"), |
| 70 | + action="store_true", dest='enable_libcap') |
| 71 | + opt.add_option('--without-libcap', |
| 72 | + help=("Disable use of libcap"), |
| 73 | + action="store_false", dest='enable_libcap', default=False) |
| 74 | + |
| 75 | @Utils.run_once |
| 76 | def configure(conf): |
| 77 | conf.RECURSE('buildtools/wafsamba') |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 78 | @@ -34,12 +69,25 @@ def configure(conf): |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 79 | conf.DEFINE('HAVE_LIBREPLACE', 1) |
| 80 | conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1) |
| 81 | |
| 82 | - conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h') |
| 83 | - conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h') |
| 84 | + conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h') |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 85 | + conf.CHECK_HEADERS('attr/xattr.h compat.h ctype.h dustat.h') |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 86 | conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h') |
| 87 | - conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h') |
| 88 | - conf.CHECK_HEADERS('shadow.h sys/acl.h') |
| 89 | - conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h') |
| 90 | + conf.CHECK_HEADERS('locale.h ndir.h pwd.h') |
| 91 | + conf.CHECK_HEADERS('shadow.h') |
| 92 | + conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h') |
| 93 | + |
| 94 | + if Options.options.enable_acl: |
| 95 | + conf.CHECK_HEADERS('acl/libacl.h sys/acl.h') |
| 96 | + |
| 97 | + if Options.options.enable_attr: |
| 98 | + conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h') |
| 99 | + |
| 100 | + if Options.options.enable_libaio: |
| 101 | + conf.CHECK_HEADERS('libaio.h') |
| 102 | + |
| 103 | + if Options.options.enable_libcap: |
| 104 | + conf.CHECK_HEADERS('sys/capability.h') |
| 105 | + |
| 106 | conf.CHECK_HEADERS('port.h') |
| 107 | conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.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') |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 109 | @@ -110,8 +158,10 @@ def configure(conf): |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 110 | conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h') |
| 111 | conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h') |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 112 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 113 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') |
| 114 | - conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 115 | + if Options.options.enable_valgrind: |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 116 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') |
| 117 | + conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 118 | + |
| 119 | conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') |
| 120 | conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') |
| 121 | conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 122 | @@ -379,21 +429,22 @@ def configure(conf): |
| 123 | conf.CHECK_FUNCS('prctl dirname basename') |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 124 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 125 | strlcpy_in_bsd = False |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 126 | - |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 127 | - # libbsd on some platforms provides strlcpy and strlcat |
| 128 | - if not conf.CHECK_FUNCS('strlcpy strlcat'): |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 129 | - if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', |
| 130 | - checklibc=True): |
| 131 | - strlcpy_in_bsd = True |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 132 | - if not conf.CHECK_FUNCS('getpeereid'): |
| 133 | - conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') |
| 134 | - if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): |
| 135 | - conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 136 | - if not conf.CHECK_FUNCS('setproctitle_init'): |
| 137 | - conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h') |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 138 | - |
| 139 | - if not conf.CHECK_FUNCS('closefrom'): |
| 140 | - conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 141 | + |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 142 | + if Options.options.enable_libbsd: |
| 143 | + # libbsd on some platforms provides strlcpy and strlcat |
| 144 | + if not conf.CHECK_FUNCS('strlcpy strlcat'): |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 145 | + if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', |
| 146 | + checklibc=True): |
| 147 | + strlcpy_in_bsd = True |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 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') |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 152 | + if not conf.CHECK_FUNCS('setproctitle_init'): |
| 153 | + conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h') |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 154 | + |
| 155 | + if not conf.CHECK_FUNCS('closefrom'): |
| 156 | + conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') |
| 157 | |
| 158 | conf.CHECK_CODE(''' |
| 159 | struct ucred cred; |
| 160 | diff --git a/wscript b/wscript |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 161 | index bc5ee26..9ac10b6 100644 |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 162 | --- a/wscript |
| 163 | +++ b/wscript |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 164 | @@ -69,6 +69,12 @@ def options(opt): |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 165 | action="store_true", dest='disable_tdb_mutex_locking', |
| 166 | default=False) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 167 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 168 | + opt.add_option('--with-valgrind', |
| 169 | + help=("enable use of valgrind"), |
| 170 | + action="store_true", dest='enable_valgrind') |
| 171 | + opt.add_option('--without-valgrind', |
| 172 | + help=("disable use of valgrind"), |
| 173 | + action="store_false", dest='enable_valgrind', default=False) |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 174 | |
| 175 | def configure(conf): |
| 176 | conf.env.disable_tdb_mutex_locking = getattr(Options.options, |
| 177 | -- |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 178 | 2.7.4 |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 179 | |