mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-09 17:27:22 +00:00
meson.build: allow explicit distrosysconfdir
Allows either: - Build inside minimal-and-clean chroot with neither /etc/sysconfig nor /etc/default available. - Cross Compile lxc from foreign distro, let's say host distro uses /etc/sysconfig and build distro uses /etc/default and vice versus. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
This commit is contained in:
parent
cbbb09b56f
commit
16ebb29dcc
@ -117,14 +117,18 @@ conf.set('SYSCONFDIR', sysconfdir)
|
|||||||
|
|
||||||
# Set sysconfdir
|
# Set sysconfdir
|
||||||
fs = import('fs')
|
fs = import('fs')
|
||||||
if fs.is_dir('/etc/sysconfig')
|
distrosysconfdir = get_option('distrosysconfdir')
|
||||||
|
if distrosysconfdir != ''
|
||||||
|
distrosysconfdir = join_paths(sysconfdir, distrosysconfdir)
|
||||||
|
conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
|
||||||
|
elif fs.is_dir('/etc/sysconfig')
|
||||||
distrosysconfdir = join_paths(sysconfdir, 'sysconfig')
|
distrosysconfdir = join_paths(sysconfdir, 'sysconfig')
|
||||||
conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
|
conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
|
||||||
elif fs.is_dir('/etc/default')
|
elif fs.is_dir('/etc/default')
|
||||||
distrosysconfdir = join_paths(sysconfdir, 'default')
|
distrosysconfdir = join_paths(sysconfdir, 'default')
|
||||||
conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
|
conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
|
||||||
else
|
else
|
||||||
distrosysconfdir = ''
|
error('"distrosysconfdir" is not set')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Cross-compile on Android.
|
# Cross-compile on Android.
|
||||||
|
@ -115,3 +115,6 @@ option('thread-safety', type : 'boolean', value : 'true',
|
|||||||
# was --{disable,enable}-memfd-rexec in autotools
|
# was --{disable,enable}-memfd-rexec in autotools
|
||||||
option('memfd-rexec', type : 'boolean', value : 'true',
|
option('memfd-rexec', type : 'boolean', value : 'true',
|
||||||
description : 'whether to rexec the lxc-attach binary when attaching to a container')
|
description : 'whether to rexec the lxc-attach binary when attaching to a container')
|
||||||
|
|
||||||
|
option('distrosysconfdir', type : 'string', value: '',
|
||||||
|
description: 'relative path to sysconfdir for distro default configuration')
|
||||||
|
Loading…
Reference in New Issue
Block a user