Package: ipvsadm
Version: 1:1.25.clean-1
Severity: wishlist
Dear Maintainer,
libnl3 3.2.3 is now in Debian unstable. It would be nice if ipvsadm
could be built against it.
Attached are two patches which allow this: one debdiff from Ubuntu
changes to port to libnl3,
and an extra patch to support libnl3 3.2.x.
-- System Information:
Debian Release: wheezy/sid
APT prefers precise-updates
APT policy: (500, 'precise-updates'), (500, 'precise-security'),
(500, 'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-6-generic (SMP w/4 CPU cores)
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Mathieu Trudel-Lapierre
Freenode: cyphermox, Jabber: mathieu...@gmail.com
4096R/EE018C93 1967 8F7D 03A1 8F38 732E FF82 C126 33E1 EE01 8C93
From: Mathieu Trudel-Lapierre
Subject: When building against libnl3; make sure we get the right cflags and
libs
Forwarded: yes
Index: ipvsadm/Makefile
===
--- ipvsadm.orig/Makefile 2011-12-21 15:18:16.477534000 -0500
+++ ipvsadm/Makefile 2011-12-21 16:02:25.245788763 -0500
@@ -77,7 +77,8 @@
OBJS = ipvsadm.o config_stream.o dynamic_array.o
LIBS = $(POPT_LIB)
ifneq (0,$(HAVE_NL))
-LIBS += $(shell pkg-config --libs libnl-3.0)
+INCLUDE += $(shell pkg-config --cflags libnl-3.0 libnl-genl-3.0)
+LIBS += $(shell pkg-config --libs libnl-3.0 libnl-genl-3.0)
endif
DEFINES = -DVERSION=\"$(VERSION)\" -DSCHEDULERS=\"$(SCHEDULERS)\" \
$(POPT_DEFINE)
Index: ipvsadm/libipvs/Makefile
===
--- ipvsadm.orig/libipvs/Makefile 2011-12-21 15:18:16.477534000 -0500
+++ ipvsadm/libipvs/Makefile 2011-12-21 15:59:15.08134 -0500
@@ -4,6 +4,7 @@
CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC
ifneq (0,$(HAVE_NL))
CFLAGS += -DLIBIPVS_USE_NL
+INCLUDE += $(shell pkg-config --cflags libnl-3.0 libnl-genl-3.0)
endif
INCLUDE += $(shell if [ -f ../../ip_vs.h ]; then \
diff -u ipvsadm-1.25.clean/debian/changelog ipvsadm-1.25.clean/debian/changelog
--- ipvsadm-1.25.clean/debian/changelog
+++ ipvsadm-1.25.clean/debian/changelog
@@ -1,3 +1,9 @@
+ipvsadm (1:1.25.clean-1ubuntu2) oneiric; urgency=low
+
+ * Port to libnl3.
+
+ -- Colin Watson Mon, 08 Aug 2011 17:23:22 +0100
+
ipvsadm (1:1.25.clean-1ubuntu1) natty; urgency=low
* libipvs/libipvs.c: upstream patch (r64) to fix incorrect activeconns,
diff -u ipvsadm-1.25.clean/debian/control ipvsadm-1.25.clean/debian/control
--- ipvsadm-1.25.clean/debian/control
+++ ipvsadm-1.25.clean/debian/control
@@ -4,7 +4,7 @@
Maintainer: Ubuntu Developers
XSBC-Original-Maintainer: Alexander Wirt
Standards-Version: 3.8.3
-Build-Depends: debhelper (>= 5), libpopt-dev, po-debconf, libnl-dev
+Build-Depends: debhelper (>= 5), libpopt-dev, po-debconf, libnl3-dev
Package: ipvsadm
Architecture: any
diff -u ipvsadm-1.25.clean/libipvs/libipvs.c ipvsadm-1.25.clean/libipvs/libipvs.c
--- ipvsadm-1.25.clean/libipvs/libipvs.c
+++ ipvsadm-1.25.clean/libipvs/libipvs.c
@@ -32,7 +32,7 @@
struct ip_vs_getinfo ipvs_info;
#ifdef LIBIPVS_USE_NL
-struct nl_handle *sock = NULL;
+struct nl_sock *sock = NULL;
int family, try_nl = 1;
#endif
@@ -64,7 +64,7 @@
{
int err = EINVAL;
- sock = nl_handle_alloc();
+ sock = nl_socket_alloc();
if (!sock) {
nlmsg_free(msg);
return -1;
@@ -79,7 +79,7 @@
/* To test connections and set the family */
if (msg == NULL) {
- nl_handle_destroy(sock);
+ nl_socket_free(sock);
sock = NULL;
return 0;
}
@@ -95,12 +95,12 @@
nlmsg_free(msg);
- nl_handle_destroy(sock);
+ nl_socket_free(sock);
return 0;
fail_genl:
- nl_handle_destroy(sock);
+ nl_socket_free(sock);
sock = NULL;
nlmsg_free(msg);
errno = err;
only in patch2:
unchanged:
--- ipvsadm-1.25.clean.orig/Makefile
+++ ipvsadm-1.25.clean/Makefile
@@ -79,7 +79,7 @@
OBJS = ipvsadm.o config_stream.o dynamic_array.o
LIBS = $(POPT_LIB)
ifneq (0,$(HAVE_NL))
-LIBS += -lnl
+LIBS += $(shell pkg-config --libs libnl-3.0)
endif
DEFINES = -DVERSION=\"$(VERSION)\" -DSCHEDULERS=\"$(SCHEDULERS)\" \
$(POPT_DEFINE)