Dominique Leuenberger 2017-11-29 09:53:13 +00:00 committed by Git OBS Bridge
commit c29efd770c
5 changed files with 143 additions and 128 deletions

View File

@ -1,8 +1,8 @@
Index: keepalived/etc/init.d/keepalived.suse.init Index: keepalived/etc/init.d/keepalived.suse.init.in
=================================================================== ===================================================================
--- keepalived/etc/init.d/keepalived.suse.init.orig --- keepalived/etc/init.d/keepalived.suse.init.in
+++ keepalived/etc/init.d/keepalived.suse.init +++ keepalived/etc/init.d/keepalived.suse.init.in
@@ -1,23 +1,24 @@ @@ -1,23 +1,23 @@
#! /bin/sh #! /bin/sh
### BEGIN INIT INFO ### BEGIN INIT INFO
@ -23,32 +23,29 @@ Index: keepalived/etc/init.d/keepalived.suse.init
-DAEMON="Keepalived daemon" -DAEMON="Keepalived daemon"
-DAEMON_BIN="/usr/local/sbin/keepalived" -DAEMON_BIN="@sbindir@/keepalived"
-DAEMON_CONF="/etc/keepalived/keepalived.conf" -DAEMON_CONF="@sysconfdir@/keepalived/keepalived.conf"
-DAEMON_PIDFILE="/var/run/keepalived.pid" -DAEMON_PIDFILE="@localstatedir@/run/keepalived.pid"
-DAEMON_OPT="-d" -DAEMON_OPT="-d"
+DAEMON='Keepalived daemon' +DAEMON='Keepalived daemon'
+DAEMON_BIN='/usr/sbin/keepalived' +DAEMON_BIN='@sbindir@/keepalived'
+DAEMON_CONF='/etc/keepalived/keepalived.conf' +DAEMON_CONF='@sysconfdir@/keepalived/keepalived.conf'
+DAEMON_SYSCONF='/etc/sysconfig/keepalived' +DAEMON_PIDFILE='@localstatedir@/run/keepalived.pid'
+DAEMON_PIDFILE='/var/run/keepalived.pid' +DAEMON_OPT='-d'
+KEEPALIVED_OPTIONS='-d'
#DAEMON_USER="root" #DAEMON_USER="root"
-SUPPORTS_HUP="yes" -SUPPORTS_HUP="yes"
+SUPPORTS_HUP='yes' +SUPPORTS_HUP='yes'
# "yes" if exist next values in freshclam.conf # PidFile @localstatedir@/run/keepalived.pid
# PidFile /var/run/keepalived.pid
# DatabaseOwner root # DatabaseOwner root
@@ -25,7 +26,19 @@ SUPPORTS_HUP="yes"
pid_par=${DAEMON_PIDFILE:+"-p $DAEMON_PIDFILE"} @@ -25,6 +25,18 @@ pid_par=${DAEMON_PIDFILE:+"-p $DAEMON_PIDFILE"}
usr_par=${DAEMON_USER:+"-u $DAEMON_USER"} usr_par=${DAEMON_USER:+"-u $DAEMON_USER"}
-test -x $DAEMON_BIN || exit 5 test -x $DAEMON_BIN || exit 5
+test -x $DAEMON_BIN || { echo "$DAEMON_BIN not installed or executable"; +test -x $DAEMON_BIN || { echo "$DAEMON_BIN not installed or executable";
+ if [ "$1" = "stop" ]; then exit 0; + if [ "$1" = "stop" ]; then exit 0;
+ else exit 5; fi; } + else exit 5; fi; }
+ +
+
+test -r $DAEMON_CONF || { echo "$DAEMON_CONF not existing or readable"; +test -r $DAEMON_CONF || { echo "$DAEMON_CONF not existing or readable";
+ if [ "$1" = "stop" ]; then exit 0; + if [ "$1" = "stop" ]; then exit 0;
+ else exit 6; fi; } + else exit 6; fi; }
@ -60,10 +57,11 @@ Index: keepalived/etc/init.d/keepalived.suse.init
# Shell functions sourced from /etc/rc.status: # Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status # rc_check check and set local and overall rc status
@@ -62,70 +75,70 @@ test -e $DAEMON_PIDFILE && ! test -s $DA @@ -60,71 +72,70 @@ rc_reset
test -e $DAEMON_PIDFILE && ! test -s $DAEMON_PIDFILE && rm $DAEMON_PIDFILE
case "$1" in case "$1" in
start) - start)
- echo -n "Starting $DAEMON " - echo -n "Starting $DAEMON "
- if test ! -f ${DAEMON_CONF}; then - if test ! -f ${DAEMON_CONF}; then
- echo -n >&2 "Configuration file, ${DAEMON_CONF} does not exist. " - echo -n >&2 "Configuration file, ${DAEMON_CONF} does not exist. "
@ -110,6 +108,25 @@ Index: keepalived/etc/init.d/keepalived.suse.init
- touch ${DAEMON_PIDFILE} || \ - touch ${DAEMON_PIDFILE} || \
- echo -n >&2 " Warning: daemon not running. " - echo -n >&2 " Warning: daemon not running. "
- killproc $pid_par -HUP ${DAEMON_BIN} - killproc $pid_par -HUP ${DAEMON_BIN}
- rc_status -v
- else
- $0 stop && sleep 3 && $0 start
- rc_status
- fi
- ;;
- status)
- echo -n "Checking for $DAEMON "
- checkproc $pid_par ${DAEMON_BIN}
- rc_status -v
- ;;
- probe)
- test ${DAEMON_CONF} -nt ${DAEMON_PIDFILE} && echo reload
- ;;
- *)
- echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
- exit 1
- ;;
+ start)
+ echo -n "Starting $DAEMON " + echo -n "Starting $DAEMON "
+ if test ! -f ${DAEMON_CONF}; then + if test ! -f ${DAEMON_CONF}; then
+ echo -n >&2 "Configuration file, ${DAEMON_CONF} does not exist. " + echo -n >&2 "Configuration file, ${DAEMON_CONF} does not exist. "
@ -156,25 +173,10 @@ Index: keepalived/etc/init.d/keepalived.suse.init
+ touch ${DAEMON_PIDFILE} || \ + touch ${DAEMON_PIDFILE} || \
+ echo -n >&2 " Warning: daemon not running. " + echo -n >&2 " Warning: daemon not running. "
+ killproc $pid_par -HUP ${DAEMON_BIN} + killproc $pid_par -HUP ${DAEMON_BIN}
rc_status -v + rc_status -v
- else
+ else + else
$0 stop && sleep 3 && $0 start + $0 stop && sleep 3 && $0 start
rc_status + rc_status
- fi
- ;;
- status)
- echo -n "Checking for $DAEMON "
- checkproc $pid_par ${DAEMON_BIN}
- rc_status -v
- ;;
- probe)
- test ${DAEMON_CONF} -nt ${DAEMON_PIDFILE} && echo reload
- ;;
- *)
- echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
- exit 1
- ;;
+ fi + fi
+ ;; + ;;
+ status) + status)
@ -191,4 +193,4 @@ Index: keepalived/etc/init.d/keepalived.suse.init
+ ;; + ;;
esac esac
rc_exit rc_exit
-

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:314a118a35899e4fa31cbfcef8b77c90d3a6003c686a29088dba1d4c51e31436
size 661521

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

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

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Mon Nov 27 11:26:58 UTC 2017 - jengelh@inai.de
- Do not suppress errors from useradd.
- Ensure neutrality of description.
-------------------------------------------------------------------
Thu Nov 27 09:11:55 UTC 2017 - igarcia@suse.com
- update to 1.3.9:
Revert using github tarball and use original source again.
Too many fixes and features to list, refer to
/usr/share/doc/packages/keepalived/ChangeLog for a detailed list.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Nov 23 13:38:30 UTC 2017 - rbrown@suse.com Thu Nov 23 13:38:30 UTC 2017 - rbrown@suse.com
@ -196,4 +210,3 @@ Tue Nov 19 14:01:47 UTC 2013 - speilicke@suse.com
Tue Nov 20 16:11:59 UTC 2012 - mrueckert@suse.de Tue Nov 20 16:11:59 UTC 2012 - mrueckert@suse.de
- initial package of 1.2.7 - initial package of 1.2.7

View File

@ -29,15 +29,13 @@
%bcond_with dbus %bcond_with dbus
Name: keepalived Name: keepalived
Version: 1.3.3 Version: 1.3.9
Release: 0 Release: 0
Summary: A strong & robust keepalive facility for linux Summary: A keepalive facility for Linux
License: GPL-2.0+ License: GPL-2.0+
Group: Productivity/Networking/Routing Group: Productivity/Networking/Routing
Url: http://www.keepalived.org/ Url: http://www.keepalived.org/
# TODO: revert to old source line with 1.3.4 update Source: http://www.keepalived.org/software/keepalived-%{version}.tar.gz
# Source: http://www.keepalived.org/software/keepalived-%{version}.tar.gz
Source: https://github.com/acassen/keepalived/files/779998/keepalived-1.3.3.tar.gz
Source1: keepalived.service Source1: keepalived.service
Source2: keepalive-rpmlintrc Source2: keepalive-rpmlintrc
Patch1: keepalive-init.patch Patch1: keepalive-init.patch
@ -78,15 +76,14 @@ Requires: systemd
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
The main goal of this project is to provide simple and robust facilities for This project provides facilities for load balancing and high-availability to Linux system and Linux-based
loadbalancing and high-availability to Linux system and Linux based infrastructures. The load-balancing framework relies on the
infrastructures. Loadbalancing framework relies on well-known and widely used
Linux Virtual Server (IPVS) kernel module providing Layer4 load balancing. Linux Virtual Server (IPVS) kernel module providing Layer4 load balancing.
Keepalived implements a set of checkers to dynamically and adaptively maintain Keepalived implements a set of checkers to dynamically and adaptively maintain
and manage loadbalanced server pool according their health. On the other hand and manage loadbalanced server pool according their health.
high-availability is achieved by VRRP protocol. VRRP is a fundamental brick for High-availability is achieved by the VRRP protocol, a fundamental brick for
router failover. In addition, Keepalived implements a set of hooks to the VRRP router failover. In addition, Keepalived implements a set of hooks to the VRRP
finite state machine providing low-level and high-speed protocol interactions. finite state machine, providing low-level and high-speed protocol interactions.
Keepalived frameworks can be used independently or all together to provide Keepalived frameworks can be used independently or all together to provide
resilient infrastructures. resilient infrastructures.
@ -117,7 +114,7 @@ export CFLAGS="%optflags -DOPENSSL_NO_SSL_INTERN"
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
make install DESTDIR="%{buildroot}" %make_install
install -dD -m 0750 %{buildroot}%{_var}/lib/%{name} install -dD -m 0750 %{buildroot}%{_var}/lib/%{name}
install -D -m 0644 %{buildroot}/etc/sysconfig/keepalived %{buildroot}%{_fillupdir}/sysconfig.%{name} install -D -m 0644 %{buildroot}/etc/sysconfig/keepalived %{buildroot}%{_fillupdir}/sysconfig.%{name}
@ -133,8 +130,10 @@ chmod -R o= %{buildroot}/etc/keepalived
rm -rv %{buildroot}/etc/keepalived/samples/ %{buildroot}/etc/sysconfig/keepalived rm -rv %{buildroot}/etc/keepalived/samples/ %{buildroot}/etc/sysconfig/keepalived
%pre %pre
/usr/sbin/groupadd -r %{name} >/dev/null 2>&1 || : getent group %{name} >/dev/null || /usr/sbin/groupadd -r %{name}
/usr/sbin/useradd -g %{name} -s /bin/false -r -c "Keepalived" -d %{_var}/lib/%{name} %{name} >/dev/null 2>&1 || : getent passwd %{name} >/dev/null || \
/usr/sbin/useradd -g %{name} -s /bin/false -r -c "Keepalived" \
-d %{_var}/lib/%{name} %{name}
%if %{with systemd} %if %{with systemd}
%service_add_pre %{name}.service %{name}.socket %service_add_pre %{name}.service %{name}.socket
%endif %endif
@ -161,6 +160,7 @@ rm -rv %{buildroot}/etc/keepalived/samples/ %{buildroot}/etc/sysconfig/keepalive
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc README COPYING ChangeLog %doc README COPYING ChangeLog
%doc %{_datadir}/doc/keepalived/
%config(noreplace) %attr(-,root,keepalived) /etc/keepalived/ %config(noreplace) %attr(-,root,keepalived) /etc/keepalived/
%{_bindir}/genhash %{_bindir}/genhash
%{_sbindir}/rckeepalived %{_sbindir}/rckeepalived