lxc: set libcap as an optional dependency
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Fri, 19 May 2017 14:15:59 +0000 (16:15 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 20 May 2017 14:17:07 +0000 (16:17 +0200)
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/lxc/Config.in
package/lxc/lxc.hash
package/lxc/lxc.mk

index c5c75ea70f44f1ef92412f40293b82845a09e988..22aa8131973ddea0890b687229695ca5c454a4b8 100644 (file)
@@ -5,7 +5,6 @@ config BR2_PACKAGE_LXC
        # 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
index 086b13912055a7355e1ee4cce27566318f201ffe..801759aad5ea9722ad949a1b620c51e3f08bf68a 100644 (file)
@@ -1,2 +1,3 @@
 # Locally calculated
 sha256 0d8e34b302cfe4c40c6c9ae5097096aa5cc2c1dfceea3f0f22e3e16c4a4e8494        lxc-2.0.8.tar.gz
+sha256 c79443c5db7e7defd53992d120cad2bc8afc2ff363b1e84ec31bc2b95ec5ca44        bc5b27d6f6d166d2a6df47982cbe36041ce6b735.patch
index 4ba6d9fe43e5c08fc36c37112cf58b23d9fc7f62..8a200e7d3cb123ce6b1b2eeb0804809d178923ba 100644 (file)
@@ -8,9 +8,13 @@ LXC_VERSION = 2.0.8
 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)
@@ -22,6 +26,13 @@ else
 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