From: "Alexey Shvetsov" <alexxy@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/slurm/
Date: Mon, 25 May 2020 19:46:42 +0000 (UTC) [thread overview]
Message-ID: <1590435987.742fa1d6fa947439c72884ebe6193627f0f7539c.alexxy@gentoo> (raw)
commit: 742fa1d6fa947439c72884ebe6193627f0f7539c
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Thu May 14 18:45:27 2020 +0000
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Mon May 25 19:46:27 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=742fa1d6
sys-cluster/slurm: improve netloc dep, disable-static
netloc will be provided by hwloc[netloc] from now on
changes reflect that
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/15795
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>
sys-cluster/slurm/slurm-20.02.2.1-r1.ebuild | 267 ++++++++++++++++++++++++++++
1 file changed, 267 insertions(+)
diff --git a/sys-cluster/slurm/slurm-20.02.2.1-r1.ebuild b/sys-cluster/slurm/slurm-20.02.2.1-r1.ebuild
new file mode 100644
index 00000000000..1a37f7c41a8
--- /dev/null
+++ b/sys-cluster/slurm/slurm-20.02.2.1-r1.ebuild
@@ -0,0 +1,267 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+if [[ "${PV}" == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/SchedMD/slurm.git"
+ INHERIT_GIT="git-r3"
+ MY_P="${P}"
+else
+ if [[ "${PV}" == *pre* || "${PV}" == *rc* ]]; then
+ MY_PV=$(ver_rs '-0.') # pre-releases or release-candidate
+ else
+ MY_PV=$(ver_rs 1-3 '-') # stable releases
+ fi
+ MY_P="${PN}-${MY_PV}"
+ INHERIT_GIT=""
+ SRC_URI="https://github.com/SchedMD/slurm/archive/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+inherit autotools bash-completion-r1 pam perl-module prefix toolchain-funcs systemd ${INHERIT_GIT}
+
+DESCRIPTION="A Highly Scalable Resource Manager"
+HOMEPAGE="https://www.schedmd.com https://github.com/SchedMD/slurm"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug hdf5 html ipmi json lua multiple-slurmd +munge mysql netloc numa ofed pam perl slurmdbd ucx torque X"
+
+COMMON_DEPEND="
+ app-arch/lz4:0=
+ !net-analyzer/slurm
+ !net-analyzer/sinfo
+ >=sys-apps/hwloc-1.1.1-r1
+ !sys-cluster/torque
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+
+ || ( sys-cluster/pmix[-pmi] >=sys-cluster/openmpi-2.0.0 )
+
+ amd64? ( netloc? ( || ( >=sys-apps/hwloc-2.1.0[netloc] sys-apps/netloc ) ) )
+ hdf5? ( sci-libs/hdf5:= )
+ ipmi? ( sys-libs/freeipmi )
+ json? ( dev-libs/json-c:= )
+ lua? ( dev-lang/lua:0= )
+ !lua? ( !dev-lang/lua )
+ mysql? (
+ || ( dev-db/mariadb-connector-c dev-db/mysql-connector-c )
+ slurmdbd? ( || ( dev-db/mariadb dev-db/mysql ) )
+ )
+ munge? ( sys-auth/munge )
+ numa? ( sys-process/numactl )
+ ofed? ( sys-fabric/ofed )
+ pam? ( sys-libs/pam )
+ ucx? ( sys-cluster/ucx )
+ X? ( net-libs/libssh2 )
+"
+DEPEND="${COMMON_DEPEND}
+ html? ( sys-apps/man2html )
+"
+RDEPEND="${COMMON_DEPEND}
+ acct-user/slurm
+ acct-group/slurm
+ dev-libs/libcgroup
+"
+REQUIRED_USE="torque? ( perl )"
+
+S="${WORKDIR}/${PN}-${MY_P}"
+
+LIBSLURM_PERL_S="${S}/contribs/perlapi/libslurm/perl"
+LIBSLURMDB_PERL_S="${S}/contribs/perlapi/libslurmdb/perl"
+
+RESTRICT="test"
+
+src_unpack() {
+ if [[ "${PV}" == *9999* ]]; then
+ git-r3_src_unpack
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ tc-ld-disable-gold
+ default
+
+ # pids should go to /var/run/slurm
+ sed \
+ -e 's:/tmp:/var/tmp:g' \
+ -e "s:/var/run/slurmctld.pid:${EPREFIX}/run/slurm/slurmctld.pid:g" \
+ -e "s:/var/run/slurmd.pid:${EPREFIX}/run/slurm/slurmd.pid:g" \
+ -e "s:StateSaveLocation=.*:StateSaveLocation=${EPREFIX}/var/spool/slurm:g" \
+ -e "s:SlurmdSpoolDir=.*:SlurmdSpoolDir=${EPREFIX}/var/spool/slurm/slurmd:g" \
+ -i "${S}/etc/slurm.conf.example" \
+ || die "Can't sed for /var/run/slurmctld.pid"
+ sed \
+ -e "s:/var/run/slurmdbd.pid:${EPREFIX}/run/slurm/slurmdbd.pid:g" \
+ -i "${S}/etc/slurmdbd.conf.example" \
+ || die "Can't sed for /var/run/slurmdbd.pid"
+ # gentooify systemd services
+ sed \
+ -e 's:sysconfig/.*:conf.d/slurm:g' \
+ -e 's:var/run/:run/slurm/:g' \
+ -e '/^EnvironmentFile=.*/d' \
+ -i "${S}/etc"/*.service.in \
+ || die "Can't sed systemd services for sysconfig or var/run/"
+
+ sed -e '/AM_PATH_GTK_2_0/d' -i configure.ac || die
+
+ hprefixify auxdir/{ax_check_zlib,x_ac_{lz4,ofed,munge}}.m4
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ $(use_enable debug)
+ $(use_enable multiple-slurmd)
+ $(use_enable pam)
+ $(use_enable X x11)
+ $(use_with hdf5)
+ $(use_with json)
+ $(use_with munge)
+ $(use_with ofed)
+ $(use_with ucx)
+ --disable-static
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}"
+ --sysconfdir="${EPREFIX}/etc/${PN}"
+ --with-hwloc="${EPREFIX}/usr"
+ )
+ use pam && myconf+=( --with-pam_dir=$(getpam_mod_dir) )
+ use mysql || myconf+=( --without-mysql_config )
+ use amd64 && myconf+=( $(use_with netloc) )
+ econf "${myconf[@]}"
+
+ # --htmldir does not seems to propagate... Documentations are installed
+ # in /usr/share/doc/slurm-2.3.0/html
+ # instead of /usr/share/doc/slurm-2.3.0.2/html
+ sed \
+ -e "s|htmldir = .*/html|htmldir = \${prefix}/share/doc/slurm-${PVR}/html|g" \
+ -i doc/html/Makefile || die
+ if use perl ; then
+ # small hack to make it compile
+ mkdir -p "${S}/src/api/.libs" || die
+ mkdir -p "${S}/src/db_api/.libs" || die
+ touch "${S}/src/api/.libs/libslurm.so" || die
+ touch "${S}/src/db_api/.libs/libslurmdb.so" || die
+ cd "${LIBSLURM_PERL_S}" || die
+ S="${LIBSLURM_PERL_S}" SRC_PREP="no" perl-module_src_configure
+ cd "${LIBSLURMDB_PERL_S}" || die
+ S="${LIBSLURMDB_PERL_S}" SRC_PREP="no" perl-module_src_configure
+ cd "${S}" || die
+ rm -rf "${S}/src/api/.libs" "${S}/src/db_api/.libs" || die
+ fi
+}
+
+src_compile() {
+ default
+ use pam && emake -C contribs/pam
+ if use perl ; then
+ cd "${LIBSLURM_PERL_S}" || die
+ S="${LIBSLURM_PERL_S}" perl-module_src_compile
+ cd "${LIBSLURMDB_PERL_S}" || die
+ S="${LIBSLURMDB_PERL_S}" perl-module_src_compile
+ cd "${S}" || die
+ fi
+ use torque && emake -C contribs/torque
+}
+
+src_install() {
+ default
+ use pam && emake DESTDIR="${D}" -C contribs/pam install
+ if use perl; then
+ cd "${LIBSLURM_PERL_S}" || die
+ S="${LIBSLURM_PERL_S}" perl-module_src_install
+ cd "${LIBSLURMDB_PERL_S}" || die
+ S="${LIBSLURMDB_PERL_S}" perl-module_src_install
+ cd "${S}" || die
+ fi
+ if use torque; then
+ emake DESTDIR="${D}" -C contribs/torque
+ rm -f "${D}"/usr/bin/mpiexec || die
+ fi
+ find "${ED}" -name '*.la' -exec rm {} +
+ # install sample configs
+ keepdir /etc/slurm
+ insinto /etc/slurm
+ doins \
+ etc/prolog.example \
+ etc/cgroup.conf.example \
+ etc/slurm.conf.example \
+ etc/slurmdbd.conf.example
+ exeinto /etc/slurm
+ keepdir /etc/slurm/layouts.d
+ insinto /etc/slurm/layouts.d
+ newins etc/layouts.d.power.conf.example power.conf.example
+ newins etc/layouts.d.power_cpufreq.conf.example power_cpufreq.conf.example
+ newins etc/layouts.d.unit.conf.example unit.conf.example
+ # install init.d files
+ newinitd "$(prefixify_ro "${FILESDIR}/slurmd.initd")" slurmd
+ newinitd "$(prefixify_ro "${FILESDIR}/slurmctld.initd")" slurmctld
+ newinitd "$(prefixify_ro "${FILESDIR}/slurmdbd.initd")" slurmdbd
+ # install conf.d files
+ newconfd "${FILESDIR}/slurm.confd" slurm
+ # install logrotate file
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/logrotate" slurm
+ # install bashcomp
+ newbashcomp contribs/slurm_completion_help/slurm_completion.sh scontrol
+ bashcomp_alias scontrol \
+ sreport sacctmgr squeue scancel sshare sbcast sinfo \
+ sprio sacct salloc sbatch srun sattach sdiag sstat
+ # install systemd files
+ systemd_newtmpfilesd "${FILESDIR}/slurm.tmpfiles" slurm.conf
+ systemd_dounit etc/slurmd.service etc/slurmctld.service etc/slurmdbd.service
+}
+
+pkg_preinst() {
+ if use munge; then
+ sed -i 's,\(SLURM_USE_MUNGE=\).*,\11,' "${D}"/etc/conf.d/slurm || die
+ fi
+}
+
+create_folders_and_fix_permissions() {
+ einfo "Fixing permissions in ${@}"
+ mkdir -p ${@} || die
+ chown -R ${PN}:${PN} ${@} || die
+}
+
+pkg_postinst() {
+ paths=(
+ "${EROOT}/var/${PN}/checkpoint"
+ "${EROOT}/var/${PN}"
+ "${EROOT}/var/spool/${PN}/slurmd"
+ "${EROOT}/var/spool/${PN}"
+ "${EROOT}/var/log/${PN}"
+ "/var/tmp/${PN}/${PN}d"
+ "/var/tmp/${PN}"
+ "/run/${PN}"
+ )
+ local folder_path
+ for folder_path in ${paths[@]}; do
+ create_folders_and_fix_permissions $folder_path
+ done
+ echo
+
+ elog "Please visit the file '/usr/share/doc/${P}/html/configurator.html"
+ elog "through a (javascript enabled) browser to create a configureation file."
+ elog "Copy that file to /etc/slurm/slurm.conf on all nodes (including the headnode) of your cluster."
+ echo
+ elog "For cgroup support, please see https://www.schedmd.com/slurmdocs/cgroup.conf.html"
+ elog "Your kernel must be compiled with the wanted cgroup feature:"
+ elog " For the proctrack plugin:"
+ elog " freezer"
+ elog " For the task plugin:"
+ elog " cpuset, memory, devices"
+ elog " For the accounting plugin:"
+ elog " cpuacct, memory, blkio"
+ elog "Then, set these options in /etc/slurm/slurm.conf:"
+ elog " ProctrackType=proctrack/cgroup"
+ elog " TaskPlugin=task/cgroup"
+ einfo
+ ewarn "Paths were created for slurm. Please use these paths in /etc/slurm/slurm.conf:"
+ for folder_path in ${paths[@]}; do
+ ewarn " ${folder_path}"
+ done
+}
next reply other threads:[~2020-05-25 19:46 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-25 19:46 Alexey Shvetsov [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-18 13:47 [gentoo-commits] repo/gentoo:master commit in: sys-cluster/slurm/ Benda XU
2024-10-18 13:47 Benda XU
2024-10-18 13:47 Benda XU
2022-10-27 4:48 Sam James
2022-10-06 11:14 Joonas Niilola
2022-09-15 8:06 Alexey Shvetsov
2022-07-09 8:38 David Seifert
2022-06-26 7:02 Sam James
2022-02-02 6:21 Sam James
2022-02-02 5:30 Sam James
2022-01-16 18:47 David Seifert
2021-10-29 22:44 Sam James
2021-10-12 7:06 Sam James
2021-07-30 23:31 Sam James
2021-07-05 19:38 Marek Szuba
2021-07-05 19:38 Marek Szuba
2021-03-25 23:31 Conrad Kostecki
2021-03-13 17:24 David Seifert
2021-03-07 11:58 David Seifert
2021-01-05 15:17 Mikle Kolyada
2020-12-01 12:16 Mikle Kolyada
2020-12-01 12:13 Mikle Kolyada
2020-09-20 13:07 Mikle Kolyada
2020-09-20 13:07 Mikle Kolyada
2020-08-29 10:10 Mikle Kolyada
2020-07-26 1:53 Thomas Deutschmann
2020-06-07 10:54 Mikle Kolyada
2020-05-25 20:47 Alexey Shvetsov
2020-05-22 10:39 Mikle Kolyada
2020-05-22 10:38 Mikle Kolyada
2020-05-14 14:21 Mikle Kolyada
2020-05-14 14:21 Mikle Kolyada
2020-03-27 13:30 Mikle Kolyada
2020-03-27 13:23 Mikle Kolyada
2020-02-29 13:00 Mikle Kolyada
2019-12-21 11:11 Mikle Kolyada
2019-12-21 9:46 Mikle Kolyada
2019-12-21 9:05 Mikle Kolyada
2019-12-21 8:59 Mikle Kolyada
2019-12-21 8:25 Mikle Kolyada
2019-12-01 8:56 Mikle Kolyada
2019-11-15 15:04 Mikle Kolyada
2019-10-20 20:27 Mikle Kolyada
2019-10-20 19:35 Mikle Kolyada
2019-10-20 18:35 Mikle Kolyada
2019-10-20 17:26 Mikle Kolyada
2019-10-20 16:50 Mikle Kolyada
2019-10-12 18:40 Mikle Kolyada
2019-10-06 18:07 Mikle Kolyada
2018-10-27 12:15 Justin Lecher
2018-06-10 9:41 Justin Lecher
2017-11-26 17:17 Justin Lecher
2017-11-26 17:17 Justin Lecher
2017-11-12 19:56 Justin Lecher
2017-07-30 9:23 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1590435987.742fa1d6fa947439c72884ebe6193627f0f7539c.alexxy@gentoo \
--to=alexxy@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox