]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
build: use liblxc_sources everywhere
authorChristian Brauner <brauner@kernel.org>
Wed, 8 Jun 2022 18:00:38 +0000 (20:00 +0200)
committerChristian Brauner (Microsoft) <christian.brauner@ubuntu.com>
Wed, 8 Jun 2022 18:01:26 +0000 (20:01 +0200)
The old split didn't buy us a lot and causes problems when buidling with
sanitizers enabled so just use the full sources.

Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
src/lxc/cmd/meson.build
src/lxc/tools/meson.build
src/tests/meson.build

index bb5f8acca6238fa23b2a2a74904b157c42d92f67..13c4a8eea5c771c7dcc9948ca685da2a37eebadd 100644 (file)
@@ -1,108 +1,6 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-cmd_common_sources = files(
-    '../af_unix.c',
-    '../af_unix.h',
-    '../attach_options.h',
-    '../caps.c',
-    '../caps.h',
-    '../commands.c',
-    '../commands.h',
-    '../commands_utils.c',
-    '../commands_utils.h',
-    '../compiler.h',
-    '../conf.c',
-    '../conf.h',
-    '../confile.c',
-    '../confile.h',
-    '../confile_utils.c',
-    '../confile_utils.h',
-    '../cgroups/cgfsng.c',
-    '../cgroups/cgroup.c',
-    '../cgroups/cgroup.h',
-    '../cgroups/cgroup2_devices.c',
-    '../cgroups/cgroup2_devices.h',
-    '../cgroups/cgroup_utils.c',
-    '../cgroups/cgroup_utils.h',
-    '../error.c',
-    '../error.h',
-    '../initutils.c',
-    '../initutils.h',
-    '../file_utils.c',
-    '../file_utils.h',
-    '../lsm/apparmor.c',
-    '../lsm/lsm.c',
-    '../lsm/lsm.h',
-    '../lsm/nop.c',
-    '../lxcseccomp.h',
-    '../lxclock.c',
-    '../lxclock.h',
-    '../macro.h',
-    '../mainloop.c',
-    '../mainloop.h',
-    '../memory_utils.h',
-    '../monitor.c',
-    '../monitor.h',
-    '../mount_utils.c',
-    '../mount_utils.h',
-    '../namespace.c',
-    '../namespace.h',
-    '../network.c',
-    '../network.h',
-    '../nl.c',
-    '../nl.h',
-    '../parse.c',
-    '../parse.h',
-    '../process_utils.c',
-    '../process_utils.h',
-    '../ringbuf.c',
-    '../ringbuf.h',
-    '../start.c',
-    '../start.h',
-    '../state.c',
-    '../state.h',
-    '../storage/btrfs.c',
-    '../storage/btrfs.h',
-    '../storage/dir.c',
-    '../storage/dir.h',
-    '../storage/loop.c',
-    '../storage/loop.h',
-    '../storage/lvm.c',
-    '../storage/lvm.h',
-    '../storage/nbd.c',
-    '../storage/nbd.h',
-    '../storage/overlay.c',
-    '../storage/overlay.h',
-    '../storage/rbd.c',
-    '../storage/rbd.h',
-    '../storage/rsync.c',
-    '../storage/rsync.h',
-    '../storage/storage.c',
-    '../storage/storage.h',
-    '../storage/storage_utils.c',
-    '../storage/storage_utils.h',
-    '../storage/zfs.c',
-    '../storage/zfs.h',
-    '../string_utils.c',
-    '../string_utils.h',
-    '../sync.c',
-    '../sync.h',
-    '../terminal.c',
-    '../terminal.h',
-    '../utils.c',
-    '../utils.h',
-    '../uuid.c',
-    '../uuid.h',
-    '../log.h',
-    '../log.c') + include_sources
-
-if libseccomp.found()
-    cmd_common_sources += files('../seccomp.c')
-endif
-
-if libselinux.found()
-    cmd_common_sources += files('../lsm/selinux.c')
-endif
+cmd_common_sources = liblxc_sources + include_sources
 
 cmd_lxc_init_sources = files(
     'lxc_init.c',
index 5dd3b10ae17274895e27b90735afeaf1a62971ac..072f08beb4cdce7cc97403ac7d30a6e41b2dae34 100644 (file)
@@ -1,110 +1,6 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-tools_common_sources = files(
-    'arguments.c',
-    'arguments.h',
-    '../af_unix.c',
-    '../af_unix.h',
-    '../attach_options.h',
-    '../caps.c',
-    '../caps.h',
-    '../commands.c',
-    '../commands.h',
-    '../commands_utils.c',
-    '../commands_utils.h',
-    '../compiler.h',
-    '../conf.c',
-    '../conf.h',
-    '../confile.c',
-    '../confile.h',
-    '../confile_utils.c',
-    '../confile_utils.h',
-    '../cgroups/cgfsng.c',
-    '../cgroups/cgroup.c',
-    '../cgroups/cgroup.h',
-    '../cgroups/cgroup2_devices.c',
-    '../cgroups/cgroup2_devices.h',
-    '../cgroups/cgroup_utils.c',
-    '../cgroups/cgroup_utils.h',
-    '../error.c',
-    '../error.h',
-    '../initutils.c',
-    '../initutils.h',
-    '../file_utils.c',
-    '../file_utils.h',
-    '../lsm/apparmor.c',
-    '../lsm/lsm.c',
-    '../lsm/lsm.h',
-    '../lsm/nop.c',
-    '../lxcseccomp.h',
-    '../lxclock.c',
-    '../lxclock.h',
-    '../macro.h',
-    '../mainloop.c',
-    '../mainloop.h',
-    '../memory_utils.h',
-    '../monitor.c',
-    '../monitor.h',
-    '../mount_utils.c',
-    '../mount_utils.h',
-    '../namespace.c',
-    '../namespace.h',
-    '../network.c',
-    '../network.h',
-    '../nl.c',
-    '../nl.h',
-    '../parse.c',
-    '../parse.h',
-    '../process_utils.c',
-    '../process_utils.h',
-    '../ringbuf.c',
-    '../ringbuf.h',
-    '../start.c',
-    '../start.h',
-    '../state.c',
-    '../state.h',
-    '../storage/btrfs.c',
-    '../storage/btrfs.h',
-    '../storage/dir.c',
-    '../storage/dir.h',
-    '../storage/loop.c',
-    '../storage/loop.h',
-    '../storage/lvm.c',
-    '../storage/lvm.h',
-    '../storage/nbd.c',
-    '../storage/nbd.h',
-    '../storage/overlay.c',
-    '../storage/overlay.h',
-    '../storage/rbd.c',
-    '../storage/rbd.h',
-    '../storage/rsync.c',
-    '../storage/rsync.h',
-    '../storage/storage.c',
-    '../storage/storage.h',
-    '../storage/storage_utils.c',
-    '../storage/storage_utils.h',
-    '../storage/zfs.c',
-    '../storage/zfs.h',
-    '../string_utils.c',
-    '../string_utils.h',
-    '../sync.c',
-    '../sync.h',
-    '../terminal.c',
-    '../terminal.h',
-    '../utils.c',
-    '../utils.h',
-    '../uuid.c',
-    '../uuid.h',
-    '../log.h',
-    '../log.c') + include_sources + netns_ifaddrs_sources
-
-if libseccomp.found()
-    tools_common_sources += files('../seccomp.c')
-endif
-
-if libselinux.found()
-    tools_common_sources += files('../lsm/selinux.c')
-endif
+tools_common_sources = liblxc_sources + files('arguments.c', 'arguments.h') + include_sources + netns_ifaddrs_sources
 
 tools_lxc_attach_sources = files(
     'lxc_attach.c') + tools_common_sources
index cbec2bbe5650805d46be477208658443f6a97831..56701e7cab78be4354dd95aff9375fde1f3ae78a 100644 (file)
@@ -1,108 +1,6 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-tests_common_sources = files(
-    '../lxc/af_unix.c',
-    '../lxc/af_unix.h',
-    '../lxc/attach_options.h',
-    '../lxc/caps.c',
-    '../lxc/caps.h',
-    '../lxc/commands.c',
-    '../lxc/commands.h',
-    '../lxc/commands_utils.c',
-    '../lxc/commands_utils.h',
-    '../lxc/compiler.h',
-    '../lxc/conf.c',
-    '../lxc/conf.h',
-    '../lxc/confile.c',
-    '../lxc/confile.h',
-    '../lxc/confile_utils.c',
-    '../lxc/confile_utils.h',
-    '../lxc/cgroups/cgfsng.c',
-    '../lxc/cgroups/cgroup.c',
-    '../lxc/cgroups/cgroup.h',
-    '../lxc/cgroups/cgroup2_devices.c',
-    '../lxc/cgroups/cgroup2_devices.h',
-    '../lxc/cgroups/cgroup_utils.c',
-    '../lxc/cgroups/cgroup_utils.h',
-    '../lxc/error.c',
-    '../lxc/error.h',
-    '../lxc/initutils.c',
-    '../lxc/initutils.h',
-    '../lxc/file_utils.c',
-    '../lxc/file_utils.h',
-    '../lxc/lsm/apparmor.c',
-    '../lxc/lsm/lsm.c',
-    '../lxc/lsm/lsm.h',
-    '../lxc/lsm/nop.c',
-    '../lxc/lxcseccomp.h',
-    '../lxc/lxclock.c',
-    '../lxc/lxclock.h',
-    '../lxc/macro.h',
-    '../lxc/mainloop.c',
-    '../lxc/mainloop.h',
-    '../lxc/memory_utils.h',
-    '../lxc/monitor.c',
-    '../lxc/monitor.h',
-    '../lxc/mount_utils.c',
-    '../lxc/mount_utils.h',
-    '../lxc/namespace.c',
-    '../lxc/namespace.h',
-    '../lxc/network.c',
-    '../lxc/network.h',
-    '../lxc/nl.c',
-    '../lxc/nl.h',
-    '../lxc/parse.c',
-    '../lxc/parse.h',
-    '../lxc/process_utils.c',
-    '../lxc/process_utils.h',
-    '../lxc/ringbuf.c',
-    '../lxc/ringbuf.h',
-    '../lxc/start.c',
-    '../lxc/start.h',
-    '../lxc/state.c',
-    '../lxc/state.h',
-    '../lxc/storage/btrfs.c',
-    '../lxc/storage/btrfs.h',
-    '../lxc/storage/dir.c',
-    '../lxc/storage/dir.h',
-    '../lxc/storage/loop.c',
-    '../lxc/storage/loop.h',
-    '../lxc/storage/lvm.c',
-    '../lxc/storage/lvm.h',
-    '../lxc/storage/nbd.c',
-    '../lxc/storage/nbd.h',
-    '../lxc/storage/overlay.c',
-    '../lxc/storage/overlay.h',
-    '../lxc/storage/rbd.c',
-    '../lxc/storage/rbd.h',
-    '../lxc/storage/rsync.c',
-    '../lxc/storage/rsync.h',
-    '../lxc/storage/storage.c',
-    '../lxc/storage/storage.h',
-    '../lxc/storage/storage_utils.c',
-    '../lxc/storage/storage_utils.h',
-    '../lxc/storage/zfs.c',
-    '../lxc/storage/zfs.h',
-    '../lxc/string_utils.c',
-    '../lxc/string_utils.h',
-    '../lxc/sync.c',
-    '../lxc/sync.h',
-    '../lxc/terminal.c',
-    '../lxc/terminal.h',
-    '../lxc/utils.c',
-    '../lxc/utils.h',
-    '../lxc/uuid.c',
-    '../lxc/uuid.h',
-    '../lxc/log.h',
-    '../lxc/log.c') + include_sources + netns_ifaddrs_sources
-
-if libseccomp.found()
-    tests_common_sources += files('../lxc/seccomp.c')
-endif
-
-if libselinux.found()
-    tests_common_sources += files('../lxc/lsm/selinux.c')
-endif
+tests_common_sources = liblxc_sources + include_sources + netns_ifaddrs_sources
 
 test_programs += executable(
     'lxc-test-arch-parse',