diff --git a/net/keepalived/Makefile b/net/keepalived/Makefile index f5caa1f0bc0a6c..3e9bd8b87da4a6 100644 --- a/net/keepalived/Makefile +++ b/net/keepalived/Makefile @@ -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_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 index 00000000000000..72ae8b1353cb02 --- /dev/null +++ b/net/keepalived/patches/0001-Fix-namespace-collision-with-musl-if_ether.h.patch @@ -0,0 +1,137 @@ +From afc450807c5e83c5312e9f88dd6911fe3b00f42e Mon Sep 17 00:00:00 2001 +From: Quentin Armitage +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 +--- + 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 and 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 ++ #include ++ ++_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 indirectly including + # and 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 and 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 ++ #include ++ ]])], ++ [ ++ 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 indirectly including + # and 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 ++#ifdef _HAVE_NET_LINUX_IF_H_COLLISION_ ++#define _NETINET_IF_ETHER_H ++#include ++#endif + #include + #include + #include +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 + #include + #include ++#ifdef _HAVE_NET_LINUX_IF_H_COLLISION_ ++#define _NETINET_IF_ETHER_H ++#include ++#endif + #include + + /* 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 index 00000000000000..72f412e7799097 --- /dev/null +++ b/net/keepalived/patches/0002-Fix-commit-afc4508-Fix-namespace-collision-with-musl.patch @@ -0,0 +1,44 @@ +From 58ae2ba75fa57896bc690c57a892958eb9816cd4 Mon Sep 17 00:00:00 2001 +From: Quentin Armitage +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 +--- + 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 +-#ifdef _HAVE_NET_LINUX_IF_H_COLLISION_ ++#ifdef _HAVE_NETINET_LINUX_IF_ETHER_H_COLLISION_ + #define _NETINET_IF_ETHER_H + #include + #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 + #include + #include +-#ifdef _HAVE_NET_LINUX_IF_H_COLLISION_ ++#ifdef _HAVE_NETINET_LINUX_IF_ETHER_H_COLLISION_ + #define _NETINET_IF_ETHER_H + #include + #endif +-- +2.11.0 +