Code

patches/ipvs_h_include, rules: Let the ipvs plugin use linux/ip_vs.h.
authorSebastian Harl <sh@tokkee.org>
Mon, 9 Jan 2012 14:00:08 +0000 (15:00 +0100)
committerSebastian Harl <sh@tokkee.org>
Mon, 9 Jan 2012 14:00:08 +0000 (15:00 +0100)
… rather than net/ip_vs.h. Also, make sure to look for the header in
/usr/include rather than the kernel directory (which has been deprecated).

Force building of the ipvs plugin since configure is not currently able to
correctly check for ip_vs.h.

debian/changelog
debian/patches/00list
debian/patches/ipvs_h_include.dpatch [new file with mode: 0755]
debian/rules

index c1accf6fde891a8e0d7043ade32cfaebbfe2ebe5..20dd09aa5ce7b413a10affea0eef1b771f2ace32 100644 (file)
@@ -25,8 +25,14 @@ collectd (4.10.4-1) unstable; urgency=low
   * debian/rules:
     - Append DEB_BUILD_ARCH to JAVA_HOME; this is how it's done in the OpenJDK
       package.
-
- -- Sebastian Harl <tokkee@debian.org>  Thu, 05 Jan 2012 16:18:51 +0100
+  * debian/patches/ipvs_h_include, debian/rules:
+    - Let the ipvs plugin use linux/ip_vs.h rather than net/ip_vs.h. Also,
+      make sure to look for the header in /usr/include rather than the kernel
+      directory (which has been deprecated).
+    - Force building of the ipvs plugin since configure is not currently able
+      to correctly check for ip_vs.h.
+
+ -- Sebastian Harl <tokkee@debian.org>  Mon, 09 Jan 2012 14:35:27 +0100
 
 collectd (4.10.1-2.1) unstable; urgency=high
 
index 070e1e06050c5577e7ac7cea3251b636e5404a1a..87f4b78b10b5ebf50a7645459af3ef4ef35ce2c9 100644 (file)
@@ -1,3 +1,4 @@
 rrd_filter_path.dpatch
 collection_conf_path.dpatch
+ipvs_h_include.dpatch
 bts559801_plugin_find_fix.dpatch
diff --git a/debian/patches/ipvs_h_include.dpatch b/debian/patches/ipvs_h_include.dpatch
new file mode 100755 (executable)
index 0000000..b57fb9d
--- /dev/null
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## ipvs_h_include.dpatch by Sebastian Harl <sh@tokkee.org>
+##
+## DP: Include linux/ip_vs.h.
+
+@DPATCH@
+
+diff a/src/ipvs.c b/src/ipvs.c
+--- a/src/ipvs.c
++++ b/src/ipvs.c
+@@ -45,6 +45,7 @@
+ #endif /* HAVE_NETINET_IN_H */
+ /* this can probably only be found in the kernel sources */
++#include <linux/ip_vs.h>
+ #if HAVE_NET_IP_VS_H
+ # include <net/ip_vs.h>
+ #elif HAVE_IP_VS_H
index be4441ed30ea95183a4f1515c941e6404570c09e..7d8139a6466575fa36f4dc9f3adb6b9b5dcfacc6 100755 (executable)
@@ -98,6 +98,11 @@ ifneq (,$(filter kfreebsd-i386 kfreebsd-amd64, $(DEB_BUILD_ARCH)))
                --disable-netlink \
                --disable-sensors \
                --disable-vserver
+else
+       # configure is not currently able to correctly check for ip_vs.h.
+       # ipvs_h_include.dpatch takes care of using the right one. Overwriting
+       # KERNEL_DIR makes sure we don't use any kernel headers directly.
+       confflags += --enable-ipvs=force KERNEL_DIR=/usr
 endif
 
 # These plugins have not been ported to FreeBSD yet.