From c92cefe77df93b080e04cf48e2a0979392c17ad5 Mon Sep 17 00:00:00 2001 From: Brian Stinson Date: Jan 10 2020 03:45:52 +0000 Subject: initial commit --- diff --git a/.centos-obsolete-packages.metadata b/.centos-obsolete-packages.metadata new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.centos-obsolete-packages.metadata diff --git a/SOURCES/README b/SOURCES/README new file mode 100644 index 0000000..f0e32eb --- /dev/null +++ b/SOURCES/README @@ -0,0 +1,2 @@ +This package exists only to obsolete old packages which need to be removed from +the distribution in order to avoid dependency issues during upgrades. diff --git a/SPECS/centos-obsolete-packages.spec b/SPECS/centos-obsolete-packages.spec new file mode 100644 index 0000000..cf71342 --- /dev/null +++ b/SPECS/centos-obsolete-packages.spec @@ -0,0 +1,109 @@ +Name: centos-obsolete-packages +# Please keep the version equal to the targeted CentOS release +Version: 8 +Release: 1 +Summary: A package to obsolete retired packages + +# This package has no actual content; there is nothing to license. +License: Public Domain +URL: https://www.centos.org/ +BuildArch: noarch + +Source0: README + +# =============================================================================== +# Skip down below these convenience macros +%define obsolete_ticket() %{lua: + local ticket = rpm.expand('%1') + + -- May need to declare the master structure + if type(obs) == 'nil' then + obs = {} + end + + if ticket == '%1' then + rpm.expand('%{error:No ticket provided to obsolete_ticket}') + end + + if ticket == 'Ishouldfileaticket' then + ticket = nil + end + + -- Declare a new set of obsoletes + local index = #obs+1 + obs[index] = {} + obs[index].ticket = ticket + obs[index].list = {} +} + +%define obsolete() %{lua: + local pkg = rpm.expand('%1') + local ver = rpm.expand('%2') + + if pkg == '%1' then + rpm.expand('%{error:No package name provided to obsolete}') + end + if ver == '%2' then + rpm.expand('%{error:No version provided to obsolete}') + end + + if not string.find(ver, '-') then + rpm.expand('%{error:You must provide a version-release, not just a version.}') + end + + local o = pkg .. ' < ' .. ver + print('Obsoletes: ' .. o) + + -- Append this obsolete to the last set of obsoletes in the list + local list = obs[#obs].list + list[#list+1] = o +} + +%define list_obsoletes %{lua: + local i + local j + for i = 1,#obs do + for j = 1,#obs[i].list do + print(' ' .. obs[i].list[j] .. '\\n') + end + if obs[i].ticket == nil then + print(' (No ticket was provided!)\\n\\n') + else + print(' (See ' .. obs[i].ticket .. ')\\n\\n') + end + end +} + +# ======================================== +# Please place non-python2 Obsoletes: here +# ======================================== + +# Erroneously added in 8.0 +%obsolete_ticket https://wiki.centos.org/Manuals/ReleaseNotes/CentOS8.1911 +%obsolete rpm 4.14.2-11.el8_0 +%obsolete binutils 2.30-58 + +# This package won't be installed, but will obsolete other packages +Provides: libsolv-self-destruct-pkg() + +%description +This package exists only to obsolete other packages which need to be removed +from the distribution for some reason. + +Currently obsoleted packages: + +%list_obsoletes + + +%prep +%autosetup -c -T +cp %SOURCE0 . + + +%files +%doc README + + +%changelog +* Thu Jan 0 2020 Pablo Greco - 8-1 +- Obsolete packages with erroneous i686 in x86_64