Merge pull request #3979 from brauner/2021-09-27.fixes

build: add commands, hooks, and templates
This commit is contained in:
Stéphane Graber 2021-09-27 09:39:39 -04:00 committed by GitHub
commit 553b7a0332
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 231 additions and 112 deletions

0
hooks/dhclient-script Normal file → Executable file
View File

60
hooks/meson.build Normal file
View File

@ -0,0 +1,60 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
hooks_include_directories = include_directories(
'../',
'../src/include')
hooks_unmount_namespace_sources = files('unmount-namespace.c')
hook_programs += executable(
'unmount-namespace',
hooks_unmount_namespace_sources,
include_directories : hooks_include_directories,
install : true,
install_dir : lxchookdir)
hook_programs = configure_file(
configuration : dummy_config_data,
input : 'clonehostname',
output : 'clonehostname')
install_data(join_paths(project_build_root, 'hooks/clonehostname'), install_dir : lxchookdir)
hook_programs = configure_file(
configuration : dummy_config_data,
input : 'dhclient-script',
output : 'dhclient-script')
install_data(join_paths(project_build_root, 'hooks/dhclient-script'), install_dir : lxchookdir)
dhclient_config_data = configuration_data()
dhclient_config_data.set_quoted('LXCHOOKDIR', lxchookdir)
dhclient_config_data.set_quoted('SYSCONFDIR', sysconfdir)
hook_programs = configure_file(
configuration : dhclient_config_data,
input : 'dhclient.in',
output : 'dhclient')
install_data(join_paths(project_build_root, 'hooks/dhclient'), install_dir : lxchookdir)
hook_programs = configure_file(
configuration : dummy_config_data,
input : 'mountecryptfsroot',
output : 'mountecryptfsroot')
install_data(join_paths(project_build_root, 'hooks/mountecryptfsroot'), install_dir : lxchookdir)
hook_programs = configure_file(
configuration : dummy_config_data,
input : 'nvidia',
output : 'nvidia')
install_data(join_paths(project_build_root, 'hooks/nvidia'), install_dir : lxchookdir)
hook_programs = configure_file(
configuration : dummy_config_data,
input : 'squid-deb-proxy-client',
output : 'squid-deb-proxy-client')
install_data(join_paths(project_build_root, 'hooks/squid-deb-proxy-client'), install_dir : lxchookdir)
hook_programs = configure_file(
configuration : dummy_config_data,
input : 'ubuntu-cloud-prep',
output : 'ubuntu-cloud-prep')
install_data(join_paths(project_build_root, 'hooks/ubuntu-cloud-prep'), install_dir : lxchookdir)

View File

@ -22,6 +22,7 @@ conf = configuration_data()
conf.set_quoted('PROJECT_URL', 'https://linuxcontainers.org/lxc/introduction/')
conf.set('PROJECT_VERSION', meson.project_version(),
description : 'Numerical project version (used where a simple number is expected)')
conf.set('PACKAGE_VERSION', meson.project_version())
conf.set('_GNU_SOURCE', true)
conf.set('__STDC_FORMAT_MACROS', true)
@ -103,8 +104,15 @@ conf.set_quoted('LXCHOOKDIR', lxchookdir)
lxchookbindir = join_paths(libexecdir, 'lxc/hooks')
conf.set_quoted('LXCBINHOOKDIR', lxchookbindir)
user_network_conf_opt = get_option('user-network-conf')
lxc_user_network_conf = join_paths(sysconfdir, user_network_conf_opt)
conf.set_quoted('LXC_USERNIC_CONF', lxc_user_network_conf)
user_network_db_opt = get_option('user-network-db')
lxc_user_network_db = join_paths(runtimepath, user_network_db_opt)
conf.set_quoted('LXC_USERNIC_DB', lxc_user_network_db)
# AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date --utc --date=@${SOURCE_DATE_EPOCH:-$(date +%s)} '+%Y-%m-%d')")
# AS_AC_EXPAND(LXC_USERNIC_CONF, "$with_usernic_conf")
# AS_AC_EXPAND(LXC_USERNIC_DB, "$with_usernic_db")
# AS_AC_EXPAND(LXC_DISTRO_SYSCONF, "$distrosysconf")
@ -198,6 +206,8 @@ foreach decl : [
# We get -1 if the size cannot be determined
if cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') > 0
conf.set10('HAVE_' + decl.underscorify().to_upper(), true)
else
conf.set10('HAVE_' + decl.underscorify().to_upper(), false)
endif
endforeach
@ -282,17 +292,20 @@ conf.set('TIME_EPOCH', time_epoch)
threads = dependency('threads')
libseccomp = dependency('libseccomp')
conf.set10('HAVE_SECCOMP', libseccomp.found())
if libseccomp.found()
conf.set10('HAVE_SECCOMP', libseccomp.found())
if libseccomp.version().version_compare('>=2.5.0')
# https://github.com/seccomp/libseccomp/commit/dead12bc788b259b148cc4d93b970ef0bd602b1a
conf.set10('HAVE_DECL_SECCOMP_NOTIFY_FD', true)
else
conf.set10('HAVE_DECL_SECCOMP_NOTIFY_FD', false)
endif
if libseccomp.version().version_compare('>=2.0.0')
# https://github.com/seccomp/libseccomp/commit/6220c8c0fc479d97b6d3e3166a4e46fbfe25a3c0
conf.set10('HAVE_DECL_SECCOMP_SYSCALL_RESOLVE_NAME_ARCH', true)
else
conf.set10('HAVE_DECL_SECCOMP_SYSCALL_RESOLVE_NAME_ARCH', false)
endif
seccomp_headers = '''
@ -307,44 +320,34 @@ if libseccomp.found()
# We get -1 if the size cannot be determined
if cc.sizeof(decl, prefix : seccomp_headers, args : '-D_GNU_SOURCE') > 0
conf.set10('HAVE_' + decl.underscorify().to_upper(), true)
else
conf.set10('HAVE_' + decl.underscorify().to_upper(), false)
endif
endforeach
endif
libselinux = dependency('libselinux', required : false)
if libselinux.found()
conf.set10('HAVE_SELINUX', libselinux.found())
endif
conf.set10('HAVE_SELINUX', libselinux.found())
libapparmor = dependency('libapparmor', required : false)
if libapparmor.found()
conf.set10('HAVE_APPARMOR', libapparmor.found())
endif
conf.set10('HAVE_APPARMOR', libapparmor.found())
libopenssl = dependency('openssl', required : false)
if libopenssl.found()
conf.set10('HAVE_OPENSSL', libopenssl.found())
endif
conf.set10('HAVE_OPENSSL', libopenssl.found())
libcap = dependency('libcap', required : false)
if not libcap.found()
# Compat with Ubuntu 14.04 which ships libcap w/o .pc file
libcap = cc.find_library('cap', required : false)
endif
if libcap.found()
conf.set10('HAVE_LIBCAP', libcap.found())
endif
conf.set10('HAVE_LIBCAP', libcap.found())
libcap_static = dependency('libcap', required : false, static : true)
if not libcap_static.found()
# Compat with Ubuntu 14.04 which ships libcap w/o .pc file
libcap_static = cc.find_library('cap', required : false, static : true)
endif
if libcap_static.found()
conf.set10('HAVE_STATIC_LIBCAP', libcap_static.found())
endif
conf.set10('HAVE_STATIC_LIBCAP', libcap_static.found())
have = cc.has_function('strchrnul', prefix : '#include <string.h>', args : '-D_GNU_SOURCE')
conf.set10('HAVE_STRCHRNUL', have)
@ -370,7 +373,6 @@ liblxc_includes = [basic_includes, include_directories(
subdir('src/include')
subdir('src/lxc/tools/include')
subdir('hooks')
subdir('src/lxc')
liblxc = shared_library(
@ -397,38 +399,21 @@ liblxc_dep = declare_dependency(
libselinux,
libapparmor])
dummy_config_data = configuration_data()
dummy_config_data.set_quoted('DUMMY_VARIABLE', '1')
hook_programs = []
subdir('hooks')
template_scripts = []
subdir('templates')
cmd_programs = []
subdir('src/lxc/cmd')
public_programs = []
subdir('src/lxc/tools')
cmd_programs += executable(
'lxc-init',
cmd_lxc_init_sources,
include_directories: cmd_liblxc_includes,
dependencies : liblxc_dep,
install : true)
cmd_programs += executable(
'init.lxc.static',
cmd_lxc_init_sources,
include_directories: cmd_liblxc_includes,
link_with : [liblxc_static],
link_args : ['-static'],
c_args : ['-DNO_LXC_CONF'],
dependencies : [libcap_static],
install : true)
hook_programs = []
hook_programs += executable(
'unmount-namespace',
hooks_unmount_namespace_sources,
include_directories : hooks_include_directories,
install : true,
install_dir : lxchookdir)
found_syscalls = []
missing_syscalls = []
@ -593,7 +578,9 @@ status = [
'log path: @0@'.format(lxclogpath),
'lxc path: @0@'.format(lxcpath),
'lxc template config: @0@'.format(lxctemplateconfig),
'lxc template directory: @0@'.format(lxctemplatedir)]
'lxc template directory: @0@'.format(lxctemplatedir),
'lxc user network config: @0@'.format(lxc_user_network_conf),
'lxc user network database: @0@'.format(lxc_user_network_db)]
alt_time_epoch = run_command('date', '-Is', '-u', '-d',
'@@0@'.format(time_epoch)).stdout().strip()

View File

@ -30,3 +30,9 @@ option('global-config', type : 'string', value : 'lxc/lxc.conf',
option('docdir', type : 'string',
description : 'documentation directory')
option('user-network-conf', type : 'string', value : 'lxc/lxc-usernet',
description : 'user network interface configuration file')
option('user-network-db', type : 'string', value : 'lxc/nics',
description : 'user network database')

View File

@ -1,8 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#include "config.h"
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
@ -20,7 +19,6 @@
#include "version.h"
#include "compiler.h"
#include "config.h"
#include "initutils.h"
#include "memory_utils.h"
#include "parse.h"

View File

@ -1,8 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#include "config.h"
#include <errno.h>
#include <fcntl.h>
#include <net/if.h>
@ -24,7 +23,6 @@
#include "lxc.h"
#include "af_unix.h"
#include "config.h"
#include "log.h"
#include "mainloop.h"
#include "monitor.h"
@ -409,8 +407,9 @@ int main(int argc, char *argv[])
* if-empty-statement construct is to quiet the
* warn-unused-result warning.
*/
if (lxc_write_nointr(pipefd, "S", 1))
if (lxc_write_nointr(pipefd, "S", 1)) {
;
}
close(pipefd);
}

View File

@ -1,8 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#include "config.h"
#include <arpa/inet.h>
#include <ctype.h>
#include <errno.h>
@ -30,7 +29,6 @@
#include <unistd.h>
#include "compiler.h"
#include "config.h"
#include "file_utils.h"
#include "log.h"
#include "memory_utils.h"
@ -42,7 +40,7 @@
#include "syscall_wrappers.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif
@ -111,11 +109,11 @@ static char *get_username(void)
__do_free char *buf = NULL;
struct passwd pwent;
struct passwd *pwentp = NULL;
size_t bufsize;
ssize_t bufsize;
int ret;
bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);
if (bufsize == -1)
if (bufsize < 0)
bufsize = 1024;
buf = malloc(bufsize);
@ -144,7 +142,7 @@ static char **get_groupnames(void)
int ret, i;
struct group grent;
struct group *grentp = NULL;
size_t bufsize;
ssize_t bufsize;
ngroups = getgroups(0, NULL);
if (ngroups < 0) {
@ -174,7 +172,7 @@ static char **get_groupnames(void)
}
bufsize = sysconf(_SC_GETGR_R_SIZE_MAX);
if (bufsize == -1)
if (bufsize < 0)
bufsize = 1024;
buf = malloc(bufsize);
@ -659,6 +657,7 @@ static char *get_nic_if_avail(int fd, struct alloted_s *names, int pid,
size_t length = 0;
int ret;
size_t slen;
ssize_t nbytes;
char *owner;
char nicname[IFNAMSIZ];
struct alloted_s *n;
@ -755,7 +754,8 @@ static char *get_nic_if_avail(int fd, struct alloted_s *names, int pid,
return NULL;
}
if (lxc_pwrite_nointr(fd, newline, slen, length) != slen) {
nbytes = lxc_pwrite_nointr(fd, newline, slen, length);
if (nbytes < 0 || (size_t)nbytes != slen) {
CMD_SYSERROR("Failed to append new entry \"%s\" to database file", newline);
if (lxc_netdev_delete_by_name(nicname) != 0)

View File

@ -1,8 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#include "config.h"
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
@ -22,7 +21,6 @@
#include "compiler.h"
#include "conf.h"
#include "config.h"
#include "hlist.h"
#include "list.h"
#include "log.h"
@ -228,13 +226,13 @@ static int read_default_map(char *fnam, int which, char *user)
static int find_default_map(void)
{
__do_free char *buf = NULL;
size_t bufsize;
ssize_t bufsize;
struct passwd pwent;
int ret = -1;
struct passwd *pwentp = NULL;
bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);
if (bufsize == -1)
if (bufsize < 0)
bufsize = 1024;
buf = malloc(bufsize);
@ -261,12 +259,14 @@ static int find_default_map(void)
return 0;
}
static bool is_in_ns_range(long id, struct id_map *map)
static bool is_in_ns_range(unsigned long id, struct id_map *map)
{
if (id < map->nsid)
return false;
if (id >= map->nsid + map->range)
return false;
return true;
}

View File

@ -6,7 +6,8 @@ cmd_liblxc_includes = include_directories(
'../cgroups',
'../lsm',
'../storage',
'../../include')
'../../include',
'../../../')
cmd_common_sources = files(
'../af_unix.c',
@ -148,12 +149,9 @@ cmd_lxc_init_static_sources = files(
'../string_utils.c',
'../string_utils.h') + include_sources
cmd_lxc_monitord_sources = files('lxc_monitord.c') + cmd_common_sources
cmd_lxc_user_nic_sources = files('lxc_user_nic.c') + cmd_common_sources
cmd_lxc_usernsexec_sources = files('lxc_usernsexec.c') + cmd_common_sources
dummy_config_data = configuration_data()
dummy_config_data.set_quoted('DUMMY_VARIABLE', '1')
cmd_lxc_monitord_sources = files('lxc_monitord.c') + cmd_common_sources + netns_ifaddrs_sources
cmd_lxc_user_nic_sources = files('lxc_user_nic.c') + cmd_common_sources + netns_ifaddrs_sources
cmd_lxc_usernsexec_sources = files('lxc_usernsexec.c') + cmd_common_sources + netns_ifaddrs_sources
cmd_lxc_checkconfig = configure_file(
configuration : dummy_config_data,
@ -167,3 +165,43 @@ cmd_lxc_update_config = configure_file(
input : 'lxc-update-config.in',
output : 'lxc-update-config')
install_data(join_paths(project_build_root, 'src/lxc/cmd/lxc-update-config'), install_dir : bindir)
cmd_lxc_update_config_data = configuration_data()
cmd_programs += executable(
'init.lxc.static',
cmd_lxc_init_sources,
include_directories: cmd_liblxc_includes,
link_with : [liblxc_static],
link_args : ['-static'],
c_args : ['-DNO_LXC_CONF'],
dependencies : [libcap_static],
install : true)
cmd_programs += executable(
'lxc-init',
cmd_lxc_init_sources,
include_directories: cmd_liblxc_includes,
dependencies : liblxc_dep,
install : true)
cmd_programs += executable(
'lxc-monitord',
cmd_lxc_monitord_sources,
include_directories: cmd_liblxc_includes,
dependencies : liblxc_dep,
install : true)
cmd_programs += executable(
'lxc-user-nic',
cmd_lxc_user_nic_sources,
include_directories: cmd_liblxc_includes,
dependencies : liblxc_dep,
install : true)
cmd_programs += executable(
'lxc-usernsexec',
cmd_lxc_usernsexec_sources,
include_directories: cmd_liblxc_includes,
dependencies : liblxc_dep,
install : true)

View File

@ -17,7 +17,7 @@
#include "memory_utils.h"
#include "process_utils.h"
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif

View File

@ -304,7 +304,7 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \
* Helper macro to define errno string.
*/
#if HAVE_STRERROR_R
#ifndef HAVE_DECL_STRERROR_R
#if !HAVE_DECL_STRERROR_R
#ifdef STRERROR_R_CHAR_P
char *strerror_r(int errnum, char *buf, size_t buflen);
#else

View File

@ -84,7 +84,7 @@ static inline void cleanup_handler(struct lxc_async_descr *descr,
delete_handler(handler);
}
#ifndef HAVE_LIBURING
#if !HAVE_LIBURING
static inline int __lxc_mainloop_io_uring(struct lxc_async_descr *descr,
int timeout_ms)
{
@ -514,7 +514,7 @@ void lxc_mainloop_close(struct lxc_async_descr *descr)
}
if (descr->type == LXC_MAINLOOP_IO_URING) {
#ifdef HAVE_LIBURING
#if HAVE_LIBURING
io_uring_queue_exit(descr->ring);
munmap(descr->ring, sizeof(struct io_uring));
#else

View File

@ -30,7 +30,7 @@
#include "state.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif

View File

@ -39,7 +39,7 @@
#include "syscall_wrappers.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif

View File

@ -31,11 +31,11 @@
#include <security/_pam_macros.h>
#include <security/pam_modules.h>
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif
#ifndef HAVE_STRLCAT
#if !HAVE_STRLCAT
#include "strlcat.h"
#endif

View File

@ -23,11 +23,11 @@
#include "storage.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif
#ifndef HAVE_STRLCAT
#if !HAVE_STRLCAT
#include "strlcat.h"
#endif

View File

@ -19,7 +19,7 @@
#include "syscall_wrappers.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif

View File

@ -14,7 +14,7 @@
#include "storage_utils.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif

View File

@ -40,7 +40,7 @@
#include "utils.h"
#include "zfs.h"
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif

View File

@ -28,7 +28,7 @@
#include "syscall_wrappers.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif

View File

@ -6,7 +6,7 @@
#include "config.h"
#ifndef HAVE_STRCHRNUL
#if !HAVE_STRCHRNUL
#include "strchrnul.h"
#endif

View File

@ -24,7 +24,7 @@
#include "storage_utils.h"
#include "utils.h"
#ifndef HAVE_GETSUBOPT
#if !HAVE_GETSUBOPT
#include "include/getsubopt.h"
#endif

View File

@ -31,7 +31,7 @@
#include "lxctest.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif

View File

@ -30,7 +30,7 @@
#include "../lxc/lxc.h"
#include "../lxc/memory_utils.h"
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif

View File

@ -32,7 +32,7 @@
#include <lxc/lxccontainer.h>
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif

View File

@ -35,7 +35,7 @@
#include "lxctest.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif

View File

@ -24,7 +24,7 @@
#include "memory_utils.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif

View File

@ -31,7 +31,7 @@
#include "lxctest.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif

View File

@ -31,7 +31,7 @@
#include "lxctest.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif

0
templates/lxc-busybox.in Normal file → Executable file
View File

6
templates/lxc-download.in Normal file → Executable file
View File

@ -21,9 +21,9 @@
set -eu
LOCALSTATEDIR="@LOCALSTATEDIR@"
LXC_HOOK_DIR="@LXCHOOKDIR@"
LXC_TEMPLATE_CONFIG="@LXCTEMPLATECONFIG@"
LOCALSTATEDIR=@LOCALSTATEDIR@
LXC_HOOK_DIR=@LXCHOOKDIR@
LXC_TEMPLATE_CONFIG=@LXCTEMPLATECONFIG@
# Defaults
DOWNLOAD_ARCH=

4
templates/lxc-local.in Normal file → Executable file
View File

@ -22,8 +22,8 @@
set -eu
LXC_HOOK_DIR="@LXCHOOKDIR@"
LXC_TEMPLATE_CONFIG="@LXCTEMPLATECONFIG@"
LXC_HOOK_DIR=@LXCHOOKDIR@
LXC_TEMPLATE_CONFIG=@LXCTEMPLATECONFIG@
LXC_NAME=
LXC_PATH=

6
templates/lxc-oci.in Normal file → Executable file
View File

@ -33,9 +33,9 @@ for bin in skopeo umoci jq; do
fi
done
LOCALSTATEDIR="@LOCALSTATEDIR@"
LXC_TEMPLATE_CONFIG="@LXCTEMPLATECONFIG@"
LXC_HOOK_DIR="@LXCHOOKDIR@"
LOCALSTATEDIR=@LOCALSTATEDIR@
LXC_TEMPLATE_CONFIG=@LXCTEMPLATECONFIG@
LXC_HOOK_DIR=@LXCHOOKDIR@
# Some useful functions
cleanup() {

31
templates/meson.build Normal file
View File

@ -0,0 +1,31 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
template_scripts = configure_file(
configuration : dummy_config_data,
input : 'lxc-busybox.in',
output : 'lxc-busybox')
install_data(join_paths(project_build_root, 'templates/lxc-busybox'), install_dir : lxctemplatedir)
template_config_data = configuration_data()
template_config_data.set_quoted('LXCHOOKDIR', lxchookdir)
template_config_data.set_quoted('LXCTEMPLATECONFIG', lxctemplateconfig)
template_config_data.set_quoted('LOCALSTATEDIR', localstatedir)
template_config_data.set_quoted('PACKAGE_VERSION', meson.project_version())
template_scripts = configure_file(
configuration : template_config_data,
input : 'lxc-download.in',
output : 'lxc-download')
install_data(join_paths(project_build_root, 'templates/lxc-download'), install_dir : lxchookdir)
template_scripts = configure_file(
configuration : template_config_data,
input : 'lxc-local.in',
output : 'lxc-local')
install_data(join_paths(project_build_root, 'templates/lxc-local'), install_dir : lxchookdir)
template_scripts = configure_file(
configuration : template_config_data,
input : 'lxc-oci.in',
output : 'lxc-oci')
install_data(join_paths(project_build_root, 'templates/lxc-oci'), install_dir : lxchookdir)