]> git.proxmox.com Git - mirror_lxc.git/blame - meson.build
tree-wide: fix HAVE_* checks
[mirror_lxc.git] / meson.build
CommitLineData
9b9d56e6
CB
1# SPDX-License-Identifier: LGPL-2.1-or-later
2
3project('lxc', 'c',
4 version : '4.0.0',
5 license : 'LGPLv2+',
6 default_options: [
25dff4d1 7 'b_lto=true',
66d7d503 8 'b_lto_mode=thin',
455dae78 9 'b_colorout=always',
5e0a302b 10 'b_asneeded=true',
98f3b527 11 'b_pie=true',
66d7d503 12 'b_staticpic=true',
9b9d56e6
CB
13 'c_std=gnu11',
14 'warning_level=2',
15 ],
589e1167 16 meson_version : '>= 0.46',
9b9d56e6
CB
17 )
18
19liblxc_version = '4.0.0'
20
21conf = configuration_data()
22conf.set_quoted('PROJECT_URL', 'https://linuxcontainers.org/lxc/introduction/')
23conf.set('PROJECT_VERSION', meson.project_version(),
24 description : 'Numerical project version (used where a simple number is expected)')
297e5f96
CB
25conf.set('_GNU_SOURCE', true)
26conf.set('__STDC_FORMAT_MACROS', true)
9b9d56e6
CB
27
28version_data = configuration_data()
29version_data.set('LXC_VERSION_MAJOR', '4')
30version_data.set('LXC_VERSION_MINOR', '0')
31version_data.set('LXC_VERSION_MICRO', '7')
32version_data.set('LXC_ABI', '4.0.7')
33version_data.set('LXC_DEVEL', '1')
34version_data.set('LXC_VERSION', '4.0.7-devel')
35
36project_source_root = meson.current_source_dir()
37project_build_root = meson.current_build_dir()
38
39# join_paths ignores the preceding arguments if an absolute component is
40# encountered, so this should canonicalize various paths when they are
41# absolute or relative.
42prefixdir = get_option('prefix')
9b9d56e6 43bindir = join_paths(prefixdir, get_option('bindir'))
bf1f3470
CB
44datadir = join_paths(prefixdir, get_option('datadir'))
45docdir = join_paths(prefixdir, get_option('docdir'))
9b9d56e6
CB
46includedir = join_paths(prefixdir, get_option('includedir'))
47libdir = join_paths(prefixdir, get_option('libdir'))
48libexecdir = join_paths(prefixdir, get_option('libexecdir'))
9b9d56e6 49localstatedir = join_paths('/', get_option('localstatedir'))
bf1f3470
CB
50sbindir = join_paths(prefixdir, get_option('sbindir'))
51sysconfdir = join_paths(prefixdir, get_option('sysconfdir'))
52
9b9d56e6 53apparmorcachedir = get_option('apparmor-cache-dir')
9b9d56e6 54cgrouppattern = get_option('cgroup-pattern')
9b9d56e6
CB
55globalconfig = get_option('global-config')
56
bf1f3470
CB
57logpath = get_option('log-path')
58lxcpathprefix = get_option('config-path')
59rootfsmount = get_option('rootfs-mount-dir')
60runtimepath = join_paths(prefixdir, get_option('runtime-path'))
61
9b9d56e6 62conf.set_quoted('BINDIR', bindir)
bf1f3470 63conf.set_quoted('DATADIR', datadir)
dcfe4e13 64conf.set_quoted('DOCDIR', docdir)
9b9d56e6 65conf.set_quoted('INCLUDEDIR', includedir)
dcfe4e13 66conf.set_quoted('LOCALSTATEDIR', localstatedir)
9b9d56e6
CB
67conf.set_quoted('LIBDIR', libdir)
68conf.set_quoted('LIBEXECDIR', libexecdir)
bf1f3470 69conf.set_quoted('SBINDIR', sbindir)
9b9d56e6 70conf.set_quoted('SYSCONFDIR', sysconfdir)
bf1f3470
CB
71
72conf.set_quoted('LXCINITDIR', libexecdir)
9b9d56e6
CB
73conf.set_quoted('DEFAULT_CGROUP_PATTERN', cgrouppattern)
74conf.set_quoted('RUNTIME_PATH', runtimepath)
bf1f3470
CB
75
76lxcdefaultconfig = join_paths(sysconfdir, 'lxc/default.conf')
77conf.set_quoted('LXC_DEFAULT_CONFIG', lxcdefaultconfig)
78
79lxcapparmorcachedir = join_paths(localstatedir, apparmorcachedir)
80conf.set_quoted('APPARMOR_CACHE_DIR', lxcapparmorcachedir)
81
82lxcrootfsmount = join_paths(prefixdir, rootfsmount)
83conf.set_quoted('LXCROOTFSMOUNT', lxcrootfsmount)
84
85lxcglobalconfig = join_paths(sysconfdir, globalconfig)
86conf.set_quoted('LXC_GLOBAL_CONF', lxcglobalconfig)
87
88lxclogpath = join_paths(localstatedir, logpath)
89conf.set_quoted('LOGPATH', lxclogpath)
90
91lxcpath = join_paths(localstatedir, lxcpathprefix)
92conf.set_quoted('LXCPATH', lxcpath)
93
94lxctemplateconfig = join_paths(datadir, 'lxc/config')
95conf.set_quoted('LXCTEMPLATECONFIG', lxctemplateconfig)
96
97lxctemplatedir = join_paths(datadir, 'lxc/templates')
98conf.set_quoted('LXCTEMPLATEDIR', lxctemplatedir)
99
100lxchookdir = join_paths(datadir, 'lxc/hooks')
101conf.set_quoted('LXCHOOKDIR', lxchookdir)
102
103lxchookbindir = join_paths(libexecdir, 'lxc/hooks')
104conf.set_quoted('LXCBINHOOKDIR', lxchookbindir)
9b9d56e6 105
72f1c44a
CB
106user_network_conf_opt = get_option('user-network-conf')
107lxc_user_network_conf = join_paths(sysconfdir, user_network_conf_opt)
108conf.set_quoted('LXC_USERNIC_CONF', lxc_user_network_conf)
109
110user_network_db_opt = get_option('user-network-db')
111lxc_user_network_db = join_paths(runtimepath, user_network_db_opt)
112conf.set_quoted('LXC_USERNIC_DB', lxc_user_network_db)
113
9b9d56e6 114# AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date --utc --date=@${SOURCE_DATE_EPOCH:-$(date +%s)} '+%Y-%m-%d')")
9b9d56e6
CB
115# AS_AC_EXPAND(LXC_USERNIC_DB, "$with_usernic_db")
116# AS_AC_EXPAND(LXC_DISTRO_SYSCONF, "$distrosysconf")
9b9d56e6
CB
117
118cc = meson.get_compiler('c')
119pkgconfig = import('pkgconfig')
120
121possible_cc_flags = [
9b9d56e6 122 '-Wvla',
9b9d56e6
CB
123 '-Wimplicit-fallthrough=5',
124 '-Wcast-align',
125 '-Wstrict-prototypes',
126 '-fno-strict-aliasing',
127 '-fstack-clash-protection',
128 '-fstack-protector-strong',
129 '--param=ssp-buffer-size=4',
130 '--mcet -fcf-protection',
131 '-Werror=implicit-function-declaration',
132 '-Wlogical-op',
133 '-Wmissing-include-dirs',
134 '-Wold-style-definition',
135 '-Winit-self',
136 '-Wunused-but-set-variable',
137 '-Wno-unused-parameter',
138 '-Wfloat-equal',
139 '-Wsuggest-attribute=noreturn',
140 '-Werror=return-type',
141 '-Werror=incompatible-pointer-types',
142 '-Wformat=2',
143 '-Wshadow',
144 '-Wendif-labels',
145 '-Werror=overflow',
146 '-fdiagnostics-show-option',
147 '-Werror=shift-count-overflow',
148 '-Werror=shift-overflow=2',
149 '-Wdate-time',
150 '-Wnested-externs',
151 '-fasynchronous-unwind-tables',
152 '-fexceptions',
153 '-Warray-bounds',
154 '-Wrestrict',
155 '-Wreturn-local-addr',
156 '-fsanitize=cfi',
157 '-Wstringop-overflow',
158]
159
160possible_link_flags = [
9b9d56e6
CB
161 '-Wl,--gc-sections',
162 '-Wl,-z,relro',
163 '-Wl,-z,now',
9b9d56e6
CB
164 '-Wl,-fuse-ld=gold',
165]
166
167if meson.version().version_compare('>=0.46')
168 add_project_link_arguments(cc.get_supported_link_arguments(possible_link_flags), language : 'c')
169else
170 add_project_link_arguments(possible_link_flags, language : 'c')
171endif
172
173add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : 'c')
174
175foreach header : ['sys/resource.h',
176 'sys/memfd.h',
177 'sys/personality.h',
178 'sys/signalfd.h',
179 'sys/timerfd.h',
180 'pty.h',
181 'utmpx.h',
182 ]
183
184 conf.set10('HAVE_' + header.underscorify().to_upper(),
185 cc.has_header(header))
186endforeach
187
188decl_headers = '''
189#include <uchar.h>
190#include <sys/mount.h>
191#include <sys/stat.h>
192#include <linux/fs.h>
193#include <linux/types.h>
194#include <linux/openat2.h>
195#include <linux/sched.h>
196'''
197
198foreach decl : [
199 '__aligned_u64',
200 'struct mount_attr',
201 'struct open_how',
202 'struct clone_args',
203 ]
204
205 # We get -1 if the size cannot be determined
4ad3a929
CB
206 if cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') > 0
207 conf.set10('HAVE_' + decl.underscorify().to_upper(), true)
9b9d56e6
CB
208 endif
209endforeach
210
211foreach ident : [
7a7f9a14
CB
212 ['bpf', '''#include <sys/syscall.h>
213 #include <unistd.h>'''],
214 ['close_range', '''#include <unistd.h>'''],
215 ['execveat', '''#include <unistd.h>'''],
db4af8c5
CB
216 ['endmntent', '''#include <stdio.h>
217 #include <mntent.h>'''],
7a7f9a14
CB
218 ['faccessat', '''#include <fcntl.h>
219 #include <unistd.h>'''],
220 ['fexecve', '''#include <unistd.h>'''],
db4af8c5 221 ['fgetln', '''#include <stdio.h>'''],
7a7f9a14
CB
222 ['fsconfig', '''#include <sys/mount.h>'''],
223 ['fsmount', '''#include <sys/mount.h>'''],
224 ['fsopen', '''#include <sys/mount.h>'''],
225 ['fspick', '''#include <sys/mount.h>'''],
db4af8c5
CB
226 ['getgrgid_r', '''#include <sys/types.h>
227 #include <grp.h>'''],
228 ['getline', '''#include <stdio.h>'''],
229 ['getsubopt', '''#include <stdlib.h>'''],
7a7f9a14
CB
230 ['gettid', '''#include <sys/types.h>
231 #include <unistd.h>'''],
db4af8c5
CB
232 ['hasmntopt', '''#include <stdio.h>
233 #include <mntent.h>'''],
7a7f9a14
CB
234 ['kcmp', '''#include <linux/kcmp.h>'''],
235 ['keyctl', '''#include <sys/types.h>
236 #include <keyutils.h>'''],
237 ['memfd_create', '''#include <sys/mman.h>'''],
238 ['mount_setattr', '''#include <sys/mount.h>'''],
239 ['move_mount', '''#include <sys/mount.h>'''],
240 ['openat2', '''#include <sys/types.h>
241 #include <sys/stat.h>
242 #include <fctnl.h>'''],
243 ['open_tree', '''#include <sys/mount.h>'''],
244 ['personality', '''#include <sys/personality.h>'''],
245 ['pidfd_open', '''#include <stdlib.h>
246 #include <unistd.h>
247 #include <signal.h>
248 #include <sys/wait.h>'''],
249 ['pidfd_send_signal', '''#include <stdlib.h>
250 #include <unistd.h>
251 #include <signal.h>
252 #include <sys/wait.h>'''],
253 ['pivot_root', '''#include <stdlib.h>
254 #include <unistd.h>'''], # no known header declares pivot_root
255 ['prlimit', '''#include <sys/time.h>
256 #include <sys/resource.h>'''],
257 ['prlimit64', '''#include <sys/time.h>
258 #include <sys/resource.h>'''],
259 ['renameat2', '''#include <stdio.h>
260 #include <fcntl.h>'''],
261 ['sethostname', '''#include <unistd.h>'''],
db4af8c5
CB
262 ['setmntent', '''#include <stdio.h>
263 #include <mntent.h>'''],
7a7f9a14
CB
264 ['setns', '''#include <sched.h>'''],
265 ['signalfd', '''#include <sys/signalfd.h>'''],
266 ['statx', '''#include <sys/types.h>
267 #include <sys/stat.h>
268 #include <unistd.h>'''],
db4af8c5 269 ['strchrnul', '''#include <string.h>'''],
7a7f9a14
CB
270 ['strlcat', '''#include <string.h>'''],
271 ['strlcpy', '''#include <string.h>'''],
272 ['unshare', '''#include <sched.h>'''],
9b9d56e6
CB
273]
274
db4af8c5
CB
275 have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
276 conf.set10('HAVE_' + ident[0].to_upper(), have)
9b9d56e6
CB
277endforeach
278
ea6da257
CB
279sh = find_program('sh')
280git = find_program('git', required : false)
281time_epoch = run_command(sh, '-c', 'echo "$SOURCE_DATE_EPOCH"').stdout().strip()
282if time_epoch == '' and git.found() and run_command('test', '-e', '.git').returncode() == 0
283 # If we're in a git repository, use the creation time of the latest git tag.
284 latest_tag = run_command(git, 'describe', '--abbrev=0', '--tags').stdout().strip()
285 time_epoch = run_command(git, 'log', '--no-show-signature', '-1', '--format=%at', latest_tag).stdout()
286endif
287time_epoch = time_epoch.to_int()
288conf.set('TIME_EPOCH', time_epoch)
289
9b9d56e6 290threads = dependency('threads')
e4384f1c 291libseccomp = dependency('libseccomp')
9b9d56e6
CB
292if libseccomp.found()
293 conf.set10('HAVE_SECCOMP', libseccomp.found())
294
e4384f1c
CB
295 if libseccomp.version().version_compare('>=2.5.0')
296 # https://github.com/seccomp/libseccomp/commit/dead12bc788b259b148cc4d93b970ef0bd602b1a
297 conf.set10('HAVE_DECL_SECCOMP_NOTIFY_FD', true)
9b9d56e6
CB
298 endif
299
e4384f1c
CB
300 if libseccomp.version().version_compare('>=2.0.0')
301 # https://github.com/seccomp/libseccomp/commit/6220c8c0fc479d97b6d3e3166a4e46fbfe25a3c0
302 conf.set10('HAVE_DECL_SECCOMP_SYSCALL_RESOLVE_NAME_ARCH', true)
9b9d56e6
CB
303 endif
304
e4384f1c
CB
305 seccomp_headers = '''
306 #include <seccomp.h>
307 '''
9b9d56e6
CB
308 foreach decl : [
309 'scmp_filter_ctx',
310 'struct seccomp_notif_sizes',
311 'struct clone_args',
312 ]
313
314 # We get -1 if the size cannot be determined
4ad3a929
CB
315 if cc.sizeof(decl, prefix : seccomp_headers, args : '-D_GNU_SOURCE') > 0
316 conf.set10('HAVE_' + decl.underscorify().to_upper(), true)
9b9d56e6
CB
317 endif
318 endforeach
319endif
320
e4384f1c 321libselinux = dependency('libselinux', required : false)
9b9d56e6
CB
322if libselinux.found()
323 conf.set10('HAVE_SELINUX', libselinux.found())
324endif
325
e4384f1c 326libapparmor = dependency('libapparmor', required : false)
9b9d56e6
CB
327if libapparmor.found()
328 conf.set10('HAVE_APPARMOR', libapparmor.found())
329endif
330
331libopenssl = dependency('openssl', required : false)
332if libopenssl.found()
333 conf.set10('HAVE_OPENSSL', libopenssl.found())
334endif
335
336libcap = dependency('libcap', required : false)
337if not libcap.found()
338 # Compat with Ubuntu 14.04 which ships libcap w/o .pc file
4ce4aac4 339 libcap = cc.find_library('cap', required : false)
9b9d56e6
CB
340endif
341
342if libcap.found()
343 conf.set10('HAVE_LIBCAP', libcap.found())
344endif
345
d0a16061
CB
346libcap_static = dependency('libcap', required : false, static : true)
347if not libcap_static.found()
348 # Compat with Ubuntu 14.04 which ships libcap w/o .pc file
349 libcap_static = cc.find_library('cap', required : false, static : true)
350endif
351
352if libcap_static.found()
353 conf.set10('HAVE_STATIC_LIBCAP', libcap_static.found())
354endif
355
db4af8c5
CB
356have = cc.has_function('strchrnul', prefix : '#include <string.h>', args : '-D_GNU_SOURCE')
357conf.set10('HAVE_STRCHRNUL', have)
358
359have = cc.has_function('openpty', prefix : '#include <pty.h>', args : '-D_GNU_SOURCE')
360conf.set10('HAVE_OPENPTY', have)
361
362config_h = configure_file(
363 output : 'config.h',
364 configuration : conf)
365
366add_project_arguments('-include', 'config.h', language : 'c')
367
9b9d56e6 368basic_includes = include_directories(
db4af8c5 369 '.',
9b9d56e6 370 'src',
db4af8c5 371 'src/include')
9b9d56e6
CB
372
373liblxc_includes = [basic_includes, include_directories(
374 'src/lxc/cgroups',
375 'src/lxc/lsm',
376 'src/lxc/storage')]
377
9b9d56e6 378subdir('src/include')
db4af8c5 379subdir('src/lxc/tools/include')
9b9d56e6 380subdir('src/lxc')
9b9d56e6
CB
381
382liblxc = shared_library(
383 'lxc',
384 version : liblxc_version,
db4af8c5 385 include_directories: liblxc_includes,
305490ba
CB
386 link_args : ['-DPIC'],
387 c_args : ['-DPIC'],
9b9d56e6
CB
388 link_whole : [liblxc_static],
389 dependencies : [threads,
390 libseccomp,
391 libcap,
392 libopenssl,
393 libselinux,
394 libapparmor],
e8ef4dea 395 install : true)
297e5f96 396
c6ea1dec
CB
397liblxc_dep = declare_dependency(
398 link_with: liblxc,
399 dependencies : [threads,
400 libseccomp,
401 libcap,
402 libopenssl,
403 libselinux,
404 libapparmor])
405
659611a3
CB
406dummy_config_data = configuration_data()
407dummy_config_data.set_quoted('DUMMY_VARIABLE', '1')
408
d0a16061 409cmd_programs = []
db4af8c5
CB
410subdir('src/lxc/cmd')
411
412public_programs = []
413subdir('src/lxc/tools')
d0a16061 414
75e9b2e6
CB
415hook_programs = []
416subdir('hooks')
417
ea6da257
CB
418found_syscalls = []
419missing_syscalls = []
420
421foreach tuple : [
7a7f9a14
CB
422 ['bpf'],
423 ['close_range'],
db4af8c5 424 ['endmntent'],
7a7f9a14
CB
425 ['execveat'],
426 ['faccessat'],
db4af8c5
CB
427 ['strchrnul'],
428 ['fgetln'],
7a7f9a14
CB
429 ['fsconfig'],
430 ['fsmount'],
431 ['fsopen'],
432 ['fspick'],
db4af8c5
CB
433 ['getgrgid_r'],
434 ['getline'],
435 ['getsubopt'],
ea6da257 436 ['gettid'],
db4af8c5 437 ['hasmntopt'],
ea6da257
CB
438 ['kcmp'],
439 ['keyctl'],
7a7f9a14 440 ['memfd_create'],
ea6da257
CB
441 ['mount_setattr'],
442 ['move_mount'],
7a7f9a14 443 ['openat2'],
ea6da257 444 ['open_tree'],
7a7f9a14
CB
445 ['personality'],
446 ['pidfd_open'],
447 ['pidfd_send_signal'],
448 ['pivot_root'],
ea6da257
CB
449 ['prlimit'],
450 ['prlimit64'],
7a7f9a14
CB
451 ['renameat2'],
452 ['sethostname'],
db4af8c5 453 ['setmntent'],
7a7f9a14
CB
454 ['setns'],
455 ['signalfd'],
456 ['statx'],
457 ['strlcat'],
458 ['strlcpy'],
459 ['unshare'],
ea6da257
CB
460]
461
462 if tuple.length() >= 2
463 cond = tuple[1]
464 else
465 ident1 = 'HAVE_' + tuple[0].underscorify().to_upper()
466 ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper()
467 cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1
468 endif
469 if cond
470 found_syscalls += tuple[0]
471 else
472 missing_syscalls += tuple[0]
473 endif
474endforeach
475
476found_types = []
477missing_types = []
478
479foreach tuple : [
480 ['scmp_filter_ctx'],
481 ['struct seccomp_notif_sizes'],
482 ['struct clone_args'],
483 ['__aligned_u64'],
484 ['struct mount_attr'],
485 ['struct open_how'],
486]
487
488 if tuple.length() >= 2
489 cond = tuple[1]
490 else
491 ident1 = 'HAVE_' + tuple[0].underscorify().to_upper()
492 ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper()
493 cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1
494 endif
495 if cond
496 found_types += tuple[0]
497 else
498 missing_types += tuple[0]
499 endif
500endforeach
501
502found_headers = []
503missing_headers = []
504
505foreach tuple : [
506 ['sys/resource.h'],
507 ['sys/memfd.h'],
508 ['sys/personality.h'],
509 ['sys/signalfd.h'],
510 ['sys/timerfd.h'],
511 ['pty.h'],
512 ['utmpx.h' ],
513]
514
515 if tuple.length() >= 2
516 cond = tuple[1]
517 else
518 ident1 = 'HAVE_' + tuple[0].underscorify().to_upper()
519 ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper()
520 cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1
521 endif
522 if cond
523 found_headers += tuple[0]
524 else
525 missing_headers += tuple[0]
526 endif
527endforeach
528
529found_deps = []
530missing_deps = []
531
532foreach tuple : [
533 ['AppArmor'],
534 ['SECCOMP'],
535 ['SELinux'],
536 ['libcap'],
537 ['openssl'],
538]
539
540 if tuple.length() >= 2
541 cond = tuple[1]
542 else
543 ident1 = 'HAVE_' + tuple[0].underscorify().to_upper()
544 ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper()
545 cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1
546 endif
547 if cond
548 found_deps += tuple[0]
549 else
550 missing_deps += tuple[0]
551 endif
552endforeach
553
bf1f3470
CB
554status = [
555 '@0@ @1@'.format(meson.project_name(), meson.project_version()),
556
e282c460
CB
557 'Meson version: @0@'.format(meson.version()),
558
bf1f3470
CB
559 'prefix directory: @0@'.format(prefixdir),
560 'bin directory: @0@'.format(bindir),
561 'data directory: @0@'.format(datadir),
562 'doc directory: @0@'.format(docdir),
563 'include directory: @0@'.format(includedir),
564 'lib directory: @0@'.format(libdir),
565 'libexec directory: @0@'.format(libexecdir),
566 'local state directory: @0@'.format(localstatedir),
567 'sbin directory: @0@'.format(sbindir),
568 'sysconf directory: @0@'.format(sysconfdir),
569
570 'lxc cgroup pattern: @0@'.format(cgrouppattern),
571 'lxc init directory: @0@'.format(libexecdir),
572 'runtime path: @0@'.format(runtimepath),
573
574 'lxc default config: @0@'.format(lxcdefaultconfig),
575 'lxc global config: @0@'.format(lxcglobalconfig),
576 'lxc hook directory: @0@'.format(lxchookdir),
577 'lxc hook bin directory: @0@'.format(lxchookbindir),
578 'lxc rootfs mount directory: @0@'.format(lxcrootfsmount),
579 'log path: @0@'.format(lxclogpath),
580 'lxc path: @0@'.format(lxcpath),
581 'lxc template config: @0@'.format(lxctemplateconfig),
72f1c44a
CB
582 'lxc template directory: @0@'.format(lxctemplatedir),
583 'lxc user network config: @0@'.format(lxc_user_network_conf),
584 'lxc user network database: @0@'.format(lxc_user_network_db)]
bf1f3470 585
ea6da257
CB
586alt_time_epoch = run_command('date', '-Is', '-u', '-d',
587 '@@0@'.format(time_epoch)).stdout().strip()
588status += [
589 'time epoch: @0@ (@1@)'.format(time_epoch, alt_time_epoch)]
590
591status += [
592 '',
593 'supported dependencies: @0@'.format(', '.join(found_deps)),
594 '',
595 'unsupported dependencies: @0@'.format(', '.join(missing_deps)),
596 '']
597
598status += [
599 '',
600 'supported headers: @0@'.format(', '.join(found_headers)),
601 '',
602 'unsupported headers: @0@'.format(', '.join(missing_headers)),
603 '']
604
605status += [
606 '',
607 'supported calls: @0@'.format(', '.join(found_syscalls)),
608 '',
609 'unsupported calls: @0@'.format(', '.join(missing_syscalls)),
610 '']
611
612status += [
613 '',
614 'supported types: @0@'.format(', '.join(found_types)),
615 '',
616 'unsupported types: @0@'.format(', '.join(missing_types)),
617 '']
618
bf1f3470 619message('\n '.join(status))