Accepting request 578944 from network

- add linux-4.15.patch

- update to 1.4.1:
    * Improve and fix use of getopt_long().
      We musn't use a long option val of 1, since getopt_long() can return
      that value.
      getopt_long() also returns longindex == 0 when there is no matching
      long option, and there needs to be careful checking if there is an
      error to work out whether a long or short option was used, which is
      needed for meaningful error messages.
    * Write assert() messages to syslog.
      assert()s are nasty things, but at least let's get the benefit of
      them, and write the messages to syslog, rather than losing them down
      stderr.
    * Enable sorry server at startup if quorum down due to alpha mode
      If alpha mode is configured on sufficient checkers so that a
      virtual server doesn't have a quorum, we need to add the sorry
      server at startup, otherwise it won't be added until a quorum has
      been achieved and subsequently lost again. In the case where some
      of the checkers remain in the down state at startup, this would have
      meant that the sorry server never got added.
    * For virtual servers, ensure quorum <= number of real servers
      If the quorum were gigher than the number of real servers, the
      quorum for the real server to come up could never be achieved, so
      if the quorum is greater than the number of real servers, reduce it
      to the number of real servers.
    * Fix some SNMP keepalived checker integer types and default values.
      Some virtual server and real server values were being sent to SNMP
      with a signed type whereas the value is unsigned, so set the type
      field correctly.

OBS-URL: https://build.opensuse.org/request/show/578944
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/keepalived?expand=0&rev=21
This commit is contained in:
Dominique Leuenberger 2018-02-22 14:03:34 +00:00 committed by Git OBS Bridge
commit da8d503683
5 changed files with 129 additions and 6 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:463b26c134101c57c05a65ac2853a757b922878876b2a9539118de1697c98a01
size 731936

3
keepalived-1.4.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:220407517ccad822d1ffa80f7bc37582abaf97da6f7bda2326fa6904b1855bd0
size 735190

View File

@ -1,3 +1,69 @@
-------------------------------------------------------------------
Thu Feb 22 10:07:17 UTC 2018 - dmueller@suse.com
- add linux-4.15.patch
-------------------------------------------------------------------
Wed Feb 21 14:52:29 UTC 2018 - dmueller@suse.com
- update to 1.4.1:
* Improve and fix use of getopt_long().
We musn't use a long option val of 1, since getopt_long() can return
that value.
getopt_long() also returns longindex == 0 when there is no matching
long option, and there needs to be careful checking if there is an
error to work out whether a long or short option was used, which is
needed for meaningful error messages.
* Write assert() messages to syslog.
assert()s are nasty things, but at least let's get the benefit of
them, and write the messages to syslog, rather than losing them down
stderr.
* Enable sorry server at startup if quorum down due to alpha mode
If alpha mode is configured on sufficient checkers so that a
virtual server doesn't have a quorum, we need to add the sorry
server at startup, otherwise it won't be added until a quorum has
been achieved and subsequently lost again. In the case where some
of the checkers remain in the down state at startup, this would have
meant that the sorry server never got added.
* For virtual servers, ensure quorum <= number of real servers
If the quorum were gigher than the number of real servers, the
quorum for the real server to come up could never be achieved, so
if the quorum is greater than the number of real servers, reduce it
to the number of real servers.
* Fix some SNMP keepalived checker integer types and default values.
Some virtual server and real server values were being sent to SNMP
with a signed type whereas the value is unsigned, so set the type
field correctly.
Some virtual server and real server values that apply to checkers
are set to nonsense default values in order to determine if a
value has been specified. Handle these values when reporting them
to SNMP replying with 0 rather than a nonsense value.
* Fix some MALLOC/FREE issues with notify FIFOs.
* Add instance_name/config_id to alert emails' subjects if configured.
If multiple instances of keepalived are running, either different
instance_names and/or config_ids, it is useful to know which
keepalived instance the email relates to.
* Ensure that email body string isn't unterminated.
Using strncpy() needs to ensure that there is a nul termination byte,
so this commits adds always writing a nul byte to the end of the buffer.
* Remove duplicate fault notification.
* Fix problem with scripts found via PATH with a '/' in parameters.
Recent discussions on issue #101 led to discovering that if an
executable without a fully qualified name was specified as a script
and there was a '/' character in the parameters, then the path
resolution would not work.
* Send SNMP traps when go from backup to fault due to sync group.
Commit 020a9ab added executing notify_fault for vrrp instances
transitioning from backup to fault state due to another instance
in the sync group going to fault state. This commit adds sending
SNMP traps in the same circumstance.
* Revert "Add instance_name/config_id to alert emails' subjects if
configured". This should be handled by setting router_id
* Add config option to send smtp-alerts to file rather than send emails
This is useful for debugging purposes.
* Add additional entry to Travis-CI build matrix.
* Fix segfault if no sorry server configured for a virtual server.
-------------------------------------------------------------------
Mon Jan 22 13:03:55 UTC 2018 - mrueckert@suse.de

View File

@ -30,15 +30,17 @@
%bcond_with json
Name: keepalived
Version: 1.4.0
Version: 1.4.1
Release: 0
Summary: A keepalive facility for Linux
License: GPL-2.0+
Group: Productivity/Networking/Routing
Url: http://www.keepalived.org/
Source: %{name}-%{version}.tar.gz
Source: http://www.keepalived.org/software/%{name}-%{version}.tar.gz
Source2: keepalive-rpmlintrc
Patch1: keepalive-init.patch
# PATCH-FIX-UPSTREAM: https://github.com/acassen/keepalived/commit/947248af144bcab6376ccddab8dc40f313b14281.patch
Patch2: linux-4.15.patch
BuildRequires: libnfnetlink-devel
%if %{with json}
BuildRequires: libjson-c-devel
@ -94,6 +96,7 @@ resilient infrastructures.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
chmod 644 doc/samples/*
%build
@ -185,7 +188,7 @@ getent passwd %{name} >/dev/null || \
%files
%defattr(-,root,root)
%doc AUTHOR ChangeLog CONTRIBUTORS COPYING README
%doc AUTHOR ChangeLog CONTRIBUTORS COPYING README
%doc %{_datadir}/doc/keepalived/
%doc doc/samples/
%doc doc/keepalived.conf.SYNOPSIS doc/NOTE_vrrp_vmac.txt

54
linux-4.15.patch Normal file
View File

@ -0,0 +1,54 @@
From 947248af144bcab6376ccddab8dc40f313b14281 Mon Sep 17 00:00:00 2001
From: Baruch Siach <baruch@tkos.co.il>
Date: Fri, 9 Feb 2018 11:55:19 +0200
Subject: [PATCH] Fix build with Linux kernel headers v4.15
Linux kernel version 4.15 changed the libc/kernel headers suppression
logic in a way that introduces collisions:
In file included from ./../include/vrrp_ipaddress.h:32:0,
from ./../include/vrrp_arp.h:31,
from vrrp.c:29:
/home/peko/autobuild/instance-1/output/host/arc-buildroot-linux-uclibc/sysroot/usr/include/linux/in.h:29:3: error: redeclaration of enumerator 'IPPROTO_IP'
IPPROTO_IP = 0, /* Dummy protocol for TCP */
^
/home/peko/autobuild/instance-1/output/host/arc-buildroot-linux-uclibc/sysroot/usr/include/netinet/in.h:33:5: note: previous definition of 'IPPROTO_IP' was here
IPPROTO_IP = 0, /* Dummy protocol for TCP. */
^~~~~~~~~~
Include the libc netinet/in.h header first to suppress the kernel
header.
In addition, add _GNU_SOURCE to vrrp.c for the libc provided in6_pktinfo
definition.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
keepalived/include/vrrp_arp.h | 1 +
keepalived/vrrp/vrrp.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/keepalived/include/vrrp_arp.h b/keepalived/include/vrrp_arp.h
index c2b4e6b5..9dd68f63 100644
--- a/keepalived/include/vrrp_arp.h
+++ b/keepalived/include/vrrp_arp.h
@@ -24,6 +24,7 @@
#define _VRRP_ARP_H
/* system includes */
+#include <netinet/in.h>
#include <net/ethernet.h>
#include <net/if_arp.h>
diff --git a/keepalived/vrrp/vrrp.c b/keepalived/vrrp/vrrp.c
index 56395363..eaa9c567 100644
--- a/keepalived/vrrp/vrrp.c
+++ b/keepalived/vrrp/vrrp.c
@@ -26,6 +26,7 @@
#include "config.h"
/* local include */
+#define _GNU_SOURCE
#include "vrrp_arp.h"
#include "vrrp_ndisc.h"
#include "vrrp_scheduler.h"