Compare commits
No commits in common. "c8" and "c10s" have entirely different histories.
18
.gitignore
vendored
18
.gitignore
vendored
@ -1,3 +1,15 @@
|
|||||||
SOURCES/torque-4.2.10.tar.gz
|
/torque-2.5.2.tar.gz
|
||||||
SOURCES/xpbs.png
|
/torque-2.5.3.tar.gz
|
||||||
SOURCES/xpbsmon.png
|
/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
|
||||||
|
/torque-6.1.3.tar.xz
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
02819f2d0ed764ebe73ef4094027598326011f3c SOURCES/torque-4.2.10.tar.gz
|
|
||||||
b8c9209803cf2513620aa1c645135d798092ea08 SOURCES/xpbs.png
|
|
||||||
1cfd43ed4bd9be416764e016d6cea202c3021f35 SOURCES/xpbsmon.png
|
|
26
CVE-2013-4319.patch
Normal file
26
CVE-2013-4319.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
diff --git a/src/server/process_request.c b/src/server/process_request.c
|
||||||
|
index 4817ed0..6b4c955 100644
|
||||||
|
--- a/src/server/process_request.c
|
||||||
|
+++ b/src/server/process_request.c
|
||||||
|
@@ -679,6 +679,21 @@ void process_request(
|
||||||
|
log_buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (svr_conn[sfds].cn_authen != PBS_NET_CONN_FROM_PRIVIL)
|
||||||
|
+ {
|
||||||
|
+ sprintf(log_buffer, "request type %s from host %s rejected (connection not privileged)",
|
||||||
|
+ reqtype_to_txt(request->rq_type),
|
||||||
|
+ request->rq_host);
|
||||||
|
+
|
||||||
|
+ log_record(PBSEVENT_JOB, PBS_EVENTCLASS_JOB, id, log_buffer);
|
||||||
|
+
|
||||||
|
+ req_reject(PBSE_BADHOST, 0, request, NULL, "request not authorized");
|
||||||
|
+
|
||||||
|
+ close_client(sfds);
|
||||||
|
+
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/* if (!tfind(svr_conn[sfds].cn_addr, &okclients)) */
|
||||||
|
if (!AVL_is_in_tree(svr_conn[sfds].cn_addr, 0, okclients))
|
||||||
|
{
|
411
CVE-2013-4495.patch
Normal file
411
CVE-2013-4495.patch
Normal file
@ -0,0 +1,411 @@
|
|||||||
|
From 64da0af7ed27284f3397081313850bba270593db Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Beer <dbeer@adaptivecomputing.com>
|
||||||
|
Date: Mon, 11 Nov 2013 11:55:08 -0700
|
||||||
|
Subject: [PATCH] Fix CVE 2013-4495. Note: this patch has been verified as
|
||||||
|
fixing this security hole but has not received other regression testing.
|
||||||
|
|
||||||
|
---
|
||||||
|
src/server/svr_mail.c | 297 ++++++++++++++++++++++++++++++--------------------
|
||||||
|
1 file changed, 178 insertions(+), 119 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/server/svr_mail.c b/src/server/svr_mail.c
|
||||||
|
index 26b6dd7..a776399 100644
|
||||||
|
--- a/src/server/svr_mail.c
|
||||||
|
+++ b/src/server/svr_mail.c
|
||||||
|
@@ -91,6 +91,7 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
#include "list_link.h"
|
||||||
|
#include "attribute.h"
|
||||||
|
#include "server_limits.h"
|
||||||
|
@@ -98,7 +99,7 @@
|
||||||
|
#include "log.h"
|
||||||
|
#include "server.h"
|
||||||
|
#include "rpp.h"
|
||||||
|
-
|
||||||
|
+#include "utils.h"
|
||||||
|
|
||||||
|
/* External Functions Called */
|
||||||
|
|
||||||
|
@@ -111,21 +112,100 @@ extern struct server server;
|
||||||
|
|
||||||
|
extern int LOGLEVEL;
|
||||||
|
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * write_email()
|
||||||
|
+ *
|
||||||
|
+ * In emailing, the mail body is written to a pipe connected to
|
||||||
|
+ * standard input for sendmail. This function supplies the body
|
||||||
|
+ * of the message.
|
||||||
|
+ *
|
||||||
|
+ */
|
||||||
|
+void write_email(
|
||||||
|
+
|
||||||
|
+ FILE *outmail_input,
|
||||||
|
+ job *pjob,
|
||||||
|
+ char *mailto,
|
||||||
|
+ int mailpoint,
|
||||||
|
+ char *text)
|
||||||
|
+
|
||||||
|
+ {
|
||||||
|
+ char *bodyfmt = NULL;
|
||||||
|
+ char bodyfmtbuf[MAXLINE];
|
||||||
|
+ char *subjectfmt = NULL;
|
||||||
|
+
|
||||||
|
+ /* Pipe in mail headers: To: and Subject: */
|
||||||
|
+ fprintf(outmail_input, "To: %s\n", mailto);
|
||||||
|
+
|
||||||
|
+ /* mail subject line formating statement */
|
||||||
|
+ if ((server.sv_attr[SRV_ATR_MailSubjectFmt].at_flags & ATR_VFLAG_SET) &&
|
||||||
|
+ (server.sv_attr[SRV_ATR_MailSubjectFmt].at_val.at_str != NULL))
|
||||||
|
+ {
|
||||||
|
+ subjectfmt = server.sv_attr[SRV_ATR_MailSubjectFmt].at_val.at_str;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ subjectfmt = "PBS JOB %i";
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ fprintf(outmail_input, "Subject: ");
|
||||||
|
+ svr_format_job(outmail_input, pjob, subjectfmt, mailpoint, text);
|
||||||
|
+ fprintf(outmail_input, "\n");
|
||||||
|
+
|
||||||
|
+ /* Set "Precedence: bulk" to avoid vacation messages, etc */
|
||||||
|
+ fprintf(outmail_input, "Precedence: bulk\n\n");
|
||||||
|
+
|
||||||
|
+ /* mail body formating statement */
|
||||||
|
+ if ((server.sv_attr[SRV_ATR_MailBodyFmt].at_flags & ATR_VFLAG_SET) &&
|
||||||
|
+ (server.sv_attr[SRV_ATR_MailBodyFmt].at_val.at_str != NULL))
|
||||||
|
+ {
|
||||||
|
+ bodyfmt = server.sv_attr[SRV_ATR_MailBodyFmt].at_val.at_str;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ bodyfmt = strcpy(bodyfmtbuf, "PBS Job Id: %i\n"
|
||||||
|
+ "Job Name: %j\n");
|
||||||
|
+ if (pjob->ji_wattr[JOB_ATR_exec_host].at_flags & ATR_VFLAG_SET)
|
||||||
|
+ {
|
||||||
|
+ strcat(bodyfmt, "Exec host: %h\n");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ strcat(bodyfmt, "%m\n");
|
||||||
|
+
|
||||||
|
+ if (text != NULL)
|
||||||
|
+ {
|
||||||
|
+ strcat(bodyfmt, "%d\n");
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Now pipe in the email body */
|
||||||
|
+ svr_format_job(outmail_input, pjob, bodyfmt, mailpoint, text);
|
||||||
|
+ } /* write_email() */
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
void svr_mailowner(
|
||||||
|
|
||||||
|
job *pjob, /* I */
|
||||||
|
- int mailpoint, /* note, single character */
|
||||||
|
+ int mailpoint, /* note, single character */
|
||||||
|
int force, /* if set to MAIL_FORCE, force mail delivery */
|
||||||
|
char *text) /* (optional) additional message text */
|
||||||
|
|
||||||
|
{
|
||||||
|
- char *cmdbuf;
|
||||||
|
- int i;
|
||||||
|
- char *mailfrom;
|
||||||
|
- char mailto[1024];
|
||||||
|
- char *bodyfmt, *subjectfmt;
|
||||||
|
- char bodyfmtbuf[1024];
|
||||||
|
- FILE *outmail;
|
||||||
|
+ int status = 0;
|
||||||
|
+ int numargs = 0;
|
||||||
|
+ int pipes[2];
|
||||||
|
+ int counter;
|
||||||
|
+ pid_t pid;
|
||||||
|
+ char *mailptr;
|
||||||
|
+ char *mailfrom = NULL;
|
||||||
|
+ char tmpBuf[LOG_BUF_SIZE];
|
||||||
|
+ // We call sendmail with cmd_name + 2 arguments + # of mailto addresses + 1 for null
|
||||||
|
+ char *sendmail_args[100];
|
||||||
|
+ char mailto[1024];
|
||||||
|
+ FILE *stream;
|
||||||
|
|
||||||
|
struct array_strings *pas;
|
||||||
|
|
||||||
|
@@ -217,17 +297,12 @@ void svr_mailowner(
|
||||||
|
return; /* its all up to the child now */
|
||||||
|
}
|
||||||
|
|
||||||
|
- /*
|
||||||
|
- * From here on, we are a child process of the server.
|
||||||
|
- * Fix up file descriptors and signal handlers.
|
||||||
|
- */
|
||||||
|
-
|
||||||
|
- rpp_terminate();
|
||||||
|
-
|
||||||
|
- net_close(-1);
|
||||||
|
-
|
||||||
|
+ /* Close the rest of the open file descriptors */
|
||||||
|
+ int numfds = sysconf(_SC_OPEN_MAX);
|
||||||
|
+ while (--numfds > 0)
|
||||||
|
+ close(numfds);
|
||||||
|
+
|
||||||
|
/* Who is mail from, if SRV_ATR_mailfrom not set use default */
|
||||||
|
-
|
||||||
|
if ((mailfrom = server.sv_attr[SRV_ATR_mailfrom].at_val.at_str) == NULL)
|
||||||
|
{
|
||||||
|
if (LOGLEVEL >= 5)
|
||||||
|
@@ -244,19 +319,18 @@ void svr_mailowner(
|
||||||
|
}
|
||||||
|
mailfrom = PBS_DEFAULT_MAIL;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+
|
||||||
|
/* Who does the mail go to? If mail-list, them; else owner */
|
||||||
|
-
|
||||||
|
*mailto = '\0';
|
||||||
|
|
||||||
|
if (pjob->ji_wattr[JOB_ATR_mailuser].at_flags & ATR_VFLAG_SET)
|
||||||
|
{
|
||||||
|
/* has mail user list, send to them rather than owner */
|
||||||
|
-
|
||||||
|
pas = pjob->ji_wattr[JOB_ATR_mailuser].at_val.at_arst;
|
||||||
|
|
||||||
|
if (pas != NULL)
|
||||||
|
{
|
||||||
|
+ int i;
|
||||||
|
for (i = 0;i < pas->as_usedptr;i++)
|
||||||
|
{
|
||||||
|
if ((strlen(mailto) + strlen(pas->as_string[i]) + 2) < sizeof(mailto))
|
||||||
|
@@ -270,7 +344,6 @@ void svr_mailowner(
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* no mail user list, just send to owner */
|
||||||
|
-
|
||||||
|
if ((server.sv_attr[SRV_ATR_MailDomain].at_flags & ATR_VFLAG_SET) &&
|
||||||
|
(server.sv_attr[SRV_ATR_MailDomain].at_val.at_str != NULL))
|
||||||
|
{
|
||||||
|
@@ -316,135 +389,121 @@ void svr_mailowner(
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* mail subject line formating statement */
|
||||||
|
-
|
||||||
|
- if ((server.sv_attr[SRV_ATR_MailSubjectFmt].at_flags & ATR_VFLAG_SET) &&
|
||||||
|
- (server.sv_attr[SRV_ATR_MailSubjectFmt].at_val.at_str != NULL))
|
||||||
|
- {
|
||||||
|
- subjectfmt = server.sv_attr[SRV_ATR_MailSubjectFmt].at_val.at_str;
|
||||||
|
- }
|
||||||
|
- else
|
||||||
|
- {
|
||||||
|
- subjectfmt = "PBS JOB %i";
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- /* mail body formating statement */
|
||||||
|
+ sendmail_args[numargs++] = (char *)SENDMAIL_CMD;
|
||||||
|
+ sendmail_args[numargs++] = (char *)"-f";
|
||||||
|
+ sendmail_args[numargs++] = (char *)mailfrom;
|
||||||
|
|
||||||
|
- if ((server.sv_attr[SRV_ATR_MailBodyFmt].at_flags & ATR_VFLAG_SET) &&
|
||||||
|
- (server.sv_attr[SRV_ATR_MailBodyFmt].at_val.at_str != NULL))
|
||||||
|
- {
|
||||||
|
- bodyfmt = server.sv_attr[SRV_ATR_MailBodyFmt].at_val.at_str;
|
||||||
|
- }
|
||||||
|
- else
|
||||||
|
+ /* Add the e-mail addresses to the command line */
|
||||||
|
+ mailptr = strdup(mailto);
|
||||||
|
+ sendmail_args[numargs++] = mailptr;
|
||||||
|
+ for (counter=0; counter < (int)strlen(mailptr); counter++)
|
||||||
|
{
|
||||||
|
- bodyfmt = strcpy(bodyfmtbuf, "PBS Job Id: %i\n"
|
||||||
|
- "Job Name: %j\n");
|
||||||
|
- if (pjob->ji_wattr[JOB_ATR_exec_host].at_flags & ATR_VFLAG_SET)
|
||||||
|
- {
|
||||||
|
- strcat(bodyfmt, "Exec host: %h\n");
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- strcat(bodyfmt, "%m\n");
|
||||||
|
-
|
||||||
|
- if (text != NULL)
|
||||||
|
+ if (mailptr[counter] == ',')
|
||||||
|
{
|
||||||
|
- strcat(bodyfmt, "%d\n");
|
||||||
|
+ mailptr[counter] = '\0';
|
||||||
|
+ sendmail_args[numargs++] = mailptr + counter + 1;
|
||||||
|
+ if (numargs >= 99)
|
||||||
|
+ break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- /* setup sendmail command line with -f from_whom */
|
||||||
|
-
|
||||||
|
- i = strlen(SENDMAIL_CMD) + strlen(mailfrom) + strlen(mailto) + 6;
|
||||||
|
|
||||||
|
- if ((cmdbuf = malloc(i)) == NULL)
|
||||||
|
+ sendmail_args[numargs] = NULL;
|
||||||
|
+
|
||||||
|
+ /* Create a pipe to talk to the sendmail process we are about to fork */
|
||||||
|
+ if (pipe(pipes) == -1)
|
||||||
|
{
|
||||||
|
- char tmpBuf[LOG_BUF_SIZE];
|
||||||
|
-
|
||||||
|
- snprintf(tmpBuf,sizeof(tmpBuf),
|
||||||
|
- "Unable to popen() command '%s' for writing: '%s' (error %d)\n",
|
||||||
|
- cmdbuf,
|
||||||
|
- strerror(errno),
|
||||||
|
- errno);
|
||||||
|
+ snprintf(tmpBuf, sizeof(tmpBuf), "Unable to pipes for sending e-mail\n");
|
||||||
|
log_event(PBSEVENT_ERROR | PBSEVENT_ADMIN | PBSEVENT_JOB,
|
||||||
|
PBS_EVENTCLASS_JOB,
|
||||||
|
pjob->ji_qs.ji_jobid,
|
||||||
|
tmpBuf);
|
||||||
|
|
||||||
|
- exit(1);
|
||||||
|
+ free(mailptr);
|
||||||
|
+ exit(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
- sprintf(cmdbuf, "%s -f %s %s",
|
||||||
|
-
|
||||||
|
- SENDMAIL_CMD,
|
||||||
|
- mailfrom,
|
||||||
|
- mailto);
|
||||||
|
-
|
||||||
|
- outmail = (FILE *)popen(cmdbuf, "w");
|
||||||
|
-
|
||||||
|
- if (outmail == NULL)
|
||||||
|
+ if ((pid=fork()) == -1)
|
||||||
|
{
|
||||||
|
- char tmpBuf[LOG_BUF_SIZE];
|
||||||
|
-
|
||||||
|
- snprintf(tmpBuf,sizeof(tmpBuf),
|
||||||
|
- "Unable to popen() command '%s' for writing: '%s' (error %d)\n",
|
||||||
|
- cmdbuf,
|
||||||
|
- strerror(errno),
|
||||||
|
- errno);
|
||||||
|
+ snprintf(tmpBuf, sizeof(tmpBuf), "Unable to fork for sending e-mail\n");
|
||||||
|
log_event(PBSEVENT_ERROR | PBSEVENT_ADMIN | PBSEVENT_JOB,
|
||||||
|
PBS_EVENTCLASS_JOB,
|
||||||
|
pjob->ji_qs.ji_jobid,
|
||||||
|
tmpBuf);
|
||||||
|
|
||||||
|
+ free(mailptr);
|
||||||
|
+ close(pipes[0]);
|
||||||
|
+ close(pipes[1]);
|
||||||
|
+ exit(-1);
|
||||||
|
+ }
|
||||||
|
+ else if (pid == 0)
|
||||||
|
+ {
|
||||||
|
+ /* CHILD */
|
||||||
|
+
|
||||||
|
+ /* Make stdin the read end of the pipe */
|
||||||
|
+ dup2(pipes[0], 0);
|
||||||
|
+
|
||||||
|
+ /* Close the rest of the open file descriptors */
|
||||||
|
+ int numfds = sysconf(_SC_OPEN_MAX);
|
||||||
|
+ while (--numfds > 0)
|
||||||
|
+ close(numfds);
|
||||||
|
+
|
||||||
|
+ execv(SENDMAIL_CMD, sendmail_args);
|
||||||
|
+ /* This never returns, but if the execv fails the child should exit */
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ /* This is the parent */
|
||||||
|
|
||||||
|
- /* Pipe in mail headers: To: and Subject: */
|
||||||
|
+ /* Close the read end of the pipe */
|
||||||
|
+ close(pipes[0]);
|
||||||
|
|
||||||
|
- fprintf(outmail, "To: %s\n",
|
||||||
|
- mailto);
|
||||||
|
+ /* Write the body to the pipe */
|
||||||
|
+ stream = fdopen(pipes[1], "w");
|
||||||
|
+ write_email(stream, pjob, mailto, mailpoint, text);
|
||||||
|
|
||||||
|
- fprintf(outmail, "Subject: ");
|
||||||
|
- svr_format_job(outmail, pjob, subjectfmt, mailpoint, text);
|
||||||
|
- fprintf(outmail, "\n");
|
||||||
|
+ fflush(stream);
|
||||||
|
|
||||||
|
- /* Set "Precedence: bulk" to avoid vacation messages, etc */
|
||||||
|
+ /* Close and wait for the command to finish */
|
||||||
|
+ if (fclose(stream) != 0)
|
||||||
|
+ {
|
||||||
|
+ snprintf(tmpBuf,sizeof(tmpBuf),
|
||||||
|
+ "Piping mail body to sendmail closed: errno %d:%s\n",
|
||||||
|
+ errno, strerror(errno));
|
||||||
|
|
||||||
|
- fprintf(outmail, "Precedence: bulk\n\n");
|
||||||
|
+ log_event(PBSEVENT_ERROR | PBSEVENT_ADMIN | PBSEVENT_JOB,
|
||||||
|
+ PBS_EVENTCLASS_JOB,
|
||||||
|
+ pjob->ji_qs.ji_jobid,
|
||||||
|
+ tmpBuf);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- /* Now pipe in the email body */
|
||||||
|
- svr_format_job(outmail, pjob, bodyfmt, mailpoint, text);
|
||||||
|
+ // we aren't going to block in order to find out whether or not sendmail worked
|
||||||
|
+ if ((waitpid(pid, &status, WNOHANG) != 0) &&
|
||||||
|
+ (status != 0))
|
||||||
|
+ {
|
||||||
|
+ snprintf(tmpBuf,sizeof(tmpBuf),
|
||||||
|
+ "Sendmail command returned %d. Mail may not have been sent\n",
|
||||||
|
+ status);
|
||||||
|
|
||||||
|
- errno = 0;
|
||||||
|
- if ((i = pclose(outmail)) != 0)
|
||||||
|
- {
|
||||||
|
- char tmpBuf[LOG_BUF_SIZE];
|
||||||
|
+ log_event(PBSEVENT_ERROR | PBSEVENT_ADMIN | PBSEVENT_JOB,
|
||||||
|
+ PBS_EVENTCLASS_JOB,
|
||||||
|
+ pjob->ji_qs.ji_jobid,
|
||||||
|
+ tmpBuf);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- snprintf(tmpBuf,sizeof(tmpBuf),
|
||||||
|
- "Email '%c' to %s failed: Child process '%s' %s %d (errno %d:%s)\n",
|
||||||
|
- mailpoint,
|
||||||
|
- mailto,
|
||||||
|
- cmdbuf,
|
||||||
|
- ((WIFEXITED(i)) ? ("returned") : ((WIFSIGNALED(i)) ? ("killed by signal") : ("croaked"))),
|
||||||
|
- ((WIFEXITED(i)) ? (WEXITSTATUS(i)) : ((WIFSIGNALED(i)) ? (WTERMSIG(i)) : (i))),
|
||||||
|
- errno,
|
||||||
|
- strerror(errno));
|
||||||
|
- log_event(PBSEVENT_ERROR | PBSEVENT_ADMIN | PBSEVENT_JOB,
|
||||||
|
- PBS_EVENTCLASS_JOB,
|
||||||
|
- pjob->ji_qs.ji_jobid,
|
||||||
|
- tmpBuf);
|
||||||
|
- }
|
||||||
|
- else if (LOGLEVEL >= 4)
|
||||||
|
- {
|
||||||
|
- log_event(PBSEVENT_ERROR | PBSEVENT_ADMIN | PBSEVENT_JOB,
|
||||||
|
- PBS_EVENTCLASS_JOB,
|
||||||
|
- pjob->ji_qs.ji_jobid,
|
||||||
|
- "Email sent successfully\n");
|
||||||
|
+ // don't leave zombies
|
||||||
|
+ while (waitpid(-1, &status, WNOHANG) != 0)
|
||||||
|
+ {
|
||||||
|
+ // zombie reaped, NO-OP
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ free(mailptr);
|
||||||
|
+ exit(0);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ /* NOT REACHED */
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
-
|
||||||
|
- /*NOTREACHED*/
|
||||||
|
-
|
||||||
|
- return;
|
||||||
|
} /* END svr_mailowner() */
|
||||||
|
|
||||||
|
/* END svr_mail.c */
|
103
pbs-config-multilib
Normal file
103
pbs-config-multilib
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
package="pbs"
|
||||||
|
version="2.3.8"
|
||||||
|
|
||||||
|
prefix="/usr"
|
||||||
|
exec_prefix="/usr"
|
||||||
|
bindir="/usr/bin"
|
||||||
|
sbindir="/usr/sbin"
|
||||||
|
libexecdir="/usr/libexec"
|
||||||
|
datadir="/usr/share"
|
||||||
|
sysconfdir="/etc"
|
||||||
|
sharedstatedir="/usr/com"
|
||||||
|
localstatedir="/var"
|
||||||
|
infodir="/usr/share/info"
|
||||||
|
mandir="/usr/share/man"
|
||||||
|
includedir="/usr/include/torque"
|
||||||
|
libs="-ltorque"
|
||||||
|
|
||||||
|
if test "$#" -eq 0; then
|
||||||
|
cat <<EOF
|
||||||
|
Usage: $package-config OPTIONS
|
||||||
|
Options:
|
||||||
|
--prefix=DIR) : \$prefix
|
||||||
|
--package) : \$package
|
||||||
|
--version) : \$version
|
||||||
|
--cflags) : -I\$includedir
|
||||||
|
--libs) : \$libs
|
||||||
|
--help) print all the options (not just these)
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
o=""
|
||||||
|
h=""
|
||||||
|
for i in "$@"; do
|
||||||
|
case $i in
|
||||||
|
--prefix=*) prefix=`echo $i | sed -e "s/--prefix=//"` ;;
|
||||||
|
--prefix) o="$o $prefix" ;;
|
||||||
|
--package) o="$o $package" ;;
|
||||||
|
--version) o="$o $version" ;;
|
||||||
|
--cflags) if test "_$includedir" != "_/usr/include"
|
||||||
|
then o="$o -I$includedir" ; fi
|
||||||
|
;;
|
||||||
|
--libs) o="$o $libs" ;;
|
||||||
|
--exec_prefix|--eprefix) o="$o $exec_prefix" ;;
|
||||||
|
--bindir) o="$o $bindir" ;;
|
||||||
|
--sbindir) o="$o $sbindir" ;;
|
||||||
|
--libexecdir) o="$o $libexecdir" ;;
|
||||||
|
--datadir) o="$o $datadir" ;;
|
||||||
|
--datainc) o="$o -I$datadir" ;;
|
||||||
|
--datalib) o="$o -L$datadir" ;;
|
||||||
|
--sysconfdir) o="$o $sysconfdir" ;;
|
||||||
|
--sharedstatedir) o="$o $sharedstatedir" ;;
|
||||||
|
--localstatedir) o="$o $localstatedir" ;;
|
||||||
|
--infodir) o="$o $infodir" ;;
|
||||||
|
--mandir) o="$o $mandir" ;;
|
||||||
|
--includedir) o="$o $includedir" ;;
|
||||||
|
--data) o="$o -I$datadir/$package" ;;
|
||||||
|
--pkgdatadir) o="$o $datadir/$package" ;;
|
||||||
|
--pkgdatainc) o="$o -I$datadir/$package" ;;
|
||||||
|
--pkgdatalib) o="$o -L$datadir/$package" ;;
|
||||||
|
--pkglibinc) o="$o -I$libinc/$package" ;;
|
||||||
|
--pkglibadd) o="$o -L$libadd/$package" ;;
|
||||||
|
--pkgincludedir) o="$o $includedir/$package" ;;
|
||||||
|
--help) h="1" ;;
|
||||||
|
-?//*|-?/*//*|-?./*//*|//*|/*//*|./*//*)
|
||||||
|
v=`echo $i | sed -e s://:\$:g`
|
||||||
|
v=`eval "echo $v"`
|
||||||
|
o="$o $v" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
o=`eval "echo $o"`
|
||||||
|
o=`eval "echo $o"`
|
||||||
|
eval "echo $o"
|
||||||
|
|
||||||
|
if test ! -z "$h" ; then
|
||||||
|
cat <<EOF
|
||||||
|
--prefix=xxx) (what is that for anyway?)
|
||||||
|
--prefix) \$prefix $prefix
|
||||||
|
--package) \$package $package
|
||||||
|
--version) \$version $version
|
||||||
|
--cflags) -I\$includedir unless it is /usr/include
|
||||||
|
--libs) -l\$PACKAGE \$LIBS
|
||||||
|
--exec_prefix) or...
|
||||||
|
--eprefix) \$exec_prefix $exec_prefix
|
||||||
|
--bindir) \$bindir $bindir
|
||||||
|
--sbindir) \$sbindir $sbindir
|
||||||
|
--libexecdir) \$libexecdir $libexecdir
|
||||||
|
--datadir) \$datadir $datadir
|
||||||
|
--sysconfdir) \$sysconfdir $sysconfdir
|
||||||
|
--sharedstatedir) \$sharedstatedir$sharedstatedir
|
||||||
|
--localstatedir) \$localstatedir $localstatedir
|
||||||
|
--infodir) \$infodir $infodir
|
||||||
|
--mandir) \$mandir $mandir
|
||||||
|
--data) -I\$datadir/\$package
|
||||||
|
--pkgdatadir) \$datadir/\$package
|
||||||
|
--pkgincludedir) \$includedir/\$package
|
||||||
|
--help) generated by ac_create_generic_config.m4
|
||||||
|
-I//varname and other inc-targets like --pkgdatainc supported
|
||||||
|
-L//varname and other lib-targets, e.g. --pkgdatalib or --libadd
|
||||||
|
EOF
|
||||||
|
fi
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
|||||||
|
SHA512 (torque-6.1.3.tar.xz) = 9cace317a6331c8a043a11115161cd9a852623ce0ccbc6d745fcc16963a8fe63ed8e4c2d0922a9bd950a2aa6273246340ea32488c88d2e9e476067c3429f1b85
|
12
torque-2.5.7-rhbz#759141-r5167-pbs_server-crash.patch
Normal file
12
torque-2.5.7-rhbz#759141-r5167-pbs_server-crash.patch
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
|
593
torque-6.1.3-autoconf-fixes.patch
Normal file
593
torque-6.1.3-autoconf-fixes.patch
Normal file
@ -0,0 +1,593 @@
|
|||||||
|
diff -up torque/acinclude.m4.cleanup torque/acinclude.m4
|
||||||
|
--- torque/acinclude.m4.cleanup 2021-01-28 16:14:17.000000000 -0500
|
||||||
|
+++ torque/acinclude.m4 2021-04-13 14:14:09.320271814 -0400
|
||||||
|
@@ -20,12 +20,14 @@ dnl
|
||||||
|
AC_DEFUN([AC_DECL_H_ERRNO],
|
||||||
|
[AC_CACHE_CHECK([for h_errno declaration in netdb.h],
|
||||||
|
ac_cv_decl_h_errno,
|
||||||
|
-[AC_TRY_COMPILE([#include <sys/types.h>
|
||||||
|
+[AC_COMPILE_IFELSE({AC_LANG_SOURCE([[
|
||||||
|
+#include <sys/types.h>
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
#include <netdb.h>
|
||||||
|
-], [int _ZzQ = (int)(h_errno + 1);],
|
||||||
|
+int _ZzQ = (int)(h_errno + 1);
|
||||||
|
+]]),
|
||||||
|
ac_cv_decl_h_errno=yes, ac_cv_decl_h_errno=no)])
|
||||||
|
if test $ac_cv_decl_h_errno = yes; then
|
||||||
|
AC_DEFINE(H_ERRNO_DECLARED, 1,
|
||||||
|
@@ -183,7 +185,7 @@ AC_CHECK_MEMBER(struct stat64.st_mode,
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>])
|
||||||
|
|
||||||
|
-AC_MSG_CHECKING([if largefile compiles (looking at you, OSX)])
|
||||||
|
+AC_MSG_CHECKING([if largefile compiles])
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
diff -up torque/buildutils/ac_c_bigendian_cross.m4.cleanup torque/buildutils/ac_c_bigendian_cross.m4
|
||||||
|
--- torque/buildutils/ac_c_bigendian_cross.m4.cleanup 2021-01-28 16:14:17.000000000 -0500
|
||||||
|
+++ torque/buildutils/ac_c_bigendian_cross.m4 2021-04-13 14:14:09.320271814 -0400
|
||||||
|
@@ -19,18 +19,18 @@ AC_DEFUN([AC_C_BIGENDIAN_CROSS],
|
||||||
|
[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
|
||||||
|
[ac_cv_c_bigendian=unknown
|
||||||
|
# See if sys/param.h defines the BYTE_ORDER macro.
|
||||||
|
-AC_TRY_COMPILE([#include <sys/types.h>
|
||||||
|
-#include <sys/param.h>], [
|
||||||
|
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||||
|
+#include <sys/param.h>]], [[
|
||||||
|
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
|
||||||
|
bogus endian macros
|
||||||
|
-#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
|
||||||
|
+#endif]])],[# It does; now see whether it defined to BIG_ENDIAN or not.
|
||||||
|
AC_TRY_COMPILE([#include <sys/types.h>
|
||||||
|
#include <sys/param.h>], [
|
||||||
|
#if BYTE_ORDER != BIG_ENDIAN
|
||||||
|
not big endian
|
||||||
|
-#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
|
||||||
|
+#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)],[])
|
||||||
|
if test $ac_cv_c_bigendian = unknown; then
|
||||||
|
-AC_TRY_RUN([main () {
|
||||||
|
+AC_RUN_IFELSE([AC_LANG_SOURCE([[main () {
|
||||||
|
/* Are we little or big endian? From Harbison&Steele. */
|
||||||
|
union
|
||||||
|
{
|
||||||
|
@@ -39,8 +39,7 @@ AC_TRY_RUN([main () {
|
||||||
|
} u;
|
||||||
|
u.l = 1;
|
||||||
|
exit (u.c[sizeof (long) - 1] == 1);
|
||||||
|
-}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes,
|
||||||
|
-[ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ])
|
||||||
|
+}]])],[ac_cv_c_bigendian=no],[ac_cv_c_bigendian=yes],[ echo $ac_n "cross-compiling... " 2>&AS_MESSAGE_FD ])
|
||||||
|
fi])
|
||||||
|
if test $ac_cv_c_bigendian = unknown; then
|
||||||
|
AC_MSG_CHECKING(to probe for byte ordering)
|
||||||
|
@@ -57,18 +56,18 @@ EOF
|
||||||
|
] if test -f conftest.c ; then
|
||||||
|
if ${CC-cc} -c conftest.c -o conftest.o && test -f conftest.o ; then
|
||||||
|
if test `grep -l BIGenDianSyS conftest.o` ; then
|
||||||
|
- echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG
|
||||||
|
+ echo $ac_n ' big endian probe OK, ' 1>&AS_MESSAGE_FD
|
||||||
|
ac_cv_c_bigendian=yes
|
||||||
|
fi
|
||||||
|
if test `grep -l LiTTleEnDian conftest.o` ; then
|
||||||
|
- echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG
|
||||||
|
+ echo $ac_n ' little endian probe OK, ' 1>&AS_MESSAGE_FD
|
||||||
|
if test $ac_cv_c_bigendian = yes ; then
|
||||||
|
ac_cv_c_bigendian=unknown;
|
||||||
|
else
|
||||||
|
ac_cv_c_bigendian=no
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
- echo $ac_n 'guessing bigendian ... ' >&AC_FD_MSG
|
||||||
|
+ echo $ac_n 'guessing bigendian ... ' >&AS_MESSAGE_FD
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT($ac_cv_c_bigendian)
|
||||||
|
diff -up torque/buildutils/acx_pthread.m4.cleanup torque/buildutils/acx_pthread.m4
|
||||||
|
--- torque/buildutils/acx_pthread.m4.cleanup 2021-01-28 16:14:17.000000000 -0500
|
||||||
|
+++ torque/buildutils/acx_pthread.m4 2021-04-13 14:14:09.320271814 -0400
|
||||||
|
@@ -56,7 +56,7 @@ dnl @license GPLWithACException
|
||||||
|
AC_DEFUN([ACX_PTHREAD], [
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||||
|
AC_LANG_SAVE
|
||||||
|
-AC_LANG_C
|
||||||
|
+AC_LANG([C])
|
||||||
|
acx_pthread_ok=no
|
||||||
|
|
||||||
|
# We used to check for pthread.h first, but this fails if pthread.h
|
||||||
|
diff -up torque/buildutils/ax_cflags_gcc_option.m4.cleanup torque/buildutils/ax_cflags_gcc_option.m4
|
||||||
|
--- torque/buildutils/ax_cflags_gcc_option.m4.cleanup 2021-01-28 16:14:17.000000000 -0500
|
||||||
|
+++ torque/buildutils/ax_cflags_gcc_option.m4 2021-04-13 14:14:09.320271814 -0400
|
||||||
|
@@ -87,15 +87,14 @@ AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_o
|
||||||
|
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
|
||||||
|
VAR,[VAR="no, unknown"
|
||||||
|
AC_LANG_SAVE
|
||||||
|
- AC_LANG_C
|
||||||
|
+ AC_LANG([C])
|
||||||
|
ac_save_[]FLAGS="$[]FLAGS"
|
||||||
|
for ac_arg dnl
|
||||||
|
in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC
|
||||||
|
"-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC
|
||||||
|
#
|
||||||
|
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||||
|
- AC_TRY_COMPILE([],[return 0;],
|
||||||
|
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break],[])
|
||||||
|
done
|
||||||
|
FLAGS="$ac_save_[]FLAGS"
|
||||||
|
AC_LANG_RESTORE
|
||||||
|
@@ -123,15 +122,14 @@ AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_gcc
|
||||||
|
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
|
||||||
|
VAR,[VAR="no, unknown"
|
||||||
|
AC_LANG_SAVE
|
||||||
|
- AC_LANG_CPLUSPLUS
|
||||||
|
+ AC_LANG([C++])
|
||||||
|
ac_save_[]FLAGS="$[]FLAGS"
|
||||||
|
for ac_arg dnl
|
||||||
|
in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC
|
||||||
|
"-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC
|
||||||
|
#
|
||||||
|
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||||
|
- AC_TRY_COMPILE([],[return 0;],
|
||||||
|
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break],[])
|
||||||
|
done
|
||||||
|
FLAGS="$ac_save_[]FLAGS"
|
||||||
|
AC_LANG_RESTORE
|
||||||
|
@@ -158,15 +156,14 @@ AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_o
|
||||||
|
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
|
||||||
|
VAR,[VAR="no, unknown"
|
||||||
|
AC_LANG_SAVE
|
||||||
|
- AC_LANG_C
|
||||||
|
+ AC_LANG([C])
|
||||||
|
ac_save_[]FLAGS="$[]FLAGS"
|
||||||
|
for ac_arg dnl
|
||||||
|
in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC
|
||||||
|
"-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC
|
||||||
|
#
|
||||||
|
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||||
|
- AC_TRY_COMPILE([],[return 0;],
|
||||||
|
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break],[])
|
||||||
|
done
|
||||||
|
FLAGS="$ac_save_[]FLAGS"
|
||||||
|
AC_LANG_RESTORE
|
||||||
|
@@ -194,15 +191,14 @@ AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_gcc
|
||||||
|
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
|
||||||
|
VAR,[VAR="no, unknown"
|
||||||
|
AC_LANG_SAVE
|
||||||
|
- AC_LANG_CPLUSPLUS
|
||||||
|
+ AC_LANG([C++])
|
||||||
|
ac_save_[]FLAGS="$[]FLAGS"
|
||||||
|
for ac_arg dnl
|
||||||
|
in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC
|
||||||
|
"-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC
|
||||||
|
#
|
||||||
|
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||||
|
- AC_TRY_COMPILE([],[return 0;],
|
||||||
|
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break],[])
|
||||||
|
done
|
||||||
|
FLAGS="$ac_save_[]FLAGS"
|
||||||
|
AC_LANG_RESTORE
|
||||||
|
diff -up torque/buildutils/tac_tcltk.m4.cleanup torque/buildutils/tac_tcltk.m4
|
||||||
|
--- torque/buildutils/tac_tcltk.m4.cleanup 2021-01-28 16:14:17.000000000 -0500
|
||||||
|
+++ torque/buildutils/tac_tcltk.m4 2021-04-13 14:14:09.320271814 -0400
|
||||||
|
@@ -215,7 +215,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
|
AC_ARG_WITH(tclatrsep,
|
||||||
|
- AC_HELP_STRING([--with-tclatrsep=CHAR],[set the Tcl attribute separator character
|
||||||
|
+ AS_HELP_STRING([--with-tclatrsep=CHAR],[set the Tcl attribute separator character
|
||||||
|
this will default to "." if unspecified]),
|
||||||
|
[tcl_atrsep="${withval}"], [tcl_atrsep="."])
|
||||||
|
if test "$TCL" = "1" ; then
|
||||||
|
diff -up torque/buildutils/tcl.m4.cleanup torque/buildutils/tcl.m4
|
||||||
|
--- torque/buildutils/tcl.m4.cleanup 2021-01-28 16:14:17.000000000 -0500
|
||||||
|
+++ torque/buildutils/tcl.m4 2021-04-13 14:14:09.320271814 -0400
|
||||||
|
@@ -44,7 +44,7 @@ AC_DEFUN([TEA_PATH_TCLCONFIG], [
|
||||||
|
if test x"${no_tcl}" = x ; then
|
||||||
|
# we reset no_tcl in case something fails here
|
||||||
|
no_tcl=true
|
||||||
|
- AC_ARG_WITH(tcl, AC_HELP_STRING([--with-tcl],[directory containing tcl configuration (tclConfig.sh)]), with_tclconfig=${withval})
|
||||||
|
+ AC_ARG_WITH(tcl, AS_HELP_STRING([--with-tcl],[directory containing tcl configuration (tclConfig.sh)]), with_tclconfig=${withval})
|
||||||
|
AC_MSG_CHECKING([for Tcl configuration])
|
||||||
|
AC_CACHE_VAL(ac_cv_c_tclconfig,[
|
||||||
|
|
||||||
|
@@ -141,7 +141,7 @@ AC_DEFUN([TEA_PATH_TKCONFIG], [
|
||||||
|
if test x"${no_tk}" = x ; then
|
||||||
|
# we reset no_tk in case something fails here
|
||||||
|
no_tk=true
|
||||||
|
- AC_ARG_WITH(tk, AC_HELP_STRING([--with-tk],[directory containing tk configuration (tkConfig.sh)]), with_tkconfig=${withval})
|
||||||
|
+ AC_ARG_WITH(tk, AS_HELP_STRING([--with-tk],[directory containing tk configuration (tkConfig.sh)]), with_tkconfig=${withval})
|
||||||
|
AC_MSG_CHECKING([for Tk configuration])
|
||||||
|
AC_CACHE_VAL(ac_cv_c_tkconfig,[
|
||||||
|
|
||||||
|
@@ -440,7 +440,7 @@ AC_DEFUN([TEA_ENABLE_THREADS], [
|
||||||
|
# Check a little harder for __pthread_mutex_init in the
|
||||||
|
# same library, as some systems hide it there until
|
||||||
|
# pthread.h is defined. We could alternatively do an
|
||||||
|
- # AC_TRY_COMPILE with pthread.h, but that will work with
|
||||||
|
+ # AC_COMPILE_IFELSE with pthread.h, but that will work with
|
||||||
|
# libpthread really doesn't exist, like AIX 4.2.
|
||||||
|
# [Bug: 4359]
|
||||||
|
AC_CHECK_LIB(pthread, __pthread_mutex_init,
|
||||||
|
@@ -621,8 +621,10 @@ AC_DEFUN([TEA_ENABLE_LANGINFO], [
|
||||||
|
fi
|
||||||
|
AC_MSG_CHECKING([whether to use nl_langinfo])
|
||||||
|
if test "$langinfo_ok" = "yes"; then
|
||||||
|
- AC_TRY_COMPILE([#include <langinfo.h>],
|
||||||
|
- [nl_langinfo(CODESET);],[langinfo_ok=yes],[langinfo_ok=no])
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
+ #include <langinfo.h>
|
||||||
|
+ nl_langinfo(CODESET);]]),
|
||||||
|
+ langinfo_ok=yes , langinfo_ok=no])
|
||||||
|
if test "$langinfo_ok" = "no"; then
|
||||||
|
langinfo_ok="no (could not compile with nl_langinfo)";
|
||||||
|
fi
|
||||||
|
@@ -1626,7 +1628,8 @@ dnl AC_CHECK_TOOL(AR, ar, :)
|
||||||
|
|
||||||
|
if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
|
||||||
|
AC_MSG_CHECKING([sys/exec.h])
|
||||||
|
- AC_TRY_COMPILE([#include <sys/exec.h>],[
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
+ #include <sys/exec.h>
|
||||||
|
struct exec foo;
|
||||||
|
unsigned long seek;
|
||||||
|
int flag;
|
||||||
|
@@ -1637,13 +1640,14 @@ dnl AC_CHECK_TOOL(AR, ar, :)
|
||||||
|
#endif
|
||||||
|
flag = (foo.a_magic == OMAGIC);
|
||||||
|
return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
|
||||||
|
- ], tcl_ok=usable, tcl_ok=unusable)
|
||||||
|
+ ]]), tcl_ok=usable, tcl_ok=unusable])
|
||||||
|
AC_MSG_RESULT([$tcl_ok])
|
||||||
|
if test $tcl_ok = usable; then
|
||||||
|
AC_DEFINE(USE_SYS_EXEC_H)
|
||||||
|
else
|
||||||
|
AC_MSG_CHECKING([a.out.h])
|
||||||
|
- AC_TRY_COMPILE([#include <a.out.h>],[
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
+ #include <a.out.h>
|
||||||
|
struct exec foo;
|
||||||
|
unsigned long seek;
|
||||||
|
int flag;
|
||||||
|
@@ -1654,13 +1658,14 @@ dnl AC_CHECK_TOOL(AR, ar, :)
|
||||||
|
#endif
|
||||||
|
flag = (foo.a_magic == OMAGIC);
|
||||||
|
return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
|
||||||
|
- ], tcl_ok=usable, tcl_ok=unusable)
|
||||||
|
+ ]]), tcl_ok=usable, tcl_ok=unusable])
|
||||||
|
AC_MSG_RESULT([$tcl_ok])
|
||||||
|
if test $tcl_ok = usable; then
|
||||||
|
AC_DEFINE(USE_A_OUT_H)
|
||||||
|
else
|
||||||
|
AC_MSG_CHECKING([sys/exec_aout.h])
|
||||||
|
- AC_TRY_COMPILE([#include <sys/exec_aout.h>],[
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
+ #include <sys/exec_aout.h>
|
||||||
|
struct exec foo;
|
||||||
|
unsigned long seek;
|
||||||
|
int flag;
|
||||||
|
@@ -1671,7 +1676,7 @@ dnl AC_CHECK_TOOL(AR, ar, :)
|
||||||
|
#endif
|
||||||
|
flag = (foo.a_midmag == OMAGIC);
|
||||||
|
return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
|
||||||
|
- ], tcl_ok=usable, tcl_ok=unusable)
|
||||||
|
+ ]]), tcl_ok=usable, tcl_ok=unusable])
|
||||||
|
AC_MSG_RESULT([$tcl_ok])
|
||||||
|
if test $tcl_ok = usable; then
|
||||||
|
AC_DEFINE(USE_SYS_EXEC_AOUT_H)
|
||||||
|
@@ -1913,7 +1918,7 @@ int main() {
|
||||||
|
|
||||||
|
AC_DEFUN([TEA_MISSING_POSIX_HEADERS], [
|
||||||
|
AC_MSG_CHECKING([dirent.h])
|
||||||
|
- AC_TRY_LINK([#include <sys/types.h>
|
||||||
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||||
|
#include <dirent.h>], [
|
||||||
|
#ifndef _POSIX_SOURCE
|
||||||
|
# ifdef __Lynx__
|
||||||
|
@@ -1932,7 +1937,7 @@ d = opendir("foobar");
|
||||||
|
entryPtr = readdir(d);
|
||||||
|
p = entryPtr->d_name;
|
||||||
|
closedir(d);
|
||||||
|
-], tcl_ok=yes, tcl_ok=no)
|
||||||
|
+]])], [tcl_ok=yes], [tcl_ok=no])
|
||||||
|
|
||||||
|
if test $tcl_ok = no; then
|
||||||
|
AC_DEFINE(NO_DIRENT_H)
|
||||||
|
@@ -2165,8 +2170,8 @@ AC_DEFUN([TEA_TIME_HANDLER], [
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([tm_tzadj in struct tm])
|
||||||
|
AC_CACHE_VAL(tcl_cv_member_tm_tzadj,
|
||||||
|
- AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
|
||||||
|
- tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <time.h>], [struct tm tm; tm.tm_tzadj;]]),
|
||||||
|
+ tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no]))
|
||||||
|
AC_MSG_RESULT([$tcl_cv_member_tm_tzadj])
|
||||||
|
if test $tcl_cv_member_tm_tzadj = yes ; then
|
||||||
|
AC_DEFINE(HAVE_TM_TZADJ)
|
||||||
|
@@ -2174,8 +2179,8 @@ AC_DEFUN([TEA_TIME_HANDLER], [
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([tm_gmtoff in struct tm])
|
||||||
|
AC_CACHE_VAL(tcl_cv_member_tm_gmtoff,
|
||||||
|
- AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
|
||||||
|
- tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <time.h>], [struct tm tm; tm.tm_gmtoff;]]),
|
||||||
|
+ tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no]))
|
||||||
|
AC_MSG_RESULT([$tcl_cv_member_tm_gmtoff])
|
||||||
|
if test $tcl_cv_member_tm_gmtoff = yes ; then
|
||||||
|
AC_DEFINE(HAVE_TM_GMTOFF)
|
||||||
|
@@ -2187,11 +2192,11 @@ AC_DEFUN([TEA_TIME_HANDLER], [
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([long timezone variable])
|
||||||
|
AC_CACHE_VAL(tcl_cv_var_timezone,
|
||||||
|
- AC_TRY_COMPILE([#include <time.h>],
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <time.h>],
|
||||||
|
[extern long timezone;
|
||||||
|
timezone += 1;
|
||||||
|
- exit (0);],
|
||||||
|
- tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
|
||||||
|
+ exit (0);]]),
|
||||||
|
+ tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no]))
|
||||||
|
AC_MSG_RESULT([$tcl_cv_timezone_long])
|
||||||
|
if test $tcl_cv_timezone_long = yes ; then
|
||||||
|
AC_DEFINE(HAVE_TIMEZONE_VAR)
|
||||||
|
@@ -2201,11 +2206,11 @@ AC_DEFUN([TEA_TIME_HANDLER], [
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([time_t timezone variable])
|
||||||
|
AC_CACHE_VAL(tcl_cv_timezone_time,
|
||||||
|
- AC_TRY_COMPILE([#include <time.h>],
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <time.h>],
|
||||||
|
[extern time_t timezone;
|
||||||
|
timezone += 1;
|
||||||
|
- exit (0);],
|
||||||
|
- tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
|
||||||
|
+ exit (0);]]),
|
||||||
|
+ tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no]))
|
||||||
|
AC_MSG_RESULT([$tcl_cv_timezone_time])
|
||||||
|
if test $tcl_cv_timezone_time = yes ; then
|
||||||
|
AC_DEFINE(HAVE_TIMEZONE_VAR)
|
||||||
|
@@ -2372,8 +2377,7 @@ AC_DEFUN([TEA_TCL_LINK_LIBS], [
|
||||||
|
AC_DEFUN([TEA_TCL_EARLY_FLAG],[
|
||||||
|
AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
|
||||||
|
AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
|
||||||
|
- AC_TRY_COMPILE([[#define ]$1[ 1
|
||||||
|
-]$2], $3,
|
||||||
|
+ AC_TRY_COMPILE([[#define ]$1[ 1]$2], $3,
|
||||||
|
[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
|
||||||
|
[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
|
||||||
|
if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
|
||||||
|
@@ -2436,9 +2440,12 @@ AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
|
||||||
|
# Now check for auxiliary declarations
|
||||||
|
AC_MSG_CHECKING([for struct dirent64])
|
||||||
|
AC_CACHE_VAL(tcl_cv_struct_dirent64,[
|
||||||
|
- AC_TRY_COMPILE([#include <sys/types.h>
|
||||||
|
-#include <sys/dirent.h>],[struct dirent64 p;],
|
||||||
|
- tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
+#include <sys/types.h>
|
||||||
|
+#include <sys/dirent.h>
|
||||||
|
+struct dirent64 p;
|
||||||
|
+ ]]),
|
||||||
|
+ tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no])])
|
||||||
|
if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
|
||||||
|
AC_DEFINE(HAVE_STRUCT_DIRENT64)
|
||||||
|
fi
|
||||||
|
@@ -2446,9 +2453,11 @@ AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for struct stat64])
|
||||||
|
AC_CACHE_VAL(tcl_cv_struct_stat64,[
|
||||||
|
- AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
|
||||||
|
-],
|
||||||
|
- tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
+#include <sys/stat.h>
|
||||||
|
+struct stat64 p;
|
||||||
|
+ ]]),
|
||||||
|
+ tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no])])
|
||||||
|
if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
|
||||||
|
AC_DEFINE(HAVE_STRUCT_STAT64)
|
||||||
|
fi
|
||||||
|
@@ -2456,9 +2465,11 @@ AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for off64_t])
|
||||||
|
AC_CACHE_VAL(tcl_cv_type_off64_t,[
|
||||||
|
- AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
|
||||||
|
-],
|
||||||
|
- tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
+#include <sys/types.h>
|
||||||
|
+off64_t offset;
|
||||||
|
+ ]])},
|
||||||
|
+ tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no])])
|
||||||
|
if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
|
||||||
|
AC_DEFINE(HAVE_TYPE_OFF64_T)
|
||||||
|
fi
|
||||||
|
@@ -2898,7 +2909,7 @@ AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
|
||||||
|
AC_DEFUN([TEA_PUBLIC_TCL_HEADERS], [
|
||||||
|
AC_MSG_CHECKING([for Tcl public headers])
|
||||||
|
|
||||||
|
- AC_ARG_WITH(tclinclude, AC_HELP_STRING([--with-tclinclude],[directory containing the public Tcl header files]), with_tclinclude=${withval})
|
||||||
|
+ AC_ARG_WITH(tclinclude, AS_HELP_STRING([--with-tclinclude],[directory containing the public Tcl header files]), with_tclinclude=${withval})
|
||||||
|
|
||||||
|
AC_CACHE_VAL(ac_cv_c_tclh, [
|
||||||
|
# Use the value from --with-tclinclude, if it was given
|
||||||
|
@@ -3027,7 +3038,7 @@ AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
|
||||||
|
AC_DEFUN([TEA_PUBLIC_TK_HEADERS], [
|
||||||
|
AC_MSG_CHECKING([for Tk public headers])
|
||||||
|
|
||||||
|
- AC_ARG_WITH(tkinclude, AC_HELP_STRING([--with-tkinclude],[directory containing the public Tk header files.]), with_tkinclude=${withval})
|
||||||
|
+ AC_ARG_WITH(tkinclude, AS_HELP_STRING([--with-tkinclude],[directory containing the public Tk header files.]), with_tkinclude=${withval})
|
||||||
|
|
||||||
|
AC_CACHE_VAL(ac_cv_c_tkh, [
|
||||||
|
# Use the value from --with-tkinclude, if it was given
|
||||||
|
@@ -3222,7 +3233,7 @@ AC_DEFUN([TEA_PATH_CONFIG], [
|
||||||
|
if test x"${no_$1}" = x ; then
|
||||||
|
# we reset no_$1 in case something fails here
|
||||||
|
no_$1=true
|
||||||
|
- AC_ARG_WITH($1, AC_HELP_STRING([--with-$1],[directory containing $1 configuration ($1Config.sh)]), with_$1config=${withval})
|
||||||
|
+ AC_ARG_WITH($1, AS_HELP_STRING([--with-$1],[directory containing $1 configuration ($1Config.sh)]), with_$1config=${withval})
|
||||||
|
AC_MSG_CHECKING([for $1 configuration])
|
||||||
|
AC_CACHE_VAL(ac_cv_c_$1config,[
|
||||||
|
|
||||||
|
diff -up torque/configure.ac.cleanup torque/configure.ac
|
||||||
|
--- torque/configure.ac.cleanup 2021-04-13 14:14:09.313271761 -0400
|
||||||
|
+++ torque/configure.ac 2021-04-13 14:36:29.125464515 -0400
|
||||||
|
@@ -32,14 +32,15 @@ dnl Updated to use m4
|
||||||
|
dnl added library functionality to testing
|
||||||
|
dnl by John Rosenquist (jrosenquist@adaptivecomputing.com)
|
||||||
|
|
||||||
|
-AC_PREREQ(2.53)
|
||||||
|
-AC_INIT([torque], [6.1.3], [torqueusers@supercluster.org])
|
||||||
|
+AC_PREREQ([2.69])
|
||||||
|
+AC_INIT([torque],[6.1.3],[torqueusers@supercluster.org])
|
||||||
|
AC_REVISION($Revision$)
|
||||||
|
AC_CONFIG_SRCDIR([src/cmds/qrun.c])
|
||||||
|
AC_CONFIG_AUX_DIR([buildutils])
|
||||||
|
AC_CANONICAL_HOST
|
||||||
|
AC_CONFIG_MACRO_DIR([buildutils])
|
||||||
|
|
||||||
|
+AC_PROG_CC
|
||||||
|
AC_PROG_CXX
|
||||||
|
m4_ifdef([AM_PROG_AR], [
|
||||||
|
AM_PROG_AR
|
||||||
|
@@ -58,7 +59,7 @@ m4_ifdef([HAVE_CHECK],
|
||||||
|
[AM_INIT_AUTOMAKE([-Wall -Werror -Wno-unsupported foreign 1.9.6])])
|
||||||
|
|
||||||
|
AM_PROG_CC_C_O
|
||||||
|
-CC="$CXX"
|
||||||
|
+# CC="$CXX"
|
||||||
|
CCLD="$CXX"
|
||||||
|
AC_SUBST([CCLD])
|
||||||
|
LIBTOOLFLAGS="--tag=CXX"
|
||||||
|
@@ -82,7 +83,7 @@ gccwarnings=yes
|
||||||
|
dnl Instead of putting a long list of defines on the command line
|
||||||
|
dnl for each compile, use a file called "pbs_config.h" that will
|
||||||
|
dnl be created in the include directory.
|
||||||
|
-AM_CONFIG_HEADER([src/include/pbs_config.h])
|
||||||
|
+AC_CONFIG_HEADERS([src/include/pbs_config.h])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Find our git revision hash for program outputs
|
||||||
|
@@ -672,14 +673,14 @@ dnl
|
||||||
|
AC_CHECK_PROGS(AR,ar,exit)
|
||||||
|
|
||||||
|
dnl wrapped libtool macro to remove annoying warning message
|
||||||
|
-AC_PROG_LIBTOOL
|
||||||
|
-TAC_PROG_LIBTOOL_PATCH
|
||||||
|
+# LT_INIT
|
||||||
|
+# TAC_PROG_LIBTOOL_PATCH
|
||||||
|
|
||||||
|
AC_PROG_LN_S
|
||||||
|
|
||||||
|
|
||||||
|
dnl needed for scheduler.basl
|
||||||
|
-AM_PROG_LEX
|
||||||
|
+AC_PROG_LEX(noyywrap)
|
||||||
|
AC_PROG_YACC
|
||||||
|
|
||||||
|
|
||||||
|
@@ -723,7 +724,7 @@ dnl and TAC_SYS_LARGEFILE
|
||||||
|
dnl
|
||||||
|
AC_MSG_CHECKING([whether to compile with debugging symbols])
|
||||||
|
AC_ARG_WITH([debug],
|
||||||
|
- AC_HELP_STRING([--with-debug], [compile with debugging symbols]),
|
||||||
|
+ AS_HELP_STRING([--with-debug],[compile with debugging symbols]),
|
||||||
|
DEBUG_SYMBOLS=$withval, DEBUG_SYMBOLS="yes")
|
||||||
|
AC_MSG_RESULT([DEBUG_SYMBOLS=$DEBUG_SYMBOLS])
|
||||||
|
dnl remove -O* and add -g
|
||||||
|
@@ -795,7 +796,8 @@ LIBS="$LIBS $PTHREAD_LIBS"
|
||||||
|
dnl
|
||||||
|
dnl we need libxml2
|
||||||
|
dnl
|
||||||
|
-xmlLib=`xml2-config --libs | sed 's/-L@<:@^@<:@:space:@:>@@:>@* //g;s/-l//'`
|
||||||
|
+xmlLib=xml2
|
||||||
|
+# `xml2-config --libs | sed 's/-L@<:@^@<:@:space:@:>@@:>@* //g;s/-l//'`
|
||||||
|
|
||||||
|
dnl skip the first two chars because its -l<libname>
|
||||||
|
AC_CHECK_LIB(${xmlLib}, xmlGetProp,
|
||||||
|
@@ -804,9 +806,10 @@ AC_CHECK_LIB(${xmlLib}, xmlGetProp,
|
||||||
|
|
||||||
|
|
||||||
|
dnl find zlib
|
||||||
|
-AC_CHECK_LIB(z, gzopen,
|
||||||
|
- [],
|
||||||
|
- [AC_MSG_ERROR([TORQUE needs zlib-devel in order to build]) ])
|
||||||
|
+AC_CHECK_LIB(z, gzopen,[LIBS="$LIBS -lz"], [AC_MSG_ERROR(could not find zlib)])
|
||||||
|
+# AC_CHECK_LIB(z, gzopen,
|
||||||
|
+# [],
|
||||||
|
+# [AC_MSG_ERROR([TORQUE needs zlib-devel in order to build]) ])
|
||||||
|
|
||||||
|
|
||||||
|
dnl ###########################################
|
||||||
|
@@ -858,6 +861,7 @@ dnl
|
||||||
|
|
||||||
|
AC_HEADER_DIRENT
|
||||||
|
AC_HEADER_STDC
|
||||||
|
+
|
||||||
|
AC_HEADER_SYS_WAIT
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h limits.h malloc.h netdb.h \
|
||||||
|
@@ -1368,8 +1372,7 @@ dnl Add the ability to link against the
|
||||||
|
dnl
|
||||||
|
dnl --with-pmix
|
||||||
|
AC_ARG_WITH([pmix],
|
||||||
|
- [AC_HELP_STRING([--with-pmix(=DIR)],
|
||||||
|
- [Build PMIx support. DIR can either be left off, or be a valid directory name. Supplying a valid directory name adds DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
||||||
|
+ [AS_HELP_STRING([--with-pmix(=DIR)],[Build PMIx support. DIR can either be left off, or be a valid directory name. Supplying a valid directory name adds DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if user requested PMIx support($with_pmix)])
|
||||||
|
AS_IF([test -z "$with_pmix" || test "$with_pmix" = "no"],
|
||||||
|
@@ -2421,7 +2424,7 @@ dnl modulefiles
|
||||||
|
AC_MSG_CHECKING([whether to install modulefiles])
|
||||||
|
|
||||||
|
AC_ARG_WITH(modulefiles,
|
||||||
|
- AC_HELP_STRING([--with-modulefiles@<:@=DIR@:>@], [use modulefiles in specified directory [[/etc/modulefiles]]]),
|
||||||
|
+ AS_HELP_STRING([--with-modulefiles@<:@=DIR@:>@],[use modulefiles in specified directory [[/etc/modulefiles]]]),
|
||||||
|
[], [with_modulefiles="no"])
|
||||||
|
if test "$with_modulefiles" != 'no'; then
|
||||||
|
if test "$with_modulefiles" = 'yes'; then
|
||||||
|
@@ -2530,7 +2533,7 @@ fi
|
||||||
|
AC_CHECK_FUNC(ntohl, [ :],
|
||||||
|
AC_MSG_CHECKING([for ntohl in arpa/inet.h])
|
||||||
|
torque_cv_ntohl_needs_arpa_inet_h="no"
|
||||||
|
- AC_TRY_COMPILE([
|
||||||
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
@@ -2540,9 +2543,8 @@ AC_CHECK_FUNC(ntohl, [ :],
|
||||||
|
#ifdef HAVE_ARPA_INET_H
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#endif
|
||||||
|
- ],[exit(ntohl(0));],
|
||||||
|
- [torque_cv_ntohl_needs_arpa_inet_h="yes"
|
||||||
|
- AC_DEFINE_UNQUOTED([NTOHL_NEEDS_ARPA_INET_H],1,[Define if ntohl() is declared in arpa/inet.h])])
|
||||||
|
+ ]], [[exit(ntohl(0));]])],[torque_cv_ntohl_needs_arpa_inet_h="yes"
|
||||||
|
+ AC_DEFINE_UNQUOTED([NTOHL_NEEDS_ARPA_INET_H],1,[Define if ntohl() is declared in arpa/inet.h])],[])
|
||||||
|
AC_MSG_RESULT($torque_cv_ntohl_needs_arpa_inet_h)
|
||||||
|
)
|
||||||
|
|
||||||
|
@@ -2672,7 +2674,7 @@ AC_DEFINE_UNQUOTED([PBS_CFLAGS],"${CFLAG
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([torque.spec:buildutils/torque.spec.in])
|
||||||
|
#The output files are alphabetically ordered by src then check test files
|
||||||
|
-AC_OUTPUT(buildutils/pbs_mkdirs
|
||||||
|
+AC_CONFIG_FILES([buildutils/pbs_mkdirs
|
||||||
|
buildutils/self-extract-head-sh
|
||||||
|
buildutils/modulefiles
|
||||||
|
buildutils/modulefiles.vers
|
||||||
|
@@ -2727,7 +2729,8 @@ AC_OUTPUT(buildutils/pbs_mkdirs
|
||||||
|
src/drmaa/Doxyfile
|
||||||
|
src/pam/Makefile
|
||||||
|
|
||||||
|
-)
|
||||||
|
+])
|
||||||
|
+AC_OUTPUT
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Building components: server=$build_server mom=$build_mom clients=$build_clients
|
33
torque-6.1.3-bool-fix.patch
Normal file
33
torque-6.1.3-bool-fix.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
diff -up torque/src/drmaa/src/compat.h.bool-fix torque/src/drmaa/src/compat.h
|
||||||
|
--- torque/src/drmaa/src/compat.h.bool-fix 2021-01-28 17:59:06.149190046 -0500
|
||||||
|
+++ torque/src/drmaa/src/compat.h 2021-01-28 17:59:16.941243507 -0500
|
||||||
|
@@ -51,6 +51,7 @@ int asprintf(char **strp, const char *fm
|
||||||
|
int vasprintf(char **strp, const char *fmt, va_list ap);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+/*
|
||||||
|
#ifndef HAVE_STDBOOL_H
|
||||||
|
# ifndef bool
|
||||||
|
# define bool int
|
||||||
|
@@ -62,6 +63,7 @@ int vasprintf(char **strp, const char *f
|
||||||
|
# define false 0
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
+*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
diff -up torque/src/include/pbs_ifl.h.bool-fix torque/src/include/pbs_ifl.h
|
||||||
|
--- torque/src/include/pbs_ifl.h.bool-fix 2021-01-28 16:14:24.000000000 -0500
|
||||||
|
+++ torque/src/include/pbs_ifl.h 2021-01-28 17:50:17.068569045 -0500
|
||||||
|
@@ -87,6 +87,10 @@
|
||||||
|
#define _PBS_IFL_DEF
|
||||||
|
#include <sys/socket.h>
|
||||||
|
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+#include <stdbool.h>
|
||||||
|
+#endif /* __cplusplus */
|
||||||
|
+
|
||||||
|
/* Attribute Names used by user commands */
|
||||||
|
|
||||||
|
#define ATTR_a "Execution_Time"
|
46
torque-6.1.3-port-args.patch
Normal file
46
torque-6.1.3-port-args.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
diff -up torque/contrib/init.d/pbs_mom.in.port-args torque/contrib/init.d/pbs_mom.in
|
||||||
|
--- torque/contrib/init.d/pbs_mom.in.port-args 2021-01-28 16:29:53.554947436 -0500
|
||||||
|
+++ torque/contrib/init.d/pbs_mom.in 2021-01-28 16:33:43.410074859 -0500
|
||||||
|
@@ -25,6 +25,8 @@ SBIN_PATH=@sbindir@
|
||||||
|
PBS_DAEMON="$SBIN_PATH/pbs_mom"
|
||||||
|
PBS_HOME=@PBS_HOME@
|
||||||
|
PBS_ARGS=""
|
||||||
|
+# this should be the integer port value
|
||||||
|
+PBS_PORT=""
|
||||||
|
|
||||||
|
SUBSYS_LOCK="/var/lock/subsys/pbs_mom"
|
||||||
|
|
||||||
|
@@ -32,6 +34,14 @@ 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
|
||||||
|
+
|
||||||
|
MOM_LOCK="$PBS_HOME/mom_priv/mom.lock"
|
||||||
|
|
||||||
|
if [ -z "$previous" ];then
|
||||||
|
@@ -84,7 +94,7 @@ kill_pbs_mom() {
|
||||||
|
retval=1
|
||||||
|
for i in {1..5}; do
|
||||||
|
kill -0 $pid &>/dev/null || return 0
|
||||||
|
- $SBIN_PATH/momctl -s && return $?
|
||||||
|
+ $SBIN_PATH/momctl -s $momctl_port_arg && return $?
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
return $retval
|
||||||
|
@@ -110,7 +120,7 @@ case "$1" in
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ulimit -c unlimited # Uncomment this to preserve core files
|
||||||
|
- daemon $PBS_DAEMON $args -d $PBS_HOME $PBS_ARGS
|
||||||
|
+ daemon $PBS_DAEMON $args $pbs_mom_port_arg -d $PBS_HOME $PBS_ARGS
|
||||||
|
RET=$?
|
||||||
|
touch $SUBSYS_LOCK
|
||||||
|
echo
|
||||||
|
diff -up torque/contrib/init.d/pbs_sched.in.port-args torque/contrib/init.d/pbs_sched.in
|
318
torque-6.1.3-system-jsoncpp.patch
Normal file
318
torque-6.1.3-system-jsoncpp.patch
Normal file
@ -0,0 +1,318 @@
|
|||||||
|
diff -up torque/configure.ac.system-jsoncpp torque/configure.ac
|
||||||
|
--- torque/configure.ac.system-jsoncpp 2021-01-28 17:33:44.008649547 -0500
|
||||||
|
+++ torque/configure.ac 2021-01-28 17:37:26.446751483 -0500
|
||||||
|
@@ -1311,6 +1311,13 @@ if test "x$HWLOC_CFLAGS" != "xnone"; the
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
+PKG_CHECK_MODULES([JSONCPP], [jsoncpp],
|
||||||
|
+ [ CFLAGS="$CFLAGS $JSONCPP_CFLAGS"; CPPFLAGS="$CPPFLAGS $JSONCPP_CFLAGS"; ],
|
||||||
|
+ [ AC_MSG_ERROR([$JSONCPP_PKG_ERRORS])])
|
||||||
|
+
|
||||||
|
+LIBS="$LIBS $JSONCPP_LIBS";
|
||||||
|
+
|
||||||
|
+
|
||||||
|
dnl enable pbs_mom to use the cpuset API from libcpuset
|
||||||
|
dnl only makes sense with cpusets enabled
|
||||||
|
AC_ARG_ENABLE(libcpuset, [ --enable-libcpuset Allows pbs_mom to use the cpuset API from libcpuset])
|
||||||
|
diff -up torque/src/include/machine.hpp.system-jsoncpp torque/src/include/machine.hpp
|
||||||
|
--- torque/src/include/machine.hpp.system-jsoncpp 2021-01-28 17:15:46.295362401 -0500
|
||||||
|
+++ torque/src/include/machine.hpp 2021-01-28 17:15:58.310420979 -0500
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
#include "pbs_job.h"
|
||||||
|
#include "req.hpp"
|
||||||
|
#include "allocation.hpp"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
extern const int ALL_TASKS;
|
||||||
|
|
||||||
|
|
||||||
|
diff -up torque/src/include/Makefile.am.system-jsoncpp torque/src/include/Makefile.am
|
||||||
|
--- torque/src/include/Makefile.am.system-jsoncpp 2021-01-28 17:15:10.067185774 -0500
|
||||||
|
+++ torque/src/include/Makefile.am 2021-01-28 17:15:22.285245341 -0500
|
||||||
|
@@ -27,8 +27,8 @@ noinst_HEADERS = acct.h array.h assertio
|
||||||
|
job_usage_info.hpp machine.hpp req.hpp complete_req.hpp trq_cgroups.h \
|
||||||
|
job_recovery.h allocation.hpp attr_req_info.hpp acl_special.hpp restricted_host.hpp \
|
||||||
|
pbs_helper.h mail_throttler.hpp lib_ifl.h runjob_help.hpp pmix_tracker.hpp \
|
||||||
|
- pmix_operation.hpp job_host_data.hpp policy_values.h plugin_internal.h json/json.h \
|
||||||
|
- json/json-forwards.h authorized_hosts.hpp numa_constants.h
|
||||||
|
+ pmix_operation.hpp job_host_data.hpp policy_values.h plugin_internal.h \
|
||||||
|
+ authorized_hosts.hpp numa_constants.h
|
||||||
|
|
||||||
|
BUILT_SOURCES = site_job_attr_def.h site_job_attr_enum.h \
|
||||||
|
site_qmgr_node_print.h site_qmgr_que_print.h \
|
||||||
|
diff -up torque/src/include/pbs_job.h.system-jsoncpp torque/src/include/pbs_job.h
|
||||||
|
--- torque/src/include/pbs_job.h.system-jsoncpp 2021-01-28 17:16:09.054473361 -0500
|
||||||
|
+++ torque/src/include/pbs_job.h 2021-01-28 17:18:26.715144482 -0500
|
||||||
|
@@ -104,7 +104,7 @@
|
||||||
|
#include "tcp.h" /* tcp_chan */
|
||||||
|
#include "net_connect.h"
|
||||||
|
#include "job_host_data.hpp"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
|
||||||
|
|
||||||
|
#define SAVEJOB_BUF_SIZE 8192
|
||||||
|
diff -up torque/src/lib/Libutils/Makefile.am.system-jsoncpp torque/src/lib/Libutils/Makefile.am
|
||||||
|
--- torque/src/lib/Libutils/Makefile.am.system-jsoncpp 2021-01-28 17:19:31.650461068 -0500
|
||||||
|
+++ torque/src/lib/Libutils/Makefile.am 2021-01-28 17:19:42.934516083 -0500
|
||||||
|
@@ -10,6 +10,6 @@ noinst_LIBRARIES = libutils.a
|
||||||
|
libutils_a_SOURCES = u_groups.c u_tree.c u_mu.c u_MXML.c u_xml.c u_threadpool.c u_lock_ctl.c \
|
||||||
|
u_mom_hierarchy.c u_hash_map_structs.c u_users.c u_constants.c u_mutex_mgr.cpp \
|
||||||
|
u_misc.c u_putenv.c u_wrapper.c u_timer.cpp machine.cpp numa_chip.cpp \
|
||||||
|
- numa_core.cpp numa_pci_device.cpp numa_socket.cpp allocation.cpp jsoncpp.cpp \
|
||||||
|
+ numa_core.cpp numa_pci_device.cpp numa_socket.cpp allocation.cpp \
|
||||||
|
authorized_hosts.cpp numa_constants.cpp
|
||||||
|
|
||||||
|
diff -up torque/src/resmom/catch_child.c.system-jsoncpp torque/src/resmom/catch_child.c
|
||||||
|
--- torque/src/resmom/catch_child.c.system-jsoncpp 2021-01-28 17:20:20.852700949 -0500
|
||||||
|
+++ torque/src/resmom/catch_child.c 2021-01-28 17:20:32.701758691 -0500
|
||||||
|
@@ -51,7 +51,7 @@
|
||||||
|
#include "pbs_cpuset.h"
|
||||||
|
#endif
|
||||||
|
#include "mom_config.h"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
|
||||||
|
#define DIS_REPLY_READ_RETRY 10
|
||||||
|
|
||||||
|
diff -up torque/src/resmom/mom_server.c.system-jsoncpp torque/src/resmom/mom_server.c
|
||||||
|
--- torque/src/resmom/mom_server.c.system-jsoncpp 2021-01-28 17:20:47.497830825 -0500
|
||||||
|
+++ torque/src/resmom/mom_server.c 2021-01-28 17:21:04.386913166 -0500
|
||||||
|
@@ -251,7 +251,7 @@
|
||||||
|
#include "machine.hpp"
|
||||||
|
#endif
|
||||||
|
#ifdef USE_RESOURCE_PLUGIN
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
#include "trq_plugin_api.h"
|
||||||
|
#include "plugin_internal.h"
|
||||||
|
#endif
|
||||||
|
diff -up torque/src/resmom/parse_config.c.system-jsoncpp torque/src/resmom/parse_config.c
|
||||||
|
--- torque/src/resmom/parse_config.c.system-jsoncpp 2021-01-28 17:21:14.600962963 -0500
|
||||||
|
+++ torque/src/resmom/parse_config.c 2021-01-28 17:21:26.865022756 -0500
|
||||||
|
@@ -99,7 +99,7 @@
|
||||||
|
#include "mom_func.h"
|
||||||
|
#include "authorized_hosts.hpp"
|
||||||
|
#include "csv.h"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
#include "req.hpp"
|
||||||
|
|
||||||
|
void encode_used(job *pjob, int perm, Json::Value *, tlist_head *phead);
|
||||||
|
diff -up torque/src/resmom/prolog.c.system-jsoncpp torque/src/resmom/prolog.c
|
||||||
|
--- torque/src/resmom/prolog.c.system-jsoncpp 2021-01-28 17:21:37.352073884 -0500
|
||||||
|
+++ torque/src/resmom/prolog.c 2021-01-28 17:21:49.191131604 -0500
|
||||||
|
@@ -108,7 +108,7 @@
|
||||||
|
#include "net_connect.h"
|
||||||
|
#include "utils.h"
|
||||||
|
#include "mom_config.h"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
|
||||||
|
|
||||||
|
const int PELOG_DOESNT_EXIST = -1;
|
||||||
|
diff -up torque/src/resmom/requests.c.system-jsoncpp torque/src/resmom/requests.c
|
||||||
|
--- torque/src/resmom/requests.c.system-jsoncpp 2021-01-28 17:22:05.545211337 -0500
|
||||||
|
+++ torque/src/resmom/requests.c 2021-01-28 17:22:16.108262836 -0500
|
||||||
|
@@ -123,7 +123,7 @@
|
||||||
|
#include "power_state.hpp"
|
||||||
|
#ifdef USE_RESOURCE_PLUGIN
|
||||||
|
#include "plugin_internal.h"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _CRAY
|
||||||
|
diff -up torque/src/server/job.cpp.system-jsoncpp torque/src/server/job.cpp
|
||||||
|
--- torque/src/server/job.cpp.system-jsoncpp 2021-01-28 17:22:46.476410893 -0500
|
||||||
|
+++ torque/src/server/job.cpp 2021-01-28 17:22:57.246463402 -0500
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
#include <pbs_config.h>
|
||||||
|
#include "pbs_job.h"
|
||||||
|
#include "log.h"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
diff -up torque/src/server/node_manager.c.system-jsoncpp torque/src/server/node_manager.c
|
||||||
|
--- torque/src/server/node_manager.c.system-jsoncpp 2021-01-28 17:24:40.798968223 -0500
|
||||||
|
+++ torque/src/server/node_manager.c 2021-01-28 17:24:52.041023032 -0500
|
||||||
|
@@ -140,7 +140,7 @@
|
||||||
|
#endif
|
||||||
|
#include "runjob_help.hpp"
|
||||||
|
#include "plugin_internal.h"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
#include "authorized_hosts.hpp"
|
||||||
|
|
||||||
|
#define IS_VALID_STR(STR) (((STR) != NULL) && ((STR)[0] != '\0'))
|
||||||
|
diff -up torque/src/server/pbsnode.cpp.system-jsoncpp torque/src/server/pbsnode.cpp
|
||||||
|
--- torque/src/server/pbsnode.cpp.system-jsoncpp 2021-01-28 17:22:27.386317821 -0500
|
||||||
|
+++ torque/src/server/pbsnode.cpp 2021-01-28 17:22:38.162370359 -0500
|
||||||
|
@@ -9,7 +9,7 @@
|
||||||
|
#include "../lib/Libnet/lib_net.h" /* pbs_getaddrinfo */
|
||||||
|
#include "alps_constants.h"
|
||||||
|
#include "policy_values.h"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
#include "plugin_internal.h"
|
||||||
|
|
||||||
|
#define MSG_LEN_LONG 160
|
||||||
|
diff -up torque/src/test/catch_child/scaffolding.c.system-jsoncpp torque/src/test/catch_child/scaffolding.c
|
||||||
|
--- torque/src/test/catch_child/scaffolding.c.system-jsoncpp 2021-01-28 17:25:02.101072079 -0500
|
||||||
|
+++ torque/src/test/catch_child/scaffolding.c 2021-01-28 17:25:14.307131588 -0500
|
||||||
|
@@ -20,7 +20,7 @@
|
||||||
|
#include "mom_func.h"
|
||||||
|
#include "mom_job_cleanup.h"
|
||||||
|
#include "complete_req.hpp"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
|
||||||
|
int server_down;
|
||||||
|
int called_open_socket = 0;
|
||||||
|
diff -up torque/src/test/job/test_uut.c.system-jsoncpp torque/src/test/job/test_uut.c
|
||||||
|
--- torque/src/test/job/test_uut.c.system-jsoncpp 2021-01-28 17:25:24.008178885 -0500
|
||||||
|
+++ torque/src/test/job/test_uut.c 2021-01-28 17:25:33.824226742 -0500
|
||||||
|
@@ -5,7 +5,7 @@
|
||||||
|
|
||||||
|
#include "pbs_error.h"
|
||||||
|
#include "pbs_job.h"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
#include <check.h>
|
||||||
|
|
||||||
|
extern attribute_def job_attr_def[];
|
||||||
|
diff -up torque/src/test/machine/scaffolding.c.system-jsoncpp torque/src/test/machine/scaffolding.c
|
||||||
|
--- torque/src/test/machine/scaffolding.c.system-jsoncpp 2021-01-28 17:26:18.917446590 -0500
|
||||||
|
+++ torque/src/test/machine/scaffolding.c 2021-01-28 17:26:28.467493151 -0500
|
||||||
|
@@ -6,7 +6,7 @@
|
||||||
|
#include "pbs_error.h"
|
||||||
|
#include "allocation.hpp"
|
||||||
|
#include "complete_req.hpp"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
#include "numa_constants.h"
|
||||||
|
|
||||||
|
int num_for_host;
|
||||||
|
diff -up torque/src/test/machine/test_uut.c.system-jsoncpp torque/src/test/machine/test_uut.c
|
||||||
|
--- torque/src/test/machine/test_uut.c.system-jsoncpp 2021-01-28 17:26:37.960539433 -0500
|
||||||
|
+++ torque/src/test/machine/test_uut.c 2021-01-28 17:26:48.545591403 -0500
|
||||||
|
@@ -9,7 +9,7 @@
|
||||||
|
#include "pbs_job.h"
|
||||||
|
#include "complete_req.hpp"
|
||||||
|
#include "pbs_config.h"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
|
||||||
|
extern int hardware_style;
|
||||||
|
|
||||||
|
diff -up torque/src/test/node_manager/scaffolding.c.system-jsoncpp torque/src/test/node_manager/scaffolding.c
|
||||||
|
--- torque/src/test/node_manager/scaffolding.c.system-jsoncpp 2021-01-28 17:25:45.583284073 -0500
|
||||||
|
+++ torque/src/test/node_manager/scaffolding.c 2021-01-28 17:25:57.028339872 -0500
|
||||||
|
@@ -21,7 +21,7 @@
|
||||||
|
#include "id_map.hpp"
|
||||||
|
#include "machine.hpp"
|
||||||
|
#include "complete_req.hpp"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
#include "authorized_hosts.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
diff -up torque/src/test/node_manager/test_uut.c.system-jsoncpp torque/src/test/node_manager/test_uut.c
|
||||||
|
--- torque/src/test/node_manager/test_uut.c.system-jsoncpp 2021-01-28 17:26:59.731646817 -0500
|
||||||
|
+++ torque/src/test/node_manager/test_uut.c 2021-01-28 17:27:08.815691817 -0500
|
||||||
|
@@ -12,7 +12,7 @@
|
||||||
|
#include "test_uut.h"
|
||||||
|
#include "pbs_error.h"
|
||||||
|
#include "server.h"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
#include "complete_req.hpp"
|
||||||
|
#include "pbs_nodes.h"
|
||||||
|
|
||||||
|
diff -up torque/src/test/numa_chip/scaffolding.c.system-jsoncpp torque/src/test/numa_chip/scaffolding.c
|
||||||
|
--- torque/src/test/numa_chip/scaffolding.c.system-jsoncpp 2021-01-28 17:27:17.770736185 -0500
|
||||||
|
+++ torque/src/test/numa_chip/scaffolding.c 2021-01-28 17:27:25.892776426 -0500
|
||||||
|
@@ -4,7 +4,7 @@
|
||||||
|
#include "log.h"
|
||||||
|
#include "pbs_error.h"
|
||||||
|
#include "machine.hpp"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
#include "numa_constants.h"
|
||||||
|
|
||||||
|
const char *use_cores = "usecores";
|
||||||
|
diff -up torque/src/test/numa_chip/test_uut.c.system-jsoncpp torque/src/test/numa_chip/test_uut.c
|
||||||
|
--- torque/src/test/numa_chip/test_uut.c.system-jsoncpp 2021-01-28 17:27:33.612814672 -0500
|
||||||
|
+++ torque/src/test/numa_chip/test_uut.c 2021-01-28 17:27:41.267852594 -0500
|
||||||
|
@@ -6,7 +6,7 @@
|
||||||
|
#include "hwloc.h"
|
||||||
|
#include "pbs_error.h"
|
||||||
|
#include <sstream>
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
|
||||||
|
extern int recorded;
|
||||||
|
|
||||||
|
diff -up torque/src/test/numa_socket/scaffolding.c.system-jsoncpp torque/src/test/numa_socket/scaffolding.c
|
||||||
|
--- torque/src/test/numa_socket/scaffolding.c.system-jsoncpp 2021-01-28 17:27:51.494903256 -0500
|
||||||
|
+++ torque/src/test/numa_socket/scaffolding.c 2021-01-28 17:28:01.090950793 -0500
|
||||||
|
@@ -6,7 +6,7 @@
|
||||||
|
#include "pbs_error.h"
|
||||||
|
#include "req.hpp"
|
||||||
|
#include "allocation.hpp"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
|
||||||
|
int hardware_style;
|
||||||
|
float tasks;
|
||||||
|
diff -up torque/src/test/numa_socket/test_uut.c.system-jsoncpp torque/src/test/numa_socket/test_uut.c
|
||||||
|
--- torque/src/test/numa_socket/test_uut.c.system-jsoncpp 2021-01-28 17:28:13.915014321 -0500
|
||||||
|
+++ torque/src/test/numa_socket/test_uut.c 2021-01-28 17:28:22.609057389 -0500
|
||||||
|
@@ -8,7 +8,7 @@
|
||||||
|
#include "pbs_error.h"
|
||||||
|
#include "allocation.hpp"
|
||||||
|
#include "req.hpp"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
|
||||||
|
extern float tasks;
|
||||||
|
extern int placed;
|
||||||
|
diff -up torque/src/test/parse_config/scaffolding.c.system-jsoncpp torque/src/test/parse_config/scaffolding.c
|
||||||
|
--- torque/src/test/parse_config/scaffolding.c.system-jsoncpp 2021-01-28 17:29:00.388244539 -0500
|
||||||
|
+++ torque/src/test/parse_config/scaffolding.c 2021-01-28 17:29:10.473294499 -0500
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
#include "pbs_job.h"
|
||||||
|
#include "u_tree.h"
|
||||||
|
#include "log.h"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
#include "authorized_hosts.hpp"
|
||||||
|
|
||||||
|
#define LOG_BUF_SIZE 16384
|
||||||
|
diff -up torque/src/test/parse_config/test_uut.c.system-jsoncpp torque/src/test/parse_config/test_uut.c
|
||||||
|
--- torque/src/test/parse_config/test_uut.c.system-jsoncpp 2021-01-28 17:28:40.823147618 -0500
|
||||||
|
+++ torque/src/test/parse_config/test_uut.c 2021-01-28 17:28:51.173198890 -0500
|
||||||
|
@@ -5,7 +5,7 @@
|
||||||
|
|
||||||
|
#include "pbs_job.h"
|
||||||
|
#include "mom_func.h"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
|
||||||
|
extern int encode_used_ctr;
|
||||||
|
extern int encode_flagged_attrs_ctr;
|
||||||
|
diff -up torque/src/test/prolog/scaffolding.c.system-jsoncpp torque/src/test/prolog/scaffolding.c
|
||||||
|
--- torque/src/test/prolog/scaffolding.c.system-jsoncpp 2021-01-28 17:29:18.930336393 -0500
|
||||||
|
+++ torque/src/test/prolog/scaffolding.c 2021-01-28 17:29:28.645384519 -0500
|
||||||
|
@@ -13,7 +13,7 @@
|
||||||
|
#include "libpbs.h" /* job_file */
|
||||||
|
#include "mom_config.h"
|
||||||
|
#include "mom_mach.h"
|
||||||
|
-#include "json/json.h"
|
||||||
|
+#include <json/json.h>
|
||||||
|
|
||||||
|
#define MAXLINE 1024
|
||||||
|
|
173
torque-buffer-overrun-2.5.5.patch
Normal file
173
torque-buffer-overrun-2.5.5.patch
Normal file
@ -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);
|
||||||
|
|
42
torque-create-request.patch
Normal file
42
torque-create-request.patch
Normal file
@ -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
|
109
torque-fix-munge-rhbz#752079-PTII.patch
Normal file
109
torque-fix-munge-rhbz#752079-PTII.patch
Normal file
@ -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;
|
||||||
|
}
|
94
torque-fix-munge-rhbz#752079.patch
Normal file
94
torque-fix-munge-rhbz#752079.patch
Normal file
@ -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;
|
||||||
|
|
19
torque-initd-hangs-rhbz-744138.patch
Normal file
19
torque-initd-hangs-rhbz-744138.patch
Normal file
@ -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() {
|
124
torque-rhbz#758740-r5258-dis-close.patch
Normal file
124
torque-rhbz#758740-r5258-dis-close.patch
Normal file
@ -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() */
|
||||||
|
|
27
torque-rhbz#758740-r5270-dis-array.patch
Normal file
27
torque-rhbz#758740-r5270-dis-array.patch
Normal file
@ -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);
|
@ -15,6 +15,9 @@
|
|||||||
# that $PBS_SERVER_HOME/server_name contains the correct hostname.
|
# that $PBS_SERVER_HOME/server_name contains the correct hostname.
|
||||||
%global server_name localhost
|
%global server_name localhost
|
||||||
|
|
||||||
|
# The script checks uname -m to determine architecture
|
||||||
|
%global uname_m_arch %(uname -m)
|
||||||
|
|
||||||
# Build doxygen docs
|
# Build doxygen docs
|
||||||
%global doxydoc 1
|
%global doxydoc 1
|
||||||
|
|
||||||
@ -70,10 +73,16 @@
|
|||||||
%global server_nameflags --with-default-server=%{server_name}
|
%global server_nameflags --with-default-server=%{server_name}
|
||||||
|
|
||||||
Name: torque
|
Name: torque
|
||||||
Version: 4.2.10
|
Version: 6.1.3
|
||||||
Release: 25%{?dist}
|
Release: 13%{?dist}
|
||||||
Summary: Tera-scale Open-source Resource and QUEue manager
|
Summary: Tera-scale Open-source Resource and QUEue manager
|
||||||
Source0: http://www.adaptivecomputing.com/download/%{name}/%{name}-%{version}.tar.gz
|
# Source0: http://www.adaptivecomputing.com/download/%%{name}/%%{name}-%%{version}.tar.gz
|
||||||
|
# git clone https://github.com/adaptivecomputing/torque.git
|
||||||
|
# cd torque
|
||||||
|
# git checkout 6.1.3
|
||||||
|
# cd ..
|
||||||
|
# tar cvfJ torque-6.1.3.tar.xz torque/
|
||||||
|
Source0: %{name}-%{version}.tar.xz
|
||||||
Source2: xpbs.desktop
|
Source2: xpbs.desktop
|
||||||
Source3: xpbsmon.desktop
|
Source3: xpbsmon.desktop
|
||||||
Source4: xpbs.png
|
Source4: xpbs.png
|
||||||
@ -95,14 +104,27 @@ Source100: pbs-config
|
|||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=713996
|
# https://bugzilla.redhat.com/show_bug.cgi?id=713996
|
||||||
Patch1: torque-munge-size.patch
|
Patch1: torque-munge-size.patch
|
||||||
Patch2: torque-%{version}-port-args.patch
|
Patch2: torque-6.1.3-port-args.patch
|
||||||
# Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1424149
|
# Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1424149
|
||||||
Patch3: torque-%{version}-fix-bad-crypto-check.patch
|
# Patch3: torque-4.2.10-fix-bad-crypto-check.patch
|
||||||
# From https://github.com/adaptivecomputing/torque/pull/148
|
# Use system jsoncpp
|
||||||
Patch4: torque-%{version}-remove-unused-header.patch
|
Patch4: torque-6.1.3-system-jsoncpp.patch
|
||||||
|
# Include stdbool.h to build pbs-drmaa
|
||||||
|
Patch5: torque-6.1.3-bool-fix.patch
|
||||||
|
# Some fixes for modern autoconf
|
||||||
|
# I got it far enough to work again and ran away screaming
|
||||||
|
Patch6: torque-6.1.3-autoconf-fixes.patch
|
||||||
|
|
||||||
License: OpenPBS and TORQUEv1.1
|
|
||||||
URL: http://www.adaptivecomputing.com/products/open-source/torque/
|
# src/drmaa/ is LGPL-2.1-or-later
|
||||||
|
# src/drmaa/src/lookup3.c is LicenseRef-Fedora-Public-Domain
|
||||||
|
# src/include/md5.h and src/lib/Libnet/md5.c are RSA-MD
|
||||||
|
# RSA-MD is not listed per https://docs.fedoraproject.org/en-US/legal/misc/#_licensing_of_rsa_implementations_of_md5
|
||||||
|
# src/include/json/json-forwards.h is (LicenseRef-Fedora-Public-Domain OR MIT)
|
||||||
|
# src/mom_rcp/extern.h is BSD-4-Clause-UC
|
||||||
|
License: OpenPBS-2.3 AND TORQUE-1.1 AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND (LicenseRef-Fedora-Public-Domain OR MIT) AND BSD-4-Clause-UC
|
||||||
|
URL: https://github.com/adaptivecomputing/torque/
|
||||||
|
BuildRequires: make
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: desktop-file-utils
|
BuildRequires: desktop-file-utils
|
||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
@ -114,6 +136,9 @@ BuildRequires: openssl-devel
|
|||||||
BuildRequires: hwloc-devel
|
BuildRequires: hwloc-devel
|
||||||
BuildRequires: libxml2-devel
|
BuildRequires: libxml2-devel
|
||||||
BuildRequires: munge-devel
|
BuildRequires: munge-devel
|
||||||
|
BuildRequires: autoconf, automake, libtool
|
||||||
|
BuildRequires: jsoncpp-devel, boost-devel
|
||||||
|
|
||||||
%if %{use_tcl}
|
%if %{use_tcl}
|
||||||
BuildRequires: tcl-devel
|
BuildRequires: tcl-devel
|
||||||
%endif
|
%endif
|
||||||
@ -148,9 +173,14 @@ BuildRequires: tex-adjustbox
|
|||||||
BuildRequires: tex(latex)
|
BuildRequires: tex(latex)
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
BuildRequires: tex(etoc.sty)
|
||||||
|
BuildRequires: tex(hanging.sty)
|
||||||
|
BuildRequires: tex(listofitems.sty)
|
||||||
|
BuildRequires: tex(newunicodechar.sty)
|
||||||
|
BuildRequires: tex(stackengine.sty)
|
||||||
|
BuildRequires: tex(ulem.sty)
|
||||||
|
|
||||||
Requires: munge
|
Requires: munge
|
||||||
Requires: torque-libs = %{version}-%{release}
|
|
||||||
Requires(post): %{_bindir}/grep %{_bindir}/cat /etc/services
|
Requires(post): %{_bindir}/grep %{_bindir}/cat /etc/services
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -165,7 +195,7 @@ This package holds just a few shared files and directories.
|
|||||||
|
|
||||||
%package client
|
%package client
|
||||||
Summary: Client part of TORQUE
|
Summary: Client part of TORQUE
|
||||||
Requires: %{name}-libs = %{version}-%{release}
|
Requires: torque-libs%{_isa} = %{version}-%{release}
|
||||||
Requires(posttrans): %{_sbindir}/alternatives
|
Requires(posttrans): %{_sbindir}/alternatives
|
||||||
Requires(preun): %{_sbindir}/alternatives
|
Requires(preun): %{_sbindir}/alternatives
|
||||||
|
|
||||||
@ -197,7 +227,7 @@ This package holds the documentation files.
|
|||||||
%package gui
|
%package gui
|
||||||
Summary: Graphical clients for TORQUE
|
Summary: Graphical clients for TORQUE
|
||||||
Requires: torque-client = %{version}-%{release}
|
Requires: torque-client = %{version}-%{release}
|
||||||
Requires: torque-libs = %{version}-%{release}
|
Requires: torque-libs%{_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description gui
|
%description gui
|
||||||
TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource
|
TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource
|
||||||
@ -214,6 +244,7 @@ Summary: Run-time libs for programs which will use the %{name} library
|
|||||||
Requires: munge
|
Requires: munge
|
||||||
Obsoletes: libtorque < 2.4.8-2
|
Obsoletes: libtorque < 2.4.8-2
|
||||||
Provides: libtorque = %{version}-%{release}
|
Provides: libtorque = %{version}-%{release}
|
||||||
|
Requires: torque-libs%{_isa} = %{version}-%{release}
|
||||||
Requires: munge
|
Requires: munge
|
||||||
|
|
||||||
%description libs
|
%description libs
|
||||||
@ -229,7 +260,7 @@ programs.
|
|||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development tools for programs which will use the %{name} library
|
Summary: Development tools for programs which will use the %{name} library
|
||||||
Requires: torque-libs = %{version}-%{release}
|
Requires: torque-libs%{_isa} = %{version}-%{release}
|
||||||
Obsoletes: libtorque-devel < 2.4.8-2
|
Obsoletes: libtorque-devel < 2.4.8-2
|
||||||
Provides: libtorque-devel = %{version}-%{release}
|
Provides: libtorque-devel = %{version}-%{release}
|
||||||
|
|
||||||
@ -246,7 +277,7 @@ necessary for developing programs which will use %{name}.
|
|||||||
|
|
||||||
%package mom
|
%package mom
|
||||||
Summary: Node execution daemon for TORQUE
|
Summary: Node execution daemon for TORQUE
|
||||||
Requires: torque-libs = %{version}-%{release}
|
Requires: torque-libs%{_isa} = %{version}-%{release}
|
||||||
Requires: munge
|
Requires: munge
|
||||||
%if ! %{use_rcp}
|
%if ! %{use_rcp}
|
||||||
Requires: openssh-clients
|
Requires: openssh-clients
|
||||||
@ -287,7 +318,7 @@ A simple PAM module to authorize users on PBS MOM nodes with a running job.
|
|||||||
|
|
||||||
%package scheduler
|
%package scheduler
|
||||||
Summary: Simple fifo scheduler for TORQUE
|
Summary: Simple fifo scheduler for TORQUE
|
||||||
Requires: torque-libs = %{version}-%{release}
|
Requires: torque-libs%{_isa} = %{version}-%{release}
|
||||||
%if 0%{?rhel} >= 7 || 0%{?fedora}
|
%if 0%{?rhel} >= 7 || 0%{?fedora}
|
||||||
Requires(posttrans): systemd
|
Requires(posttrans): systemd
|
||||||
Requires(preun): systemd
|
Requires(preun): systemd
|
||||||
@ -309,7 +340,7 @@ This package holds the fifo C scheduler.
|
|||||||
|
|
||||||
%package server
|
%package server
|
||||||
Summary: The main part of TORQUE
|
Summary: The main part of TORQUE
|
||||||
Requires: torque-libs = %{version}-%{release}
|
Requires: torque-libs%{_isa} = %{version}-%{release}
|
||||||
Requires: munge
|
Requires: munge
|
||||||
%if ! %{use_rcp}
|
%if ! %{use_rcp}
|
||||||
Requires: openssh-server
|
Requires: openssh-server
|
||||||
@ -335,7 +366,7 @@ This package holds the server.
|
|||||||
|
|
||||||
%package drmaa
|
%package drmaa
|
||||||
Summary: Run time files for the drmaa interface
|
Summary: Run time files for the drmaa interface
|
||||||
Requires: torque-libs = %{version}-%{release}
|
Requires: torque-libs%{_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description drmaa
|
%description drmaa
|
||||||
TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource
|
TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource
|
||||||
@ -367,16 +398,19 @@ DRMAA is "Distributed Resource Management Application API"
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n torque-%{version}
|
%setup -q -n torque
|
||||||
%patch1 -p 1
|
%patch1 -p 1 -b .munge-size
|
||||||
%patch2 -p 1
|
%patch2 -p 1 -b .port-args
|
||||||
%patch3 -p 0
|
# %%patch3 -p 0 -b .fix-bad-crypto-check
|
||||||
%patch4 -p 1
|
%patch4 -p1 -b .system-jsoncpp
|
||||||
|
%patch5 -p1 -b .bool-fix
|
||||||
|
%patch6 -p1 -b .cleanup
|
||||||
|
rm -rf src/lib/Libutils/jsoncpp.cpp src/include/json
|
||||||
sed -i '/LATEX_BATCHMODE/d' src/drmaa/Doxyfile.in
|
sed -i '/LATEX_BATCHMODE/d' src/drmaa/Doxyfile.in
|
||||||
install -pm 644 %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} \
|
install -pm 644 %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} \
|
||||||
%{SOURCE6} %{SOURCE8} .
|
%{SOURCE6} %{SOURCE8} .
|
||||||
# rm x bit on some documentation.
|
|
||||||
chmod 644 torque.setup
|
autoreconf -ifv
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# -fpermissive added to downgrade numerous 'invalid conversion' errors to warnings
|
# -fpermissive added to downgrade numerous 'invalid conversion' errors to warnings
|
||||||
@ -389,7 +423,11 @@ CFLAGS="%{optflags} -DUSE_INTERP_RESULT -DUSE_INTERP_ERRORLINE -fpermissive"
|
|||||||
--enable-cpuset --enable-numa-support \
|
--enable-cpuset --enable-numa-support \
|
||||||
%{server_nameflags} %{guiflags} %{tclflags} %{rcpflags}
|
%{server_nameflags} %{guiflags} %{tclflags} %{rcpflags}
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
# This codebase is a hot mess and that is the nice way of putting it.
|
||||||
|
# If you are reading this, you might want to consider other options.
|
||||||
|
# But if you have no other options, know this:
|
||||||
|
# All of the files inside here are C++ despite their naming.
|
||||||
|
make %{?_smp_mflags} CC=g++
|
||||||
|
|
||||||
for daemon in pbs_mom pbs_sched pbs_server trqauthd
|
for daemon in pbs_mom pbs_sched pbs_server trqauthd
|
||||||
do
|
do
|
||||||
@ -402,6 +440,15 @@ done
|
|||||||
%install
|
%install
|
||||||
make DESTDIR=%{buildroot} INSTALL="install -p" install
|
make DESTDIR=%{buildroot} INSTALL="install -p" install
|
||||||
|
|
||||||
|
%if %{doxydoc}
|
||||||
|
# spit and bailing wire.
|
||||||
|
# make the drmaa docs and install the manpages.
|
||||||
|
pushd src/drmaa
|
||||||
|
doxygen
|
||||||
|
install -p doc/man/man3/*.3 %{buildroot}%{_mandir}/man3/
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
# remove files we don't need
|
# remove files we don't need
|
||||||
rm -f %{buildroot}%{_libdir}/*.la
|
rm -f %{buildroot}%{_libdir}/*.la
|
||||||
rm -f %{buildroot}%{_libdir}/*/buildindex
|
rm -f %{buildroot}%{_libdir}/*/buildindex
|
||||||
@ -415,6 +462,9 @@ install -p -m 644 %{SOURCE20} %{buildroot}%{_unitdir}/
|
|||||||
install -p -m 644 %{SOURCE21} %{buildroot}%{_unitdir}/
|
install -p -m 644 %{SOURCE21} %{buildroot}%{_unitdir}/
|
||||||
install -p -m 644 %{SOURCE22} %{buildroot}%{_unitdir}/
|
install -p -m 644 %{SOURCE22} %{buildroot}%{_unitdir}/
|
||||||
install -p -m 644 %{SOURCE23} %{buildroot}%{_unitdir}/
|
install -p -m 644 %{SOURCE23} %{buildroot}%{_unitdir}/
|
||||||
|
|
||||||
|
# modern torque tries to help install the old initscripts. flush em.
|
||||||
|
rm -rf %{buildroot}%{_sysconfdir}/init.d
|
||||||
%else
|
%else
|
||||||
# install initscripts
|
# install initscripts
|
||||||
mkdir -p %{buildroot}%{_initrddir}
|
mkdir -p %{buildroot}%{_initrddir}
|
||||||
@ -493,18 +543,6 @@ ln -s %{_var}/log/torque/server_logs .
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
# Move drmaa man pages to correct place
|
|
||||||
# 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/.
|
|
||||||
rm -rf %{buildroot}%{_defaultdocdir}/torque-drmaa/html/*
|
|
||||||
rm -rf %{buildroot}%{_defaultdocdir}/torque-drmaa/latex/*
|
|
||||||
# Include drmaa.pdf later from the src tree.
|
|
||||||
rm %{buildroot}%{_defaultdocdir}/torque-drmaa/drmaa.pdf
|
|
||||||
%endif
|
|
||||||
|
|
||||||
#Remove man page for binary that is not included.
|
#Remove man page for binary that is not included.
|
||||||
rm %{buildroot}%{_mandir}/man1/basl2c.1
|
rm %{buildroot}%{_mandir}/man1/basl2c.1
|
||||||
|
|
||||||
@ -512,9 +550,18 @@ rm %{buildroot}%{_mandir}/man1/basl2c.1
|
|||||||
chmod 755 `find %{buildroot}/var/lib/torque -type d`
|
chmod 755 `find %{buildroot}/var/lib/torque -type d`
|
||||||
|
|
||||||
# Use wrapper script for pbs-config and rename original script to include architecture name
|
# Use wrapper script for pbs-config and rename original script to include architecture name
|
||||||
mv %{buildroot}%{_bindir}/pbs-config %{buildroot}%{_bindir}/pbs-config-%{_arch}
|
mv %{buildroot}%{_bindir}/pbs-config %{buildroot}%{_bindir}/pbs-config-%{uname_m_arch}
|
||||||
install -m0755 -p %{SOURCE100} %{buildroot}%{_bindir}/pbs-config
|
install -m0755 -p %{SOURCE100} %{buildroot}%{_bindir}/pbs-config
|
||||||
|
|
||||||
|
# We do not need a ld.so.conf.d file to point to %%{_libdir}
|
||||||
|
rm -rf %{buildroot}%{_sysconfdir}/ld.so.conf.d
|
||||||
|
|
||||||
|
# We also do not need profile.d files to put /usr/bin and /usr/sbin in the path
|
||||||
|
rm -rf %{buildroot}%{_sysconfdir}/profile.d
|
||||||
|
|
||||||
|
# It also installs a ton of binary stuff under /usr/share/doc/torque-drmaa that is not useful
|
||||||
|
rm -rf %{buildroot}%{_datadir}/doc/torque-drmaa
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# fix mistake in previous release
|
# fix mistake in previous release
|
||||||
sed -i '/pbs_mon/D' /etc/services
|
sed -i '/pbs_mon/D' /etc/services
|
||||||
@ -636,7 +683,7 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.torque torque.setup Release_Notes
|
%doc README.torque torque.setup Release_Notes
|
||||||
%doc CHANGELOG PBS_License.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}
|
||||||
%dir %{torquehomedir}/aux
|
%dir %{torquehomedir}/aux
|
||||||
@ -728,7 +775,7 @@ fi
|
|||||||
%files docs
|
%files docs
|
||||||
%doc doc/admin_guide.ps
|
%doc doc/admin_guide.ps
|
||||||
%if 0%{?doxydoc}
|
%if 0%{?doxydoc}
|
||||||
%doc src/drmaa/drmaa.pdf
|
# %%doc src/drmaa/doc/drmaa.pdf
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{build_gui}
|
%if %{build_gui}
|
||||||
@ -752,7 +799,7 @@ fi
|
|||||||
%{_includedir}/torque
|
%{_includedir}/torque
|
||||||
%exclude %{_includedir}/torque/drmaa.h
|
%exclude %{_includedir}/torque/drmaa.h
|
||||||
%{_bindir}/pbs-config
|
%{_bindir}/pbs-config
|
||||||
%{_bindir}/pbs-config-%{_arch}
|
%{_bindir}/pbs-config-%{uname_m_arch}
|
||||||
%{_mandir}/man3/pbs_alterjob.3.*
|
%{_mandir}/man3/pbs_alterjob.3.*
|
||||||
%{_mandir}/man3/pbs_connect.3.*
|
%{_mandir}/man3/pbs_connect.3.*
|
||||||
%{_mandir}/man3/pbs_default.3.*
|
%{_mandir}/man3/pbs_default.3.*
|
||||||
@ -859,21 +906,14 @@ fi
|
|||||||
%{_mandir}/man3/compat.h.3.*
|
%{_mandir}/man3/compat.h.3.*
|
||||||
%{_mandir}/man3/drmaa.3.*
|
%{_mandir}/man3/drmaa.3.*
|
||||||
%{_mandir}/man3/drmaa.h.3.*
|
%{_mandir}/man3/drmaa.h.3.*
|
||||||
%{_mandir}/man3/drmaa_attr_names_s.3.*
|
|
||||||
%{_mandir}/man3/drmaa_attr_values_s.3.*
|
|
||||||
%{_mandir}/man3/drmaa_attrib.3.*
|
%{_mandir}/man3/drmaa_attrib.3.*
|
||||||
%{_mandir}/man3/drmaa_attrib_info_s.3.*
|
%{_mandir}/man3/drmaa_attrib_info_s.3.*
|
||||||
%{_mandir}/man3/drmaa_submission_context_s.3.*
|
|
||||||
%{_mandir}/man3/drmaa_job_ids_s.3.*
|
|
||||||
%{_mandir}/man3/drmaa_def_attr_s.3.*
|
%{_mandir}/man3/drmaa_def_attr_s.3.*
|
||||||
%{_mandir}/man3/pbs_attrib.3.*
|
|
||||||
%{_mandir}/man3/drmaa_viter.3.*
|
|
||||||
%{_mandir}/man3/drmaa_job_iter_s.3.*
|
%{_mandir}/man3/drmaa_job_iter_s.3.*
|
||||||
%{_mandir}/man3/drmaa_job_s.3.*
|
%{_mandir}/man3/drmaa_job_s.3.*
|
||||||
%{_mandir}/man3/drmaa_job_template_s.3.*
|
|
||||||
%{_mandir}/man3/drmaa_jobt.3.*
|
%{_mandir}/man3/drmaa_jobt.3.*
|
||||||
%{_mandir}/man3/drmaa_session.3.*
|
%{_mandir}/man3/drmaa_viter.3.*
|
||||||
%{_mandir}/man3/drmaa_session_s.3.*
|
%{_mandir}/man3/pbs_attrib.3.*
|
||||||
%{_mandir}/man3/error.h.3.*
|
%{_mandir}/man3/error.h.3.*
|
||||||
%{_mandir}/man3/jobs.3.*
|
%{_mandir}/man3/jobs.3.*
|
||||||
%{_mandir}/man3/jobs.h.3.*
|
%{_mandir}/man3/jobs.h.3.*
|
||||||
@ -881,16 +921,86 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Jul 08 2020 Honggang Li <honli@redhat.com> - 4.2.10-25
|
* Wed Dec 18 2024 Kamal Heib <kheib@redhat.com> - 6.1.3-13
|
||||||
- Rebase to latest Fedora release
|
- Fix rpminspect issue
|
||||||
- Fix file conflicts in torque-devel multilib packages
|
Resolves: RHEL-70711
|
||||||
- Resolve: bz1853167
|
|
||||||
|
|
||||||
* Fri Jun 07 2019 Jarod Wilson <jarod@redhat.com> - 4.2.10-19
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 6.1.3-12
|
||||||
- Put pbs-config in base pkg where it belongs instead of -devel
|
- Bump release for October 2024 mass rebuild:
|
||||||
|
Resolves: RHEL-64018
|
||||||
|
|
||||||
* Fri May 31 2019 Jarod Wilson <jarod@redhat.com> - 4.2.10-18
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 6.1.3-11
|
||||||
- Rebuild for CI testing
|
- Bump release for June 2024 mass rebuild
|
||||||
|
|
||||||
|
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.3-10
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.3-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.3-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.3-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.3-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Nov 03 2021 Björn Esser <besser82@fedoraproject.org> - 6.1.3-5
|
||||||
|
- Rebuild (jsoncpp)
|
||||||
|
|
||||||
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.3-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Apr 13 2021 Tom Callaway <spot@fedoraproject.org> - 6.1.3-3
|
||||||
|
- "fixed" the autotooling
|
||||||
|
|
||||||
|
* Mon Feb 1 2021 Tom Callaway <spot@fedoraproject.org> - 6.1.3-2
|
||||||
|
- adjust URL to point to github (old url is dead)
|
||||||
|
|
||||||
|
* Fri Jan 29 2021 Tom Callaway <spot@fedoraproject.org> - 6.1.3-1
|
||||||
|
- update to 6.1.3
|
||||||
|
|
||||||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.10-30
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Aug 10 2020 Tom Callaway <spot@fedoraproject.org> - 4.2.10-29
|
||||||
|
- use %%uname_m_arch to ensure exact matching
|
||||||
|
|
||||||
|
* Mon Aug 10 2020 Tom Callaway <spot@fedoraproject.org> - 4.2.10-28
|
||||||
|
- using "%%{_arch}" resulted in a mismatch with uname -m on i386.
|
||||||
|
switched to "%%{_target_cpu}"
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.10-27
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 9 2020 Tom Callaway <spot@fedoraproject.org> - 4.2.10-26
|
||||||
|
- improve -libs Requires
|
||||||
|
|
||||||
|
* Thu Jul 2 2020 Tom Callaway <spot@fedoraproject.org> - 4.2.10-25
|
||||||
|
- resolve multilib conflict on pbs-config script
|
||||||
|
|
||||||
|
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.10-24
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Sep 3 2019 Tom Callaway <spot@fedoraproject.org> - 4.2.10-23
|
||||||
|
- revive
|
||||||
|
|
||||||
|
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.10-22
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.2.10-21
|
||||||
|
- Rebuild for readline 8.0
|
||||||
|
|
||||||
|
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.10-20
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Oct 15 2018 Peter Robinson <pbrobinson@fedoraproject.org> 4.2.10-19
|
||||||
|
- Adjust dependencies for install requirements, few cleanups
|
||||||
|
|
||||||
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.10-18
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
* Wed Feb 07 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.2.10-17
|
* Wed Feb 07 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.2.10-17
|
||||||
- Remove old Requires
|
- Remove old Requires
|
BIN
xpbsmon.png
Normal file
BIN
xpbsmon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
Loading…
Reference in New Issue
Block a user