diff --git a/lxc-2.0.8-fix_capability_h.patch b/lxc-2.0.8-fix_capability_h.patch new file mode 100644 index 0000000..c5b92c8 --- /dev/null +++ b/lxc-2.0.8-fix_capability_h.patch @@ -0,0 +1,33 @@ +diff -up lxc-2.0.8/src/lxc/caps.h.orig lxc-2.0.8/src/lxc/caps.h +--- lxc-2.0.8/src/lxc/caps.h.orig 2017-05-11 17:23:06.000000000 +0000 ++++ lxc-2.0.8/src/lxc/caps.h 2017-06-10 07:04:48.702079368 +0000 +@@ -28,6 +28,7 @@ + #define __LXC_CAPS_H + + #if HAVE_LIBCAP ++#include + #include + + extern int lxc_caps_down(void); +diff -up lxc-2.0.8/src/lxc/conf.c.orig lxc-2.0.8/src/lxc/conf.c +--- lxc-2.0.8/src/lxc/conf.c.orig 2017-05-11 17:23:06.000000000 +0000 ++++ lxc-2.0.8/src/lxc/conf.c 2017-06-10 07:08:18.448806856 +0000 +@@ -90,6 +90,7 @@ + #include "lsm/lsm.h" + + #if HAVE_LIBCAP ++#include + #include + #endif + +diff -up lxc-2.0.8/src/lxc/start.c.orig lxc-2.0.8/src/lxc/start.c +--- lxc-2.0.8/src/lxc/start.c.orig 2017-05-11 17:23:06.000000000 +0000 ++++ lxc-2.0.8/src/lxc/start.c 2017-06-10 07:05:33.166293224 +0000 +@@ -47,6 +47,7 @@ + #include + + #if HAVE_LIBCAP ++#include + #include + #endif + diff --git a/lxc.spec b/lxc.spec index 554886b..9b4ffd5 100644 --- a/lxc.spec +++ b/lxc.spec @@ -31,7 +31,7 @@ Name: lxc Version: 2.0.8 -Release: %{?prerel:0.}1%{?prerel:.%{prerel}}%{?dist} +Release: %{?prerel:0.}2%{?prerel:.%{prerel}}%{?dist} Summary: Linux Resource Containers Group: Applications/System License: LGPLv2+ and GPLv2 @@ -43,6 +43,7 @@ Source0: http://linuxcontainers.org/downloads/%{name}-%{version}.tar.gz %endif Patch0: lxc-2.0.7-fix-init.patch Patch1: lxc-2.0.6-fix-lxc-net.patch +Patch2: lxc-2.0.8-fix_capability_h.patch BuildRequires: docbook2X BuildRequires: doxygen BuildRequires: kernel-headers @@ -177,6 +178,11 @@ This package contains documentation for %{name}. %setup -q -n %{name}-%{?!prerel:%{version}}%{?prerel:%{commit}} %patch0 -p1 %patch1 -p1 +%if 0%{?rhel} == 6 +# fix build failure with broken sys/capabilities.h (see +# e.g. rhbz#483548) +%patch2 -p1 +%endif %build @@ -376,6 +382,9 @@ fi %changelog +* Sat Jun 10 2017 Thomas Moschny - 2.0.8-2 +- Fix for EL6 build failure. + * Tue Jun 6 2017 Thomas Moschny - 2.0.8-1 - Update to 2.0.8.