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