SHA256
1
0
forked from pool/slurm

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

- Explicitly create an Obsoletes: entry for each package version
  that is obsoleted by the present version. These are all published
  versions of the last two major releases as well as all minor
  versions of the present release lower than the current one
  (bsc#1216869 2nd part).
  This prevents the current version to upgrade a old Slurm version
  for which no upgrade path exists.

OBS-URL: https://build.opensuse.org/request/show/1129638
OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=279
This commit is contained in:
Egbert Eich 2023-11-28 18:02:52 +00:00 committed by Git OBS Bridge
parent db15cbcf3e
commit 5a1d72f62c
3 changed files with 39 additions and 2 deletions

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Nov 28 14:14:28 UTC 2023 - Egbert Eich <eich@suse.com>
- Explicitly create an Obsoletes: entry for each package version
that is obsoleted by the present version. These are all published
versions of the last two major releases as well as all minor
versions of the present release lower than the current one
(bsc#1216869 2nd part).
This prevents the current version to upgrade a old Slurm version
for which no upgrade path exists.
-------------------------------------------------------------------
Mon Nov 20 15:29:55 UTC 2023 - Egbert Eich <eich@suse.com>

View File

@ -18,6 +18,7 @@
# Check file META in sources: update so_version to (API_CURRENT - API_AGE)
%define so_version 39
# Make sure to update `upgrades` as well!
%define ver 23.02.6
%define _ver _23_02
#%%define rc_v 0rc1
@ -72,9 +73,26 @@ Conflicts: %{*} >= %{ver_m}.99 }
%if 0%{?base_ver} > 0 && 0%{?base_ver} < %{lua:x=string.gsub(rpm.expand("%_ver"),"_","");print(x)}
%define upgrade 1
%endif
%define upgrade_versions upgrades
%define do_obsoletes() %{lua:
local filename = rpm.expand("%_sourcedir") .. "/" .. rpm.expand("%upgrade_versions")
local version = rpm.expand("%version")
local arg = rpm.expand("%{1}")
local f = io.open(filename ,"r")
local em = false
if f~=nil then
f.close(f)
for line in io.lines(filename) do
if em then print('\\n') else em = true end
print("Obsoletes: " .. arg .. " = " .. line)
end
else
print("Obsoletes: " .. arg .. " < " .. version)
end }
%define upgrade_dep() %{?upgrade: #
Provides: %{*} = %{version}
Obsoletes: %{*} < %{version}
%{do_obsoletes %{*}}
Conflicts: %{*} }
%if 0%{?suse_version} >= 1500
@ -145,7 +163,8 @@ Group: Productivity/Clustering/Computing
URL: https://www.schedmd.com
Source: https://download.schedmd.com/slurm/%{pname}-%{dl_ver}.tar.bz2
#Source: https://github.com/SchedMD/slurm/archive/refs/tags/%{pname}-%{dl_ver}.tar.gz
Source1: slurm-rpmlintrc
Source1: %upgrade_versions
Source2: slurm-rpmlintrc
Source10: slurmd.xml
Source11: slurmctld.xml
Source12: slurmdbd.xml

7
upgrades Normal file
View File

@ -0,0 +1,7 @@
23.02.5
23.02.3
23.02.0
22.05.10
22.05.5
22.05.2
22.05.0