Permalink
Browse files

Bumped slurm 2.4.1

  • Loading branch information...
nbigaouette committed Jul 18, 2012
1 parent 3ba2620 commit bdc7155a258abb9f83c3fd47512a0e28e6aa547c
Showing with 227 additions and 1 deletion.
  1. +3 −1 sys-cluster/slurm/Manifest
  2. +224 −0 sys-cluster/slurm/slurm-2.4.1.ebuild
@@ -13,6 +13,7 @@ DIST slurm-2.3.5.tar.bz2 5019657 RMD160 e76413c79505a61f485c0417d380f1e2a0db2e60
DIST slurm-2.4.0-0.pre3.tar.bz2 5109388 RMD160 698ab5cdb88330572306a5642045abe4424d92b9 SHA1 a095e86af2f0d6ff662f4f293d496d296efa2f4f SHA256 7a1ffd4bd7260a6d8c0e9577eede1325d11f46e94d88064d02541d85de48a509
DIST slurm-2.4.0-0.pre4.tar.bz2 5146463 RMD160 cbc7bb456389032c8424dde628addf8b5a91ae0d SHA1 869169e1eb2ed5cc2736804cc0e6a43120eed3f5 SHA256 b30f51bcbf31b073e8ca2f975114960c826228e915180aeead0e33f33556d610
DIST slurm-2.4.0-0.rc1.tar.bz2 5205925 RMD160 278e46e152e2848e1f597b68a75fa6d8fe862da4 SHA1 ea2579f333330b78b7686afa75c19047b4b79f0d SHA256 34fc63807b6bdc6f12c0c3af4131fe7806edb8d6c74ed3892df21279ba373aee
+DIST slurm-2.4.1.tar.bz2 5212382 RMD160 82b15dc29dc4297cb62298650f10881694b6e224 SHA1 76b1eccad48d74ad9254d79d1252f3097e719f57 SHA256 6180346011d7f6f50791b841fc3b7538dcf773201349a38acecd104e7a90b15a
EBUILD slurm-2.2.3.ebuild 1280 RMD160 c24564ae834e985b34d37652f8f3b88694ec2e76 SHA1 2cf7b3ef45c34ccfcd63152cc6d8460bbd3ca3ed SHA256 a0aa5337f53ef129bac33de715f0db86e38910f60af94a56cec7a34053204748
EBUILD slurm-2.2.7-r2.ebuild 4721 RMD160 45ebbe699d54062f740a900b214b6398b2920513 SHA1 9a53f5efb8c4362be6e5001f1f1bc383754965a1 SHA256 c0374122777249a4580768a880bed2f5cbfcb9144cc59600210d568596b960b3
EBUILD slurm-2.2.7.ebuild 1144 RMD160 704cec9dea7e736d84c7cbd89ee5940023dfb938 SHA1 b207e3b92e150dbaba1dd12795eb3548befe2ed4 SHA256 95e1aa171fe48a7aa340d305183961012fb82cde35228a6690c603e119aef192
@@ -27,5 +28,6 @@ EBUILD slurm-2.3.3.ebuild 6954 RMD160 c2e7f625ffaa2ff77af3ca2d922b9b908461bd6f S
EBUILD slurm-2.3.5.ebuild 7451 RMD160 bd5ce8fe5e3be5617a8a142d24061522285e2e55 SHA1 bc1b6a219bfc7e2797ed74e7d9423fa59f9464ec SHA256 a780d7daa26ef95e4ea442935bfb961fe758529a4a64330c15107063a54a5176
EBUILD slurm-2.4.0_pre3.ebuild 6922 RMD160 26b9a62f4ba183f73a3bd7e366e781652851bac5 SHA1 9195547f10920398b334f1c66299c106d4504b2d SHA256 a261bbc03f2b92ed0138c9fd32cf2add4d1120a2d940f21a8303b980def527df
EBUILD slurm-2.4.0_pre4-r1.ebuild 7421 RMD160 41ca70db19bd0805074d551ae764be85d20b1f9b SHA1 9c0710d24c2ac3dbaa83ac48cd94312e324884d5 SHA256 146046b28f3eae1904cd7da60e4488f78065b3c4be75b85130b89cd55bacadc2
-EBUILD slurm-2.4.0_rc1.ebuild 7451 RMD160 02165bde1047404e890db47cd18c993b46a73361 SHA1 6bda22a3e0885558d885a67dd7a802c896b7da2f SHA256 a5881cab17c5e2153ea7d5059da9d70ab34c29a0fed0bb1440af88d2f2ab134
+EBUILD slurm-2.4.0_rc1.ebuild 7451 RMD160 02165bde1047404e890db47cd18c993b46a73361 SHA1 6bda22a3e0885558d885a67dd7a802c896b7da2f SHA256 a5881cab17c5e2153ea7d5059da9d70ab34c29a0fed0bb1440af88d2f2ab1344
+EBUILD slurm-2.4.1.ebuild 7451 RMD160 bd5ce8fe5e3be5617a8a142d24061522285e2e55 SHA1 bc1b6a219bfc7e2797ed74e7d9423fa59f9464ec SHA256 a780d7daa26ef95e4ea442935bfb961fe758529a4a64330c15107063a54a5176
EBUILD slurm-9999.ebuild 6710 RMD160 0918dca35dc58bc71add721d5fc766d02923201f SHA1 39793fe48e6baf5db211be134287b36ec81d6687 SHA256 95f97c1b2d91c40dedf4f2a9f5536a17d7744f17fab99e32634774c0201e045e
@@ -0,0 +1,224 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+RESTRICT="primaryuri"
+
+inherit eutils versionator pam perl-module
+
+MY_PV=$(replace_version_separator 3 '-') # stable releases
+#MY_PV=$(replace_version_separator 3 '-0.') # pre-releases
+MY_P="${PN}-${MY_PV}"
+MY_branch="latest"
+#MY_branch="development"
+
+DESCRIPTION="SLURM: A Highly Scalable Resource Manager"
+HOMEPAGE="https://computing.llnl.gov/linux/slurm/"
+SRC_URI="http://www.schedmd.com/download/${MY_branch}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="maui +munge mysql pam perl postgres ssl static-libs torque ypbind"
+
+DEPEND="
+ !sys-cluster/torque
+ !net-analyzer/slurm
+ mysql? ( dev-db/mysql )
+ munge? ( sys-auth/munge )
+ ypbind? ( net-nds/ypbind )
+ pam? ( virtual/pam )
+ postgres? ( dev-db/postgresql-base )
+ ssl? ( dev-libs/openssl )
+ >=sys-apps/hwloc-1.1.1-r1"
+RDEPEND="${DEPEND}
+ maui? ( sys-cluster/maui[slurm] )"
+
+REQUIRED_USE="torque? ( perl )"
+
+S="${WORKDIR}/${MY_P}"
+
+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 /cgroup
+ # FIXME: Can the "^/cgroup" and "\([ =\"]\)/cgroup" patterns be merged?
+ sed \
+ -e 's|\([ =\"]\)/cgroup|\1/sys/fs/cgroup|g' \
+ -e "s|^/cgroup|/sys/fs/cgroup|g" \
+ -i "${S}/doc/man/man5/cgroup.conf.5" \
+ -i "${S}/etc/cgroup.release_common.example" \
+ -i "${S}/src/common/xcgroup_read_config.c" \
+ || die "Can't sed /cgroup for /sys/fs/cgroup"
+ # 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" \
+ || die "Can't sed for /var/run/slurmctld.pid"
+ # also state dirs are in /var/spool/slurm
+ sed -e 's:StateSaveLocation=*.:StateSaveLocation=/var/spool/slurm:g' \
+ -e 's:SlurmdSpoolDir=*.:SlurmdSpoolDir=/var/spool/slurm/slurmd:g' \
+ -i "${S}/etc/slurm.conf.example" \
+ || die "Can't sed ${S}/etc/slurm.conf.example for StateSaveLocation=*. or SlurmdSpoolDir=*"
+ # and tmp should go to /var/tmp/slurm
+ sed -e 's:/tmp:/var/tmp:g' \
+ -i "${S}/etc/slurm.conf.example" \
+ || die "Can't sed for StateSaveLocation=*./tmp"
+}
+
+src_configure() {
+ local myconf=(
+ --sysconfdir="${EPREFIX}/etc/${PN}"
+ --with-hwloc="${EPREFIX}/usr"
+ --docdir="${EPREFIX}/usr/share/doc/${P}"
+ --htmldir="${EPREFIX}/usr/share/doc/${P}"
+ )
+ 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)
+
+ # --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"
+ mkdir -p "${S}/src/db_api/.libs"
+ touch "${S}/src/api/.libs/libslurm.so"
+ touch "${S}/src/db_api/.libs/libslurmdb.so"
+ 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}"
+ rm -rf "${S}/src/api/.libs" "${S}/src/db_api/.libs"
+ 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
+ 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
+ rm -f "${ED}/usr/bin/mpiexec" || die
+ fi
+ use static-libs || find "${ED}" -name '*.la' -exec rm {} +
+ # install sample configs
+ keepdir /etc/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_common.example
+ 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
+ # Install logrotate file
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/logrotate" slurm || die
+ # cgroups support
+ exeinto /etc/slurm/cgroup
+ doexe etc/cgroup.release_common.example
+ mv "${D}"/etc/slurm/cgroup/cgroup.release_common.example "${D}"/etc/slurm/cgroup/release_common || die "Can't move cgroup.release_common.example"
+ ln -s release_common "${D}"/etc/slurm/cgroup/release_cpuset || die "Can't create symbolic link release_cpuset"
+ ln -s release_common "${D}"/etc/slurm/cgroup/release_devices || die "Can't create symbolic link release_devices"
+ ln -s release_common "${D}"/etc/slurm/cgroup/release_freezer || die "Can't create symbolic link release_freezer"
+}
+
+pkg_preinst() {
+ if use munge; then
+ sed -i 's,\(SLURM_USE_MUNGE=\).*,\11,' "${D}"etc/conf.d/slurm || die
+ fi
+ if use ypbind; then
+ sed -i 's,\(SLURM_USE_YPBIND=\).*,\11,' "${D}"etc/conf.d/slurm || die
+ fi
+}
+
+create_folders_and_fix_permissions() {
+ einfo "Fixing permissions in ${@}"
+ mkdir -p ${@}
+ chown -R ${PN}:${PN} ${@}
+}
+
+pkg_postinst() {
+ paths=(
+ /var/${PN}/checkpoint
+ /var/${PN}
+ /var/spool/${PN}/slurmd
+ /var/spool/${PN}
+ /var/run/${PN}
+ /var/log/${PN}
+ /var/tmp/${PN}/${PN}d
+ /var/tmp/${PN}
+ )
+ for folder_path in ${paths[@]}; do
+ create_folders_and_fix_permissions $folder_path
+ done
+ einfo
+
+ 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."
+ einfo
+ elog "For cgroup support, please see http://www.schedmd.com/slurmdocs/cgroup.conf.html"
+ elog "Your kernel must be compiled with the wanted cgroup feature:"
+ elog " General setup --->"
+ elog " [*] Control Group support --->"
+ elog " [*] Freezer cgroup subsystem"
+ elog " [*] Device controller for cgroups"
+ elog " [*] Cpuset support"
+ elog " [*] Simple CPU accounting cgroup subsystem"
+ elog " [*] Resource counters"
+ elog " [*] Memory Resource Controller for Control Groups"
+ elog " [*] Group CPU scheduler --->"
+ elog " [*] Group scheduling for SCHED_OTHER"
+ 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
+}

0 comments on commit bdc7155

Please sign in to comment.