From 235e401634c3f08ec38f9c8afbf0549d7ba2ec90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Fri, 29 Apr 2011 14:58:17 +0200 Subject: [PATCH 1/4] Removed NM_DBUS_VPN_SIGNAL_STATE_CHANGE, use own constant NM_DBUS_SIGNAL_STATE_CHANGED. (rhbz#696629) --- ypbind-mt-1.32-dbus.patch | 30 ++++++++++++++++++++++++++---- ypbind.spec | 7 ++++++- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/ypbind-mt-1.32-dbus.patch b/ypbind-mt-1.32-dbus.patch index 9894556..107ff7d 100644 --- a/ypbind-mt-1.32-dbus.patch +++ b/ypbind-mt-1.32-dbus.patch @@ -1,8 +1,21 @@ diff -up ypbind-mt-1.32/src/ypbind_dbus_nm.c.dbus ypbind-mt-1.32/src/ypbind_dbus_nm.c ---- ypbind-mt-1.32/src/ypbind_dbus_nm.c.dbus 2011-04-07 14:55:56.251110287 +0200 -+++ ypbind-mt-1.32/src/ypbind_dbus_nm.c 2011-04-07 16:47:17.747108590 +0200 -@@ -42,13 +42,19 @@ - #define NM_DBUS_VPN_SIGNAL_STATE_CHANGE "StateChange" +--- ypbind-mt-1.32/src/ypbind_dbus_nm.c.dbus 2010-07-07 14:27:26.000000000 +0200 ++++ ypbind-mt-1.32/src/ypbind_dbus_nm.c 2011-04-29 14:38:23.565951109 +0200 +@@ -32,6 +32,9 @@ + #include + #include + ++/* We have our own constant, NM uses directly "StateChanged" string */ ++#define NM_DBUS_SIGNAL_STATE_CHANGED "StateChanged" ++ + #ifdef HAVE_NETWORKMANAGER_NETWORKMANAGER_H + #include + #include +@@ -39,16 +42,21 @@ + #define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager" + #define NM_DBUS_SERVICE "org.freedesktop.NetworkManager" + #define NM_DBUS_PATH "/org/freedesktop/NetworkManager" +-#define NM_DBUS_VPN_SIGNAL_STATE_CHANGE "StateChange" typedef enum NMState { - NM_STATE_UNKNOWN = 0, @@ -26,3 +39,12 @@ diff -up ypbind-mt-1.32/src/ypbind_dbus_nm.c.dbus ypbind-mt-1.32/src/ypbind_dbus #endif #define DBUS_MESSAGE_MATCH \ +@@ -150,7 +158,7 @@ dbus_filter (DBusConnection *connection, + handled = DBUS_HANDLER_RESULT_HANDLED; + } + else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, +- NM_DBUS_VPN_SIGNAL_STATE_CHANGE)) ++ NM_DBUS_SIGNAL_STATE_CHANGED)) + { + NMState state = NM_STATE_UNKNOWN; + diff --git a/ypbind.spec b/ypbind.spec index abf5cf1..34fb0c5 100644 --- a/ypbind.spec +++ b/ypbind.spec @@ -1,7 +1,7 @@ Summary: The NIS daemon which binds NIS clients to an NIS domain Name: ypbind Version: 1.32 -Release: 8%{?dist} +Release: 8%{?dist}.1 License: GPLv2 Group: System Environment/Daemons Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2 @@ -88,6 +88,11 @@ fi %doc README NEWS COPYING %changelog +* Fri Apr 29 2011 Honza Horak - 3:1.32-8.fc15.1 +- Removed NM_DBUS_VPN_SIGNAL_STATE_CHANGE, use own constant + NM_DBUS_SIGNAL_STATE_CHANGED. + (rhbz#696629) + * Thu Apr 14 2011 Honza Horak - 3:1.32-8 - Added rpcbind to LSB header in SysV init file. From d9fd11fbb1ef633f82b6c7fe2682f03ff7bbac25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Tue, 15 Nov 2011 09:40:23 +0100 Subject: [PATCH 2/4] Fixed init script to handle long rpcinfo requests (rhbz#624688) --- ypbind.init | 4 ++-- ypbind.spec | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ypbind.init b/ypbind.init index c42c077..54c1a08 100755 --- a/ypbind.init +++ b/ypbind.init @@ -103,10 +103,10 @@ start() { # the following fixes problems with the init scripts continuing # even when we are really not bound yet to a server, and then things # that need NIS fail. - timeout=10 + timeout=$NISTIMEOUT firsttime=1 SECONDS=0 - while [ $SECONDS -lt $timeout ]; do + while [ $SECONDS -lt $timeout ] || [ $firsttime -eq 1 ] ; do if /usr/sbin/rpcinfo -p | LC_ALL=C fgrep -q ypbind then if [ $firsttime -eq 1 ]; then diff --git a/ypbind.spec b/ypbind.spec index 34fb0c5..c9578de 100644 --- a/ypbind.spec +++ b/ypbind.spec @@ -1,7 +1,7 @@ Summary: The NIS daemon which binds NIS clients to an NIS domain Name: ypbind Version: 1.32 -Release: 8%{?dist}.1 +Release: 8%{?dist}.2 License: GPLv2 Group: System Environment/Daemons Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2 @@ -88,6 +88,10 @@ fi %doc README NEWS COPYING %changelog +* Tue Nov 15 2011 Honza Horak - 3:1.32-8.fc15.2 +- Fixed init script to handle long rpcinfo requests + (rhbz#624688) + * Fri Apr 29 2011 Honza Horak - 3:1.32-8.fc15.1 - Removed NM_DBUS_VPN_SIGNAL_STATE_CHANGE, use own constant NM_DBUS_SIGNAL_STATE_CHANGED. From 5b79a6bc46d7572db093c6ac96a49018f9fa6ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Mon, 21 Nov 2011 08:22:54 +0100 Subject: [PATCH 3/4] handle in wait-cycle correctly --- ypbind.init | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ypbind.init b/ypbind.init index 54c1a08..19930b0 100755 --- a/ypbind.init +++ b/ypbind.init @@ -107,13 +107,9 @@ start() { firsttime=1 SECONDS=0 while [ $SECONDS -lt $timeout ] || [ $firsttime -eq 1 ] ; do + firsttime=0 if /usr/sbin/rpcinfo -p | LC_ALL=C fgrep -q ypbind then - if [ $firsttime -eq 1 ]; then - # reset timeout - timeout=$NISTIMEOUT - firsttime=0 - fi /usr/bin/ypwhich > /dev/null 2>&1 retval=$? if [ $retval -eq 0 ]; then From ae8c1d043d1cfa83ce03862ca759bd128e9396ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Mon, 21 Nov 2011 09:22:47 +0100 Subject: [PATCH 4/4] release bump --- ypbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ypbind.spec b/ypbind.spec index c9578de..7a2b97c 100644 --- a/ypbind.spec +++ b/ypbind.spec @@ -1,7 +1,7 @@ Summary: The NIS daemon which binds NIS clients to an NIS domain Name: ypbind Version: 1.32 -Release: 8%{?dist}.2 +Release: 8%{?dist}.3 License: GPLv2 Group: System Environment/Daemons Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2 @@ -88,6 +88,9 @@ fi %doc README NEWS COPYING %changelog +* Mon Nov 21 2011 Honza Horak - 3:1.32-8.fc15.3 +- fixed firsttime handling in ypbind.init wait cycle + * Tue Nov 15 2011 Honza Horak - 3:1.32-8.fc15.2 - Fixed init script to handle long rpcinfo requests (rhbz#624688)