summaryrefslogtreecommitdiff
path: root/sys-cluster/torque
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /sys-cluster/torque
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'sys-cluster/torque')
-rw-r--r--sys-cluster/torque/Manifest14
-rw-r--r--sys-cluster/torque/files/CVE-2013-4495.4.1.patch343
-rw-r--r--sys-cluster/torque/files/torque-4.1.5.1-tcl8.6.patch93
-rw-r--r--sys-cluster/torque/files/torque-4.2-dont-mess-with-cflags.patch27
-rw-r--r--sys-cluster/torque/files/torque-4.2-use-NULL-instead-of-char0.patch140
-rw-r--r--sys-cluster/torque/files/torque-4.2.9-tcl8.6.patch99
-rw-r--r--sys-cluster/torque/files/torque-6.0.4-pthreads-deux.patch13
-rw-r--r--sys-cluster/torque/metadata.xml1
-rw-r--r--sys-cluster/torque/torque-4.1.7-r2.ebuild232
-rw-r--r--sys-cluster/torque/torque-4.2.10-r2.ebuild193
-rw-r--r--sys-cluster/torque/torque-6.0.4-r2.ebuild6
11 files changed, 20 insertions, 1141 deletions
diff --git a/sys-cluster/torque/Manifest b/sys-cluster/torque/Manifest
index 439cefa02f79..4ca419ab81ee 100644
--- a/sys-cluster/torque/Manifest
+++ b/sys-cluster/torque/Manifest
@@ -1,26 +1,18 @@
-AUX CVE-2013-4495.4.1.patch 9063 BLAKE2B d5ab34ecfc095d266a4e2201640371409828368322f209378c55dc254fbeae02e92ba3e71e442ded77ee89972f8d1b4e7d5cdae025f5122b49b74bd79ba641dc SHA512 52d0105c8d756e50252926c764eff46653544584c25c43d4dbaf70ed45a1c610c9381b1f735ff6c436774fb8d77a2a7607e0ea2b70eaae927e9a1024b3048913
AUX pbs_mom-init.d 1084 BLAKE2B ab674f9670317034a775a07237754078cc89356d91bfdf86fc91ed850328fc4aa302e71be5a5e9a8ac32b6617efe5a63ed5162a9b5fcd945220162e20bb259f6 SHA512 698707c833070f77224e55788799ae4b32088b47221bfd9ed8fbb4097095bb4771ec39db831bbfd5af46d0a6addee04464bc71ef548ca94f3a324ebb97ce8a9c
AUX pbs_mom-init.d-munge 1149 BLAKE2B b4a70810c53bcc0508c03893fe89bf2f6c135563694e48de0f04b5494918cd2eae0e61fba9dae4a17b2ebc5e1d70084c6ae272372721cca4d12ac7dfbc06a395 SHA512 643deb1f21983dbdd8aa53416899db01ff651d81b3d989299eef9c2d3e1aab0e9b083cfae9bb559b6c3195238998a881ec5bf2a663e09f7f8508bb895bc11027
AUX pbs_sched-init.d 1165 BLAKE2B c4768e5ebfa8d39b2ef78dd9c14ee90bde6f64b42d0fa3f304b2a55ca5a4ee24de0666f9f6518bd3f9813c82aed139487d0b784293afe76fac36b1e18bc9598f SHA512 9417ffe5a417d69e03262221816b2778aacfe7cf393ea5b5ea535497f4dfcbad9545d49cdbcacaaa5e8a0fd01432806aac8e050b4979cabb59656c1256a91dd0
AUX pbs_server-init.d 1615 BLAKE2B d29bc83b87c684d88fdb93689582cd5dfbecaa8ca035a6fc52a0da0b3a068a034eb88b92c8428cb605a4674cebaf0dc75a58cb2fd2be293fadfca9899e85c806 SHA512 459334236d5614522dafa15c0144bbf9e9b5fe89ce73d61fde6b1bfbcc96c284d8f827069c4dd77f7a6c5fb2828923d60a9381c158123d5f6edd5ca50a471c21
AUX pbs_server-init.d-munge 1689 BLAKE2B e4a3b95e54f73110716796c1ca90d124112c57287506628af8add62a2d24689f0e00706e9ebc0cf4aa7a4e3b6d30ebaaddf02a7cf640172e73b00d92fac38734 SHA512 b9628241581fbed629d0edf83a3f987de894fb5711061239e737f63ef7dbe9033d35aa87a38b56dbd8da887a3058f9f284bfe101ee13db3464e6e814b537ea23
-AUX torque-4.1.5.1-tcl8.6.patch 2546 BLAKE2B f0c1c2d5df20c53a58a47de3fc0e226d2e9d99aa9b4f32c5cef1a036c77083ed156d7fba6ba1358077e5fc64ce3c4be41a76d2a4085f345e49753bad37e986d7 SHA512 0cd584784b5254daf11635e1d6252fa4fe3c5f2e46a0771452016f66ff0e3be01b91d154cef0a793cf0ab0df223ef5c51303d35c419f1d9addc64ea26a892521
-AUX torque-4.2-dont-mess-with-cflags.patch 806 BLAKE2B d4be6b841f354c5ab9eca24cd2ee330607f83000f1d7086d2cd885427f67537a9c75105b1afa9bdb1a8475bfa408d1aff903cc1d9bd5c7dfbe3d9aaf5f2fddaa SHA512 23aeb87fc75ec8b916817264501240b9f0fae7b3e81662496824dcccc21d1a07b2b58221ea22ca6551b6830e76347416a09da6c22de4aea173a32fe13c90c7ff
-AUX torque-4.2-use-NULL-instead-of-char0.patch 3898 BLAKE2B 9d693f6fc8a7dc4d9a3e3517c41ece9cde8f4567cf75439b47bfbf1041cf043b69c7666eb44a477ca6dac79415bd396782ee62535f7f4c32aa3caac4431d2347 SHA512 af6bb3e257f8f4c232c83ed8d0a4a4b8a451acb42bfec36aa1caa3191ab242109f1712bbd639219254e5ab42fa518990343b917ebf9d21406eb23e8b7c9141f3
-AUX torque-4.2.9-tcl8.6.patch 2702 BLAKE2B c1444b5f4da1d37e21fe5a8970e188926080805db83406f5caca2cf27dddebf069d9d9747c33e3a1e2b0ec5f36e95d80d1c69151129967d432cd2d11c5e1ecf8 SHA512 9844a1f633f049a66cf31d3721f6a5e205ede26186da1357e0b0aa2c0c4d064cbdff45e2f7e685d6c4afd09d961e59ff1759163e4a2ae349fa866e960c1bcf77
AUX torque-6.0.3-fix-emptystring-comparison.patch 2062 BLAKE2B d8186eebb69669ac67141183370f8959945db295956c686107471f9e29bfdcd08fd0a6c659f3bb80a6a152cc2a2319089b4a7c17eb29d873c257a559753efec7 SHA512 d2bc25899337f799652b5f02d7fc5d7e894fb6e2eefa201853a2695a5140c85aff670f8af3f8cf1b77988ea51d5f296d0073287316cfb52dcc208acc42161099
AUX torque-6.0.4-error_buf_overflow_prevent.patch 736 BLAKE2B ade2f842fd04d323aead973423c29a24237e189f0badf6033632a5245a243c55435a21fbec0434afc5cada34d72581f51a7d1a1b8c89b25aacb22aeb7e1ab98a SHA512 40aea81d470f485cc4330435c90e41ecaef911e73be17a8f0eb3277965c72d67275221f0c2d8ab5fde25448db93087fc02ef09625052dc80320f51d8fcdfed9c
AUX torque-6.0.4-no-openssl.patch 1926 BLAKE2B 387843f6117ebdb1a9ca0f9fe3363dd2b2ab45aced82e3e9c60cb11009fef1dd97afeb9e525a3a5d70885b6cd19cc20333dc9d009453ade63bad8c39fb82d578 SHA512 1370c280860eb31d2a7e09b7bef6d9f2d6d7651ba0c67db7c7c912ec72b78f6ca33f7f5b716afc69a10f8c3efd55d5702f8e894596de78a91a346ec28d83e5dc
+AUX torque-6.0.4-pthreads-deux.patch 411 BLAKE2B 253382c900c4d581a3fa07fc38188c767658968ad5ebc3d9af52b8757110c9bd203c9aecc1d97d8cd7d75fefc46fabdb6b038966bb3757e08257a945151376c7 SHA512 a9b4ad47c6f1f75832fdd062062c29f087d61c0adea2b04448432b2d3bed51b65db1aeb77ca87fc5fad6536df0aa28f19df2f1e04857db26de03cf090bb30fab
AUX torque-conf.d 649 BLAKE2B 819a53a96a35d77b45d3c536278a088845cbbbd4ac1606b7d822ae36909477428c692975edcd69b519e348fa2cfc7d01c013db33daae65b9a0ba169456324443 SHA512 b82f6c1d661bed03a32c3761530c4b303715167a317e467371091b11d3ae0e19e9784b1588577ee5f65397cb0699818ed5f621aeb66d3f2d218df12d0cf39bde
AUX torque-conf.d-munge 784 BLAKE2B fe4fc64377da0ed0232961462bd92fea4fae68760dd698cf2759105f75686c5c77c3cff2c3fac3531c4b4905244cbc9df0fe67fe62a410a63b35008429dd1261 SHA512 a78634a6f2bdf3c24e8c99d3cd7a9634daa32d69244a9ddfcc26199f4d04e901abbfa79ad057f5a4e4c492c9e21bc0c65edd8465ac6935fb7c67c8c639e75d68
AUX torque-env.d 240 BLAKE2B 49ef384c36369e02f11575b40f881efcbc3605dc7c52eb1694f721e15055542296c064628a9ed605638600a1319c6ec18691e5f3e3e94304ada8b7596997765f SHA512 275ce5ccf9f138bcee504a9996c9d838cd34714d352d4b7ac2d631d0fca662bf38a2ef7e8745605d9b3847049015e0791c937340cfdacbf44800482ce73bb042
AUX trqauthd-init.d 477 BLAKE2B fe62bfae07d1d9fe08352ba4d99ab5d46185a74b10497f32b0f6ad002f1dd8f73f72f351e889c908b2d38b0d09699734e4ea316c2bea2d76de0a436c34222d58 SHA512 55f19b5effc21444addb465967bbd44d6f67dc48945221753512216c4fc26878d90569cdee7b277676d157aa241c04dc08df65505d21f59f046fa5448d43b81d
-DIST torque-4.1.7.tar.gz 6218108 BLAKE2B 6c1ad0f1bb3f364603ad7f498999bd910491910fa5632b9f6b82e08b3afb8c54e8775c38bc8e5c959aa99d0647c54c7c348cd07bcbe11add8bfab5f3f06a4c80 SHA512 5a085c0a7b205fed075bff4599db90ca5c4bb5f22d87d76fd56539d5cc1935bb8eeffcd4d18ba84401bd4ca128718070b69c8b91ab6814a4638622ba351654e6
-DIST torque-4.2.10-gh-20150517.tar.gz 5836286 BLAKE2B 7108f1adcb6f674526b7db97df4ebcee04ae5c818d4f35ed1230a4e72e52ec0bc3b44e17334a143b21bcd3acccefc3927eca4f98d54d37745c8bb46a75e07045 SHA512 600bb5389b6a4161732b7aa82627f1ebeae238d7091aa2e223d9a14c44bf4668662f664b976f62ba3f1d8a366f90fb6058a8c904e20c26432dccd6abcd9c57fa
DIST torque-6.0.4-gcc7.patch 50412 BLAKE2B 43748e9bfd3811abdfeb56f93dd517fcb07a6902194120e2c9e16bbe5bbe0f04afd3f898616d46e0310902a6376671be0c8f3865e8f7dd5381fca46e7ad62fc8 SHA512 430ae6a80ebbfb2066831326f8ce25a34cb6fc17c1fbe4a202c495baceb2b7011c9f6782da31b78c34287f26765c76c587611d689791523b8bd53d634e3681b6
DIST torque-6.0.4-gh-20170829.tar.gz 6182495 BLAKE2B f9156ae4ffe388a7f3fa0df142e5f2d48c16fd7b8c148a3a80cd1c977eb0c1ef4a455da275f993100867be043422526ed05c53734e707851083d6d23ee1a2cc4 SHA512 8f1101adb89e06617de501f7956e126633b78b495baeb7980d3c534d34537cc604a3cf0a7c23c48eb2554b26cc13672b0e00c75d0f722d63ac4d42d57388ed94
DIST torque-6.0.4-glibc-2.34-pthread.patch.bz2 6266 BLAKE2B b5175b8bfe2deabe86b067f1ec5269770bcf096c6e875b8fd3cb404a976c9cb550ddcbe6e4ebb1e59c96044f95c285519e70fb4acd5c9db86c3050093ff65b3b SHA512 dbe0bd6000c140e1fe9b36e55c1a844701406a563bd178b9c972793b83282f3434e2160da5280666dcc0934c2b88e36c0a2b9518ffe7695b23d73fce0a07388d
-EBUILD torque-4.1.7-r2.ebuild 7372 BLAKE2B 6d4b19b1c1a57f686bd42f87e5bd3ac4de856e36b0a065dad651fc7a923be7705a92b1935e4eadb4bbb413b78cd6d477d2e79e3d332872e3832e555cd00e8978 SHA512 e4b9c0f4ab43d0f22f95618c4d526ff20c3cc7303a7572dc7a56fd2a8754e95a6590bf455721adb6c22176ff4c194a61027c47665609fdd5178165e2e7cfd0fd
-EBUILD torque-4.2.10-r2.ebuild 6010 BLAKE2B e2dac055f1ad5319dfd9ec324fb00f490002d149ffa866b92280dd2b8a85760be1bec33949dbe455b564e47f9ba322aaa68bf65fb96dd997ccf029ff96d7e266 SHA512 3d1811fe61d688c5d4c282ce1898a91fcc21462321ed0798796ba1cf993457a131ee0a3ee61ea7cc066e02ac3d33aa6d801a91625329f4a39cef28b89e5b3089
-EBUILD torque-6.0.4-r2.ebuild 5768 BLAKE2B be2b4fce7d91e9986a30f989132f6a5eadd07da7f875452b7acda2ab37caebd83360fecbb6e11c2fe9c78833e4425a1f7f934fe9ce435d9f55a23926f5e246c8 SHA512 b408193d53535d7bdc36b62613ec97cd19ff35822b9926e72496cc37f5e191adef97c2712b5c39a261101a11e59f9e7d952909d065adcf1d6443b59131b4867b
-MISC metadata.xml 876 BLAKE2B dff45c761bc80096a4cde3ad89bc50f8c74016f1d67802247846c4c06cec77e13d7cc5809e4d93e74c7a4280cec21f3d45d9f0999c2baf26d25fce9a4b38cade SHA512 581ff1715f585ae9b88618ed71e2d901b9154bf256b915a0b73f67386ee02752d584bd3ba191698ca779947801a71995f36e61a5b9ad94390e165526dbfd6de7
+EBUILD torque-6.0.4-r2.ebuild 5934 BLAKE2B 2783f962b1583a4546cb00bdaaea332bfee1c6af7013f8f1286713d7744eaf2aff35bc20befe4f108281751ada118835aabfeb2813c0b4a5ae0c7734ada53b4c SHA512 41505c575e197ab5ded5ca3a877159710c11fb4ac4b040b1807e033a993d8bf7542a059d12b21fb69f98d07a2fbb6e1376f85ccda14d120caeb1fc81cbdb51ff
+MISC metadata.xml 787 BLAKE2B 9bc7fb21c260237df6dcb50fe453f4113be2927bbe7b9ebf3816cb734e0d5a52f9acac84834c3e38fd268823137f5ec0b7a971b0eb2f28e6c44fc3c8213d648b SHA512 8ba369e5064bb9b15cb8ef4c6265723e5cacf5ebb5efda56949b5e69b824d6b366adb0ab6a3f1d4ccd316999b13b6bdf98936af3f5528451a864a1f9b6314cb3
diff --git a/sys-cluster/torque/files/CVE-2013-4495.4.1.patch b/sys-cluster/torque/files/CVE-2013-4495.4.1.patch
deleted file mode 100644
index 810a4f0944a5..000000000000
--- a/sys-cluster/torque/files/CVE-2013-4495.4.1.patch
+++ /dev/null
@@ -1,343 +0,0 @@
-From 2aad72c3d2ac612ecbb66828ac6ed5ab51eff5f3 Mon Sep 17 00:00:00 2001
-From: David Beer <dbeer@adaptivecomputing.com>
-Date: Mon, 11 Nov 2013 11:55:58 -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.
- Could not cherry-pick as 2.5 and 4.1 are very different.
-
----
- src/server/svr_mail.c | 265 ++++++++++++++++++++++++++++++++------------------
- 1 file changed, 170 insertions(+), 95 deletions(-)
-
-diff --git a/src/server/svr_mail.c b/src/server/svr_mail.c
-index b269e82..52f2f1f 100644
---- a/src/server/svr_mail.c
-+++ b/src/server/svr_mail.c
-@@ -89,6 +89,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <unistd.h>
- #include "list_link.h"
- #include "attribute.h"
- #include "server_limits.h"
-@@ -136,6 +137,77 @@ void free_mail_info(
-
-
-
-+void add_body_info(
-+
-+ char *bodyfmtbuf /* I */,
-+ mail_info *mi /* I */)
-+
-+ {
-+ char *bodyfmt = NULL;
-+ bodyfmt = strcpy(bodyfmtbuf, "PBS Job Id: %i\n"
-+ "Job Name: %j\n");
-+ if (mi->exec_host != NULL)
-+ {
-+ strcat(bodyfmt, "Exec host: %h\n");
-+ }
-+
-+ strcat(bodyfmt, "%m\n");
-+
-+ if (mi->text != NULL)
-+ {
-+ strcat(bodyfmt, "%d\n");
-+ }
-+ }
-+
-+
-+/*
-+ * 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,
-+ mail_info *mi)
-+
-+ {
-+ char *bodyfmt = NULL;
-+ char *subjectfmt = NULL;
-+
-+ /* Pipe in mail headers: To: and Subject: */
-+ fprintf(outmail_input, "To: %s\n", mi->mailto);
-+
-+ /* mail subject line formating statement */
-+ get_svr_attr_str(SRV_ATR_MailSubjectFmt, (char **)&subjectfmt);
-+ if (subjectfmt == NULL)
-+ {
-+ subjectfmt = "PBS JOB %i";
-+ }
-+
-+ fprintf(outmail_input, "Subject: ");
-+ svr_format_job(outmail_input, mi, subjectfmt);
-+ fprintf(outmail_input, "\n");
-+
-+ /* Set "Precedence: bulk" to avoid vacation messages, etc */
-+ fprintf(outmail_input, "Precedence: bulk\n\n");
-+
-+ /* mail body formating statement */
-+ get_svr_attr_str(SRV_ATR_MailBodyFmt, &bodyfmt);
-+ if (bodyfmt == NULL)
-+ {
-+ char bodyfmtbuf[MAXLINE];
-+ add_body_info(bodyfmtbuf, mi);
-+ bodyfmt = bodyfmtbuf;
-+ }
-+
-+ /* Now pipe in the email body */
-+ svr_format_job(outmail_input, mi, bodyfmt);
-+
-+ } /* write_email() */
-+
-
-
- void *send_the_mail(
-@@ -143,15 +215,19 @@ void *send_the_mail(
- void *vp)
-
- {
-- mail_info *mi = (mail_info *)vp;
--
-- int i;
-- char *mailfrom = NULL;
-- char *subjectfmt = NULL;
-- char *bodyfmt = NULL;
-- char *cmdbuf = NULL;
-- char bodyfmtbuf[MAXLINE];
-- FILE *outmail;
-+ mail_info *mi = (mail_info *)vp;
-+
-+ 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];
-+ FILE *stream;
-
- /* Who is mail from, if SRV_ATR_mailfrom not set use default */
- get_svr_attr_str(SRV_ATR_mailfrom, &mailfrom);
-@@ -173,124 +249,123 @@ void *send_the_mail(
- mailfrom = PBS_DEFAULT_MAIL;
- }
-
-- /* mail subject line formating statement */
-- get_svr_attr_str(SRV_ATR_MailSubjectFmt, &subjectfmt);
-- if (subjectfmt == NULL)
-- {
-- subjectfmt = "PBS JOB %i";
-- }
-+ sendmail_args[numargs++] = (char *)SENDMAIL_CMD;
-+ sendmail_args[numargs++] = (char *)"-f";
-+ sendmail_args[numargs++] = (char *)mailfrom;
-
-- /* mail body formating statement */
-- get_svr_attr_str(SRV_ATR_MailBodyFmt, &bodyfmt);
-- if (bodyfmt == NULL)
-+ /* Add the e-mail addresses to the command line */
-+ mailptr = strdup(mi->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 (mi->exec_host != NULL)
-+ if (mailptr[counter] == ',')
- {
-- strcat(bodyfmt, "Exec host: %h\n");
-- }
--
-- strcat(bodyfmt, "%m\n");
--
-- if (mi->text != NULL)
-- {
-- 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(mi->mailto) + 6;
--
-- if ((cmdbuf = calloc(1, i + 1)) == 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",
-- SENDMAIL_CMD,
-- 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,
- mi->jobid,
- tmpBuf);
--
-- free_mail_info(mi);
-
-+ free_mail_info(mi);
-+ free(mailptr);
- return(NULL);
- }
-
-- sprintf(cmdbuf, "%s -f %s %s",
-- SENDMAIL_CMD,
-- mailfrom,
-- mi->mailto);
--
-- outmail = 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,
- mi->jobid,
- tmpBuf);
-
- free_mail_info(mi);
-- free(cmdbuf);
--
-+ free(mailptr);
-+ close(pipes[0]);
-+ close(pipes[1]);
- return(NULL);
- }
-+ else if (pid == 0)
-+ {
-+ /* CHILD */
-
-- /* Pipe in mail headers: To: and Subject: */
-- fprintf(outmail, "To: %s\n", mi->mailto);
-+ /* Make stdin the read end of the pipe */
-+ dup2(pipes[0], 0);
-
-- fprintf(outmail, "Subject: ");
-- svr_format_job(outmail, mi, subjectfmt);
-- fprintf(outmail, "\n");
-+ /* Close the rest of the open file descriptors */
-+ int numfds = sysconf(_SC_OPEN_MAX);
-+ while (--numfds > 0)
-+ close(numfds);
-
-- /* Set "Precedence: bulk" to avoid vacation messages, etc */
-- fprintf(outmail, "Precedence: bulk\n\n");
-+ execv(SENDMAIL_CMD, sendmail_args);
-+ /* This never returns, but if the execv fails the child should exit */
-+ exit(1);
-+ }
-+ else
-+ {
-+ /* This is the parent */
-
-- /* Now pipe in the email body */
-- svr_format_job(outmail, mi, bodyfmt);
-+ /* Close the read end of the pipe */
-+ close(pipes[0]);
-
-- errno = 0;
-- if ((i = pclose(outmail)) != 0)
-- {
-- char tmpBuf[LOG_BUF_SIZE];
-+ /* Write the body to the pipe */
-+ stream = fdopen(pipes[1], "w");
-+ write_email(stream, mi);
-
-- snprintf(tmpBuf,sizeof(tmpBuf),
-- "Email '%c' to %s failed: Child process '%s' %s %d (errno %d:%s)\n",
-- mi->mail_point,
-- mi->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,
-- mi->jobid,
-- tmpBuf);
-- }
-- else if (LOGLEVEL >= 4)
-- {
-- log_event(PBSEVENT_ERROR | PBSEVENT_ADMIN | PBSEVENT_JOB,
-- PBS_EVENTCLASS_JOB,
-- mi->jobid,
-- "Email sent successfully\n");
-- }
-+ fflush(stream);
-+
-+ /* 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));
-+
-+ log_event(PBSEVENT_ERROR | PBSEVENT_ADMIN | PBSEVENT_JOB,
-+ PBS_EVENTCLASS_JOB,
-+ mi->jobid,
-+ tmpBuf);
-+ }
-+
-+ // 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);
-+
-+ log_event(PBSEVENT_ERROR | PBSEVENT_ADMIN | PBSEVENT_JOB,
-+ PBS_EVENTCLASS_JOB,
-+ mi->jobid,
-+ tmpBuf);
-+ }
-
-- free_mail_info(mi);
-- free(cmdbuf);
-+ // don't leave zombies
-+ while (waitpid(-1, &status, WNOHANG) != 0)
-+ {
-+ // zombie reaped, NO-OP
-+ }
-+
-+ free_mail_info(mi);
-+ free(mailptr);
-+ return(NULL);
-+ }
-
-+ /* NOT REACHED */
-+
- return(NULL);
- } /* END send_the_mail() */
-
---
-1.8.3.2
-
diff --git a/sys-cluster/torque/files/torque-4.1.5.1-tcl8.6.patch b/sys-cluster/torque/files/torque-4.1.5.1-tcl8.6.patch
deleted file mode 100644
index 2e8a8ed8f359..000000000000
--- a/sys-cluster/torque/files/torque-4.1.5.1-tcl8.6.patch
+++ /dev/null
@@ -1,93 +0,0 @@
- src/cmds/qstat.c | 18 ++++++++++++++++++
- src/scheduler.tcl/pbs_tclWrap.c | 13 +++++++++++++
- 2 files changed, 31 insertions(+)
-
-diff --git a/src/cmds/qstat.c b/src/cmds/qstat.c
-index 4e1c6b6..07ed448 100644
---- a/src/cmds/qstat.c
-+++ b/src/cmds/qstat.c
-@@ -1795,8 +1795,13 @@ tcl_init(void)
-
- if (Tcl_Init(interp) == TCL_ERROR)
- {
-+#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
- fprintf(stderr, "Tcl_Init error: %s",
- interp->result);
-+#else
-+ fprintf(stderr, "Tcl_Init error: %s",
-+ Tcl_GetStringResult(interp));
-+#endif
- }
-
- #if TCLX
-@@ -1808,8 +1813,14 @@ tcl_init(void)
- if (Tclx_Init(interp) == TCL_ERROR)
- {
- #endif
-+
-+#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
- fprintf(stderr, "Tclx_Init error: %s",
- interp->result);
-+#else
-+ fprintf(stderr, "Tclx_Init error: %s",
-+ Tcl_GetStringResult(interp));
-+#endif
- }
-
- #endif /* TCLX */
-@@ -1920,10 +1931,17 @@ void tcl_run(
- trace = (char *)Tcl_GetVar(interp, "errorInfo", 0);
-
- if (trace == NULL)
-+#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
- trace = interp->result;
-
- fprintf(stderr, "%s: TCL error @ line %d: %s\n",
- script, interp->errorLine, trace);
-+#else
-+ trace = Tcl_GetStringResult(interp);
-+
-+ fprintf(stderr, "%s: TCL error @ line %d: %s\n",
-+ script, Tcl_GetErrorLine(interp), trace);
-+#endif
- }
-
- Tcl_DeleteInterp(interp);
-diff --git a/src/scheduler.tcl/pbs_tclWrap.c b/src/scheduler.tcl/pbs_tclWrap.c
-index a85e8ff..46c1012 100644
---- a/src/scheduler.tcl/pbs_tclWrap.c
-+++ b/src/scheduler.tcl/pbs_tclWrap.c
-@@ -900,8 +900,13 @@ char *argv[];
-
- if (argc != 2)
- {
-+#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
- sprintf(interp->result,
- "%s: wrong # args: job_id", argv[0]);
-+#else
-+ sprintf(Tcl_GetStringResult(interp),
-+ "%s: wrong # args: job_id", argv[0]);
-+#endif
- return TCL_ERROR;
- }
-
-@@ -912,11 +917,19 @@ char *argv[];
- return TCL_OK;
- }
-
-+#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
- interp->result = "0";
-+#else
-+ Tcl_SetResult(interp, "0", TCL_STATIC);
-+#endif
-
- if (pbs_rerunjob_err(connector, argv[1], extend, &local_errno))
- {
-+#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
- interp->result = "-1";
-+#else
-+ Tcl_SetResult(interp, "-1", TCL_STATIC);
-+#endif
- msg = pbs_geterrmsg(connector);
- sprintf(log_buffer, "%s (%d)", msg ? msg : fail, local_errno);
- log_err(-1, argv[0], log_buffer);
diff --git a/sys-cluster/torque/files/torque-4.2-dont-mess-with-cflags.patch b/sys-cluster/torque/files/torque-4.2-dont-mess-with-cflags.patch
deleted file mode 100644
index aec54aff030f..000000000000
--- a/sys-cluster/torque/files/torque-4.2-dont-mess-with-cflags.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/configure.ac 2014-09-10 21:06:26.000000000 -0400
-+++ b/configure.ac 2017-05-23 10:43:59.051759539 -0400
-@@ -703,24 +703,6 @@
- AC_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
--if test "$DEBUG_SYMBOLS" = 'yes'; then
-- AC_MSG_RESULT([before tweak CFLAGS=$CFLAGS])
-- CFLAGS=`echo $CFLAGS | sed 's/ \?-O[[^ ]]*//g'`
-- AC_MSG_RESULT([mid tweak CFLAGS=$CFLAGS])
-- case $CFLAGS in
-- *-g*)
-- ;;
-- *)
-- if test "$CFLAGS" = ''; then
-- CFLAGS="-g"
-- else
-- CFLAGS="-g $CFLAGS"
-- fi
-- ;;
-- esac
-- AC_MSG_RESULT([after tweak CFLAGS=$CFLAGS])
--fi
-
- dnl if using gcc, we can be very strict
- AC_ARG_ENABLE(gcc_warnings, [
diff --git a/sys-cluster/torque/files/torque-4.2-use-NULL-instead-of-char0.patch b/sys-cluster/torque/files/torque-4.2-use-NULL-instead-of-char0.patch
deleted file mode 100644
index a1cb85327d71..000000000000
--- a/sys-cluster/torque/files/torque-4.2-use-NULL-instead-of-char0.patch
+++ /dev/null
@@ -1,140 +0,0 @@
---- a/src/cmds/pbsnodes.c 2015-03-17 16:43:36.000000000 -0400
-+++ b/src/cmds/pbsnodes.c 2019-02-25 12:33:37.824638386 -0500
-@@ -693,7 +693,7 @@
- /* -N n is the same as -N "" -- it clears the note */
-
- if (!strcmp(note, "n"))
-- *note = '\0';
-+ *note = NULL;
-
- if (strlen(note) > MAX_NOTE)
- {
-@@ -821,7 +821,7 @@
- {
- nodeargs = (char **)calloc(2, sizeof(char **));
- nodeargs[0] = strdup("");
-- nodeargs[1] = '\0';
-+ nodeargs[1] = NULL;
- }
- }
- }
-@@ -901,7 +901,7 @@
-
- MXMLCreateE(&DE, "Data");
-
-- for (lindex = 0;nodeargs[lindex] != '\0';lindex++)
-+ for (lindex = 0;nodeargs[lindex] != NULL;lindex++)
- {
- bstatus = statnode(con, nodeargs[lindex]);
-
-@@ -922,7 +922,7 @@
- }
- else
- {
-- for (lindex = 0;nodeargs[lindex] != '\0';lindex++)
-+ for (lindex = 0;nodeargs[lindex] != NULL;lindex++)
- {
- bstatus = statnode(con, nodeargs[lindex]);
-
-@@ -946,7 +946,7 @@
-
- /* list any node that is DOWN, OFFLINE, or UNKNOWN */
-
-- for (lindex = 0;nodeargs[lindex] != '\0';lindex++)
-+ for (lindex = 0;nodeargs[lindex] != NULL;lindex++)
- {
- bstatus = statnode(con, nodeargs[lindex]);
-
---- a/src/cmds/qsub_functions.c 2015-03-17 16:43:36.000000000 -0400
-+++ b/src/cmds/qsub_functions.c 2019-02-25 12:32:00.442982091 -0500
-@@ -542,7 +542,7 @@
- static char tmpLine[65536];
-
- /* we've reached the end */
-- if ((start == NULL) && (*tok_ptr == '\0'))
-+ if ((start == NULL) && (*tok_ptr == NULL))
- return(0);
-
- if (start != NULL)
-@@ -554,7 +554,7 @@
- return(0);
-
- if ((*curr_ptr == '=') ||
-- (*curr_ptr == '\0'))
-+ (*curr_ptr == NULL))
- {
- /* no name, fail */
- return(-1);
-@@ -574,18 +574,18 @@
-
- /* strip blanks */
- while ((*equals) && (isspace((int)*equals)))
-- *equals++ = '\0';
-+ *equals++ = NULL;
-
- if (*equals != '=')
- return (-1); /* should have found a = as first non blank */
-
-- *equals++ = '\0';
-+ *equals++ = NULL;
-
- /* skip leading white space */
- while (isspace((int)*equals) && *equals)
- equals++;
-
-- if (*equals == '\0')
-+ if (*equals == NULL)
- return(-1);
-
- *value = equals;
-@@ -872,7 +872,7 @@
- else
- {
- char *tmp_host = pbs_default();
-- if (tmp_host == '\0')
-+ if (tmp_host == NULL)
- hash_add_or_exit(mm, job_attr, ATTR_pbs_o_server, qsub_host, LOGIC_DATA);
- else
- hash_add_or_exit(mm, job_attr, ATTR_pbs_o_server, tmp_host, LOGIC_DATA);
---- a/src/include/attribute.h 2015-03-17 16:43:36.000000000 -0400
-+++ b/src/include/attribute.h 2019-02-22 16:47:40.507695453 -0500
-@@ -445,7 +445,7 @@
- extern int parse_equal_string(char *, char **, char **);
- extern char *parse_comma_string(char *,char **);
-
--#define NULL_FUNC '\0'
-+#define NULL_FUNC NULL
-
- /* other associated funtions */
- struct dynamic_string;
---- a/src/resmom/mom_main.c 2015-03-17 16:43:36.000000000 -0400
-+++ b/src/resmom/mom_main.c 2019-02-22 14:01:26.573890840 -0500
-@@ -4224,7 +4224,7 @@
- goto done;
- }
-
-- name[i] = '\0';
-+ name[i] = NULL;
-
- for (d = ret_string, resline++;*resline;)
- {
---- a/src/server/job_attr_def.c 2015-03-17 16:43:36.000000000 -0400
-+++ b/src/server/job_attr_def.c 2019-02-22 16:43:05.653007840 -0500
-@@ -1193,7 +1193,7 @@
- },
-
- /* JOB_ATR_system_start_time */
-- {ATTR_system_start_time, /* start time as encoded in the proc/pid directory */
-+ { (char *)ATTR_system_start_time, /* start time as encoded in the proc/pid directory */
- decode_l,
- encode_l,
- set_l,
-@@ -1205,7 +1205,7 @@
- PARENT_TYPE_JOB},
-
- /* JOB_ATR_nppcu */
-- {ATTR_nppcu, /* how to handle compute units (on Cray system) */
-+ { (char *)ATTR_nppcu, /* how to handle compute units (on Cray system) */
- decode_l,
- encode_l,
- set_l,
diff --git a/sys-cluster/torque/files/torque-4.2.9-tcl8.6.patch b/sys-cluster/torque/files/torque-4.2.9-tcl8.6.patch
deleted file mode 100644
index 3a2a28ce4a2b..000000000000
--- a/sys-cluster/torque/files/torque-4.2.9-tcl8.6.patch
+++ /dev/null
@@ -1,99 +0,0 @@
- src/cmds/qstat.c | 20 +++++++++++++++++++-
- src/scheduler.tcl/pbs_tclWrap.c | 13 +++++++++++++
- 2 files changed, 32 insertions(+), 1 deletion(-)
-
-diff --git a/src/cmds/qstat.c b/src/cmds/qstat.c
-index f275cf8..23414b8 100644
---- a/src/cmds/qstat.c
-+++ b/src/cmds/qstat.c
-@@ -2203,8 +2203,13 @@ tcl_init(void)
-
- if (Tcl_Init(interp) == TCL_ERROR)
- {
-+#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
- fprintf(stderr, "Tcl_Init error: %s",
- interp->result);
-+#else
-+ fprintf(stderr, "Tcl_Init error: %s",
-+ Tcl_GetStringResult(interp));
-+#endif
- }
-
- #if TCLX
-@@ -2216,8 +2221,14 @@ tcl_init(void)
- if (Tclx_Init(interp) == TCL_ERROR)
- {
- #endif
-+
-+#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
- fprintf(stderr, "Tclx_Init error: %s",
- interp->result);
-+#else
-+ fprintf(stderr, "Tclx_Init error: %s",
-+ Tcl_GetStringResult(interp));
-+#endif
- }
-
- #endif /* TCLX */
-@@ -2328,15 +2339,22 @@ void tcl_run(
-
- if (f_opt && Tcl_EvalFile(interp, script) != TCL_OK)
- {
-- char *trace;
-+ const char *trace;
-
- trace = (char *)Tcl_GetVar(interp, "errorInfo", 0);
-
- if (trace == NULL)
-+#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
- trace = interp->result;
-
- fprintf(stderr, "%s: TCL error @ line %d: %s\n",
- script, interp->errorLine, trace);
-+#else
-+ trace = Tcl_GetStringResult(interp);
-+
-+ fprintf(stderr, "%s: TCL error @ line %d: %s\n",
-+ script, Tcl_GetErrorLine(interp), trace);
-+#endif
- }
-
- Tcl_DeleteInterp(interp);
-diff --git a/src/scheduler.tcl/pbs_tclWrap.c b/src/scheduler.tcl/pbs_tclWrap.c
-index 3eea0b0..7d0d610 100644
---- a/src/scheduler.tcl/pbs_tclWrap.c
-+++ b/src/scheduler.tcl/pbs_tclWrap.c
-@@ -935,8 +935,13 @@ int PBS_ReRun(
-
- if (argc != 2)
- {
-+#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
- sprintf(interp->result,
- "%s: wrong # args: job_id", argv[0]);
-+#else
-+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
-+ "%s: wrong # args: job_id", argv[0]));
-+#endif
- return TCL_ERROR;
- }
-
-@@ -947,11 +952,19 @@ int PBS_ReRun(
- return TCL_OK;
- }
-
-+#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
- interp->result = strdup("0");
-+#else
-+ Tcl_SetResult(interp, "0", TCL_STATIC);
-+#endif
-
- if (pbs_rerunjob_err(connector, strdup(argv[1]), extend, &local_errno))
- {
-+#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
- interp->result = strdup("-1");
-+#else
-+ Tcl_SetResult(interp, "-1", TCL_STATIC);
-+#endif
- msg = pbs_geterrmsg(connector);
- sprintf(log_buffer, "%s (%d)", msg ? msg : fail, local_errno);
- log_err(-1, argv[0], log_buffer);
diff --git a/sys-cluster/torque/files/torque-6.0.4-pthreads-deux.patch b/sys-cluster/torque/files/torque-6.0.4-pthreads-deux.patch
new file mode 100644
index 000000000000..f9b7046daeac
--- /dev/null
+++ b/sys-cluster/torque/files/torque-6.0.4-pthreads-deux.patch
@@ -0,0 +1,13 @@
+Additional pthread/glibc 2.34 patch.
+
+https://bugs.gentoo.org/827474
+--- a/src/lib/Libpbs/Makefile.am
++++ b/src/lib/Libpbs/Makefile.am
+@@ -7,6 +7,7 @@ CLEANFILES = *.gcda *.gcno *.gcov
+ lib_LTLIBRARIES = libtorque.la
+
+ libtorque_la_LDFLAGS = -version-info 2:0:0
++libtorque_la_LIBADD = $(PTHREAD_LIBS)
+
+ libtorque_la_SOURCES = ../Libcsv/csv.c ../Libdis/dis.c \
+ ../Libdis/discui_.c ../Libdis/discul_.c \
diff --git a/sys-cluster/torque/metadata.xml b/sys-cluster/torque/metadata.xml
index 012610ab3874..afd1ec84a4a9 100644
--- a/sys-cluster/torque/metadata.xml
+++ b/sys-cluster/torque/metadata.xml
@@ -9,7 +9,6 @@
<flag name="autorun">Enable the AUTORUN_JOBS codebase</flag>
<flag name="cgroups">Enable pbs_mom to use linux cgroups to isolate jobs</flag>
<flag name="cpusets">Enable pbs_mom to utilize linux cpusets if available</flag>
- <flag name="drmaa">Enable the Distributed Resource Management Application API</flag>
<flag name="munge">Enable authentication via munge</flag>
<flag name="nvidia">Enable management of Nvidia GPUs</flag>
<flag name="quickcommit">Enable the QUICKCOMMIT codebase</flag>
diff --git a/sys-cluster/torque/torque-4.1.7-r2.ebuild b/sys-cluster/torque/torque-4.1.7-r2.ebuild
deleted file mode 100644
index c6ced6d96c39..000000000000
--- a/sys-cluster/torque/torque-4.1.7-r2.ebuild
+++ /dev/null
@@ -1,232 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit epatch linux-info
-
-DESCRIPTION="Resource manager and queuing system based on OpenPBS"
-HOMEPAGE="http://www.adaptivecomputing.com/products/open-source/torque"
-# TODO: hopefully moving to github tags soon
-# http://www.supercluster.org/pipermail/torquedev/2013-May/004519.html
-SRC_URI="http://www.adaptivecomputing.com/index.php?wpfb_dl=1690 -> ${P}.tar.gz"
-
-LICENSE="torque-2.5"
-SLOT="0"
-KEYWORDS="~alpha amd64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86"
-IUSE="cpusets +crypt doc drmaa munge nvidia server +syslog tk"
-
-DEPEND_COMMON="
- sys-libs/zlib
- sys-libs/readline:0=
- dev-libs/openssl:0=
- cpusets? ( sys-apps/hwloc:= )
- munge? ( sys-auth/munge )
- nvidia? ( >=x11-drivers/nvidia-drivers-275 )
- tk? (
- dev-lang/tk:0=
- dev-lang/tcl:0=
- )
- syslog? ( virtual/logger )
- !!games-util/qstat"
-
-# libncurses.so is only needed for the configure check on readline to pass
-DEPEND="${DEPEND_COMMON}
- sys-libs/ncurses:*
- !!sys-cluster/slurm"
-
-RDEPEND="${DEPEND_COMMON}
- crypt? ( net-misc/openssh )
- !crypt? ( net-misc/netkit-rsh )
- !dev-libs/uthash"
-
-# Torque should depend on dev-libs/uthash but that's pretty much impossible
-# to patch in as they ship with a broken configure such that files referenced
-# by the configure.ac and Makefile.am are missing.
-# http://www.supercluster.org/pipermail/torquedev/2014-October/004773.html
-
-pkg_setup() {
- PBS_SERVER_HOME="${PBS_SERVER_HOME:-/var/spool/${PN}}"
-
- # Find a Torque server to use. Check environment, then
- # current setup (if any), and fall back on current hostname.
- if [ -z "${PBS_SERVER_NAME}" ]; then
- if [ -f "${ROOT}${PBS_SERVER_HOME}/server_name" ]; then
- PBS_SERVER_NAME="$(<${ROOT}${PBS_SERVER_HOME}/server_name)"
- else
- PBS_SERVER_NAME=$(hostname -f)
- fi
- fi
-
- if use cpusets; then
- if ! use kernel_linux; then
- einfo
- elog " Torque currently only has support for cpusets in linux."
- elog "Assuming you didn't really want this USE flag, and ignoring its state."
- einfo
- else
- linux-info_pkg_setup
- if ! linux_config_exists || ! linux_chkconfig_present CPUSETS; then
- einfo
- elog " Torque support for cpusets will require that you recompile"
- elog "your kernel with CONFIG_CPUSETS enabled."
- einfo
- fi
- fi
- fi
-}
-
-src_prepare() {
- # Unused and causes breakage when switching from glibc to tirpc.
- # https://github.com/adaptivecomputing/torque/pull/148
- sed -i '/rpc\/rpc\.h/d' src/lib/Libnet/net_client.c || die
-
- # We install to a valid location, no need to muck with ld.so.conf
- # --without-loadlibfile is supposed to do this for us...
- sed -i '/mk_default_ld_lib_file || return 1/d' buildutils/pbs_mkdirs.in || die
-
- epatch "${FILESDIR}"/${PN}-4.1.5.1-tcl8.6.patch
-
- # 491270
- epatch "${FILESDIR}"/CVE-2013-4495.4.1.patch
-}
-
-src_configure() {
- local myconf="--with-rcp=mom_rcp"
-
- use crypt && myconf="--with-rcp=scp"
-
- econf \
- $(use_enable tk gui) \
- $(use_enable syslog) \
- $(use_enable server) \
- $(use_enable drmaa) \
- $(use_enable munge munge-auth) \
- $(use_enable nvidia nvidia-gpus) \
- $(usex kernel_linux $(use_enable cpusets cpuset) --disable-cpuset) \
- --with-server-home=${PBS_SERVER_HOME} \
- --with-environ=/etc/pbs_environment \
- --with-default-server=${PBS_SERVER_NAME} \
- --disable-gcc-warnings \
- --with-tcp-retry-limit=2 \
- --without-loadlibfile \
- ${myconf}
-}
-
-src_install() {
- local dir
-
- DOCS=( CHANGELOG README.* Release_Notes )
- use doc && DOCS+=( doc/admin_guide.ps doc/*.pdf )
-
- default
-
- # The build script isn't alternative install location friendly,
- # So we have to fix some hard-coded paths in tclIndex for xpbs* to work
- for file in $(find "${ED}" -iname tclIndex); do
- sed \
- -e "s/${ED//\// }/ /" \
- -i "${file}" || die
- done
-
- for dir in $(find "${ED}/${PBS_SERVER_HOME}" -type d); do
- keepdir "${dir#${ED}}"
- done
-
- if use server; then
- newinitd "${FILESDIR}"/pbs_server-init.d-munge pbs_server
- newinitd "${FILESDIR}"/pbs_sched-init.d pbs_sched
- fi
- newinitd "${FILESDIR}"/pbs_mom-init.d-munge pbs_mom
- newconfd "${FILESDIR}"/${PN}-conf.d-munge ${PN}
- newinitd "${FILESDIR}"/trqauthd-init.d trqauthd
- newenvd "${FILESDIR}"/${PN}-env.d 25${PN}
-}
-
-pkg_preinst() {
- if [[ -f "${ROOT}etc/pbs_environment" ]]; then
- cp "${ROOT}etc/pbs_environment" "${ED}"/etc/pbs_environment || die
- fi
-
- if use server && [[ -f "${ROOT}${PBS_SERVER_HOME}/server_priv/nodes" ]]; then
- cp \
- "${EROOT}${PBS_SERVER_HOME}/server_priv/nodes" \
- "${ED}/${PBS_SERVER_HOME}/server_priv/nodes" || die
- fi
-
- echo "${PBS_SERVER_NAME}" > "${ED}${PBS_SERVER_HOME}/server_name" || die
-
- # Fix up the env.d file to use our set server home.
- sed \
- -e "s:/var/spool/${PN}:${PBS_SERVER_HOME}:g" \
- -i "${ED}"/etc/env.d/25${PN} || die
-
- if use munge; then
- sed -i 's,\(PBS_USE_MUNGE=\).*,\11,' "${ED}"/etc/conf.d/${PN} || die
- fi
-}
-
-pkg_postinst() {
- elog " If this is the first time torque has been installed, then you are not"
- elog "ready to start the server. Please refer to the documentation located at:"
- elog "http://www.clusterresources.com/wiki/doku.php?id=torque:torque_wiki"
- echo ""
- elog " For a basic setup, you may use emerge --config ${PN}"
- echo ""
- if [[ -z "${REPLACING_VERSIONS}" ]]; then
- elog "Important 4.0+ updates"
- elog " - The on-wire protocol version has been changed."
- elog " Versions of Torque before 4.0.0 are no longer able to communicate."
- elog " - pbs_iff has been replaced by trqauthd, you will now need to add"
- elog " trqauthd to your default runlevel."
- fi
-}
-
-# root will be setup as the primary operator/manager, the local machine
-# will be added as a node and we'll create a simple queue, batch.
-pkg_config() {
- local h="$(echo "${ROOT}/${PBS_SERVER_HOME}" | sed 's:///*:/:g')"
- local rc=0
-
- ebegin "Configuring Torque"
- einfo "Using ${h} as the pbs homedir"
- einfo "Using ${PBS_SERVER_NAME} as the pbs_server"
-
- # Check for previous configuration and bail if found.
- if [ -e "${h}/server_priv/acl_svr/operators" ] \
- || [ -e "${h}/server_priv/nodes" ] \
- || [ -e "${h}/mom_priv/config" ]; then
- ewarn "Previous Torque configuration detected. Press Enter to"
- ewarn "continue or Control-C to abort now"
- read
- fi
-
- # pbs_mom configuration.
- echo "\$pbsserver ${PBS_SERVER_NAME}" > "${h}/mom_priv/config" || die
- echo "\$logevent 255" >> "${h}/mom_priv/config" || die
-
- if use server; then
- local qmgr="${EROOT}/usr/bin/qmgr -c"
- # pbs_server bails on repeated backslashes.
- if ! "${EROOT}"/usr/sbin/pbs_server -f -d "${h}" -t create; then
- eerror "Failed to start pbs_server"
- rc=1
- else
- ${qmgr} "set server operators = root@$(hostname -f)" ${PBS_SERVER_NAME} \
- && ${qmgr} "create queue batch" ${PBS_SERVER_NAME} \
- && ${qmgr} "set queue batch queue_type = Execution" ${PBS_SERVER_NAME} \
- && ${qmgr} "set queue batch started = True" ${PBS_SERVER_NAME} \
- && ${qmgr} "set queue batch enabled = True" ${PBS_SERVER_NAME} \
- && ${qmgr} "set server default_queue = batch" ${PBS_SERVER_NAME} \
- && ${qmgr} "set server resources_default.nodes = 1" ${PBS_SERVER_NAME} \
- && ${qmgr} "set server scheduling = True" ${PBS_SERVER_NAME} \
- || die
-
- "${EROOT}"/usr/bin/qterm -t quick ${PBS_SERVER_NAME} || rc=1
-
- # Add the local machine as a node.
- echo "$(hostname -f) np=1" > "${h}/server_priv/nodes" || die
- fi
- fi
- eend ${rc}
-}
diff --git a/sys-cluster/torque/torque-4.2.10-r2.ebuild b/sys-cluster/torque/torque-4.2.10-r2.ebuild
deleted file mode 100644
index 07f2642850af..000000000000
--- a/sys-cluster/torque/torque-4.2.10-r2.ebuild
+++ /dev/null
@@ -1,193 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools linux-info
-
-DESCRIPTION="Resource manager and queuing system based on OpenPBS"
-HOMEPAGE="http://www.adaptivecomputing.com/products/open-source/torque"
-# TODO: hopefully moving to github tags soon
-# http://www.supercluster.org/pipermail/torquedev/2013-May/004519.html
-#SRC_URI="http://www.adaptivecomputing.com/index.php?wpfb_dl=2849 -> ${P}.tar.gz"
-SRC_URI="https://github.com/adaptivecomputing/torque/archive/ddf5c4f40091b6157164a8846e5b60f42a5ae7f6.tar.gz -> ${P}-gh-20150517.tar.gz"
-
-LICENSE="torque-2.5"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="cpusets +crypt doc drmaa munge nvidia server +syslog tk"
-
-DEPEND_COMMON="
- sys-libs/zlib
- sys-libs/readline:0=
- dev-libs/libxml2
- dev-libs/openssl:0=
- cpusets? ( sys-apps/hwloc:= )
- munge? ( sys-auth/munge )
- nvidia? ( >=x11-drivers/nvidia-drivers-275 )
- tk? (
- dev-lang/tk:0=
- dev-lang/tcl:0=
- )
- syslog? ( virtual/logger )
- !!games-util/qstat"
-
-# libncurses.so is only needed for configure check on readline
-DEPEND="${DEPEND_COMMON}
- sys-libs/ncurses:*
- !!sys-cluster/slurm"
-
-RDEPEND="${DEPEND_COMMON}
- crypt? ( net-misc/openssh )
- !crypt? ( net-misc/netkit-rsh )
- !dev-libs/uthash"
-
-S="${WORKDIR}"/${PN}-ddf5c4f40091b6157164a8846e5b60f42a5ae7f6
-
-# Torque should depend on dev-libs/uthash but that's pretty much impossible
-# to patch in as they ship with a broken configure such that files referenced
-# by the configure.ac and Makefile.am are missing.
-# http://www.supercluster.org/pipermail/torquedev/2014-October/004773.html
-
-pkg_setup() {
- PBS_SERVER_HOME="${PBS_SERVER_HOME:-/var/spool/${PN}}"
-
- # Find a Torque server to use. Check environment, then
- # current setup (if any), and fall back on current hostname.
- if [ -z "${PBS_SERVER_NAME}" ]; then
- if [ -f "${ROOT}${PBS_SERVER_HOME}/server_name" ]; then
- PBS_SERVER_NAME="$(<${ROOT}${PBS_SERVER_HOME}/server_name)"
- else
- PBS_SERVER_NAME=$(hostname -f)
- fi
- fi
-
- if use cpusets; then
- if ! use kernel_linux; then
- einfo
- elog " Torque currently only has support for cpusets in linux."
- elog "Assuming you didn't really want this USE flag and ignoring its state."
- einfo
- else
- linux-info_pkg_setup
- if ! linux_config_exists || ! linux_chkconfig_present CPUSETS; then
- einfo
- elog " Torque support for cpusets will require that you recompile"
- elog "your kernel with CONFIG_CPUSETS enabled."
- einfo
- fi
- fi
- fi
-}
-
-src_prepare() {
- # Unused and causes breakage when switching from glibc to tirpc.
- # https://github.com/adaptivecomputing/torque/pull/148
- sed -i '/rpc\/rpc\.h/d' src/lib/Libnet/net_client.c || die
-
- # We install to a valid location, no need to muck with ld.so.conf
- # --without-loadlibfile is supposed to do this for us...
- sed -i '/mk_default_ld_lib_file || return 1/d' buildutils/pbs_mkdirs.in || die
-
- eapply "${FILESDIR}"/${PN}-4.2.9-tcl8.6.patch
- eapply "${FILESDIR}"/${PN}-4.2-dont-mess-with-cflags.patch
- eapply "${FILESDIR}"/${PN}-4.2-use-NULL-instead-of-char0.patch
- eapply_user
- mkdir -p "${S}"/m4
- eautoreconf
-}
-
-src_configure() {
- econf \
- $(use_enable tk gui) \
- $(use_enable syslog) \
- $(use_enable server) \
- $(use_enable drmaa) \
- $(use_enable munge munge-auth) \
- $(use_enable nvidia nvidia-gpus) \
- $(usex kernel_linux $(use_enable cpusets cpuset) --disable-cpuset) \
- $(usex crypt --with-rcp=scp --with-rcp=mom_rcp) \
- --with-server-home=${PBS_SERVER_HOME} \
- --with-environ=/etc/pbs_environment \
- --with-default-server=${PBS_SERVER_NAME} \
- --disable-gcc-warnings \
- --with-tcp-retry-limit=2 \
- --without-loadlibfile
-}
-
-src_install() {
- local dir
-
- DOCS=( CHANGELOG README.* Release_Notes )
- use doc && DOCS+=( doc/admin_guide.ps doc/*.pdf )
-
- default
-
- # The build script isn't alternative install location friendly,
- # So we have to fix some hard-coded paths in tclIndex for xpbs* to work
- for file in $(find "${ED}" -iname tclIndex); do
- sed \
- -e "s/${ED//\// }/ /" \
- -i "${file}" || die
- done
-
- for dir in $(find "${ED}/${PBS_SERVER_HOME}" -type d); do
- keepdir "${dir#${ED}}"
- done
-
- if use server; then
- newinitd "${FILESDIR}"/pbs_server-init.d-munge pbs_server
- newinitd "${FILESDIR}"/pbs_sched-init.d pbs_sched
- fi
- newinitd "${FILESDIR}"/pbs_mom-init.d-munge pbs_mom
- newconfd "${FILESDIR}"/${PN}-conf.d-munge ${PN}
- newinitd "${FILESDIR}"/trqauthd-init.d trqauthd
- newenvd "${FILESDIR}"/${PN}-env.d 25${PN}
-}
-
-pkg_preinst() {
- if [[ -f "${ROOT}etc/pbs_environment" ]]; then
- cp "${ROOT}etc/pbs_environment" "${ED}"/etc/pbs_environment || die
- fi
-
- if use server && [[ -f "${ROOT}${PBS_SERVER_HOME}/server_priv/nodes" ]]; then
- cp \
- "${EROOT}${PBS_SERVER_HOME}/server_priv/nodes" \
- "${ED}/${PBS_SERVER_HOME}/server_priv/nodes" || die
- fi
-
- echo "${PBS_SERVER_NAME}" > "${ED}${PBS_SERVER_HOME}/server_name" || die
-
- # Fix up the env.d file to use our set server home.
- sed \
- -e "s:/var/spool/${PN}:${PBS_SERVER_HOME}:g" \
- -i "${ED}"/etc/env.d/25${PN} || die
-
- if use munge; then
- sed -i 's,\(PBS_USE_MUNGE=\).*,\11,' "${ED}"/etc/conf.d/${PN} || die
- fi
-}
-
-pkg_postinst() {
- local showmessage=1
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- showmessage=0;
- elog "If this is the first time torque has been installed, then you are not"
- elog "ready to start the server. Please refer to the documentation located at:"
- elog "http://docs.adaptivecomputing.com/torque/${PN//./-}/help.htm#topics/1-installConfig/initializeConfigOnServer.htm"
- elog
- else
- for i in ${REPLACING_VERSIONS} ; do
- if [[ ${i} == 4* ]]; then
- showmessage=0; break;
- fi
- done
- fi
- if [[ ${showmessage} -gt 0 ]]; then
- elog "Important v4.x changes:"
- elog " - The on-wire protocol version has been changed."
- elog " Versions of Torque before 4.0.0 are no longer able to communicate."
- elog " - pbs_iff has been replaced by trqauthd, you will now need to add"
- elog " trqauthd to your default runlevel."
- fi
-}
diff --git a/sys-cluster/torque/torque-6.0.4-r2.ebuild b/sys-cluster/torque/torque-6.0.4-r2.ebuild
index ad1d843840bc..c6014ac21c1a 100644
--- a/sys-cluster/torque/torque-6.0.4-r2.ebuild
+++ b/sys-cluster/torque/torque-6.0.4-r2.ebuild
@@ -13,7 +13,7 @@ SRC_URI="https://github.com/adaptivecomputing/torque/archive/6a0b37f85c7d644e921
LICENSE="torque-2.5"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+KEYWORDS="~alpha amd64 ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
IUSE="autorun cgroups cpusets +crypt doc munge nvidia quickcommit server +syslog tk"
DEPEND_COMMON="
@@ -54,6 +54,7 @@ PATCHES=(
"${FILESDIR}"/${P}-no-openssl.patch
"${FILESDIR}"/${P}-error_buf_overflow_prevent.patch
"${WORKDIR}"/${P}-glibc-2.34-pthread.patch
+ "${FILESDIR}"/${P}-pthreads-deux.patch
)
pkg_setup() {
@@ -98,7 +99,8 @@ src_prepare() {
src_configure() {
append-cflags "-fpermissive"
- econf \
+ # Force Bash for configure as there's a lot of issues with configure.ac and such here
+ CONFIG_SHELL="${BROOT}/bin/bash" econf \
$(use_enable tk gui) \
$(use_enable tk tcl-qstat) \
$(use_enable syslog) \