1 |
commit: f1e50c073e77c9979e71d4fda0f8d21b99f4d2d1 |
2 |
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 1 12:15:53 2020 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 1 12:15:53 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1e50c07 |
7 |
|
8 |
sys-cluster/slurm: Drop old |
9 |
|
10 |
Package-Manager: Portage-3.0.8, Repoman-3.0.2 |
11 |
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org> |
12 |
|
13 |
sys-cluster/slurm/Manifest | 2 - |
14 |
sys-cluster/slurm/slurm-20.02.4.1.ebuild | 265 ------------------------------- |
15 |
sys-cluster/slurm/slurm-20.02.5.1.ebuild | 265 ------------------------------- |
16 |
3 files changed, 532 deletions(-) |
17 |
|
18 |
diff --git a/sys-cluster/slurm/Manifest b/sys-cluster/slurm/Manifest |
19 |
index 882131982a9..ba0ae40fe89 100644 |
20 |
--- a/sys-cluster/slurm/Manifest |
21 |
+++ b/sys-cluster/slurm/Manifest |
22 |
@@ -1,3 +1 @@ |
23 |
-DIST slurm-20-02-4-1.tar.gz 8689917 BLAKE2B 69d78b7f82065f7ca1c869c0648012cc23e746c81b1a76d612d96fe2c6c66cc2fc1727a1e164a0f6d338b568c45bb1ac78b815181325a3982957683b77ae60d5 SHA512 932989a3c03468783d244d9925472fb9bb4dd0007a91dccc37a3b12763ed81902ad0dc039b8527526bde58f7540d056727df4cdab7581182b028f67e597fb7d5 |
24 |
-DIST slurm-20-02-5-1.tar.gz 8690263 BLAKE2B dd05ea11cd59385135d8988b6490d3aea6aed9e487afb8e920fc5104408fb8b440c8e8af85732f888841d5d7f9a09e95e3df7cb91b5d0fa855ff9b2127265263 SHA512 3eaeee276453ab9aea4f0eb921e8172a912b86d59a93756fc0b83a8c08eeda04c9f3cf64a33d2eab0b8e8daefb19c0e0bfcb895a5aefb327eaf18ed4e216161d |
25 |
DIST slurm-20-11-0-1.tar.gz 8762691 BLAKE2B 1e24a04b3faf97f4df98bd982d67d47f79670b863f466326e45e00fac0b99124122e94e30054a97471e4337234cbd213806791bdd5b3bddfeb05bef55f42931e SHA512 9a57f2610f7294ba6cd265746b874e32a7930100f30c0adf41d95b261787c441bdcacaa641f0b9785150b94fc7d6b5b7608ec618f668bffcae6f774752f17678 |
26 |
|
27 |
diff --git a/sys-cluster/slurm/slurm-20.02.4.1.ebuild b/sys-cluster/slurm/slurm-20.02.4.1.ebuild |
28 |
deleted file mode 100644 |
29 |
index 74a772b3b66..00000000000 |
30 |
--- a/sys-cluster/slurm/slurm-20.02.4.1.ebuild |
31 |
+++ /dev/null |
32 |
@@ -1,265 +0,0 @@ |
33 |
-# Copyright 1999-2020 Gentoo Authors |
34 |
-# Distributed under the terms of the GNU General Public License v2 |
35 |
- |
36 |
-EAPI=7 |
37 |
- |
38 |
-if [[ ${PV} == *9999* ]]; then |
39 |
- EGIT_REPO_URI="https://github.com/SchedMD/slurm.git" |
40 |
- INHERIT_GIT="git-r3" |
41 |
- MY_P="${P}" |
42 |
-else |
43 |
- if [[ ${PV} == *pre* || ${PV} == *rc* ]]; then |
44 |
- MY_PV=$(ver_rs '-0.') # pre-releases or release-candidate |
45 |
- else |
46 |
- MY_PV=$(ver_rs 1-4 '-') # stable releases |
47 |
- fi |
48 |
- MY_P="${PN}-${MY_PV}" |
49 |
- INHERIT_GIT="" |
50 |
- SRC_URI="https://github.com/SchedMD/slurm/archive/${MY_P}.tar.gz" |
51 |
- KEYWORDS="~amd64 ~x86" |
52 |
-fi |
53 |
- |
54 |
-inherit autotools bash-completion-r1 pam perl-module prefix toolchain-funcs systemd ${INHERIT_GIT} |
55 |
- |
56 |
-DESCRIPTION="A Highly Scalable Resource Manager" |
57 |
-HOMEPAGE="https://www.schedmd.com https://github.com/SchedMD/slurm" |
58 |
- |
59 |
-LICENSE="GPL-2" |
60 |
-SLOT="0" |
61 |
-IUSE="debug hdf5 html ipmi json lua multiple-slurmd +munge mysql netloc numa ofed pam perl slurmdbd static-libs ucx torque X" |
62 |
- |
63 |
-COMMON_DEPEND=" |
64 |
- !sys-cluster/torque |
65 |
- !net-analyzer/slurm |
66 |
- !net-analyzer/sinfo |
67 |
- || ( sys-cluster/pmix[-pmi] >=sys-cluster/openmpi-2.0.0 ) |
68 |
- mysql? ( |
69 |
- || ( dev-db/mariadb-connector-c dev-db/mysql-connector-c ) |
70 |
- slurmdbd? ( || ( dev-db/mariadb:* dev-db/mysql:* ) ) |
71 |
- ) |
72 |
- munge? ( sys-auth/munge ) |
73 |
- pam? ( sys-libs/pam ) |
74 |
- lua? ( dev-lang/lua:0= ) |
75 |
- !lua? ( !dev-lang/lua ) |
76 |
- ipmi? ( sys-libs/freeipmi ) |
77 |
- json? ( dev-libs/json-c:= ) |
78 |
- amd64? ( netloc? ( || ( sys-apps/netloc >=sys-apps/hwloc-2.1.0[netloc] ) ) ) |
79 |
- hdf5? ( sci-libs/hdf5:= ) |
80 |
- numa? ( sys-process/numactl ) |
81 |
- ofed? ( sys-fabric/ofed ) |
82 |
- ucx? ( sys-cluster/ucx ) |
83 |
- X? ( net-libs/libssh2 ) |
84 |
- >=sys-apps/hwloc-1.1.1-r1 |
85 |
- sys-libs/ncurses:0= |
86 |
- app-arch/lz4:0= |
87 |
- sys-libs/readline:0=" |
88 |
- |
89 |
-DEPEND="${COMMON_DEPEND} |
90 |
- html? ( sys-apps/man2html )" |
91 |
- |
92 |
-RDEPEND="${COMMON_DEPEND} |
93 |
- acct-user/slurm |
94 |
- acct-group/slurm |
95 |
- dev-libs/libcgroup" |
96 |
- |
97 |
-REQUIRED_USE="torque? ( perl )" |
98 |
- |
99 |
-S="${WORKDIR}/${PN}-${MY_P}" |
100 |
- |
101 |
-LIBSLURM_PERL_S="${S}/contribs/perlapi/libslurm/perl" |
102 |
-LIBSLURMDB_PERL_S="${S}/contribs/perlapi/libslurmdb/perl" |
103 |
- |
104 |
-RESTRICT="test" |
105 |
- |
106 |
-src_unpack() { |
107 |
- if [[ ${PV} == *9999* ]]; then |
108 |
- git-r3_src_unpack |
109 |
- else |
110 |
- default |
111 |
- fi |
112 |
-} |
113 |
- |
114 |
-src_prepare() { |
115 |
- tc-ld-disable-gold |
116 |
- default |
117 |
- |
118 |
- # pids should go to /var/run/slurm |
119 |
- sed \ |
120 |
- -e 's:/tmp:/var/tmp:g' \ |
121 |
- -e "s:/var/run/slurmctld.pid:${EPREFIX}/run/slurm/slurmctld.pid:g" \ |
122 |
- -e "s:/var/run/slurmd.pid:${EPREFIX}/run/slurm/slurmd.pid:g" \ |
123 |
- -e "s:StateSaveLocation=.*:StateSaveLocation=${EPREFIX}/var/spool/slurm:g" \ |
124 |
- -e "s:SlurmdSpoolDir=.*:SlurmdSpoolDir=${EPREFIX}/var/spool/slurm/slurmd:g" \ |
125 |
- -i "${S}/etc/slurm.conf.example" \ |
126 |
- || die "Can't sed for /var/run/slurmctld.pid" |
127 |
- sed \ |
128 |
- -e "s:/var/run/slurmdbd.pid:${EPREFIX}/run/slurm/slurmdbd.pid:g" \ |
129 |
- -i "${S}/etc/slurmdbd.conf.example" \ |
130 |
- || die "Can't sed for /var/run/slurmdbd.pid" |
131 |
- # gentooify systemd services |
132 |
- sed \ |
133 |
- -e 's:sysconfig/.*:conf.d/slurm:g' \ |
134 |
- -e 's:var/run/:run/slurm/:g' \ |
135 |
- -e '/^EnvironmentFile=.*/d' \ |
136 |
- -i "${S}/etc"/*.service.in \ |
137 |
- || die "Can't sed systemd services for sysconfig or var/run/" |
138 |
- |
139 |
- sed -e '/AM_PATH_GTK_2_0/d' -i configure.ac || die |
140 |
- |
141 |
- hprefixify auxdir/{ax_check_zlib,x_ac_{lz4,ofed,munge}}.m4 |
142 |
- eautoreconf |
143 |
-} |
144 |
- |
145 |
-src_configure() { |
146 |
- local myconf=( |
147 |
- --sysconfdir="${EPREFIX}/etc/${PN}" |
148 |
- --with-hwloc="${EPREFIX}/usr" |
149 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}" |
150 |
- ) |
151 |
- use pam && myconf+=( --with-pam_dir=$(getpam_mod_dir) ) |
152 |
- use mysql || myconf+=( --without-mysql_config ) |
153 |
- use amd64 && myconf+=( $(use_with netloc) ) |
154 |
- econf "${myconf[@]}" \ |
155 |
- $(use_enable debug) \ |
156 |
- $(use_enable pam) \ |
157 |
- $(use_enable X x11) \ |
158 |
- $(use_with munge) \ |
159 |
- $(use_with json) \ |
160 |
- $(use_with hdf5) \ |
161 |
- $(use_with ofed) \ |
162 |
- $(use_with ucx) \ |
163 |
- $(use_enable static-libs static) \ |
164 |
- $(use_enable multiple-slurmd) |
165 |
- |
166 |
- # --htmldir does not seems to propagate... Documentations are installed |
167 |
- # in /usr/share/doc/slurm-2.3.0/html |
168 |
- # instead of /usr/share/doc/slurm-2.3.0.2/html |
169 |
- sed \ |
170 |
- -e "s|htmldir = .*/html|htmldir = \${prefix}/share/doc/slurm-${PVR}/html|g" \ |
171 |
- -i doc/html/Makefile || die |
172 |
- if use perl ; then |
173 |
- # small hack to make it compile |
174 |
- mkdir -p "${S}/src/api/.libs" || die |
175 |
- mkdir -p "${S}/src/db_api/.libs" || die |
176 |
- touch "${S}/src/api/.libs/libslurm.so" || die |
177 |
- touch "${S}/src/db_api/.libs/libslurmdb.so" || die |
178 |
- cd "${LIBSLURM_PERL_S}" || die |
179 |
- S="${LIBSLURM_PERL_S}" SRC_PREP="no" perl-module_src_configure |
180 |
- cd "${LIBSLURMDB_PERL_S}" || die |
181 |
- S="${LIBSLURMDB_PERL_S}" SRC_PREP="no" perl-module_src_configure |
182 |
- cd "${S}" || die |
183 |
- rm -rf "${S}/src/api/.libs" "${S}/src/db_api/.libs" || die |
184 |
- fi |
185 |
-} |
186 |
- |
187 |
-src_compile() { |
188 |
- default |
189 |
- use pam && emake -C contribs/pam |
190 |
- if use perl ; then |
191 |
- cd "${LIBSLURM_PERL_S}" || die |
192 |
- S="${LIBSLURM_PERL_S}" perl-module_src_compile |
193 |
- cd "${LIBSLURMDB_PERL_S}" || die |
194 |
- S="${LIBSLURMDB_PERL_S}" perl-module_src_compile |
195 |
- cd "${S}" || die |
196 |
- fi |
197 |
- use torque && emake -C contribs/torque |
198 |
-} |
199 |
- |
200 |
-src_install() { |
201 |
- default |
202 |
- use pam && emake DESTDIR="${D}" -C contribs/pam install |
203 |
- if use perl; then |
204 |
- cd "${LIBSLURM_PERL_S}" || die |
205 |
- S="${LIBSLURM_PERL_S}" perl-module_src_install |
206 |
- cd "${LIBSLURMDB_PERL_S}" || die |
207 |
- S="${LIBSLURMDB_PERL_S}" perl-module_src_install |
208 |
- cd "${S}" || die |
209 |
- fi |
210 |
- if use torque; then |
211 |
- emake DESTDIR="${D}" -C contribs/torque |
212 |
- rm -f "${D}"/usr/bin/mpiexec || die |
213 |
- fi |
214 |
- use static-libs || find "${ED}" -name '*.la' -exec rm {} + |
215 |
- # install sample configs |
216 |
- keepdir /etc/slurm |
217 |
- insinto /etc/slurm |
218 |
- doins \ |
219 |
- etc/prolog.example \ |
220 |
- etc/cgroup.conf.example \ |
221 |
- etc/slurm.conf.example \ |
222 |
- etc/slurmdbd.conf.example |
223 |
- exeinto /etc/slurm |
224 |
- keepdir /etc/slurm/layouts.d |
225 |
- insinto /etc/slurm/layouts.d |
226 |
- newins etc/layouts.d.power.conf.example power.conf.example |
227 |
- newins etc/layouts.d.power_cpufreq.conf.example power_cpufreq.conf.example |
228 |
- newins etc/layouts.d.unit.conf.example unit.conf.example |
229 |
- # install init.d files |
230 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmd.initd")" slurmd |
231 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmctld.initd")" slurmctld |
232 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmdbd.initd")" slurmdbd |
233 |
- # install conf.d files |
234 |
- newconfd "${FILESDIR}/slurm.confd" slurm |
235 |
- # install logrotate file |
236 |
- insinto /etc/logrotate.d |
237 |
- newins "${FILESDIR}/logrotate" slurm |
238 |
- # install bashcomp |
239 |
- newbashcomp contribs/slurm_completion_help/slurm_completion.sh scontrol |
240 |
- bashcomp_alias scontrol \ |
241 |
- sreport sacctmgr squeue scancel sshare sbcast sinfo \ |
242 |
- sprio sacct salloc sbatch srun sattach sdiag sstat |
243 |
- # install systemd files |
244 |
- systemd_newtmpfilesd "${FILESDIR}/slurm.tmpfiles" slurm.conf |
245 |
- systemd_dounit etc/slurmd.service etc/slurmctld.service etc/slurmdbd.service |
246 |
-} |
247 |
- |
248 |
-pkg_preinst() { |
249 |
- if use munge; then |
250 |
- sed -i 's,\(SLURM_USE_MUNGE=\).*,\11,' "${D}"/etc/conf.d/slurm || die |
251 |
- fi |
252 |
-} |
253 |
- |
254 |
-create_folders_and_fix_permissions() { |
255 |
- einfo "Fixing permissions in ${@}" |
256 |
- mkdir -p ${@} || die |
257 |
- chown -R ${PN}:${PN} ${@} || die |
258 |
-} |
259 |
- |
260 |
-pkg_postinst() { |
261 |
- paths=( |
262 |
- "${EROOT}"/var/${PN}/checkpoint |
263 |
- "${EROOT}"/var/${PN} |
264 |
- "${EROOT}"/var/spool/${PN}/slurmd |
265 |
- "${EROOT}"/var/spool/${PN} |
266 |
- "${EROOT}"/var/log/${PN} |
267 |
- /var/tmp/${PN}/${PN}d |
268 |
- /var/tmp/${PN} |
269 |
- /run/${PN} |
270 |
- ) |
271 |
- local folder_path |
272 |
- for folder_path in ${paths[@]}; do |
273 |
- create_folders_and_fix_permissions $folder_path |
274 |
- done |
275 |
- echo |
276 |
- |
277 |
- elog "Please visit the file '/usr/share/doc/${P}/html/configurator.html" |
278 |
- elog "through a (javascript enabled) browser to create a configureation file." |
279 |
- elog "Copy that file to /etc/slurm/slurm.conf on all nodes (including the headnode) of your cluster." |
280 |
- echo |
281 |
- elog "For cgroup support, please see https://www.schedmd.com/slurmdocs/cgroup.conf.html" |
282 |
- elog "Your kernel must be compiled with the wanted cgroup feature:" |
283 |
- elog " For the proctrack plugin:" |
284 |
- elog " freezer" |
285 |
- elog " For the task plugin:" |
286 |
- elog " cpuset, memory, devices" |
287 |
- elog " For the accounting plugin:" |
288 |
- elog " cpuacct, memory, blkio" |
289 |
- elog "Then, set these options in /etc/slurm/slurm.conf:" |
290 |
- elog " ProctrackType=proctrack/cgroup" |
291 |
- elog " TaskPlugin=task/cgroup" |
292 |
- einfo |
293 |
- ewarn "Paths were created for slurm. Please use these paths in /etc/slurm/slurm.conf:" |
294 |
- for folder_path in ${paths[@]}; do |
295 |
- ewarn " ${folder_path}" |
296 |
- done |
297 |
-} |
298 |
|
299 |
diff --git a/sys-cluster/slurm/slurm-20.02.5.1.ebuild b/sys-cluster/slurm/slurm-20.02.5.1.ebuild |
300 |
deleted file mode 100644 |
301 |
index 74a772b3b66..00000000000 |
302 |
--- a/sys-cluster/slurm/slurm-20.02.5.1.ebuild |
303 |
+++ /dev/null |
304 |
@@ -1,265 +0,0 @@ |
305 |
-# Copyright 1999-2020 Gentoo Authors |
306 |
-# Distributed under the terms of the GNU General Public License v2 |
307 |
- |
308 |
-EAPI=7 |
309 |
- |
310 |
-if [[ ${PV} == *9999* ]]; then |
311 |
- EGIT_REPO_URI="https://github.com/SchedMD/slurm.git" |
312 |
- INHERIT_GIT="git-r3" |
313 |
- MY_P="${P}" |
314 |
-else |
315 |
- if [[ ${PV} == *pre* || ${PV} == *rc* ]]; then |
316 |
- MY_PV=$(ver_rs '-0.') # pre-releases or release-candidate |
317 |
- else |
318 |
- MY_PV=$(ver_rs 1-4 '-') # stable releases |
319 |
- fi |
320 |
- MY_P="${PN}-${MY_PV}" |
321 |
- INHERIT_GIT="" |
322 |
- SRC_URI="https://github.com/SchedMD/slurm/archive/${MY_P}.tar.gz" |
323 |
- KEYWORDS="~amd64 ~x86" |
324 |
-fi |
325 |
- |
326 |
-inherit autotools bash-completion-r1 pam perl-module prefix toolchain-funcs systemd ${INHERIT_GIT} |
327 |
- |
328 |
-DESCRIPTION="A Highly Scalable Resource Manager" |
329 |
-HOMEPAGE="https://www.schedmd.com https://github.com/SchedMD/slurm" |
330 |
- |
331 |
-LICENSE="GPL-2" |
332 |
-SLOT="0" |
333 |
-IUSE="debug hdf5 html ipmi json lua multiple-slurmd +munge mysql netloc numa ofed pam perl slurmdbd static-libs ucx torque X" |
334 |
- |
335 |
-COMMON_DEPEND=" |
336 |
- !sys-cluster/torque |
337 |
- !net-analyzer/slurm |
338 |
- !net-analyzer/sinfo |
339 |
- || ( sys-cluster/pmix[-pmi] >=sys-cluster/openmpi-2.0.0 ) |
340 |
- mysql? ( |
341 |
- || ( dev-db/mariadb-connector-c dev-db/mysql-connector-c ) |
342 |
- slurmdbd? ( || ( dev-db/mariadb:* dev-db/mysql:* ) ) |
343 |
- ) |
344 |
- munge? ( sys-auth/munge ) |
345 |
- pam? ( sys-libs/pam ) |
346 |
- lua? ( dev-lang/lua:0= ) |
347 |
- !lua? ( !dev-lang/lua ) |
348 |
- ipmi? ( sys-libs/freeipmi ) |
349 |
- json? ( dev-libs/json-c:= ) |
350 |
- amd64? ( netloc? ( || ( sys-apps/netloc >=sys-apps/hwloc-2.1.0[netloc] ) ) ) |
351 |
- hdf5? ( sci-libs/hdf5:= ) |
352 |
- numa? ( sys-process/numactl ) |
353 |
- ofed? ( sys-fabric/ofed ) |
354 |
- ucx? ( sys-cluster/ucx ) |
355 |
- X? ( net-libs/libssh2 ) |
356 |
- >=sys-apps/hwloc-1.1.1-r1 |
357 |
- sys-libs/ncurses:0= |
358 |
- app-arch/lz4:0= |
359 |
- sys-libs/readline:0=" |
360 |
- |
361 |
-DEPEND="${COMMON_DEPEND} |
362 |
- html? ( sys-apps/man2html )" |
363 |
- |
364 |
-RDEPEND="${COMMON_DEPEND} |
365 |
- acct-user/slurm |
366 |
- acct-group/slurm |
367 |
- dev-libs/libcgroup" |
368 |
- |
369 |
-REQUIRED_USE="torque? ( perl )" |
370 |
- |
371 |
-S="${WORKDIR}/${PN}-${MY_P}" |
372 |
- |
373 |
-LIBSLURM_PERL_S="${S}/contribs/perlapi/libslurm/perl" |
374 |
-LIBSLURMDB_PERL_S="${S}/contribs/perlapi/libslurmdb/perl" |
375 |
- |
376 |
-RESTRICT="test" |
377 |
- |
378 |
-src_unpack() { |
379 |
- if [[ ${PV} == *9999* ]]; then |
380 |
- git-r3_src_unpack |
381 |
- else |
382 |
- default |
383 |
- fi |
384 |
-} |
385 |
- |
386 |
-src_prepare() { |
387 |
- tc-ld-disable-gold |
388 |
- default |
389 |
- |
390 |
- # pids should go to /var/run/slurm |
391 |
- sed \ |
392 |
- -e 's:/tmp:/var/tmp:g' \ |
393 |
- -e "s:/var/run/slurmctld.pid:${EPREFIX}/run/slurm/slurmctld.pid:g" \ |
394 |
- -e "s:/var/run/slurmd.pid:${EPREFIX}/run/slurm/slurmd.pid:g" \ |
395 |
- -e "s:StateSaveLocation=.*:StateSaveLocation=${EPREFIX}/var/spool/slurm:g" \ |
396 |
- -e "s:SlurmdSpoolDir=.*:SlurmdSpoolDir=${EPREFIX}/var/spool/slurm/slurmd:g" \ |
397 |
- -i "${S}/etc/slurm.conf.example" \ |
398 |
- || die "Can't sed for /var/run/slurmctld.pid" |
399 |
- sed \ |
400 |
- -e "s:/var/run/slurmdbd.pid:${EPREFIX}/run/slurm/slurmdbd.pid:g" \ |
401 |
- -i "${S}/etc/slurmdbd.conf.example" \ |
402 |
- || die "Can't sed for /var/run/slurmdbd.pid" |
403 |
- # gentooify systemd services |
404 |
- sed \ |
405 |
- -e 's:sysconfig/.*:conf.d/slurm:g' \ |
406 |
- -e 's:var/run/:run/slurm/:g' \ |
407 |
- -e '/^EnvironmentFile=.*/d' \ |
408 |
- -i "${S}/etc"/*.service.in \ |
409 |
- || die "Can't sed systemd services for sysconfig or var/run/" |
410 |
- |
411 |
- sed -e '/AM_PATH_GTK_2_0/d' -i configure.ac || die |
412 |
- |
413 |
- hprefixify auxdir/{ax_check_zlib,x_ac_{lz4,ofed,munge}}.m4 |
414 |
- eautoreconf |
415 |
-} |
416 |
- |
417 |
-src_configure() { |
418 |
- local myconf=( |
419 |
- --sysconfdir="${EPREFIX}/etc/${PN}" |
420 |
- --with-hwloc="${EPREFIX}/usr" |
421 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}" |
422 |
- ) |
423 |
- use pam && myconf+=( --with-pam_dir=$(getpam_mod_dir) ) |
424 |
- use mysql || myconf+=( --without-mysql_config ) |
425 |
- use amd64 && myconf+=( $(use_with netloc) ) |
426 |
- econf "${myconf[@]}" \ |
427 |
- $(use_enable debug) \ |
428 |
- $(use_enable pam) \ |
429 |
- $(use_enable X x11) \ |
430 |
- $(use_with munge) \ |
431 |
- $(use_with json) \ |
432 |
- $(use_with hdf5) \ |
433 |
- $(use_with ofed) \ |
434 |
- $(use_with ucx) \ |
435 |
- $(use_enable static-libs static) \ |
436 |
- $(use_enable multiple-slurmd) |
437 |
- |
438 |
- # --htmldir does not seems to propagate... Documentations are installed |
439 |
- # in /usr/share/doc/slurm-2.3.0/html |
440 |
- # instead of /usr/share/doc/slurm-2.3.0.2/html |
441 |
- sed \ |
442 |
- -e "s|htmldir = .*/html|htmldir = \${prefix}/share/doc/slurm-${PVR}/html|g" \ |
443 |
- -i doc/html/Makefile || die |
444 |
- if use perl ; then |
445 |
- # small hack to make it compile |
446 |
- mkdir -p "${S}/src/api/.libs" || die |
447 |
- mkdir -p "${S}/src/db_api/.libs" || die |
448 |
- touch "${S}/src/api/.libs/libslurm.so" || die |
449 |
- touch "${S}/src/db_api/.libs/libslurmdb.so" || die |
450 |
- cd "${LIBSLURM_PERL_S}" || die |
451 |
- S="${LIBSLURM_PERL_S}" SRC_PREP="no" perl-module_src_configure |
452 |
- cd "${LIBSLURMDB_PERL_S}" || die |
453 |
- S="${LIBSLURMDB_PERL_S}" SRC_PREP="no" perl-module_src_configure |
454 |
- cd "${S}" || die |
455 |
- rm -rf "${S}/src/api/.libs" "${S}/src/db_api/.libs" || die |
456 |
- fi |
457 |
-} |
458 |
- |
459 |
-src_compile() { |
460 |
- default |
461 |
- use pam && emake -C contribs/pam |
462 |
- if use perl ; then |
463 |
- cd "${LIBSLURM_PERL_S}" || die |
464 |
- S="${LIBSLURM_PERL_S}" perl-module_src_compile |
465 |
- cd "${LIBSLURMDB_PERL_S}" || die |
466 |
- S="${LIBSLURMDB_PERL_S}" perl-module_src_compile |
467 |
- cd "${S}" || die |
468 |
- fi |
469 |
- use torque && emake -C contribs/torque |
470 |
-} |
471 |
- |
472 |
-src_install() { |
473 |
- default |
474 |
- use pam && emake DESTDIR="${D}" -C contribs/pam install |
475 |
- if use perl; then |
476 |
- cd "${LIBSLURM_PERL_S}" || die |
477 |
- S="${LIBSLURM_PERL_S}" perl-module_src_install |
478 |
- cd "${LIBSLURMDB_PERL_S}" || die |
479 |
- S="${LIBSLURMDB_PERL_S}" perl-module_src_install |
480 |
- cd "${S}" || die |
481 |
- fi |
482 |
- if use torque; then |
483 |
- emake DESTDIR="${D}" -C contribs/torque |
484 |
- rm -f "${D}"/usr/bin/mpiexec || die |
485 |
- fi |
486 |
- use static-libs || find "${ED}" -name '*.la' -exec rm {} + |
487 |
- # install sample configs |
488 |
- keepdir /etc/slurm |
489 |
- insinto /etc/slurm |
490 |
- doins \ |
491 |
- etc/prolog.example \ |
492 |
- etc/cgroup.conf.example \ |
493 |
- etc/slurm.conf.example \ |
494 |
- etc/slurmdbd.conf.example |
495 |
- exeinto /etc/slurm |
496 |
- keepdir /etc/slurm/layouts.d |
497 |
- insinto /etc/slurm/layouts.d |
498 |
- newins etc/layouts.d.power.conf.example power.conf.example |
499 |
- newins etc/layouts.d.power_cpufreq.conf.example power_cpufreq.conf.example |
500 |
- newins etc/layouts.d.unit.conf.example unit.conf.example |
501 |
- # install init.d files |
502 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmd.initd")" slurmd |
503 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmctld.initd")" slurmctld |
504 |
- newinitd "$(prefixify_ro "${FILESDIR}/slurmdbd.initd")" slurmdbd |
505 |
- # install conf.d files |
506 |
- newconfd "${FILESDIR}/slurm.confd" slurm |
507 |
- # install logrotate file |
508 |
- insinto /etc/logrotate.d |
509 |
- newins "${FILESDIR}/logrotate" slurm |
510 |
- # install bashcomp |
511 |
- newbashcomp contribs/slurm_completion_help/slurm_completion.sh scontrol |
512 |
- bashcomp_alias scontrol \ |
513 |
- sreport sacctmgr squeue scancel sshare sbcast sinfo \ |
514 |
- sprio sacct salloc sbatch srun sattach sdiag sstat |
515 |
- # install systemd files |
516 |
- systemd_newtmpfilesd "${FILESDIR}/slurm.tmpfiles" slurm.conf |
517 |
- systemd_dounit etc/slurmd.service etc/slurmctld.service etc/slurmdbd.service |
518 |
-} |
519 |
- |
520 |
-pkg_preinst() { |
521 |
- if use munge; then |
522 |
- sed -i 's,\(SLURM_USE_MUNGE=\).*,\11,' "${D}"/etc/conf.d/slurm || die |
523 |
- fi |
524 |
-} |
525 |
- |
526 |
-create_folders_and_fix_permissions() { |
527 |
- einfo "Fixing permissions in ${@}" |
528 |
- mkdir -p ${@} || die |
529 |
- chown -R ${PN}:${PN} ${@} || die |
530 |
-} |
531 |
- |
532 |
-pkg_postinst() { |
533 |
- paths=( |
534 |
- "${EROOT}"/var/${PN}/checkpoint |
535 |
- "${EROOT}"/var/${PN} |
536 |
- "${EROOT}"/var/spool/${PN}/slurmd |
537 |
- "${EROOT}"/var/spool/${PN} |
538 |
- "${EROOT}"/var/log/${PN} |
539 |
- /var/tmp/${PN}/${PN}d |
540 |
- /var/tmp/${PN} |
541 |
- /run/${PN} |
542 |
- ) |
543 |
- local folder_path |
544 |
- for folder_path in ${paths[@]}; do |
545 |
- create_folders_and_fix_permissions $folder_path |
546 |
- done |
547 |
- echo |
548 |
- |
549 |
- elog "Please visit the file '/usr/share/doc/${P}/html/configurator.html" |
550 |
- elog "through a (javascript enabled) browser to create a configureation file." |
551 |
- elog "Copy that file to /etc/slurm/slurm.conf on all nodes (including the headnode) of your cluster." |
552 |
- echo |
553 |
- elog "For cgroup support, please see https://www.schedmd.com/slurmdocs/cgroup.conf.html" |
554 |
- elog "Your kernel must be compiled with the wanted cgroup feature:" |
555 |
- elog " For the proctrack plugin:" |
556 |
- elog " freezer" |
557 |
- elog " For the task plugin:" |
558 |
- elog " cpuset, memory, devices" |
559 |
- elog " For the accounting plugin:" |
560 |
- elog " cpuacct, memory, blkio" |
561 |
- elog "Then, set these options in /etc/slurm/slurm.conf:" |
562 |
- elog " ProctrackType=proctrack/cgroup" |
563 |
- elog " TaskPlugin=task/cgroup" |
564 |
- einfo |
565 |
- ewarn "Paths were created for slurm. Please use these paths in /etc/slurm/slurm.conf:" |
566 |
- for folder_path in ${paths[@]}; do |
567 |
- ewarn " ${folder_path}" |
568 |
- done |
569 |
-} |