Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 431664 - sys-cluster/slurm-2.4.2 version bump and upstream git branch additions
Summary: sys-cluster/slurm-2.4.2 version bump and upstream git branch additions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Alexey Shvetsov
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2012-08-16 18:20 UTC by Nicolas Bigaouette
Modified: 2012-12-17 13:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
slurm-2.4.2-r2.ebuild (slurm-2.4.2-r2.ebuild,7.62 KB, text/plain)
2012-08-16 18:21 UTC, Nicolas Bigaouette
Details
Diff between portage's sys-cluster/slurm-2.4.3 and sys-cluster/slurm-2.4.4 (portage_sys-cluster_slurm-2.4.3_to_2.4.4.patch,2.98 KB, patch)
2012-11-30 20:14 UTC, Nicolas Bigaouette
Details | Diff
Diff between portage's sys-cluster/slurm-2.4.3 and sys-cluster/slurm-2.5.0_rc2 (portage_sys-cluster_slurm-2.4.3_to_2.5.0_rc2.patch,3.31 KB, patch)
2012-11-30 20:14 UTC, Nicolas Bigaouette
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Bigaouette 2012-08-16 18:20:55 UTC
Slurm v2.4.2 is out, here's an updated ebuild for it.
I have also modified it a bit so the same ebuild can be used for stable releases, release-candidates, prereleases or even from git.
I also added an extra SRC_URI since older versions are moved to an "archive" folder.

Reproducible: Always
Comment 1 Nicolas Bigaouette 2012-08-16 18:21:57 UTC
Created attachment 321496 [details]
slurm-2.4.2-r2.ebuild
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-17 15:27:14 UTC
Comment on attachment 321496 [details]
slurm-2.4.2-r2.ebuild

--- slurm-2.3.4.ebuild  2012-05-09 17:58:28.000000000 +0200
+++ -   2012-08-17 17:27:02.229675037 +0200
@@ -1,26 +1,38 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/slurm/slurm-2.3.4.ebuild,v 1.3 2012/05/09 07:37:21 zmedico Exp $
+# $Header: $
 
 EAPI=4
-RESTRICT="primaryuri"
 
-inherit eutils versionator pam perl-module
+if [[ ${PV} == *9999* ]]; then
+       EGIT_REPO_URI="git://github.com/SchedMD/slurm.git"
+       INHERIT_GIT="git-2"
+       SRC_URI=""
+       KEYWORDS=""
+else
+       inherit versionator
+       if [[ ${PV} == *pre* || ${PV} == *rc* ]]; then
+               MY_PV=$(replace_version_separator 3 '-0.') # pre-releases or release-candidate
+               MY_branch="development"
+       else
+               MY_PV=$(replace_version_separator 3 '-') # stable releases
+               MY_branch="latest"
+       fi
+       MY_P="${PN}-${MY_PV}"
+       INHERIT_GIT=""
+       SRC_URI="http://www.schedmd.com/download/${MY_branch}/${MY_P}.tar.bz2 http://www.schedmd.com/download/archive/${MY_P}.tar.bz2"
+       KEYWORDS="~amd64 ~x86"
+       S="${WORKDIR}/${MY_P}"
+fi
 
-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"
+inherit eutils pam perl-module ${INHERIT_GIT}
 
 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"
+IUSE="maui +munge mysql pam perl postgres ssl static-libs torque ypbind lua"
 
 DEPEND="
        !sys-cluster/torque
@@ -31,14 +43,14 @@
        pam? ( virtual/pam )
        postgres? ( dev-db/postgresql-base )
        ssl? ( dev-libs/openssl )
+    lua? ( dev-lang/lua )
+    !lua? ( !dev-lang/lua )
        >=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"
Comment 3 Nicolas Bigaouette 2012-08-17 16:30:48 UTC
I forgot to say that I added a "lua" use flag. This should control whether lua support is compiled in, necessary for lua scripting support in slurm (see http://www.schedmd.com/slurmdocs/job_submit_plugins.html)

There isn't any option to enable/disable lua in slurm; at compile time it will detect its presence/absence on the system. So this is why I've added a conflict with dev-lang/lua if lua use flag is not used. Maybe this could be simplified to use lua? ( dev-lang/lua ) | ( !dev-lang/lua ) or something like that?
Comment 4 Daniel M. Weeks 2012-11-29 17:21:57 UTC
Slurm is now at version 2.4.4 - latest in portage is 2.4.3. There is also a stable rc out for the 2.5 branch - 2.5.0-rc2.
Comment 5 Nicolas Bigaouette 2012-11-29 18:28:39 UTC
Here's a diff between portage's 2.4.3 and a modified 2.4.4.

Notes:
-RESTRICT="mirror" is used since tarballs are not on mirrors
-I merged the 9999 ebuild so the main ebuilds can be used for the git version.
-The SRC_URI contains 3 urls since the authors move the tarball from .../development/... to .../latest/... to .../archive/... with version bumps, which would break the ebuild.
-The "lua" use flag is present to build LUA support (plugins)
-The "!net-analyzer/sinfo" depend is not added, but probably should as slurm's "sinfo" prints the different partitions.
-New use flag: multiple-slurmd. By default, only one instance of slurmd process can run on a node. It is useful to use more so a single node can act as two (splitting a node's resources into two different partitions).
-I guess "dev-libs/libcgroup" should stay as a dependency to use cgroups.
-Is ${PN}-2.3.4-glibc2.16.patch still useful?


diff -Naur /usr/portage/sys-cluster/slurm/slurm-2.4.3.ebuild slurm-2.4.4.ebuild
--- /usr/portage/sys-cluster/slurm/slurm-2.4.3.ebuild   2012-10-14 14:31:29.000000000 -0400
+++ slurm-2.4.4.ebuild  2012-11-23 11:34:07.550654026 -0500
@@ -1,49 +1,72 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/slurm/slurm-2.4.3.ebuild,v 1.2 2012/10/14 18:27:42 alexxy Exp $
+# $Header: $
 
 EAPI=4
-RESTRICT="primaryuri"
 
-inherit eutils versionator pam perl-module user
+if [[ ${PV} == *9999* ]]; then
+       EGIT_REPO_URI="git://github.com/SchedMD/slurm.git"
+       INHERIT_GIT="git-2"
+       SRC_URI=""
+       KEYWORDS=""
+else
+       inherit versionator
+       if [[ ${PV} == *pre* || ${PV} == *rc* ]]; then
+               MY_PV=$(replace_version_separator 3 '-0.') # pre-releases or release-candidate
+       else
+               MY_PV=$(replace_version_separator 3 '-') # stable releases
+       fi
+       MY_P="${PN}-${MY_PV}"
+       INHERIT_GIT=""
+       SRC_URI="http://www.schedmd.com/download/latest/${MY_P}.tar.bz2 http://www.schedmd.com/download/development/${MY_P}.tar.bz2 http://www.schedmd.com/download/archive/${MY_P}.tar.bz2"
+       KEYWORDS="~amd64 ~x86"
+       S="${WORKDIR}/${MY_P}"
+fi
 
-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"
+inherit eutils pam perl-module ${INHERIT_GIT}
 
 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"
+IUSE="lua maui multiple-slurmd +munge mysql pam perl postgres ssl static-libs torque ypbind"
 
 DEPEND="
        !sys-cluster/torque
        !net-analyzer/slurm
-       !net-analyzer/sinfo
        mysql? ( dev-db/mysql )
        munge? ( sys-auth/munge )
        ypbind? ( net-nds/ypbind )
        pam? ( virtual/pam )
        postgres? ( dev-db/postgresql-base )
        ssl? ( dev-libs/openssl )
+    lua? ( dev-lang/lua )
+    !lua? ( !dev-lang/lua )
        >=sys-apps/hwloc-1.1.1-r1"
 RDEPEND="${DEPEND}
-       dev-libs/libcgroup
        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"
 
+RESTRICT="mirror"
+
+src_unpack() {
+       if [[ ${PV} == *9999* ]]; then
+               git-2_src_unpack
+       else
+               [[ "${A}" != "" ]] && unpack ${A}
+       fi
+
+       cd ${S}
+       for patch_file in ${FILESDIR}/${P}*.patch; do
+               [[ -e ${patch_file} ]] && epatch ${patch_file}
+       done
+}
+
 pkg_setup() {
        enewgroup slurm 500
        enewuser slurm 500 -1 /var/spool/slurm slurm
@@ -73,8 +96,6 @@
        sed -e 's:/tmp:/var/tmp:g' \
                -i "${S}/etc/slurm.conf.example" \
                        || die "Can't sed for StateSaveLocation=*./tmp"
-
-       epatch "${FILESDIR}"/${PN}-2.3.4-glibc2.16.patch
 }
 
 src_configure() {
@@ -91,7 +112,8 @@
                $(use_enable pam) \
                $(use_with ssl) \
                $(use_with munge) \
-               $(use_enable static-libs static)
+               $(use_enable static-libs static) \
+               $(use_enable multiple-slurmd)
 
        # --htmldir does not seems to propagate... Documentations are installed
        # in /usr/share/doc/slurm-2.3.0/html
Comment 6 Nicolas Bigaouette 2012-11-29 18:29:08 UTC
I have a 2.5.0_rc1 and rc2 in my overlay too. The two are identical to my 2.4.4 except this:
@@ -145,8 +167,9 @@
        # install sample configs
        keepdir /etc/slurm
        insinto /etc/slurm
+       doins etc/bluegene.conf.example
        doins etc/cgroup.conf.example
-       doins etc/federation.conf.example
+       doins etc/cgroup_allowed_devices_file.conf.example
        doins etc/slurm.conf.example
        doins etc/slurmdbd.conf.example
        exeinto /etc/slurm

as the included files changed.
Comment 7 Daniel M. Weeks 2012-11-30 04:46:51 UTC
The homepage should also be updated to point to schedmd.com. I'll talk to Danny (co-author of Slurm) about fixing the issue with source locations moving between versions.
Comment 8 Daniel M. Weeks 2012-11-30 19:38:10 UTC
Danny just added the following method to access sources: http://schedmd.com/download/total/{version}

This will cleanup the SRC_URI issue.
Comment 9 Nicolas Bigaouette 2012-11-30 20:14:00 UTC
Created attachment 331076 [details, diff]
Diff between portage's sys-cluster/slurm-2.4.3 and sys-cluster/slurm-2.4.4
Comment 10 Nicolas Bigaouette 2012-11-30 20:14:17 UTC
Created attachment 331078 [details, diff]
Diff between portage's sys-cluster/slurm-2.4.3 and sys-cluster/slurm-2.5.0_rc2
Comment 11 Alexey Shvetsov archtester gentoo-dev 2012-12-17 13:11:24 UTC
Fixed in tree =)