# build system forcefully builds a shared library
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # setns() system call
- select BR2_PACKAGE_LIBCAP
help
Linux Containers (LXC), provides the ability to group and isolate
of a set of processes in a jail by virtualizing and accounting the
LXC_SITE = https://linuxcontainers.org/downloads/lxc
LXC_LICENSE = LGPL-2.1+
LXC_LICENSE_FILES = COPYING
-LXC_DEPENDENCIES = libcap host-pkgconf
+LXC_DEPENDENCIES = host-pkgconf
LXC_INSTALL_STAGING = YES
+# This patch fixes compilation without capabilities
+LXC_PATCH = \
+ https://github.com/lxc/lxc/commit/bc5b27d6f6d166d2a6df47982cbe36041ce6b735.patch
+
LXC_CONF_OPTS = --disable-apparmor --with-distro=buildroot \
--disable-python --disable-werror \
$(if $(BR2_PACKAGE_BASH),,--disable-bash)
LXC_CONF_OPTS += --disable-gnutls
endif
+ifeq ($(BR2_PACKAGE_LIBCAP),y)
+LXC_CONF_OPTS += --enable-capabilities
+LXC_DEPENDENCIES += libcap
+else
+LXC_CONF_OPTS += --disable-capabilities
+endif
+
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
LXC_CONF_OPTS += --enable-seccomp
LXC_DEPENDENCIES += libseccomp