public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/bind] rawhide: Remove registered alternatives after dropping support for them (v4)
Date: Wed, 25 Nov 2026 12:05:35 GMT [thread overview]
Message-ID: <179560833519.1.1472257451856840277.rpms-bind-40b236fa823d@fedoraproject.org> (raw)
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
reply other threads:[~2026-11-25 12:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179560833519.1.1472257451856840277.rpms-bind-40b236fa823d@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox