From: Alexey Shvetsov Date: Wed, 26 Oct 2011 14:05:31 +0000 (+0000) Subject: [sys-cluster/slurm] Added torque pbs compatibility layer X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=32b10c2679263343727ea44c195451ecd10af37a;p=gentoo.git [sys-cluster/slurm] Added torque pbs compatibility layer Package-Manager: portage-2.2.0_alpha71/cvs/Linux x86_64 --- diff --git a/sys-cluster/slurm/ChangeLog b/sys-cluster/slurm/ChangeLog index ea05d8abf0a6..ac968dc5964b 100644 --- a/sys-cluster/slurm/ChangeLog +++ b/sys-cluster/slurm/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-cluster/slurm # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/slurm/ChangeLog,v 1.5 2011/08/31 15:32:17 alexxy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/slurm/ChangeLog,v 1.6 2011/10/26 14:05:31 alexxy Exp $ + +*slurm-2.2.7-r2 (26 Oct 2011) + + 26 Oct 2011; Alexey Shvetsov +slurm-2.2.7-r2.ebuild, + metadata.xml: + Added torque pbs compatibility layer *slurm-2.2.7-r1 (31 Aug 2011) diff --git a/sys-cluster/slurm/Manifest b/sys-cluster/slurm/Manifest index 756c4325b343..ea4cb597533b 100644 --- a/sys-cluster/slurm/Manifest +++ b/sys-cluster/slurm/Manifest @@ -7,22 +7,23 @@ AUX slurmd.initd 1125 RMD160 1b5f8a9a719ebfa05125c597cb5d3bf149e9a6e0 SHA1 08b82 AUX slurmdbd.initd 1046 RMD160 dd897cbdc0a5e64a24ad43b76c2b85b8a7515824 SHA1 b7ba92782a5010e6bca4b5b4903e9f57f16ca921 SHA256 ddf8c11886a1bce77b7ce8e73f6b91ceb5a994fbb3665e9e3f51468eae02fe48 DIST slurm-2.2.7.tar.bz2 4454740 RMD160 37ee3ef3382e3ca00cff99901020825bbf0c0b03 SHA1 b5e62504f31007f593d6ce6d90415579273a7b0f SHA256 8dfd8ec1b447caa1c8d83817a90414e19bc5b8cc9caf2c7ec4b6d2cb6bcd0a7e EBUILD slurm-2.2.7-r1.ebuild 3545 RMD160 1a3caa7458e44254cdef1b968b5a95d03045723a SHA1 1e6eaacb65c00a8041d4c5503ec93b35c594d8b2 SHA256 7d246aa7a8685a02b6cd3915a811020360b8b8893c054ee4cbc611de9faac063 -MISC ChangeLog 963 RMD160 6137e6fca54f1cbeb1bf3c11088e7948a641aea0 SHA1 1148d910c9ca723c7f37a5f7794e7f74e365babb SHA256 04ad100188c81f8580e1974660b6fb42d0abc351400a6ea7b2435c6a7cee09a2 -MISC metadata.xml 357 RMD160 f291b61aa0c7835c8786978a00b00f52001fbda3 SHA1 13a85c8bde78123a5ea891e702668b8cd918755d SHA256 2b2b9c330d1664771240f5cfe445493a3f01e977c103d023e675a5372b67fad6 +EBUILD slurm-2.2.7-r2.ebuild 4517 RMD160 6d480c28b8435586110d638e99a879dc2907e250 SHA1 45228dcaaa0982760e3d9148c0a19294efed454f SHA256 f8d31bdb7cc50dc0b97dc7c2a1d345ac96f1d76ca53b4b9b413e919c437b60be +MISC ChangeLog 1125 RMD160 469e4ae9d6805a888c4bbc8865847f908df06080 SHA1 446f3f8c23cb2f46b6a4ad3224505998db1d22c6 SHA256 665fb86dd588cb3f3776a429b7d9167a435546c4cba88afd51359292b3ee2e99 +MISC metadata.xml 443 RMD160 0a1990a76e09e35f4828dd4d354386fb0466f863 SHA1 18f4c31746d23a579bb56dbc0bd3a341cd3bc1b3 SHA256 d72c661300e641a22f67fed77fa1c9ffc8a4723222fd785df11a2ca1249e065a -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.18 (GNU/Linux) +Version: GnuPG v2.0.17 (GNU/Linux) -iQIcBAEBCAAGBQJOXlPrAAoJEOf+E+/4L5LmP1oP/Rn3kI9ElMYChZay4AHr4nko -KemXpnWlhhj7wX4wtaB3WIMDQMoqMBI4lLb+rzMmP2MK38fDABnodzV9dDfIandX -RL0JaZR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GHXVKpePiR2xVdvTbJxerZBfgLbLAFx5O41dBXMhElsupym3T9SG1GG9vxTj +Li4Up5g+FQTeMc6ZsSlViDJmTe5SacswTLOfCe77oGpUIGAD2N2DeVm93rwaZz1i +8FKTBS59vZiK/3qKh2YIij10hZEuMXx+ZH7ZpqfIF5vYkcNA9vdqn8zf94+3m6A8 +KUQUbq7UGZGtS+1VRtSfx2GSKTkmfDON34dc38yY9My+TVOMiTAyG2BgKVEjPuLh +OTN9X0H3xcVpdg1L7FjR +=zwD+ -----END PGP SIGNATURE----- diff --git a/sys-cluster/slurm/metadata.xml b/sys-cluster/slurm/metadata.xml index 26e21f3dee25..654f3e95a4d0 100644 --- a/sys-cluster/slurm/metadata.xml +++ b/sys-cluster/slurm/metadata.xml @@ -8,5 +8,6 @@ Enable maui scheduler support Enable authentication via munge + Enable perl scripts that emulates pbs (qstat, qsub etc.) diff --git a/sys-cluster/slurm/slurm-2.2.7-r2.ebuild b/sys-cluster/slurm/slurm-2.2.7-r2.ebuild new file mode 100644 index 000000000000..99e0b007b51b --- /dev/null +++ b/sys-cluster/slurm/slurm-2.2.7-r2.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/slurm/slurm-2.2.7-r2.ebuild,v 1.1 2011/10/26 14:05:31 alexxy Exp $ + +EAPI=4 + +inherit eutils pam perl-module + +DESCRIPTION="SLURM: A Highly Scalable Resource Manager" +HOMEPAGE="https://computing.llnl.gov/linux/slurm/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="maui +munge mysql pam +perl postgres ssl static-libs +torque" + +DEPEND=" + !net-analyzer/slurm + mysql? ( dev-db/mysql ) + munge? ( sys-auth/munge ) + pam? ( virtual/pam ) + perl? ( perl-core/Switch ) + postgres? ( dev-db/postgresql-base ) + ssl? ( dev-libs/openssl ) + torque? ( !sys-cluster/torque ) + >=sys-apps/hwloc-1.1.1-r1 + " +RDEPEND="${DEPEND} + maui? ( sys-cluster/maui[slurm] ) + " + +REQUIRED_USE="torque? ( perl )" + +LIBSLURM_PERL_S="${WORKDIR}/${P}/contribs/perlapi/libslurm/perl" +LIBSLURMDB_PERL_S="${WORKDIR}/${P}/contribs/perlapi/libslurmdb/perl" + +pkg_setup() { + enewgroup slurm 500 + enewuser slurm 500 -1 /var/spool/slurm slurm +} + +src_prepare() { + # gentoo uses /sys/fs/cgroup instead of /dev/cgroup + sed -e 's:/dev/cgroup:/sys/fs/cgroup:g' \ + -i "${S}/doc/man/man5/cgroup.conf.5" \ + -i "${S}/etc/cgroup.conf.example" \ + -i "${S}/etc/cgroup.release_agent" \ + -i "${S}/src/plugins/proctrack/cgroup/xcgroup.h" \ + || die + # and pids should go to /var/run/slurm + sed -e 's:/var/run/slurmctld.pid:/var/run/slurm/slurmctld.pid:g' \ + -e 's:/var/run/slurmd.pid:/var/run/slurm/slurmd.pid:g' \ + -i "${S}/etc/slurm.conf.example" + # also state dirs are in /var/spool/slurm + sed -e 's:StateSaveLocation=/tmp:StateSaveLocation=/var/spool/slurm:g' \ + -e 's:SlurmdSpoolDir=/tmp/slurmd:SlurmdSpoolDir=/var/spool/slurm/slurmd:g' \ + -i "${S}/etc/slurm.conf.example" +} + +src_configure() { + local myconf=( + --sysconfdir="${EPREFIX}/etc/${PN}" + --with-hwloc="${EPREFIX}/usr" + ) + use pam && myconf+=( --with-pam_dir=$(getpam_mod_dir) ) + use mysql || myconf+=( --without-mysql_config ) + use postgres || myconf+=( --without-pg_config ) + econf "${myconf[@]}" \ + $(use_enable pam) \ + $(use_with ssl) \ + $(use_with munge) \ + $(use_enable static-libs static) + if use perl ; then + cd "${LIBSLURM_PERL_S}" + S="${LIBSLURM_PERL_S}" SRC_PREP="no" perl-module_src_configure + cd "${LIBSLURMDB_PERL_S}" + S="${LIBSLURMDB_PERL_S}" SRC_PREP="no" perl-module_src_configure + cd "${S}" + fi +} + +src_compile() { + default + use pam && emake -C contribs/pam || die + if use perl ; then + cd "${LIBSLURM_PERL_S}" + S="${LIBSLURM_PERL_S}" perl-module_src_compile + cd "${LIBSLURMDB_PERL_S}" + S="${LIBSLURMDB_PERL_S}" perl-module_src_compile + cd "${S}" + fi + if use torque ;then + emake -C contribs/torque || die + fi +} + +src_install() { + default + emake DESTDIR="${D}" -C contribs/torque install || die + use pam && emake DESTDIR="${D}" -C contribs/pam install || die + if use perl; then + cd "${LIBSLURM_PERL_S}" + S="${LIBSLURM_PERL_S}" perl-module_src_install + cd "${LIBSLURMDB_PERL_S}" + S="${LIBSLURMDB_PERL_S}" perl-module_src_install + cd "${S}" + fi + if use torque; then + emake DESTDIR="${D}" -C contribs/torque || die + fi + use static-libs || find "${ED}" -name '*.la' -exec rm {} + + # we dont need it + rm "${ED}/usr/bin/mpiexec" || die + # install sample configs + keepdir /etc/slurm + keepdir /var/log/slurm + keepdir /var/spool/slurm + keepdir /var/run/slurm + insinto /etc/slurm + doins etc/cgroup.conf.example + doins etc/federation.conf.example + doins etc/slurm.conf.example + doins etc/slurmdbd.conf.example + exeinto /etc/slurm + doexe etc/cgroup.release_agent + doexe etc/slurm.epilog.clean + # install init.d files + newinitd "${FILESDIR}/slurmd.initd" slurmd + newinitd "${FILESDIR}/slurmctld.initd" slurmctld + newinitd "${FILESDIR}/slurmdbd.initd" slurmdbd + # install conf.d files + newconfd "${FILESDIR}/slurm.confd" slurm +} + +pkg_preinst() { + if use munge; then + sed -i 's,\(PBS_USE_MUNGE=\).*,\11,' "${D}"etc/conf.d/slurm || die + fi +} + +pkg_postinst() { + einfo "Fixing permissions in /var/spool/${PN}" + chown -R ${PN}:${PN} /var/spool/${PN} + einfo "Fixing permissions in /var/run/${PN}" + chown -R ${PN}:${PN} /var/run/${PN} + einfo "Fixing permissions in /var/log/${PN}" + chown -R ${PN}:${PN} /var/log/${PN} + 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.conf on all nodes (including the headnode) of your cluster." +}