summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2017-07-09 17:35:55 +0100
committerJustin Lecher <jlec@gentoo.org>2017-07-09 19:48:30 +0100
commitf642dbad4a32533562e287dbbe0a96d5e48b61a0 (patch)
tree21210baf96c5895aff8e2e578398f4d23b12c716 /sys-cluster
parentsys-cluster/slurm: Fix compilation error with glibc-2.25 (diff)
downloadgentoo-f642dbad4a32533562e287dbbe0a96d5e48b61a0.tar.gz
gentoo-f642dbad4a32533562e287dbbe0a96d5e48b61a0.tar.bz2
gentoo-f642dbad4a32533562e287dbbe0a96d5e48b61a0.zip
sys-cluster/slurm: Version Bump
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=621144 Package-Manager: Portage-2.3.6, Repoman-2.3.2 Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/slurm/Manifest1
-rw-r--r--sys-cluster/slurm/files/slurm-16.05.2-disable-sview.patch21
-rw-r--r--sys-cluster/slurm/files/slurm-17.02.6-disable-sview.patch99
-rw-r--r--sys-cluster/slurm/files/slurm-17.02.6-glibc-2.25.patch53
-rw-r--r--sys-cluster/slurm/slurm-17.02.6.ebuild236
5 files changed, 389 insertions, 21 deletions
diff --git a/sys-cluster/slurm/Manifest b/sys-cluster/slurm/Manifest
index d98544e4bd36..36d8c9098508 100644
--- a/sys-cluster/slurm/Manifest
+++ b/sys-cluster/slurm/Manifest
@@ -1 +1,2 @@
DIST slurm-16.05.2.tar.bz2 5982329 SHA256 de57ab107c98499f7184c54de8d5ac115a55657aa03d29d69cd0b7e737a42852 SHA512 8b4296481c5ad83da2bde1530937b3da9b6e32b6606ba0b0a3899e0f2f0b4fc42ca8a802d4bf346d0de28852d75839e9359e28c4ce77588cd22a08ddbd34dd21 WHIRLPOOL 925902c9432b24a2c85488d1ba6a867abed0adaaecaa94b648402e48d250d924000741b2be486b34d3b7f6890aeabb9aea6c47e2e8fd9896dda3a3ae416a4a89
+DIST slurm-17.02.6.tar.bz2 6017979 SHA256 f057127870544be5b3476594fc58b3c35727e6db3a18d84c4ea63059c2ebe4ea SHA512 e7e33ae037f8b30ccf467fa19c90786c28a527df80cf1362075634ada7072bffcd172d79d2af9ac9ad2b2206b50c0560584c7b8193bfaa9dfa1b1d2c7216e5f6 WHIRLPOOL 9dec9fae0d6def7fc0c243ceec8a2d3bf3c10ecf230f8ef5df03804ce048481279691572fb9bd83a509f344639d4b73313e7f7615bfa1d17c279010e44a2e63e
diff --git a/sys-cluster/slurm/files/slurm-16.05.2-disable-sview.patch b/sys-cluster/slurm/files/slurm-16.05.2-disable-sview.patch
index 5b861c333019..1e4a5b4fae3a 100644
--- a/sys-cluster/slurm/files/slurm-16.05.2-disable-sview.patch
+++ b/sys-cluster/slurm/files/slurm-16.05.2-disable-sview.patch
@@ -67,24 +67,3 @@ diff -urN slurm-16.05.2.orig/src/Makefile.am slurm-16.05.2/src/Makefile.am
if !REAL_BG_L_P_LOADED
SUBDIRS += srun
-diff -urN slurm-16.05.2.orig/src/Makefile.in slurm-16.05.2/src/Makefile.in
---- slurm-16.05.2.orig/src/Makefile.in 2016-07-07 02:51:37.000000000 +0300
-+++ slurm-16.05.2/src/Makefile.in 2016-07-15 20:02:41.373270765 +0300
-@@ -199,7 +199,7 @@
- DIST_SUBDIRS = api bcast common database db_api layouts plugins sacct \
- sacctmgr salloc sattach sbatch sbcast scancel scontrol sdiag \
- sinfo slurmctld slurmd slurmdbd smap smd sprio squeue sreport \
-- srun_cr sshare sstat strigger sview srun
-+ srun_cr sshare sstat strigger srun
- am__DIST_COMMON = $(srcdir)/Makefile.in
- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
- am__relativize = \
-@@ -487,7 +487,7 @@
- SUBDIRS = api bcast common database db_api layouts plugins sacct \
- sacctmgr salloc sattach sbatch sbcast scancel scontrol sdiag \
- sinfo slurmctld slurmd slurmdbd smap smd sprio squeue sreport \
-- srun_cr sshare sstat strigger sview $(am__append_1)
-+ srun_cr sshare sstat strigger $(am__append_1)
- all: all-recursive
-
- .SUFFIXES:
diff --git a/sys-cluster/slurm/files/slurm-17.02.6-disable-sview.patch b/sys-cluster/slurm/files/slurm-17.02.6-disable-sview.patch
new file mode 100644
index 000000000000..f7e2c5b26739
--- /dev/null
+++ b/sys-cluster/slurm/files/slurm-17.02.6-disable-sview.patch
@@ -0,0 +1,99 @@
+ configure.ac | 39 ---------------------------------------
+ doc/man/man1/Makefile.am | 8 --------
+ src/Makefile.am | 3 +--
+ 3 files changed, 1 insertion(+), 49 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2f177ec..ff4d69b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -238,44 +238,6 @@ AC_SUBST(HAVE_SOME_CURSES)
+ PKG_CHECK_MODULES([CHECK], [check >= 0.9.8], [ac_have_check="yes"], [ac_have_check="no"])
+ AM_CONDITIONAL(HAVE_CHECK, test "x$ac_have_check" = "xyes")
+
+-#
+-# Tests for GTK+
+-#
+-
+-# use the correct libs if running on 64bit
+-if test -d "/usr/lib64/pkgconfig"; then
+- PKG_CONFIG_PATH="/usr/lib64/pkgconfig/:$PKG_CONFIG_PATH"
+-fi
+-
+-if test -d "/opt/gnome/lib64/pkgconfig"; then
+- PKG_CONFIG_PATH="/opt/gnome/lib64/pkgconfig/:$PKG_CONFIG_PATH"
+-fi
+-
+-AM_PATH_GLIB_2_0([2.7.1], [ac_glib_test="yes"], [ac_glib_test="no"], [gthread])
+-
+-if test ${glib_config_minor_version=0} -ge 32 ; then
+- AC_DEFINE([GLIB_NEW_THREADS], 1, [Define to 1 if using glib-2.32.0 or higher])
+-fi
+-
+-AM_PATH_GTK_2_0([2.7.1], [ac_gtk_test="yes"], [ac_gtk_test="no"], [gthread])
+-if test ${gtk_config_minor_version=0} -ge 10 ; then
+- AC_DEFINE([GTK2_USE_RADIO_SET], 1, [Define to 1 if using gtk+-2.10.0 or higher])
+-fi
+-
+-if test ${gtk_config_minor_version=0} -ge 12 ; then
+- AC_DEFINE([GTK2_USE_TOOLTIP], 1, [Define to 1 if using gtk+-2.12.0 or higher])
+-fi
+-
+-if test ${gtk_config_minor_version=0} -ge 14 ; then
+- AC_DEFINE([GTK2_USE_GET_FOCUS], 1, [Define to 1 if using gtk+-2.14.0 or higher])
+-fi
+-
+-if test "x$ac_glib_test" != "xyes" -o "x$ac_gtk_test" != "xyes"; then
+- AC_MSG_WARN([cannot build sview without gtk library]);
+-fi
+-
+-AM_CONDITIONAL(BUILD_SVIEW, [test "x$ac_glib_test" = "xyes"] && [test "x$ac_gtk_test" = "xyes"])
+-
+ dnl Cray ALPS/Basil support depends on mySQL
+ X_AC_CRAY
+
+@@ -477,7 +439,6 @@ AC_CONFIG_FILES([Makefile
+ src/sshare/Makefile
+ src/sstat/Makefile
+ src/strigger/Makefile
+- src/sview/Makefile
+ src/plugins/Makefile
+ src/plugins/accounting_storage/Makefile
+ src/plugins/accounting_storage/common/Makefile
+diff --git a/doc/man/man1/Makefile.am b/doc/man/man1/Makefile.am
+index 246f16d..ba39af2 100644
+--- a/doc/man/man1/Makefile.am
++++ b/doc/man/man1/Makefile.am
+@@ -29,10 +29,6 @@ if WITH_BLCR
+ man1_MANS += srun_cr.1
+ endif
+
+-if BUILD_SVIEW
+-man1_MANS += sview.1
+-endif
+-
+ EXTRA_DIST = $(man1_MANS)
+
+ if HAVE_MAN2HTML
+@@ -65,10 +61,6 @@ if WITH_BLCR
+ html_DATA += srun_cr.html
+ endif
+
+-if BUILD_SVIEW
+-html_DATA += sview.html
+-endif
+-
+ MOSTLYCLEANFILES = ${html_DATA}
+
+ EXTRA_DIST += $(html_DATA)
+diff --git a/src/Makefile.am b/src/Makefile.am
+index bcd5aa7..a8cbf17 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -28,5 +28,4 @@ SUBDIRS = \
+ srun_cr \
+ sshare \
+ sstat \
+- strigger \
+- sview
++ strigger
diff --git a/sys-cluster/slurm/files/slurm-17.02.6-glibc-2.25.patch b/sys-cluster/slurm/files/slurm-17.02.6-glibc-2.25.patch
new file mode 100644
index 000000000000..dc48f8475c00
--- /dev/null
+++ b/sys-cluster/slurm/files/slurm-17.02.6-glibc-2.25.patch
@@ -0,0 +1,53 @@
+commit 056d9ff26b1d2ccac45da3c26a6918f182f8c559
+Author: Justin Lecher <jlec@gentoo.org>
+Date: Sun Jul 9 15:54:20 2017 +0100
+
+ Include sysmacros.h in addition for major() & minor()
+
+ Starting from glibc-2.25 [1] the macros major and minor are only available
+ from sys/sysmacros.h. This patch uses an autoconf macro to detect the
+ location and includes the header accordingly.
+
+ 1)
+ https://sourceware.org/ml/libc-alpha/2017-02/msg00079.html
+
+ Signed-off-by: Justin Lecher <jlec@gentoo.org>
+
+diff --git a/configure.ac b/configure.ac
+index 44699ae095..66d4350d44 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -124,7 +124,7 @@ AC_CHECK_HEADERS(mcheck.h values.h socket.h sys/socket.h \
+ AC_HEADER_SYS_WAIT
+ AC_HEADER_TIME
+ AC_HEADER_STDC
+-
++AC_HEADER_MAJOR
+
+ dnl Checks for structures.
+ dnl
+diff --git a/src/plugins/task/cgroup/task_cgroup_devices.c b/src/plugins/task/cgroup/task_cgroup_devices.c
+index 6a09b3d52a..63c0a11c9e 100644
+--- a/src/plugins/task/cgroup/task_cgroup_devices.c
++++ b/src/plugins/task/cgroup/task_cgroup_devices.c
+@@ -34,12 +34,20 @@
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ \*****************************************************************************/
+
++#include "config.h"
++
+ #define _GNU_SOURCE
+ #include <glob.h>
+ #include <limits.h>
+ #include <sched.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#ifdef MAJOR_IN_MKDEV
++# include <sys/mkdev.h>
++#endif
++#ifdef MAJOR_IN_SYSMACROS
++# include <sys/sysmacros.h>
++#endif
+
+ #include "slurm/slurm.h"
+ #include "slurm/slurm_errno.h"
diff --git a/sys-cluster/slurm/slurm-17.02.6.ebuild b/sys-cluster/slurm/slurm-17.02.6.ebuild
new file mode 100644
index 000000000000..1d246ec803aa
--- /dev/null
+++ b/sys-cluster/slurm/slurm-17.02.6.ebuild
@@ -0,0 +1,236 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="git://github.com/SchedMD/slurm.git"
+ INHERIT_GIT="git-r3"
+ 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"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+inherit autotools eutils pam perl-module user prefix ${INHERIT_GIT}
+
+DESCRIPTION="A Highly Scalable Resource Manager"
+HOMEPAGE="http://www.schedmd.com"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug lua multiple-slurmd +munge mysql pam perl ssl static-libs torque"
+
+DEPEND="
+ !sys-cluster/torque
+ !net-analyzer/slurm
+ !net-analyzer/sinfo
+ mysql? ( virtual/mysql )
+ munge? ( sys-auth/munge )
+ pam? ( virtual/pam )
+ ssl? ( dev-libs/openssl:0= )
+ lua? ( dev-lang/lua:0= )
+ !lua? ( !dev-lang/lua )
+ >=sys-apps/hwloc-1.1.1-r1"
+RDEPEND="${DEPEND}
+ dev-libs/libcgroup"
+
+REQUIRED_USE="torque? ( perl )"
+
+LIBSLURM_PERL_S="${WORKDIR}/${P}/contribs/perlapi/libslurm/perl"
+LIBSLURMDB_PERL_S="${WORKDIR}/${P}/contribs/perlapi/libslurmdb/perl"
+
+RESTRICT="primaryuri"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-disable-sview.patch
+ "${FILESDIR}"/${P}-glibc-2.25.patch
+)
+
+src_unpack() {
+ if [[ ${PV} == *9999* ]]; then
+ git-2_src_unpack
+ else
+ default
+ fi
+}
+
+pkg_setup() {
+ enewgroup slurm 500
+ enewuser slurm 500 -1 /var/spool/slurm slurm
+}
+
+src_prepare() {
+ default
+
+ # pids should go to /var/run/slurm
+ sed -e "s:/var/run/slurmctld.pid:${EPREFIX}/var/run/slurm/slurmctld.pid:g" \
+ -e "s:/var/run/slurmd.pid:${EPREFIX}/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=${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 ${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"
+
+ hprefixify auxdir/{ax_check_zlib,x_ac_{lz4,ofed,munge}}.m4
+ eautoreconf
+}
+
+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 debug || myconf+=( --disable-debug )
+ use pam && myconf+=( --with-pam_dir=$(getpam_mod_dir) )
+ use mysql || myconf+=( --without-mysql_config )
+ econf "${myconf[@]}" \
+ $(use_enable pam) \
+ $(use_with ssl) \
+ $(use_with munge) \
+ $(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
+ # 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 "${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/bluegene.conf.example \
+ etc/cgroup.conf.example \
+ etc/cgroup_allowed_devices_file.conf.example \
+ etc/slurm.conf.example \
+ etc/slurmdbd.conf.example
+ exeinto /etc/slurm
+ doexe \
+ etc/slurm.epilog.clean
+ # 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
+}
+
+pkg_preinst() {
+ if use munge; then
+ sed -i 's,\(SLURM_USE_MUNGE=\).*,\11,' "${ED}"etc/conf.d/slurm || die
+ fi
+}
+
+create_folders_and_fix_permissions() {
+ einfo "Fixing permissions in ${@}"
+ mkdir -p ${@}
+ chown -R ${PN}:${PN} ${@}
+}
+
+pkg_postinst() {
+ paths=(
+ "${EROOT}"var/${PN}/checkpoint
+ "${EROOT}"var/${PN}
+ "${EROOT}"var/spool/${PN}/slurmd
+ "${EROOT}"var/spool/${PN}
+ "${EROOT}"var/run/${PN}
+ "${EROOT}"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
+ 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 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
+}