Accepting request 713735 from home:eeich:branches:network:cluster

- 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.

OBS-URL: https://build.opensuse.org/request/show/713735
OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=92
This commit is contained in:
Egbert Eich 2019-07-06 17:41:00 +00:00 committed by Git OBS Bridge
parent 4a0199d836
commit 2536acafc5
2 changed files with 126 additions and 62 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
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> Wed Feb 27 11:06:10 UTC 2019 - Christian Goll <cgoll@suse.com>

View File

@ -19,10 +19,27 @@
# Check file META in sources: update so_version to (API_CURRENT - API_AGE) # Check file META in sources: update so_version to (API_CURRENT - API_AGE)
%define so_version 33 %define so_version 33
%define ver 18.08.5 %define ver 18.08.5
%define _ver _18_08
%define dl_ver %{ver}-2 %define dl_ver %{ver}-2
# so-version is 0 and seems to be stable # so-version is 0 and seems to be stable
%define pmi_so 0 %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. # For anything newer than Leap 42.1 and SLE-12-SP1 build compatible to OpenHPC.
%if 0%{suse_version} > 1320 || 0%{?sle_version} >= 120200 %if 0%{suse_version} > 1320 || 0%{?sle_version} >= 120200
%define OHPC_BUILD 1 %define OHPC_BUILD 1
@ -50,8 +67,8 @@
%endif %endif
%if 0%{?with_systemd} %if 0%{?with_systemd}
%define slurm_u %name %define slurm_u %pname
%define slurm_g %name %define slurm_g %pname
%else %else
%define slurm_u daemon %define slurm_u daemon
%define slurm_g root %define slurm_g root
@ -59,14 +76,14 @@
%define libslurm libslurm%{so_version} %define libslurm libslurm%{so_version}
Name: slurm Name: %{pname}%{?upgrade:%{_ver}}
Version: %{ver} Version: %{ver}
Release: 0 Release: 0
Summary: Simple Linux Utility for Resource Management Summary: Simple Linux Utility for Resource Management
License: SUSE-GPL-2.0-with-openssl-exception License: SUSE-GPL-2.0-with-openssl-exception
Group: Productivity/Clustering/Computing Group: Productivity/Clustering/Computing
Url: https://www.schedmd.com 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 Source1: slurm-rpmlintrc
Patch0: slurm-2.4.4-rpath.patch Patch0: slurm-2.4.4-rpath.patch
Patch1: slurm-2.4.4-init.patch Patch1: slurm-2.4.4-init.patch
@ -82,10 +99,14 @@ 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 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 Patch12: pam_slurm_adopt-use-uid-to-determine-whether-root-is.patch
Requires: slurm-config = %{version} %{?upgrade:Provides: %{pname} = %{version}}
Requires: slurm-node = %{version} %{?upgrade:Conflicts: %{pname}}
Recommends: slurm-doc = %{version}
Recommends: slurm-config-man = %{version} Requires: %{name}-config = %{version}
Requires: (munge if %{name}-munge)
Requires(pre): %{name}-node = %{version}
Recommends: %{name}-doc = %{version}
Recommends: %{name}-config-man = %{version}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: gtk2-devel BuildRequires: gtk2-devel
@ -131,22 +152,26 @@ management, scheduling and accounting modules.
%package doc %package doc
Summary: Documentation for SLURM Summary: Documentation for SLURM
Group: Documentation/HTML Group: Documentation/HTML
%{?upgrade:Provides: %{pname}-doc = %{version}}
%{?upgrade:Conflicts: %{pname}-doc}
%description doc %description doc
Documentation (HTML) for the SLURM cluster managment software. Documentation (HTML) for the SLURM cluster managment software.
%package -n perl-slurm %package -n perl-%{name}
Summary: Perl API to SLURM Summary: Perl API to SLURM
Group: Development/Languages/Perl Group: Development/Languages/Perl
Requires: slurm = %{version} Requires: %{name} = %{version}
%if 0%{?suse_version} < 1140 %if 0%{?suse_version} < 1140
Requires: perl = %{perl_version} Requires: perl = %{perl_version}
%else %else
%{libperl_requires} %{libperl_requires}
%{perl_requires} %{perl_requires}
%endif %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 This package includes the Perl API to provide an interface to SLURM
through Perl. through Perl.
@ -172,8 +197,10 @@ with SLURM.
Summary: Development package for SLURM Summary: Development package for SLURM
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %{libslurm} = %{version} Requires: %{libslurm} = %{version}
Requires: %{name} = %{version}
Requires: libpmi%{pmi_so} = %{version} Requires: libpmi%{pmi_so} = %{version}
Requires: slurm = %{version} %{?upgrade:Provides: %{pname}-devel = %{version}}
%{?upgrade:Conflicts: %{pname}-devel}
%description devel %description devel
This package includes the header files for the SLURM API. This package includes the header files for the SLURM API.
@ -182,7 +209,9 @@ This package includes the header files for the SLURM API.
%package auth-none %package auth-none
Summary: SLURM auth NULL implementation (no authentication) Summary: SLURM auth NULL implementation (no authentication)
Group: Productivity/Clustering/Computing Group: Productivity/Clustering/Computing
Requires: slurm = %{version} Requires: %{name} = %{version}
%{?upgrade:Provides: %{pname}-auth-none = %{version}}
%{?upgrade:Conflicts: %{pname}-auth-none}
%description auth-none %description auth-none
This package cobtains the SLURM NULL authentication module. This package cobtains the SLURM NULL authentication module.
@ -191,11 +220,13 @@ This package cobtains the SLURM NULL authentication module.
%package munge %package munge
Summary: SLURM authentication and crypto implementation using Munge Summary: SLURM authentication and crypto implementation using Munge
Group: Productivity/Clustering/Computing Group: Productivity/Clustering/Computing
Requires: %{name}-plugins = %{version}
Requires: munge Requires: munge
Requires: slurm-plugins = %{version}
BuildRequires: munge-devel BuildRequires: munge-devel
Obsoletes: slurm-auth-munge < %{version} Obsoletes: %{name}-auth-munge < %{version}
Provides: slurm-auth-munge = %{version} Provides: %{name}-auth-munge = %{version}
%{?upgrade:Provides: %{pname}-munge = %{version}}
%{?upgrade:Conflicts: %{pname}-munge}
%description munge %description munge
This package contains the SLURM authentication module for Chris Dunlap's Munge. This package contains the SLURM authentication module for Chris Dunlap's Munge.
@ -203,6 +234,8 @@ This package contains the SLURM authentication module for Chris Dunlap's Munge.
%package sview %package sview
Summary: SLURM graphical interface Summary: SLURM graphical interface
Group: Productivity/Clustering/Computing Group: Productivity/Clustering/Computing
%{?upgrade:Provides: %{pname}-sview = %{version}}
%{?upgrade:Conflicts: %{pname}-sview}
%description sview %description sview
sview is a graphical user interface to get and update state information for sview is a graphical user interface to get and update state information for
@ -212,10 +245,10 @@ jobs, partitions, and nodes managed by SLURM.
%package slurmdbd %package slurmdbd
Summary: SLURM database daemon Summary: SLURM database daemon
Group: Productivity/Clustering/Computing Group: Productivity/Clustering/Computing
Requires: slurm-config = %{version} Requires: %{name}-config = %{version}
Requires: slurm-plugins = %{version} Requires: %{name}-plugins = %{version}
Requires: slurm-sql = %{version} Requires: %{name}-sql = %{version}
Recommends: slurm-munge = %{version} Recommends: %{name}-munge = %{version}
%if 0%{?with_systemd} %if 0%{?with_systemd}
%{?systemd_requires} %{?systemd_requires}
%else %else
@ -223,6 +256,8 @@ Requires(post): %insserv_prereq %fillup_prereq
%endif %endif
Obsoletes: slurm-sched-wiki < %{version} Obsoletes: slurm-sched-wiki < %{version}
Obsoletes: slurmdb-direct < %{version} Obsoletes: slurmdb-direct < %{version}
%{?upgrade:Provides: %{pname}-slurmdbd = %{version}}
%{?upgrade:Conflicts: %{pname}-slurmdb}
%description slurmdbd %description slurmdbd
The SLURM database daemon provides accounting of jobs in a database. The SLURM database daemon provides accounting of jobs in a database.
@ -231,6 +266,8 @@ The SLURM database daemon provides accounting of jobs in a database.
%package sql %package sql
Summary: Slurm SQL support Summary: Slurm SQL support
Group: Productivity/Clustering/Computing Group: Productivity/Clustering/Computing
%{?upgrade:Provides: %{pname}-sql = %{version}}
%{?upgrade:Conflicts: %{pname}-sql}
%description sql %description sql
Contains interfaces to MySQL for use by SLURM. Contains interfaces to MySQL for use by SLURM.
@ -239,6 +276,8 @@ Contains interfaces to MySQL for use by SLURM.
%package plugins %package plugins
Summary: SLURM plugins (loadable shared objects) Summary: SLURM plugins (loadable shared objects)
Group: Productivity/Clustering/Computing Group: Productivity/Clustering/Computing
%{?upgrade:Provides: %{pname}-plugins = %{version}}
%{?upgrade:Conflicts: %{pname}-plugins}
%description plugins %description plugins
This package contains the SLURM plugins (loadable shared objects) This package contains the SLURM plugins (loadable shared objects)
@ -246,9 +285,11 @@ This package contains the SLURM plugins (loadable shared objects)
%package torque %package torque
Summary: Wrappers for transitition from Torque/PBS to SLURM Summary: Wrappers for transitition from Torque/PBS to SLURM
Group: Productivity/Clustering/Computing Group: Productivity/Clustering/Computing
Requires: perl-%{name} = %{version}
Requires: perl-Switch Requires: perl-Switch
Requires: perl-slurm = %{version}
Provides: torque-client Provides: torque-client
%{?upgrade:Provides: %{pname}-torque = %{version}}
%{?upgrade:Conflicts: %{pname}-torque}
%description torque %description torque
Wrapper scripts for aiding migration from Torque/PBS to SLURM. Wrapper scripts for aiding migration from Torque/PBS to SLURM.
@ -256,7 +297,9 @@ Wrapper scripts for aiding migration from Torque/PBS to SLURM.
%package openlava %package openlava
Summary: Wrappers for transitition from OpenLava/LSF to Slurm Summary: Wrappers for transitition from OpenLava/LSF to Slurm
Group: Productivity/Clustering/Computing Group: Productivity/Clustering/Computing
Requires: perl-slurm = %{version} Requires: perl-%{name} = %{version}
%{?upgrade:Provides: %{pname}-openlava = %{version}}
%{?upgrade:Conflicts: %{pname}-openlava}
%description openlava %description openlava
Wrapper scripts for aiding migration from OpenLava/LSF to Slurm Wrapper scripts for aiding migration from OpenLava/LSF to Slurm
@ -264,7 +307,9 @@ Wrapper scripts for aiding migration from OpenLava/LSF to Slurm
%package seff %package seff
Summary: Mail tool that includes job statistics in user notification email Summary: Mail tool that includes job statistics in user notification email
Group: Productivity/Clustering/Computing Group: Productivity/Clustering/Computing
Requires: perl-slurm = %{version} Requires: perl-%{name} = %{version}
%{?upgrade:Provides: %{pname}-seff = %{version}}
%{?upgrade:Conflicts: %{pname}-seff}
%description seff %description seff
Mail program used directly by the SLURM daemons. On completion of a job, Mail program used directly by the SLURM daemons. On completion of a job,
@ -275,7 +320,9 @@ information in the email body.
%package sjstat %package sjstat
Summary: Perl tool to print SLURM job state information Summary: Perl tool to print SLURM job state information
Group: Productivity/Clustering/Computing Group: Productivity/Clustering/Computing
Requires: slurm = %{version} Requires: %{name} = %{version}
%{?upgrade:Provides: %{pname}-sjstat = %{version}}
%{?upgrade:Conflicts: %{pname}-sjstat}
%if 0%{?suse_version} < 1140 %if 0%{?suse_version} < 1140
Requires: perl = %{perl_version} Requires: perl = %{perl_version}
%else %else
@ -288,7 +335,9 @@ This package contains a Perl tool to print SLURM job state information.
%package pam_slurm %package pam_slurm
Summary: PAM module for restricting access to compute nodes via SLURM Summary: PAM module for restricting access to compute nodes via SLURM
Group: Productivity/Clustering/Computing 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 BuildRequires: pam-devel
%description pam_slurm %description pam_slurm
@ -300,7 +349,9 @@ or any user who has allocated resources on the node according to the SLURM.
%package lua %package lua
Summary: Lua API for SLURM Summary: Lua API for SLURM
Group: Development/Languages/Other Group: Development/Languages/Other
Requires: slurm = %{version} Requires: %{name} = %{version}
%{?upgrade:Provides: %{pname}-lua = %{version}}
%{?upgrade:Conflicts: %{pname}-lua}
BuildRequires: lua-devel BuildRequires: lua-devel
%description lua %description lua
@ -310,14 +361,16 @@ through Lua.
%package node %package node
Summary: Minimal slurm node Summary: Minimal slurm node
Group: Productivity/Clustering/Computing Group: Productivity/Clustering/Computing
Requires: slurm-config = %{version} Requires: %{name}-config = %{version}
Requires: slurm-plugins = %{version} Requires: %{name}-plugins = %{version}
Recommends: %{name}-munge Recommends: %{name}-munge
%if 0%{?with_systemd} %if 0%{?with_systemd}
%{?systemd_requires} %{?systemd_requires}
%else %else
Requires(post): %insserv_prereq %fillup_prereq Requires(post): %insserv_prereq %fillup_prereq
%endif %endif
%{?upgrade:Provides: %{pname}-node = %{version}}
%{?upgrade:Conflicts: %{pname}-node}
%description node %description node
This package contains just the minmal code to run a compute node. This package contains just the minmal code to run a compute node.
@ -333,6 +386,8 @@ Requires(pre): shadow
%if 0%{?with_systemd} %if 0%{?with_systemd}
%{?systemd_requires} %{?systemd_requires}
%endif %endif
%{?upgrade:Provides: %{pname}-config = %{version}}
%{?upgrade:Conflicts: %{pname}-config}
%description config %description config
This package contains the slurm config files necessary direcories This package contains the slurm config files necessary direcories
@ -341,6 +396,8 @@ for the slurm daemons.
%package config-man %package config-man
Summary: Config files and directories for slurm services Summary: Config files and directories for slurm services
Group: Documentation/Man Group: Documentation/Man
%{?upgrade:Provides: %{pname}-config-man = %{version}}
%{?upgrade:Conflicts: %{pname}-config-man}
%description config-man %description config-man
Man pages for the SLURM cluster managment software config files. Man pages for the SLURM cluster managment software config files.
@ -355,7 +412,7 @@ activated in the slurm configuration. Includes also utility the program
sh5utils to merge this hdf5 files or extract data from them. sh5utils to merge this hdf5 files or extract data from them.
%prep %prep
%setup -q -n %{name}-%{dl_ver} %setup -q -n %{pname}-%{dl_ver}
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
@ -376,7 +433,7 @@ sh5utils to merge this hdf5 files or extract data from them.
--disable-static \ --disable-static \
--without-rpath \ --without-rpath \
%{!?have_netloc:--without-netloc} \ %{!?have_netloc:--without-netloc} \
--sysconfdir=%{_sysconfdir}/%{name} --sysconfdir=%{_sysconfdir}/%{pname}
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
@ -390,11 +447,11 @@ ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcslurmd
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcslurmdbd ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcslurmdbd
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcslurmctld ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcslurmctld
install -d -m 0755 %{buildroot}/%{_tmpfilesdir}/ 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 # Create a directory with permissions 0700 owned by user slurm, group slurm
d /var/run/slurm 0700 slurm slurm d /var/run/slurm 0700 slurm slurm
EOF EOF
chmod 0644 %{buildroot}/%{_tmpfilesdir}/%{name}.conf chmod 0644 %{buildroot}/%{_tmpfilesdir}/%{pname}.conf
%else %else
install -D -m755 etc/init.d.slurm %{buildroot}%{_initrddir}/slurm install -D -m755 etc/init.d.slurm %{buildroot}%{_initrddir}/slurm
install -D -m755 etc/init.d.slurmdbd %{buildroot}%{_initrddir}/slurmdbd install -D -m755 etc/init.d.slurmdbd %{buildroot}%{_initrddir}/slurmdbd
@ -410,13 +467,13 @@ rm -f %{buildroot}%{_sbindir}/capmc_suspend
rm -f %{buildroot}%{_sbindir}/capmc_resume rm -f %{buildroot}%{_sbindir}/capmc_resume
rm -f %{buildroot}%{_sbindir}/slurmconfgen.py rm -f %{buildroot}%{_sbindir}/slurmconfgen.py
install -D -m644 etc/cgroup.conf.example %{buildroot}/%{_sysconfdir}/%{name}/cgroup.conf install -D -m644 etc/cgroup.conf.example %{buildroot}/%{_sysconfdir}/%{pname}/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.conf.example %{buildroot}/%{_sysconfdir}/%{pname}/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.power_cpufreq.conf.example %{buildroot}/%{_sysconfdir}/%{pname}/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/layouts.d.unit.conf.example %{buildroot}/%{_sysconfdir}/%{pname}/layouts.d/unit.conf.example
install -D -m644 etc/slurm.conf.example %{buildroot}/%{_sysconfdir}/%{name}/slurm.conf%{?OHPC_BUILD:.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}/%{name}/slurmdbd.conf install -D -m644 etc/slurmdbd.conf.example %{buildroot}/%{_sysconfdir}/%{pname}/slurmdbd.conf
install -D -m644 etc/slurmdbd.conf.example %{buildroot}%{_sysconfdir}/%{name}/slurmdbd.conf.example 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/sjstat %{buildroot}%{_bindir}/sjstat
install -D -m755 contribs/sgather/sgather %{buildroot}%{_bindir}/sgather install -D -m755 contribs/sgather/sgather %{buildroot}%{_bindir}/sgather
@ -424,12 +481,12 @@ cp contribs/pam_slurm_adopt/README ../README.pam_slurm_adopt
cp contribs/pam/README ../README.pam_slurm cp contribs/pam/README ../README.pam_slurm
%if 0%{?OHPC_BUILD} %if 0%{?OHPC_BUILD}
# change slurm.conf for our needs # change slurm.conf for our needs
head -n -2 %{buildroot}/%{_sysconfdir}/%{name}/slurm.conf.example | grep -v ReturnToService > %{buildroot}/%{_sysconfdir}/%{name}/slurm.conf 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}/%{name}/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}/%{name}/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}/%{name}/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}/%{name}/slurm.conf sed -i 's#^\(SlurmdSpoolDir=\)/.*#\1%{_localstatedir}/spool/slurm#' %{buildroot}/%{_sysconfdir}/%{pname}/slurm.conf
cat >>%{buildroot}/%{_sysconfdir}/%{name}/slurm.conf <<EOF cat >>%{buildroot}/%{_sysconfdir}/%{pname}/slurm.conf <<EOF
# SUSE default configuration # SUSE default configuration
PropagateResourceLimitsExcept=MEMLOCK PropagateResourceLimitsExcept=MEMLOCK
NodeName=linux State=UNKNOWN NodeName=linux State=UNKNOWN
@ -437,9 +494,9 @@ PartitionName=normal Nodes=linux Default=YES MaxTime=24:00:00 State=UP
EOF EOF
# change slurmdbd.conf for our needs # change slurmdbd.conf for our needs
sed -i 's@LogFile=/var/log/slurm/slurmdbd.log@LogFile=/var/log/slurmdbd.log@'\ 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@" \ 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 # manage local state dir and a remote states save location
mkdir -p %{buildroot}/%_localstatedir/lib/slurm mkdir -p %{buildroot}/%_localstatedir/lib/slurm
sed -i -e "s@PIDFile=.*@PIDFile=%{_localstatedir}/run/slurm/slurmctld.pid@" \ sed -i -e "s@PIDFile=.*@PIDFile=%{_localstatedir}/run/slurm/slurmctld.pid@" \
@ -500,7 +557,7 @@ libdir=%{_libdir}
Cflags: -I\${includedir} Cflags: -I\${includedir}
Libs: -L\${libdir} -lslurm Libs: -L\${libdir} -lslurm
Description: Slurm API Description: Slurm API
Name: %{name} Name: %{pname}
Version: %{version} Version: %{version}
EOF EOF
@ -749,8 +806,8 @@ exit 0
%files doc %files doc
%{?comp_at} %{?comp_at}
%dir %{_datadir}/doc/%{name}-%{dl_ver} %dir %{_datadir}/doc/%{pname}-%{dl_ver}
%{_datadir}/doc/%{name}-%{dl_ver}/* %{_datadir}/doc/%{pname}-%{dl_ver}/*
%files -n %{libslurm} %files -n %{libslurm}
%{?comp_at} %{?comp_at}
@ -785,7 +842,7 @@ exit 0
%{_libdir}/slurm/auth_munge.so %{_libdir}/slurm/auth_munge.so
%{_libdir}/slurm/crypto_munge.so %{_libdir}/slurm/crypto_munge.so
%files -n perl-slurm %files -n perl-%{name}
%{?comp_at} %{?comp_at}
%{perl_vendorarch}/Slurm.pm %{perl_vendorarch}/Slurm.pm
%{perl_vendorarch}/Slurm %{perl_vendorarch}/Slurm
@ -799,8 +856,8 @@ exit 0
%{_sbindir}/slurmdbd %{_sbindir}/slurmdbd
%{_mandir}/man5/slurmdbd.* %{_mandir}/man5/slurmdbd.*
%{_mandir}/man8/slurmdbd.* %{_mandir}/man8/slurmdbd.*
%config(noreplace) %{_sysconfdir}/%{name}/slurmdbd.conf %config(noreplace) %{_sysconfdir}/%{pname}/slurmdbd.conf
%{_sysconfdir}/%{name}/slurmdbd.conf.example %{_sysconfdir}/%{pname}/slurmdbd.conf.example
%if 0%{?with_systemd} %if 0%{?with_systemd}
%{_unitdir}/slurmdbd.service %{_unitdir}/slurmdbd.service
%else %else
@ -955,16 +1012,16 @@ exit 0
%files config %files config
%{?comp_at} %{?comp_at}
%dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{pname}
%dir %{_sysconfdir}/%{name}/layouts.d %dir %{_sysconfdir}/%{pname}/layouts.d
%config(noreplace) %{_sysconfdir}/%{name}/slurm.conf %config(noreplace) %{_sysconfdir}/%{pname}/slurm.conf
%{?OHPC_BUILD:%config %{_sysconfdir}/%{name}/slurm.conf.example} %{?OHPC_BUILD:%config %{_sysconfdir}/%{pname}/slurm.conf.example}
%config(noreplace) %{_sysconfdir}/%{name}/cgroup.conf %config(noreplace) %{_sysconfdir}/%{pname}/cgroup.conf
%config(noreplace) %{_sysconfdir}/%{name}/layouts.d/power.conf.example %config(noreplace) %{_sysconfdir}/%{pname}/layouts.d/power.conf.example
%config(noreplace) %{_sysconfdir}/%{name}/layouts.d/power_cpufreq.conf.example %config(noreplace) %{_sysconfdir}/%{pname}/layouts.d/power_cpufreq.conf.example
%config(noreplace) %{_sysconfdir}/%{name}/layouts.d/unit.conf.example %config(noreplace) %{_sysconfdir}/%{pname}/layouts.d/unit.conf.example
%{?OHPC_BUILD:%attr(0755, %slurm_u, %slurm_g) %_localstatedir/lib/slurm} %{?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 %dir %{_var}/spool/slurm
%config(noreplace) %{_sysconfdir}/logrotate.d/slurm* %config(noreplace) %{_sysconfdir}/logrotate.d/slurm*