1# SPDX-License-Identifier: LGPL-2.1-or-later 2 3libnspawn_core_sources = files( 4 'nspawn-bind-user.c', 5 'nspawn-bind-user.h', 6 'nspawn-cgroup.c', 7 'nspawn-cgroup.h', 8 'nspawn-creds.c', 9 'nspawn-creds.h', 10 'nspawn-def.h', 11 'nspawn-expose-ports.c', 12 'nspawn-expose-ports.h', 13 'nspawn-mount.c', 14 'nspawn-mount.h', 15 'nspawn-network.c', 16 'nspawn-network.h', 17 'nspawn-oci.c', 18 'nspawn-oci.h', 19 'nspawn-patch-uid.c', 20 'nspawn-patch-uid.h', 21 'nspawn-register.c', 22 'nspawn-register.h', 23 'nspawn-seccomp.c', 24 'nspawn-seccomp.h', 25 'nspawn-settings.c', 26 'nspawn-settings.h', 27 'nspawn-setuid.c', 28 'nspawn-setuid.h', 29 'nspawn-stub-pid1.c', 30 'nspawn-stub-pid1.h', 31 'nspawn-util.c', 32 'nspawn-util.h', 33 'nspawn.h', 34) 35 36nspawn_gperf_c = custom_target( 37 'nspawn-gperf.c', 38 input : 'nspawn-gperf.gperf', 39 output : 'nspawn-gperf.c', 40 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) 41 42libnspawn_core_sources += [nspawn_gperf_c] 43 44libnspawn_core = static_library( 45 'nspawn-core', 46 libnspawn_core_sources, 47 include_directories : includes, 48 dependencies : [libacl, 49 libseccomp, 50 libselinux], 51 build_by_default : false) 52 53systemd_nspawn_sources = files('nspawn.c') 54 55############################################################ 56 57tests += [ 58 [files('test-nspawn-tables.c'), 59 [libnspawn_core, 60 libshared], 61 [libseccomp]], 62 63 [files('test-nspawn-util.c'), 64 [libnspawn_core, 65 libshared], 66 [libseccomp]], 67 68 [files('test-patch-uid.c'), 69 [libnspawn_core, 70 libshared], 71 [libacl], 72 [], '', 'manual'], 73] 74 75fuzzers += [ 76 [files('fuzz-nspawn-settings.c'), 77 [libshared, 78 libnspawn_core], 79 [libseccomp]], 80 81 [files('fuzz-nspawn-oci.c'), 82 [libshared, 83 libnspawn_core], 84 [libseccomp]], 85] 86