1 |
commit: a69a6f22169f6190713f6202f3a068d88fbaeebd |
2 |
Author: Marco Scardovi <mscardovi <AT> icloud <DOT> com> |
3 |
AuthorDate: Wed Dec 28 00:34:05 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 28 21:00:55 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a69a6f22 |
7 |
|
8 |
sys-cluster/torque: revbump, fix .la error |
9 |
|
10 |
Closes: https://bugs.gentoo.org/852089 |
11 |
|
12 |
Signed-off-by: Marco Scardovi <mscardovi <AT> icloud.com> |
13 |
Closes: https://github.com/gentoo/gentoo/pull/28868 |
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
sys-cluster/torque/torque-6.0.4-r3.ebuild | 200 ++++++++++++++++++++++++++++++ |
17 |
1 file changed, 200 insertions(+) |
18 |
|
19 |
diff --git a/sys-cluster/torque/torque-6.0.4-r3.ebuild b/sys-cluster/torque/torque-6.0.4-r3.ebuild |
20 |
new file mode 100644 |
21 |
index 000000000000..6799806e325e |
22 |
--- /dev/null |
23 |
+++ b/sys-cluster/torque/torque-6.0.4-r3.ebuild |
24 |
@@ -0,0 +1,200 @@ |
25 |
+# Copyright 1999-2022 Gentoo Authors |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=8 |
29 |
+ |
30 |
+MY_COMMIT="6a0b37f85c7d644e9217cbab1542792d646f59a6" |
31 |
+inherit autotools flag-o-matic linux-info toolchain-funcs |
32 |
+ |
33 |
+DESCRIPTION="Resource manager and queuing system based on OpenPBS" |
34 |
+HOMEPAGE="http://www.adaptivecomputing.com/products/open-source/torque" |
35 |
+SRC_URI=" |
36 |
+ https://github.com/adaptivecomputing/torque/archive/${MY_COMMIT}.tar.gz -> ${P}-gh-20170829.tar.gz |
37 |
+ https://dev.gentoo.org/~juippis/distfiles/tmp/torque-6.0.4-gcc7.patch |
38 |
+ https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-glibc-2.34-pthread.patch.bz2 |
39 |
+" |
40 |
+ |
41 |
+LICENSE="torque-2.5" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" |
44 |
+IUSE="autorun cgroups cpusets +crypt doc munge nvidia quickcommit server +syslog tk" |
45 |
+ |
46 |
+DEPEND_COMMON=" |
47 |
+ sys-libs/zlib |
48 |
+ sys-libs/readline:0= |
49 |
+ dev-libs/libxml2 |
50 |
+ dev-libs/boost |
51 |
+ cpusets? ( sys-apps/hwloc:= ) |
52 |
+ munge? ( sys-auth/munge ) |
53 |
+ nvidia? ( >=x11-drivers/nvidia-drivers-275 ) |
54 |
+ tk? ( |
55 |
+ dev-lang/tk:0= |
56 |
+ dev-lang/tcl:0= |
57 |
+ ) |
58 |
+ syslog? ( virtual/logger ) |
59 |
+ !!games-util/qstat |
60 |
+" |
61 |
+ |
62 |
+# libncurses.so is only needed for configure check on readline |
63 |
+DEPEND=" |
64 |
+ ${DEPEND_COMMON} |
65 |
+ sys-libs/ncurses:* |
66 |
+ !!sys-cluster/slurm |
67 |
+" |
68 |
+ |
69 |
+RDEPEND=" |
70 |
+ ${DEPEND_COMMON} |
71 |
+ crypt? ( net-misc/openssh ) |
72 |
+ !crypt? ( net-misc/netkit-rsh ) |
73 |
+ !dev-libs/uthash |
74 |
+" |
75 |
+ |
76 |
+# Torque should depend on dev-libs/uthash but that's pretty much impossible |
77 |
+# to patch in as they ship with a broken configure such that files referenced |
78 |
+# by the configure.ac and Makefile.am are missing. |
79 |
+# http://www.supercluster.org/pipermail/torquedev/2014-October/004773.html |
80 |
+ |
81 |
+S="${WORKDIR}"/${PN}-6a0b37f85c7d644e9217cbab1542792d646f59a6 |
82 |
+ |
83 |
+PATCHES=( |
84 |
+ "${DISTDIR}"/${P}-gcc7.patch |
85 |
+ "${FILESDIR}"/${PN}-6.0.3-fix-emptystring-comparison.patch |
86 |
+ "${FILESDIR}"/${P}-no-openssl.patch |
87 |
+ "${FILESDIR}"/${P}-error_buf_overflow_prevent.patch |
88 |
+ "${WORKDIR}"/${P}-glibc-2.34-pthread.patch |
89 |
+ "${FILESDIR}"/${P}-pthreads-deux.patch |
90 |
+) |
91 |
+ |
92 |
+pkg_setup() { |
93 |
+ PBS_SERVER_HOME="${PBS_SERVER_HOME:-/var/spool/${PN}}" |
94 |
+ |
95 |
+ # Find a Torque server to use. Check environment, then |
96 |
+ # current setup (if any), and fall back on current hostname. |
97 |
+ if [[ -z "${PBS_SERVER_NAME}" ]]; then |
98 |
+ if [ -f "${EROOT}/${PBS_SERVER_HOME}/server_name" ]; then |
99 |
+ PBS_SERVER_NAME="$(<${EROOT}/${PBS_SERVER_HOME}/server_name)" |
100 |
+ else |
101 |
+ PBS_SERVER_NAME=$(hostname -f) |
102 |
+ fi |
103 |
+ fi |
104 |
+ |
105 |
+ if use cpusets || use cgroups; then |
106 |
+ if ! use kernel_linux; then |
107 |
+ einfo |
108 |
+ elog " Torque currently only has support for cpusets and cgroups in linux." |
109 |
+ elog "Assuming you didn't really want this USE flag and ignoring its state." |
110 |
+ einfo |
111 |
+ else |
112 |
+ linux-info_pkg_setup |
113 |
+ if ! linux_config_exists || ! linux_chkconfig_present CPUSETS; then |
114 |
+ einfo |
115 |
+ elog " Torque support for cpusets will require that you recompile" |
116 |
+ elog "your kernel with CONFIG_CPUSETS enabled." |
117 |
+ einfo |
118 |
+ fi |
119 |
+ fi |
120 |
+ fi |
121 |
+} |
122 |
+ |
123 |
+src_prepare() { |
124 |
+ default |
125 |
+ # We install to a valid location, no need to muck with ld.so.conf |
126 |
+ # --without-loadlibfile is supposed to do this for us... |
127 |
+ sed -i '/mk_default_ld_lib_file || return 1/d' buildutils/pbs_mkdirs.in || die |
128 |
+ eautoreconf |
129 |
+} |
130 |
+ |
131 |
+src_configure() { |
132 |
+ append-cflags "-fpermissive" |
133 |
+ |
134 |
+ # Force Bash for configure as there's a lot of issues with configure.ac and such here |
135 |
+ CONFIG_SHELL="${BROOT}/bin/bash" econf \ |
136 |
+ $(use_enable tk gui) \ |
137 |
+ $(use_enable tk tcl-qstat) \ |
138 |
+ $(use_enable syslog) \ |
139 |
+ $(use_enable server) \ |
140 |
+ --disable-drmaa \ |
141 |
+ $(use_enable munge munge-auth) \ |
142 |
+ $(use_enable nvidia nvidia-gpus) \ |
143 |
+ $(usex crypt "--with-rcp=scp" "--with-rcp=mom_rcp") \ |
144 |
+ $(usex kernel_linux $(use_enable cpusets cpuset) --disable-cpuset) \ |
145 |
+ $(usex kernel_linux $(use_enable cgroups) --disable-cgroups) \ |
146 |
+ $(use_enable autorun) \ |
147 |
+ $(use_enable quickcommit) \ |
148 |
+ --with-server-home=${PBS_SERVER_HOME} \ |
149 |
+ --with-environ=/etc/pbs_environment \ |
150 |
+ --with-default-server=${PBS_SERVER_NAME} \ |
151 |
+ --disable-gcc-warnings \ |
152 |
+ --disable-silent-rules \ |
153 |
+ --with-tcp-retry-limit=2 \ |
154 |
+ --without-loadlibfile |
155 |
+} |
156 |
+ |
157 |
+src_compile() { |
158 |
+ # The .c files are C++, and $(CC) is misused. |
159 |
+ emake CC="$(tc-getCXX)" |
160 |
+} |
161 |
+ |
162 |
+src_install() { |
163 |
+ local dir |
164 |
+ |
165 |
+ DOCS=( CHANGELOG README.* Release_Notes ) |
166 |
+ use doc && DOCS+=( doc/admin_guide.ps doc/*.pdf ) |
167 |
+ |
168 |
+ default |
169 |
+ |
170 |
+ # The build script isn't alternative install location friendly, |
171 |
+ # So we have to fix some hard-coded paths in tclIndex for xpbs* to work |
172 |
+ for file in $(find "${ED}" -iname tclIndex); do |
173 |
+ sed \ |
174 |
+ -e "s/${ED//\// }/ /" \ |
175 |
+ -i "${file}" || die |
176 |
+ done |
177 |
+ |
178 |
+ for dir in $(find "${ED}/${PBS_SERVER_HOME}" -type d); do |
179 |
+ keepdir "${dir#${ED}}" |
180 |
+ done |
181 |
+ |
182 |
+ if use server; then |
183 |
+ newinitd "${FILESDIR}"/pbs_server-init.d-munge pbs_server |
184 |
+ newinitd "${FILESDIR}"/pbs_sched-init.d pbs_sched |
185 |
+ fi |
186 |
+ |
187 |
+ newinitd "${FILESDIR}"/pbs_mom-init.d-munge pbs_mom |
188 |
+ newconfd "${FILESDIR}"/${PN}-conf.d-munge ${PN} |
189 |
+ newinitd "${FILESDIR}"/trqauthd-init.d trqauthd |
190 |
+ newenvd "${FILESDIR}"/${PN}-env.d 25${PN} |
191 |
+ |
192 |
+ find "${ED}" -name '*.la' -delete || die |
193 |
+} |
194 |
+ |
195 |
+pkg_preinst() { |
196 |
+ if [[ -f "${EROOT}/etc/pbs_environment" ]]; then |
197 |
+ cp "${EROOT}/etc/pbs_environment" "${ED}"/etc/pbs_environment || die |
198 |
+ fi |
199 |
+ |
200 |
+ if use server && [[ -f "${EROOT}/${PBS_SERVER_HOME}/server_priv/nodes" ]]; then |
201 |
+ cp \ |
202 |
+ "${EROOT}/${PBS_SERVER_HOME}/server_priv/nodes" \ |
203 |
+ "${ED}/${PBS_SERVER_HOME}/server_priv/nodes" || die |
204 |
+ fi |
205 |
+ |
206 |
+ echo "${PBS_SERVER_NAME}" > "${ED}${PBS_SERVER_HOME}/server_name" || die |
207 |
+ |
208 |
+ # Fix up the env.d file to use our set server home. |
209 |
+ sed \ |
210 |
+ -e "s:/var/spool/${PN}:${PBS_SERVER_HOME}:g" \ |
211 |
+ -i "${ED}"/etc/env.d/25${PN} || die |
212 |
+ |
213 |
+ if use munge; then |
214 |
+ sed -i 's,\(PBS_USE_MUNGE=\).*,\11,' "${ED}"/etc/conf.d/${PN} || die |
215 |
+ fi |
216 |
+} |
217 |
+ |
218 |
+pkg_postinst() { |
219 |
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then |
220 |
+ elog "If this is the first time torque has been installed, then you are not" |
221 |
+ elog "ready to start the server. Please refer to the documentation located at:" |
222 |
+ elog "http://docs.adaptivecomputing.com/torque/${PV//./-}/adminGuide/torquehelp.htm#topics/torque/1-installConfig/initializeConfigOnServer.htm" |
223 |
+ fi |
224 |
+} |