]> git.proxmox.com Git - mirror_lxc.git/blob - meson.build
meson: Setup pkgconfig
[mirror_lxc.git] / meson.build
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2
3 # Project.
4 project(
5 'lxc',
6 'c',
7 version: '4.0.0',
8 license: 'LGPLv2+',
9 default_options: [
10 'b_lto=true',
11 'b_lto_mode=thin',
12 'b_colorout=always',
13 'b_asneeded=true',
14 'b_pie=true',
15 'b_staticpic=true',
16 'c_std=gnu11',
17 'warning_level=2',
18 ],
19 meson_version: '>= 0.50')
20
21 cc = meson.get_compiler('c')
22 pkgconfig = import('pkgconfig')
23 pkgconfig_libs = []
24
25 # Version.
26 version_data = configuration_data()
27 version_data.set('LXC_VERSION_MAJOR', '4')
28 version_data.set('LXC_VERSION_MINOR', '0')
29 version_data.set('LXC_VERSION_MICRO', '7')
30 version_data.set('LXC_ABI', '4.0.7')
31 version_data.set('LXC_DEVEL', '1')
32 version_data.set('LXC_VERSION', '4.0.7-devel')
33 liblxc_version = '1.7.0'
34
35 # Configuration options.
36 conf = configuration_data()
37 conf.set_quoted('PROJECT', meson.project_name())
38 conf.set_quoted('PROJECT_URL', 'https://linuxcontainers.org/lxc/')
39 conf.set_quoted('PROJECT_VERSION', meson.project_version())
40 conf.set_quoted('PACKAGE_VERSION', meson.project_version())
41 conf.set('_GNU_SOURCE', true)
42 conf.set('_FILE_OFFSET_BITS', 64)
43 conf.set('__STDC_FORMAT_MACROS', true)
44
45 project_source_root = meson.current_source_dir()
46 project_build_root = meson.current_build_dir()
47
48 # Path handling.
49 prefixdir = get_option('prefix')
50
51 apparmorcachedir = get_option('apparmor-cache-dir')
52 globalconfig = get_option('global-config')
53 localstatedir = join_paths('/', get_option('localstatedir'))
54 logpath = get_option('log-path')
55 lxcpathprefix = get_option('config-path')
56 rootfsmount = get_option('rootfs-mount-dir')
57 user_network_db_opt = get_option('user-network-db')
58 user_network_conf_opt = get_option('user-network-conf')
59
60 bindir = join_paths(prefixdir, get_option('bindir'))
61 datadir = join_paths(prefixdir, get_option('datadir'))
62 docdir = join_paths(prefixdir, get_option('docdir'))
63 includedir = join_paths(prefixdir, get_option('includedir'))
64 libdir = join_paths(prefixdir, get_option('libdir'))
65 libexecdir = join_paths(prefixdir, get_option('libexecdir'))
66 runtimepath = join_paths(prefixdir, get_option('runtime-path'))
67 sbindir = join_paths(prefixdir, get_option('sbindir'))
68 sysconfdir = join_paths(prefixdir, get_option('sysconfdir'))
69
70 lxcdefaultconfig = join_paths(sysconfdir, 'lxc/default.conf')
71 lxcglobalconfig = join_paths(sysconfdir, globalconfig)
72 lxcapparmorcachedir = join_paths(localstatedir, apparmorcachedir)
73 lxcrootfsmount = join_paths(prefixdir, rootfsmount)
74 lxcinclude = join_paths(includedir, 'lxc')
75 lxclibexec = join_paths(libexecdir, 'lxc')
76 lxclogpath = join_paths(localstatedir, logpath)
77 lxcpath = join_paths(localstatedir, lxcpathprefix)
78 lxctemplateconfig = join_paths(datadir, 'lxc/config')
79 lxctemplatedir = join_paths(datadir, 'lxc/templates')
80 lxchookdir = join_paths(datadir, 'lxc/hooks')
81 lxchookbindir = join_paths(libexecdir, 'lxc/hooks')
82 lxc_user_network_conf = join_paths(sysconfdir, user_network_conf_opt)
83 lxc_user_network_db = join_paths(runtimepath, user_network_db_opt)
84
85 conf.set_quoted('BINDIR', bindir)
86 conf.set_quoted('DATADIR', datadir)
87 conf.set_quoted('DOCDIR', docdir)
88 conf.set_quoted('INCLUDEDIR', includedir)
89 conf.set_quoted('LIBDIR', libdir)
90 conf.set_quoted('LIBEXECDIR', libexecdir)
91 conf.set_quoted('LOCALSTATEDIR', localstatedir)
92 conf.set_quoted('RUNTIME_PATH', runtimepath)
93 conf.set_quoted('SBINDIR', sbindir)
94 conf.set_quoted('SYSCONFDIR', sysconfdir)
95
96 conf.set_quoted('APPARMOR_CACHE_DIR', lxcapparmorcachedir)
97 conf.set_quoted('LOGPATH', lxclogpath)
98 conf.set_quoted('LXCBINHOOKDIR', lxchookbindir)
99 conf.set_quoted('LXC_DEFAULT_CONFIG', lxcdefaultconfig)
100 conf.set_quoted('LXC_GLOBAL_CONF', lxcglobalconfig)
101 conf.set_quoted('LXCHOOKDIR', lxchookdir)
102 conf.set_quoted('LXCINITDIR', libexecdir)
103 conf.set_quoted('LXCPATH', lxcpath)
104 conf.set_quoted('LXCROOTFSMOUNT', lxcrootfsmount)
105 conf.set_quoted('LXCTEMPLATECONFIG', lxctemplateconfig)
106 conf.set_quoted('LXCTEMPLATEDIR', lxctemplatedir)
107 conf.set_quoted('LXC_USERNIC_CONF', lxc_user_network_conf)
108 conf.set_quoted('LXC_USERNIC_DB', lxc_user_network_db)
109
110 # Custom configuration.
111 cgrouppattern = get_option('cgroup-pattern')
112 wants_io_uring = get_option('io-uring-event-loop')
113 want_tests = get_option('tests')
114
115 conf.set_quoted('DEFAULT_CGROUP_PATTERN', cgrouppattern)
116
117 dummy_config_data = configuration_data()
118 dummy_config_data.set_quoted('DUMMY_VARIABLE', '1')
119
120 # Build flags.
121 possible_cc_flags = [
122 '-Wvla',
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
160 possible_link_flags = [
161 '-Wl,--gc-sections',
162 '-Wl,-z,relro',
163 '-Wl,-z,now',
164 '-Wl,-fuse-ld=gold',
165 ]
166
167 if meson.version().version_compare('>=0.46')
168 add_project_link_arguments(cc.get_supported_link_arguments(possible_link_flags), language: 'c')
169 else
170 add_project_link_arguments(possible_link_flags, language: 'c')
171 endif
172
173 add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language: 'c')
174
175 # Feature detection
176 ## I/O uring.
177 if wants_io_uring == true
178 liburing = dependency('liburing')
179 if cc.has_function('io_uring_prep_poll_add', prefix: '#include <liburing.h>', dependencies: liburing) == false
180 error('liburing version does not support IORING_POLL_ADD_MULTI')
181 endif
182
183 conf.set10('HAVE_LIBURING', true)
184 endif
185
186 ## Time EPOCH.
187 sh = find_program('sh')
188 date = find_program('date')
189 git = find_program('git', required: false)
190 time_epoch = run_command(sh, '-c', 'echo "$SOURCE_DATE_EPOCH"', check: true).stdout().strip()
191 if time_epoch == '' and git.found() and run_command('test', '-e', '.git', check: false).returncode() == 0
192 # If we're in a git repository, use the creation time of the latest git tag.
193 latest_tag = run_command(git, 'describe', '--abbrev=0', '--tags', check: true).stdout().strip()
194 time_epoch = run_command(git, 'log', '--no-show-signature', '-1', '--format=%at', latest_tag, check: true).stdout()
195 else
196 # Fallback to current epoch
197 time_epoch = run_command(date, '+%s', check: true).stdout()
198 endif
199 time_epoch = time_epoch.to_int()
200 conf.set('TIME_EPOCH', time_epoch)
201
202 ## Threads.
203 threads = dependency('threads')
204
205 ## Seccomp.
206 libseccomp = dependency('libseccomp')
207 conf.set10('HAVE_SECCOMP', libseccomp.found())
208 if libseccomp.found()
209 pkgconfig_libs += '-lseccomp'
210
211 if libseccomp.version().version_compare('>=2.5.0')
212 # https://github.com/seccomp/libseccomp/commit/dead12bc788b259b148cc4d93b970ef0bd602b1a
213 conf.set10('HAVE_DECL_SECCOMP_NOTIFY_FD', true)
214 else
215 conf.set10('HAVE_DECL_SECCOMP_NOTIFY_FD', false)
216 endif
217
218 if libseccomp.version().version_compare('>=2.0.0')
219 # https://github.com/seccomp/libseccomp/commit/6220c8c0fc479d97b6d3e3166a4e46fbfe25a3c0
220 conf.set10('HAVE_DECL_SECCOMP_SYSCALL_RESOLVE_NAME_ARCH', true)
221 else
222 conf.set10('HAVE_DECL_SECCOMP_SYSCALL_RESOLVE_NAME_ARCH', false)
223 endif
224
225 seccomp_headers = '''
226 #include <seccomp.h>
227 '''
228
229 foreach decl: [
230 'scmp_filter_ctx',
231 'struct seccomp_notif_sizes',
232 'struct clone_args',
233 ]
234
235 # We get -1 if the size cannot be determined
236 if cc.sizeof(decl, prefix: seccomp_headers, args: '-D_GNU_SOURCE') > 0
237 conf.set10('HAVE_' + decl.underscorify().to_upper(), true)
238 else
239 conf.set10('HAVE_' + decl.underscorify().to_upper(), false)
240 endif
241 endforeach
242 endif
243
244 ## SELinux.
245 libselinux = dependency('libselinux', required: false)
246 conf.set10('HAVE_SELINUX', libselinux.found())
247 if libselinux.found()
248 pkgconfig_libs += '-lselinux'
249 endif
250
251 ## AppArmor.
252 libapparmor = dependency('libapparmor', required: false)
253 conf.set10('HAVE_APPARMOR', libapparmor.found())
254
255 ## OpenSSL.
256 libopenssl = dependency('openssl', required: false)
257 conf.set10('HAVE_OPENSSL', libopenssl.found())
258 if libopenssl.found()
259 pkgconfig_libs += '-lssl -lcrypto'
260 endif
261
262 ## Libcap..
263 libcap = dependency('libcap', required: false)
264 if not libcap.found()
265 # Compat with Ubuntu 14.04 which ships libcap w/o .pc file
266 libcap = cc.find_library('cap', required: false)
267 endif
268 conf.set10('HAVE_LIBCAP', libcap.found())
269 if libcap.found()
270 pkgconfig_libs += '-lcap'
271 endif
272
273 libcap_static = dependency('libcap', required: false, static: true)
274 if not libcap_static.found()
275 # Compat with Ubuntu 14.04 which ships libcap w/o .pc file
276 libcap_static = cc.find_library('cap', required: false, static: true)
277 endif
278 conf.set10('HAVE_STATIC_LIBCAP', libcap_static.found())
279
280 ## PAM.
281 pam = cc.find_library('pam',
282 has_headers: 'security/pam_modules.h')
283 conf.set10('HAVE_PAM', pam.found())
284 if pam.found()
285 pkgconfig_libs += '-lpam'
286 endif
287
288 ## Others.
289 have = cc.has_function('strchrnul', prefix: '#include <string.h>', args: '-D_GNU_SOURCE')
290 conf.set10('HAVE_STRCHRNUL', have)
291
292 have = cc.has_function('openpty', prefix: '#include <pty.h>', args: '-D_GNU_SOURCE')
293 conf.set10('HAVE_OPENPTY', have)
294
295 ## Compiler attributes.
296 foreach ccattr: [
297 'fallthrough',
298 'nonnull',
299 'returns_nonnull',
300 ]
301
302 conf.set10('HAVE_COMPILER_ATTR_' + ccattr.underscorify().to_upper(), cc.has_function_attribute(ccattr))
303 endforeach
304
305 ## Syscalls.
306 found_syscalls = []
307 missing_syscalls = []
308 foreach tuple: [
309 ['bpf'],
310 ['close_range'],
311 ['endmntent'],
312 ['execveat'],
313 ['faccessat'],
314 ['strchrnul'],
315 ['fgetln'],
316 ['fsconfig'],
317 ['fsmount'],
318 ['fsopen'],
319 ['fspick'],
320 ['getgrgid_r'],
321 ['getline'],
322 ['getsubopt'],
323 ['gettid'],
324 ['hasmntopt'],
325 ['kcmp'],
326 ['keyctl'],
327 ['memfd_create'],
328 ['mount_setattr'],
329 ['move_mount'],
330 ['openat2'],
331 ['open_tree'],
332 ['personality'],
333 ['pidfd_open'],
334 ['pidfd_send_signal'],
335 ['pivot_root'],
336 ['prlimit'],
337 ['prlimit64'],
338 ['renameat2'],
339 ['sethostname'],
340 ['setmntent'],
341 ['setns'],
342 ['sigdescr_np'],
343 ['signalfd'],
344 ['statx'],
345 ['strlcat'],
346 ['strlcpy'],
347 ['unshare'],
348 ]
349
350 if tuple.length() >= 2
351 cond = tuple[1]
352 else
353 ident1 = 'HAVE_' + tuple[0].underscorify().to_upper()
354 ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper()
355 cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1
356 endif
357
358 if cond
359 found_syscalls += tuple[0]
360 else
361 missing_syscalls += tuple[0]
362 endif
363 endforeach
364
365 ## Types.
366 decl_headers = '''
367 #include <uchar.h>
368 #include <sys/mount.h>
369 #include <sys/stat.h>
370 #include <linux/fs.h>
371 #include <linux/types.h>
372 #include <linux/openat2.h>
373 #include <linux/sched.h>
374 '''
375
376 foreach decl: [
377 '__aligned_u64',
378 'struct mount_attr',
379 'struct open_how',
380 'struct clone_args',
381 ]
382
383 # We get -1 if the size cannot be determined
384 if cc.sizeof(decl, prefix: decl_headers, args: '-D_GNU_SOURCE') > 0
385 conf.set10('HAVE_' + decl.underscorify().to_upper(), true)
386 else
387 conf.set10('HAVE_' + decl.underscorify().to_upper(), false)
388 endif
389 endforeach
390
391 found_types = []
392 missing_types = []
393 foreach tuple: [
394 ['scmp_filter_ctx'],
395 ['struct seccomp_notif_sizes'],
396 ['struct clone_args'],
397 ['__aligned_u64'],
398 ['struct mount_attr'],
399 ['struct open_how'],
400 ]
401
402 if tuple.length() >= 2
403 cond = tuple[1]
404 else
405 ident1 = 'HAVE_' + tuple[0].underscorify().to_upper()
406 ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper()
407 cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1
408 endif
409
410 if cond
411 found_types += tuple[0]
412 else
413 missing_types += tuple[0]
414 endif
415 endforeach
416
417 ## Headers.
418 foreach ident: [
419 ['bpf', '''#include <sys/syscall.h>
420 #include <unistd.h>'''],
421 ['close_range', '''#include <unistd.h>'''],
422 ['execveat', '''#include <unistd.h>'''],
423 ['endmntent', '''#include <stdio.h>
424 #include <mntent.h>'''],
425 ['faccessat', '''#include <fcntl.h>
426 #include <unistd.h>'''],
427 ['fexecve', '''#include <unistd.h>'''],
428 ['fgetln', '''#include <stdio.h>'''],
429 ['fsconfig', '''#include <sys/mount.h>'''],
430 ['fsmount', '''#include <sys/mount.h>'''],
431 ['fsopen', '''#include <sys/mount.h>'''],
432 ['fspick', '''#include <sys/mount.h>'''],
433 ['getgrgid_r', '''#include <sys/types.h>
434 #include <grp.h>'''],
435 ['getline', '''#include <stdio.h>'''],
436 ['getsubopt', '''#include <stdlib.h>'''],
437 ['gettid', '''#include <sys/types.h>
438 #include <unistd.h>'''],
439 ['hasmntopt', '''#include <stdio.h>
440 #include <mntent.h>'''],
441 ['kcmp', '''#include <linux/kcmp.h>'''],
442 ['keyctl', '''#include <sys/types.h>
443 #include <keyutils.h>'''],
444 ['memfd_create', '''#include <sys/mman.h>'''],
445 ['mount_setattr', '''#include <sys/mount.h>'''],
446 ['move_mount', '''#include <sys/mount.h>'''],
447 ['openat2', '''#include <sys/types.h>
448 #include <sys/stat.h>
449 #include <fctnl.h>'''],
450 ['open_tree', '''#include <sys/mount.h>'''],
451 ['personality', '''#include <sys/personality.h>'''],
452 ['pidfd_open', '''#include <stdlib.h>
453 #include <unistd.h>
454 #include <signal.h>
455 #include <sys/wait.h>'''],
456 ['pidfd_send_signal', '''#include <stdlib.h>
457 #include <unistd.h>
458 #include <signal.h>
459 #include <sys/wait.h>'''],
460 ['pivot_root', '''#include <stdlib.h>
461 #include <unistd.h>'''], # no known header declares pivot_root
462 ['prlimit', '''#include <sys/time.h>
463 #include <sys/resource.h>'''],
464 ['prlimit64', '''#include <sys/time.h>
465 #include <sys/resource.h>'''],
466 ['renameat2', '''#include <stdio.h>
467 #include <fcntl.h>'''],
468 ['sethostname', '''#include <unistd.h>'''],
469 ['setmntent', '''#include <stdio.h>
470 #include <mntent.h>'''],
471 ['setns', '''#include <sched.h>'''],
472 ['sigdescr_np', '''#include <string.h>'''],
473 ['signalfd', '''#include <sys/signalfd.h>'''],
474 ['statx', '''#include <sys/types.h>
475 #include <sys/stat.h>
476 #include <unistd.h>'''],
477 ['strchrnul', '''#include <string.h>'''],
478 ['strlcat', '''#include <string.h>'''],
479 ['strlcpy', '''#include <string.h>'''],
480 ['unshare', '''#include <sched.h>'''],
481 ]
482
483 have = cc.has_function(ident[0], prefix: ident[1], args: '-D_GNU_SOURCE')
484 conf.set10('HAVE_' + ident[0].to_upper(), have)
485 endforeach
486
487 found_headers = []
488 missing_headers = []
489 foreach tuple: [
490 ['sys/resource.h'],
491 ['sys/memfd.h'],
492 ['sys/personality.h'],
493 ['sys/signalfd.h'],
494 ['sys/timerfd.h'],
495 ['pty.h'],
496 ['utmpx.h'],
497 ]
498 conf.set10('HAVE_' + tuple[0].underscorify().to_upper(), cc.has_header(tuple[0]))
499
500 if tuple.length() >= 2
501 cond = tuple[1]
502 else
503 ident1 = 'HAVE_' + tuple[0].underscorify().to_upper()
504 ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper()
505 cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1
506 endif
507
508 if cond
509 found_headers += tuple[0]
510 else
511 missing_headers += tuple[0]
512 endif
513 endforeach
514
515 ## Deps.
516 found_deps = []
517 missing_deps = []
518 foreach tuple: [
519 ['AppArmor'],
520 ['SECCOMP'],
521 ['SELinux'],
522 ['libcap'],
523 ['static libcap'],
524 ['openssl'],
525 ['liburing'],
526 ]
527
528 if tuple.length() >= 2
529 cond = tuple[1]
530 else
531 ident1 = 'HAVE_' + tuple[0].underscorify().to_upper()
532 ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper()
533 cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1
534 endif
535
536 if cond
537 found_deps += tuple[0]
538 else
539 missing_deps += tuple[0]
540 endif
541 endforeach
542
543 # Generate config.h
544 config_h = configure_file(
545 output: 'config.h',
546 configuration: conf)
547
548 add_project_arguments('-include', 'config.h', language: 'c')
549
550 # Binaries.
551 cmd_programs = []
552 hook_programs = []
553 public_programs = []
554 template_scripts = []
555 test_programs = []
556
557 # Includes.
558 basic_includes = include_directories(
559 '.',
560 'src',
561 'src/include')
562
563 liblxc_includes = [basic_includes, include_directories(
564 'src/lxc/cgroups',
565 'src/lxc/lsm',
566 'src/lxc/storage')]
567
568 # Early sub-directories.
569 subdir('src/include')
570 subdir('src/lxc')
571
572 # Library.
573 liblxc_dependencies = [
574 threads,
575 libseccomp,
576 libcap,
577 libopenssl,
578 libselinux,
579 libapparmor,
580 ]
581
582 if wants_io_uring == true
583 liblxc_dependencies += [liburing]
584 endif
585
586 liblxc = shared_library(
587 'lxc',
588 version: liblxc_version,
589 include_directories: liblxc_includes,
590 link_args: ['-DPIC'],
591 c_args: ['-DPIC'],
592 link_whole: [liblxc_static],
593 dependencies: liblxc_dependencies,
594 install: true)
595
596 liblxc_dep = declare_dependency(
597 link_with: liblxc,
598 dependencies: liblxc_dependencies)
599
600 # Rest of sub-directories.
601 subdir('hooks')
602 subdir('src/lxc/cmd')
603 subdir('src/lxc/tools')
604 subdir('src/lxc/tools/include')
605 subdir('src/tests')
606 subdir('templates')
607
608 # Pkg-config.
609 pkg_config_file = pkgconfig.generate(liblxc,
610 description: 'linux container tools',
611 version: version_data.get('LXC_VERSION'),
612 url: 'http://linuxcontainers.org',
613 libraries: '-lutil -lpthread -ldl',
614 libraries_private: pkgconfig_libs,
615 install_dir: join_paths(libdir, 'pkgconfig')
616 )
617
618 # Build overview.
619 status = [
620 '@0@ @1@'.format(meson.project_name(), meson.project_version()),
621
622 'Meson version: @0@'.format(meson.version()),
623
624 'prefix directory: @0@'.format(prefixdir),
625 'bin directory: @0@'.format(bindir),
626 'data directory: @0@'.format(datadir),
627 'doc directory: @0@'.format(docdir),
628 'include directory: @0@'.format(includedir),
629 'lib directory: @0@'.format(libdir),
630 'libexec directory: @0@'.format(libexecdir),
631 'local state directory: @0@'.format(localstatedir),
632 'sbin directory: @0@'.format(sbindir),
633 'sysconf directory: @0@'.format(sysconfdir),
634
635 'lxc cgroup pattern: @0@'.format(cgrouppattern),
636 'lxc init directory: @0@'.format(libexecdir),
637 'runtime path: @0@'.format(runtimepath),
638
639 'lxc default config: @0@'.format(lxcdefaultconfig),
640 'lxc global config: @0@'.format(lxcglobalconfig),
641 'lxc hook directory: @0@'.format(lxchookdir),
642 'lxc hook bin directory: @0@'.format(lxchookbindir),
643 'lxc rootfs mount directory: @0@'.format(lxcrootfsmount),
644 'log path: @0@'.format(lxclogpath),
645 'lxc path: @0@'.format(lxcpath),
646 'lxc template config: @0@'.format(lxctemplateconfig),
647 'lxc template directory: @0@'.format(lxctemplatedir),
648 'lxc user network config: @0@'.format(lxc_user_network_conf),
649 'lxc user network database: @0@'.format(lxc_user_network_db)]
650
651 alt_time_epoch = run_command('date', '-Is', '-u', '-d',
652 '@@0@'.format(time_epoch), check: true).stdout().strip()
653 status += [
654 'time epoch: @0@ (@1@)'.format(time_epoch, alt_time_epoch)]
655
656 status += [
657 '',
658 'supported dependencies: @0@'.format(', '.join(found_deps)),
659 '',
660 'unsupported dependencies: @0@'.format(', '.join(missing_deps)),
661 '']
662
663 status += [
664 '',
665 'supported headers: @0@'.format(', '.join(found_headers)),
666 '',
667 'unsupported headers: @0@'.format(', '.join(missing_headers)),
668 '']
669
670 status += [
671 '',
672 'supported calls: @0@'.format(', '.join(found_syscalls)),
673 '',
674 'unsupported calls: @0@'.format(', '.join(missing_syscalls)),
675 '']
676
677 status += [
678 '',
679 'supported types: @0@'.format(', '.join(found_types)),
680 '',
681 'unsupported types: @0@'.format(', '.join(missing_types)),
682 '']
683
684 message('\n '.join(status))