The package rpms/slurm.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/slurm.git/commit/?id=9be8f28c08d4....
Change:
+%ifnarch s390 s390x %{arm}
Thanks.
Full change:
============
commit db5c1785040bd9888510869ff033eedaa516822f
Author: Philip Kovacs <pkdevel(a)yahoo.com>
Date: Wed Oct 25 17:57:09 2017 -0400
Version bump, patches adjusted.
diff --git a/slurm.spec b/slurm.spec
index 58da823..a7c0642 100644
--- a/slurm.spec
+++ b/slurm.spec
@@ -25,8 +25,8 @@
# slurm-torque
Name: slurm
-Version: 17.02.7
-Release: 4%{?dist}
+Version: 17.02.8
+Release: 1%{?dist}
Summary: Simple Linux Utility for Resource Management
License: GPLv2 and BSD
URL:
https://slurm.schedmd.com/
@@ -37,19 +37,19 @@ Source3: slurm-sview.desktop
Source4: slurm-128x128.png
Source5: slurm_setuser.in
-# upstream bugs #4094, #4095, #4101, #4113
-Patch0: slurm_opts_restrict.patch
-Patch1: slurm_salloc_setgroups.patch
-Patch2: slurm_format_truncation.patch
+# upstream bug #3942
+Patch0: slurm_ac_header_major.patch
# build-related patches
-Patch3: slurm_perlapi_rpaths.patch
-Patch4: slurm_html_doc_path.patch
-Patch5: slurm_doc_fix.patch
+Patch1: slurm_perlapi_rpaths.patch
+Patch2: slurm_html_doc_path.patch
+Patch3: slurm_doc_fix.patch
# Fedora-related patches
-Patch6: slurm_service_files.patch
+Patch4: slurm_service_files.patch
+BuildRequires: autoconf
+BuildRequires: automake
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: hdf5-devel
BuildRequires: pkgconfig(hwloc)
@@ -219,8 +219,6 @@ Torque wrapper scripts used for helping migrate from Torque/PBS to
Slurm.
%patch2 -p1
%patch3 -p1
%patch4 -p1
-%patch5 -p1
-%patch6 -p1
cp %SOURCE1 etc/slurm.conf
cp %SOURCE1 etc/slurm.conf.example
cp %SOURCE2 etc/slurmdbd.conf
@@ -233,6 +231,9 @@ mkdir -p extras
cp %SOURCE5 extras/slurm_setuser.in
%build
+%{__aclocal} -I auxdir
+%{__autoconf}
+%{__automake} --no-force
# upstream bug #2443. need to force lazy linkage since plugins contain
# undefined symbols not used in every context, i.e. slurmctld vs slurmd.
CFLAGS="$RPM_OPT_FLAGS -Wl,-z,lazy"
@@ -266,11 +267,11 @@
s|^dir_tmpfiles_d=.*|dir_tmpfiles_d="%{_tmpfilesdir}"|g;' \
extras/slurm_setuser.in > extras/slurm_setuser
# build base packages
-%make_build V=0
+%make_build V=1
# build contribs packages
# INSTALLDIRS=vendor so perlapi goes to vendor_perl directory
-PERL_MM_PARAMS="INSTALLDIRS=vendor" %make_build contrib V=0
+PERL_MM_PARAMS="INSTALLDIRS=vendor" %make_build contrib V=1
%check
%{__make} check
@@ -749,6 +750,9 @@ fi
%systemd_postun_with_restart slurmdbd.service
%changelog
+* Wed Oct 25 2017 Philip Kovacs <pkdevel(a)yahoo.com> - 17.02.8-1
+- Version bump, patches adjusted.
+
* Thu Oct 5 2017 Philip Kovacs <pkdevel(a)yahoo.com> - 17.02.7-4
- Patch changes per resolution of upstream bug #4101:
- salloc/sbatch/srun: must be root to use --uid/--gid options.
diff --git a/slurm_ac_header_major.patch b/slurm_ac_header_major.patch
new file mode 100644
index 0000000..f9050f1
--- /dev/null
+++ b/slurm_ac_header_major.patch
@@ -0,0 +1,16 @@
+--- slurm-17.02.8/configure.ac.old 2017-10-25 14:35:36.325236357 -0400
++++ slurm-17.02.8/configure.ac 2017-10-25 15:24:41.023876115 -0400
+@@ -124,7 +124,13 @@
+ AC_HEADER_SYS_WAIT
+ AC_HEADER_TIME
+ AC_HEADER_STDC
++
++dnl Workaround for transition of autoconf/glibc issues in deprecation of the
++dnl definitions major, minor, makedev by sys/types.h vs sys/sysmacros.h
++old_CFLAGS=$CFLAGS
++CFLAGS="$CFLAGS -Werror"
+ AC_HEADER_MAJOR
++CFLAGS=$old_CFLAGS
+
+ dnl Checks for structures.
+ dnl
diff --git a/slurm_doc_fix.patch b/slurm_doc_fix.patch
index 8cd7936..41c2754 100644
--- a/slurm_doc_fix.patch
+++ b/slurm_doc_fix.patch
@@ -1,5 +1,5 @@
---- slurm-17.02.6/doc/man/man5/burst_buffer.conf.5.orig 2017-08-15 23:22:24.333180212
-0400
-+++ slurm-17.02.6/doc/man/man5/burst_buffer.conf.5 2017-08-15 23:23:45.224298397 -0400
+--- slurm-17.02.8/doc/man/man5/burst_buffer.conf.5.old 2017-08-15 23:22:24.333180212
-0400
++++ slurm-17.02.8/doc/man/man5/burst_buffer.conf.5 2017-08-15 23:23:45.224298397 -0400
@@ -31,18 +31,18 @@
\fBAllowUsers\fR
Comma separated list of user names and/or IDs permitted to use burst buffers.
diff --git a/slurm_format_truncation.patch b/slurm_format_truncation.patch
deleted file mode 100644
index 8107e97..0000000
--- a/slurm_format_truncation.patch
+++ /dev/null
@@ -1,44 +0,0 @@
----
slurm-17.02.7/src/plugins/node_features/knl_generic/node_features_knl_generic.c 2017-08-15
14:37:07.000000000 -0400
-+++
slurm-17.02.7/src/plugins/node_features/knl_generic/node_features_knl_generic.c.new 2017-08-21
01:35:38.352301060 -0400
-@@ -1607,7 +1607,7 @@
- // insmod /home/tim/kmod/xppsl-addons/zonesort_module.ko
- struct stat sb;
- int buf_len, fd, i, len;
-- char buf[8];
-+ char buf[16];
-
- if (stat(ZONE_SORT_PATH, &sb) == -1)
- (void) system(MODPROBE_PATH " zonesort_module");
---- slurm-17.02.7/src/plugins/select/bluegene/bg_core.c 2017-07-21 11:17:53.000000000
-0400
-+++ slurm-17.02.7/src/plugins/select/bluegene/bg_core.c.new 2017-08-21 01:39:35.896506235
-0400
-@@ -701,7 +701,7 @@
- */
- extern const char *bg_err_str(int inx)
- {
-- static char tmp_char[10];
-+ static char tmp_char[32];
-
- switch (inx) {
- case SLURM_SUCCESS:
---- slurm-17.02.7/src/plugins/task/affinity/cpuset.c 2017-07-21 11:17:53.000000000 -0400
-+++ slurm-17.02.7/src/plugins/task/affinity/cpuset.c.new 2017-08-21 01:42:53.872712983
-0400
-@@ -354,7 +354,7 @@
- int slurm_set_memset(char *path, nodemask_t *new_mask)
- {
- char file_path[PATH_MAX];
-- char mstr[1 + CPU_SETSIZE * 4], tmp[10];
-+ char mstr[1 + CPU_SETSIZE * 4], tmp[16];
- int fd, i, max_node;
- ssize_t rc;
-
---- slurm-17.02.7/src/slurmd/slurmd/read_proc.c 2017-07-21 11:17:53.000000000 -0400
-+++ slurm-17.02.7/src/slurmd/slurmd/read_proc.c.new 2017-08-26 00:27:38.036289952 -0400
-@@ -233,7 +233,7 @@
- DIR *proc_fs;
- struct dirent *proc_ent;
- int proc_fd, proc_stat_size, found, n;
-- char proc_name[22], *proc_stat;
-+ char proc_name[272], *proc_stat;
- struct stat buffer;
- int uid, session;
- long resident_set_size;
diff --git a/slurm_html_doc_path.patch b/slurm_html_doc_path.patch
index 263439a..fc147f9 100644
--- a/slurm_html_doc_path.patch
+++ b/slurm_html_doc_path.patch
@@ -1,11 +1,9 @@
---- slurm-17.02.7/doc/html/Makefile.in 2017-08-14 13:48:43.000000000 -0400
-+++ slurm-17.02.7/doc/html/Makefile.in.new 2017-08-24 07:58:01.242452059 -0400
-@@ -417,7 +417,7 @@
- host_cpu = @host_cpu@
- host_os = @host_os@
- host_vendor = @host_vendor@
+--- slurm-17.02.8/doc/html/Makefile.am.old 2017-10-25 15:55:38.622808585 -0400
++++ slurm-17.02.8/doc/html/Makefile.am 2017-10-25 15:56:07.236582868 -0400
+@@ -1,5 +1,5 @@
+
-htmldir = ${datadir}/doc/${PACKAGE}-${SLURM_VERSION_STRING}/html
+htmldir = ${datadir}/doc/${PACKAGE}/html
- includedir = @includedir@
- infodir = @infodir@
- install_sh = @install_sh@
+
+ generated_html = \
+ accounting.html \
diff --git a/slurm_opts_restrict.patch b/slurm_opts_restrict.patch
deleted file mode 100644
index ddf6bed..0000000
--- a/slurm_opts_restrict.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- slurm-17.02.7/src/salloc/opt.c.old 2017-10-05 13:33:36.300529834 -0400
-+++ slurm-17.02.7/src/salloc/opt.c 2017-10-05 13:37:02.093162798 -0400
-@@ -1054,6 +1054,10 @@
- }
- break;
- case LONG_OPT_UID:
-+ if (getuid() != 0) {
-+ error("--uid only permitted by root user");
-+ exit(error_exit);
-+ }
- if (opt.euid != (uid_t) -1) {
- error("duplicate --uid option");
- exit(error_exit);
-@@ -1064,6 +1068,10 @@
- }
- break;
- case LONG_OPT_GID:
-+ if (getuid() != 0) {
-+ error("--gid only permitted by root user");
-+ exit(error_exit);
-+ }
- if (opt.egid != (gid_t) -1) {
- error("duplicate --gid option");
- exit(error_exit);
---- slurm-17.02.7/src/sbatch/opt.c.old 2017-10-05 13:39:04.067419821 -0400
-+++ slurm-17.02.7/src/sbatch/opt.c 2017-10-05 13:41:20.388042002 -0400
-@@ -1621,6 +1621,10 @@
- opt.jobid_set = true;
- break;
- case LONG_OPT_UID:
-+ if (getuid() != 0) {
-+ error("--uid only permitted by root user");
-+ exit(error_exit);
-+ }
- if (opt.euid != (uid_t) -1) {
- error("duplicate --uid option");
- exit(error_exit);
-@@ -1631,6 +1635,10 @@
- }
- break;
- case LONG_OPT_GID:
-+ if (getuid() != 0) {
-+ error("--gid only permitted by root user");
-+ exit(error_exit);
-+ }
- if (opt.egid != (gid_t) -1) {
- error("duplicate --gid option");
- exit(error_exit);
---- slurm-17.02.7/src/srun/libsrun/opt.c.old 2017-10-05 13:42:57.195643601 -0400
-+++ slurm-17.02.7/src/srun/libsrun/opt.c 2017-10-05 13:44:34.753262251 -0400
-@@ -1450,6 +1450,10 @@
- _get_int(optarg, "max-exit-timeout", true);
- break;
- case LONG_OPT_UID:
-+ if (getuid() != 0) {
-+ error("--uid only permitted by root user");
-+ exit(error_exit);
-+ }
- if (opt.euid != (uid_t) -1) {
- error("duplicate --uid option");
- exit(error_exit);
-@@ -1460,6 +1464,10 @@
- }
- break;
- case LONG_OPT_GID:
-+ if (getuid() != 0) {
-+ error("--gid only permitted by root user");
-+ exit(error_exit);
-+ }
- if (opt.egid != (gid_t) -1) {
- error("duplicate --gid option");
- exit(error_exit);
diff --git a/slurm_perlapi_rpaths.patch b/slurm_perlapi_rpaths.patch
index 66b5afe..b8c9f4e 100644
--- a/slurm_perlapi_rpaths.patch
+++ b/slurm_perlapi_rpaths.patch
@@ -1,11 +1,11 @@
---- slurm-17.02.7/contribs/perlapi/libslurm/perl/Makefile.PL.in.orig 2016-11-08
15:11:32.000000000 -0500
-+++ slurm-17.02.7/contribs/perlapi/libslurm/perl/Makefile.PL.in 2017-08-17
03:06:27.363688978 -0400
+--- slurm-17.02.8/contribs/perlapi/libslurm/perl/Makefile.PL.in.old 2016-11-08
15:11:32.000000000 -0500
++++ slurm-17.02.8/contribs/perlapi/libslurm/perl/Makefile.PL.in 2017-08-17
03:06:27.363688978 -0400
@@ -77,7 +77,7 @@
# AIX has problems with not always having the correct
# flags so we have to add some :)
my $os = lc(`uname`);
-my $other_ld_flags = "-Wl,-rpath,@top_builddir(a)/src/api/.libs
-Wl,-rpath,@prefix@/lib";
-+my $other_ld_flags = " ";
++my $other_ld_flags = "";
$other_ld_flags = " -brtl -G -bnoentry -bgcbypass:1000 -bexpfull"
if $os =~ "aix";
@@ -16,7 +16,7 @@
# flags so we have to add some :)
my $os = lc(`uname`);
-my $other_ld_flags = "-Wl,-rpath,@top_builddir(a)/src/db_api/.libs
-Wl,-rpath,@prefix@/lib";
-+my $other_ld_flags = " ";
++my $other_ld_flags = "";
$other_ld_flags = " -brtl -G -bnoentry -bgcbypass:1000 -bexpfull"
if $os =~ "aix";
diff --git a/slurm_salloc_setgroups.patch b/slurm_salloc_setgroups.patch
deleted file mode 100644
index efb9260..0000000
--- a/slurm_salloc_setgroups.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- slurm-17.02.7/src/salloc/salloc.c.old 2017-10-05 13:25:52.403682572 -0400
-+++ slurm-17.02.7/src/salloc/salloc.c 2017-10-05 13:29:52.913975815 -0400
-@@ -333,8 +333,13 @@
- sleep (++retries);
- }
-
-- /* become the user after the allocation has been requested. */
-- if (opt.uid != (uid_t) -1) {
-+ /* If the requested uid is different than ours, become that uid */
-+ if ((getuid() != opt.uid) && (opt.uid != (uid_t) -1)) {
-+ /* drop extended groups before changing uid/gid */
-+ if ((setgroups(0, NULL) < 0)) {
-+ error("setgroups: %m");
-+ exit(error_exit);
-+ }
- if (setuid(opt.uid) < 0) {
- error("setuid: %m");
- exit(error_exit);
diff --git a/slurm_service_files.patch b/slurm_service_files.patch
index 988262d..9f1c38a 100644
--- a/slurm_service_files.patch
+++ b/slurm_service_files.patch
@@ -1,5 +1,5 @@
---- slurm-17.02.7/etc/slurmctld.service.in 2017-08-14 13:48:43.000000000 -0400
-+++ slurm-17.02.7/etc/slurmctld.service.in.new 2017-08-21 13:35:26.472209176 -0400
+--- slurm-17.02.8/etc/slurmctld.service.in.old 2017-08-14 13:48:43.000000000 -0400
++++ slurm-17.02.8/etc/slurmctld.service.in 2017-08-21 13:35:26.472209176 -0400
@@ -8,7 +8,7 @@
EnvironmentFile=-/etc/sysconfig/slurmctld
ExecStart=@sbindir@/slurmctld $SLURMCTLD_OPTIONS
diff --git a/sources b/sources
index 8bfd228..67bea59 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (slurm-17.02.7.tar.bz2) =
363ba06b7f2f8a1203396395a3d88b580ba76192bd050c94dbde5c0729fd20a8304f1a0842362588e6e1eed1527f8be47f17dfb0731fbc867d2a253112b147d5
+SHA512 (slurm-17.02.8.tar.bz2) =
a3a7633a5a0457299434fee00487a16edc5333360cf4d39f709b13b050d3496670da85340a0b19485016def946f44b723ecc23c1668704b8d10ef0fe697b0e13
commit f7f253a9a5257dda7dafdb07b7bb89e301d0fa39
Author: Philip Kovacs <pkdevel(a)yahoo.com>
Date: Thu Oct 5 14:22:05 2017 -0400
Patch changes per resolution of upstream bug #4101:
salloc/sbatch/srun: must be root to use --uid/--gid options.
salloc: supplemental groups dropped after setuid.
diff --git a/slurm.spec b/slurm.spec
index 2613026..58da823 100644
--- a/slurm.spec
+++ b/slurm.spec
@@ -26,7 +26,7 @@
Name: slurm
Version: 17.02.7
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Simple Linux Utility for Resource Management
License: GPLv2 and BSD
URL:
https://slurm.schedmd.com/
@@ -38,16 +38,17 @@ Source4: slurm-128x128.png
Source5: slurm_setuser.in
# upstream bugs #4094, #4095, #4101, #4113
-Patch0: slurm_salloc_privileges.patch
-Patch1: slurm_format_truncation.patch
+Patch0: slurm_opts_restrict.patch
+Patch1: slurm_salloc_setgroups.patch
+Patch2: slurm_format_truncation.patch
# build-related patches
-Patch2: slurm_perlapi_rpaths.patch
-Patch3: slurm_html_doc_path.patch
-Patch4: slurm_doc_fix.patch
+Patch3: slurm_perlapi_rpaths.patch
+Patch4: slurm_html_doc_path.patch
+Patch5: slurm_doc_fix.patch
# Fedora-related patches
-Patch5: slurm_service_files.patch
+Patch6: slurm_service_files.patch
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: hdf5-devel
@@ -219,6 +220,7 @@ Torque wrapper scripts used for helping migrate from Torque/PBS to
Slurm.
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
cp %SOURCE1 etc/slurm.conf
cp %SOURCE1 etc/slurm.conf.example
cp %SOURCE2 etc/slurmdbd.conf
@@ -747,6 +749,11 @@ fi
%systemd_postun_with_restart slurmdbd.service
%changelog
+* Thu Oct 5 2017 Philip Kovacs <pkdevel(a)yahoo.com> - 17.02.7-4
+- Patch changes per resolution of upstream bug #4101:
+- salloc/sbatch/srun: must be root to use --uid/--gid options.
+- salloc: supplemental groups dropped after setuid.
+
* Thu Oct 5 2017 Philip Kovacs <pkdevel(a)yahoo.com> - 17.02.7-3
- Added BuildRequires gcc and minor packaging conformance items.
diff --git a/slurm_opts_restrict.patch b/slurm_opts_restrict.patch
new file mode 100644
index 0000000..ddf6bed
--- /dev/null
+++ b/slurm_opts_restrict.patch
@@ -0,0 +1,72 @@
+--- slurm-17.02.7/src/salloc/opt.c.old 2017-10-05 13:33:36.300529834 -0400
++++ slurm-17.02.7/src/salloc/opt.c 2017-10-05 13:37:02.093162798 -0400
+@@ -1054,6 +1054,10 @@
+ }
+ break;
+ case LONG_OPT_UID:
++ if (getuid() != 0) {
++ error("--uid only permitted by root user");
++ exit(error_exit);
++ }
+ if (opt.euid != (uid_t) -1) {
+ error("duplicate --uid option");
+ exit(error_exit);
+@@ -1064,6 +1068,10 @@
+ }
+ break;
+ case LONG_OPT_GID:
++ if (getuid() != 0) {
++ error("--gid only permitted by root user");
++ exit(error_exit);
++ }
+ if (opt.egid != (gid_t) -1) {
+ error("duplicate --gid option");
+ exit(error_exit);
+--- slurm-17.02.7/src/sbatch/opt.c.old 2017-10-05 13:39:04.067419821 -0400
++++ slurm-17.02.7/src/sbatch/opt.c 2017-10-05 13:41:20.388042002 -0400
+@@ -1621,6 +1621,10 @@
+ opt.jobid_set = true;
+ break;
+ case LONG_OPT_UID:
++ if (getuid() != 0) {
++ error("--uid only permitted by root user");
++ exit(error_exit);
++ }
+ if (opt.euid != (uid_t) -1) {
+ error("duplicate --uid option");
+ exit(error_exit);
+@@ -1631,6 +1635,10 @@
+ }
+ break;
+ case LONG_OPT_GID:
++ if (getuid() != 0) {
++ error("--gid only permitted by root user");
++ exit(error_exit);
++ }
+ if (opt.egid != (gid_t) -1) {
+ error("duplicate --gid option");
+ exit(error_exit);
+--- slurm-17.02.7/src/srun/libsrun/opt.c.old 2017-10-05 13:42:57.195643601 -0400
++++ slurm-17.02.7/src/srun/libsrun/opt.c 2017-10-05 13:44:34.753262251 -0400
+@@ -1450,6 +1450,10 @@
+ _get_int(optarg, "max-exit-timeout", true);
+ break;
+ case LONG_OPT_UID:
++ if (getuid() != 0) {
++ error("--uid only permitted by root user");
++ exit(error_exit);
++ }
+ if (opt.euid != (uid_t) -1) {
+ error("duplicate --uid option");
+ exit(error_exit);
+@@ -1460,6 +1464,10 @@
+ }
+ break;
+ case LONG_OPT_GID:
++ if (getuid() != 0) {
++ error("--gid only permitted by root user");
++ exit(error_exit);
++ }
+ if (opt.egid != (gid_t) -1) {
+ error("duplicate --gid option");
+ exit(error_exit);
diff --git a/slurm_salloc_privileges.patch b/slurm_salloc_privileges.patch
deleted file mode 100644
index 3cc2910..0000000
--- a/slurm_salloc_privileges.patch
+++ /dev/null
@@ -1,53 +0,0 @@
---- slurm-17.02.7/src/salloc/salloc.c 2017-08-14 13:48:43.000000000 -0400
-+++ slurm-17.02.7/src/salloc/salloc.c.new 2017-08-23 00:07:22.759099425 -0400
-@@ -42,6 +42,7 @@
-
- #include <dirent.h>
- #include <fcntl.h>
-+#include <grp.h>
- #include <pwd.h>
- #include <stdbool.h>
- #include <stdio.h>
-@@ -298,13 +299,27 @@
- if (_fill_job_desc_from_opts(&desc) == -1) {
- exit(error_exit);
- }
-- if (opt.gid != (gid_t) -1) {
-+
-+ /* If the requested gid is different than ours, become that gid */
-+ if ((getgid() != opt.gid) && (opt.gid != (gid_t) -1)) {
- if (setgid(opt.gid) < 0) {
- error("setgid: %m");
- exit(error_exit);
- }
- }
-
-+ /* If the requested uid is different than ours, become that uid */
-+ if ((getuid() != opt.uid) && (opt.uid != (uid_t) -1)) {
-+ if (setgroups(0, NULL) < 0) {
-+ error("setgroups: %m");
-+ exit(error_exit);
-+ }
-+ if (setuid(opt.uid) < 0) {
-+ error("setuid: %m");
-+ exit(error_exit);
-+ }
-+ }
-+
- callbacks.ping = _ping_handler;
- callbacks.timeout = _timeout_handler;
- callbacks.job_complete = _job_complete_handler;
-@@ -333,13 +348,6 @@
- sleep (++retries);
- }
-
-- /* become the user after the allocation has been requested. */
-- if (opt.uid != (uid_t) -1) {
-- if (setuid(opt.uid) < 0) {
-- error("setuid: %m");
-- exit(error_exit);
-- }
-- }
- if (alloc == NULL) {
- if (allocation_interrupted) {
- /* cancelled by signal */
diff --git a/slurm_salloc_setgroups.patch b/slurm_salloc_setgroups.patch
new file mode 100644
index 0000000..efb9260
--- /dev/null
+++ b/slurm_salloc_setgroups.patch
@@ -0,0 +1,18 @@
+--- slurm-17.02.7/src/salloc/salloc.c.old 2017-10-05 13:25:52.403682572 -0400
++++ slurm-17.02.7/src/salloc/salloc.c 2017-10-05 13:29:52.913975815 -0400
+@@ -333,8 +333,13 @@
+ sleep (++retries);
+ }
+
+- /* become the user after the allocation has been requested. */
+- if (opt.uid != (uid_t) -1) {
++ /* If the requested uid is different than ours, become that uid */
++ if ((getuid() != opt.uid) && (opt.uid != (uid_t) -1)) {
++ /* drop extended groups before changing uid/gid */
++ if ((setgroups(0, NULL) < 0)) {
++ error("setgroups: %m");
++ exit(error_exit);
++ }
+ if (setuid(opt.uid) < 0) {
+ error("setuid: %m");
+ exit(error_exit);
commit 7245d5e8435e80bb18d340a50a1d507955b2ac26
Author: Philip Kovacs <pkdevel(a)yahoo.com>
Date: Thu Oct 5 00:43:02 2017 -0400
Added BuildRequires gcc and minor packaging conformance items.
diff --git a/slurm.spec b/slurm.spec
index bef8b91..2613026 100644
--- a/slurm.spec
+++ b/slurm.spec
@@ -26,7 +26,7 @@
Name: slurm
Version: 17.02.7
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Simple Linux Utility for Resource Management
License: GPLv2 and BSD
URL:
https://slurm.schedmd.com/
@@ -73,6 +73,7 @@ BuildRequires: numactl-devel
%endif
BuildRequires: desktop-file-utils
+BuildRequires: gcc
BuildRequires: perl-ExtUtils-MakeMaker
BuildRequires: perl-podlators
BuildRequires: pkgconf
@@ -270,7 +271,7 @@
s|^dir_tmpfiles_d=.*|dir_tmpfiles_d="%{_tmpfilesdir}"|g;' \
PERL_MM_PARAMS="INSTALLDIRS=vendor" %make_build contrib V=0
%check
-make check
+%{__make} check
%install
%make_install
@@ -403,13 +404,8 @@ rm -f %{buildroot}%{perl_vendorarch}/auto/Slurm*/.packlist
rm -f %{buildroot}%{perl_vendorarch}/auto/Slurm*/Slurm*.bs
rm -f %{buildroot}%{perl_archlib}/perllocal.pod
-# customize __find_requires to strip out incorrect dependencies
-cat >find-requires <<EOF
-exec %{__find_requires} "$@" | grep -v -E '^libpmix.so|libevent'
-EOF
-chmod +x find-requires
-%global _use_internal_dependency_generator 0
-%global __find_requires %{_builddir}/%{buildsubdir}/find-requires
+# filter unneeded dependencies
+%global __requires_exclude ^libpmix.so|libevent
# -----
# Slurm
@@ -751,6 +747,9 @@ fi
%systemd_postun_with_restart slurmdbd.service
%changelog
+* Thu Oct 5 2017 Philip Kovacs <pkdevel(a)yahoo.com> - 17.02.7-3
+- Added BuildRequires gcc and minor packaging conformance items.
+
* Sat Sep 16 2017 Philip Kovacs <pkdevel(a)yahoo.com> - 17.02.7-2
- Removed unneeded Requires(pre).
diff --git a/slurm_setuser.in b/slurm_setuser.in
index 7ed78e6..ae7e6c2 100644
--- a/slurm_setuser.in
+++ b/slurm_setuser.in
@@ -50,7 +50,7 @@ function usage ()
{
echo -e "Sets the slurm installation on this node to run as the specified user and
group\n"
echo "Usage: $prog [-u <user>] [-g <group>] [-h] [-y]"
- echo " -u user> : the slurm file owner and SlurmUser ($user)"
+ echo " -u <user> : the slurm file owner and SlurmUser ($user)"
echo " -g <group> : the slurm file group ($group)"
echo " -y : answer yes to all questions ($yesno)"
echo " -h : print help"
commit bafc131e8737fddca369ecfe899f0971d11f887f
Author: Philip Kovacs <pkdevel(a)yahoo.com>
Date: Sat Sep 16 13:39:32 2017 -0400
Removed unneeded Requires(pre).
diff --git a/slurm.spec b/slurm.spec
index fd72e7e..bef8b91 100644
--- a/slurm.spec
+++ b/slurm.spec
@@ -26,7 +26,7 @@
Name: slurm
Version: 17.02.7
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Simple Linux Utility for Resource Management
License: GPLv2 and BSD
URL:
https://slurm.schedmd.com/
@@ -751,5 +751,8 @@ fi
%systemd_postun_with_restart slurmdbd.service
%changelog
+* Sat Sep 16 2017 Philip Kovacs <pkdevel(a)yahoo.com> - 17.02.7-2
+- Removed unneeded Requires(pre).
+
* Thu Sep 14 2017 Philip Kovacs <pkdevel(a)yahoo.com> - 17.02.7-1
- Packaging for Fedora.
commit cd5cc68abb573876e15789421f95fc82def0982e
Author: Philip Kovacs <pkdevel(a)yahoo.com>
Date: Fri Sep 15 22:54:12 2017 -0400
remove R(pre) shadow-utils
diff --git a/.gitignore b/.gitignore
index 7548e15..5bd3967 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-/slurm-17.02.7.tar.bz2
+/slurm-*.tar.bz2
+/slurm-*.src.rpm
diff --git a/slurm.spec b/slurm.spec
index e4a6614..fd72e7e 100644
--- a/slurm.spec
+++ b/slurm.spec
@@ -83,8 +83,6 @@ Requires: %{name}-plugins%{?_isa} = %{version}-%{release}
Requires: %{name}-plugins-munge%{?_isa} = %{version}-%{release}
Requires: munge
-Requires(pre): shadow-utils
-
%description
Slurm is an open source, fault-tolerant, and highly scalable
cluster management and job scheduling system for large and
commit 9be8f28c08d40eee072192794645ec517f23336f
Author: Philip Kovacs <pkdevel(a)yahoo.com>
Date: Fri Sep 15 18:05:40 2017 -0400
Initial import (#1489668)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7548e15
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/slurm-17.02.7.tar.bz2
diff --git a/README.md b/README.md
deleted file mode 100644
index 2d59d93..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# slurm
-
-The slurm package
\ No newline at end of file
diff --git a/slurm-128x128.png b/slurm-128x128.png
new file mode 100644
index 0000000..e8a5104
Binary files /dev/null and b/slurm-128x128.png differ
diff --git a/slurm-sview.desktop b/slurm-sview.desktop
new file mode 100644
index 0000000..b694d18
--- /dev/null
+++ b/slurm-sview.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Slurm sview
+Name[en]=Slurm sview
+Comment=Slurm sview gui to view and modify slurm state
+Comment[en]=Slurm sview gui to view and modify slurm state
+Exec=sview
+Icon=slurm
+Terminal=false
+Type=Application
+Categories=GTK;Network;ParallelComputing
diff --git a/slurm.conf b/slurm.conf
new file mode 100644
index 0000000..cb02c0d
--- /dev/null
+++ b/slurm.conf
@@ -0,0 +1,159 @@
+#
+# See the slurm.conf man page for more information.
+#
+ControlMachine=localhost
+#ControlAddr=
+#BackupController=
+#BackupAddr=
+#
+AuthType=auth/munge
+#CheckpointType=checkpoint/none
+CryptoType=crypto/munge
+#DisableRootJobs=NO
+#EnforcePartLimits=NO
+#Epilog=
+#EpilogSlurmctld=
+#FirstJobId=1
+#MaxJobId=999999
+#GresTypes=
+#GroupUpdateForce=0
+#GroupUpdateTime=600
+#JobCheckpointDir=/var/slurm/checkpoint
+#JobCredentialPrivateKey=
+#JobCredentialPublicCertificate=
+#JobFileAppend=0
+#JobRequeue=1
+#JobSubmitPlugins=1
+#KillOnBadExit=0
+#LaunchType=launch/slurm
+#Licenses=foo*4,bar
+#MailProg=/bin/mail
+#MaxJobCount=5000
+#MaxStepCount=40000
+#MaxTasksPerNode=128
+MpiDefault=none
+#MpiParams=ports=#-#
+#PluginDir=
+#PlugStackConfig=
+#PrivateData=jobs
+ProctrackType=proctrack/cgroup
+#Prolog=
+#PrologFlags=
+#PrologSlurmctld=
+#PropagatePrioProcess=0
+#PropagateResourceLimits=
+#PropagateResourceLimitsExcept=
+#RebootProgram=
+ReturnToService=1
+#SallocDefaultCommand=
+SlurmctldPidFile=/var/run/slurm/slurmctld.pid
+SlurmctldPort=6817
+SlurmdPidFile=/var/run/slurm/slurmd.pid
+SlurmdPort=6818
+SlurmdSpoolDir=/var/spool/slurm/d
+SlurmUser=root
+#SlurmdUser=root
+#SrunEpilog=
+#SrunProlog=
+StateSaveLocation=/var/spool/slurm/ctld
+SwitchType=switch/none
+#TaskEpilog=
+TaskPlugin=task/none
+#TaskPluginParam=
+#TaskProlog=
+#TopologyPlugin=topology/tree
+#TmpFS=/tmp
+#TrackWCKey=no
+#TreeWidth=
+#UnkillableStepProgram=
+#UsePAM=0
+#
+#
+# TIMERS
+#BatchStartTimeout=10
+#CompleteWait=0
+#EpilogMsgTime=2000
+#GetEnvTimeout=2
+#HealthCheckInterval=0
+#HealthCheckProgram=
+InactiveLimit=0
+KillWait=30
+#MessageTimeout=10
+#ResvOverRun=0
+MinJobAge=300
+#OverTimeLimit=0
+SlurmctldTimeout=120
+SlurmdTimeout=300
+#UnkillableStepTimeout=60
+#VSizeFactor=0
+Waittime=0
+#
+#
+# SCHEDULING
+#DefMemPerCPU=0
+FastSchedule=1
+#MaxMemPerCPU=0
+#SchedulerTimeSlice=30
+SchedulerType=sched/backfill
+SelectType=select/linear
+#SelectTypeParameters=
+#
+#
+# JOB PRIORITY
+#PriorityFlags=
+#PriorityType=priority/basic
+#PriorityDecayHalfLife=
+#PriorityCalcPeriod=
+#PriorityFavorSmall=
+#PriorityMaxAge=
+#PriorityUsageResetPeriod=
+#PriorityWeightAge=
+#PriorityWeightFairshare=
+#PriorityWeightJobSize=
+#PriorityWeightPartition=
+#PriorityWeightQOS=
+#
+#
+# LOGGING AND ACCOUNTING
+#AccountingStorageEnforce=0
+#AccountingStorageHost=
+#AccountingStorageLoc=
+#AccountingStoragePass=
+#AccountingStoragePort=
+AccountingStorageType=accounting_storage/none
+#AccountingStorageUser=
+AccountingStoreJobComment=YES
+ClusterName=local
+#DebugFlags=
+#JobCompHost=
+#JobCompLoc=
+#JobCompPass=
+#JobCompPort=
+JobCompType=jobcomp/none
+#JobCompUser=
+#JobContainerType=job_container/none
+JobAcctGatherFrequency=30
+JobAcctGatherType=jobacct_gather/none
+SlurmctldDebug=3
+#SlurmctldLogFile=
+SlurmdDebug=3
+#SlurmdLogFile=
+#SlurmSchedLogFile=
+#SlurmSchedLogLevel=
+#
+#
+# POWER SAVE SUPPORT FOR IDLE NODES (optional)
+#SuspendProgram=
+#ResumeProgram=
+#SuspendTimeout=
+#ResumeTimeout=
+#ResumeRate=
+#SuspendExcNodes=
+#SuspendExcParts=
+#SuspendRate=
+#SuspendTime=
+#
+#
+# COMPUTE NODES
+NodeName=localhost CPUs=1 State=UNKNOWN
+PartitionName=debug Nodes=localhost Default=YES MaxTime=INFINITE State=UP
diff --git a/slurm.spec b/slurm.spec
new file mode 100644
index 0000000..e4a6614
--- /dev/null
+++ b/slurm.spec
@@ -0,0 +1,757 @@
+# -------------
+# Base Packages
+# -------------
+# slurm
+# slurm-devel
+# slurm-doc
+# slurm-gui
+# slurm-libs
+# slurm-plugins
+# slurm-plugins-auth_none
+# slurm-plugins-lua
+# slurm-plugins-munge
+# slurm-plugins-mysql
+# slurm-plugins-pbs
+# slurm-plugins-rrdtool
+# slurm-slurmdbd
+
+# -----------------
+# Contribs Packages
+# -----------------
+# slurm-contribs
+# slurm-openlava
+# slurm-perlapi
+# slurm-plugins-pam_slurm
+# slurm-torque
+
+Name: slurm
+Version: 17.02.7
+Release: 1%{?dist}
+Summary: Simple Linux Utility for Resource Management
+License: GPLv2 and BSD
+URL:
https://slurm.schedmd.com/
+Source0:
http://www.schedmd.com/download/latest/%{name}-%{version}.tar.bz2
+Source1: slurm.conf
+Source2: slurmdbd.conf
+Source3: slurm-sview.desktop
+Source4: slurm-128x128.png
+Source5: slurm_setuser.in
+
+# upstream bugs #4094, #4095, #4101, #4113
+Patch0: slurm_salloc_privileges.patch
+Patch1: slurm_format_truncation.patch
+
+# build-related patches
+Patch2: slurm_perlapi_rpaths.patch
+Patch3: slurm_html_doc_path.patch
+Patch4: slurm_doc_fix.patch
+
+# Fedora-related patches
+Patch5: slurm_service_files.patch
+
+BuildRequires: pkgconfig(gtk+-2.0)
+BuildRequires: hdf5-devel
+BuildRequires: pkgconfig(hwloc)
+BuildRequires: pkgconfig(libfreeipmi)
+BuildRequires: pkgconfig(libcurl)
+BuildRequires: pkgconfig(lua)
+BuildRequires: pkgconfig(mariadb)
+BuildRequires: pkgconfig(munge)
+BuildRequires: pkgconfig(ncurses)
+BuildRequires: pkgconfig(openssl)
+BuildRequires: pam-devel
+BuildRequires: pmix-devel
+BuildRequires: readline-devel
+BuildRequires: pkgconfig(librrd)
+BuildRequires: pkgconfig(zlib)
+
+# follow arch exclusions for these devel packages
+%ifnarch s390 s390x %{arm}
+BuildRequires: libibmad-devel
+BuildRequires: libibumad-devel
+BuildRequires: numactl-devel
+%endif
+
+BuildRequires: desktop-file-utils
+BuildRequires: perl-ExtUtils-MakeMaker
+BuildRequires: perl-podlators
+BuildRequires: pkgconf
+%{?systemd_requires}
+BuildRequires: systemd
+
+Requires: %{name}-plugins%{?_isa} = %{version}-%{release}
+Requires: %{name}-plugins-munge%{?_isa} = %{version}-%{release}
+Requires: munge
+
+Requires(pre): shadow-utils
+
+%description
+Slurm is an open source, fault-tolerant, and highly scalable
+cluster management and job scheduling system for large and
+small Linux clusters.
+
+# -------------
+# Base Packages
+# -------------
+
+%package devel
+Summary: Slurm development
+Requires: %{name}-libs%{?_isa} = %{version}-%{release}
+%description devel
+Development package for Slurm. Includes headers, libraries
+and man pages for using the Slurm API.
+
+%package doc
+Summary: Slurm documentation
+%description doc
+Documentation package for Slurm. Includes documentation and
+html-based configuration tools for Slurm.
+
+%package gui
+Summary: Slurm gui and visual tools
+Requires: %{name}%{?_isa} = %{version}-%{release}
+%description gui
+This package contains the Slurm visual tools smap and sview
+and their respective man pages.
+
+%package libs
+Summary: Slurm shared libraries
+%description libs
+Slurm shared libraries.
+
+%package plugins
+Summary: Slurm plugins (loadable shared objects)
+%description plugins
+Slurm plugins (loadable shared objects) supporting a wide variety of
+architectures and behaviors. These basically provide the building blocks
+with which Slurm can be configured. Note that some system specific plugins
+are in other packages.
+
+%package plugins-auth_none
+Summary: Slurm auth null implementation (no authentication)
+%description plugins-auth_none
+Slurm null authentication plugin.
+
+%package plugins-lua
+Summary: Slurm lua plugins
+%description plugins-lua
+Slurm proctrack/lua and job_submit/lua plugins.
+
+%package plugins-munge
+Summary: Slurm authentication and crypto plugins using Munge
+%description plugins-munge
+Slurm authentication and crypto implementation using Munge. Used to
+authenticate user originating an RPC, digitally sign and/or encrypt messages.
+
+%package plugins-mysql
+Summary: Slurm MySQL/MariaDb support
+%description plugins-mysql
+Slurm MySQL/MariaDb support plugins implementing interfaces to those
+databases for accounting storage and job completion.
+
+%package plugins-pbs
+Summary: Slurm torque (PBS) support
+%description plugins-pbs
+Slurm torque (PBS) support plugins.
+
+%package plugins-rrdtool
+Summary: Slurm rrdtool external sensor plugin
+%description plugins-rrdtool
+Slurm external sensor plugin for rrdtool. This package is separated from
+the base plugins package due to gui dependencies which are unneeded if not
+using this plugin.
+
+%package slurmdbd
+Summary: Slurm database daemon
+# Use with auth_none or munge plugins for authentication
+Requires: %{name}-plugins-munge%{?_isa} = %{version}-%{release}
+Requires: %{name}-plugins-mysql%{?_isa} = %{version}-%{release}
+Requires: munge
+%description slurmdbd
+Slurm database daemon. Used to accept and process database RPCs and upload
+database changes to slurmctld daemons on each cluster.
+
+# -----------------
+# Contribs Packages
+# -----------------
+
+%package contribs
+Summary: Perl tools to print Slurm job state information
+Requires: %{name}-perlapi%{?_isa} = %{version}-%{release}
+%description contribs
+Slurm contribution package which includes the programs seff,
+sjobexitmod, sjstat and smail. See their respective man pages
+for more information.
+
+%package openlava
+Summary: Openlava/LSF wrappers for transition from OpenLava/LSF to Slurm
+Requires: %{name}-perlapi%{?_isa} = %{version}-%{release}
+%description openlava
+OpenLava wrapper scripts used for helping migrate from OpenLava/LSF to Slurm.
+
+%package perlapi
+Summary: Perl API to Slurm
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+Requires: %{name}-libs%{?_isa} = %{version}-%{release}
+%description perlapi
+Perl API package for Slurm. This package includes the perl API to provide a
+helpful interface to Slurm through Perl.
+
+%package plugins-pam_slurm
+Summary: Slurm pam modules
+Requires: %{name}-libs%{?_isa} = %{version}-%{release}
+%description plugins-pam_slurm
+The pam_slurm module restricts access to compute nodes in a cluster where Slurm
+is in use. Also includes the pam_slurm_adopt plugin for "adopting"
connections
+into slurm jobs.
+
+%package torque
+Summary: Torque/PBS wrappers for transition from Torque/PBS to Slurm
+Requires: %{name}-perlapi%{?_isa} = %{version}-%{release}
+Requires: %{name}-plugins-pbs%{?_isa} = %{version}-%{release}
+%description torque
+Torque wrapper scripts used for helping migrate from Torque/PBS to Slurm.
+
+%prep
+%setup -q -n %{name}-%{version}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+cp %SOURCE1 etc/slurm.conf
+cp %SOURCE1 etc/slurm.conf.example
+cp %SOURCE2 etc/slurmdbd.conf
+cp %SOURCE2 etc/slurmdbd.conf.example
+mkdir -p share/applications
+mkdir -p share/icons/hicolor/128x128/apps
+cp %SOURCE3 share/applications/%{name}-sview.desktop
+cp %SOURCE4 share/icons/hicolor/128x128/apps/%{name}.png
+mkdir -p extras
+cp %SOURCE5 extras/slurm_setuser.in
+
+%build
+# upstream bug #2443. need to force lazy linkage since plugins contain
+# undefined symbols not used in every context, i.e. slurmctld vs slurmd.
+CFLAGS="$RPM_OPT_FLAGS -Wl,-z,lazy"
+CXXFLAGS="$RPM_OPT_FLAGS -Wl,-z,lazy"
+# --enable-debug (auxdir/x_ac_debug.m4) breaks fortification (-O0)
+%configure \
+ --prefix=%{_prefix} \
+ --sysconfdir=%{_sysconfdir}/%{name} \
+ --with-pam_dir=%{_libdir}/security \
+ --enable-shared \
+ --disable-static \
+ --disable-debug \
+ --disable-developer \
+ --disable-bluegene \
+ --disable-native-cray \
+ --disable-cray-network \
+ --disable-salloc-background \
+ --disable-multiple-slurmd \
+ --disable-partial_attach \
+ --without-rpath \
+# patch libtool to remove rpaths
+sed -i 's|^hardcode_into_libs=.*|hardcode_into_libs=no|g' libtool
+
+# configure the extras/slurm_setuser script
+sed -r '
+s|^dir_conf=.*|dir_conf="%{_sysconfdir}/%{name}"|g;
+s|^dir_log=.*|dir_log="%{_var}/log/%{name}"|g;
+s|^dir_run=.*|dir_run="%{_rundir}/%{name}"|g;
+s|^dir_spool=.*|dir_spool="%{_var}/spool/%{name}"|g;
+s|^dir_tmpfiles_d=.*|dir_tmpfiles_d="%{_tmpfilesdir}"|g;' \
+ extras/slurm_setuser.in > extras/slurm_setuser
+
+# build base packages
+%make_build V=0
+
+# build contribs packages
+# INSTALLDIRS=vendor so perlapi goes to vendor_perl directory
+PERL_MM_PARAMS="INSTALLDIRS=vendor" %make_build contrib V=0
+
+%check
+make check
+
+%install
+%make_install
+%{__make} install-contrib DESTDIR=%{buildroot}
+
+install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}
+install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/layouts.d
+install -d -m 0755 %{buildroot}%{_unitdir}
+install -m 0644 -p etc/cgroup.conf.example \
+ %{buildroot}%{_sysconfdir}/%{name}
+install -m 0644 -p etc/cgroup.conf.example \
+ %{buildroot}%{_sysconfdir}/%{name}/cgroup.conf
+install -m 0644 -p etc/cgroup_allowed_devices_file.conf.example \
+ %{buildroot}%{_sysconfdir}/%{name}
+install -m 0644 -p etc/layouts.d.power.conf.example \
+ %{buildroot}%{_sysconfdir}/%{name}/layouts.d/power.conf.example
+install -m 0644 -p etc/layouts.d.power_cpufreq.conf.example \
+ %{buildroot}%{_sysconfdir}/%{name}/layouts.d/power_cpufreq.conf.example
+install -m 0644 -p etc/layouts.d.unit.conf.example \
+ %{buildroot}%{_sysconfdir}/%{name}/layouts.d/unit.conf.example
+install -m 0644 -p etc/slurm.conf %{buildroot}%{_sysconfdir}/%{name}
+install -m 0644 -p etc/slurm.conf.example %{buildroot}%{_sysconfdir}/%{name}
+install -m 0644 -p etc/slurmdbd.conf %{buildroot}%{_sysconfdir}/%{name}
+install -m 0644 -p etc/slurmdbd.conf.example %{buildroot}%{_sysconfdir}/%{name}
+install -m 0644 -p etc/slurm.epilog.clean %{buildroot}%{_sysconfdir}/%{name}
+install -m 0644 -p etc/slurmctld.service %{buildroot}%{_unitdir}
+install -m 0644 -p etc/slurmd.service %{buildroot}%{_unitdir}
+install -m 0644 -p etc/slurmdbd.service %{buildroot}%{_unitdir}
+
+# tmpfiles.d file for creating /run/slurm dir after reboot
+install -d -m 0755 %{buildroot}%{_tmpfilesdir}
+cat >%{buildroot}%{_tmpfilesdir}/slurm.conf <<EOF
+D %{_rundir}/%{name} 0755 root root -
+EOF
+
+# logrotate.d file for /var/log/slurm logging possibilities
+install -d -m 0755 %{buildroot}%{_var}/log/%{name}
+install -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d
+cat >%{buildroot}%{_sysconfdir}/logrotate.d/%{name} <<EOF
+%{_var}/log/%{name}/* {
+ missingok
+ notifempty
+ copytruncate
+ rotate 5
+}
+EOF
+
+# /var/run/slurm, /var/spool/slurm dirs, (ghost) pid files
+install -d -m 0755 %{buildroot}%{_rundir}/%{name}
+install -d -m 0755 %{buildroot}%{_var}/spool/%{name}/ctld
+install -d -m 0755 %{buildroot}%{_var}/spool/%{name}/d
+touch %{buildroot}%{_rundir}/%{name}/slurmctld.pid
+touch %{buildroot}%{_rundir}/%{name}/slurmd.pid
+touch %{buildroot}%{_rundir}/%{name}/slurmdbd.pid
+
+# pkgconfig file
+install -d -m 0755 %{buildroot}%{_libdir}/pkgconfig
+cat >%{buildroot}%{_libdir}/pkgconfig/slurm.pc <<EOF
+includedir=%{_prefix}/include
+libdir=%{_libdir}
+
+Cflags: -I\${includedir}
+Libs: -L\${libdir} -lslurm
+Description: Slurm API
+Name: %{name}
+Version: %{version}
+EOF
+
+# desktop file for sview GTK+ program
+desktop-file-install \
+ --dir=%{buildroot}%{_datadir}/applications \
+ share/applications/%{name}-sview.desktop
+
+# desktop icon for sview GTK+ program
+install -d -m 0755 %{buildroot}%{_datadir}/icons/hicolor/128x128/apps
+install -m 0644 share/icons/hicolor/128x128/apps/%{name}.png \
+ %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
+
+# install the extras/slurm_setuser script
+install -m 0755 extras/slurm_setuser \
+ %{buildroot}%{_bindir}/slurm_setuser
+
+install -m 0755 contribs/sjstat %{buildroot}%{_bindir}/sjstat
+
+# fix perms on these files so debug info is extracted without error
+chmod 0755 %{buildroot}%{perl_vendorarch}/auto/Slurm/Slurm.so
+chmod 0755 %{buildroot}%{perl_vendorarch}/auto/Slurmdb/Slurmdb.so
+
+# build man pages for contribs perl scripts
+for prog in sjobexitmod sjstat mpiexec pbsnodes qalter qdel qhold qrerun qrls \
+ qstat qsub bjobs bkill bsub lsid
+do
+ rm -f %{buildroot}%{_mandir}/man1/${prog}.1
+ pod2man %{buildroot}%{_bindir}/${prog} > %{buildroot}%{_mandir}/man1/${prog}.1
+done
+
+# contribs docs
+install -d -m 0755 %{buildroot}%{_docdir}/%{name}/contribs/lua
+install -m 0644 contribs/README %{buildroot}%{_docdir}/%{name}/contribs
+install -m 0644 contribs/lua/proctrack.lua %{buildroot}%{_docdir}/%{name}/contribs/lua
+
+# remove libtool archives
+find %{buildroot} -name \*.a -o -name \*.la | xargs rm -f
+# remove example plugins
+rm -f %{buildroot}%{_libdir}/%{name}/job_submit_defaults.so
+rm -f %{buildroot}%{_libdir}/%{name}/job_submit_logging.so
+rm -f %{buildroot}%{_libdir}/%{name}/job_submit_partition.so
+# remove bluegene files
+rm -f %{buildroot}%{_libdir}/%{name}/libsched_if.so
+rm -f %{buildroot}%{_libdir}/%{name}/libsched_if64.so
+rm -f %{buildroot}%{_libdir}/%{name}/runjob_plugin.so
+rm -f %{buildroot}%{_mandir}/man5/bluegene*
+rm -f %{buildroot}%{_sbindir}/sfree
+rm -f %{buildroot}%{_sbindir}/slurm_epilog
+rm -f %{buildroot}%{_sbindir}/slurm_prolog
+# remove cray files
+rm -f %{buildroot}%{_libdir}/%{name}/acct_gather_energy_cray.so
+rm -f %{buildroot}%{_libdir}/%{name}/core_spec_cray.so
+rm -f %{buildroot}%{_libdir}/%{name}/job_submit_cray.so
+rm -f %{buildroot}%{_libdir}/%{name}/select_cray.so
+rm -f %{buildroot}%{_libdir}/%{name}/switch_cray.so
+rm -f %{buildroot}%{_libdir}/%{name}/task_cray.so
+rm -f %{buildroot}%{_mandir}/man5/cray*
+# remove percs files
+rm -f %{buildroot}%{_libdir}/%{name}/launch_poe.so
+rm -f %{buildroot}%{_libdir}/%{name}/libpermapi.so
+rm -f %{buildroot}%{_libdir}/%{name}/switch_nrt.so
+# remove perl cruft
+rm -f %{buildroot}%{perl_vendorarch}/auto/Slurm*/.packlist
+rm -f %{buildroot}%{perl_vendorarch}/auto/Slurm*/Slurm*.bs
+rm -f %{buildroot}%{perl_archlib}/perllocal.pod
+
+# customize __find_requires to strip out incorrect dependencies
+cat >find-requires <<EOF
+exec %{__find_requires} "$@" | grep -v -E '^libpmix.so|libevent'
+EOF
+chmod +x find-requires
+%global _use_internal_dependency_generator 0
+%global __find_requires %{_builddir}/%{buildsubdir}/find-requires
+
+# -----
+# Slurm
+# -----
+
+%files
+%doc CONTRIBUTING.md DISCLAIMER META NEWS README.rst RELEASE_NOTES
+%license COPYING LICENSE.OpenSSL
+%dir %{_sysconfdir}/%{name}
+%dir %{_sysconfdir}/%{name}/layouts.d
+%{_sysconfdir}/logrotate.d/%{name}
+%config(noreplace) %{_sysconfdir}/%{name}/cgroup*.conf
+%{_sysconfdir}/%{name}/cgroup*.conf.example
+%config(noreplace) %{_sysconfdir}/%{name}/slurm.conf
+%{_sysconfdir}/%{name}/slurm.conf.example
+%{_sysconfdir}/%{name}/layouts.d/*.example
+%attr(0755,root,root) %{_sysconfdir}/%{name}/slurm.epilog.clean
+%dir %{_rundir}/%{name}
+%ghost %{_rundir}/%{name}/slurmctld.pid
+%ghost %{_rundir}/%{name}/slurmd.pid
+%{_bindir}/{sacct,sacctmgr,salloc,sattach,sbatch,sbcast}
+%{_bindir}/{scancel,scontrol,sdiag,sh5util,sinfo,sprio}
+%{_bindir}/{squeue,sreport,srun,sshare,sstat,strigger}
+%{_bindir}/slurm_setuser
+%{_unitdir}/slurmctld.service
+%{_unitdir}/slurmd.service
+%{_tmpfilesdir}/slurm.conf
+%{_sbindir}/slurmctld
+%{_sbindir}/slurmd
+%{_sbindir}/slurmstepd
+%{_mandir}/man1/{sacct,sacctmgr,salloc,sattach,sbatch,sbcast}.1*
+%{_mandir}/man1/{scancel,scontrol,sdiag,sh5util,sinfo,sprio}.1*
+%{_mandir}/man1/{squeue,sreport,srun,sshare,sstat,strigger}.1*
+%{_mandir}/man1/slurm.1*
+%{_mandir}/man5/acct_gather.conf.5*
+%{_mandir}/man5/burst_buffer.conf.5*
+%{_mandir}/man5/cgroup.conf.5*
+%{_mandir}/man5/ext_sensors.conf.5*
+%{_mandir}/man5/gres.conf.5*
+%{_mandir}/man5/knl.conf.5*
+%{_mandir}/man5/nonstop.conf.5*
+%{_mandir}/man5/slurm.conf.5*
+%{_mandir}/man5/topology.conf.5*
+%{_mandir}/man8/slurmctld.8*
+%{_mandir}/man8/slurmd.8*
+%{_mandir}/man8/slurmstepd.8*
+%{_mandir}/man8/spank.8*
+%dir %{_var}/log/%{name}
+%dir %{_var}/spool/%{name}
+%dir %{_var}/spool/%{name}/ctld
+%dir %{_var}/spool/%{name}/d
+
+# -----------
+# Slurm-devel
+# -----------
+
+%files devel
+%dir %{_prefix}/include/%{name}
+%{_prefix}/include/%{name}/pmi*.h
+%{_prefix}/include/%{name}/slurm.h
+%{_prefix}/include/%{name}/slurm_errno.h
+%{_prefix}/include/%{name}/slurmdb.h
+%{_prefix}/include/%{name}/smd_ns.h
+%{_prefix}/include/%{name}/spank.h
+%{_libdir}/libpmi*.so
+%{_libdir}/libslurm.so
+%{_libdir}/libslurmdb.so
+%{_libdir}/pkgconfig/%{name}.pc
+%dir %{_libdir}/%{name}/src
+%dir %{_libdir}/%{name}/src/sattach
+%{_libdir}/%{name}/src/sattach/sattach.wrapper.c
+%dir %{_libdir}/%{name}/src/srun
+%{_libdir}/%{name}/src/srun/srun.wrapper.c
+%{_mandir}/man3/*.3.*
+
+# ---------
+# Slurm-doc
+# ---------
+
+%files doc
+%dir %{_docdir}/%{name}
+%dir %{_docdir}/%{name}/html
+%{_docdir}/%{name}/html/*
+
+# ---------
+# Slurm-gui
+# ---------
+
+%files gui
+%{_bindir}/smap
+%{_bindir}/sview
+%{_datadir}/applications/*.desktop
+%{_datadir}/icons/hicolor/*/apps/%{name}.png
+%{_mandir}/man1/smap.1*
+%{_mandir}/man1/sview.1*
+
+# ----------
+# Slurm-libs
+# ----------
+
+%files libs
+%{_libdir}/libpmi*.so.*
+%{_libdir}/libslurm.so.*
+%{_libdir}/libslurmdb.so.*
+
+# -------------
+# Slurm-plugins
+# -------------
+
+%files plugins
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/accounting_storage_{filetxt,none,slurmdbd}.so
+%{_libdir}/%{name}/acct_gather_energy_{ibmaem,ipmi,none,rapl}.so
+%{_libdir}/%{name}/acct_gather_filesystem_{lustre,none}.so
+%{_libdir}/%{name}/acct_gather_infiniband_{none,ofed}.so
+%{_libdir}/%{name}/acct_gather_profile_{hdf5,none}.so
+%{_libdir}/%{name}/burst_buffer_generic.so
+%{_libdir}/%{name}/checkpoint_{none,ompi}.so
+%{_libdir}/%{name}/core_spec_none.so
+%{_libdir}/%{name}/crypto_openssl.so
+%{_libdir}/%{name}/ext_sensors_none.so
+%{_libdir}/%{name}/gres_{gpu,mic,nic}.so
+%{_libdir}/%{name}/job_container_{cncu,none}.so
+%{_libdir}/%{name}/job_submit_all_partitions.so
+%{_libdir}/%{name}/job_submit_require_timelimit.so
+%{_libdir}/%{name}/job_submit_throttle.so
+%{_libdir}/%{name}/jobacct_gather_{cgroup,linux,none}.so
+%{_libdir}/%{name}/jobcomp_{elasticsearch,filetxt,none,script}.so
+%{_libdir}/%{name}/launch_slurm.so
+%{_libdir}/%{name}/layouts_power_{cpufreq,default}.so
+%{_libdir}/%{name}/layouts_unit_default.so
+%{_libdir}/%{name}/mcs_{account,group,none,user}.so
+%{_libdir}/%{name}/mpi_{lam,mpich1_p4,mpich1_shmem,mpichgm,mpichmx}.so
+%{_libdir}/%{name}/mpi_{mvapich,none,openmpi,pmi2,pmix,pmix_v1}.so
+%{_libdir}/%{name}/node_features_knl_generic.so
+%{_libdir}/%{name}/power_none.so
+%{_libdir}/%{name}/preempt_{job_prio,none,partition_prio,qos}.so
+%{_libdir}/%{name}/priority_{basic,multifactor}.so
+%{_libdir}/%{name}/proctrack_{cgroup,linuxproc,pgid}.so
+%{_libdir}/%{name}/route_{default,topology}.so
+%{_libdir}/%{name}/sched_{backfill,builtin,hold}.so
+%{_libdir}/%{name}/select_{alps,bluegene,cons_res,linear,serial}.so
+%{_libdir}/%{name}/slurmctld_nonstop.so
+%{_libdir}/%{name}/switch_{generic,none}.so
+%{_libdir}/%{name}/task_{affinity,cgroup,none}.so
+%{_libdir}/%{name}/topology_{3d_torus,hypercube,node_rank,none,tree}.so
+
+# -----------------------
+# Slurm-plugins-auth_none
+# -----------------------
+
+%files plugins-auth_none
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/auth_none.so
+
+# -----------------
+# Slurm-plugins-lua
+# -----------------
+
+%files plugins-lua
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/job_submit_lua.so
+%{_libdir}/%{name}/proctrack_lua.so
+
+# -------------------
+# Slurm-plugins-munge
+# -------------------
+
+%files plugins-munge
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/auth_munge.so
+%{_libdir}/%{name}/crypto_munge.so
+
+# -------------------
+# Slurm-plugins-mysql
+# -------------------
+
+%files plugins-mysql
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/accounting_storage_mysql.so
+%{_libdir}/%{name}/jobcomp_mysql.so
+
+# -----------------
+# Slurm-plugins-pbs
+# -----------------
+
+%files plugins-pbs
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/job_submit_pbs.so
+%{_libdir}/%{name}/spank_pbs.so
+
+# ---------------------
+# Slurm-plugins-rrdtool
+# ---------------------
+
+%files plugins-rrdtool
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/ext_sensors_rrd.so
+
+# --------
+# Slurmdbd
+# --------
+
+%files slurmdbd
+%dir %{_sysconfdir}/%{name}
+%config(noreplace) %{_sysconfdir}/%{name}/slurmdbd.conf
+%{_sysconfdir}/%{name}/slurmdbd.conf.example
+%dir %{_rundir}/%{name}
+%ghost %{_rundir}/%{name}/slurmdbd.pid
+%{_bindir}/slurm_setuser
+%{_unitdir}/slurmdbd.service
+%{_tmpfilesdir}/slurm.conf
+%{_sbindir}/slurmdbd
+%{_mandir}/man5/slurmdbd.conf.5*
+%{_mandir}/man8/slurmdbd.8*
+
+# --------------
+# Slurm-contribs
+# --------------
+
+%files contribs
+%{_bindir}/seff
+%{_bindir}/sgather
+%{_bindir}/sjobexitmod
+%{_bindir}/sjstat
+%{_bindir}/smail
+%{_mandir}/man1/sgather.1*
+%{_mandir}/man1/sjobexitmod.1*
+%{_mandir}/man1/sjstat.1*
+%dir %{_docdir}/%{name}
+%dir %{_docdir}/%{name}/contribs
+%{_docdir}/%{name}/contribs/README
+%dir %{_docdir}/%{name}/contribs/lua
+%{_docdir}/%{name}/contribs/lua/proctrack.lua
+
+# --------------
+# Slurm-openlava
+# --------------
+
+%files openlava
+%{_bindir}/bjobs
+%{_bindir}/bkill
+%{_bindir}/bsub
+%{_bindir}/lsid
+%{_mandir}/man1/bjobs.1*
+%{_mandir}/man1/bkill.1*
+%{_mandir}/man1/bsub.1*
+%{_mandir}/man1/lsid.1*
+
+# -------------
+# Slurm-perlapi
+# -------------
+
+%files perlapi
+%{perl_vendorarch}/Slurm.pm
+%dir %{perl_vendorarch}/Slurm
+%{perl_vendorarch}/Slurm/*.pm
+%{perl_vendorarch}/Slurmdb.pm
+%dir %{perl_vendorarch}/auto/Slurm
+%{perl_vendorarch}/auto/Slurm/Slurm.so
+%dir %{perl_vendorarch}/auto/Slurmdb
+%{perl_vendorarch}/auto/Slurmdb/Slurmdb.so
+%{perl_vendorarch}/auto/Slurmdb/autosplit.ix
+%{_mandir}/man3/Slurm*.3pm*
+
+# ---------------
+# Slurm-pam_slurm
+# ---------------
+
+%files plugins-pam_slurm
+%dir %{_libdir}/%{name}
+%{_libdir}/security/pam_slurm.so
+%{_libdir}/security/pam_slurm_adopt.so
+
+# ------------
+# Slurm-torque
+# ------------
+
+%files torque
+%{_bindir}/generate_pbs_nodefile
+%{_bindir}/mpiexec
+%{_bindir}/pbsnodes
+%{_bindir}/qalter
+%{_bindir}/qdel
+%{_bindir}/qhold
+%{_bindir}/qrerun
+%{_bindir}/qrls
+%{_bindir}/qstat
+%{_bindir}/qsub
+%{_mandir}/man1/pbsnodes.1*
+%{_mandir}/man1/qalter.1*
+%{_mandir}/man1/qdel.1*
+%{_mandir}/man1/qhold.1*
+%{_mandir}/man1/qrerun.1*
+%{_mandir}/man1/qrls.1*
+%{_mandir}/man1/qstat.1*
+%{_mandir}/man1/qsub.1*
+%{_mandir}/man1/mpiexec.1*
+
+%post
+%systemd_post slurmd.service
+%systemd_post slurmctld.service
+
+%preun
+%systemd_preun slurmd.service
+%systemd_preun slurmctld.service
+
+%postun
+%systemd_postun_with_restart slurmd.service
+%systemd_postun_with_restart slurmctld.service
+
+%post devel -p /sbin/ldconfig
+
+%postun devel -p /sbin/ldconfig
+
+%post gui
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun gui
+if [ $1 -eq 0 ] ; then
+ /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+ /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans gui
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+%post libs -p /sbin/ldconfig
+
+%postun libs -p /sbin/ldconfig
+
+%post slurmdbd
+%systemd_post slurmdbd.service
+
+%preun slurmdbd
+%systemd_preun slurmdbd.service
+
+%postun slurmdbd
+%systemd_postun_with_restart slurmdbd.service
+
+%changelog
+* Thu Sep 14 2017 Philip Kovacs <pkdevel(a)yahoo.com> - 17.02.7-1
+- Packaging for Fedora.
diff --git a/slurm_doc_fix.patch b/slurm_doc_fix.patch
new file mode 100644
index 0000000..8cd7936
--- /dev/null
+++ b/slurm_doc_fix.patch
@@ -0,0 +1,43 @@
+--- slurm-17.02.6/doc/man/man5/burst_buffer.conf.5.orig 2017-08-15 23:22:24.333180212
-0400
++++ slurm-17.02.6/doc/man/man5/burst_buffer.conf.5 2017-08-15 23:23:45.224298397 -0400
+@@ -31,18 +31,18 @@
+ \fBAllowUsers\fR
+ Comma separated list of user names and/or IDs permitted to use burst buffers.
+ The options \fBAllowUsers\fR and \fBDenyUsers\fR can not both be specified.
+-By default all users are permitted to use burst buffers.
++By default all users are permitted to use burst buffers. Possible future
++enhancement for generic plugin.
+
+-.\ Possible future enhancement for generic plugin
+-.\ .TP
+-.\ \fBAltPool\fR
+-.\ The AltPool value consists of a comma separated list of alternate pools of
+-.\ resources, each of which includes a name separated by a colon and a numeric
+-.\ value.
+-.\ The numeric value can include a suffix of "k", "m",
"g", "t" and "p" which
+-.\ multiplies the numeric value by 1,024, 1,048,576, 1,073,741,824 etc.
+-.\ The numeric value is a 64-bit value.
+-.\ for example, "AltPool=test:20g,small:4g
++.TP
++\fBAltPool\fR
++The AltPool value consists of a comma separated list of alternate pools of
++resources, each of which includes a name separated by a colon and a numeric
++value.
++The numeric value can include a suffix of "k", "m", "g",
"t" and "p" which
++multiplies the numeric value by 1,024, 1,048,576, 1,073,741,824 etc.
++The numeric value is a 64-bit value.
++for example, "AltPool=test:20g,small:4g
+
+ .TP
+ \fBCreateBuffer\fR
+@@ -195,8 +195,8 @@
+ AllowUsers=alan,brenda
+ .br
+ PrivateData=true
+-.\ .br
+-.\ Gres=nodes:10,other:20
++.br
++Gres=nodes:10,other:20
+ .br
+ #
+ .br
diff --git a/slurm_format_truncation.patch b/slurm_format_truncation.patch
new file mode 100644
index 0000000..8107e97
--- /dev/null
+++ b/slurm_format_truncation.patch
@@ -0,0 +1,44 @@
+---
slurm-17.02.7/src/plugins/node_features/knl_generic/node_features_knl_generic.c 2017-08-15
14:37:07.000000000 -0400
++++
slurm-17.02.7/src/plugins/node_features/knl_generic/node_features_knl_generic.c.new 2017-08-21
01:35:38.352301060 -0400
+@@ -1607,7 +1607,7 @@
+ // insmod /home/tim/kmod/xppsl-addons/zonesort_module.ko
+ struct stat sb;
+ int buf_len, fd, i, len;
+- char buf[8];
++ char buf[16];
+
+ if (stat(ZONE_SORT_PATH, &sb) == -1)
+ (void) system(MODPROBE_PATH " zonesort_module");
+--- slurm-17.02.7/src/plugins/select/bluegene/bg_core.c 2017-07-21 11:17:53.000000000
-0400
++++ slurm-17.02.7/src/plugins/select/bluegene/bg_core.c.new 2017-08-21 01:39:35.896506235
-0400
+@@ -701,7 +701,7 @@
+ */
+ extern const char *bg_err_str(int inx)
+ {
+- static char tmp_char[10];
++ static char tmp_char[32];
+
+ switch (inx) {
+ case SLURM_SUCCESS:
+--- slurm-17.02.7/src/plugins/task/affinity/cpuset.c 2017-07-21 11:17:53.000000000 -0400
++++ slurm-17.02.7/src/plugins/task/affinity/cpuset.c.new 2017-08-21 01:42:53.872712983
-0400
+@@ -354,7 +354,7 @@
+ int slurm_set_memset(char *path, nodemask_t *new_mask)
+ {
+ char file_path[PATH_MAX];
+- char mstr[1 + CPU_SETSIZE * 4], tmp[10];
++ char mstr[1 + CPU_SETSIZE * 4], tmp[16];
+ int fd, i, max_node;
+ ssize_t rc;
+
+--- slurm-17.02.7/src/slurmd/slurmd/read_proc.c 2017-07-21 11:17:53.000000000 -0400
++++ slurm-17.02.7/src/slurmd/slurmd/read_proc.c.new 2017-08-26 00:27:38.036289952 -0400
+@@ -233,7 +233,7 @@
+ DIR *proc_fs;
+ struct dirent *proc_ent;
+ int proc_fd, proc_stat_size, found, n;
+- char proc_name[22], *proc_stat;
++ char proc_name[272], *proc_stat;
+ struct stat buffer;
+ int uid, session;
+ long resident_set_size;
diff --git a/slurm_html_doc_path.patch b/slurm_html_doc_path.patch
new file mode 100644
index 0000000..263439a
--- /dev/null
+++ b/slurm_html_doc_path.patch
@@ -0,0 +1,11 @@
+--- slurm-17.02.7/doc/html/Makefile.in 2017-08-14 13:48:43.000000000 -0400
++++ slurm-17.02.7/doc/html/Makefile.in.new 2017-08-24 07:58:01.242452059 -0400
+@@ -417,7 +417,7 @@
+ host_cpu = @host_cpu@
+ host_os = @host_os@
+ host_vendor = @host_vendor@
+-htmldir = ${datadir}/doc/${PACKAGE}-${SLURM_VERSION_STRING}/html
++htmldir = ${datadir}/doc/${PACKAGE}/html
+ includedir = @includedir@
+ infodir = @infodir@
+ install_sh = @install_sh@
diff --git a/slurm_perlapi_rpaths.patch b/slurm_perlapi_rpaths.patch
new file mode 100644
index 0000000..66b5afe
--- /dev/null
+++ b/slurm_perlapi_rpaths.patch
@@ -0,0 +1,22 @@
+--- slurm-17.02.7/contribs/perlapi/libslurm/perl/Makefile.PL.in.orig 2016-11-08
15:11:32.000000000 -0500
++++ slurm-17.02.7/contribs/perlapi/libslurm/perl/Makefile.PL.in 2017-08-17
03:06:27.363688978 -0400
+@@ -77,7 +77,7 @@
+ # AIX has problems with not always having the correct
+ # flags so we have to add some :)
+ my $os = lc(`uname`);
+-my $other_ld_flags = "-Wl,-rpath,@top_builddir(a)/src/api/.libs
-Wl,-rpath,@prefix@/lib";
++my $other_ld_flags = " ";
+ $other_ld_flags = " -brtl -G -bnoentry -bgcbypass:1000 -bexpfull"
+ if $os =~ "aix";
+
+--- slurm-17.02.7/contribs/perlapi/libslurmdb/perl/Makefile.PL.in.orig 2017-08-17
03:37:39.689054161 -0400
++++ slurm-17.02.7/contribs/perlapi/libslurmdb/perl/Makefile.PL.in 2017-08-17
03:38:07.305780718 -0400
+@@ -76,7 +76,7 @@
+ # AIX has problems with not always having the correct
+ # flags so we have to add some :)
+ my $os = lc(`uname`);
+-my $other_ld_flags = "-Wl,-rpath,@top_builddir(a)/src/db_api/.libs
-Wl,-rpath,@prefix@/lib";
++my $other_ld_flags = " ";
+ $other_ld_flags = " -brtl -G -bnoentry -bgcbypass:1000 -bexpfull"
+ if $os =~ "aix";
+
diff --git a/slurm_salloc_privileges.patch b/slurm_salloc_privileges.patch
new file mode 100644
index 0000000..3cc2910
--- /dev/null
+++ b/slurm_salloc_privileges.patch
@@ -0,0 +1,53 @@
+--- slurm-17.02.7/src/salloc/salloc.c 2017-08-14 13:48:43.000000000 -0400
++++ slurm-17.02.7/src/salloc/salloc.c.new 2017-08-23 00:07:22.759099425 -0400
+@@ -42,6 +42,7 @@
+
+ #include <dirent.h>
+ #include <fcntl.h>
++#include <grp.h>
+ #include <pwd.h>
+ #include <stdbool.h>
+ #include <stdio.h>
+@@ -298,13 +299,27 @@
+ if (_fill_job_desc_from_opts(&desc) == -1) {
+ exit(error_exit);
+ }
+- if (opt.gid != (gid_t) -1) {
++
++ /* If the requested gid is different than ours, become that gid */
++ if ((getgid() != opt.gid) && (opt.gid != (gid_t) -1)) {
+ if (setgid(opt.gid) < 0) {
+ error("setgid: %m");
+ exit(error_exit);
+ }
+ }
+
++ /* If the requested uid is different than ours, become that uid */
++ if ((getuid() != opt.uid) && (opt.uid != (uid_t) -1)) {
++ if (setgroups(0, NULL) < 0) {
++ error("setgroups: %m");
++ exit(error_exit);
++ }
++ if (setuid(opt.uid) < 0) {
++ error("setuid: %m");
++ exit(error_exit);
++ }
++ }
++
+ callbacks.ping = _ping_handler;
+ callbacks.timeout = _timeout_handler;
+ callbacks.job_complete = _job_complete_handler;
+@@ -333,13 +348,6 @@
+ sleep (++retries);
+ }
+
+- /* become the user after the allocation has been requested. */
+- if (opt.uid != (uid_t) -1) {
+- if (setuid(opt.uid) < 0) {
+- error("setuid: %m");
+- exit(error_exit);
+- }
+- }
+ if (alloc == NULL) {
+ if (allocation_interrupted) {
+ /* cancelled by signal */
diff --git a/slurm_service_files.patch b/slurm_service_files.patch
new file mode 100644
index 0000000..988262d
--- /dev/null
+++ b/slurm_service_files.patch
@@ -0,0 +1,33 @@
+--- slurm-17.02.7/etc/slurmctld.service.in 2017-08-14 13:48:43.000000000 -0400
++++ slurm-17.02.7/etc/slurmctld.service.in.new 2017-08-21 13:35:26.472209176 -0400
+@@ -8,7 +8,7 @@
+ EnvironmentFile=-/etc/sysconfig/slurmctld
+ ExecStart=@sbindir@/slurmctld $SLURMCTLD_OPTIONS
+ ExecReload=/bin/kill -HUP $MAINPID
+-PIDFile=/var/run/slurmctld.pid
++PIDFile=/var/run/slurm/slurmctld.pid
+
+ [Install]
+ WantedBy=multi-user.target
+--- slurm-17.02.7/etc/slurmd.service.in 2017-08-14 13:48:43.000000000 -0400
++++ slurm-17.02.7/etc/slurmd.service.in.new 2017-08-21 14:45:23.485061312 -0400
+@@ -8,7 +8,7 @@
+ EnvironmentFile=-/etc/sysconfig/slurmd
+ ExecStart=@sbindir@/slurmd $SLURMD_OPTIONS
+ ExecReload=/bin/kill -HUP $MAINPID
+-PIDFile=/var/run/slurmd.pid
++PIDFile=/var/run/slurm/slurmd.pid
+ KillMode=process
+ LimitNOFILE=51200
+ LimitMEMLOCK=infinity
+--- slurm-17.02.7/etc/slurmdbd.service.in 2017-08-14 13:48:43.000000000 -0400
++++ slurm-17.02.7/etc/slurmdbd.service.in.new 2017-08-21 14:47:56.134071820 -0400
+@@ -8,7 +8,7 @@
+ EnvironmentFile=-/etc/sysconfig/slurmdbd
+ ExecStart=@sbindir@/slurmdbd $SLURMDBD_OPTIONS
+ ExecReload=/bin/kill -HUP $MAINPID
+-PIDFile=/var/run/slurmdbd.pid
++PIDFile=/var/run/slurm/slurmdbd.pid
+
+ [Install]
+ WantedBy=multi-user.target
diff --git a/slurm_setuser.in b/slurm_setuser.in
new file mode 100644
index 0000000..7ed78e6
--- /dev/null
+++ b/slurm_setuser.in
@@ -0,0 +1,229 @@
+#!/bin/bash
+#
+# Copyright (c) 2017, Philip Kovacs
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+prog=`basename $0`
+user=root
+group=root
+yesno=no
+
+red='\033[0;31m'
+green='\033[0;32m'
+nc='\033[0m'
+pass="${green}[*]${nc}"
+fail="${red}[!]${nc}"
+ask="[?]"
+
+# the rpm spec configures these directory variables
+dir_conf="%{_sysconfdir}/%{name}"
+dir_log="%{_var}/log/%{name}"
+dir_run="%{_rundir}/%{name}"
+dir_spool="%{_var}/spool/%{name}"
+dir_tmpfiles_d="%{_tmpfilesdir}"
+
+file_slurm_conf="${dir_conf}/slurm.conf"
+file_slurmdbd_conf="${dir_conf}/slurmdbd.conf"
+file_tmpfiles_d_conf="${dir_tmpfiles_d}/slurm.conf"
+
+function usage ()
+{
+ echo -e "Sets the slurm installation on this node to run as the specified user and
group\n"
+ echo "Usage: $prog [-u <user>] [-g <group>] [-h] [-y]"
+ echo " -u user> : the slurm file owner and SlurmUser ($user)"
+ echo " -g <group> : the slurm file group ($group)"
+ echo " -y : answer yes to all questions ($yesno)"
+ echo " -h : print help"
+}
+
+function answer ()
+{
+ while true
+ do
+ if [ "${yesno}" = "yes" ]; then
+ echo -e "${ask} $1 [${yesno}]"
+ __answer="yes"
+ break;
+ fi
+
+ echo -e -n "${ask} "
+ read -e -p "$1 [${yesno}] " yn
+ case $yn in
+ "") __answer=$yesno
+ break;;
+ [yY]*) __answer="yes"
+ break;;
+ [nN]*) __answer="no"
+ break;;
+ *)
+ echo "Please answer yes or no";;
+ esac
+ done
+}
+
+#
+# Parse options
+#
+while getopts "u:g:yh" opt
+do
+ case "$opt" in
+ h)
+ usage
+ exit 2;;
+ u)
+ user=$OPTARG;;
+ g)
+ group=$OPTARG;;
+ y)
+ yesno=yes;;
+ *)
+ echo ""
+ usage
+ exit 2;;
+ esac
+done
+
+#
+# Run this script only as root
+#
+if [ $UID -eq 0 ]; then
+ echo -e "${pass} running as root... good"
+else
+ echo -e "${fail} $prog must be run as root."
+ exit 1
+fi
+
+#
+# Validate the user and group
+#
+valid_user="`getent passwd $user || :`"
+if [ -n "$valid_user" ]; then
+ echo -e "${pass} found user $user... good"
+else
+ echo -e "${fail} the specified user was not found... ${user}"
+ exit 2
+fi
+valid_group="`getent group $group || :`"
+if [ -n "$valid_group" ]; then
+ echo -e "${pass} found group $group... good"
+else
+ echo -e "${fail} the specified group was not found... ${group}"
+ exit 2
+fi
+
+#
+# Slurm services must not be running
+#
+slurmctld_running_pid="`ps -e | grep slurmctld | grep -v grep | awk '{print
$1}'`"
+if [ -z "$slurmctld_running_pid" ]; then
+ echo -e "${pass} slurmctld is not running... good"
+else
+ echo -e "${fail} slurmctld is running... stop it with [systemctl stop
slurmctld]"
+ exit 2
+fi
+slurmd_running_pid="`ps -e | grep slurmd | grep -v grep | awk '{print
$1}'`"
+if [ -z "$slurmd_running_pid" ]; then
+ echo -e "${pass} slurmd is not running... good"
+else
+ echo -e "${fail} slurmd is running... stop it with [systemctl stop slurmd]"
+ exit 2
+fi
+slurmdbd_running_pid="`ps -e | grep slurmdbd | grep -v grep | awk '{print
$1}'`"
+if [ -z "$slurmdbd_running_pid" ]; then
+ echo -e "${pass} slurmdbd is not running... good"
+else
+ echo -e "${fail} slurmdbd is running... stop it with [systemctl stop
slurmdbd]"
+ exit 2
+fi
+
+#
+# Update SlurmUser in the slurm configs
+#
+for file in "$file_slurm_conf" "$file_slurmdbd_conf"
+do
+ if [ -f "$file" ]; then
+ answer "update SlurmUser in $file ?"
+ if [ "$__answer" = "yes" ]; then
+ sed -i "s|^SlurmUser=.*|SlurmUser=${user}|g" $file
+ if [ $? -eq 0 ]; then
+ echo -e "${pass} $file updated successfully"
+ else
+ echo -e "${fail} error updating $file"
+ exit 1
+ fi
+ fi
+ fi
+done
+
+#
+# Update ownership of slurm directories that must be owned by the slurm user
+#
+for dir in "$dir_log" "$dir_run" "$dir_spool"
"$dir_spool/ctld"
+do
+ if [ -d "$dir" ]; then
+ answer "update ownership of $dir ?"
+ if [ "$__answer" = "yes" ]; then
+ chown ${user}:${group} $dir
+ if [ $? -eq 0 ]; then
+ echo -e "${pass} $dir updated successfully"
+ else
+ echo -e "${fail} error updating $dir"
+ exit 1
+ fi
+ fi
+ fi
+done
+
+#
+# Update ownership of slurmctld spool files which are owned by the slurm user
+#
+if [ -d "${dir_spool}/ctld" ]; then
+ answer "update ownership of files in ${dir_spool}/ctld ?"
+ if [ "$__answer" = "yes" ]; then
+ if [ $? -eq 0 ]; then
+ find ${dir_spool}/ctld -mindepth 1 -exec chown ${user}:${group} {} \;
+ echo -e "${pass} ${dir_spool}/ctld files updated successfully"
+ else
+ echo -e "${fail} error updating ${dir_spool}/ctld files"
+ exit 1
+ fi
+ fi
+fi
+
+#
+# Update the tmpfiles.d config file to the new slurm user
+#
+if [ -f "$file_tmpfiles_d_conf" ]; then
+ answer "update tmpfiles.d config $file_tmpfiles_d_conf ?"
+ if [ "$__answer" = "yes" ]; then
+ sed -i "s|0755 \(.*\) -$|0755 ${user} ${group} -|g" $file_tmpfiles_d_conf
+ if [ $? -eq 0 ]; then
+ echo -e "${pass} $file_tmpfiles_d_conf updated successfully"
+ else
+ echo -e "${fail} error updating $file_tmpfiles_d_conf"
+ exit 1
+ fi
+ fi
+fi
+
+exit 0
diff --git a/slurmdbd.conf b/slurmdbd.conf
new file mode 100644
index 0000000..32eb78f
--- /dev/null
+++ b/slurmdbd.conf
@@ -0,0 +1,37 @@
+#
+# See the slurmdbd.conf man page for more information.
+#
+# Archive info
+#ArchiveJobs=yes
+#ArchiveDir="/tmp"
+#ArchiveSteps=yes
+#ArchiveScript=
+#JobPurge=12
+#StepPurge=1
+#
+# Authentication info
+AuthType=auth/munge
+#AuthInfo=/var/run/munge/munge.socket.2
+#
+# slurmDBD info
+DbdAddr=localhost
+DbdHost=localhost
+#DbdPort=7031
+SlurmUser=root
+#MessageTimeout=300
+DebugLevel=4
+#DefaultQOS=normal,standby
+#LogFile=
+PidFile=/var/run/slurm/slurmdbd.pid
+#PluginDir=
+#PrivateData=accounts,users,usage,jobs
+#TrackWCKey=yes
+#
+# Database info
+StorageType=accounting_storage/mysql
+#StorageHost=localhost
+#StoragePort=1234
+StoragePass=password
+StorageUser=slurm
+#StorageLoc=slurm_acct_db
+
diff --git a/sources b/sources
new file mode 100644
index 0000000..8bfd228
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (slurm-17.02.7.tar.bz2) =
363ba06b7f2f8a1203396395a3d88b580ba76192bd050c94dbde5c0729fd20a8304f1a0842362588e6e1eed1527f8be47f17dfb0731fbc867d2a253112b147d5