net/keepalived: update to 1.4.3
authorFlorian Eckert <fe@dev.tdt.de>
Tue, 9 Jan 2018 14:33:34 +0000 (15:33 +0100)
committerFlorian Eckert <fe@dev.tdt.de>
Tue, 8 May 2018 12:51:32 +0000 (14:51 +0200)
bump PKG_VERSION to 1.4.3

To Fix compilation issue cherry-pick two commits from keepalived master tree:
https://github.com/acassen/keepalived/commit/afc450807c5e83c5312e9f88dd6911fe3b00f42e
https://github.com/acassen/keepalived/commit/58ae2ba75fa57896bc690c57a892958eb9816cd4

This was discussed on:
https://github.com/acassen/keepalived/issues/835

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
net/keepalived/Makefile
net/keepalived/patches/0001-Fix-namespace-collision-with-musl-if_ether.h.patch [new file with mode: 0644]
net/keepalived/patches/0002-Fix-commit-afc4508-Fix-namespace-collision-with-musl.patch [new file with mode: 0644]

index f5caa1f0bc0a6c3a970179bdbf78d9d832d49fa8..decf926f5f7d59652c219190cb4aa7c750fcbad9 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=keepalived
-PKG_VERSION:=1.3.9
-PKG_RELEASE:=2
+PKG_VERSION:=1.4.3
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:= http://www.keepalived.org/software
-PKG_HASH:=d5bdd25530acf60989222fd92fbfd596e06ecc356a820f4c1015708b76a8d4f3
+PKG_SOURCE_URL:=http://www.keepalived.org/software
+PKG_HASH:=1030bd967d4e522189a90a1294189ee6b6029272dc137e6e206ea431e9825478
 
 PKG_LICENSE:=GPL-2.0+
 PKG_LICENSE_FILES:=COPYING
diff --git a/net/keepalived/patches/0001-Fix-namespace-collision-with-musl-if_ether.h.patch b/net/keepalived/patches/0001-Fix-namespace-collision-with-musl-if_ether.h.patch
new file mode 100644 (file)
index 0000000..72ae8b1
--- /dev/null
@@ -0,0 +1,137 @@
+From afc450807c5e83c5312e9f88dd6911fe3b00f42e Mon Sep 17 00:00:00 2001
+From: Quentin Armitage <quentin@armitage.org.uk>
+Date: Mon, 23 Apr 2018 16:29:05 +0100
+Subject: [PATCH] Fix namespace collision with musl if_ether.h
+
+Using musl libc headers there is a namespace collision between
+netinet/if_ether.h and linux/if_ether.h. This commit incorporates
+a workaround.
+
+Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
+---
+ configure                      | 30 ++++++++++++++++++++++++++++++
+ configure.ac                   | 19 +++++++++++++++++++
+ keepalived/include/vrrp_arp.h  |  4 ++++
+ keepalived/include/vrrp_vmac.h |  4 ++++
+ lib/config.h.in                |  4 ++++
+ 5 files changed, 61 insertions(+)
+
+diff --git a/configure b/configure
+index 0ba4b3b4..28f97e23 100755
+--- a/configure
++++ b/configure
+@@ -9165,6 +9165,36 @@ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$SAV_CPPFLAGS"
++# Including <linux/if_ether.h> and <netinet/if_ether.h> can cause a namespace collision (musl libc).
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linux/if_ether.h and netinet/if_ether.h namespace collision" >&5
++$as_echo_n "checking for linux/if_ether.h and netinet/if_ether.h namespace collision... " >&6; }
++SAV_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="$CPPFLAGS $kernelinc"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++    #include <linux/if_ether.h>
++    #include <netinet/if_ether.h>
++
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++else
++
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++
++$as_echo "#define _HAVE_NETINET_LINUX_IF_ETHER_H_COLLISION_  1 " >>confdefs.h
++
++    BUILD_OPTIONS="$BUILD_OPTIONS NETINET_LINUX_IF_ETHER_H_COLLISION"
++
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++CPPFLAGS="$SAV_CPPFLAGS"
++
+ # Linux 4.5 to 4.5.4 has <libiptc/libiptc.h> indirectly including <net/if.h>
+ # and <linux/if.h> which causes a namespace collision.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiptc/libiptc.h linux/if.h and net/if.h namespace collision" >&5
+diff --git a/configure.ac b/configure.ac
+index 01a93be3..01dad94d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -930,6 +930,25 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+   ])
+ CPPFLAGS="$SAV_CPPFLAGS"
++dnl ----[Check if have linux/if_ether.h and netinet/if_ether.h namespace collision]----
++# Including <linux/if_ether.h> and <netinet/if_ether.h> can cause a namespace collision (musl libc).
++AC_MSG_CHECKING([for linux/if_ether.h and netinet/if_ether.h namespace collision])
++SAV_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="$CPPFLAGS $kernelinc"
++AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
++    #include <linux/if_ether.h>
++    #include <netinet/if_ether.h>
++  ]])],
++  [
++    AC_MSG_RESULT([no])
++  ],
++  [
++    AC_MSG_RESULT([yes])
++    AC_DEFINE([_HAVE_NETINET_LINUX_IF_ETHER_H_COLLISION_], [ 1 ], [Define to 1 if have linux/if_ether.h followed by netinet/if_ether.h namespace collision])
++    add_build_opt([NETINET_LINUX_IF_ETHER_H_COLLISION])
++  ])
++CPPFLAGS="$SAV_CPPFLAGS"
++
+ # Linux 4.5 to 4.5.4 has <libiptc/libiptc.h> indirectly including <net/if.h>
+ # and <linux/if.h> which causes a namespace collision.
+ AC_MSG_CHECKING([for libiptc/libiptc.h linux/if.h and net/if.h namespace collision])
+diff --git a/keepalived/include/vrrp_arp.h b/keepalived/include/vrrp_arp.h
+index 07ee7765..3414d391 100644
+--- a/keepalived/include/vrrp_arp.h
++++ b/keepalived/include/vrrp_arp.h
+@@ -25,6 +25,10 @@
+ /* system includes */
+ #include <netinet/in.h>
++#ifdef _HAVE_NET_LINUX_IF_H_COLLISION_
++#define _NETINET_IF_ETHER_H
++#include <linux/if_ether.h>
++#endif
+ #include <net/ethernet.h>
+ #include <net/if_arp.h>
+ #include <linux/if_infiniband.h>
+diff --git a/keepalived/include/vrrp_vmac.h b/keepalived/include/vrrp_vmac.h
+index b6b107a4..da14b240 100644
+--- a/keepalived/include/vrrp_vmac.h
++++ b/keepalived/include/vrrp_vmac.h
+@@ -29,6 +29,10 @@
+ #include <arpa/inet.h>
+ #include <string.h>
+ #include <syslog.h>
++#ifdef _HAVE_NET_LINUX_IF_H_COLLISION_
++#define _NETINET_IF_ETHER_H
++#include <linux/if_ether.h>
++#endif
+ #include <net/ethernet.h>
+ /* local includes */
+diff --git a/lib/config.h.in b/lib/config.h.in
+index 7be4054a..21a7715a 100644
+--- a/lib/config.h.in
++++ b/lib/config.h.in
+@@ -580,6 +580,10 @@
+ /* Define to 1 if using libnl-3 */
+ #undef _HAVE_LIBNL3_
++/* Define to 1 if have linux/if_ether.h followed by netinet/if_ether.h
++   namespace collision */
++#undef _HAVE_NETINET_LINUX_IF_ETHER_H_COLLISION_
++
+ /* Define to 1 if have linux/if.h followed by net/if.h namespace collision */
+ #undef _HAVE_NET_LINUX_IF_H_COLLISION_
+-- 
+2.11.0
+
diff --git a/net/keepalived/patches/0002-Fix-commit-afc4508-Fix-namespace-collision-with-musl.patch b/net/keepalived/patches/0002-Fix-commit-afc4508-Fix-namespace-collision-with-musl.patch
new file mode 100644 (file)
index 0000000..72f412e
--- /dev/null
@@ -0,0 +1,44 @@
+From 58ae2ba75fa57896bc690c57a892958eb9816cd4 Mon Sep 17 00:00:00 2001
+From: Quentin Armitage <quentin@armitage.org.uk>
+Date: Mon, 23 Apr 2018 17:05:15 +0100
+Subject: [PATCH] Fix commit afc4508 Fix namespace collision with musl
+ if_ether.h
+
+Commit afc4508 used the wrong definitions for checking the if_ether.h
+namespace collision. This commit uses the correct definitions.
+
+Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
+---
+ keepalived/include/vrrp_arp.h  | 2 +-
+ keepalived/include/vrrp_vmac.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/keepalived/include/vrrp_arp.h b/keepalived/include/vrrp_arp.h
+index 3414d391..a206f502 100644
+--- a/keepalived/include/vrrp_arp.h
++++ b/keepalived/include/vrrp_arp.h
+@@ -25,7 +25,7 @@
+ /* system includes */
+ #include <netinet/in.h>
+-#ifdef _HAVE_NET_LINUX_IF_H_COLLISION_
++#ifdef _HAVE_NETINET_LINUX_IF_ETHER_H_COLLISION_
+ #define _NETINET_IF_ETHER_H
+ #include <linux/if_ether.h>
+ #endif
+diff --git a/keepalived/include/vrrp_vmac.h b/keepalived/include/vrrp_vmac.h
+index da14b240..6cba88fc 100644
+--- a/keepalived/include/vrrp_vmac.h
++++ b/keepalived/include/vrrp_vmac.h
+@@ -29,7 +29,7 @@
+ #include <arpa/inet.h>
+ #include <string.h>
+ #include <syslog.h>
+-#ifdef _HAVE_NET_LINUX_IF_H_COLLISION_
++#ifdef _HAVE_NETINET_LINUX_IF_ETHER_H_COLLISION_
+ #define _NETINET_IF_ETHER_H
+ #include <linux/if_ether.h>
+ #endif
+-- 
+2.11.0
+