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