diff --git a/torque-4.2.10-port-args.patch b/torque-4.2.10-port-args.patch new file mode 100644 index 0000000..ebf4975 --- /dev/null +++ b/torque-4.2.10-port-args.patch @@ -0,0 +1,61 @@ +--- a/contrib/init.d/pbs_mom.in 2015-03-19 20:24:58.000000000 -0700 ++++ b/contrib/init.d/pbs_mom.in 2016-02-20 18:46:26.058196405 -0800 +@@ -13,11 +13,21 @@ + SBIN_PATH=@sbindir@ + PBS_DAEMON="$SBIN_PATH/pbs_mom" + PBS_HOME=@PBS_HOME@ ++# this should be the integer port value ++PBS_PORT="" + + if [ -f /etc/sysconfig/pbs_mom ];then + . /etc/sysconfig/pbs_mom + fi + ++if [ -z "$PBS_PORT" ]; then ++ momctl_port_arg="" ++ pbs_mom_port_arg="" ++else ++ momctl_port_arg="$PBS_PORT" ++ pbs_mom_port_arg="-M $PBS_PORT" ++fi ++ + if [ -z "$previous" ];then + # being run manually, don't disturb jobs + args="$args -p" +@@ -41,7 +51,7 @@ + fi + retval=1 + while kill -0 $pid 2>/dev/null;do +- $SBIN_PATH/momctl -s ++ $SBIN_PATH/momctl -s $momctl_port_arg + retval=$? + sleep 1 + done +@@ -58,7 +68,7 @@ + [ $RET -eq 0 ] && echo -n "pbs_mom already running" && success && echo && exit 0 + + # ulimit -c unlimited # Uncomment this to preserve core files +- daemon $PBS_DAEMON $args -d $PBS_HOME ++ daemon $PBS_DAEMON $args $pbs_mom_port_arg -d $PBS_HOME + RET=$? + touch /var/lock/subsys/pbs_mom + echo +--- a/contrib/init.d/pbs_sched.in 2016-02-20 18:48:08.593799420 -0800 ++++ b/contrib/init.d/pbs_sched.in 2016-02-20 18:48:54.455727300 -0800 +@@ -11,6 +11,7 @@ + PBS_DAEMON=@sbindir@/pbs_sched + PBS_HOME=@PBS_HOME@ + export PBS_DAEMON PBS_HOME ++PBS_ARGS="" + + if [ -f /etc/sysconfig/pbs_sched ];then + . /etc/sysconfig/pbs_sched +@@ -24,7 +25,7 @@ + RET=$? + [ $RET -eq 0 ] && echo -n "pbs_sched already running" && success && echo && exit 0 + +- daemon $PBS_DAEMON -d $PBS_HOME ++ daemon $PBS_DAEMON -d $PBS_HOME $PBS_ARGS + RET=$? + [ $RET -eq 0 ] && touch /var/lock/subsys/pbs_sched + echo diff --git a/torque.spec b/torque.spec index b99990e..beb05fa 100644 --- a/torque.spec +++ b/torque.spec @@ -92,6 +92,7 @@ Source23: trqauthd.service # https://bugzilla.redhat.com/show_bug.cgi?id=713996 Patch1: torque-munge-size.patch +Patch2: torque-%{version}-port-args.patch License: OpenPBS and TORQUEv1.1 Group: System Environment/Daemons @@ -367,6 +368,7 @@ DRMAA is "Distributed Resource Management Application API" %prep %setup -q -n torque-%{version} %patch1 -p 1 +%patch2 -p 1 sed -i '/LATEX_BATCHMODE/d' src/drmaa/Doxyfile.in install -pm 644 %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} \ %{SOURCE6} %{SOURCE8} . @@ -507,7 +509,9 @@ chmod 755 `find %{buildroot}/var/lib/torque -type d` rm -rf %{buildroot} %post -for srvs in pbs:15001 pbs_mon:15002 pbs_resmom:15003 pbs_sched:15004 ; do +# fix mistake in previous release +sed -i '/pbs_mon/D' /etc/services +for srvs in pbs:15001 pbs_mom:15002 pbs_resmom:15003 pbs_sched:15004 ; do port=${srvs/*:/} srvs=${srvs/:*/} for proto in tcp udp ; do @@ -879,6 +883,7 @@ fi %changelog * Fri Feb 19 2016 David Brown - 4.2.10-9 - Resolve dependencies for rawhide (#1308192) +- Fix port and args environment variables for el5/6 (#1254301) * Fri Feb 05 2016 Fedora Release Engineering - 4.2.10-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild