From 377bb2f516ef1d84693f4943a0d4250b228c35bd Mon Sep 17 00:00:00 2001 From: Steve Traylen Date: Sun, 9 Oct 2011 00:32:05 +0200 Subject: [PATCH] Add patch torque-initd-hangs-rhbz-744138.patch --- torque-create-request.patch | 42 ++++++++++++++++++++++++++++ torque-initd-hangs-rhbz-744138.patch | 19 +++++++++++++ torque.spec | 8 +++++- 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 torque-create-request.patch create mode 100644 torque-initd-hangs-rhbz-744138.patch diff --git a/torque-create-request.patch b/torque-create-request.patch new file mode 100644 index 0000000..86a9851 --- /dev/null +++ b/torque-create-request.patch @@ -0,0 +1,42 @@ +diff -uNr torque-2.5.2.ORIG/contrib/init.d/pbs_server torque-2.5.2/contrib/init.d/pbs_server +--- torque-2.5.2.ORIG/contrib/init.d/pbs_server 2010-10-14 22:16:32.978386147 +0200 ++++ torque-2.5.2/contrib/init.d/pbs_server 2010-10-14 23:01:59.911917744 +0200 +@@ -25,11 +25,29 @@ + then + daemon $PBS_DAEMON -d $PBS_HOME + else ++ echo -n "use \"service pbs_server create\"" && failure && echo && exit 5 ++ fi ++ RET=$? ++ [ $RET -eq 0 ] && touch /var/lock/subsys/pbs_server ++ echo ++ ;; ++ create) ++ echo -n "Creating Torque Server Database:... " ++ if [ -r $PBS_HOME/server_priv/serverdb ] ++ then ++ echo -n "serverdb file allready exists?" && failure && echo && exit 5 ++ else + daemon $PBS_DAEMON -t create -d $PBS_HOME + fi + RET=$? + [ $RET -eq 0 ] && touch /var/lock/subsys/pbs_server + echo ++ sleep 3 ++ echo -n "Shutting down TORQUE Server: " ++ killproc pbs_server ++ RET=$? ++ rm -f /var/lock/subsys/pbs_server ++ echo + ;; + stop) + echo -n "Shutting down TORQUE Server: " +@@ -53,7 +71,7 @@ + echo + ;; + *) +- echo "Usage: pbs_server {start|stop|restart|status|reload}" ++ echo "Usage: pbs_server {start|stop|restart|status|reload|create}" + exit 1 + esac + exit $RET diff --git a/torque-initd-hangs-rhbz-744138.patch b/torque-initd-hangs-rhbz-744138.patch new file mode 100644 index 0000000..c0ffbd2 --- /dev/null +++ b/torque-initd-hangs-rhbz-744138.patch @@ -0,0 +1,19 @@ +diff -uNr torque-3.0.2.ORIG/contrib/init.d/pbs_server torque-3.0.2/contrib/init.d/pbs_server +--- torque-3.0.2.ORIG/contrib/init.d/pbs_server 2011-10-09 00:09:29.026651535 +0200 ++++ torque-3.0.2/contrib/init.d/pbs_server 2011-10-09 00:12:05.012653474 +0200 +@@ -14,13 +14,11 @@ + echo "Configuration already exists. Please remove $PBS_SERVERDB to create a new one." + exit 1 + fi +- + $PBS_DAEMON -d $PBS_HOME -t create & +- while [ ! -r $PBS_SERVERDB ]; do +- sleep 1 +- done ++ sleep 5 + killproc pbs_server + RET=$? ++ + } + + start() { diff --git a/torque.spec b/torque.spec index f5afe95..dd9b866 100644 --- a/torque.spec +++ b/torque.spec @@ -84,7 +84,7 @@ Summary: Tera-scale Open-source Resource and QUEue manager Name: %{name} Version: %{version} -Release: %{?snap:0.%{release}.%{snap}cvs}%{!?snap:%{release}}%{?dist}.2 +Release: %{?snap:0.%{release}.%{snap}cvs}%{!?snap:%{release}}%{?dist}.3 Source: torque-%{version}%{?snap:-snap.%snap}.tar.gz Source2: xpbs.desktop Source3: xpbsmon.desktop @@ -96,6 +96,8 @@ Source7: pbs-config-multilib # https://bugzilla.redhat.com/show_bug.cgi?id=713996 Patch0: torque-munge-size.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=744138 +Patch2: torque-initd-hangs-rhbz-744138.patch License: OpenPBS and TORQUEv1.1 Group: System Environment/Daemons @@ -128,6 +130,7 @@ This package holds just a few shared files and directories. %prep %setup -q -n torque-%{version}%{?snap:-snap.%snap} %patch0 -p1 +%patch2 -p1 %__install -pm 644 %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} . @@ -482,6 +485,9 @@ A simple PAM module to authorize users on PBS MOM nodes with a running job. %changelog +* Sun Oct 9 2011 Steve Traylen - 2.5.7-2 3 +- Add patch torque-initd-hangs-rhbz-744138.patch + * Mon Sep 19 2011 Steve Traylen - 2.5.7-2 2 - Add --with-tcp-retry-limit=2 to build, rhbz#738576.