1 |
commit: e8714b48b1830259838f810b13c6f24a4d1b994d |
2 |
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 14 14:21:29 2020 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 14 14:21:53 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8714b48 |
7 |
|
8 |
sys-cluster/slurm: Drop old |
9 |
|
10 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
11 |
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org> |
12 |
|
13 |
sys-cluster/slurm/Manifest | 4 - |
14 |
sys-cluster/slurm/slurm-19.05.4.1.ebuild | 264 ------------------------------- |
15 |
sys-cluster/slurm/slurm-19.05.5.1.ebuild | 264 ------------------------------- |
16 |
sys-cluster/slurm/slurm-20.02.0.1.ebuild | 263 ------------------------------ |
17 |
sys-cluster/slurm/slurm-20.02.1.1.ebuild | 263 ------------------------------ |
18 |
5 files changed, 1058 deletions(-) |
19 |
|
20 |
diff --git a/sys-cluster/slurm/Manifest b/sys-cluster/slurm/Manifest |
21 |
index 7950e8cc9ae..fb495d39b96 100644 |
22 |
--- a/sys-cluster/slurm/Manifest |
23 |
+++ b/sys-cluster/slurm/Manifest |
24 |
@@ -1,5 +1 @@ |
25 |
-DIST slurm-19-05-4-1.tar.gz 8446001 BLAKE2B d3b1524a72d7969b14788b93c7d64b03faf159b71b1ed8fb30782980b7b39e9f4a1d1435f4fbdce722ed9585e7d3285f9a84322c5a5d2f44d5e084bb38019ae4 SHA512 ecee26b23fc72ea4b6eb3039aada1814b5932d75eaf61501a31b97ac8f7b600864f2429a36de068f1f1cde178fa1383f2c53192af5b1a62766e3ffe48be4395c |
26 |
-DIST slurm-19-05-5-1.tar.gz 8447611 BLAKE2B 052d6a9c7e196546a2a7ca0c8e324d3728177e06a6b82150d6888cf5f6aa4b0f6612e09e928b2224be412971b4e40318d3b03e27068ed7c2256036a417ebf9c5 SHA512 612ce1c476de3d08d4003c48df65883880e697652ef8b0847cd87719e91196f489409b27c67ef040ab9ffe0c9d824cdae6441608e9af9619abcf11ebf0d464be |
27 |
-DIST slurm-20-02-0-1.tar.gz 8657581 BLAKE2B 402bb9c9a87055940ca525eb5c5e37cb62ad8957ae626682109e885834e6e17e93e3964f65b66c17c5ecc611271bd19709290f7ab79398c8c6b5aa762e476b50 SHA512 2c27133c8598cbb4ad0e6d186732f83cfb1b12460fddd89646b41a4d7c8239afff795db22345216f76ba5b666f1d5c2642dcfcbf38285f66d748424b60f9598a |
28 |
-DIST slurm-20-02-1-1.tar.gz 8660993 BLAKE2B 8f3a6ce0177410ae25490bb995fc14696002a22a8a0ec82d97f697fe5898c8c7d07fe2ad4ab824e1056f3be59adb2cb30b3e89a50a529e786a59aacab5cc6673 SHA512 a0974f52a561dc7596a9a7aeea4f09075a97dc30c729e59aef625584264e5b4ae003466275be379bae42a2a0e0be0c910b9349d3e7c6631f18969518ac9a0910 |
29 |
DIST slurm-20-02-2-1.tar.gz 8680227 BLAKE2B 9058c5161a3e087201b17484fbb8430d2af392b4abec4cfea3b6a882609bb978987a8e6aeda512b08def8010403c9f0893827632358225c15c374d15a583432f SHA512 6ed8628be442138c90f0f497846679eb2a4ea8e2c612d31c1276cc451333663bf310719a8f823dc873536343065186dc5f26871ce80340c0bdb71ab564620513 |
30 |
|
31 |
diff --git a/sys-cluster/slurm/slurm-19.05.4.1.ebuild b/sys-cluster/slurm/slurm-19.05.4.1.ebuild |
32 |
deleted file mode 100644 |
33 |
index e412669c3ed..00000000000 |
34 |
--- a/sys-cluster/slurm/slurm-19.05.4.1.ebuild |
35 |
+++ /dev/null |
36 |
@@ -1,264 +0,0 @@ |
37 |
-# Copyright 1999-2020 Gentoo Authors |
38 |
-# Distributed under the terms of the GNU General Public License v2 |
39 |
- |
40 |
-EAPI=7 |
41 |
- |
42 |
-if [[ ${PV} == *9999* ]]; then |
43 |
- EGIT_REPO_URI="https://github.com/SchedMD/slurm.git" |
44 |
- INHERIT_GIT="git-r3" |
45 |
- SRC_URI="" |
46 |
- KEYWORDS="" |
47 |
- MY_P="${P}" |
48 |
-else |
49 |
- if [[ ${PV} == *pre* || ${PV} == *rc* ]]; then |
50 |
- MY_PV=$(ver_rs '-0.') # pre-releases or release-candidate |
51 |
- else |
52 |
- MY_PV=$(ver_rs 1-3 '-') # stable releases |
53 |
- fi |
54 |
- MY_P="${PN}-${MY_PV}" |
55 |
- INHERIT_GIT="" |
56 |
- SRC_URI="https://github.com/SchedMD/slurm/archive/${MY_P}.tar.gz" |
57 |
- KEYWORDS="~amd64 ~x86" |
58 |
-fi |
59 |
- |
60 |
-inherit autotools bash-completion-r1 pam perl-module prefix toolchain-funcs systemd ${INHERIT_GIT} |
61 |
- |
62 |
-DESCRIPTION="A Highly Scalable Resource Manager" |
63 |
-HOMEPAGE="https://www.schedmd.com https://github.com/SchedMD/slurm" |
64 |
- |
65 |
-LICENSE="GPL-2" |
66 |
-SLOT="0" |
67 |
-IUSE="debug hdf5 html ipmi json lua multiple-slurmd +munge mysql netloc numa ofed pam perl slurmdbd static-libs ucx torque X" |
68 |
- |
69 |
-COMMON_DEPEND=" |
70 |
- !sys-cluster/torque |
71 |
- !net-analyzer/slurm |
72 |
- !net-analyzer/sinfo |
73 |
- || ( sys-cluster/pmix[-pmi] >=sys-cluster/openmpi-2.0.0 ) |
74 |
- mysql? ( |
75 |
- || ( dev-db/mariadb-connector-c dev-db/mysql-connector-c ) |
76 |
- slurmdbd? ( || ( dev-db/mariadb dev-db/mysql ) ) |
77 |
- ) |
78 |
- munge? ( sys-auth/munge ) |
79 |
- pam? ( sys-libs/pam ) |
80 |
- lua? ( dev-lang/lua:0= ) |
81 |
- !lua? ( !dev-lang/lua ) |
82 |
- ipmi? ( sys-libs/freeipmi ) |
83 |
- json? ( dev-libs/json-c:= ) |
84 |
- amd64? ( netloc? ( sys-apps/netloc ) ) |
85 |
- hdf5? ( sci-libs/hdf5:= ) |
86 |
- numa? ( sys-process/numactl ) |
87 |
- ofed? ( sys-fabric/ofed ) |
88 |
- ucx? ( sys-cluster/ucx ) |
89 |
- X? ( net-libs/libssh2 ) |
90 |
- >=sys-apps/hwloc-1.1.1-r1 |
91 |
- sys-libs/ncurses:0= |
92 |
- app-arch/lz4:0= |
93 |
- sys-libs/readline:0=" |
94 |
-DEPEND="${COMMON_DEPEND} |
95 |
- html? ( sys-apps/man2html )" |
96 |
-RDEPEND="${OMMON_DEPEND} |
97 |
- acct-user/slurm |
98 |
- acct-group/slurm |
99 |
- dev-libs/libcgroup" |
100 |
- |
101 |
-REQUIRED_USE="torque? ( perl )" |
102 |
- |
103 |
-S="${WORKDIR}/${PN}-${MY_P}" |
104 |
- |
105 |
-LIBSLURM_PERL_S="${S}/contribs/perlapi/libslurm/perl" |
106 |
-LIBSLURMDB_PERL_S="${S}/contribs/perlapi/libslurmdb/perl" |
107 |
- |
108 |
-RESTRICT="test" |
109 |
- |
110 |
-src_unpack() { |
111 |
- if [[ ${PV} == *9999* ]]; then |
112 |
- git-r3_src_unpack |
113 |
- else |
114 |
- default |
115 |
- fi |
116 |
-} |
117 |
- |
118 |
-src_prepare() { |
119 |
- tc-ld-disable-gold |
120 |
- eapply "${FILESDIR}"/disable-sview.patch |
121 |
- default |
122 |
- |
123 |
- # pids should go to /var/run/slurm |
124 |
- sed \ |
125 |
- -e 's:/tmp:/var/tmp:g' \ |
126 |
- -e "s:/var/run/slurmctld.pid:${EPREFIX}/run/slurm/slurmctld.pid:g" \ |
127 |
- -e "s:/var/run/slurmd.pid:${EPREFIX}/run/slurm/slurmd.pid:g" \ |
128 |
- -e "s:StateSaveLocation=.*:StateSaveLocation=${EPREFIX}/var/spool/slurm:g" \ |
129 |
- -e "s:SlurmdSpoolDir=.*:SlurmdSpoolDir=${EPREFIX}/var/spool/slurm/slurmd:g" \ |
130 |
- -i "${S}/etc/slurm.conf.example" \ |
131 |
- || die "Can't sed for /var/run/slurmctld.pid" |
132 |
- sed \ |
133 |
- -e "s:/var/run/slurmdbd.pid:${EPREFIX}/run/slurm/slurmdbd.pid:g" \ |
134 |
- -i "${S}/etc/slurmdbd.conf.example" \ |
135 |
- || die "Can't sed for /var/run/slurmdbd.pid" |
136 |
- # gentooify systemd services |
137 |
- sed \ |
138 |
- -e 's:sysconfig/.*:conf.d/slurm:g' \ |
139 |
- -e 's:var/run/:run/slurm/:g' \ |
140 |
- -e '/^EnvironmentFile=.*/d' \ |
141 |
- -i "${S}/etc"/*.service.in \ |
142 |
- || die "Can't sed systemd services for sysconfig or var/run/" |
143 |
- |
144 |
- hprefixify auxdir/{ax_check_zlib,x_ac_{lz4,ofed,munge}}.m4 |
145 |
- eautoreconf |
146 |
-} |
147 |
- |
148 |
-src_configure() { |
149 |
- local myconf=( |
150 |
- --sysconfdir="${EPREFIX}/etc/${PN}" |
151 |
- --with-hwloc="${EPREFIX}/usr" |
152 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}" |
153 |
- ) |
154 |
- use pam && myconf+=( --with-pam_dir=$(getpam_mod_dir) ) |
155 |
- use mysql || myconf+=( --without-mysql_config ) |
156 |
- use amd64 && myconf+=( $(use_with netloc) ) |
157 |
- econf "${myconf[@]}" \ |
158 |
- $(use_enable debug) \ |
159 |
- $(use_enable pam) \ |
160 |
- $(use_enable X x11) \ |
161 |
- $(use_with munge) \ |
162 |
- $(use_with json) \ |
163 |
- $(use_with hdf5) \ |
164 |
- $(use_with ofed) \ |
165 |
- $(use_with ucx) \ |
166 |
- $(use_enable static-libs static) \ |
167 |
- $(use_enable multiple-slurmd) |
168 |
- |
169 |
- # --htmldir does not seems to propagate... Documentations are installed |
170 |
- # in /usr/share/doc/slurm-2.3.0/html |
171 |
- # instead of /usr/share/doc/slurm-2.3.0.2/html |
172 |
- sed \ |
173 |
- -e "s|htmldir = .*/html|htmldir = \${prefix}/share/doc/slurm-${PVR}/html|g" \ |
174 |
- -i doc/html/Makefile || die |
175 |
- if use perl ; then |
176 |
- # small hack to make it compile |
177 |
- mkdir -p "${S}/src/api/.libs" || die |
178 |
- mkdir -p "${S}/src/db_api/.libs" || die |
179 |
- touch "${S}/src/api/.libs/libslurm.so" || die |
180 |
- touch "${S}/src/db_api/.libs/libslurmdb.so" || die |
181 |
- cd "${LIBSLURM_PERL_S}" || die |
182 |
- S="${LIBSLURM_PERL_S}" SRC_PREP="no" perl-module_src_configure |
183 |
- cd "${LIBSLURMDB_PERL_S}" || die |
184 |
- S="${LIBSLURMDB_PERL_S}" SRC_PREP="no" perl-module_src_configure |
185 |
- cd "${S}" || die |
186 |
- rm -rf "${S}/src/api/.libs" "${S}/src/db_api/.libs" || die |
187 |
- fi |
188 |
-} |
189 |
- |
190 |
-src_compile() { |
191 |
- default |
192 |
- use pam && emake -C contribs/pam |
193 |
- if use perl ; then |
194 |
- cd "${LIBSLURM_PERL_S}" || die |
195 |
- S="${LIBSLURM_PERL_S}" perl-module_src_compile |
196 |
- cd "${LIBSLURMDB_PERL_S}" || die |
197 |
- S="${LIBSLURMDB_PERL_S}" perl-module_src_compile |
198 |
- cd "${S}" || die |
199 |
- fi |
200 |
- use torque && emake -C contribs/torque |
201 |
-} |
202 |
- |
203 |
-src_install() { |
204 |
- default |
205 |
- use pam && emake DESTDIR="${D}" -C contribs/pam install |
206 |
- if use perl; then |
207 |
- cd "${LIBSLURM_PERL_S}" || die |
208 |
- S="${LIBSLURM_PERL_S}" perl-module_src_install |
209 |
- cd "${LIBSLURMDB_PERL_S}" || die |
210 |
- S="${LIBSLURMDB_PERL_S}" perl-module_src_install |
211 |
- cd "${S}" || die |
212 |
- fi |
213 |
- if use torque; then |
214 |
- emake DESTDIR="${D}" -C contribs/torque |
215 |
- rm -f "${D}"/usr/bin/mpiexec || die |
216 |
- fi |
217 |
- use static-libs || find "${ED}" -name '*.la' -exec rm {} + |
218 |
- # install sample configs |
219 |
- keepdir /etc/slurm |
220 |
- insinto /etc/slurm |
221 |
- doins \ |
222 |
- etc/bluegene.conf.example \ |
223 |
- etc/cgroup.conf.example \ |
224 |
- etc/slurm.conf.example \ |
225 |
- etc/slurmdbd.conf.example |
226 |
- exeinto /etc/slurm |
227 |
- keepdir /etc/slurm/layouts.d |
228 |
- insinto /etc/slurm/layouts.d |
229 |
- newins etc/layouts.d.power.conf.example power.conf.example |
230 |
- newins etc/layouts.d.power_cpufreq.conf.example power_cpufreq.conf.example |
231 |
- newins etc/layouts.d.unit.conf.example unit.conf.example |
232 |
- # install init.d files |
233 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmd.initd")" slurmd |
234 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmctld.initd")" slurmctld |
235 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmdbd.initd")" slurmdbd |
236 |
- # install conf.d files |
237 |
- newconfd "${FILESDIR}/slurm.confd" slurm |
238 |
- # install logrotate file |
239 |
- insinto /etc/logrotate.d |
240 |
- newins "${FILESDIR}/logrotate" slurm |
241 |
- # install bashcomp |
242 |
- newbashcomp contribs/slurm_completion_help/slurm_completion.sh scontrol |
243 |
- bashcomp_alias scontrol \ |
244 |
- sreport sacctmgr squeue scancel sshare sbcast sinfo \ |
245 |
- sprio sacct salloc sbatch srun sattach sdiag sstat |
246 |
- # install systemd files |
247 |
- systemd_newtmpfilesd "${FILESDIR}/slurm.tmpfiles" slurm.conf |
248 |
- systemd_dounit etc/slurmd.service etc/slurmctld.service etc/slurmdbd.service |
249 |
-} |
250 |
- |
251 |
-pkg_preinst() { |
252 |
- if use munge; then |
253 |
- sed -i 's,\(SLURM_USE_MUNGE=\).*,\11,' "${D}"/etc/conf.d/slurm || die |
254 |
- fi |
255 |
-} |
256 |
- |
257 |
-create_folders_and_fix_permissions() { |
258 |
- einfo "Fixing permissions in ${@}" |
259 |
- mkdir -p ${@} || die |
260 |
- chown -R ${PN}:${PN} ${@} || die |
261 |
-} |
262 |
- |
263 |
-pkg_postinst() { |
264 |
- paths=( |
265 |
- "${EROOT}"/var/${PN}/checkpoint |
266 |
- "${EROOT}"/var/${PN} |
267 |
- "${EROOT}"/var/spool/${PN}/slurmd |
268 |
- "${EROOT}"/var/spool/${PN} |
269 |
- "${EROOT}"/var/log/${PN} |
270 |
- /var/tmp/${PN}/${PN}d |
271 |
- /var/tmp/${PN} |
272 |
- /run/${PN} |
273 |
- ) |
274 |
- local folder_path |
275 |
- for folder_path in ${paths[@]}; do |
276 |
- create_folders_and_fix_permissions $folder_path |
277 |
- done |
278 |
- echo |
279 |
- |
280 |
- elog "Please visit the file '/usr/share/doc/${P}/html/configurator.html" |
281 |
- elog "through a (javascript enabled) browser to create a configureation file." |
282 |
- elog "Copy that file to /etc/slurm/slurm.conf on all nodes (including the headnode) of your cluster." |
283 |
- echo |
284 |
- elog "For cgroup support, please see https://www.schedmd.com/slurmdocs/cgroup.conf.html" |
285 |
- elog "Your kernel must be compiled with the wanted cgroup feature:" |
286 |
- elog " For the proctrack plugin:" |
287 |
- elog " freezer" |
288 |
- elog " For the task plugin:" |
289 |
- elog " cpuset, memory, devices" |
290 |
- elog " For the accounting plugin:" |
291 |
- elog " cpuacct, memory, blkio" |
292 |
- elog "Then, set these options in /etc/slurm/slurm.conf:" |
293 |
- elog " ProctrackType=proctrack/cgroup" |
294 |
- elog " TaskPlugin=task/cgroup" |
295 |
- einfo |
296 |
- ewarn "Paths were created for slurm. Please use these paths in /etc/slurm/slurm.conf:" |
297 |
- for folder_path in ${paths[@]}; do |
298 |
- ewarn " ${folder_path}" |
299 |
- done |
300 |
-} |
301 |
|
302 |
diff --git a/sys-cluster/slurm/slurm-19.05.5.1.ebuild b/sys-cluster/slurm/slurm-19.05.5.1.ebuild |
303 |
deleted file mode 100644 |
304 |
index 770a3e53390..00000000000 |
305 |
--- a/sys-cluster/slurm/slurm-19.05.5.1.ebuild |
306 |
+++ /dev/null |
307 |
@@ -1,264 +0,0 @@ |
308 |
-# Copyright 1999-2020 Gentoo Authors |
309 |
-# Distributed under the terms of the GNU General Public License v2 |
310 |
- |
311 |
-EAPI=7 |
312 |
- |
313 |
-if [[ ${PV} == *9999* ]]; then |
314 |
- EGIT_REPO_URI="https://github.com/SchedMD/slurm.git" |
315 |
- INHERIT_GIT="git-r3" |
316 |
- SRC_URI="" |
317 |
- KEYWORDS="" |
318 |
- MY_P="${P}" |
319 |
-else |
320 |
- if [[ ${PV} == *pre* || ${PV} == *rc* ]]; then |
321 |
- MY_PV=$(ver_rs '-0.') # pre-releases or release-candidate |
322 |
- else |
323 |
- MY_PV=$(ver_rs 1-3 '-') # stable releases |
324 |
- fi |
325 |
- MY_P="${PN}-${MY_PV}" |
326 |
- INHERIT_GIT="" |
327 |
- SRC_URI="https://github.com/SchedMD/slurm/archive/${MY_P}.tar.gz" |
328 |
- KEYWORDS="~amd64 ~x86" |
329 |
-fi |
330 |
- |
331 |
-inherit autotools bash-completion-r1 pam perl-module prefix toolchain-funcs systemd ${INHERIT_GIT} |
332 |
- |
333 |
-DESCRIPTION="A Highly Scalable Resource Manager" |
334 |
-HOMEPAGE="https://www.schedmd.com https://github.com/SchedMD/slurm" |
335 |
- |
336 |
-LICENSE="GPL-2" |
337 |
-SLOT="0" |
338 |
-IUSE="debug hdf5 html ipmi json lua multiple-slurmd +munge mysql netloc numa ofed pam perl slurmdbd static-libs ucx torque X" |
339 |
- |
340 |
-COMMON_DEPEND=" |
341 |
- !sys-cluster/torque |
342 |
- !net-analyzer/slurm |
343 |
- !net-analyzer/sinfo |
344 |
- || ( sys-cluster/pmix[-pmi] >=sys-cluster/openmpi-2.0.0 ) |
345 |
- mysql? ( |
346 |
- || ( dev-db/mariadb-connector-c dev-db/mysql-connector-c ) |
347 |
- slurmdbd? ( || ( dev-db/mariadb dev-db/mysql ) ) |
348 |
- ) |
349 |
- munge? ( sys-auth/munge ) |
350 |
- pam? ( sys-libs/pam ) |
351 |
- lua? ( dev-lang/lua:0= ) |
352 |
- !lua? ( !dev-lang/lua ) |
353 |
- ipmi? ( sys-libs/freeipmi ) |
354 |
- json? ( dev-libs/json-c:= ) |
355 |
- amd64? ( netloc? ( sys-apps/netloc ) ) |
356 |
- hdf5? ( sci-libs/hdf5:= ) |
357 |
- numa? ( sys-process/numactl ) |
358 |
- ofed? ( sys-fabric/ofed ) |
359 |
- ucx? ( sys-cluster/ucx ) |
360 |
- X? ( net-libs/libssh2 ) |
361 |
- >=sys-apps/hwloc-1.1.1-r1 |
362 |
- sys-libs/ncurses:0= |
363 |
- app-arch/lz4:0= |
364 |
- sys-libs/readline:0=" |
365 |
-DEPEND="${COMMON_DEPEND} |
366 |
- html? ( sys-apps/man2html )" |
367 |
-RDEPEND="${OMMON_DEPEND} |
368 |
- acct-user/slurm |
369 |
- acct-group/slurm |
370 |
- dev-libs/libcgroup" |
371 |
- |
372 |
-REQUIRED_USE="torque? ( perl )" |
373 |
- |
374 |
-S="${WORKDIR}/${PN}-${MY_P}" |
375 |
- |
376 |
-LIBSLURM_PERL_S="${S}/contribs/perlapi/libslurm/perl" |
377 |
-LIBSLURMDB_PERL_S="${S}/contribs/perlapi/libslurmdb/perl" |
378 |
- |
379 |
-RESTRICT="test" |
380 |
- |
381 |
-src_unpack() { |
382 |
- if [[ ${PV} == *9999* ]]; then |
383 |
- git-r3_src_unpack |
384 |
- else |
385 |
- default |
386 |
- fi |
387 |
-} |
388 |
- |
389 |
-src_prepare() { |
390 |
- tc-ld-disable-gold |
391 |
- eapply "${FILESDIR}"/disable-sview.patch |
392 |
- default |
393 |
- |
394 |
- # pids should go to /var/run/slurm |
395 |
- sed \ |
396 |
- -e 's:/tmp:/var/tmp:g' \ |
397 |
- -e "s:/var/run/slurmctld.pid:${EPREFIX}/run/slurm/slurmctld.pid:g" \ |
398 |
- -e "s:/var/run/slurmd.pid:${EPREFIX}/run/slurm/slurmd.pid:g" \ |
399 |
- -e "s:StateSaveLocation=.*:StateSaveLocation=${EPREFIX}/var/spool/slurm:g" \ |
400 |
- -e "s:SlurmdSpoolDir=.*:SlurmdSpoolDir=${EPREFIX}/var/spool/slurm/slurmd:g" \ |
401 |
- -i "${S}/etc/slurm.conf.example" \ |
402 |
- || die "Can't sed for /var/run/slurmctld.pid" |
403 |
- sed \ |
404 |
- -e "s:/var/run/slurmdbd.pid:${EPREFIX}/run/slurm/slurmdbd.pid:g" \ |
405 |
- -i "${S}/etc/slurmdbd.conf.example" \ |
406 |
- || die "Can't sed for /var/run/slurmdbd.pid" |
407 |
- # gentooify systemd services |
408 |
- sed \ |
409 |
- -e 's:sysconfig/.*:conf.d/slurm:g' \ |
410 |
- -e 's:var/run/:run/slurm/:g' \ |
411 |
- -e '/^EnvironmentFile=.*/d' \ |
412 |
- -i "${S}/etc"/*.service.in \ |
413 |
- || die "Can't sed systemd services for sysconfig or var/run/" |
414 |
- |
415 |
- hprefixify auxdir/{ax_check_zlib,x_ac_{lz4,ofed,munge}}.m4 |
416 |
- eautoreconf |
417 |
-} |
418 |
- |
419 |
-src_configure() { |
420 |
- local myconf=( |
421 |
- --sysconfdir="${EPREFIX}/etc/${PN}" |
422 |
- --with-hwloc="${EPREFIX}/usr" |
423 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}" |
424 |
- ) |
425 |
- use pam && myconf+=( --with-pam_dir=$(getpam_mod_dir) ) |
426 |
- use mysql || myconf+=( --without-mysql_config ) |
427 |
- use amd64 && myconf+=( $(use_with netloc) ) |
428 |
- econf "${myconf[@]}" \ |
429 |
- $(use_enable debug) \ |
430 |
- $(use_enable pam) \ |
431 |
- $(use_enable X x11) \ |
432 |
- $(use_with munge) \ |
433 |
- $(use_with json) \ |
434 |
- $(use_with hdf5) \ |
435 |
- $(use_with ofed) \ |
436 |
- $(use_with ucx) \ |
437 |
- $(use_enable static-libs static) \ |
438 |
- $(use_enable multiple-slurmd) |
439 |
- |
440 |
- # --htmldir does not seems to propagate... Documentations are installed |
441 |
- # in /usr/share/doc/slurm-2.3.0/html |
442 |
- # instead of /usr/share/doc/slurm-2.3.0.2/html |
443 |
- sed \ |
444 |
- -e "s|htmldir = .*/html|htmldir = \${prefix}/share/doc/slurm-${PVR}/html|g" \ |
445 |
- -i doc/html/Makefile || die |
446 |
- if use perl ; then |
447 |
- # small hack to make it compile |
448 |
- mkdir -p "${S}/src/api/.libs" || die |
449 |
- mkdir -p "${S}/src/db_api/.libs" || die |
450 |
- touch "${S}/src/api/.libs/libslurm.so" || die |
451 |
- touch "${S}/src/db_api/.libs/libslurmdb.so" || die |
452 |
- cd "${LIBSLURM_PERL_S}" || die |
453 |
- S="${LIBSLURM_PERL_S}" SRC_PREP="no" perl-module_src_configure |
454 |
- cd "${LIBSLURMDB_PERL_S}" || die |
455 |
- S="${LIBSLURMDB_PERL_S}" SRC_PREP="no" perl-module_src_configure |
456 |
- cd "${S}" || die |
457 |
- rm -rf "${S}/src/api/.libs" "${S}/src/db_api/.libs" || die |
458 |
- fi |
459 |
-} |
460 |
- |
461 |
-src_compile() { |
462 |
- default |
463 |
- use pam && emake -C contribs/pam |
464 |
- if use perl ; then |
465 |
- cd "${LIBSLURM_PERL_S}" || die |
466 |
- S="${LIBSLURM_PERL_S}" perl-module_src_compile |
467 |
- cd "${LIBSLURMDB_PERL_S}" || die |
468 |
- S="${LIBSLURMDB_PERL_S}" perl-module_src_compile |
469 |
- cd "${S}" || die |
470 |
- fi |
471 |
- use torque && emake -C contribs/torque |
472 |
-} |
473 |
- |
474 |
-src_install() { |
475 |
- default |
476 |
- use pam && emake DESTDIR="${D}" -C contribs/pam install |
477 |
- if use perl; then |
478 |
- cd "${LIBSLURM_PERL_S}" || die |
479 |
- S="${LIBSLURM_PERL_S}" perl-module_src_install |
480 |
- cd "${LIBSLURMDB_PERL_S}" || die |
481 |
- S="${LIBSLURMDB_PERL_S}" perl-module_src_install |
482 |
- cd "${S}" || die |
483 |
- fi |
484 |
- if use torque; then |
485 |
- emake DESTDIR="${D}" -C contribs/torque |
486 |
- rm -f "${D}"/usr/bin/mpiexec || die |
487 |
- fi |
488 |
- use static-libs || find "${ED}" -name '*.la' -exec rm {} + |
489 |
- # install sample configs |
490 |
- keepdir /etc/slurm |
491 |
- insinto /etc/slurm |
492 |
- doins \ |
493 |
- etc/prolog.example \ |
494 |
- etc/cgroup.conf.example \ |
495 |
- etc/slurm.conf.example \ |
496 |
- etc/slurmdbd.conf.example |
497 |
- exeinto /etc/slurm |
498 |
- keepdir /etc/slurm/layouts.d |
499 |
- insinto /etc/slurm/layouts.d |
500 |
- newins etc/layouts.d.power.conf.example power.conf.example |
501 |
- newins etc/layouts.d.power_cpufreq.conf.example power_cpufreq.conf.example |
502 |
- newins etc/layouts.d.unit.conf.example unit.conf.example |
503 |
- # install init.d files |
504 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmd.initd")" slurmd |
505 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmctld.initd")" slurmctld |
506 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmdbd.initd")" slurmdbd |
507 |
- # install conf.d files |
508 |
- newconfd "${FILESDIR}/slurm.confd" slurm |
509 |
- # install logrotate file |
510 |
- insinto /etc/logrotate.d |
511 |
- newins "${FILESDIR}/logrotate" slurm |
512 |
- # install bashcomp |
513 |
- newbashcomp contribs/slurm_completion_help/slurm_completion.sh scontrol |
514 |
- bashcomp_alias scontrol \ |
515 |
- sreport sacctmgr squeue scancel sshare sbcast sinfo \ |
516 |
- sprio sacct salloc sbatch srun sattach sdiag sstat |
517 |
- # install systemd files |
518 |
- systemd_newtmpfilesd "${FILESDIR}/slurm.tmpfiles" slurm.conf |
519 |
- systemd_dounit etc/slurmd.service etc/slurmctld.service etc/slurmdbd.service |
520 |
-} |
521 |
- |
522 |
-pkg_preinst() { |
523 |
- if use munge; then |
524 |
- sed -i 's,\(SLURM_USE_MUNGE=\).*,\11,' "${D}"/etc/conf.d/slurm || die |
525 |
- fi |
526 |
-} |
527 |
- |
528 |
-create_folders_and_fix_permissions() { |
529 |
- einfo "Fixing permissions in ${@}" |
530 |
- mkdir -p ${@} || die |
531 |
- chown -R ${PN}:${PN} ${@} || die |
532 |
-} |
533 |
- |
534 |
-pkg_postinst() { |
535 |
- paths=( |
536 |
- "${EROOT}"/var/${PN}/checkpoint |
537 |
- "${EROOT}"/var/${PN} |
538 |
- "${EROOT}"/var/spool/${PN}/slurmd |
539 |
- "${EROOT}"/var/spool/${PN} |
540 |
- "${EROOT}"/var/log/${PN} |
541 |
- /var/tmp/${PN}/${PN}d |
542 |
- /var/tmp/${PN} |
543 |
- /run/${PN} |
544 |
- ) |
545 |
- local folder_path |
546 |
- for folder_path in ${paths[@]}; do |
547 |
- create_folders_and_fix_permissions $folder_path |
548 |
- done |
549 |
- echo |
550 |
- |
551 |
- elog "Please visit the file '/usr/share/doc/${P}/html/configurator.html" |
552 |
- elog "through a (javascript enabled) browser to create a configureation file." |
553 |
- elog "Copy that file to /etc/slurm/slurm.conf on all nodes (including the headnode) of your cluster." |
554 |
- echo |
555 |
- elog "For cgroup support, please see https://www.schedmd.com/slurmdocs/cgroup.conf.html" |
556 |
- elog "Your kernel must be compiled with the wanted cgroup feature:" |
557 |
- elog " For the proctrack plugin:" |
558 |
- elog " freezer" |
559 |
- elog " For the task plugin:" |
560 |
- elog " cpuset, memory, devices" |
561 |
- elog " For the accounting plugin:" |
562 |
- elog " cpuacct, memory, blkio" |
563 |
- elog "Then, set these options in /etc/slurm/slurm.conf:" |
564 |
- elog " ProctrackType=proctrack/cgroup" |
565 |
- elog " TaskPlugin=task/cgroup" |
566 |
- einfo |
567 |
- ewarn "Paths were created for slurm. Please use these paths in /etc/slurm/slurm.conf:" |
568 |
- for folder_path in ${paths[@]}; do |
569 |
- ewarn " ${folder_path}" |
570 |
- done |
571 |
-} |
572 |
|
573 |
diff --git a/sys-cluster/slurm/slurm-20.02.0.1.ebuild b/sys-cluster/slurm/slurm-20.02.0.1.ebuild |
574 |
deleted file mode 100644 |
575 |
index a2a4e4bd829..00000000000 |
576 |
--- a/sys-cluster/slurm/slurm-20.02.0.1.ebuild |
577 |
+++ /dev/null |
578 |
@@ -1,263 +0,0 @@ |
579 |
-# Copyright 1999-2020 Gentoo Authors |
580 |
-# Distributed under the terms of the GNU General Public License v2 |
581 |
- |
582 |
-EAPI=7 |
583 |
- |
584 |
-if [[ ${PV} == *9999* ]]; then |
585 |
- EGIT_REPO_URI="https://github.com/SchedMD/slurm.git" |
586 |
- INHERIT_GIT="git-r3" |
587 |
- MY_P="${P}" |
588 |
-else |
589 |
- if [[ ${PV} == *pre* || ${PV} == *rc* ]]; then |
590 |
- MY_PV=$(ver_rs '-0.') # pre-releases or release-candidate |
591 |
- else |
592 |
- MY_PV=$(ver_rs 1-3 '-') # stable releases |
593 |
- fi |
594 |
- MY_P="${PN}-${MY_PV}" |
595 |
- INHERIT_GIT="" |
596 |
- SRC_URI="https://github.com/SchedMD/slurm/archive/${MY_P}.tar.gz" |
597 |
- KEYWORDS="~amd64 ~x86" |
598 |
-fi |
599 |
- |
600 |
-inherit autotools bash-completion-r1 pam perl-module prefix toolchain-funcs systemd ${INHERIT_GIT} |
601 |
- |
602 |
-DESCRIPTION="A Highly Scalable Resource Manager" |
603 |
-HOMEPAGE="https://www.schedmd.com https://github.com/SchedMD/slurm" |
604 |
- |
605 |
-LICENSE="GPL-2" |
606 |
-SLOT="0" |
607 |
-IUSE="debug hdf5 html ipmi json lua multiple-slurmd +munge mysql netloc numa ofed pam perl slurmdbd static-libs ucx torque X" |
608 |
- |
609 |
-COMMON_DEPEND=" |
610 |
- !sys-cluster/torque |
611 |
- !net-analyzer/slurm |
612 |
- !net-analyzer/sinfo |
613 |
- || ( sys-cluster/pmix[-pmi] >=sys-cluster/openmpi-2.0.0 ) |
614 |
- mysql? ( |
615 |
- || ( dev-db/mariadb-connector-c dev-db/mysql-connector-c ) |
616 |
- slurmdbd? ( || ( dev-db/mariadb dev-db/mysql ) ) |
617 |
- ) |
618 |
- munge? ( sys-auth/munge ) |
619 |
- pam? ( sys-libs/pam ) |
620 |
- lua? ( dev-lang/lua:0= ) |
621 |
- !lua? ( !dev-lang/lua ) |
622 |
- ipmi? ( sys-libs/freeipmi ) |
623 |
- json? ( dev-libs/json-c:= ) |
624 |
- amd64? ( netloc? ( sys-apps/netloc ) ) |
625 |
- hdf5? ( sci-libs/hdf5:= ) |
626 |
- numa? ( sys-process/numactl ) |
627 |
- ofed? ( sys-fabric/ofed ) |
628 |
- ucx? ( sys-cluster/ucx ) |
629 |
- X? ( net-libs/libssh2 ) |
630 |
- >=sys-apps/hwloc-1.1.1-r1 |
631 |
- sys-libs/ncurses:0= |
632 |
- app-arch/lz4:0= |
633 |
- sys-libs/readline:0=" |
634 |
-DEPEND="${COMMON_DEPEND} |
635 |
- html? ( sys-apps/man2html )" |
636 |
-RDEPEND="${OMMON_DEPEND} |
637 |
- acct-user/slurm |
638 |
- acct-group/slurm |
639 |
- dev-libs/libcgroup" |
640 |
- |
641 |
-REQUIRED_USE="torque? ( perl )" |
642 |
- |
643 |
-S="${WORKDIR}/${PN}-${MY_P}" |
644 |
- |
645 |
-LIBSLURM_PERL_S="${S}/contribs/perlapi/libslurm/perl" |
646 |
-LIBSLURMDB_PERL_S="${S}/contribs/perlapi/libslurmdb/perl" |
647 |
- |
648 |
-RESTRICT="test" |
649 |
- |
650 |
-src_unpack() { |
651 |
- if [[ ${PV} == *9999* ]]; then |
652 |
- git-r3_src_unpack |
653 |
- else |
654 |
- default |
655 |
- fi |
656 |
-} |
657 |
- |
658 |
-src_prepare() { |
659 |
- tc-ld-disable-gold |
660 |
- default |
661 |
- |
662 |
- # pids should go to /var/run/slurm |
663 |
- sed \ |
664 |
- -e 's:/tmp:/var/tmp:g' \ |
665 |
- -e "s:/var/run/slurmctld.pid:${EPREFIX}/run/slurm/slurmctld.pid:g" \ |
666 |
- -e "s:/var/run/slurmd.pid:${EPREFIX}/run/slurm/slurmd.pid:g" \ |
667 |
- -e "s:StateSaveLocation=.*:StateSaveLocation=${EPREFIX}/var/spool/slurm:g" \ |
668 |
- -e "s:SlurmdSpoolDir=.*:SlurmdSpoolDir=${EPREFIX}/var/spool/slurm/slurmd:g" \ |
669 |
- -i "${S}/etc/slurm.conf.example" \ |
670 |
- || die "Can't sed for /var/run/slurmctld.pid" |
671 |
- sed \ |
672 |
- -e "s:/var/run/slurmdbd.pid:${EPREFIX}/run/slurm/slurmdbd.pid:g" \ |
673 |
- -i "${S}/etc/slurmdbd.conf.example" \ |
674 |
- || die "Can't sed for /var/run/slurmdbd.pid" |
675 |
- # gentooify systemd services |
676 |
- sed \ |
677 |
- -e 's:sysconfig/.*:conf.d/slurm:g' \ |
678 |
- -e 's:var/run/:run/slurm/:g' \ |
679 |
- -e '/^EnvironmentFile=.*/d' \ |
680 |
- -i "${S}/etc"/*.service.in \ |
681 |
- || die "Can't sed systemd services for sysconfig or var/run/" |
682 |
- |
683 |
- sed -e '/AM_PATH_GTK_2_0/d' -i configure.ac || die |
684 |
- |
685 |
- hprefixify auxdir/{ax_check_zlib,x_ac_{lz4,ofed,munge}}.m4 |
686 |
- eautoreconf |
687 |
-} |
688 |
- |
689 |
-src_configure() { |
690 |
- local myconf=( |
691 |
- --sysconfdir="${EPREFIX}/etc/${PN}" |
692 |
- --with-hwloc="${EPREFIX}/usr" |
693 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}" |
694 |
- ) |
695 |
- use pam && myconf+=( --with-pam_dir=$(getpam_mod_dir) ) |
696 |
- use mysql || myconf+=( --without-mysql_config ) |
697 |
- use amd64 && myconf+=( $(use_with netloc) ) |
698 |
- econf "${myconf[@]}" \ |
699 |
- $(use_enable debug) \ |
700 |
- $(use_enable pam) \ |
701 |
- $(use_enable X x11) \ |
702 |
- $(use_with munge) \ |
703 |
- $(use_with json) \ |
704 |
- $(use_with hdf5) \ |
705 |
- $(use_with ofed) \ |
706 |
- $(use_with ucx) \ |
707 |
- $(use_enable static-libs static) \ |
708 |
- $(use_enable multiple-slurmd) |
709 |
- |
710 |
- # --htmldir does not seems to propagate... Documentations are installed |
711 |
- # in /usr/share/doc/slurm-2.3.0/html |
712 |
- # instead of /usr/share/doc/slurm-2.3.0.2/html |
713 |
- sed \ |
714 |
- -e "s|htmldir = .*/html|htmldir = \${prefix}/share/doc/slurm-${PVR}/html|g" \ |
715 |
- -i doc/html/Makefile || die |
716 |
- if use perl ; then |
717 |
- # small hack to make it compile |
718 |
- mkdir -p "${S}/src/api/.libs" || die |
719 |
- mkdir -p "${S}/src/db_api/.libs" || die |
720 |
- touch "${S}/src/api/.libs/libslurm.so" || die |
721 |
- touch "${S}/src/db_api/.libs/libslurmdb.so" || die |
722 |
- cd "${LIBSLURM_PERL_S}" || die |
723 |
- S="${LIBSLURM_PERL_S}" SRC_PREP="no" perl-module_src_configure |
724 |
- cd "${LIBSLURMDB_PERL_S}" || die |
725 |
- S="${LIBSLURMDB_PERL_S}" SRC_PREP="no" perl-module_src_configure |
726 |
- cd "${S}" || die |
727 |
- rm -rf "${S}/src/api/.libs" "${S}/src/db_api/.libs" || die |
728 |
- fi |
729 |
-} |
730 |
- |
731 |
-src_compile() { |
732 |
- default |
733 |
- use pam && emake -C contribs/pam |
734 |
- if use perl ; then |
735 |
- cd "${LIBSLURM_PERL_S}" || die |
736 |
- S="${LIBSLURM_PERL_S}" perl-module_src_compile |
737 |
- cd "${LIBSLURMDB_PERL_S}" || die |
738 |
- S="${LIBSLURMDB_PERL_S}" perl-module_src_compile |
739 |
- cd "${S}" || die |
740 |
- fi |
741 |
- use torque && emake -C contribs/torque |
742 |
-} |
743 |
- |
744 |
-src_install() { |
745 |
- default |
746 |
- use pam && emake DESTDIR="${D}" -C contribs/pam install |
747 |
- if use perl; then |
748 |
- cd "${LIBSLURM_PERL_S}" || die |
749 |
- S="${LIBSLURM_PERL_S}" perl-module_src_install |
750 |
- cd "${LIBSLURMDB_PERL_S}" || die |
751 |
- S="${LIBSLURMDB_PERL_S}" perl-module_src_install |
752 |
- cd "${S}" || die |
753 |
- fi |
754 |
- if use torque; then |
755 |
- emake DESTDIR="${D}" -C contribs/torque |
756 |
- rm -f "${D}"/usr/bin/mpiexec || die |
757 |
- fi |
758 |
- use static-libs || find "${ED}" -name '*.la' -exec rm {} + |
759 |
- # install sample configs |
760 |
- keepdir /etc/slurm |
761 |
- insinto /etc/slurm |
762 |
- doins \ |
763 |
- etc/prolog.example \ |
764 |
- etc/cgroup.conf.example \ |
765 |
- etc/slurm.conf.example \ |
766 |
- etc/slurmdbd.conf.example |
767 |
- exeinto /etc/slurm |
768 |
- keepdir /etc/slurm/layouts.d |
769 |
- insinto /etc/slurm/layouts.d |
770 |
- newins etc/layouts.d.power.conf.example power.conf.example |
771 |
- newins etc/layouts.d.power_cpufreq.conf.example power_cpufreq.conf.example |
772 |
- newins etc/layouts.d.unit.conf.example unit.conf.example |
773 |
- # install init.d files |
774 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmd.initd")" slurmd |
775 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmctld.initd")" slurmctld |
776 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmdbd.initd")" slurmdbd |
777 |
- # install conf.d files |
778 |
- newconfd "${FILESDIR}/slurm.confd" slurm |
779 |
- # install logrotate file |
780 |
- insinto /etc/logrotate.d |
781 |
- newins "${FILESDIR}/logrotate" slurm |
782 |
- # install bashcomp |
783 |
- newbashcomp contribs/slurm_completion_help/slurm_completion.sh scontrol |
784 |
- bashcomp_alias scontrol \ |
785 |
- sreport sacctmgr squeue scancel sshare sbcast sinfo \ |
786 |
- sprio sacct salloc sbatch srun sattach sdiag sstat |
787 |
- # install systemd files |
788 |
- systemd_newtmpfilesd "${FILESDIR}/slurm.tmpfiles" slurm.conf |
789 |
- systemd_dounit etc/slurmd.service etc/slurmctld.service etc/slurmdbd.service |
790 |
-} |
791 |
- |
792 |
-pkg_preinst() { |
793 |
- if use munge; then |
794 |
- sed -i 's,\(SLURM_USE_MUNGE=\).*,\11,' "${D}"/etc/conf.d/slurm || die |
795 |
- fi |
796 |
-} |
797 |
- |
798 |
-create_folders_and_fix_permissions() { |
799 |
- einfo "Fixing permissions in ${@}" |
800 |
- mkdir -p ${@} || die |
801 |
- chown -R ${PN}:${PN} ${@} || die |
802 |
-} |
803 |
- |
804 |
-pkg_postinst() { |
805 |
- paths=( |
806 |
- "${EROOT}"/var/${PN}/checkpoint |
807 |
- "${EROOT}"/var/${PN} |
808 |
- "${EROOT}"/var/spool/${PN}/slurmd |
809 |
- "${EROOT}"/var/spool/${PN} |
810 |
- "${EROOT}"/var/log/${PN} |
811 |
- /var/tmp/${PN}/${PN}d |
812 |
- /var/tmp/${PN} |
813 |
- /run/${PN} |
814 |
- ) |
815 |
- local folder_path |
816 |
- for folder_path in ${paths[@]}; do |
817 |
- create_folders_and_fix_permissions $folder_path |
818 |
- done |
819 |
- echo |
820 |
- |
821 |
- elog "Please visit the file '/usr/share/doc/${P}/html/configurator.html" |
822 |
- elog "through a (javascript enabled) browser to create a configureation file." |
823 |
- elog "Copy that file to /etc/slurm/slurm.conf on all nodes (including the headnode) of your cluster." |
824 |
- echo |
825 |
- elog "For cgroup support, please see https://www.schedmd.com/slurmdocs/cgroup.conf.html" |
826 |
- elog "Your kernel must be compiled with the wanted cgroup feature:" |
827 |
- elog " For the proctrack plugin:" |
828 |
- elog " freezer" |
829 |
- elog " For the task plugin:" |
830 |
- elog " cpuset, memory, devices" |
831 |
- elog " For the accounting plugin:" |
832 |
- elog " cpuacct, memory, blkio" |
833 |
- elog "Then, set these options in /etc/slurm/slurm.conf:" |
834 |
- elog " ProctrackType=proctrack/cgroup" |
835 |
- elog " TaskPlugin=task/cgroup" |
836 |
- einfo |
837 |
- ewarn "Paths were created for slurm. Please use these paths in /etc/slurm/slurm.conf:" |
838 |
- for folder_path in ${paths[@]}; do |
839 |
- ewarn " ${folder_path}" |
840 |
- done |
841 |
-} |
842 |
|
843 |
diff --git a/sys-cluster/slurm/slurm-20.02.1.1.ebuild b/sys-cluster/slurm/slurm-20.02.1.1.ebuild |
844 |
deleted file mode 100644 |
845 |
index a2a4e4bd829..00000000000 |
846 |
--- a/sys-cluster/slurm/slurm-20.02.1.1.ebuild |
847 |
+++ /dev/null |
848 |
@@ -1,263 +0,0 @@ |
849 |
-# Copyright 1999-2020 Gentoo Authors |
850 |
-# Distributed under the terms of the GNU General Public License v2 |
851 |
- |
852 |
-EAPI=7 |
853 |
- |
854 |
-if [[ ${PV} == *9999* ]]; then |
855 |
- EGIT_REPO_URI="https://github.com/SchedMD/slurm.git" |
856 |
- INHERIT_GIT="git-r3" |
857 |
- MY_P="${P}" |
858 |
-else |
859 |
- if [[ ${PV} == *pre* || ${PV} == *rc* ]]; then |
860 |
- MY_PV=$(ver_rs '-0.') # pre-releases or release-candidate |
861 |
- else |
862 |
- MY_PV=$(ver_rs 1-3 '-') # stable releases |
863 |
- fi |
864 |
- MY_P="${PN}-${MY_PV}" |
865 |
- INHERIT_GIT="" |
866 |
- SRC_URI="https://github.com/SchedMD/slurm/archive/${MY_P}.tar.gz" |
867 |
- KEYWORDS="~amd64 ~x86" |
868 |
-fi |
869 |
- |
870 |
-inherit autotools bash-completion-r1 pam perl-module prefix toolchain-funcs systemd ${INHERIT_GIT} |
871 |
- |
872 |
-DESCRIPTION="A Highly Scalable Resource Manager" |
873 |
-HOMEPAGE="https://www.schedmd.com https://github.com/SchedMD/slurm" |
874 |
- |
875 |
-LICENSE="GPL-2" |
876 |
-SLOT="0" |
877 |
-IUSE="debug hdf5 html ipmi json lua multiple-slurmd +munge mysql netloc numa ofed pam perl slurmdbd static-libs ucx torque X" |
878 |
- |
879 |
-COMMON_DEPEND=" |
880 |
- !sys-cluster/torque |
881 |
- !net-analyzer/slurm |
882 |
- !net-analyzer/sinfo |
883 |
- || ( sys-cluster/pmix[-pmi] >=sys-cluster/openmpi-2.0.0 ) |
884 |
- mysql? ( |
885 |
- || ( dev-db/mariadb-connector-c dev-db/mysql-connector-c ) |
886 |
- slurmdbd? ( || ( dev-db/mariadb dev-db/mysql ) ) |
887 |
- ) |
888 |
- munge? ( sys-auth/munge ) |
889 |
- pam? ( sys-libs/pam ) |
890 |
- lua? ( dev-lang/lua:0= ) |
891 |
- !lua? ( !dev-lang/lua ) |
892 |
- ipmi? ( sys-libs/freeipmi ) |
893 |
- json? ( dev-libs/json-c:= ) |
894 |
- amd64? ( netloc? ( sys-apps/netloc ) ) |
895 |
- hdf5? ( sci-libs/hdf5:= ) |
896 |
- numa? ( sys-process/numactl ) |
897 |
- ofed? ( sys-fabric/ofed ) |
898 |
- ucx? ( sys-cluster/ucx ) |
899 |
- X? ( net-libs/libssh2 ) |
900 |
- >=sys-apps/hwloc-1.1.1-r1 |
901 |
- sys-libs/ncurses:0= |
902 |
- app-arch/lz4:0= |
903 |
- sys-libs/readline:0=" |
904 |
-DEPEND="${COMMON_DEPEND} |
905 |
- html? ( sys-apps/man2html )" |
906 |
-RDEPEND="${OMMON_DEPEND} |
907 |
- acct-user/slurm |
908 |
- acct-group/slurm |
909 |
- dev-libs/libcgroup" |
910 |
- |
911 |
-REQUIRED_USE="torque? ( perl )" |
912 |
- |
913 |
-S="${WORKDIR}/${PN}-${MY_P}" |
914 |
- |
915 |
-LIBSLURM_PERL_S="${S}/contribs/perlapi/libslurm/perl" |
916 |
-LIBSLURMDB_PERL_S="${S}/contribs/perlapi/libslurmdb/perl" |
917 |
- |
918 |
-RESTRICT="test" |
919 |
- |
920 |
-src_unpack() { |
921 |
- if [[ ${PV} == *9999* ]]; then |
922 |
- git-r3_src_unpack |
923 |
- else |
924 |
- default |
925 |
- fi |
926 |
-} |
927 |
- |
928 |
-src_prepare() { |
929 |
- tc-ld-disable-gold |
930 |
- default |
931 |
- |
932 |
- # pids should go to /var/run/slurm |
933 |
- sed \ |
934 |
- -e 's:/tmp:/var/tmp:g' \ |
935 |
- -e "s:/var/run/slurmctld.pid:${EPREFIX}/run/slurm/slurmctld.pid:g" \ |
936 |
- -e "s:/var/run/slurmd.pid:${EPREFIX}/run/slurm/slurmd.pid:g" \ |
937 |
- -e "s:StateSaveLocation=.*:StateSaveLocation=${EPREFIX}/var/spool/slurm:g" \ |
938 |
- -e "s:SlurmdSpoolDir=.*:SlurmdSpoolDir=${EPREFIX}/var/spool/slurm/slurmd:g" \ |
939 |
- -i "${S}/etc/slurm.conf.example" \ |
940 |
- || die "Can't sed for /var/run/slurmctld.pid" |
941 |
- sed \ |
942 |
- -e "s:/var/run/slurmdbd.pid:${EPREFIX}/run/slurm/slurmdbd.pid:g" \ |
943 |
- -i "${S}/etc/slurmdbd.conf.example" \ |
944 |
- || die "Can't sed for /var/run/slurmdbd.pid" |
945 |
- # gentooify systemd services |
946 |
- sed \ |
947 |
- -e 's:sysconfig/.*:conf.d/slurm:g' \ |
948 |
- -e 's:var/run/:run/slurm/:g' \ |
949 |
- -e '/^EnvironmentFile=.*/d' \ |
950 |
- -i "${S}/etc"/*.service.in \ |
951 |
- || die "Can't sed systemd services for sysconfig or var/run/" |
952 |
- |
953 |
- sed -e '/AM_PATH_GTK_2_0/d' -i configure.ac || die |
954 |
- |
955 |
- hprefixify auxdir/{ax_check_zlib,x_ac_{lz4,ofed,munge}}.m4 |
956 |
- eautoreconf |
957 |
-} |
958 |
- |
959 |
-src_configure() { |
960 |
- local myconf=( |
961 |
- --sysconfdir="${EPREFIX}/etc/${PN}" |
962 |
- --with-hwloc="${EPREFIX}/usr" |
963 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}" |
964 |
- ) |
965 |
- use pam && myconf+=( --with-pam_dir=$(getpam_mod_dir) ) |
966 |
- use mysql || myconf+=( --without-mysql_config ) |
967 |
- use amd64 && myconf+=( $(use_with netloc) ) |
968 |
- econf "${myconf[@]}" \ |
969 |
- $(use_enable debug) \ |
970 |
- $(use_enable pam) \ |
971 |
- $(use_enable X x11) \ |
972 |
- $(use_with munge) \ |
973 |
- $(use_with json) \ |
974 |
- $(use_with hdf5) \ |
975 |
- $(use_with ofed) \ |
976 |
- $(use_with ucx) \ |
977 |
- $(use_enable static-libs static) \ |
978 |
- $(use_enable multiple-slurmd) |
979 |
- |
980 |
- # --htmldir does not seems to propagate... Documentations are installed |
981 |
- # in /usr/share/doc/slurm-2.3.0/html |
982 |
- # instead of /usr/share/doc/slurm-2.3.0.2/html |
983 |
- sed \ |
984 |
- -e "s|htmldir = .*/html|htmldir = \${prefix}/share/doc/slurm-${PVR}/html|g" \ |
985 |
- -i doc/html/Makefile || die |
986 |
- if use perl ; then |
987 |
- # small hack to make it compile |
988 |
- mkdir -p "${S}/src/api/.libs" || die |
989 |
- mkdir -p "${S}/src/db_api/.libs" || die |
990 |
- touch "${S}/src/api/.libs/libslurm.so" || die |
991 |
- touch "${S}/src/db_api/.libs/libslurmdb.so" || die |
992 |
- cd "${LIBSLURM_PERL_S}" || die |
993 |
- S="${LIBSLURM_PERL_S}" SRC_PREP="no" perl-module_src_configure |
994 |
- cd "${LIBSLURMDB_PERL_S}" || die |
995 |
- S="${LIBSLURMDB_PERL_S}" SRC_PREP="no" perl-module_src_configure |
996 |
- cd "${S}" || die |
997 |
- rm -rf "${S}/src/api/.libs" "${S}/src/db_api/.libs" || die |
998 |
- fi |
999 |
-} |
1000 |
- |
1001 |
-src_compile() { |
1002 |
- default |
1003 |
- use pam && emake -C contribs/pam |
1004 |
- if use perl ; then |
1005 |
- cd "${LIBSLURM_PERL_S}" || die |
1006 |
- S="${LIBSLURM_PERL_S}" perl-module_src_compile |
1007 |
- cd "${LIBSLURMDB_PERL_S}" || die |
1008 |
- S="${LIBSLURMDB_PERL_S}" perl-module_src_compile |
1009 |
- cd "${S}" || die |
1010 |
- fi |
1011 |
- use torque && emake -C contribs/torque |
1012 |
-} |
1013 |
- |
1014 |
-src_install() { |
1015 |
- default |
1016 |
- use pam && emake DESTDIR="${D}" -C contribs/pam install |
1017 |
- if use perl; then |
1018 |
- cd "${LIBSLURM_PERL_S}" || die |
1019 |
- S="${LIBSLURM_PERL_S}" perl-module_src_install |
1020 |
- cd "${LIBSLURMDB_PERL_S}" || die |
1021 |
- S="${LIBSLURMDB_PERL_S}" perl-module_src_install |
1022 |
- cd "${S}" || die |
1023 |
- fi |
1024 |
- if use torque; then |
1025 |
- emake DESTDIR="${D}" -C contribs/torque |
1026 |
- rm -f "${D}"/usr/bin/mpiexec || die |
1027 |
- fi |
1028 |
- use static-libs || find "${ED}" -name '*.la' -exec rm {} + |
1029 |
- # install sample configs |
1030 |
- keepdir /etc/slurm |
1031 |
- insinto /etc/slurm |
1032 |
- doins \ |
1033 |
- etc/prolog.example \ |
1034 |
- etc/cgroup.conf.example \ |
1035 |
- etc/slurm.conf.example \ |
1036 |
- etc/slurmdbd.conf.example |
1037 |
- exeinto /etc/slurm |
1038 |
- keepdir /etc/slurm/layouts.d |
1039 |
- insinto /etc/slurm/layouts.d |
1040 |
- newins etc/layouts.d.power.conf.example power.conf.example |
1041 |
- newins etc/layouts.d.power_cpufreq.conf.example power_cpufreq.conf.example |
1042 |
- newins etc/layouts.d.unit.conf.example unit.conf.example |
1043 |
- # install init.d files |
1044 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmd.initd")" slurmd |
1045 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmctld.initd")" slurmctld |
1046 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmdbd.initd")" slurmdbd |
1047 |
- # install conf.d files |
1048 |
- newconfd "${FILESDIR}/slurm.confd" slurm |
1049 |
- # install logrotate file |
1050 |
- insinto /etc/logrotate.d |
1051 |
- newins "${FILESDIR}/logrotate" slurm |
1052 |
- # install bashcomp |
1053 |
- newbashcomp contribs/slurm_completion_help/slurm_completion.sh scontrol |
1054 |
- bashcomp_alias scontrol \ |
1055 |
- sreport sacctmgr squeue scancel sshare sbcast sinfo \ |
1056 |
- sprio sacct salloc sbatch srun sattach sdiag sstat |
1057 |
- # install systemd files |
1058 |
- systemd_newtmpfilesd "${FILESDIR}/slurm.tmpfiles" slurm.conf |
1059 |
- systemd_dounit etc/slurmd.service etc/slurmctld.service etc/slurmdbd.service |
1060 |
-} |
1061 |
- |
1062 |
-pkg_preinst() { |
1063 |
- if use munge; then |
1064 |
- sed -i 's,\(SLURM_USE_MUNGE=\).*,\11,' "${D}"/etc/conf.d/slurm || die |
1065 |
- fi |
1066 |
-} |
1067 |
- |
1068 |
-create_folders_and_fix_permissions() { |
1069 |
- einfo "Fixing permissions in ${@}" |
1070 |
- mkdir -p ${@} || die |
1071 |
- chown -R ${PN}:${PN} ${@} || die |
1072 |
-} |
1073 |
- |
1074 |
-pkg_postinst() { |
1075 |
- paths=( |
1076 |
- "${EROOT}"/var/${PN}/checkpoint |
1077 |
- "${EROOT}"/var/${PN} |
1078 |
- "${EROOT}"/var/spool/${PN}/slurmd |
1079 |
- "${EROOT}"/var/spool/${PN} |
1080 |
- "${EROOT}"/var/log/${PN} |
1081 |
- /var/tmp/${PN}/${PN}d |
1082 |
- /var/tmp/${PN} |
1083 |
- /run/${PN} |
1084 |
- ) |
1085 |
- local folder_path |
1086 |
- for folder_path in ${paths[@]}; do |
1087 |
- create_folders_and_fix_permissions $folder_path |
1088 |
- done |
1089 |
- echo |
1090 |
- |
1091 |
- elog "Please visit the file '/usr/share/doc/${P}/html/configurator.html" |
1092 |
- elog "through a (javascript enabled) browser to create a configureation file." |
1093 |
- elog "Copy that file to /etc/slurm/slurm.conf on all nodes (including the headnode) of your cluster." |
1094 |
- echo |
1095 |
- elog "For cgroup support, please see https://www.schedmd.com/slurmdocs/cgroup.conf.html" |
1096 |
- elog "Your kernel must be compiled with the wanted cgroup feature:" |
1097 |
- elog " For the proctrack plugin:" |
1098 |
- elog " freezer" |
1099 |
- elog " For the task plugin:" |
1100 |
- elog " cpuset, memory, devices" |
1101 |
- elog " For the accounting plugin:" |
1102 |
- elog " cpuacct, memory, blkio" |
1103 |
- elog "Then, set these options in /etc/slurm/slurm.conf:" |
1104 |
- elog " ProctrackType=proctrack/cgroup" |
1105 |
- elog " TaskPlugin=task/cgroup" |
1106 |
- einfo |
1107 |
- ewarn "Paths were created for slurm. Please use these paths in /etc/slurm/slurm.conf:" |
1108 |
- for folder_path in ${paths[@]}; do |
1109 |
- ewarn " ${folder_path}" |
1110 |
- done |
1111 |
-} |