From 7699c03a366ba8bf9b5c873ca8ab12a9f9dd3b6130f5702ecf3183c234e84cf6 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Tue, 21 Mar 2017 21:32:03 +0000 Subject: [PATCH] Accepting request 481647 from home:ZRen:branches:Virtualization - Update to sanlock 3.4.0 - Enable fence_sanlockd so that lvm2 can use the new lvmlocked feature in cluster environment * fix unpackaged file - /usr/sbin/rcfence_sanlockd * refresh suse-no-date-time.patch to cover the same issue in fence_sanlockd * adjust fence_sanlockd.init and suse-systemd.patch - Enable sanlk-reset subpackage - Fix "undefined symbol to io_suspend" at runtime, bsc#1030060 suse-fix-link-errors.patch OBS-URL: https://build.opensuse.org/request/show/481647 OBS-URL: https://build.opensuse.org/package/show/Virtualization/sanlock?expand=0&rev=28 --- fence_sanlockd.init | 154 ++++++++++---------- sanlock-3.2.4.tar.xz | 3 - sanlock-3.4.0.tar.xz | 3 + sanlock-SCHED_RESET_ON_FORK-undefined.patch | 2 +- sanlock.changes | 13 ++ sanlock.spec | 100 ++++++++++++- suse-fix-link-errors.patch | 65 +++++++++ suse-no-date-time.patch | 22 ++- suse-systemd.patch | 27 +++- 9 files changed, 298 insertions(+), 91 deletions(-) delete mode 100644 sanlock-3.2.4.tar.xz create mode 100644 sanlock-3.4.0.tar.xz create mode 100644 suse-fix-link-errors.patch diff --git a/fence_sanlockd.init b/fence_sanlockd.init index 75e8492..12db496 100644 --- a/fence_sanlockd.init +++ b/fence_sanlockd.init @@ -1,4 +1,10 @@ #!/bin/sh +# +# fence_sanlockd - daemon for fence_sanlock agent +# +# chkconfig: 2345 20 80 +# description: starts and stops fence_sanlockd +# ### BEGIN INIT INFO # Provides: fence_sanlockd @@ -8,68 +14,66 @@ # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: Starts and stops fence_sanlockd -# Description: Starts and stops fence_sanlockd. See fence_sanlockd(8). +# Short-Description: starts and stops fence_sanlockd +# Description: starts and stops fence_sanlockd ### END INIT INFO -PROG=fence_sanlockd -FENCE_SANLOCKD_BIN=/usr/sbin/$PROG -FENCE_SANLOCKD_RUNDIR=/var/run/$PROG -FENCE_SANLOCKD_PIDFILE=$FENCE_SANLOCKD_RUNDIR/$PROG.pid -FENCE_SANLOCKD_FIFOFILE=$FENCE_SANLOCKD_RUNDIR/$PROG.fifo + +prog="fence_sanlockd" +agent="fence_sanlock" +daemonrundir="/var/run/$prog" +agentrundir="/var/run/$agent" +runfile="$daemonrundir/$prog.pid" +fifofile="$daemonrundir/$prog.fifo" +lockfile="/var/lock/subsys/$prog" +exec="/usr/sbin/$prog" + FENCESANLOCKDOPTS="-w" -FENCE_SANLOCK_AGENT_RUNDIR=/var/run/fence_sanlock - -test -x $FENCE_SANLOCKD_BIN || { echo "$FENCE_SANLOCKD_BIN not installed"; - if [ "$1" = "stop" ]; then exit 0; +test -x $exec || { echo "$exec not installed"; + if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } +[ -f /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + . /etc/rc.status rc_reset - - -case "$1" in - start) +case "$1" in +start) # start wdmd and sanlock daemons if they aren't running service wdmd status > /dev/null 2>&1 || service wdmd start service sanlock status > /dev/null 2>&1 || service sanlock start - [ ! -d $FENCE_SANLOCKD_RUNDIR ] && \ - install -d -m 775 $FENCE_SANLOCKD_RUNDIR + if [ ! -d $daemonrundir ]; then + install -d -m 775 $daemonrundir + [ -x /sbin/restorecon ] && restorecon $daemonrundir + fi + if [ ! -d $agentrundir ]; then + install -d -m 775 $agentrundir + [ -x /sbin/restorecon ] && restorecon $agentrundir + fi - [ ! -d $FENCE_SANLOCK_AGENT_RUNDIR ] && \ - install -d -m 775 $FENCE_SANLOCK_AGENT_RUNDIR - - [ -n "$(which restorecon)" ] && \ - [ -x "$(which restorecon)" ] && \ - restorecon $FENCE_SANLOCKD_RUNDIR - - [ -n "$(which restorecon)" ] && \ - [ -x "$(which restorecon)" ] && \ - restorecon $FENCE_SANLOCK_AGENT_RUNDIR - - if [ -e $FENCE_SANLOCKD_PIDFILE ]; then - if checkproc $FENCE_SANLOCKD_BIN ; then - echo -n "$PROG is already running." + if [ -e $runfile ]; then + if checkproc $exec ; then + echo -n "$prog is already running." rc_status -v - rc_exit - else - echo "Removing stale PID file $FENCE_SANLOCKD_PIDFILE." - rm -f $FENCE_SANLOCKD_PIDFILE - fi - fi - echo -n "Starting $PROG " - startproc $FENCE_SANLOCKD_BIN $FENCESANLOCKDOPTS - rc_status -v + rc_exit + else + echo "Removing stale PID file $runfile." + rm -f $runfile + fi + fi + + echo -n "Starting $prog " + startproc $exec daemon $FENCESANLOCKDOPTS + rc_status -v ;; - stop) - echo -n "Shutting down $PROG " - agent_ps="$(ps ax -o pid,args | grep fence_sanlock | grep -v grep | grep -v fence_sanlockd)" +stop) + agent_ps="$(ps ax -o pid,args | grep $agent | grep -v grep | grep -v $prog)" [ -n "$agent_ps" ] && { agent_pid="$(echo $agent_ps | awk '{print $1}')" - echo -n "cannot stop while fence_sanlock $agent_pid is running" + echo -n "cannot stop while $agent $agent_pid is running" rc_failed 1 rc_status -v rc_exit @@ -96,11 +100,12 @@ case "$1" in rc_exit fi - PID=$(pidofproc -p $FENCE_SANLOCKD_PIDFILE $PROG) + PID=$(pidofproc -p $runfile $prog) # We have to use SIGHUP to mean stop because sanlock # uses SIGTERM to mean that the lockspace failed. - killproc -p $FENCE_SANLOCKD_PIDFILE $PROG -HUP > /dev/null 2>&1 + echo -n $"Sending stop signal $prog ($PID)" + killproc -p $runfile $prog -HUP retval=$? if [ $retval -ne 0 ]; then rc_failed 1 @@ -111,21 +116,24 @@ case "$1" in # fence_sanlockd won't see the SIGHUP if it's # still waiting for config from the fifo, so # send invalid config to the fifo to make it fail. - if [ -p $FENCE_SANLOCKD_FIFOFILE ]; then - echo "" > $FENCE_SANLOCKD_FIFOFILE + if [ -p $fifofile ]; then + echo "" > $fifofile fi + echo -n $"Waiting for $prog ($PID) to stop" timeout=10 while checkpid $PID; do sleep 1 timeout=$((timeout - 1)) if [ "$timeout" -le 0 ]; then - echo -n "failed waiting for $PROG ($PID) to stop" - rc_failed 1 - rc_status -v - rc_exit + echo -n "failed waiting for $prog ($PID) to stop" + rc_failed 1 + rc_status -v + rc_exit fi done + + rm -f $lockfile # stop wdmd and sanlock daemons if they are running service sanlock status > /dev/null 2>&1 && service sanlock stop @@ -133,28 +141,28 @@ case "$1" in rc_status -v ;; - try-restart) - $0 status >/dev/null && $0 restart - rc_status - ;; - restart) - $0 stop - $0 start - rc_status - ;; - reload) - killproc -HUP $FENCE_SANLOCKD_BIN - rc_status -v - ;; - status) - echo -n "Checking status of $PROG " - checkproc $FENCE_SANLOCKD_BIN - rc_status -v - ;; - *) - echo "Usage: $0 {start|stop|restart|try-restart|reload|status}" +try-restart) + $0 status >/dev/null && $0 restart + rc_status + ;; +restart) + $0 stop + $0 start + rc_status + ;; +reload) + killproc -HUP $exec + rc_status -v + ;; +status) + echo -n "Checking status of $prog " + checkproc $exec + rc_status -v + ;; +*) + echo "Usage: $0 {start|stop|restart|try-restart|reload|status}" rc_failed 2 rc_exit - ;; + ;; esac rc_exit diff --git a/sanlock-3.2.4.tar.xz b/sanlock-3.2.4.tar.xz deleted file mode 100644 index 623700e..0000000 --- a/sanlock-3.2.4.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7f0054904d15d824ca09e55fe2173dfe4b48bf0e4554bd250ca189103ff5ca8c -size 153112 diff --git a/sanlock-3.4.0.tar.xz b/sanlock-3.4.0.tar.xz new file mode 100644 index 0000000..3449703 --- /dev/null +++ b/sanlock-3.4.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4b18eb0af1bfc730a037f9da7dd84777c9a4ceb1a1ac2e577705124c4c9e891 +size 157016 diff --git a/sanlock-SCHED_RESET_ON_FORK-undefined.patch b/sanlock-SCHED_RESET_ON_FORK-undefined.patch index a52a4e4..fa418b6 100644 --- a/sanlock-SCHED_RESET_ON_FORK-undefined.patch +++ b/sanlock-SCHED_RESET_ON_FORK-undefined.patch @@ -2,7 +2,7 @@ Index: src/main.c =================================================================== --- src/main.c.orig +++ src/main.c -@@ -59,6 +59,10 @@ +@@ -60,6 +60,10 @@ #define SIGRUNPATH 100 /* anything that's not SIGTERM/SIGKILL */ diff --git a/sanlock.changes b/sanlock.changes index 3d23b25..459586b 100644 --- a/sanlock.changes +++ b/sanlock.changes @@ -1,3 +1,16 @@ +Wed Mar 15 08:23:44 UTC 2017 - zren@suse.com + +- Update to sanlock 3.4.0 +- Enable fence_sanlockd so that lvm2 can use the new lvmlocked + feature in cluster environment + * fix unpackaged file - /usr/sbin/rcfence_sanlockd + * refresh suse-no-date-time.patch to cover the same issue + in fence_sanlockd + * adjust fence_sanlockd.init and suse-systemd.patch +- Enable sanlk-reset subpackage +- Fix "undefined symbol to io_suspend" at runtime, bsc#1030060 + suse-fix-link-errors.patch + ------------------------------------------------------------------- Sat Mar 11 08:40:02 UTC 2017 - kukuk@suse.com diff --git a/sanlock.spec b/sanlock.spec index f48f0b7..a51be17 100644 --- a/sanlock.spec +++ b/sanlock.spec @@ -18,13 +18,19 @@ %define with_systemd 0 %define with_fence_sanlockd 0 +%define with_sanlk_reset 0 %if 0%{?suse_version} > 1140 %define with_systemd 1 %endif +%if 0%{?suse_version} > 1320 +%define with_fence_sanlockd 1 +%define with_sanlk_reset 1 +%endif + Name: sanlock -Version: 3.2.4 +Version: 3.4.0 Release: 0 Summary: A shared disk lock manager License: GPL-2.0 and GPL-2.0+ and LGPL-2.1+ @@ -62,6 +68,8 @@ Patch101: sanlock-python-prefix.patch Patch102: sanlock-old_blkid.patch Patch103: suse-systemd.patch Patch104: suse-no-date-time.patch +# bsc#1030060 +Patch105: suse-fix-link-errors.patch %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} @@ -112,6 +120,20 @@ The fence-sanlock package contains the fence agent and daemon for using sanlock and wdmd as a cluster fence agent. %endif +%if %{with_sanlk_reset} +%package -n sanlk-reset +Summary: Host reset daemon and client using sanlock +Group: System Environment/Base +Requires: libsanlock1 = %{version}-%{release} +Requires: sanlock = %{version}-%{release} + +%description -n sanlk-reset +The sanlk-reset package contains the reset daemon and client. +A cooperating host running the daemon can be reset by a host +running the client, so long as both maintain access to a +common sanlock lockspace. +%endif + %prep %setup -q %patch100 @@ -121,6 +143,7 @@ daemon for using sanlock and wdmd as a cluster fence agent. %patch103 -p1 %endif %patch104 -p1 +%patch105 -p1 %build # upstream does not require configure @@ -131,6 +154,9 @@ CFLAGS=$RPM_OPT_FLAGS make -C python %if %{with_fence_sanlockd} CFLAGS=$RPM_OPT_FLAGS make -C fence_sanlock %endif +%if %{with_sanlk_reset} +CFLAGS=$RPM_OPT_FLAGS make -C reset +%endif %install make -C src \ @@ -147,19 +173,29 @@ make -C fence_sanlock \ install LIBDIR=%{_libdir} \ DESTDIR=$RPM_BUILD_ROOT %endif +%if %{with_sanlk_reset} +make -C reset \ + install LIBDIR=%{_libdir} \ + DESTDIR=$RPM_BUILD_ROOT +%endif + install -D -m 755 src/sanlock.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sanlock/sanlock.conf install -D -m 755 %SOURCE2 $RPM_BUILD_ROOT/%{_localstatedir}/adm/fillup-templates/sysconfig.sanlock install -D -m 755 %SOURCE4 $RPM_BUILD_ROOT/%{_localstatedir}/adm/fillup-templates/sysconfig.wdmd + %if %{with_systemd} install -D -m 755 init.d/sanlock.service $RPM_BUILD_ROOT/%{_unitdir}/sanlock.service ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcsanlock install -D -m 755 init.d/wdmd.service $RPM_BUILD_ROOT/%{_unitdir}/wdmd.service ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcwdmd %if %{with_fence_sanlockd} -install -D -m 0755 init.d/fence_sanlockd $RPM_BUILD_ROOT/lib/systemd/systemd-fence_sanlockd +install -D -m 0755 %SOURCE5 $RPM_BUILD_ROOT/usr/lib/systemd/systemd-fence_sanlockd install -D -m 0644 init.d/fence_sanlockd.service $RPM_BUILD_ROOT/%{_unitdir}/fence_sanlockd.service ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcfence_sanlockd %endif +%if %{with_sanlk_reset} +install -D -m 0644 init.d/sanlk-resetd.service $RPM_BUILD_ROOT/%{_unitdir}/sanlk-resetd.service +%endif %else install -D -m 755 %SOURCE1 $RPM_BUILD_ROOT/etc/init.d/sanlock ln -s /etc/init.d/sanlock $RPM_BUILD_ROOT%{_sbindir}/rcsanlock @@ -174,17 +210,34 @@ ln -s /etc/init.d/fence_sanlockd $RPM_BUILD_ROOT%{_sbindir}/rcfence_sanlockd install -Dm 0644 src/logrotate.sanlock \ $RPM_BUILD_ROOT/etc/logrotate.d/sanlock +install -Dd -m 0755 $RPM_BUILD_ROOT/etc/wdmd.d + %pre %{_bindir}/getent group sanlock > /dev/null || %{_sbindir}/groupadd \ -g 179 sanlock %{_bindir}/getent passwd sanlock > /dev/null || %{_sbindir}/useradd \ -u 179 -c "sanlock" -s /sbin/nologin -r \ -g 179 -G disk -d /var/run/sanlock sanlock + %if %{with_systemd} %service_add_pre wdmd.service %service_add_pre sanlock.service %endif +%if %{with_fence_sanlockd} +%pre -n fence-sanlock +%if %{with_systemd} +%service_add_pre fence_sanlockd.service +%endif +%endif + +%if %{with_sanlk_reset} +%pre -n sanlk-reset +%if %{with_systemd} +%service_add_pre sanlk-resetd.service +%endif +%endif + %post %if %{with_systemd} %service_add_post wdmd.service sanlock.service @@ -192,6 +245,7 @@ install -Dm 0644 src/logrotate.sanlock \ %restart_on_update wdmd %restart_on_update sanlock %endif + %fillup_only -n wdmd %fillup_only -n sanlock @@ -208,6 +262,14 @@ install -Dm 0644 src/logrotate.sanlock \ #fi %endif +%if %{with_sanlk_reset} +%post -n sanlk-reset +%if %{with_systemd} +%service_add_post sanlk-resetd.service +%endif +%restart_on_update sanlk-resetd +%endif + %preun %if %{with_systemd} %service_del_preun wdmd.service sanlock.service @@ -217,7 +279,7 @@ install -Dm 0644 src/logrotate.sanlock \ %endif %if %{with_fence_sanlockd} -%preun-n fence-sanlock +%preun -n fence-sanlock %if %{with_systemd} %service_del_preun fence_sanlockd.service %else @@ -225,6 +287,15 @@ install -Dm 0644 src/logrotate.sanlock \ %endif %endif +%if %{with_sanlk_reset} +%preun -n sanlk-reset +%if %{with_systemd} +%service_del_preun sanlk-resetd.service +%else +%stop_on_removal sanlk-resetd +%endif +%endif + %postun %if %{with_systemd} %service_del_postun wdmd.service sanlock.service @@ -241,8 +312,16 @@ install -Dm 0644 src/logrotate.sanlock \ %endif %endif +%if %{with_sanlk_reset} +%postun -n sanlk-reset +%if %{with_systemd} +%service_del_postun sanlk-resetd.service +%endif +%endif + %files %defattr(-,root,root,-) +%dir %attr(0700, root, root) %{_sysconfdir}/wdmd.d/ %dir %attr(0700, root, root) %{_sysconfdir}/sanlock/ %config(noreplace) %{_sysconfdir}/sanlock/sanlock.conf %{_sbindir}/rcsanlock @@ -292,14 +371,27 @@ install -Dm 0644 src/logrotate.sanlock \ %defattr(-,root,root,-) %{_sbindir}/fence_sanlockd %if %{with_systemd} -/lib/systemd/systemd-fence_sanlockd +/usr/lib/systemd/systemd-fence_sanlockd %{_unitdir}/fence_sanlockd.service %else /etc/init.d/fence_sanlockd %endif %{_sbindir}/fence_sanlock %{_sbindir}/fence_sanlockd +%{_sbindir}/rcfence_sanlockd %{_mandir}/man8/fence_sanlock* %endif +%if %{with_sanlk_reset} +%files -n sanlk-reset +%defattr(-,root,root,-) +%{_sbindir}/sanlk-reset +%{_sbindir}/sanlk-resetd +%if %{with_systemd} +%{_unitdir}/sanlk-resetd.service +%endif +%{_mandir}/man8/sanlk-reset.8.gz +%{_mandir}/man8/sanlk-resetd.8.gz +%endif + %changelog diff --git a/suse-fix-link-errors.patch b/suse-fix-link-errors.patch new file mode 100644 index 0000000..fc5b8d3 --- /dev/null +++ b/suse-fix-link-errors.patch @@ -0,0 +1,65 @@ +Index: sanlock-3.4.0/fence_sanlock/Makefile +=================================================================== +--- sanlock-3.4.0.orig/fence_sanlock/Makefile ++++ sanlock-3.4.0/fence_sanlock/Makefile +@@ -35,7 +35,7 @@ CFLAGS += -DVERSION=\"$(VER)\" -I../src + CFLAGS += -fPIE -DPIE + + LDFLAGS = -Wl,-z,now -Wl,-z,relro -pie +-LDADD = -lrt -laio -lblkid -lsanlock -lwdmd ++LDADD = -lsanlock -lwdmd -lrt -laio -lblkid + + all: $(TARGET1) $(TARGET2) + +Index: sanlock-3.4.0/src/Makefile +=================================================================== +--- sanlock-3.4.0.orig/src/Makefile ++++ sanlock-3.4.0/src/Makefile +@@ -96,17 +96,16 @@ CFLAGS += -DVERSION=\"$(VER)\" + CMD_CFLAGS = $(CFLAGS) -fPIE -DPIE + + CMD_LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie +-CMD_LDADD += -lpthread -luuid -lrt -laio -lblkid -lsanlock -L../wdmd -lwdmd ++CMD_LDADD += -lsanlock -L../wdmd -lwdmd -lpthread -luuid -lrt -laio -lblkid + +-LIB_ENTIRE_LDFLAGS += -lpthread -lrt -laio -lblkid -L../wdmd -lwdmd + LIB_ENTIRE_LDFLAGS += -Wl,-z,relro -pie +- ++LIB_ENTIRE_LDADD += -L../wdmd -lwdmd -lpthread -lrt -laio -lblkid + LIB_CLIENT_LDFLAGS += -Wl,-z,relro -pie + + all: $(LIBSO_ENTIRE_TARGET) $(LIBSO_CLIENT_TARGET) $(CMD_TARGET) $(LIBPC_ENTIRE_TARGET) $(LIBPC_CLIENT_TARGET) + +-$(LIBSO_ENTIRE_TARGET): $(LIB_ENTIRE_SOURCE) +- $(CC) $(CFLAGS) $(LIB_ENTIRE_LDFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_ENTIRE_TARGET).so.$(SOMAJOR) $^ ++$(LIBSO_ENTIRE_TARGET): ++ $(CC) $(CFLAGS) $(LIB_ENTIRE_LDFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_ENTIRE_TARGET).so.$(SOMAJOR) $(LIB_ENTIRE_SOURCE) $(LIB_ENTIRE_LDADD) $^ + ln -sf $(LIBSO_ENTIRE_TARGET) $(LIB_ENTIRE_TARGET).so + ln -sf $(LIBSO_ENTIRE_TARGET) $(LIB_ENTIRE_TARGET).so.$(SOMAJOR) + +Index: sanlock-3.4.0/tests/Makefile +=================================================================== +--- sanlock-3.4.0.orig/tests/Makefile ++++ sanlock-3.4.0/tests/Makefile +@@ -34,7 +34,7 @@ CFLAGS += -D_GNU_SOURCE -g \ + -fasynchronous-unwind-tables \ + -fdiagnostics-show-option + +-LDFLAGS = -lrt -laio -lblkid -lsanlock ++LDFLAGS = -lsanlock -lrt -laio -lblkid + + all: $(TARGET1) $(TARGET2) $(TARGET3) $(TARGET4) $(TARGET5) $(TARGET6) $(TARGET7) + +Index: sanlock-3.4.0/reset/Makefile +=================================================================== +--- sanlock-3.4.0.orig/reset/Makefile ++++ sanlock-3.4.0/reset/Makefile +@@ -35,7 +35,7 @@ CFLAGS += -DVERSION=\"$(VER)\" -I../src + CFLAGS += -fPIE -DPIE + + LDFLAGS = -Wl,-z,now -Wl,-z,relro -pie +-LDADD = -lsanlock -lwdmd ++LDADD = -lsanlock -lwdmd -lrt -laio -lblkid + + all: $(TARGET1) $(TARGET2) + diff --git a/suse-no-date-time.patch b/suse-no-date-time.patch index 21515a1..bc2a322 100644 --- a/suse-no-date-time.patch +++ b/suse-no-date-time.patch @@ -1,8 +1,8 @@ -Index: sanlock-3.2.4/src/main.c +Index: sanlock-3.4.0/src/main.c =================================================================== ---- sanlock-3.2.4.orig/src/main.c -+++ sanlock-3.2.4/src/main.c -@@ -1920,8 +1920,8 @@ static int read_command_line(int argc, c +--- sanlock-3.4.0.orig/src/main.c ++++ sanlock-3.4.0/src/main.c +@@ -1903,8 +1903,8 @@ static int read_command_line(int argc, c } if (!strcmp(arg1, "--version") || !strcmp(arg1, "-V")) { @@ -13,3 +13,17 @@ Index: sanlock-3.2.4/src/main.c exit(EXIT_SUCCESS); } +Index: sanlock-3.4.0/fence_sanlock/fence_sanlockd.c +=================================================================== +--- sanlock-3.4.0.orig/fence_sanlock/fence_sanlockd.c ++++ sanlock-3.4.0/fence_sanlock/fence_sanlockd.c +@@ -565,8 +565,7 @@ int main(int argc, char *argv[]) + print_usage(); + exit(0); + case 'V': +- printf("fence_sanlockd %s (built %s %s)\n", +- VERSION, __DATE__, __TIME__); ++ printf("fence_sanlockd %s\n", VERSION); + exit(0); + case EOF: + cont = 0; diff --git a/suse-systemd.patch b/suse-systemd.patch index 18248c7..e333962 100644 --- a/suse-systemd.patch +++ b/suse-systemd.patch @@ -1,7 +1,7 @@ -Index: sanlock-3.2.4/init.d/sanlock.service +Index: sanlock-3.4.0/init.d/sanlock.service =================================================================== ---- sanlock-3.2.4.orig/init.d/sanlock.service -+++ sanlock-3.2.4/init.d/sanlock.service +--- sanlock-3.4.0.orig/init.d/sanlock.service ++++ sanlock-3.4.0/init.d/sanlock.service @@ -5,8 +5,10 @@ Wants=wdmd.service [Service] @@ -15,10 +15,10 @@ Index: sanlock-3.2.4/init.d/sanlock.service [Install] WantedBy=multi-user.target -Index: sanlock-3.2.4/init.d/wdmd.service +Index: sanlock-3.4.0/init.d/wdmd.service =================================================================== ---- sanlock-3.2.4.orig/init.d/wdmd.service -+++ sanlock-3.2.4/init.d/wdmd.service +--- sanlock-3.4.0.orig/init.d/wdmd.service ++++ sanlock-3.4.0/init.d/wdmd.service @@ -4,8 +4,10 @@ After=syslog.target [Service] @@ -32,3 +32,18 @@ Index: sanlock-3.2.4/init.d/wdmd.service [Install] WantedBy=multi-user.target +Index: sanlock-3.4.0/init.d/fence_sanlockd.service +=================================================================== +--- sanlock-3.4.0.orig/init.d/fence_sanlockd.service ++++ sanlock-3.4.0/init.d/fence_sanlockd.service +@@ -5,8 +5,8 @@ Before=corosync.service + + [Service] + Type=forking +-ExecStart=/lib/systemd/systemd-fence_sanlockd start +-ExecStop=/lib/systemd/systemd-fence_sanlockd stop ++ExecStart=/usr/lib/systemd/systemd-fence_sanlockd start ++ExecStop=/usr/lib/systemd/systemd-fence_sanlockd stop + + [Install] + WantedBy=multi-user.target