diff options
author | Justin Lecher <jlec@gentoo.org> | 2013-01-10 15:13:32 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2013-01-10 15:13:32 +0000 |
commit | 4aa8147487c0d89f26d7677e19ba1f8f79199bb1 (patch) | |
tree | 399a2978e40d27d8b5c20aef9b942303c33a1fa1 /sys-cluster | |
parent | dev-lang/tcl: Don't set encoding during build (diff) | |
download | historical-4aa8147487c0d89f26d7677e19ba1f8f79199bb1.tar.gz historical-4aa8147487c0d89f26d7677e19ba1f8f79199bb1.tar.bz2 historical-4aa8147487c0d89f26d7677e19ba1f8f79199bb1.zip |
sys-cluster/torque: Version Bump and fix for tcl8.6
Package-Manager: portage-2.2.0_alpha149/cvs/Linux x86_64
Manifest-Sign-Key: 0x70EB7916
Diffstat (limited to 'sys-cluster')
-rw-r--r-- | sys-cluster/torque/ChangeLog | 11 | ||||
-rw-r--r-- | sys-cluster/torque/Manifest | 14 | ||||
-rw-r--r-- | sys-cluster/torque/files/torque-2.5.12-tcl8.6.patch | 66 | ||||
-rw-r--r-- | sys-cluster/torque/files/torque-2.5.9-tcl8.6.patch | 66 | ||||
-rw-r--r-- | sys-cluster/torque/torque-2.5.12.ebuild | 243 | ||||
-rw-r--r-- | sys-cluster/torque/torque-2.5.9.ebuild | 6 |
6 files changed, 397 insertions, 9 deletions
diff --git a/sys-cluster/torque/ChangeLog b/sys-cluster/torque/ChangeLog index 5fb2ae94f4ec..de2aa4197c4a 100644 --- a/sys-cluster/torque/ChangeLog +++ b/sys-cluster/torque/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-cluster/torque -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/ChangeLog,v 1.145 2012/12/13 16:21:38 jlec Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/ChangeLog,v 1.146 2013/01/10 15:13:31 jlec Exp $ + +*torque-2.5.12 (10 Jan 2013) + + 10 Jan 2013; Justin Lecher <jlec@gentoo.org> torque-2.5.9.ebuild, + +files/torque-2.5.9-tcl8.6.patch, +torque-2.5.12.ebuild, + +files/torque-2.5.12-tcl8.6.patch: + Version Bump and fix for tcl8.6 13 Dec 2012; Justin Lecher <jlec@gentoo.org> torque-2.5.9.ebuild, torque-3.0.6.ebuild, metadata.xml: diff --git a/sys-cluster/torque/Manifest b/sys-cluster/torque/Manifest index 3235f3871afa..c4e769bac756 100644 --- a/sys-cluster/torque/Manifest +++ b/sys-cluster/torque/Manifest @@ -10,23 +10,27 @@ AUX pbs_mom-init.d-munge 1148 SHA256 c8c5dc40960512f8a0410f50114d3d71f92c1781134 AUX pbs_sched-init.d 1164 SHA256 07924a441544c0b72283e546fa5b17bb422cfeb9421fcafafedaa997268696dc SHA512 2bf9371bde2cd43c452b765498e8f5bd791c4ba93c8142a89a594ae14447c95eaeec0e87bca8877817c2e2d162cb70f8a64d9add32c175f9fb156b65964b9aeb WHIRLPOOL 16e13e0d618fef0a2d69f4b009ff2cccdc918256fe3436a3d86b83ed9dad26a9a01c6ccd9eaf285647243de8b79179d8470afdbc7b492159bfae3b608fc2db0a AUX pbs_server-init.d 1614 SHA256 85e82e2dd594c3e8beb11d95ccf8df9e2df576d9337f4b02f7569eef9c3c1b9a SHA512 97cc1eeb3ff6fbcd89360e10771a2ded3a691878b6878aa4b06cccf6a42e96391af5466bd8e33624244eeaef00a374a67755bbf800ecb76d9cd20720e543fbaa WHIRLPOOL bfae7436e6bbdbe9b0a31f1f5854bf67b176755813916537c7c37f16e3b567f6eaddcf3f398f5b540d6106b05b0f9160b56c843d605ef90ba2c23c09001b89fd AUX pbs_server-init.d-munge 1688 SHA256 13d35f2a73fd09100a2932f6c6e4ac0befc7524769d2a20e7153e4fac6adff94 SHA512 9ec9f40f850bf917831e9cfb9ad62af7a2cf163bfb03033c5a9b34feb58a5a5564e05f181a46d17f48f130fc4f52a210ea314e82dbdc1ed6377e99196a9a2807 WHIRLPOOL 5244dccff02e8ffd3a015bc371fabd0f910068d09950f1e5528b3f0dace260f0a99def906be82b6e5365d97f399e89f3d918dd666fcc9c1795d661acae6f23aa +AUX torque-2.5.12-tcl8.6.patch 1878 SHA256 5ded316ced2b7dddd20fab320af61539c8f297ece8e3af0ac16d50a167c3b4c4 SHA512 1687c00c9fdbe4215a16197177d287854569d9f527847a3f7641a2028f3669e7b4dcd146d7320894c9435c0934ba9a50f379dd4262d982a805e427c8b8d218c1 WHIRLPOOL 8619d8189d833b4443239d912abb3570c2d499f7c552b491806447f8368c588b4e278dd126c6f9ca9d6a0d99f06ad99b15e90771c4a75d2d503e55d002bfc10d +AUX torque-2.5.9-tcl8.6.patch 1878 SHA256 5ded316ced2b7dddd20fab320af61539c8f297ece8e3af0ac16d50a167c3b4c4 SHA512 1687c00c9fdbe4215a16197177d287854569d9f527847a3f7641a2028f3669e7b4dcd146d7320894c9435c0934ba9a50f379dd4262d982a805e427c8b8d218c1 WHIRLPOOL 8619d8189d833b4443239d912abb3570c2d499f7c552b491806447f8368c588b4e278dd126c6f9ca9d6a0d99f06ad99b15e90771c4a75d2d503e55d002bfc10d AUX torque-conf.d 649 SHA256 4139da44a55dbcb4a8227fd0aedede8e091971fd63c0e08644712f4a91e7b174 SHA512 b82f6c1d661bed03a32c3761530c4b303715167a317e467371091b11d3ae0e19e9784b1588577ee5f65397cb0699818ed5f621aeb66d3f2d218df12d0cf39bde WHIRLPOOL 0f0db60c037400ce87013d7639a5e126b65388e914e1f3bde81548ebc1e8fcefb17972c4deec03509973973a263c5006856699d3f51fad0133b8428e13e2e04c AUX torque-conf.d-munge 784 SHA256 7b8e47737211fd0d05dcc7938021ea5dbb1575010c53075440ef0b6b5d43d8b1 SHA512 a78634a6f2bdf3c24e8c99d3cd7a9634daa32d69244a9ddfcc26199f4d04e901abbfa79ad057f5a4e4c492c9e21bc0c65edd8465ac6935fb7c67c8c639e75d68 WHIRLPOOL 90ed407a5a98fb7b4509610c3c23dd1d38566886e4b02fa4db4a9708f8c45b500369e782c25b7b9f02fc685bdcb965049e681c829bad58206729690e6eeadbb9 AUX torque-env.d 240 SHA256 d04eab3b1314645ee2014c718c4cf79ca74950dee1357d814b85c9faa5ef6002 SHA512 275ce5ccf9f138bcee504a9996c9d838cd34714d352d4b7ac2d631d0fca662bf38a2ef7e8745605d9b3847049015e0791c937340cfdacbf44800482ce73bb042 WHIRLPOOL b7cdc4d6752d00b315fb369f6382e1a6684c1cb8a3486545bd406270ed09811936c2735755fc01175fceed0422139e5d7d8dcd67868e2e40c8ebbb406c2eec57 DIST torque-2.3.13.tar.gz 5466720 SHA256 18dcff32ae341281f83e0154f6e926583096ff57ec56626382b190dacc1c4054 DIST torque-2.4.16.tar.gz 5705768 SHA256 48b1344e13baf974053dbd2faea3e2d24bb6ea8d785805d78623ae06747c0a0d SHA512 481d76b08f4d22704f858d490fd7cd1f8be2d41e2b5969df299c50f0acdf6a1763be2d0debb8a6bd77bd8b9747b9c3c666d701b2b75d8aaf150e10c1081c3be5 WHIRLPOOL 6e89a4e9ac3fd7fdf8b3d38568302a02bfb1aea0203786bade4bb03aaa2fda7f4bbfb2664be5d203d6984f5676980e77035140f41bf00065bd27e9acd38f227c +DIST torque-2.5.12.tar.gz 5862988 SHA256 436b4d84464e3be0538a4dc0a657b5ae113da6b429d449261e95e13a2a96316b SHA512 12615e412bf90b4248f76e28627ece21116969e4f009629598482ec4432a5e8b6b10ce695e3abc1e3ac43fa2325b5e04b176316ef3c21e4795cb610101f9afae WHIRLPOOL 57b636b34fd72967304babe11340852c0d06519d60705ac088483831b688517104a7ef064dd7b0375cfc35f093858754f65a9f4fd026a65ead85d0544323d682 DIST torque-2.5.9.tar.gz 5853931 SHA256 c68beb4b4e24042e4a8f4d84226e5d91aeb09a3d700d00f2c476559313597fe9 SHA512 b045f96d9a07d47f45254abd26f730b641725cd0ff10397e4514ce52b9dfa4c9d8141344062774c99903ebd26794a65616c166916b3904d20801a59a21b56b72 WHIRLPOOL 214ff277e5521baea83a3bbc06ad3900a4f3f0fbecacc736dc83ce51e7d24781a74bed07b8d80949e232a00995f77297ddda124edb01132f9aa806c53519dd65 DIST torque-3.0.6.tar.gz 5888678 SHA256 f76736d780fc0f8ac73c54d586b4d15704e37cf191649b748b07f660186642b3 SHA512 6776302d797c718169daeb07efa31f77779d546ac6cf33edea98cd56ce800ab2547b55a8384a627f14d61abb7144b464a10a40936943b62bc4cc70823eec599f WHIRLPOOL 4950176f24e99e29d75d9808d5e223d90a2d0f1a36f7fc303506ef99e8012eb6c070a3674bbf3641c4e1dc3bbb87bb3670aa3a0ee1c957658c3f3d4c88fbb864 EBUILD torque-2.3.13.ebuild 7761 SHA256 d628682ff14defd39cb4bd302bfc765b2355da5e1654c35e3290e1cd67c64df2 SHA512 c87f53e79cdee43c6cbf4f22521cb1a05d00d339423b10f237b9229f9474082f791f9670c885373040a850574e9909a05d69596f23959d1e8822643edd45997e WHIRLPOOL 6c5c84c5c769aa1043f618d6b1fa130ea33d10d410d3d9fc1aa9016f03275db3dbbd375f19128c60ca34bc5213fde67390b85f3133b75f0ee73ac101f1de6d9d EBUILD torque-2.4.16.ebuild 7693 SHA256 9d8237aa82be7bada391f7523d14077d84913a1edd02f7264a794d277a3dcc77 SHA512 168c0c04968436b73fb451e46955a19776c6eb2ca9c55f996cb4e2df7d72c6640e878ab887c660e1d1073d41dc83633ea14be33b5cb900de41e4d9a0a35359d0 WHIRLPOOL a4aeecb97453b01ea74d13b0128fa07d9aab500a8941a98a625c97dc0d364595fbc84fdf0d6890050bdea9ce6c709980c4d8fad29f7c65b121968c44399527a0 -EBUILD torque-2.5.9.ebuild 7273 SHA256 344785f01b4017000fdf7963386562dc9a535f1e20be4ae0b27d601908923409 SHA512 72186f4fdfb97cc089a28e1bd1ffa7ec66cf3efe0125257e4f8b63de5bab7fe435463512ad854263df20920c70089bddd8ccf60c62de9ca789a21b1ae677a630 WHIRLPOOL ae07cb51c80ed20ec8845dbeb74f8d79f666eb8863f5eae295e136a8ff7ab0a561757775a883548e6dbdc50c236070491c606929ebb40326d0fff657af13f083 +EBUILD torque-2.5.12.ebuild 7435 SHA256 0e9b43103150510dcd4f6e22b96efee0811523face188d4b46fc087a8070bd4c SHA512 a56b92fa7c89c9e08f895b03d38beea19d2110bef4a0f2ac9275c141eb2f072cbb9587d001029a7fad85372afa958843ff865122aa87e9fc84198b5f7501f778 WHIRLPOOL 5ea55b264f81281fe2c0d45039f6280ad6534bbd9ee5b3dfb094cac348ef49ddb7633075ed61ec64e1eb31038e2d47ae10b05a3ae8e6c9b91c888f205c406846 +EBUILD torque-2.5.9.ebuild 7318 SHA256 f1637043f302d1056f2b9ef59e4d5b91da25f3242268291dbd4f1612a192af32 SHA512 3f1d1f28855baa6b9d607a50dc8d0a03c86c488ba1d17206f220347343b756e5fa57a13565d9da0d42e2c10e8f06067f8a6f993f86b81e819d46f3ca8c293aec WHIRLPOOL 795e053fd27ea9c5b08ed3542945856d1acd0351b3e7fecac77bd0c882a446fe0f5f162e635711935a0023b696d4a5ece4d29b2925c1117dc997cbb4dc400276 EBUILD torque-3.0.6.ebuild 7925 SHA256 5a82f1e7a2011f43e2f79059fde7b219f8d94b6d314e27cdd67ab0110b3a1726 SHA512 80ebdcd996cf61907adbb6a4ad229e22803fd082df4e52f97875a613b8699682dab83fcf7c1bf0411441edafba345e240cc650e6c85a9f9f58d351d420024131 WHIRLPOOL 072d453c8c6a6c2ec66a71cac14bf4e2c2ef6d41ce6a38fbcaf1bd237ee2168026466cecef0e9a33e61cef7a8ec8c0abaa04110babe7393d74ddf49076eea0fa -MISC ChangeLog 24135 SHA256 8563dde033f06f11cf221f9cfb5ff44589f4ebbfcebc80e29e2c55851b015a67 SHA512 9be6196ead7e864c003494697f2e9c2cbae90be8d55d32fba7b0c3cb7a3418f06009d294feee2bf7998e171bf3aed11a4f413e209e69802bae30696ce75a7145 WHIRLPOOL af2b5f9d27a0007397dbd1926f529d2e7ab5ee6491d96a2c0e6da743c8d2da8177cc9b69e0773313354151bf970ea8e7f9cbc30501c782fd8ecfdbaad23505b1 +MISC ChangeLog 24364 SHA256 72432c8af15e5d1588f35d3143a4018e43b81d1630a6e4deccd3710dda80b361 SHA512 8d5a1e97ffe2f3287c8244233700948d7af9fe0ef6900138cff654ab4dc8b9302036f0cb7386ca839199e1c6e638426af1e21aa265d5d0add2a04d98fddcfe13 WHIRLPOOL d726af41bf2739e8c2ae0ec859a265cf81ebb076a7a52f4a8774efed193b34f594d819c489fdeebcc39b69c1bfc61e9bfddd3379be8c31a40067562fff9d883c MISC metadata.xml 628 SHA256 10fab1886476e44fabbcda6e7dbbc8452d07cb0de0cefcf6e594312dfe89f7af SHA512 d1c78c4247f209eda60a61c9c611c4a4b87d52f85b112a78b96a4dee6f3cd660aef49547323074d69ffce8c1b916c3914f00282781e2f68f76658e6f9ac7ff9b WHIRLPOOL 243373e602f92a256118e6bee6c3071d5894caf3d53a663abee6929a310cf306b15a6a7bd2a0e76882cfe36cd4e8b6c06bb9e12f49f678d085883d61d4a84cf9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iEYEAREIAAYFAlDKAJMACgkQgAnW8HDreRb/+QCfXP5rfIVkrV2gYSies9sRkn85 -8aQAoJwHUubTlMxxVu7ZAK+zpWqZ5yXd -=47EA +iEYEAREIAAYFAlDu2pwACgkQgAnW8HDreRbeGACg0WXchYE6jJcrqV+LpARk/UZQ +PWoAoJ09EJllj7EEtjsDT5TOHdsMmRCH +=34W5 -----END PGP SIGNATURE----- diff --git a/sys-cluster/torque/files/torque-2.5.12-tcl8.6.patch b/sys-cluster/torque/files/torque-2.5.12-tcl8.6.patch new file mode 100644 index 000000000000..c8ce7191cf65 --- /dev/null +++ b/sys-cluster/torque/files/torque-2.5.12-tcl8.6.patch @@ -0,0 +1,66 @@ + src/cmds/qstat.c | 8 ++++---- + src/scheduler.tcl/pbs_tclWrap.c | 6 +++--- + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/src/cmds/qstat.c b/src/cmds/qstat.c +index 5f85de7..a782151 100644 +--- a/src/cmds/qstat.c ++++ b/src/cmds/qstat.c +@@ -1856,7 +1856,7 @@ tcl_init(void) + if (Tcl_Init(interp) == TCL_ERROR) + { + fprintf(stderr, "Tcl_Init error: %s", +- interp->result); ++ Tcl_GetStringResult(interp)); + } + + #if TCLX +@@ -1869,7 +1869,7 @@ tcl_init(void) + { + #endif + fprintf(stderr, "Tclx_Init error: %s", +- interp->result); ++ Tcl_GetStringResult(interp)); + } + + #endif /* TCLX */ +@@ -1980,10 +1980,10 @@ void tcl_run( + trace = (char *)Tcl_GetVar(interp, "errorInfo", 0); + + if (trace == NULL) +- trace = interp->result; ++ trace = Tcl_GetStringResult(interp); + + fprintf(stderr, "%s: TCL error @ line %d: %s\n", +- script, interp->errorLine, trace); ++ script, Tcl_GetErrorLine(interp), trace); + } + + Tcl_DeleteInterp(interp); +diff --git a/src/scheduler.tcl/pbs_tclWrap.c b/src/scheduler.tcl/pbs_tclWrap.c +index e859ae5..194c24b 100644 +--- a/src/scheduler.tcl/pbs_tclWrap.c ++++ b/src/scheduler.tcl/pbs_tclWrap.c +@@ -924,7 +924,7 @@ char *argv[]; + + if (argc != 2) + { +- sprintf(interp->result, ++ sprintf(Tcl_GetStringResult(interp), + "%s: wrong # args: job_id", argv[0]); + return TCL_ERROR; + } +@@ -936,11 +936,11 @@ char *argv[]; + return TCL_OK; + } + +- interp->result = "0"; ++ Tcl_SetResult(interp, "0", TCL_STATIC); + + if (pbs_rerunjob(connector, argv[1], extend)) + { +- interp->result = "-1"; ++ Tcl_SetResult(interp, "-1", TCL_STATIC); + msg = pbs_geterrmsg(connector); + sprintf(log_buffer, "%s (%d)", msg ? msg : fail, pbs_errno); + log_err(-1, argv[0], log_buffer); diff --git a/sys-cluster/torque/files/torque-2.5.9-tcl8.6.patch b/sys-cluster/torque/files/torque-2.5.9-tcl8.6.patch new file mode 100644 index 000000000000..c8ce7191cf65 --- /dev/null +++ b/sys-cluster/torque/files/torque-2.5.9-tcl8.6.patch @@ -0,0 +1,66 @@ + src/cmds/qstat.c | 8 ++++---- + src/scheduler.tcl/pbs_tclWrap.c | 6 +++--- + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/src/cmds/qstat.c b/src/cmds/qstat.c +index 5f85de7..a782151 100644 +--- a/src/cmds/qstat.c ++++ b/src/cmds/qstat.c +@@ -1856,7 +1856,7 @@ tcl_init(void) + if (Tcl_Init(interp) == TCL_ERROR) + { + fprintf(stderr, "Tcl_Init error: %s", +- interp->result); ++ Tcl_GetStringResult(interp)); + } + + #if TCLX +@@ -1869,7 +1869,7 @@ tcl_init(void) + { + #endif + fprintf(stderr, "Tclx_Init error: %s", +- interp->result); ++ Tcl_GetStringResult(interp)); + } + + #endif /* TCLX */ +@@ -1980,10 +1980,10 @@ void tcl_run( + trace = (char *)Tcl_GetVar(interp, "errorInfo", 0); + + if (trace == NULL) +- trace = interp->result; ++ trace = Tcl_GetStringResult(interp); + + fprintf(stderr, "%s: TCL error @ line %d: %s\n", +- script, interp->errorLine, trace); ++ script, Tcl_GetErrorLine(interp), trace); + } + + Tcl_DeleteInterp(interp); +diff --git a/src/scheduler.tcl/pbs_tclWrap.c b/src/scheduler.tcl/pbs_tclWrap.c +index e859ae5..194c24b 100644 +--- a/src/scheduler.tcl/pbs_tclWrap.c ++++ b/src/scheduler.tcl/pbs_tclWrap.c +@@ -924,7 +924,7 @@ char *argv[]; + + if (argc != 2) + { +- sprintf(interp->result, ++ sprintf(Tcl_GetStringResult(interp), + "%s: wrong # args: job_id", argv[0]); + return TCL_ERROR; + } +@@ -936,11 +936,11 @@ char *argv[]; + return TCL_OK; + } + +- interp->result = "0"; ++ Tcl_SetResult(interp, "0", TCL_STATIC); + + if (pbs_rerunjob(connector, argv[1], extend)) + { +- interp->result = "-1"; ++ Tcl_SetResult(interp, "-1", TCL_STATIC); + msg = pbs_geterrmsg(connector); + sprintf(log_buffer, "%s (%d)", msg ? msg : fail, pbs_errno); + log_err(-1, argv[0], log_buffer); diff --git a/sys-cluster/torque/torque-2.5.12.ebuild b/sys-cluster/torque/torque-2.5.12.ebuild new file mode 100644 index 000000000000..8e01eaaf0b1c --- /dev/null +++ b/sys-cluster/torque/torque-2.5.12.ebuild @@ -0,0 +1,243 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/torque-2.5.12.ebuild,v 1.1 2013/01/10 15:13:31 jlec Exp $ + +EAPI=4 + +inherit autotools-utils eutils flag-o-matic linux-info + +DESCRIPTION="Resource manager and queuing system based on OpenPBS" +HOMEPAGE="http://www.adaptivecomputing.com/products/torque.php" +SRC_URI="http://www.adaptivecomputing.com/resources/downloads/${PN}/${P}.tar.gz" + +LICENSE="torque-2.5" + +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="cpusets +crypt doc drmaa kernel_linux munge server static-libs +syslog threads tk xml" + +# ed is used by makedepend-sh +DEPEND_COMMON="sys-libs/ncurses + sys-libs/readline + munge? ( sys-auth/munge ) + tk? ( dev-lang/tk ) + syslog? ( virtual/logger ) + !games-util/qstat" + +DEPEND="${DEPEND_COMMON} + sys-apps/ed + !sys-cluster/slurm" + +RDEPEND="${DEPEND_COMMON} + crypt? ( net-misc/openssh ) + !crypt? ( net-misc/netkit-rsh )" + +DOCS=( Release_Notes ) + +PATCHES=( "${FILESDIR}"/${P}-tcl8.6.patch ) + +AUTOTOOLS_IN_SOURCE_BUILD=1 + +pkg_setup() { + PBS_SERVER_HOME="${PBS_SERVER_HOME:-/var/spool/torque}" + + # 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 + + USE_CPUSETS="--disable-cpuset" + 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." + einfo + else + linux-info_pkg_setup + einfo + elog " Torque support for cpusets is still in development, you may" + elog "wish to disable it for production use." + einfo + 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 + USE_CPUSETS="--enable-cpuset" + fi + fi +} + +#src_prepare() { +# append-cflags -DUSE_INTERP_RESULT +# autotools-utils_src_prepare +#} + +src_configure() { + local myeconfargs=( --with-rcp=mom_rcp ) + + use crypt && myeconfargs+=( --with-rcp=scp ) + + myeconfargs+=( + $(use_enable tk gui) + $(use_enable syslog) + $(use_enable server) + $(use_enable drmaa) + $(use_enable threads high-availability) + $(use_enable xml server-xml) + $(use_enable munge munge-auth) + --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 + ${USE_CPUSETS} + ) + autotools-utils_src_configure +} + +# WARNING +# OpenPBS is extremely stubborn about directory permissions. Sometimes it will +# just fall over with the error message, but in some spots it will just ignore +# you and fail strangely. Likewise it also barfs on our .keep files! +pbs_createspool() { + local root="$1" + local s="$(dirname "${PBS_SERVER_HOME}")" + local h="${PBS_SERVER_HOME}" + local sp="${h}/server_priv" + einfo "Building spool directory under ${D}${h}" + local a d m + local dir_spec=" + 0755:${h}/aux 0700:${h}/checkpoint + 0755:${h}/mom_logs 0751:${h}/mom_priv 0751:${h}/mom_priv/jobs + 1777:${h}/spool 1777:${h}/undelivered" + + if use server; then + dir_spec="${dir_spec} 0755:${h}/sched_logs + 0755:${h}/sched_priv/accounting 0755:${h}/server_logs + 0750:${h}/server_priv 0755:${h}/server_priv/accounting + 0750:${h}/server_priv/acl_groups 0750:${h}/server_priv/acl_hosts + 0750:${h}/server_priv/acl_svr 0750:${h}/server_priv/acl_users + 0750:${h}/server_priv/jobs 0750:${h}/server_priv/queues" + fi + + for a in ${dir_spec}; do + d="${a/*:}" + m="${a/:*}" + if [[ ! -d "${root}${d}" ]]; then + install -d -m${m} "${root}${d}" || die + else + chmod ${m} "${root}${d}" || die + fi + # (#149226) If we're running in src_*, then keepdir + if [[ "${root}" = "${D}" ]]; then + keepdir ${d} + fi + done +} + +src_install() { + # Make directories first + pbs_createspool "${D}" + + autotools-utils_src_install + + use doc && dodoc doc/admin_guide.ps doc/*.pdf + + # 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 "${D}" -iname tclIndex`; do + sed -e "s/${D//\// }/ /" "${file}" > "${file}.new" + mv "${file}.new" "${file}" || die + 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}"/torque-conf.d-munge torque + newenvd "${FILESDIR}"/torque-env.d 25torque +} + +pkg_preinst() { + if [[ -f "${ROOT}etc/pbs_environment" ]]; then + cp "${ROOT}etc/pbs_environment" "${D}"/etc/pbs_environment || die + fi + + echo "${PBS_SERVER_NAME}" > "${D}${PBS_SERVER_HOME}/server_name" || die + + # Fix up the env.d file to use our set server home. + sed -i \ + "s:/var/spool/torque:${PBS_SERVER_HOME}:g" "${D}"/etc/env.d/25torque \ + || die + + if use munge; then + sed -i 's,\(PBS_USE_MUNGE=\).*,\11,' "${D}"etc/conf.d/torque || die + fi +} + +pkg_postinst() { + pbs_createspool "${ROOT}" + 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}" +} + +# 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="${ROOT}/usr/bin/qmgr -c" + # pbs_server bails on repeated backslashes. + if ! "${ROOT}"/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 + + "${ROOT}"/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-2.5.9.ebuild b/sys-cluster/torque/torque-2.5.9.ebuild index 542662f3b940..88ce41307a1e 100644 --- a/sys-cluster/torque/torque-2.5.9.ebuild +++ b/sys-cluster/torque/torque-2.5.9.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/torque-2.5.9.ebuild,v 1.5 2012/12/13 16:21:38 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/torque-2.5.9.ebuild,v 1.6 2013/01/10 15:13:31 jlec Exp $ EAPI=4 @@ -34,6 +34,8 @@ RDEPEND="${DEPEND_COMMON} DOCS=( Release_Notes ) +PATCHES=( "${FILESDIR}"/${P}-tcl8.6.patch ) + pkg_setup() { PBS_SERVER_HOME="${PBS_SERVER_HOME:-/var/spool/torque}" |