Tags: patch

Adds linux-libc-dev (which provides /usr/include/linux/capabilities.h) to
build-dependencies and makes sure that the system include path is checked
before the local copy.

---
 debian/control                                     |    3 +-
 debian/patches/series                              |    1 +
 .../patches/use-system-linux-capabilities-h.patch  |   33 ++++++++++++++++++++
 3 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/use-system-linux-capabilities-h.patch

diff --git a/debian/control b/debian/control
index 933848c..edf3a46 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,8 @@ Section: libs
 Priority: optional
 Maintainer: Torsten Werner <twer...@debian.org>
 Standards-Version: 3.9.0
-Build-Depends: debhelper (>= 8.1.3~), indent, libattr1-dev, libpam0g-dev
+Build-Depends: debhelper (>= 8.1.3~), indent, libattr1-dev, libpam0g-dev,
+ linux-libc-dev
 Homepage: http://sites.google.com/site/fullycapable/
 Vcs-Git: git://git.debian.org/collab-maint/libcap2.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/libcap2.git
diff --git a/debian/patches/series b/debian/patches/series
index 9ca6bc0..169ea49 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-fix-Makefiles.patch
 0003-refine-setcap-error-message.patch
+use-system-linux-capabilities-h.patch
diff --git a/debian/patches/use-system-linux-capabilities-h.patch 
b/debian/patches/use-system-linux-capabilities-h.patch
new file mode 100644
index 0000000..be24300
--- /dev/null
+++ b/debian/patches/use-system-linux-capabilities-h.patch
@@ -0,0 +1,33 @@
+Description: Use system <linux/capabilities.h>
+Author: Oskari Saarenmaa <os_deb...@ohmu.fi>
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=689035
+Forwarded: no
+
+diff --git a/libcap/cap_file.c b/libcap/cap_file.c
+index 634e601..7269018 100644
+--- a/libcap/cap_file.c
++++ b/libcap/cap_file.c
+@@ -10,7 +10,7 @@
+ #include <sys/stat.h>
+ #include <unistd.h>
+ 
+-#define XATTR_SECURITY_PREFIX "security."
++#define XATTR_NAME_CAPS "security.capability"
+ 
+ #include "libcap.h"
+ 
+diff --git a/Make.Rules b/Make.Rules
+index 8393738..5c21469 100644
+--- a/Make.Rules
++++ b/Make.Rules
+@@ -44,8 +44,8 @@ MINOR=22
+ 
+ # Compilation specifics
+ 
+-KERNEL_HEADERS := $(topdir)/libcap/include
+-IPATH += -fPIC -I$(topdir)/libcap/include -I$(KERNEL_HEADERS)
++KERNEL_HEADERS := /usr/include/
++IPATH += -fPIC -idirafter $(topdir)/libcap/include -idirafter 
$(KERNEL_HEADERS)
+ 
+ CC := gcc
+ CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-- 
1.7.10.4


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to