1 |
commit: 06bdd71742105d3f8691ed43f54accc70bf9af6f |
2 |
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 1 12:13:10 2020 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 1 12:13:20 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06bdd717 |
7 |
|
8 |
sys-cluster/slurm: Version bump (v20.11.0.1) |
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 | 1 + |
14 |
sys-cluster/slurm/slurm-20.11.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 719a485c8a9..882131982a9 100644 |
19 |
--- a/sys-cluster/slurm/Manifest |
20 |
+++ b/sys-cluster/slurm/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST slurm-20-02-4-1.tar.gz 8689917 BLAKE2B 69d78b7f82065f7ca1c869c0648012cc23e746c81b1a76d612d96fe2c6c66cc2fc1727a1e164a0f6d338b568c45bb1ac78b815181325a3982957683b77ae60d5 SHA512 932989a3c03468783d244d9925472fb9bb4dd0007a91dccc37a3b12763ed81902ad0dc039b8527526bde58f7540d056727df4cdab7581182b028f67e597fb7d5 |
23 |
DIST slurm-20-02-5-1.tar.gz 8690263 BLAKE2B dd05ea11cd59385135d8988b6490d3aea6aed9e487afb8e920fc5104408fb8b440c8e8af85732f888841d5d7f9a09e95e3df7cb91b5d0fa855ff9b2127265263 SHA512 3eaeee276453ab9aea4f0eb921e8172a912b86d59a93756fc0b83a8c08eeda04c9f3cf64a33d2eab0b8e8daefb19c0e0bfcb895a5aefb327eaf18ed4e216161d |
24 |
+DIST slurm-20-11-0-1.tar.gz 8762691 BLAKE2B 1e24a04b3faf97f4df98bd982d67d47f79670b863f466326e45e00fac0b99124122e94e30054a97471e4337234cbd213806791bdd5b3bddfeb05bef55f42931e SHA512 9a57f2610f7294ba6cd265746b874e32a7930100f30c0adf41d95b261787c441bdcacaa641f0b9785150b94fc7d6b5b7608ec618f668bffcae6f774752f17678 |
25 |
|
26 |
diff --git a/sys-cluster/slurm/slurm-20.11.0.1.ebuild b/sys-cluster/slurm/slurm-20.11.0.1.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..e74fe466f7e |
29 |
--- /dev/null |
30 |
+++ b/sys-cluster/slurm/slurm-20.11.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-4 '-') # 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 >=sys-apps/hwloc-2.1.0[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 |
+ |
88 |
+DEPEND="${COMMON_DEPEND} |
89 |
+ html? ( sys-apps/man2html )" |
90 |
+ |
91 |
+RDEPEND="${COMMON_DEPEND} |
92 |
+ acct-user/slurm |
93 |
+ acct-group/slurm |
94 |
+ dev-libs/libcgroup" |
95 |
+ |
96 |
+REQUIRED_USE="torque? ( perl )" |
97 |
+ |
98 |
+S="${WORKDIR}/${PN}-${MY_P}" |
99 |
+ |
100 |
+LIBSLURM_PERL_S="${S}/contribs/perlapi/libslurm/perl" |
101 |
+LIBSLURMDB_PERL_S="${S}/contribs/perlapi/libslurmdb/perl" |
102 |
+ |
103 |
+RESTRICT="test" |
104 |
+ |
105 |
+src_unpack() { |
106 |
+ if [[ ${PV} == *9999* ]]; then |
107 |
+ git-r3_src_unpack |
108 |
+ else |
109 |
+ default |
110 |
+ fi |
111 |
+} |
112 |
+ |
113 |
+src_prepare() { |
114 |
+ tc-ld-disable-gold |
115 |
+ default |
116 |
+ |
117 |
+ # pids should go to /var/run/slurm |
118 |
+ sed \ |
119 |
+ -e 's:/tmp:/var/tmp:g' \ |
120 |
+ -e "s:/var/run/slurmctld.pid:${EPREFIX}/run/slurm/slurmctld.pid:g" \ |
121 |
+ -e "s:/var/run/slurmd.pid:${EPREFIX}/run/slurm/slurmd.pid:g" \ |
122 |
+ -e "s:StateSaveLocation=.*:StateSaveLocation=${EPREFIX}/var/spool/slurm:g" \ |
123 |
+ -e "s:SlurmdSpoolDir=.*:SlurmdSpoolDir=${EPREFIX}/var/spool/slurm/slurmd:g" \ |
124 |
+ -i "${S}/etc/slurm.conf.example" \ |
125 |
+ || die "Can't sed for /var/run/slurmctld.pid" |
126 |
+ sed \ |
127 |
+ -e "s:/var/run/slurmdbd.pid:${EPREFIX}/run/slurm/slurmdbd.pid:g" \ |
128 |
+ -i "${S}/etc/slurmdbd.conf.example" \ |
129 |
+ || die "Can't sed for /var/run/slurmdbd.pid" |
130 |
+ # gentooify systemd services |
131 |
+ sed \ |
132 |
+ -e 's:sysconfig/.*:conf.d/slurm:g' \ |
133 |
+ -e 's:var/run/:run/slurm/:g' \ |
134 |
+ -e '/^EnvironmentFile=.*/d' \ |
135 |
+ -i "${S}/etc"/*.service.in \ |
136 |
+ || die "Can't sed systemd services for sysconfig or var/run/" |
137 |
+ |
138 |
+ sed -e '/AM_PATH_GTK_2_0/d' -i configure.ac || die |
139 |
+ |
140 |
+ hprefixify auxdir/{ax_check_zlib,x_ac_{lz4,ofed,munge}}.m4 |
141 |
+ eautoreconf |
142 |
+} |
143 |
+ |
144 |
+src_configure() { |
145 |
+ local myconf=( |
146 |
+ --sysconfdir="${EPREFIX}/etc/${PN}" |
147 |
+ --with-hwloc="${EPREFIX}/usr" |
148 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}" |
149 |
+ ) |
150 |
+ use pam && myconf+=( --with-pam_dir=$(getpam_mod_dir) ) |
151 |
+ use mysql || myconf+=( --without-mysql_config ) |
152 |
+ use amd64 && myconf+=( $(use_with netloc) ) |
153 |
+ econf "${myconf[@]}" \ |
154 |
+ $(use_enable debug) \ |
155 |
+ $(use_enable pam) \ |
156 |
+ $(use_enable X x11) \ |
157 |
+ $(use_with munge) \ |
158 |
+ $(use_with json) \ |
159 |
+ $(use_with hdf5) \ |
160 |
+ $(use_with ofed) \ |
161 |
+ $(use_with ucx) \ |
162 |
+ $(use_enable static-libs static) \ |
163 |
+ $(use_enable multiple-slurmd) |
164 |
+ |
165 |
+ # --htmldir does not seems to propagate... Documentations are installed |
166 |
+ # in /usr/share/doc/slurm-2.3.0/html |
167 |
+ # instead of /usr/share/doc/slurm-2.3.0.2/html |
168 |
+ sed \ |
169 |
+ -e "s|htmldir = .*/html|htmldir = \${prefix}/share/doc/slurm-${PVR}/html|g" \ |
170 |
+ -i doc/html/Makefile || die |
171 |
+ if use perl ; then |
172 |
+ # small hack to make it compile |
173 |
+ mkdir -p "${S}/src/api/.libs" || die |
174 |
+ mkdir -p "${S}/src/db_api/.libs" || die |
175 |
+ touch "${S}/src/api/.libs/libslurm.so" || die |
176 |
+ touch "${S}/src/db_api/.libs/libslurmdb.so" || die |
177 |
+ cd "${LIBSLURM_PERL_S}" || die |
178 |
+ S="${LIBSLURM_PERL_S}" SRC_PREP="no" perl-module_src_configure |
179 |
+ cd "${LIBSLURMDB_PERL_S}" || die |
180 |
+ S="${LIBSLURMDB_PERL_S}" SRC_PREP="no" perl-module_src_configure |
181 |
+ cd "${S}" || die |
182 |
+ rm -rf "${S}/src/api/.libs" "${S}/src/db_api/.libs" || die |
183 |
+ fi |
184 |
+} |
185 |
+ |
186 |
+src_compile() { |
187 |
+ default |
188 |
+ use pam && emake -C contribs/pam |
189 |
+ if use perl ; then |
190 |
+ cd "${LIBSLURM_PERL_S}" || die |
191 |
+ S="${LIBSLURM_PERL_S}" perl-module_src_compile |
192 |
+ cd "${LIBSLURMDB_PERL_S}" || die |
193 |
+ S="${LIBSLURMDB_PERL_S}" perl-module_src_compile |
194 |
+ cd "${S}" || die |
195 |
+ fi |
196 |
+ use torque && emake -C contribs/torque |
197 |
+} |
198 |
+ |
199 |
+src_install() { |
200 |
+ default |
201 |
+ use pam && emake DESTDIR="${D}" -C contribs/pam install |
202 |
+ if use perl; then |
203 |
+ cd "${LIBSLURM_PERL_S}" || die |
204 |
+ S="${LIBSLURM_PERL_S}" perl-module_src_install |
205 |
+ cd "${LIBSLURMDB_PERL_S}" || die |
206 |
+ S="${LIBSLURMDB_PERL_S}" perl-module_src_install |
207 |
+ cd "${S}" || die |
208 |
+ fi |
209 |
+ if use torque; then |
210 |
+ emake DESTDIR="${D}" -C contribs/torque |
211 |
+ rm -f "${D}"/usr/bin/mpiexec || die |
212 |
+ fi |
213 |
+ use static-libs || find "${ED}" -name '*.la' -exec rm {} + |
214 |
+ # install sample configs |
215 |
+ keepdir /etc/slurm |
216 |
+ insinto /etc/slurm |
217 |
+ doins \ |
218 |
+ etc/prolog.example \ |
219 |
+ etc/cgroup.conf.example \ |
220 |
+ etc/slurm.conf.example \ |
221 |
+ etc/slurmdbd.conf.example |
222 |
+ exeinto /etc/slurm |
223 |
+ keepdir /etc/slurm/layouts.d |
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 |
+} |