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