Accepting request 714909 from network:cluster

- added cray depend libraries to seperate package, as they are now
  built, since json is enabled

- Updated to 18.0.7 for fixing CVE-2019-12838 and (bsc#1140709)
  * Update "xauth list" to use the same 10000ms timeout as the other xauth
    commands.
  * Fix issue in gres code to handle a gres cnt of 0.
  * Don't purge jobs if backfill is running.
  * Verify job is pending add/removing accrual time.
  * Don't abort when the job doesn't have an association that was removed
    before the job was able to make it to the database.
  * Set state_reason if select_nodes() fails job for QOS or Account.
  * Avoid seg_fault on referencing association without a valid_qos bitmap.
  * If Association/QOS is removed on a pending job set that job as ineligible.
  * When changing a jobs account/qos always make sure you remove the old limits.
  * Don't reset a FAIL_QOS or FAIL_ACCOUNT job reason until the qos or
    account changed.
  * Restore "sreport -T ALL" functionality.
  * Correctly typecast signals being sent through the api.
  * Properly initialize structures throughout Slurm.
  * Sync "numtask" squeue format option for jobs and steps to "numtasks".
  * Fix sacct -PD to avoid CA before start jobs.
  * Fix potential deadlock with backup slurmctld.
  * Fixed issue with jobs not appearing in sacct after dependency satisfied.
  * Fix showing non-eligible jobs when asking with -j and not -s.
  * Fix issue with backfill scheduler scheduling tasks of an array
    when not the head job.
  * accounting_storage/mysql - fix SIGABRT in the archive load logic.
  * accounting_storage/mysql - fix memory leak in the archive load logic.
  * Limit records per single SQL statement when loading archived data. (forwarded request 714908 from mslacken)

OBS-URL: https://build.opensuse.org/request/show/714909
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/slurm?expand=0&rev=28
This commit is contained in:
Dominique Leuenberger 2019-07-13 11:50:15 +00:00 committed by Git OBS Bridge
commit 8991e2f1ad
4 changed files with 346 additions and 75 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c45e9d1c18efa0ae0fbeaf0a244794a1288c6adb9e40cf4efc70c359ad083277
size 6168687

3
slurm-18.08.8.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:043a048ac8a6fb6f6bf7c66434b05ed8b5b871e5e86e407c063d0c8cb4cb6e0d
size 6208426

View File

@ -1,3 +1,147 @@
-------------------------------------------------------------------
Fri Jul 12 09:04:55 UTC 2019 - Christian Goll <cgoll@suse.com>
- added cray depend libraries to seperate package, as they are now
built, since json is enabled
-------------------------------------------------------------------
Thu Jul 11 10:57:52 UTC 2019 - Christian Goll <cgoll@suse.com>
- Updated to 18.0.7 for fixing CVE-2019-12838 and (bsc#1140709)
* Update "xauth list" to use the same 10000ms timeout as the other xauth
commands.
* Fix issue in gres code to handle a gres cnt of 0.
* Don't purge jobs if backfill is running.
* Verify job is pending add/removing accrual time.
* Don't abort when the job doesn't have an association that was removed
before the job was able to make it to the database.
* Set state_reason if select_nodes() fails job for QOS or Account.
* Avoid seg_fault on referencing association without a valid_qos bitmap.
* If Association/QOS is removed on a pending job set that job as ineligible.
* When changing a jobs account/qos always make sure you remove the old limits.
* Don't reset a FAIL_QOS or FAIL_ACCOUNT job reason until the qos or
account changed.
* Restore "sreport -T ALL" functionality.
* Correctly typecast signals being sent through the api.
* Properly initialize structures throughout Slurm.
* Sync "numtask" squeue format option for jobs and steps to "numtasks".
* Fix sacct -PD to avoid CA before start jobs.
* Fix potential deadlock with backup slurmctld.
* Fixed issue with jobs not appearing in sacct after dependency satisfied.
* Fix showing non-eligible jobs when asking with -j and not -s.
* Fix issue with backfill scheduler scheduling tasks of an array
when not the head job.
* accounting_storage/mysql - fix SIGABRT in the archive load logic.
* accounting_storage/mysql - fix memory leak in the archive load logic.
* Limit records per single SQL statement when loading archived data.
* Fix unnecessary reloading of job submit plugins.
* Allow job submit plugins to be turned on/off with a reconfigure.
* Fix segfault when loading/unloading Lua job submit plugin multiple times.
* Fix printing duplicate error messages of jobs rejected by job submit plugin.
* Fix printing of job submit plugin messages of het jobs without pack id.
* Fix memory leak in group_cache.c
* Fix jobs stuck from FedJobLock when requeueing in a federation
* Fix requeueing job in a federation of clusters with differing associations
* sacctmgr - free memory before exiting in 'sacctmgr show runaway'.
* Fix seff showing memory overflow when steps tres mem usage is 0.
* Upon archive file name collision, create new archive file instead of
overwriting the old one to prevent lost records.
* Limit archive files to 50000 records per file so that archiving large
databases will succeed.
* Remove stray newlines in SPANK plugin error messages.
* Fix archive loading events.
* In select/cons_res: Only allocate 1 CPU per node with the --overcommit and
--nodelist options.
* Fix main scheduler from potentially not running through whole queue.
* cons_res/job_test - prevent a job from overallocating a node memory.
* cons_res/job_test - fix to consider a node's current allocated memory when
testing a job's memory request.
* Fix issue where multi-node job steps on cloud nodes wouldn't finish cleaning
up until the end of the job (rather than the end of the step).
* Fix issue with a 17.11 sbcast call to a 18.08 daemon.
* Add new job bit_flags of JOB_DEPENDENT.
* Make it so dependent jobs reset the AccrueTime and do not count against any
AccrueTime limits.
* Fix sacctmgr --parsable2 output for reservations and tres.
* Prevent slurmctld from potential segfault after job_start_data() called
for completing job.
* Fix jobs getting on nodes with "scontrol reboot asap".
* Record node reboot events to database.
* Fix node reboot failure message getting to event table.
* Don't write "(null)" to event table when no event reason exists.
* Fix minor memory leak when clearing runaway jobs.
* Avoid flooding slurmctld and logging when prolog complete RPC errors occur.
* Fix GCC 9 compiler warnings.
* Fix seff human readable memory string for values below a megabyte.
* Fix dump/load of rejected heterogeneous jobs.
* For heterogeneous jobs, do not count the each component against the QOS or
association job limit multiple times.
* slurmdbd - avoid reservation flag column corruption with the use of newer
flags, instead preserve the older flag fields that we can still fit in the
smallint field, and discard the rest.
* Fix security issue in accounting_storage/mysql plugin on archive file loads
by always escaping strings within the slurmdbd. CVE-2019-12838.
-------------------------------------------------------------------
Mon Jul 8 08:19:23 UTC 2019 - Egbert Eich <eich@suse.com>
- Fix build dependency issue around libibmad-devel introduced
in SLE-12-SP4.
-------------------------------------------------------------------
Mon Jul 8 05:41:11 UTC 2019 - Egbert Eich <eich@suse.com>
- Add BuildRequires to address warnings during build:
* for libcurl-devel, libssh2-devel and rrdtool-devel
* for libjson-c-devel and liblz4-devel where available,
disable these with --without-json and --without-lz4
where not.
* disable DataWarp (--without-datawarp).
-------------------------------------------------------------------
Sat Jul 6 20:07:53 UTC 2019 - Egbert Eich <eich@suse.com>
- Update SLURM to 18.08.7:
* Set debug statement to debug2 to avoid benign error messages.
* Add SchedulerParameters option of bf_hetjob_immediate to attempt to start
a heterogeneous job as soon as all of its components are determined able
to do so.
* Fix underflow causing decay thread to exit.
* Fix main scheduler not considering hetjobs when building the job queue.
* Fix regression for sacct to display old jobs without a start time.
* Fix setting correct number of gres topology bits.
* Update hetjobs pending state reason when appropriate.
* Fix accounting_storage/filetxt's understanding of TRES.
* Set Accrue time when not enforcing limits.
* Fix srun segfault when requesting a hetjob with test_exec or bcast
options.
* Hide multipart priorities log message behind Priority debug flag.
* sched/backfill - Make hetjobs sensitive to bf_max_job_start.
* Fix slurmctld segfault due to job's partition pointer NULL dereference.
* Fix issue with OR'ed job dependencies.
* Add new job's bit_flags of INVALID_DEPEND to prevent rebuilding a job's
dependency string when it has at least one invalid and purged dependency.
* Promote federation unsynced siblings log message from debug to info.
* burst_buffer/cray - fix slurmctld SIGABRT due to illegal read/writes.
* burst_buffer/cray - fix memory leak due to unfreed job script content.
* node_features/knl_cray - fix script_argv use-after-free.
* burst_buffer/cray - fix script_argv use-after-free.
* Fix invalid reads of size 1 due to non null-terminated string reads.
* Add extra debug2 logs to identify why BadConstraints reason is set.
-------------------------------------------------------------------
Sat Jul 6 18:05:33 UTC 2019 - Egbert Eich <eich@suse.com>
- Do not build hdf5 support where not available.
-------------------------------------------------------------------
Sat Jul 6 11:21:08 UTC 2019 - Egbert Eich <eich@suse.com>
- Add support for version updates on SLE: Update packages to a
later version than the version supported originally on SLE
will receive a version string in their package name.
-------------------------------------------------------------------
Wed Feb 27 11:06:10 UTC 2019 - Christian Goll <cgoll@suse.com>

View File

@ -18,11 +18,28 @@
# Check file META in sources: update so_version to (API_CURRENT - API_AGE)
%define so_version 33
%define ver 18.08.5
%define dl_ver %{ver}-2
%define ver 18.08.8
%define _ver _18_08
%define dl_ver %{ver}
# so-version is 0 and seems to be stable
%define pmi_so 0
%define pname slurm
%if 0%{?sle_version} == 120200
%define base_ver 1702
%endif
%if 0%{?sle_version} == 150000
%define base_ver 1711
%endif
%if 0%{?sle_version} == 150100
%define base_ver 1808
%endif
%if 0%{?base_ver} > 0 && 0%{?base_ver} < %(echo %{_ver} | tr -d _)
%define upgrade 1
%endif
# For anything newer than Leap 42.1 and SLE-12-SP1 build compatible to OpenHPC.
%if 0%{suse_version} > 1320 || 0%{?sle_version} >= 120200
%define OHPC_BUILD 1
@ -32,13 +49,25 @@
%define with_systemd 1
%endif
%if 0%{?suse_version:1} && 0%{?suse_version} <= 1140
%define comp_at %defattr(-,root,root)
%define comp_at %defattr(-,root,root)
%else
%define have_json_c 1
%endif
%if 0
%define have_netloc 1
%endif
%if 0%{?is_opensuse} && 0%{!?sle_version:1}
%define is_factory 1
%endif
%if 0%{?is_factory} || 0%{?sle_version} >= 150000
%define have_hdf5 1
%define have_boolean_deps 1
%define have_lz4 1
%endif
%ifarch x86_64
%define have_libnuma 1
%else
@ -50,8 +79,8 @@
%endif
%if 0%{?with_systemd}
%define slurm_u %name
%define slurm_g %name
%define slurm_u %pname
%define slurm_g %pname
%else
%define slurm_u daemon
%define slurm_g root
@ -59,14 +88,14 @@
%define libslurm libslurm%{so_version}
Name: slurm
Name: %{pname}%{?upgrade:%{_ver}}
Version: %{ver}
Release: 0
Summary: Simple Linux Utility for Resource Management
License: SUSE-GPL-2.0-with-openssl-exception
Group: Productivity/Clustering/Computing
Url: https://www.schedmd.com
Source: https://download.schedmd.com/slurm/%{name}-%{dl_ver}.tar.bz2
Source: https://download.schedmd.com/slurm/%{pname}-%{dl_ver}.tar.bz2
Source1: slurm-rpmlintrc
Patch0: slurm-2.4.4-rpath.patch
Patch1: slurm-2.4.4-init.patch
@ -82,14 +111,24 @@ Patch10: pam_slurm_adopt-avoid-running-outside-of-the-sshd-PA.patch
Patch11: pam_slurm_adopt-send_user_msg-don-t-copy-undefined-d.patch
Patch12: pam_slurm_adopt-use-uid-to-determine-whether-root-is.patch
Requires: slurm-config = %{version}
Requires: slurm-node = %{version}
Recommends: slurm-doc = %{version}
Recommends: slurm-config-man = %{version}
%{?upgrade:Provides: %{pname} = %{version}}
%{?upgrade:Conflicts: %{pname}}
Requires: %{name}-config = %{version}
%if 0%{?have_boolean_deps}
Requires: (munge if %{name}-munge)
%else
Requires: munge
%endif
Requires(pre): %{name}-node = %{version}
Recommends: %{name}-doc = %{version}
Recommends: %{name}-config-man = %{version}
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gtk2-devel
%if 0%{?have_hdf5}
BuildRequires: hdf5-devel
%endif
BuildRequires: libbitmask-devel
BuildRequires: libcpuset-devel
BuildRequires: python
@ -103,7 +142,11 @@ BuildRequires: pkgconfig
BuildRequires: postgresql-devel >= 8.0.0
BuildRequires: readline-devel
%if 0%{?suse_version} > 1310 || 0%{?sle_version}
%if 0%{?sle_version} >= 120400 && 0%{?sle_version} < 150000
BuildRequires: infiniband-diags-devel
%else
BuildRequires: libibmad-devel
%endif
BuildRequires: libibumad-devel
%endif
%if 0%{?suse_version} > 1140
@ -112,6 +155,15 @@ BuildRequires: libhwloc-devel
BuildRequires: freeipmi-devel
%endif
%endif
BuildRequires: libcurl-devel
%if 0%{?have_json_c}
BuildRequires: libjson-c-devel
%endif
%if 0%{?have_lz4}
BuildRequires: liblz4-devel
%endif
BuildRequires: libssh2-devel
BuildRequires: rrdtool-devel
%if 0%{?with_systemd}
%{?systemd_requires}
BuildRequires: systemd
@ -131,22 +183,26 @@ management, scheduling and accounting modules.
%package doc
Summary: Documentation for SLURM
Group: Documentation/HTML
%{?upgrade:Provides: %{pname}-doc = %{version}}
%{?upgrade:Conflicts: %{pname}-doc}
%description doc
Documentation (HTML) for the SLURM cluster managment software.
%package -n perl-slurm
%package -n perl-%{name}
Summary: Perl API to SLURM
Group: Development/Languages/Perl
Requires: slurm = %{version}
Requires: %{name} = %{version}
%if 0%{?suse_version} < 1140
Requires: perl = %{perl_version}
%else
%{libperl_requires}
%{perl_requires}
%endif
%{?upgrade:Provides: perl-%{pname} = %{version}}
%{?upgrade:Conflicts: perl-%{pname}}
%description -n perl-slurm
%description -n perl-%{name}
This package includes the Perl API to provide an interface to SLURM
through Perl.
@ -172,8 +228,10 @@ with SLURM.
Summary: Development package for SLURM
Group: Development/Libraries/C and C++
Requires: %{libslurm} = %{version}
Requires: %{name} = %{version}
Requires: libpmi%{pmi_so} = %{version}
Requires: slurm = %{version}
%{?upgrade:Provides: %{pname}-devel = %{version}}
%{?upgrade:Conflicts: %{pname}-devel}
%description devel
This package includes the header files for the SLURM API.
@ -182,7 +240,9 @@ This package includes the header files for the SLURM API.
%package auth-none
Summary: SLURM auth NULL implementation (no authentication)
Group: Productivity/Clustering/Computing
Requires: slurm = %{version}
Requires: %{name} = %{version}
%{?upgrade:Provides: %{pname}-auth-none = %{version}}
%{?upgrade:Conflicts: %{pname}-auth-none}
%description auth-none
This package cobtains the SLURM NULL authentication module.
@ -191,11 +251,13 @@ This package cobtains the SLURM NULL authentication module.
%package munge
Summary: SLURM authentication and crypto implementation using Munge
Group: Productivity/Clustering/Computing
Requires: %{name}-plugins = %{version}
Requires: munge
Requires: slurm-plugins = %{version}
BuildRequires: munge-devel
Obsoletes: slurm-auth-munge < %{version}
Provides: slurm-auth-munge = %{version}
Obsoletes: %{name}-auth-munge < %{version}
Provides: %{name}-auth-munge = %{version}
%{?upgrade:Provides: %{pname}-munge = %{version}}
%{?upgrade:Conflicts: %{pname}-munge}
%description munge
This package contains the SLURM authentication module for Chris Dunlap's Munge.
@ -203,6 +265,8 @@ This package contains the SLURM authentication module for Chris Dunlap's Munge.
%package sview
Summary: SLURM graphical interface
Group: Productivity/Clustering/Computing
%{?upgrade:Provides: %{pname}-sview = %{version}}
%{?upgrade:Conflicts: %{pname}-sview}
%description sview
sview is a graphical user interface to get and update state information for
@ -212,10 +276,10 @@ jobs, partitions, and nodes managed by SLURM.
%package slurmdbd
Summary: SLURM database daemon
Group: Productivity/Clustering/Computing
Requires: slurm-config = %{version}
Requires: slurm-plugins = %{version}
Requires: slurm-sql = %{version}
Recommends: slurm-munge = %{version}
Requires: %{name}-config = %{version}
Requires: %{name}-plugins = %{version}
Requires: %{name}-sql = %{version}
Recommends: %{name}-munge = %{version}
%if 0%{?with_systemd}
%{?systemd_requires}
%else
@ -223,6 +287,8 @@ Requires(post): %insserv_prereq %fillup_prereq
%endif
Obsoletes: slurm-sched-wiki < %{version}
Obsoletes: slurmdb-direct < %{version}
%{?upgrade:Provides: %{pname}-slurmdbd = %{version}}
%{?upgrade:Conflicts: %{pname}-slurmdb}
%description slurmdbd
The SLURM database daemon provides accounting of jobs in a database.
@ -231,6 +297,8 @@ The SLURM database daemon provides accounting of jobs in a database.
%package sql
Summary: Slurm SQL support
Group: Productivity/Clustering/Computing
%{?upgrade:Provides: %{pname}-sql = %{version}}
%{?upgrade:Conflicts: %{pname}-sql}
%description sql
Contains interfaces to MySQL for use by SLURM.
@ -239,6 +307,8 @@ Contains interfaces to MySQL for use by SLURM.
%package plugins
Summary: SLURM plugins (loadable shared objects)
Group: Productivity/Clustering/Computing
%{?upgrade:Provides: %{pname}-plugins = %{version}}
%{?upgrade:Conflicts: %{pname}-plugins}
%description plugins
This package contains the SLURM plugins (loadable shared objects)
@ -246,9 +316,11 @@ This package contains the SLURM plugins (loadable shared objects)
%package torque
Summary: Wrappers for transitition from Torque/PBS to SLURM
Group: Productivity/Clustering/Computing
Requires: perl-%{name} = %{version}
Requires: perl-Switch
Requires: perl-slurm = %{version}
Provides: torque-client
%{?upgrade:Provides: %{pname}-torque = %{version}}
%{?upgrade:Conflicts: %{pname}-torque}
%description torque
Wrapper scripts for aiding migration from Torque/PBS to SLURM.
@ -256,7 +328,9 @@ Wrapper scripts for aiding migration from Torque/PBS to SLURM.
%package openlava
Summary: Wrappers for transitition from OpenLava/LSF to Slurm
Group: Productivity/Clustering/Computing
Requires: perl-slurm = %{version}
Requires: perl-%{name} = %{version}
%{?upgrade:Provides: %{pname}-openlava = %{version}}
%{?upgrade:Conflicts: %{pname}-openlava}
%description openlava
Wrapper scripts for aiding migration from OpenLava/LSF to Slurm
@ -264,7 +338,9 @@ Wrapper scripts for aiding migration from OpenLava/LSF to Slurm
%package seff
Summary: Mail tool that includes job statistics in user notification email
Group: Productivity/Clustering/Computing
Requires: perl-slurm = %{version}
Requires: perl-%{name} = %{version}
%{?upgrade:Provides: %{pname}-seff = %{version}}
%{?upgrade:Conflicts: %{pname}-seff}
%description seff
Mail program used directly by the SLURM daemons. On completion of a job,
@ -275,7 +351,9 @@ information in the email body.
%package sjstat
Summary: Perl tool to print SLURM job state information
Group: Productivity/Clustering/Computing
Requires: slurm = %{version}
Requires: %{name} = %{version}
%{?upgrade:Provides: %{pname}-sjstat = %{version}}
%{?upgrade:Conflicts: %{pname}-sjstat}
%if 0%{?suse_version} < 1140
Requires: perl = %{perl_version}
%else
@ -288,7 +366,9 @@ This package contains a Perl tool to print SLURM job state information.
%package pam_slurm
Summary: PAM module for restricting access to compute nodes via SLURM
Group: Productivity/Clustering/Computing
Requires: slurm-node = %{version}
Requires: %{name}-node = %{version}
%{?upgrade:Provides: %{pname}-pam_slurm = %{version}}
%{?upgrade:Conflicts: %{pname}-pam_slurm}
BuildRequires: pam-devel
%description pam_slurm
@ -300,7 +380,9 @@ or any user who has allocated resources on the node according to the SLURM.
%package lua
Summary: Lua API for SLURM
Group: Development/Languages/Other
Requires: slurm = %{version}
Requires: %{name} = %{version}
%{?upgrade:Provides: %{pname}-lua = %{version}}
%{?upgrade:Conflicts: %{pname}-lua}
BuildRequires: lua-devel
%description lua
@ -310,14 +392,16 @@ through Lua.
%package node
Summary: Minimal slurm node
Group: Productivity/Clustering/Computing
Requires: slurm-config = %{version}
Requires: slurm-plugins = %{version}
Requires: %{name}-config = %{version}
Requires: %{name}-plugins = %{version}
Recommends: %{name}-munge
%if 0%{?with_systemd}
%{?systemd_requires}
%else
Requires(post): %insserv_prereq %fillup_prereq
%endif
%{?upgrade:Provides: %{pname}-node = %{version}}
%{?upgrade:Conflicts: %{pname}-node}
%description node
This package contains just the minmal code to run a compute node.
@ -333,6 +417,8 @@ Requires(pre): shadow
%if 0%{?with_systemd}
%{?systemd_requires}
%endif
%{?upgrade:Provides: %{pname}-config = %{version}}
%{?upgrade:Conflicts: %{pname}-config}
%description config
This package contains the slurm config files necessary direcories
@ -341,6 +427,8 @@ for the slurm daemons.
%package config-man
Summary: Config files and directories for slurm services
Group: Documentation/Man
%{?upgrade:Provides: %{pname}-config-man = %{version}}
%{?upgrade:Conflicts: %{pname}-config-man}
%description config-man
Man pages for the SLURM cluster managment software config files.
@ -354,8 +442,17 @@ Plugin to store accounting in the hdf5 file format. This plugin has to be
activated in the slurm configuration. Includes also utility the program
sh5utils to merge this hdf5 files or extract data from them.
%package cray
Summary: Cray specific plugins
Group: Productivity/Clustering/Computing
%description cray
Plugins for specific cray hardware, includes power and knl node management.
Contains also cray specific documentation.
%prep
%setup -q -n %{name}-%{dl_ver}
%setup -q -n %{pname}-%{dl_ver}
%patch0 -p1
%patch1 -p1
%patch2 -p1
@ -372,11 +469,17 @@ sh5utils to merge this hdf5 files or extract data from them.
%patch12 -p1
%build
%define _lto_cflags %{nil}
%configure --enable-shared \
--disable-static \
--without-rpath \
--without-datawarp \
%{!?have_netloc:--without-netloc} \
--sysconfdir=%{_sysconfdir}/%{name}
--sysconfdir=%{_sysconfdir}/%{pname} \
%{!?have_hdf5:--without-hdf5} \
%{!?have_lz4:--without-lz4} \
%{!?have_json_c:--without-json}
make %{?_smp_mflags}
%install
@ -390,11 +493,11 @@ ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcslurmd
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcslurmdbd
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcslurmctld
install -d -m 0755 %{buildroot}/%{_tmpfilesdir}/
cat <<-EOF > %{buildroot}/%{_tmpfilesdir}/%{name}.conf
cat <<-EOF > %{buildroot}/%{_tmpfilesdir}/%{pname}.conf
# Create a directory with permissions 0700 owned by user slurm, group slurm
d /var/run/slurm 0700 slurm slurm
EOF
chmod 0644 %{buildroot}/%{_tmpfilesdir}/%{name}.conf
chmod 0644 %{buildroot}/%{_tmpfilesdir}/%{pname}.conf
%else
install -D -m755 etc/init.d.slurm %{buildroot}%{_initrddir}/slurm
install -D -m755 etc/init.d.slurmdbd %{buildroot}%{_initrddir}/slurmdbd
@ -410,13 +513,13 @@ rm -f %{buildroot}%{_sbindir}/capmc_suspend
rm -f %{buildroot}%{_sbindir}/capmc_resume
rm -f %{buildroot}%{_sbindir}/slurmconfgen.py
install -D -m644 etc/cgroup.conf.example %{buildroot}/%{_sysconfdir}/%{name}/cgroup.conf
install -D -m644 etc/layouts.d.power.conf.example %{buildroot}/%{_sysconfdir}/%{name}/layouts.d/power.conf.example
install -D -m644 etc/layouts.d.power_cpufreq.conf.example %{buildroot}/%{_sysconfdir}/%{name}/layouts.d/power_cpufreq.conf.example
install -D -m644 etc/layouts.d.unit.conf.example %{buildroot}/%{_sysconfdir}/%{name}/layouts.d/unit.conf.example
install -D -m644 etc/slurm.conf.example %{buildroot}/%{_sysconfdir}/%{name}/slurm.conf%{?OHPC_BUILD:.example}
install -D -m644 etc/slurmdbd.conf.example %{buildroot}/%{_sysconfdir}/%{name}/slurmdbd.conf
install -D -m644 etc/slurmdbd.conf.example %{buildroot}%{_sysconfdir}/%{name}/slurmdbd.conf.example
install -D -m644 etc/cgroup.conf.example %{buildroot}/%{_sysconfdir}/%{pname}/cgroup.conf
install -D -m644 etc/layouts.d.power.conf.example %{buildroot}/%{_sysconfdir}/%{pname}/layouts.d/power.conf.example
install -D -m644 etc/layouts.d.power_cpufreq.conf.example %{buildroot}/%{_sysconfdir}/%{pname}/layouts.d/power_cpufreq.conf.example
install -D -m644 etc/layouts.d.unit.conf.example %{buildroot}/%{_sysconfdir}/%{pname}/layouts.d/unit.conf.example
install -D -m644 etc/slurm.conf.example %{buildroot}/%{_sysconfdir}/%{pname}/slurm.conf%{?OHPC_BUILD:.example}
install -D -m644 etc/slurmdbd.conf.example %{buildroot}/%{_sysconfdir}/%{pname}/slurmdbd.conf
install -D -m644 etc/slurmdbd.conf.example %{buildroot}%{_sysconfdir}/%{pname}/slurmdbd.conf.example
install -D -m755 contribs/sjstat %{buildroot}%{_bindir}/sjstat
install -D -m755 contribs/sgather/sgather %{buildroot}%{_bindir}/sgather
@ -424,12 +527,12 @@ cp contribs/pam_slurm_adopt/README ../README.pam_slurm_adopt
cp contribs/pam/README ../README.pam_slurm
%if 0%{?OHPC_BUILD}
# change slurm.conf for our needs
head -n -2 %{buildroot}/%{_sysconfdir}/%{name}/slurm.conf.example | grep -v ReturnToService > %{buildroot}/%{_sysconfdir}/%{name}/slurm.conf
sed -i 's#\(StateSaveLocation=\).*#\1%_localstatedir/lib/slurm#' %{buildroot}/%{_sysconfdir}/%{name}/slurm.conf
sed -i 's#^\(SlurmdPidFile=\).*$#\1%{_localstatedir}/run/slurm/slurmd.pid#' %{buildroot}/%{_sysconfdir}/%{name}/slurm.conf
sed -i 's#^\(SlurmctldPidFile=\).*$#\1%{_localstatedir}/run/slurm/slurmctld.pid#' %{buildroot}/%{_sysconfdir}/%{name}/slurm.conf
sed -i 's#^\(SlurmdSpoolDir=\)/.*#\1%{_localstatedir}/spool/slurm#' %{buildroot}/%{_sysconfdir}/%{name}/slurm.conf
cat >>%{buildroot}/%{_sysconfdir}/%{name}/slurm.conf <<EOF
head -n -2 %{buildroot}/%{_sysconfdir}/%{pname}/slurm.conf.example | grep -v ReturnToService > %{buildroot}/%{_sysconfdir}/%{pname}/slurm.conf
sed -i 's#\(StateSaveLocation=\).*#\1%_localstatedir/lib/slurm#' %{buildroot}/%{_sysconfdir}/%{pname}/slurm.conf
sed -i 's#^\(SlurmdPidFile=\).*$#\1%{_localstatedir}/run/slurm/slurmd.pid#' %{buildroot}/%{_sysconfdir}/%{pname}/slurm.conf
sed -i 's#^\(SlurmctldPidFile=\).*$#\1%{_localstatedir}/run/slurm/slurmctld.pid#' %{buildroot}/%{_sysconfdir}/%{pname}/slurm.conf
sed -i 's#^\(SlurmdSpoolDir=\)/.*#\1%{_localstatedir}/spool/slurm#' %{buildroot}/%{_sysconfdir}/%{pname}/slurm.conf
cat >>%{buildroot}/%{_sysconfdir}/%{pname}/slurm.conf <<EOF
# SUSE default configuration
PropagateResourceLimitsExcept=MEMLOCK
NodeName=linux State=UNKNOWN
@ -437,9 +540,9 @@ PartitionName=normal Nodes=linux Default=YES MaxTime=24:00:00 State=UP
EOF
# change slurmdbd.conf for our needs
sed -i 's@LogFile=/var/log/slurm/slurmdbd.log@LogFile=/var/log/slurmdbd.log@'\
%{buildroot}/%{_sysconfdir}/%{name}/slurmdbd.conf
%{buildroot}/%{_sysconfdir}/%{pname}/slurmdbd.conf
sed -i -e "s@PidFile=.*@PidFile=%{_localstatedir}/run/slurm/slurmdbd.pid@" \
%{buildroot}/%{_sysconfdir}/%{name}/slurmdbd.conf
%{buildroot}/%{_sysconfdir}/%{pname}/slurmdbd.conf
# manage local state dir and a remote states save location
mkdir -p %{buildroot}/%_localstatedir/lib/slurm
sed -i -e "s@PIDFile=.*@PIDFile=%{_localstatedir}/run/slurm/slurmctld.pid@" \
@ -500,7 +603,7 @@ libdir=%{_libdir}
Cflags: -I\${includedir}
Libs: -L\${libdir} -lslurm
Description: Slurm API
Name: %{name}
Name: %{pname}
Version: %{version}
EOF
@ -749,8 +852,8 @@ exit 0
%files doc
%{?comp_at}
%dir %{_datadir}/doc/%{name}-%{dl_ver}
%{_datadir}/doc/%{name}-%{dl_ver}/*
%dir %{_datadir}/doc/%{pname}-%{dl_ver}
%{_datadir}/doc/%{pname}-%{dl_ver}/*
%files -n %{libslurm}
%{?comp_at}
@ -785,7 +888,7 @@ exit 0
%{_libdir}/slurm/auth_munge.so
%{_libdir}/slurm/crypto_munge.so
%files -n perl-slurm
%files -n perl-%{name}
%{?comp_at}
%{perl_vendorarch}/Slurm.pm
%{perl_vendorarch}/Slurm
@ -799,8 +902,8 @@ exit 0
%{_sbindir}/slurmdbd
%{_mandir}/man5/slurmdbd.*
%{_mandir}/man8/slurmdbd.*
%config(noreplace) %{_sysconfdir}/%{name}/slurmdbd.conf
%{_sysconfdir}/%{name}/slurmdbd.conf.example
%config(noreplace) %{_sysconfdir}/%{pname}/slurmdbd.conf
%{_sysconfdir}/%{pname}/slurmdbd.conf.example
%if 0%{?with_systemd}
%{_unitdir}/slurmdbd.service
%else
@ -822,7 +925,6 @@ exit 0
%{_libdir}/slurm/accounting_storage_filetxt.so
%{_libdir}/slurm/accounting_storage_none.so
%{_libdir}/slurm/accounting_storage_slurmdbd.so
%{_libdir}/slurm/acct_gather_energy_cray.so
%{_libdir}/slurm/acct_gather_energy_ibmaem.so
%{_libdir}/slurm/acct_gather_energy_none.so
%{_libdir}/slurm/acct_gather_energy_rapl.so
@ -833,7 +935,6 @@ exit 0
%{_libdir}/slurm/burst_buffer_generic.so
%{_libdir}/slurm/checkpoint_none.so
%{_libdir}/slurm/checkpoint_ompi.so
%{_libdir}/slurm/core_spec_cray.so
%{_libdir}/slurm/core_spec_none.so
%{_libdir}/slurm/crypto_openssl.so
%{_libdir}/slurm/ext_sensors_none.so
@ -849,7 +950,6 @@ exit 0
%{_libdir}/slurm/job_container_cncu.so
%{_libdir}/slurm/job_container_none.so
%{_libdir}/slurm/job_submit_all_partitions.so
%{_libdir}/slurm/job_submit_cray.so
%{_libdir}/slurm/job_submit_defaults.so
%{_libdir}/slurm/job_submit_logging.so
%{_libdir}/slurm/job_submit_partition.so
@ -882,16 +982,13 @@ exit 0
%{_libdir}/slurm/sched_hold.so
%{_libdir}/slurm/select_alps.so
%{_libdir}/slurm/select_cons_res.so
%{_libdir}/slurm/select_cray.so
%{_libdir}/slurm/select_linear.so
%{_libdir}/slurm/select_serial.so
%{_libdir}/slurm/slurmctld_nonstop.so
%{_libdir}/slurm/switch_cray.so
%{_libdir}/slurm/switch_generic.so
%{_libdir}/slurm/switch_none.so
%{_libdir}/slurm/task_affinity.so
%{_libdir}/slurm/task_cgroup.so
%{_libdir}/slurm/task_cray.so
%{_libdir}/slurm/task_none.so
%{_libdir}/slurm/topology_3d_torus.so
%{_libdir}/slurm/topology_hypercube.so
@ -908,6 +1005,17 @@ exit 0
%endif
%endif
%{_libdir}/slurm/node_features_knl_generic.so
%{_libdir}/slurm/acct_gather_profile_influxdb.so
%{_libdir}/slurm/ext_sensors_rrd.so
%{_libdir}/slurm/jobcomp_elasticsearch.so
%if !0%{?is_opensuse}
%{_libdir}/slurm/acct_gather_energy_cray.so
%{_libdir}/slurm/core_spec_cray.so
%{_libdir}/slurm/job_submit_cray.so
%{_libdir}/slurm/select_cray.so
%{_libdir}/slurm/switch_cray.so
%{_libdir}/slurm/task_cray.so
%endif
%files lua
%{?comp_at}
@ -955,16 +1063,16 @@ exit 0
%files config
%{?comp_at}
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/layouts.d
%config(noreplace) %{_sysconfdir}/%{name}/slurm.conf
%{?OHPC_BUILD:%config %{_sysconfdir}/%{name}/slurm.conf.example}
%config(noreplace) %{_sysconfdir}/%{name}/cgroup.conf
%config(noreplace) %{_sysconfdir}/%{name}/layouts.d/power.conf.example
%config(noreplace) %{_sysconfdir}/%{name}/layouts.d/power_cpufreq.conf.example
%config(noreplace) %{_sysconfdir}/%{name}/layouts.d/unit.conf.example
%dir %{_sysconfdir}/%{pname}
%dir %{_sysconfdir}/%{pname}/layouts.d
%config(noreplace) %{_sysconfdir}/%{pname}/slurm.conf
%{?OHPC_BUILD:%config %{_sysconfdir}/%{pname}/slurm.conf.example}
%config(noreplace) %{_sysconfdir}/%{pname}/cgroup.conf
%config(noreplace) %{_sysconfdir}/%{pname}/layouts.d/power.conf.example
%config(noreplace) %{_sysconfdir}/%{pname}/layouts.d/power_cpufreq.conf.example
%config(noreplace) %{_sysconfdir}/%{pname}/layouts.d/unit.conf.example
%{?OHPC_BUILD:%attr(0755, %slurm_u, %slurm_g) %_localstatedir/lib/slurm}
%{?with_systemd:%{_tmpfilesdir}/%{name}.conf}
%{?with_systemd:%{_tmpfilesdir}/%{pname}.conf}
%dir %{_var}/spool/slurm
%config(noreplace) %{_sysconfdir}/logrotate.d/slurm*
@ -975,15 +1083,34 @@ exit 0
%{_mandir}/man5/ext_sensors.conf.*
%{_mandir}/man5/slurm.*
%{_mandir}/man5/cgroup.*
%{_mandir}/man5/cray.*
%{_mandir}/man5/gres.*
%{_mandir}/man5/nonstop.conf.5.*
%{_mandir}/man5/topology.*
%{_mandir}/man5/knl.conf.5.*
%if !0%{?is_opensuse}
%{_mandir}/man5/cray.*
%endif
%if 0%{?have_hdf5}
%files hdf5
%{_bindir}/sh5util
%{_libdir}/slurm/acct_gather_profile_hdf5.so
%{_mandir}/man1/sh5util.1.gz
%endif
%files cray
# do not remove cray sepcific packages from SLES update
%if 0%{?is_opensuse}
%{_libdir}/slurm/acct_gather_energy_cray.so
%{_libdir}/slurm/core_spec_cray.so
%{_libdir}/slurm/job_submit_cray.so
%{_libdir}/slurm/select_cray.so
%{_libdir}/slurm/switch_cray.so
%{_libdir}/slurm/task_cray.so
%{_mandir}/man5/cray.*
%endif
%{_libdir}/slurm/burst_buffer_cray.so
%{_libdir}/slurm/node_features_knl_cray.so
%{_libdir}/slurm/power_cray.so
%changelog