diff --git a/slurm.changes b/slurm.changes index 74683c7..b436c47 100644 --- a/slurm.changes +++ b/slurm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Jul 6 11:21:08 UTC 2019 - Egbert Eich + +- 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 diff --git a/slurm.spec b/slurm.spec index 9a4513f..501283d 100644 --- a/slurm.spec +++ b/slurm.spec @@ -19,10 +19,27 @@ # Check file META in sources: update so_version to (API_CURRENT - API_AGE) %define so_version 33 %define ver 18.08.5 +%define _ver _18_08 %define dl_ver %{ver}-2 # 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 @@ -50,8 +67,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 +76,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,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 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} +Requires: (munge if %{name}-munge) +Requires(pre): %{name}-node = %{version} +Recommends: %{name}-doc = %{version} +Recommends: %{name}-config-man = %{version} BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: gtk2-devel @@ -131,22 +152,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 +197,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 +209,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 +220,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 +234,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 +245,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 +256,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 +266,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 +276,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 +285,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 +297,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 +307,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 +320,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 +335,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 +349,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 +361,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 +386,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 +396,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. @@ -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. %prep -%setup -q -n %{name}-%{dl_ver} +%setup -q -n %{pname}-%{dl_ver} %patch0 -p1 %patch1 -p1 %patch2 -p1 @@ -376,7 +433,7 @@ sh5utils to merge this hdf5 files or extract data from them. --disable-static \ --without-rpath \ %{!?have_netloc:--without-netloc} \ - --sysconfdir=%{_sysconfdir}/%{name} + --sysconfdir=%{_sysconfdir}/%{pname} make %{?_smp_mflags} %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}/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 +467,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 +481,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 < %{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 <