mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 01:12:16 +00:00
commit
6e4796b4e3
17
config/apparmor/abstractions/meson.build
Normal file
17
config/apparmor/abstractions/meson.build
Normal file
@ -0,0 +1,17 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
if libapparmor.found()
|
||||
configure_file(
|
||||
configuration: conf,
|
||||
input: 'container-base',
|
||||
output: 'container-base',
|
||||
install: true,
|
||||
install_dir: join_paths(sysconfdir, 'apparmor.d', 'abstractions', 'lxc'))
|
||||
|
||||
configure_file(
|
||||
configuration: conf,
|
||||
input: 'start-container.in',
|
||||
output: 'start-container',
|
||||
install: true,
|
||||
install_dir: join_paths(sysconfdir, 'apparmor.d', 'abstractions', 'lxc'))
|
||||
endif
|
17
config/apparmor/meson.build
Normal file
17
config/apparmor/meson.build
Normal file
@ -0,0 +1,17 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
if libapparmor.found()
|
||||
configure_file(
|
||||
configuration: dummy_config_data,
|
||||
input: 'lxc-containers',
|
||||
output: 'lxc-containers',
|
||||
install: true,
|
||||
install_dir: join_paths(sysconfdir, 'apparmor.d'))
|
||||
|
||||
configure_file(
|
||||
configuration: dummy_config_data,
|
||||
input: 'usr.bin.lxc-start',
|
||||
output: 'usr.bin.lxc-start',
|
||||
install: true,
|
||||
install_dir: join_paths(sysconfdir, 'apparmor.d'))
|
||||
endif
|
31
config/apparmor/profiles/meson.build
Normal file
31
config/apparmor/profiles/meson.build
Normal file
@ -0,0 +1,31 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
if libapparmor.found()
|
||||
configure_file(
|
||||
configuration: dummy_config_data,
|
||||
input: 'lxc-default',
|
||||
output: 'lxc-default',
|
||||
install: true,
|
||||
install_dir: join_paths(sysconfdir, 'apparmor.d', 'lxc'))
|
||||
|
||||
configure_file(
|
||||
configuration: dummy_config_data,
|
||||
input: 'lxc-default-cgns',
|
||||
output: 'lxc-default-cgns',
|
||||
install: true,
|
||||
install_dir: join_paths(sysconfdir, 'apparmor.d', 'lxc'))
|
||||
|
||||
configure_file(
|
||||
configuration: dummy_config_data,
|
||||
input: 'lxc-default-with-mounting',
|
||||
output: 'lxc-default-with-mounting',
|
||||
install: true,
|
||||
install_dir: join_paths(sysconfdir, 'apparmor.d', 'lxc'))
|
||||
|
||||
configure_file(
|
||||
configuration: dummy_config_data,
|
||||
input: 'lxc-default-with-nesting',
|
||||
output: 'lxc-default-with-nesting',
|
||||
install: true,
|
||||
install_dir: join_paths(sysconfdir, 'apparmor.d', 'lxc'))
|
||||
endif
|
@ -6,3 +6,36 @@ lxc_apparmor_load = configure_file(
|
||||
output: 'lxc-apparmor-load',
|
||||
install: true,
|
||||
install_dir: lxclibexec)
|
||||
|
||||
if 'systemd' in init_script
|
||||
systemd = dependency('systemd')
|
||||
systemd_system_unit_dir = systemd.get_variable('systemdsystemunitdir')
|
||||
|
||||
configure_file(
|
||||
configuration: conf,
|
||||
input: 'lxc-monitord.service.in',
|
||||
output: 'lxc-monitord.service',
|
||||
install: true,
|
||||
install_dir: systemd_system_unit_dir)
|
||||
|
||||
configure_file(
|
||||
configuration: conf,
|
||||
input: 'lxc-net.service.in',
|
||||
output: 'lxc-net.service',
|
||||
install: true,
|
||||
install_dir: systemd_system_unit_dir)
|
||||
|
||||
configure_file(
|
||||
configuration: conf,
|
||||
input: 'lxc.service.in',
|
||||
output: 'lxc.service',
|
||||
install: true,
|
||||
install_dir: systemd_system_unit_dir)
|
||||
|
||||
configure_file(
|
||||
configuration: conf,
|
||||
input: 'lxc@.service.in',
|
||||
output: 'lxc@.service',
|
||||
install: true,
|
||||
install_dir: systemd_system_unit_dir)
|
||||
endif
|
||||
|
17
config/init/sysvinit/meson.build
Normal file
17
config/init/sysvinit/meson.build
Normal file
@ -0,0 +1,17 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
if 'sysvinit' in init_script
|
||||
configure_file(
|
||||
configuration: conf,
|
||||
input: 'lxc-containers.in',
|
||||
output: 'lxc-containers',
|
||||
install: true,
|
||||
install_dir: join_paths(sysconfdir, 'init.d'))
|
||||
|
||||
configure_file(
|
||||
configuration: conf,
|
||||
input: 'lxc-net.in',
|
||||
output: 'lxc-net',
|
||||
install: true,
|
||||
install_dir: join_paths(sysconfdir, 'init.d'))
|
||||
endif
|
24
config/init/upstart/meson.build
Normal file
24
config/init/upstart/meson.build
Normal file
@ -0,0 +1,24 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
if 'upstart' in init_script
|
||||
configure_file(
|
||||
configuration: conf,
|
||||
input: 'lxc.conf.in',
|
||||
output: 'lxc.conf',
|
||||
install: true,
|
||||
install_dir: join_paths(sysconfdir, 'init'))
|
||||
|
||||
configure_file(
|
||||
configuration: conf,
|
||||
input: 'lxc-instance.conf',
|
||||
output: 'lxc-instance.conf',
|
||||
install: true,
|
||||
install_dir: join_paths(sysconfdir, 'init'))
|
||||
|
||||
configure_file(
|
||||
configuration: conf,
|
||||
input: 'lxc-net.conf.in',
|
||||
output: 'lxc-net.conf',
|
||||
install: true,
|
||||
install_dir: join_paths(sysconfdir, 'init'))
|
||||
endif
|
18
config/sysconfig/meson.build
Normal file
18
config/sysconfig/meson.build
Normal file
@ -0,0 +1,18 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
fs = import('fs')
|
||||
if fs.is_dir('/etc/sysconfig')
|
||||
configure_file(
|
||||
configuration: conf,
|
||||
input: 'lxc.in',
|
||||
output: 'lxc',
|
||||
install: true,
|
||||
install_dir: join_paths(sysconfdir, 'sysconfig'))
|
||||
elif fs.is_dir('/etc/default')
|
||||
configure_file(
|
||||
configuration: conf,
|
||||
input: 'lxc.in',
|
||||
output: 'lxc',
|
||||
install: true,
|
||||
install_dir: join_paths(sysconfdir, 'default'))
|
||||
endif
|
15
meson.build
15
meson.build
@ -117,8 +117,9 @@ conf.set_quoted('LXC_USERNIC_DB', lxc_user_network_db)
|
||||
|
||||
# Custom configuration.
|
||||
cgrouppattern = get_option('cgroup-pattern')
|
||||
wants_io_uring = get_option('io-uring-event-loop')
|
||||
init_script = get_option('init-script')
|
||||
want_examples = get_option('examples')
|
||||
want_io_uring = get_option('io-uring-event-loop')
|
||||
want_pam_cgroup = get_option('pam-cgroup')
|
||||
want_mans = get_option('man')
|
||||
want_tests = get_option('tests')
|
||||
@ -186,7 +187,7 @@ add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language: '
|
||||
|
||||
# Feature detection
|
||||
## I/O uring.
|
||||
if wants_io_uring
|
||||
if want_io_uring
|
||||
liburing = dependency('liburing')
|
||||
if cc.has_function('io_uring_prep_poll_add', prefix: '#include <liburing.h>', dependencies: liburing) == false
|
||||
error('liburing version does not support IORING_POLL_ADD_MULTI')
|
||||
@ -213,7 +214,7 @@ time_epoch = time_epoch.to_int()
|
||||
conf.set('TIME_EPOCH', time_epoch)
|
||||
|
||||
## Manpages.
|
||||
sgml2man = find_program('docbook2X2man', 'docbook2x-man', 'db2x_docbook2man', 'docbook2man', 'docbook-to-man', required: false)
|
||||
sgml2man = find_program('docbook2X2man', 'docbook2x-man', 'db2x_docbook2man', 'docbook2man', 'docbook-to-man', required: want_mans)
|
||||
docbook2man = find_program('docbook2man', required: false)
|
||||
|
||||
docconf = configuration_data()
|
||||
@ -598,7 +599,7 @@ liblxc_dependencies = [
|
||||
libapparmor,
|
||||
]
|
||||
|
||||
if wants_io_uring
|
||||
if want_io_uring
|
||||
liblxc_dependencies += [liburing]
|
||||
endif
|
||||
|
||||
@ -617,11 +618,17 @@ liblxc_dep = declare_dependency(
|
||||
dependencies: liblxc_dependencies)
|
||||
|
||||
# Rest of sub-directories.
|
||||
subdir('config/apparmor')
|
||||
subdir('config/apparmor/abstractions')
|
||||
subdir('config/apparmor/profiles')
|
||||
subdir('config/bash')
|
||||
subdir('config/etc')
|
||||
subdir('config/init/common')
|
||||
subdir('config/init/systemd')
|
||||
subdir('config/init/sysvinit')
|
||||
subdir('config/init/upstart')
|
||||
subdir('config/selinux')
|
||||
subdir('config/sysconfig')
|
||||
subdir('config/templates')
|
||||
subdir('config/templates/common.conf.d')
|
||||
subdir('config/yum')
|
||||
|
@ -7,9 +7,9 @@ option('cgroup-pattern', type: 'string', value: '',
|
||||
option('examples', type: 'boolean', value: 'true',
|
||||
description: 'build and install examples')
|
||||
|
||||
option('init-script', type: 'combo',
|
||||
choices: ['systemd', 'sysvinit', 'openrc', 'upstart'], value: 'systemd',
|
||||
description: 'init script')
|
||||
option('init-script', type : 'array',
|
||||
choices : ['systemd', 'sysvinit', 'upstart'], value : ['systemd'],
|
||||
description : 'init script')
|
||||
|
||||
option('io-uring-event-loop', type: 'boolean', value: 'false',
|
||||
description: 'Enable io-uring based event loop')
|
||||
|
Loading…
Reference in New Issue
Block a user