1 |
commit: 3ee03f951945af53592a94c3ff9ff900e2e9095c |
2 |
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 29 12:59:07 2020 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 29 13:00:03 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ee03f95 |
7 |
|
8 |
sys-cluster/slurm: Version bump (v20.02.0.1) |
9 |
|
10 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
11 |
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org> |
12 |
|
13 |
sys-cluster/slurm/Manifest | 1 + |
14 |
sys-cluster/slurm/slurm-20.02.0.1.ebuild | 261 +++++++++++++++++++++++++++++++ |
15 |
2 files changed, 262 insertions(+) |
16 |
|
17 |
diff --git a/sys-cluster/slurm/Manifest b/sys-cluster/slurm/Manifest |
18 |
index 8bb13bbfd2a..156435a049b 100644 |
19 |
--- a/sys-cluster/slurm/Manifest |
20 |
+++ b/sys-cluster/slurm/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST slurm-19-05-4-1.tar.gz 8446001 BLAKE2B d3b1524a72d7969b14788b93c7d64b03faf159b71b1ed8fb30782980b7b39e9f4a1d1435f4fbdce722ed9585e7d3285f9a84322c5a5d2f44d5e084bb38019ae4 SHA512 ecee26b23fc72ea4b6eb3039aada1814b5932d75eaf61501a31b97ac8f7b600864f2429a36de068f1f1cde178fa1383f2c53192af5b1a62766e3ffe48be4395c |
23 |
DIST slurm-19-05-5-1.tar.gz 8447611 BLAKE2B 052d6a9c7e196546a2a7ca0c8e324d3728177e06a6b82150d6888cf5f6aa4b0f6612e09e928b2224be412971b4e40318d3b03e27068ed7c2256036a417ebf9c5 SHA512 612ce1c476de3d08d4003c48df65883880e697652ef8b0847cd87719e91196f489409b27c67ef040ab9ffe0c9d824cdae6441608e9af9619abcf11ebf0d464be |
24 |
+DIST slurm-20-02-0-1.tar.gz 8657581 BLAKE2B 402bb9c9a87055940ca525eb5c5e37cb62ad8957ae626682109e885834e6e17e93e3964f65b66c17c5ecc611271bd19709290f7ab79398c8c6b5aa762e476b50 SHA512 2c27133c8598cbb4ad0e6d186732f83cfb1b12460fddd89646b41a4d7c8239afff795db22345216f76ba5b666f1d5c2642dcfcbf38285f66d748424b60f9598a |
25 |
|
26 |
diff --git a/sys-cluster/slurm/slurm-20.02.0.1.ebuild b/sys-cluster/slurm/slurm-20.02.0.1.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..10e2d81f7ef |
29 |
--- /dev/null |
30 |
+++ b/sys-cluster/slurm/slurm-20.02.0.1.ebuild |
31 |
@@ -0,0 +1,261 @@ |
32 |
+# Copyright 1999-2020 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+if [[ ${PV} == *9999* ]]; then |
38 |
+ EGIT_REPO_URI="https://github.com/SchedMD/slurm.git" |
39 |
+ INHERIT_GIT="git-r3" |
40 |
+ MY_P="${P}" |
41 |
+else |
42 |
+ if [[ ${PV} == *pre* || ${PV} == *rc* ]]; then |
43 |
+ MY_PV=$(ver_rs '-0.') # pre-releases or release-candidate |
44 |
+ else |
45 |
+ MY_PV=$(ver_rs 1-3 '-') # stable releases |
46 |
+ fi |
47 |
+ MY_P="${PN}-${MY_PV}" |
48 |
+ INHERIT_GIT="" |
49 |
+ SRC_URI="https://github.com/SchedMD/slurm/archive/${MY_P}.tar.gz" |
50 |
+ KEYWORDS="~amd64 ~x86" |
51 |
+fi |
52 |
+ |
53 |
+inherit autotools bash-completion-r1 pam perl-module prefix toolchain-funcs systemd ${INHERIT_GIT} |
54 |
+ |
55 |
+DESCRIPTION="A Highly Scalable Resource Manager" |
56 |
+HOMEPAGE="https://www.schedmd.com https://github.com/SchedMD/slurm" |
57 |
+ |
58 |
+LICENSE="GPL-2" |
59 |
+SLOT="0" |
60 |
+IUSE="debug hdf5 html ipmi json lua multiple-slurmd +munge mysql netloc numa ofed pam perl slurmdbd static-libs ucx torque X" |
61 |
+ |
62 |
+COMMON_DEPEND=" |
63 |
+ !sys-cluster/torque |
64 |
+ !net-analyzer/slurm |
65 |
+ !net-analyzer/sinfo |
66 |
+ || ( sys-cluster/pmix[-pmi] >=sys-cluster/openmpi-2.0.0 ) |
67 |
+ mysql? ( |
68 |
+ || ( dev-db/mariadb-connector-c dev-db/mysql-connector-c ) |
69 |
+ slurmdbd? ( || ( dev-db/mariadb dev-db/mysql ) ) |
70 |
+ ) |
71 |
+ munge? ( sys-auth/munge ) |
72 |
+ pam? ( sys-libs/pam ) |
73 |
+ lua? ( dev-lang/lua:0= ) |
74 |
+ !lua? ( !dev-lang/lua ) |
75 |
+ ipmi? ( sys-libs/freeipmi ) |
76 |
+ json? ( dev-libs/json-c:= ) |
77 |
+ amd64? ( netloc? ( sys-apps/netloc ) ) |
78 |
+ hdf5? ( sci-libs/hdf5:= ) |
79 |
+ numa? ( sys-process/numactl ) |
80 |
+ ofed? ( sys-fabric/ofed ) |
81 |
+ ucx? ( sys-cluster/ucx ) |
82 |
+ X? ( net-libs/libssh2 ) |
83 |
+ >=sys-apps/hwloc-1.1.1-r1 |
84 |
+ sys-libs/ncurses:0= |
85 |
+ app-arch/lz4:0= |
86 |
+ sys-libs/readline:0=" |
87 |
+DEPEND="${COMMON_DEPEND} |
88 |
+ html? ( sys-apps/man2html )" |
89 |
+RDEPEND="${OMMON_DEPEND} |
90 |
+ acct-user/slurm |
91 |
+ acct-group/slurm |
92 |
+ dev-libs/libcgroup" |
93 |
+ |
94 |
+REQUIRED_USE="torque? ( perl )" |
95 |
+ |
96 |
+S="${WORKDIR}/${PN}-${MY_P}" |
97 |
+ |
98 |
+LIBSLURM_PERL_S="${S}/contribs/perlapi/libslurm/perl" |
99 |
+LIBSLURMDB_PERL_S="${S}/contribs/perlapi/libslurmdb/perl" |
100 |
+ |
101 |
+RESTRICT="test" |
102 |
+ |
103 |
+src_unpack() { |
104 |
+ if [[ ${PV} == *9999* ]]; then |
105 |
+ git-r3_src_unpack |
106 |
+ else |
107 |
+ default |
108 |
+ fi |
109 |
+} |
110 |
+ |
111 |
+src_prepare() { |
112 |
+ tc-ld-disable-gold |
113 |
+ default |
114 |
+ |
115 |
+ # pids should go to /var/run/slurm |
116 |
+ sed \ |
117 |
+ -e 's:/tmp:/var/tmp:g' \ |
118 |
+ -e "s:/var/run/slurmctld.pid:${EPREFIX}/run/slurm/slurmctld.pid:g" \ |
119 |
+ -e "s:/var/run/slurmd.pid:${EPREFIX}/run/slurm/slurmd.pid:g" \ |
120 |
+ -e "s:StateSaveLocation=.*:StateSaveLocation=${EPREFIX}/var/spool/slurm:g" \ |
121 |
+ -e "s:SlurmdSpoolDir=.*:SlurmdSpoolDir=${EPREFIX}/var/spool/slurm/slurmd:g" \ |
122 |
+ -i "${S}/etc/slurm.conf.example" \ |
123 |
+ || die "Can't sed for /var/run/slurmctld.pid" |
124 |
+ sed \ |
125 |
+ -e "s:/var/run/slurmdbd.pid:${EPREFIX}/run/slurm/slurmdbd.pid:g" \ |
126 |
+ -i "${S}/etc/slurmdbd.conf.example" \ |
127 |
+ || die "Can't sed for /var/run/slurmdbd.pid" |
128 |
+ # gentooify systemd services |
129 |
+ sed \ |
130 |
+ -e 's:sysconfig/.*:conf.d/slurm:g' \ |
131 |
+ -e 's:var/run/:run/slurm/:g' \ |
132 |
+ -e '/^EnvironmentFile=.*/d' \ |
133 |
+ -i "${S}/etc"/*.service.in \ |
134 |
+ || die "Can't sed systemd services for sysconfig or var/run/" |
135 |
+ |
136 |
+ hprefixify auxdir/{ax_check_zlib,x_ac_{lz4,ofed,munge}}.m4 |
137 |
+ eautoreconf |
138 |
+} |
139 |
+ |
140 |
+src_configure() { |
141 |
+ local myconf=( |
142 |
+ --sysconfdir="${EPREFIX}/etc/${PN}" |
143 |
+ --with-hwloc="${EPREFIX}/usr" |
144 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}" |
145 |
+ ) |
146 |
+ use pam && myconf+=( --with-pam_dir=$(getpam_mod_dir) ) |
147 |
+ use mysql || myconf+=( --without-mysql_config ) |
148 |
+ use amd64 && myconf+=( $(use_with netloc) ) |
149 |
+ econf "${myconf[@]}" \ |
150 |
+ $(use_enable debug) \ |
151 |
+ $(use_enable pam) \ |
152 |
+ $(use_enable X x11) \ |
153 |
+ $(use_with munge) \ |
154 |
+ $(use_with json) \ |
155 |
+ $(use_with hdf5) \ |
156 |
+ $(use_with ofed) \ |
157 |
+ $(use_with ucx) \ |
158 |
+ $(use_enable static-libs static) \ |
159 |
+ $(use_enable multiple-slurmd) |
160 |
+ |
161 |
+ # --htmldir does not seems to propagate... Documentations are installed |
162 |
+ # in /usr/share/doc/slurm-2.3.0/html |
163 |
+ # instead of /usr/share/doc/slurm-2.3.0.2/html |
164 |
+ sed \ |
165 |
+ -e "s|htmldir = .*/html|htmldir = \${prefix}/share/doc/slurm-${PVR}/html|g" \ |
166 |
+ -i doc/html/Makefile || die |
167 |
+ if use perl ; then |
168 |
+ # small hack to make it compile |
169 |
+ mkdir -p "${S}/src/api/.libs" || die |
170 |
+ mkdir -p "${S}/src/db_api/.libs" || die |
171 |
+ touch "${S}/src/api/.libs/libslurm.so" || die |
172 |
+ touch "${S}/src/db_api/.libs/libslurmdb.so" || die |
173 |
+ cd "${LIBSLURM_PERL_S}" || die |
174 |
+ S="${LIBSLURM_PERL_S}" SRC_PREP="no" perl-module_src_configure |
175 |
+ cd "${LIBSLURMDB_PERL_S}" || die |
176 |
+ S="${LIBSLURMDB_PERL_S}" SRC_PREP="no" perl-module_src_configure |
177 |
+ cd "${S}" || die |
178 |
+ rm -rf "${S}/src/api/.libs" "${S}/src/db_api/.libs" || die |
179 |
+ fi |
180 |
+} |
181 |
+ |
182 |
+src_compile() { |
183 |
+ default |
184 |
+ use pam && emake -C contribs/pam |
185 |
+ if use perl ; then |
186 |
+ cd "${LIBSLURM_PERL_S}" || die |
187 |
+ S="${LIBSLURM_PERL_S}" perl-module_src_compile |
188 |
+ cd "${LIBSLURMDB_PERL_S}" || die |
189 |
+ S="${LIBSLURMDB_PERL_S}" perl-module_src_compile |
190 |
+ cd "${S}" || die |
191 |
+ fi |
192 |
+ use torque && emake -C contribs/torque |
193 |
+} |
194 |
+ |
195 |
+src_install() { |
196 |
+ default |
197 |
+ use pam && emake DESTDIR="${D}" -C contribs/pam install |
198 |
+ if use perl; then |
199 |
+ cd "${LIBSLURM_PERL_S}" || die |
200 |
+ S="${LIBSLURM_PERL_S}" perl-module_src_install |
201 |
+ cd "${LIBSLURMDB_PERL_S}" || die |
202 |
+ S="${LIBSLURMDB_PERL_S}" perl-module_src_install |
203 |
+ cd "${S}" || die |
204 |
+ fi |
205 |
+ if use torque; then |
206 |
+ emake DESTDIR="${D}" -C contribs/torque |
207 |
+ rm -f "${D}"/usr/bin/mpiexec || die |
208 |
+ fi |
209 |
+ use static-libs || find "${ED}" -name '*.la' -exec rm {} + |
210 |
+ # install sample configs |
211 |
+ keepdir /etc/slurm |
212 |
+ insinto /etc/slurm |
213 |
+ doins \ |
214 |
+ etc/prolog.example \ |
215 |
+ etc/cgroup.conf.example \ |
216 |
+ etc/slurm.conf.example \ |
217 |
+ etc/slurmdbd.conf.example |
218 |
+ exeinto /etc/slurm |
219 |
+ keepdir /etc/slurm/layouts.d |
220 |
+ insinto /etc/slurm/layouts.d |
221 |
+ newins etc/layouts.d.power.conf.example power.conf.example |
222 |
+ newins etc/layouts.d.power_cpufreq.conf.example power_cpufreq.conf.example |
223 |
+ newins etc/layouts.d.unit.conf.example unit.conf.example |
224 |
+ # install init.d files |
225 |
+ newinitd "$(prefixify_ro "${FILESDIR}/slurmd.initd")" slurmd |
226 |
+ newinitd "$(prefixify_ro "${FILESDIR}/slurmctld.initd")" slurmctld |
227 |
+ newinitd "$(prefixify_ro "${FILESDIR}/slurmdbd.initd")" slurmdbd |
228 |
+ # install conf.d files |
229 |
+ newconfd "${FILESDIR}/slurm.confd" slurm |
230 |
+ # install logrotate file |
231 |
+ insinto /etc/logrotate.d |
232 |
+ newins "${FILESDIR}/logrotate" slurm |
233 |
+ # install bashcomp |
234 |
+ newbashcomp contribs/slurm_completion_help/slurm_completion.sh scontrol |
235 |
+ bashcomp_alias scontrol \ |
236 |
+ sreport sacctmgr squeue scancel sshare sbcast sinfo \ |
237 |
+ sprio sacct salloc sbatch srun sattach sdiag sstat |
238 |
+ # install systemd files |
239 |
+ systemd_newtmpfilesd "${FILESDIR}/slurm.tmpfiles" slurm.conf |
240 |
+ systemd_dounit etc/slurmd.service etc/slurmctld.service etc/slurmdbd.service |
241 |
+} |
242 |
+ |
243 |
+pkg_preinst() { |
244 |
+ if use munge; then |
245 |
+ sed -i 's,\(SLURM_USE_MUNGE=\).*,\11,' "${D}"/etc/conf.d/slurm || die |
246 |
+ fi |
247 |
+} |
248 |
+ |
249 |
+create_folders_and_fix_permissions() { |
250 |
+ einfo "Fixing permissions in ${@}" |
251 |
+ mkdir -p ${@} || die |
252 |
+ chown -R ${PN}:${PN} ${@} || die |
253 |
+} |
254 |
+ |
255 |
+pkg_postinst() { |
256 |
+ paths=( |
257 |
+ "${EROOT}"/var/${PN}/checkpoint |
258 |
+ "${EROOT}"/var/${PN} |
259 |
+ "${EROOT}"/var/spool/${PN}/slurmd |
260 |
+ "${EROOT}"/var/spool/${PN} |
261 |
+ "${EROOT}"/var/log/${PN} |
262 |
+ /var/tmp/${PN}/${PN}d |
263 |
+ /var/tmp/${PN} |
264 |
+ /run/${PN} |
265 |
+ ) |
266 |
+ local folder_path |
267 |
+ for folder_path in ${paths[@]}; do |
268 |
+ create_folders_and_fix_permissions $folder_path |
269 |
+ done |
270 |
+ echo |
271 |
+ |
272 |
+ elog "Please visit the file '/usr/share/doc/${P}/html/configurator.html" |
273 |
+ elog "through a (javascript enabled) browser to create a configureation file." |
274 |
+ elog "Copy that file to /etc/slurm/slurm.conf on all nodes (including the headnode) of your cluster." |
275 |
+ echo |
276 |
+ elog "For cgroup support, please see https://www.schedmd.com/slurmdocs/cgroup.conf.html" |
277 |
+ elog "Your kernel must be compiled with the wanted cgroup feature:" |
278 |
+ elog " For the proctrack plugin:" |
279 |
+ elog " freezer" |
280 |
+ elog " For the task plugin:" |
281 |
+ elog " cpuset, memory, devices" |
282 |
+ elog " For the accounting plugin:" |
283 |
+ elog " cpuacct, memory, blkio" |
284 |
+ elog "Then, set these options in /etc/slurm/slurm.conf:" |
285 |
+ elog " ProctrackType=proctrack/cgroup" |
286 |
+ elog " TaskPlugin=task/cgroup" |
287 |
+ einfo |
288 |
+ ewarn "Paths were created for slurm. Please use these paths in /etc/slurm/slurm.conf:" |
289 |
+ for folder_path in ${paths[@]}; do |
290 |
+ ewarn " ${folder_path}" |
291 |
+ done |
292 |
+} |