public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/bind] rawhide: Remove registered alternatives after dropping support for them (v4)
@ 2026-11-25 12:05
0 siblings, 0 replies; only message in thread
From: @ 2026-11-25 12:05 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/bind
Branch : rawhide
Commit : 40b236fa823dbb4413bda591bcc4f294c36ec696
Author : Petr Menšík <pemensik@redhat.com>
Date : 2026-11-24T15:47:48+01:00
Stats : +30/-0 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/bind/c/40b236fa823dbb4413bda591bcc4f294c36ec696?branch=rawhide
Log:
Remove registered alternatives after dropping support for them (v4)
Wanted bind < %%{alternative_removal_ver}, but the package can be referred only once in all triggers.
bind-libs are required to be the same version, having the trigger on main package should call in
on bind main package upgrades. It should not emit errors if libs only is
processed.
$1 on bind-libs will be always 1, because old bind package is uninstalled
by that time.
---
diff --git a/bind.spec b/bind.spec
index e11a681..a2d38d9 100644
--- a/bind.spec
+++ b/bind.spec
@@ -731,6 +731,36 @@ if [ -x %{_sbindir}/selinuxenabled ] && [ -x %{_sbindir}/getsebool ] && [ -x %{_
fi
fi
+# Remove alternatives entries if they are older than this package
+%global program_suffix -9
+%global mver 9.18
+%global alternative_removal_ver 32:9.18.51^git20261102.973d8646-40
+
+# wanted bind < %%{alternative_removal_ver}, but the package can be referred only once by triggerpostun
+%triggerpostun -- bind-libs < %{alternative_removal_ver}
+if [ -x %{_bindir}/alternatives ] && [ $1 -ge 1 ] && [ -L "%{_sysconfdir}/alternatives/bind9-named" ]; then
+ alternatives --remove bind-named %{_sbindir}/named-%{mver} 2>/dev/null || :
+ alternatives --remove bind9-named %{_sbindir}/named%{program_suffix} 2>/dev/null|| :
+fi
+
+%triggerpostun utils -- bind-utils < %{alternative_removal_ver}
+if [ -x %{_bindir}/alternatives ] && [ $1 -ge 1 ] && [ -L "%{_sysconfdir}/alternatives/bind9-utils-dig" ]; then
+ alternatives --remove bind-utils-dig %{_bindir}/dig-%{mver} 2>/dev/null || :
+ alternatives --remove bind9-utils-dig %{_bindir}/dig%{program_suffix}
+fi
+
+%triggerpostun dnssec-utils -- bind-dnssec-utils < %{alternative_removal_ver}
+if [ -x %{_bindir}/alternatives ] && [ $1 -ge 1 ] && [ -L "%{_sysconfdir}/alternatives/bind9-dnssec-utils" ]; then
+ alternatives --remove bind-dnssec-utils %{_bindir}/dnssec-verify%{mver} 2>/dev/null || :
+ alternatives --remove bind9-dnssec-utils %{_bindir}/dnssec-verify%{program_suffix} || :
+fi
+
+%triggerpostun devel -- bind-devel < %{alternative_removal_ver}
+if [ -x %{_bindir}/alternatives ] && [ $1 -ge 1 ] && [ -L "%{_sysconfdir}/alternatives/bind9-devel" ]; then
+ alternatives --remove bind9-devel %{_includedir}/bind%{mver}
+fi
+%end
+
%ldconfig_scriptlets libs
%post chroot
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-25 12:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 12:05 [rpms/bind] rawhide: Remove registered alternatives after dropping support for them (v4)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox