diff --git a/.gitignore b/.gitignore index 4a4742d..4129a1e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,14 @@ /torque-2.5.2.tar.gz /torque-2.5.3.tar.gz +/torque-2.5.4.tar.gz +/torque-2.5.5.tar.gz +/torque-2.5.7.tar.gz /torque-3.0.0.tar.gz /torque-3.0.0-snap.201102011355.tar.gz /torque-3.0.1.tar.gz /torque-3.0.2.tar.gz /torque-3.0.3.tar.gz /torque-3.0.4.tar.gz +/torque-4.2.6.1.tar.gz +/torque-4.2.8.tar.gz +/torque-4.2.10.tar.gz diff --git a/sources b/sources index 6bb34ce..726c75c 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -dd822d5ba1ac938ac1c48392b55e775e torque-3.0.4.tar.gz +3dd4348f54ba236ee7c208cc6b97f674 torque-4.2.8.tar.gz +541f58ab46166e86d7a468500be3fa4d torque-4.2.10.tar.gz diff --git a/torque-2.5.7-rhbz#759141-r5167-pbs_server-crash.patch b/torque-2.5.7-rhbz#759141-r5167-pbs_server-crash.patch new file mode 100644 index 0000000..ec1374b --- /dev/null +++ b/torque-2.5.7-rhbz#759141-r5167-pbs_server-crash.patch @@ -0,0 +1,12 @@ +diff -uNr torque-2.5.7.ORIG/src/server/req_getcred.c torque-2.5.7/src/server/req_getcred.c +--- torque-2.5.7.ORIG/src/server/req_getcred.c 2011-12-03 19:05:46.670461225 +0100 ++++ torque-2.5.7/src/server/req_getcred.c 2011-12-03 19:07:50.013609563 +0100 +@@ -471,7 +471,7 @@ + if(rc) + { + /* FAILED */ +- req_reject(PBSE_SYSTEM, 0, preq, NULL, "munge failure"); ++ /* req_reject(PBSE_SYSTEM, 0, preq, NULL, "munge failure"); */ + return (PBSE_SYSTEM); + } + diff --git a/torque-buffer-overrun-2.5.5.patch b/torque-buffer-overrun-2.5.5.patch new file mode 100644 index 0000000..9098b5c --- /dev/null +++ b/torque-buffer-overrun-2.5.5.patch @@ -0,0 +1,173 @@ +diff -uNr torque-2.5.5.ORIG/src/lib/Libnet/get_hostaddr.c torque-2.5.5/src/lib/Libnet/get_hostaddr.c +--- torque-2.5.5.ORIG/src/lib/Libnet/get_hostaddr.c 2011-06-08 18:40:00.251913002 +0200 ++++ torque-2.5.5/src/lib/Libnet/get_hostaddr.c 2011-06-08 18:41:06.651911946 +0200 +@@ -147,7 +147,8 @@ + + if (hp == NULL) + { +- sprintf(log_buffer,"cannot resolve IP address for host '%s' herror=%d: %s", ++ snprintf(log_buffer, sizeof(log_buffer), ++ "cannot resolve IP address for host '%s' herror=%d: %s", + hostname, + h_errno, + hstrerror(h_errno)); +diff -uNr torque-2.5.5.ORIG/src/server/req_quejob.c torque-2.5.5/src/server/req_quejob.c +--- torque-2.5.5.ORIG/src/server/req_quejob.c 2011-06-08 18:40:00.315913002 +0200 ++++ torque-2.5.5/src/server/req_quejob.c 2011-06-08 18:49:36.449912391 +0200 +@@ -1053,17 +1053,19 @@ + { + if (errno == 0) + { +- sprintf(log_buffer, "job %s in unexpected state '%s'", +- pj->ji_qs.ji_jobid, +- PJobSubState[pj->ji_qs.ji_substate]); ++ snprintf(log_buffer, sizeof(log_buffer), ++ "job %s in unexpected state '%s'", ++ pj->ji_qs.ji_jobid, ++ PJobSubState[pj->ji_qs.ji_substate]); + } + else + { +- sprintf(log_buffer, "job %s in unexpected state '%s' (errno=%d - %s)", +- pj->ji_qs.ji_jobid, +- PJobSubState[pj->ji_qs.ji_substate], +- errno, +- strerror(errno)); ++ snprintf(log_buffer, sizeof(log_buffer), ++ "job %s in unexpected state '%s' (errno=%d - %s)", ++ pj->ji_qs.ji_jobid, ++ PJobSubState[pj->ji_qs.ji_substate], ++ errno, ++ strerror(errno)); + } + + log_err(errno, id, log_buffer); +@@ -1264,9 +1266,10 @@ + + if (LOGLEVEL >= 6) + { +- sprintf(log_buffer, "successfully moved file '%s' for job '%s'", +- namebuf, +- preq->rq_ind.rq_jobfile.rq_jobid); ++ snprintf(log_buffer, sizeof(log_buffer), ++ "successfully moved file '%s' for job '%s'", ++ namebuf, ++ preq->rq_ind.rq_jobfile.rq_jobid); + + log_record( + PBSEVENT_JOB, +@@ -1382,9 +1385,11 @@ + { + char tmpLine[1024]; + +- sprintf(tmpLine, "cannot save job - errno=%d - %s", +- errno, +- strerror(errno)); ++ snprintf(tmpLine, sizeof(tmpLine), ++ "cannot save job - errno=%d - %s", ++ errno, ++ strerror(errno)); ++ + + log_err(errno, id, tmpLine); + +@@ -1408,9 +1413,11 @@ + { + /* reply failed, purge the job and close the connection */ + +- sprintf(log_buffer, "cannot report jobid - errno=%d - %s", +- errno, +- strerror(errno)); ++ snprintf(log_buffer, sizeof(log_buffer), ++ "cannot report jobid - errno=%d - %s", ++ errno, ++ strerror(errno)); ++ + + log_err(errno, id, log_buffer); + +@@ -1700,11 +1707,12 @@ + + /* need to format message first, before request goes away */ + +- sprintf(log_buffer, msg_jobnew, +- preq->rq_user, preq->rq_host, +- pj->ji_wattr[(int)JOB_ATR_job_owner].at_val.at_str, +- pj->ji_wattr[(int)JOB_ATR_jobname].at_val.at_str, +- pj->ji_qhdr->qu_qs.qu_name); ++ snprintf(log_buffer, sizeof(log_buffer), ++ msg_jobnew, ++ preq->rq_user, preq->rq_host, ++ pj->ji_wattr[JOB_ATR_job_owner].at_val.at_str, ++ pj->ji_wattr[JOB_ATR_jobname].at_val.at_str, ++ pj->ji_qhdr->qu_qs.qu_name); + + /* acknowledge the request with the job id */ + +@@ -1739,8 +1747,10 @@ + { + if (LOGLEVEL >= 7) + { +- sprintf(log_buffer, "Trying to AUTORUN job %s", +- pj->ji_qs.ji_jobid); ++ snprintf(log_buffer, sizeof(log_buffer), ++ "Trying to AUTORUN job %s", ++ pj->ji_qs.ji_jobid); ++ + log_record( + PBSEVENT_JOB, + PBS_EVENTCLASS_JOB, +@@ -1861,7 +1871,7 @@ + + if (!user_account_read_user(arguser)) + { +- sprintf(log_buffer, "user_account_verify(%s, %s) -> USER NOT FOUND", ++ snprintf(log_buffer,sizeof(log_buffer), "user_account_verify(%s, %s) -> USER NOT FOUND", + arguser, + argaccount); + +@@ -1872,7 +1882,7 @@ + { + if (strcmp(argaccount, UserAcct.ActAdr[i]) == 0) + { +- sprintf(log_buffer, "user_account_verify(%s, %s) -> SUCCESS", ++ snprintf(log_buffer,sizeof(log_buffer), "user_account_verify(%s, %s) -> SUCCESS", + arguser, + argaccount); + +@@ -1882,7 +1892,7 @@ + } + } /* END for (i) */ + +- sprintf(log_buffer, "user_account_verify(%s, %s) -> FAILED", ++ snprintf(log_buffer, sizeof(log_buffer) "user_account_verify(%s, %s) -> FAILED", + arguser, + argaccount); + +@@ -1909,7 +1919,7 @@ + + if (!user_account_read_user(arguser)) + { +- sprintf(log_buffer, "user_account_default(%s) = USER NOT FOUND", ++ snprintf(log_buffer,sizeof(log_buffer), "user_account_default(%s) = USER NOT FOUND", + arguser); + + goto user_account_default_done; +@@ -1917,7 +1927,7 @@ + + if (UserAcct.ActCnt < 1) + { +- sprintf(log_buffer, "user_account_default(%s) = NO PROJECT FOUND", ++ snprintf(log_buffer, sizeof(log_buffer), "user_account_default(%s) = NO PROJECT FOUND", + arguser); + + goto user_account_default_done; +@@ -1925,7 +1935,7 @@ + + rc = UserAcct.ActAdr[0]; + +- sprintf(log_buffer, "user_account_default(%s) = %s", ++ snprintf(log_buffer, sizeof(log_buffer), "user_account_default(%s) = %s", + arguser, + rc); + diff --git a/torque-fix-munge-rhbz#752079-PTII.patch b/torque-fix-munge-rhbz#752079-PTII.patch new file mode 100644 index 0000000..c5b684a --- /dev/null +++ b/torque-fix-munge-rhbz#752079-PTII.patch @@ -0,0 +1,109 @@ +*** process_request.c.orig 2011-11-08 14:20:50.000000000 +0100 +--- process_request.c 2011-11-08 17:15:21.000000000 +0100 +*************** +*** 539,564 **** + + if (ENABLE_TRUSTED_AUTH == TRUE ) + rc = 0; /* bypass the authentication of the user--trust the client completely */ +! else if(munge_on) + { +! /* If munge_on is true we will validate the connection now */ +! if ( request->rq_type == PBS_BATCH_AltAuthenUser) + { +! rc = req_altauthenuser(request); +! if (rc == PBSE_NONE) + { +! conn_credent[sfds].timestamp = time_now; +! svr_conn[sfds].cn_authen = PBS_NET_CONN_AUTHENTICATED; + } + return; + } + else +! { +! rc = authenticate_user(request, &conn_credent[sfds]); +! } + } +- else if (svr_conn[sfds].cn_authen != PBS_NET_CONN_AUTHENTICATED) +- rc = PBSE_BADCRED; + else + rc = authenticate_user(request, &conn_credent[sfds]); + +--- 539,562 ---- + + if (ENABLE_TRUSTED_AUTH == TRUE ) + rc = 0; /* bypass the authentication of the user--trust the client completely */ +! else if (svr_conn[sfds].cn_authen != PBS_NET_CONN_AUTHENTICATED) + { +! if (munge_on && request->rq_type == PBS_BATCH_AltAuthenUser) + { +! /* If munge_on is true do the validation request now */ +! if (request->rq_ind.rq_authen.rq_port != svr_conn[sfds].cn_port) +! { +! req_reject(PBSE_IVALREQ, 0, request, NULL, "Unexpected request to authenticate an alternate connection"); +! } +! else + { +! req_altauthenuser(request); + } + return; + } + else +! rc = PBSE_BADCRED; + } + else + rc = authenticate_user(request, &conn_credent[sfds]); + +*************** +*** 1032,1038 **** + break; + + case PBS_BATCH_AltAuthenUser: +! + break; + + case PBS_BATCH_JobObit: +--- 1030,1036 ---- + break; + + case PBS_BATCH_AltAuthenUser: +! req_reject(PBSE_IVALREQ, 0, request, NULL, "Unexpected request to authenticate at this point"); + break; + + case PBS_BATCH_JobObit: +*** req_getcred.c.orig 2011-11-08 17:27:36.000000000 +0100 +--- req_getcred.c 2011-11-08 17:20:18.000000000 +0100 +*************** +*** 365,371 **** + /* Something went wrong. We will have to depend on the parent + to let everyone know */ + close(fd_pipe[1]); +! exit(0); + + } + +--- 365,371 ---- + /* Something went wrong. We will have to depend on the parent + to let everyone know */ + close(fd_pipe[1]); +! _exit(0); + + } + +*************** +*** 453,459 **** + + for (s = 0;s < PBS_NET_MAX_CONNECTIONS;++s) + { +! if (preq->rq_ind.rq_authen.rq_port != svr_conn[s].cn_port) + { + continue; + } +--- 453,460 ---- + + for (s = 0;s < PBS_NET_MAX_CONNECTIONS;++s) + { +! if (preq->rq_ind.rq_authen.rq_port != svr_conn[s].cn_port || +! svr_conn[preq->rq_conn].cn_addr != svr_conn[s].cn_addr) + { + continue; + } diff --git a/torque-fix-munge-rhbz#752079.patch b/torque-fix-munge-rhbz#752079.patch new file mode 100644 index 0000000..5735b7a --- /dev/null +++ b/torque-fix-munge-rhbz#752079.patch @@ -0,0 +1,94 @@ +Index: branches/2.5-fixes/src/include/batch_request.h +=================================================================== +--- branches/2.5-fixes/src/include/batch_request.h (revision 5100) ++++ branches/2.5-fixes/src/include/batch_request.h (revision 5101) +@@ -404,7 +404,7 @@ + + #ifndef PBS_MOM + extern void req_authenuser (struct batch_request *req); +-extern void req_altauthenuser (struct batch_request *req); ++extern int req_altauthenuser (struct batch_request *req); + extern void req_connect (struct batch_request *req); + extern void req_locatejob (struct batch_request *req); + extern void req_manager (struct batch_request *req); +Index: branches/2.5-fixes/src/server/req_getcred.c +=================================================================== +--- branches/2.5-fixes/src/server/req_getcred.c (revision 5100) ++++ branches/2.5-fixes/src/server/req_getcred.c (revision 5101) +@@ -436,7 +436,7 @@ + * utility + * + */ +-void req_altauthenuser( ++int req_altauthenuser( + + struct batch_request *preq) /* I */ + +@@ -462,7 +462,7 @@ + if(s >= PBS_NET_MAX_CONNECTIONS) + { + req_reject(PBSE_BADCRED, 0, preq, NULL, "cannot authenticate user"); +- return; ++ return (PBSE_BADCRED); + } + + +@@ -470,7 +470,8 @@ + if(rc) + { + /* FAILED */ +- return; ++ req_reject(PBSE_SYSTEM, 0, preq, NULL, "munge failure"); ++ return (PBSE_SYSTEM); + } + + /* SUCCESS */ +@@ -482,7 +483,7 @@ + svr_conn[s].cn_authen = PBS_NET_CONN_AUTHENTICATED; + + reply_ack(preq); +- return; ++ return (PBSE_NONE); + + } /* END req_altauthenuser() */ + +Index: branches/2.5-fixes/src/server/process_request.c +=================================================================== +--- branches/2.5-fixes/src/server/process_request.c (revision 5100) ++++ branches/2.5-fixes/src/server/process_request.c (revision 5101) +@@ -541,10 +541,21 @@ + rc = 0; /* bypass the authentication of the user--trust the client completely */ + else if(munge_on) + { +- /* If munge_on is true we will validate the connection later */ +- conn_credent[sfds].timestamp = time_now; +- svr_conn[sfds].cn_authen = PBS_NET_CONN_AUTHENTICATED; +- rc = 0; ++ /* If munge_on is true we will validate the connection now */ ++ if ( request->rq_type == PBS_BATCH_AltAuthenUser) ++ { ++ rc = req_altauthenuser(request); ++ if (rc == PBSE_NONE) ++ { ++ conn_credent[sfds].timestamp = time_now; ++ svr_conn[sfds].cn_authen = PBS_NET_CONN_AUTHENTICATED; ++ } ++ return; ++ } ++ else ++ { ++ rc = authenticate_user(request, &conn_credent[sfds]); ++ } + } + else if (svr_conn[sfds].cn_authen != PBS_NET_CONN_AUTHENTICATED) + rc = PBSE_BADCRED; +@@ -1021,9 +1032,6 @@ + break; + + case PBS_BATCH_AltAuthenUser: +- /* Use given authentication method to determine +- if user is valid */ +- req_altauthenuser(request); + + break; + diff --git a/torque-munge-size.patch b/torque-munge-size.patch index 1f0470f..a473f4d 100644 --- a/torque-munge-size.patch +++ b/torque-munge-size.patch @@ -1,12 +1,25 @@ -diff -uNr torque-3.0.1.ORIG/src/include/libpbs.h torque-3.0.1/src/include/libpbs.h ---- torque-3.0.1.ORIG/src/include/libpbs.h 2011-06-17 19:19:32.984380003 +0200 -+++ torque-3.0.1/src/include/libpbs.h 2011-06-17 19:23:19.406379620 +0200 -@@ -117,7 +117,7 @@ +From 12a8d7dde1d07aed670f0dd50b317b256daaa991 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= +Date: Sun, 12 Jan 2014 11:42:32 +0100 +Subject: [PATCH] munge size fix + +--- + src/include/libpbs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/include/libpbs.h b/src/include/libpbs.h +index 6d32c8b..06b1bec 100644 +--- a/src/include/libpbs.h ++++ b/src/include/libpbs.h +@@ -121,7 +121,7 @@ #define EOF -1 #endif -#define MUNGE_SIZE 256 /* I do not know what the proper size of this should be. My -+#define MUNGE_SIZE 1024 /* I do not know what the proper size of this should be. My ++#define MUNGE_SIZE 1024 /* I do not know what the proper size of this should be. My testing with munge shows it creates a string of 128 bytes */ - /* enums for standard job files (sync w/TJobFileType[]) */ + +-- +1.8.4.2 + diff --git a/torque-rhbz#758740-r5258-dis-close.patch b/torque-rhbz#758740-r5258-dis-close.patch new file mode 100644 index 0000000..6313088 --- /dev/null +++ b/torque-rhbz#758740-r5258-dis-close.patch @@ -0,0 +1,124 @@ ++ e - Added a new function DIS_tcp_close to the the code. This takes care of a problem ++ where TORQUE memory keeps growing because the read and write buffers associated ++ with each tcparray entry would grow to accommodate incoming and outgoing data ++ but would not shrink. + +Index: src/include/dis.h +=================================================================== +--- src/include/dis.h (revision 5257) ++++ src/include/dis.h (revision 5258) +@@ -238,13 +238,15 @@ + + /* the following routines set/control DIS over tcp */ + +-extern void DIS_tcp_reset (int fd, int rw); +-extern void DIS_tcp_setup (int fd); +-extern int DIS_tcp_wflush (int fd); +-extern void DIS_tcp_settimeout (long timeout); +-extern int DIS_tcp_istimeout (int fd); ++void DIS_tcp_reset (int fd, int rw); ++void DIS_tcp_setup (int fd); ++int DIS_tcp_wflush (int fd); ++void DIS_tcp_settimeout (long timeout); ++int DIS_tcp_istimeout (int fd); ++void DIS_tcp_close (int fd); + + ++ + extern int PConnTimeout(int); + + /* NOTE: increase THE_BUF_SIZE to 131072 for systems > 5k nodes */ +Index: src/lib/Libattr/attr_fn_arst.c +=================================================================== +--- src/lib/Libattr/attr_fn_arst.c (revision 5257) ++++ src/lib/Libattr/attr_fn_arst.c (revision 5258) +@@ -186,13 +186,14 @@ + + bksize = (ns - 1) * sizeof(char *) + sizeof(struct array_strings); + +- if ((stp = (struct array_strings *)malloc(bksize)) == NULL) ++ if (( patr->at_val.at_arst = (struct array_strings *)malloc(bksize)) == NULL) + { + /* FAILURE */ + + return(PBSE_SYSTEM); + } + ++ stp = patr->at_val.at_arst; + memset(stp, 0, bksize); + + stp->as_npointers = ns; +@@ -238,7 +239,7 @@ + + patr->at_flags |= ATR_VFLAG_SET | ATR_VFLAG_MODIFY; + +- patr->at_val.at_arst = stp; ++/* patr->at_val.at_arst = stp;*/ + + free(tmpval); + +Index: src/lib/Libifl/tcp_dis.c +=================================================================== +--- src/lib/Libifl/tcp_dis.c (revision 5257) ++++ src/lib/Libifl/tcp_dis.c (revision 5258) +@@ -790,9 +790,30 @@ + return; + } + ++void DIS_tcp_close( + ++ int fd) + ++ { ++ struct tcp_chan *tcp; + ++ tcp = tcparray[fd]; ++ if(tcp != NULL) ++ { ++ if(tcp->readbuf.tdis_thebuf != NULL) ++ free(tcp->readbuf.tdis_thebuf); ++ if(tcp->writebuf.tdis_thebuf != NULL) ++ free(tcp->writebuf.tdis_thebuf); ++ ++ free(tcp); ++ tcparray[fd] = NULL; ++ } ++ ++ return; ++ } ++ ++ ++ + /* + * DIS_tcp_setup - setup supports routines for dis, "data is strings", to + * use tcp stream I/O. Also initializes an array of pointers to +Index: src/lib/Libnet/net_server.c +=================================================================== +--- src/lib/Libnet/net_server.c (revision 5257) ++++ src/lib/Libnet/net_server.c (revision 5258) +@@ -114,6 +114,7 @@ + #include "server_limits.h" + #include "net_connect.h" + #include "log.h" ++#include "dis.h" /* DIS_tcp_close */ + + extern int LOGLEVEL; + +@@ -718,6 +719,7 @@ + int sd) /* I */ + + { ++ + if ((sd < 0) || (max_connection <= sd)) + { + return; +@@ -757,6 +759,9 @@ + + num_connections--; + ++ DIS_tcp_close(sd); ++ ++ + return; + } /* END close_conn() */ + diff --git a/torque-rhbz#758740-r5270-dis-array.patch b/torque-rhbz#758740-r5270-dis-array.patch new file mode 100644 index 0000000..b70ab5f --- /dev/null +++ b/torque-rhbz#758740-r5270-dis-array.patch @@ -0,0 +1,27 @@ +Index: src/lib/Libifl/tcp_dis.c +=================================================================== +--- src/lib/Libifl/tcp_dis.c (revision 5269) ++++ src/lib/Libifl/tcp_dis.c (revision 5270) +@@ -797,12 +797,19 @@ + { + struct tcp_chan *tcp; + ++ /* On startup tcparray may not yet be initialized. check it */ ++ if (tcparray == NULL) ++ return; ++ ++ if (fd > tcparraymax) ++ return; ++ + tcp = tcparray[fd]; +- if(tcp != NULL) ++ if (tcp != NULL) + { +- if(tcp->readbuf.tdis_thebuf != NULL) ++ if (tcp->readbuf.tdis_thebuf != NULL) + free(tcp->readbuf.tdis_thebuf); +- if(tcp->writebuf.tdis_thebuf != NULL) ++ if (tcp->writebuf.tdis_thebuf != NULL) + free(tcp->writebuf.tdis_thebuf); + + free(tcp); diff --git a/torque.spec b/torque.spec index 35e9ddc..3eee715 100644 --- a/torque.spec +++ b/torque.spec @@ -70,10 +70,10 @@ %global server_nameflags --with-default-server=%{server_name} Name: torque -Version: 3.0.4 -Release: 6%{?dist} +Version: 4.2.10 +Release: 2%{?dist} Summary: Tera-scale Open-source Resource and QUEue manager -Source0: %{name}-%{version}.tar.gz +Source0: http://www.adaptivecomputing.com/download/%{name}/%{name}-%{version}.tar.gz Source2: xpbs.desktop Source3: xpbsmon.desktop Source4: xpbs.png @@ -89,16 +89,6 @@ Source8: config # https://bugzilla.redhat.com/show_bug.cgi?id=713996 Patch1: torque-munge-size.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=744138 -Patch2: torque-initd-hangs-rhbz-744138.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1029752 -# Patch retrieved from: https://github.com/adaptivecomputing/torque/commit/64da0af7ed27284f3397081313850bba270593db -Patch3: CVE-2013-4495.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1005919 -# Patch based on: http://www.adaptivecomputing.com/torquepatch/fix_mom_priv_2.5.patch -Patch4: CVE-2013-4319.patch - License: OpenPBS and TORQUEv1.1 Group: System Environment/Daemons URL: http://www.adaptivecomputing.com/products/open-source/torque/ @@ -110,6 +100,10 @@ BuildRequires: pam-devel BuildRequires: xauth BuildRequires: readline-devel BuildRequires: ncurses-devel +BuildRequires: gperf +BuildRequires: openssl-devel +BuildRequires: libxml2-devel +BuildRequires: munge-devel %if %{use_tcl} BuildRequires: tcl-devel %endif @@ -127,10 +121,11 @@ BuildRequires: graphviz-gd %endif %if %{?fedora}%{!?fedora:0} >= 9 BuildRequires: tex(latex) -BuildRequires: tex(multirow.sty) -BuildRequires: tex(sectsty.sty) -BuildRequires: tex(tocloft.sty) -BuildRequires: tex(xtab.sty) +BuildRequires: tex-xtab +BuildRequires: tex-sectsty +BuildRequires: tex-tocloft +BuildRequires: tex-multirow +BuildRequires: tex-adjustbox %else %if %{?rhel}%{!?rhel:0} >= 6 BuildRequires: tex(latex) @@ -140,6 +135,8 @@ BuildRequires: tetex-latex %endif %endif +Requires(post): /bin/grep /etc/services + %description TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource manager providing control over batch jobs and distributed compute nodes. @@ -157,6 +154,7 @@ Requires: %{name}-libs = %{version}-%{release} Requires: munge Requires(posttrans): chkconfig Requires(preun): chkconfig +Requires: munge %description client TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource @@ -208,6 +206,7 @@ Requires: torque = %{version}-%{release} Requires: munge Obsoletes: libtorque < 2.4.8-2 Provides: libtorque = %{version}-%{release} +Requires: munge %description libs TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource @@ -251,6 +250,7 @@ Requires(preun): chkconfig Requires(preun): initscripts + %description mom TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource manager providing control over batch jobs and distributed compute nodes. @@ -353,24 +353,21 @@ DRMAA is "Distributed Resource Management Application API" %prep %setup -q -n torque-%{version} %patch1 -p 1 -%patch2 -p 1 -%patch3 -p 1 -%patch4 -p 1 +sed -i '/LATEX_BATCHMODE/d' src/drmaa/Doxyfile.in install -pm 644 %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} \ %{SOURCE6} %{SOURCE8} . # rm x bit on some documentation. chmod 644 torque.setup %build -CFLAGS="%{optflags} -Wno-overlength-strings" +CFLAGS="%{optflags} -Wno-overlength-strings -DUSE_INTERP_RESULT -DUSE_INTERP_ERRORLINE" %configure --includedir=%{_includedir}/torque \ --with-server-home=%{torquehomedir} --with-pam=/%{_lib}/security \ --with-sendmail=%{_sbindir}/sendmail --disable-static \ - --with-tcp-retry-limit=2 \ - --enable-drmaa --enable-munge-auth \ + --with-tcp-retry-limit=2 --without-debug \ + --enable-drmaa --enable-munge-auth --with-munge \ %{server_nameflags} %{guiflags} %{tclflags} %{rcpflags} - make %{?_smp_mflags} for daemon in pbs_mom pbs_sched pbs_server @@ -467,9 +464,8 @@ popd # and delete the three copies of the same documentation. %if 0%{?doxydoc} +rm -f %{buildroot}%{_defaultdocdir}/torque-drmaa/man/man3/*_src_drmaa_src_.3 mv %{buildroot}%{_defaultdocdir}/torque-drmaa/man/man3/* %{buildroot}%{_mandir}/man3/. -# Remove strange doxygen directory reference file -rm %{buildroot}%{_mandir}/man3/_* rm -rf %{buildroot}%{_defaultdocdir}/torque-drmaa/html/* rm -rf %{buildroot}%{_defaultdocdir}/torque-drmaa/latex/* # Include drmaa.pdf later from the src tree. @@ -479,25 +475,40 @@ rm %{buildroot}%{_defaultdocdir}/torque-drmaa/drmaa.pdf #Remove man page for binary that is not included. rm %{buildroot}%{_mandir}/man1/basl2c.1 +# fix permissions for some directories in /var/lib/torque +chmod 755 `find %{buildroot}/var/lib/torque -type d` + +# Merge applications into one software center item +%if %{build_gui} +mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata +cat > $RPM_BUILD_ROOT%{_datadir}/appdata/xpbsmon.appdata.xml < + + + CC0-1.0 + xpbsmon.desktop + + xpbs.desktop + + +EOF +%endif + %clean rm -rf %{buildroot} %post -if grep -q "PBS services" /etc/services;then - : PBS services already installed -else - cat<<__EOF__>>/etc/services -# Standard PBS services -pbs 15001/tcp # pbs server (pbs_server) -pbs 15001/udp # pbs server (pbs_server) -pbs_mom 15002/tcp # mom to/from server -pbs_mom 15002/udp # mom to/from server -pbs_resmom 15003/tcp # mom resource management requests -pbs_resmom 15003/udp # mom resource management requests -pbs_sched 15004/tcp # scheduler -pbs_sched 15004/udp # scheduler +for srvs in pbs:15001 pbs_mon:15002 pbs_resmom:15003 pbs_sched:15004 ; do + port=${srvs/*:/} + srvs=${srvs/:*/} + for proto in tcp udp ; do + if ! grep -q $srvs'\W\W*'$port'/'$proto /etc/services;then + cat<<__EOF__>>/etc/services +$srvs $port/$proto __EOF__ -fi + fi + done +done %posttrans client /usr/sbin/alternatives --install %{_bindir}/qsub qsub %{_bindir}/qsub-torque 10 \ @@ -563,7 +574,7 @@ fi %files %defattr(-, root, root, -) %doc README.torque torque.setup Release_Notes -%doc CHANGELOG PBS_License_2.5.txt README.Fedora contrib/PBS_License_2.3.txt +%doc CHANGELOG PBS_License.txt README.Fedora contrib/PBS_License_2.3.txt %dir %{torquehomedir} %dir %{torquehomedir}/aux %dir %{torquehomedir}/spool @@ -588,7 +599,6 @@ fi %{_bindir}/printtracking %{_bindir}/tracejob %{_sbindir}/momctl -%attr(4755, root, root) %{_sbindir}/pbs_iff %{_sbindir}/pbs_demux %if %{use_tcl} %{_bindir}/pbs_tclsh @@ -660,6 +670,7 @@ fi %{_bindir}/xpbsmon %{_libdir}/xpbs %{_libdir}/xpbsmon +%{_datadir}/appdata/*.appdata.xml %{_datadir}/applications/*.desktop %{_datadir}/pixmaps/*.png %{_mandir}/man1/xpbs.1.* @@ -673,13 +684,8 @@ fi %files devel %defattr(-, root, root, -) %{_libdir}/libtorque.so -%{_includedir}/torque/pbs_error.h -%{_includedir}/torque/pbs_error_db.h -%{_includedir}/torque/pbs_ifl.h -%{_includedir}/torque/rm.h -%{_includedir}/torque/rpp.h -%{_includedir}/torque/tm.h -%{_includedir}/torque/tm_.h +%{_includedir}/torque +%exclude %{_includedir}/torque/drmaa.h %{_bindir}/pbs-config %{_mandir}/man3/pbs_alterjob.3.* %{_mandir}/man3/pbs_connect.3.* @@ -713,8 +719,9 @@ fi %{_mandir}/man3/pbs_get_server_list.3.gz %{_mandir}/man3/pbs_gpumode.3.gz %{_mandir}/man3/pbs_gpureset.3.gz -%{_mandir}/man3/rpp.3.* %{_mandir}/man3/tm.3.* +%{_mandir}/man3/pbs_gpumode.3.gz +%{_mandir}/man3/pbs_gpureset.3.gz %files mom @@ -764,6 +771,7 @@ fi %defattr(-, root, root, -) %attr(0755, root, root) %{_sbindir}/pbs_server %attr(0755, root, root) %{_sbindir}/momctl +%attr(0755, root, root) %{_sbindir}/trqauthd %{_sbindir}/qserverd %{_initrddir}/pbs_server %dir %{_var}/log/torque/server_logs @@ -805,12 +813,56 @@ fi %endif %changelog +* Fri Apr 24 2015 David Brown - 4.2.10-2 +- Bugfix - #1154413 make manipulating services better. + +* Mon Apr 6 2015 David Brown - 4.2.10-1 +- Updated upstream version + +* Thu Apr 2 2015 David Brown - 4.2.8-3 +- Version bump to merge from previous version + +* Thu Mar 26 2015 Richard Hughes - 4.2.8-2 +- Add an AppData file for the software center + +* Tue Oct 14 2014 David Brown - 4.2.8-2 +- merged fedora latest into epel +- This breaks old configs and should be treated carefully + * Wed Oct 01 2014 Haïkel Guémar - 3.0.4-6 - Fix CVE-2013-4319 (RHBZ #1005918, #1005919) * Fri Sep 05 2014 Haïkel Guémar - 3.0.4-5 - Fix CVE-2013-4495 (RHBZ #1029752) +* Mon Sep 01 2014 Haïkel Guémar - 4.2.8-1 +- upstream 4.2.8 + +* Mon Aug 18 2014 Fedora Release Engineering - 4.2.6.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Thu Jul 17 2014 Ralf Corsépius - 4.2.6.1-5 +- Reflect upstream URL and Source0 having changed. + +* Thu Jul 17 2014 Ralf Corsépius - 4.2.6.1-4 +- Append -DUSE_INTERP_RESULT -DUSE_INTERP_ERRORLINE to CFLAGS to work-around + Tcl/Tk-8.6 incompatibilities (FTFFS RHBZ#1107455). +- Pass --without-debug to %%configure to let configure pass through + %%optflags (RHBZ#1074571). +- Fix twice listed files in *-devel. + +* Sun Jun 08 2014 Fedora Release Engineering - 4.2.6.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed May 21 2014 Jaroslav Škarvada - 4.2.6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86 + +* Sun Jan 12 2014 Haïkel Guémar - 4.2.6.1-1 +- upstream 4.2.6.1 + +* Wed Nov 13 2013 Haïkel Guémar - 4.2.6-1 +- upstream 4.2.6 + * Fri Aug 16 2013 Orion Poplawski - 3.0.4-4 - Add missing BRs for latex docs @@ -829,22 +881,54 @@ fi * Sat Jan 14 2012 Fedora Release Engineering - 3.0.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild +* Sat Dec 3 2011 Steve Traylen - 2.5.7-9 +- Add torque-2.5.7-rhbz#759141-r5167-pbs_server-crash.patch + +* Mon Nov 21 2011 Steve Traylen - 2.5.7-8 +- Add torque-rhbz#758740-r5258-dis-close.patch and + torque-rhbz#758740-r5270-dis-array.patch + +* Mon Nov 21 2011 Steve Traylen - 2.5.7-7 +- Add torque-fix-munge-rhbz#752079-PTII.patch + * Thu Nov 17 2011 Steve Traylen - 3.0.3-2 - Empty release for release mistake. * Thu Nov 17 2011 Steve Traylen - 3.0.3-1 - New upstream. +* Thu Nov 17 2011 Steve Traylen - 2.5.7-6 +- Empty release for release mistake. + +* Thu Nov 17 2011 Steve Traylen - 2.5.7-5 +- Add patch torque-fix-munge-rhbz#752079.patch + * Sun Oct 9 2011 Steve Traylen - 3.0.2-4 - Add patch torque-initd-hangs-rhbz-744138.patch +* Sun Oct 9 2011 Steve Traylen - 2.5.7-4 +- Add patch torque-initd-hangs-rhbz-744138.patch + * Mon Sep 19 2011 Steve Traylen - 3.0.2-3 - Add --with-tcp-retry-limit=2 to build, rhbz#738576. -* Wed Aug 31 2011 Steve Traylen - 3.0.2-2 +* Mon Sep 19 2011 Steve Traylen - 2.5.7-3 +- Add --with-tcp-retry-limit=2 to build, rhbz#738576. + +* Wed Aug 31 2011 Steve Traylen - 2.5.7-2 - Move checkpoint directory from torque-mom to torque package. rhbz#734878. +* Tue Aug 30 2011 Steve Traylen - 3.0.2-2 +- Move checkpoint directory from torque-mom to torque package. + rhbz#734878. + +* Tue Jul 26 2011 Steve Traylen - 2.5.7-1 +- Update to 2.5.7, drop torque-buffer-overrun-2.5.5.patch, + Add man pages for: qgpumod, qgpureset, pbs_gpumode and + pbs_gpureset. +- Add or rather force munge support, Add torque-munge-size.patch. + * Mon Jun 27 2011 Steve Traylen - 3.0.2-1 - Update to 3.0.2. - Remove torque-buffer-overrun since upstream now. @@ -852,9 +936,15 @@ fi * Sun Jun 26 2011 Steve Traylen - 3.0.1-4 - Removes nodes database file from package rhbz#716659 +* Sun Jun 26 2011 Steve Traylen - 2.5.5-3 +- Removes nodes database file from package rhbz#716659 + * Fri Jun 17 2011 Steve Traylen - 3.0.1-3 - Add torque-munge-size.patch, rhbz#713996, Alex Chernyakhovsky +* Wed Jun 8 2011 Steve Traylen - 2.5.5-2 +- Add torque-buffer-overrun.patch rhbz#711463 + * Wed Jun 8 2011 Steve Traylen - 3.0.1-2 - Add torque-buffer-overrun.patch patch, rhbz#711463 @@ -863,9 +953,22 @@ fi License file name change. - Renable doxygen documentation for drmaa. +* Tue Mar 8 2011 Steve Traylen - 2.5.5-1 +- New upstream 2.5.5 + Drop torque-create-request.patch since fixed upstream. +- Torque License change, + PBS_License.txt now contrib/PBS_License2.3.txt + New additional license file PBS_License_2.5.txt + License field changed from OpenPBS to "OpenPBS and TORQUEv1.1" + * Wed Feb 09 2011 Fedora Release Engineering - 3.0.0_snap.201102011355-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild +* Sun Jan 9 2011 Steve Traylen - 2.5.4-1 +- New upstream 2.5.4 + Drop patches: torque-cond-touch.patch rhbz#528060 and + torque-start-start.patch rhbz#643194 since both upstream. + * Fri Dec 10 2010 Steve Traylen - 3.0.0-snap.201102011355-1 - Update to 3.0.0-snap.201102011355-1. - Drop torque-create-request.patch since upstream. @@ -938,7 +1041,7 @@ fi * Wed Feb 25 2009 Fedora Release Engineering - 2.1.10-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild -* Thu Apr 17 2008 Garrick Staples 2.1.10-6 +* Wed Apr 16 2008 Garrick Staples 2.1.10-6 - add alternatives system * Thu Feb 14 2008 Garrick Staples 2.1.10-5