public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/bind] rawhide: Conflicts with all bind versions not using alternatives
Date: Fri, 16 Oct 2026 14:51:32 GMT	[thread overview]
Message-ID: <179216229276.1.17230585647465387120.rpms-bind-5dc0c4dca7d1@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/bind
            Branch : rawhide
            Commit : 5dc0c4dca7d1e5f17aa1c1683c8d6d79437c6cb5
            Author : Petr Menšík <pemensik@redhat.com>
            Date   : 2026-10-13T19:51:02+02:00
            Stats  : +29/-13 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/bind/c/5dc0c4dca7d1e5f17aa1c1683c8d6d79437c6cb5?branch=rawhide

            Log:
            Conflicts with all bind versions not using alternatives

Provide both bind and bind9 prefix symbols. Provide
alternative(bind9%{?suffix}) for all subpackages handled by
alternatives. They should conflict with previous versions, which did not
yet use alternatives. But it should allow multiple versions of package
providing alternatives.

This effectively renamed prefixes used in alternatives from bind- to
bind9- names. That should be more unique and better for the future.

Obsolete older versions for smooth upgrade.

Use unless for conflicts, should work better

---
diff --git a/bind.spec b/bind.spec
index 9ce4fa6..9ae4e38 100644
--- a/bind.spec
+++ b/bind.spec
@@ -80,15 +80,26 @@
 # Upstream package name
 %global upname bind9
 
+# original name of this package
+%global oldname bind
+
 # Used on shared libraries, snapshot adds -dev suffix
 %global lib_version 9.18.51
 
 # Epoch is intentionally missing from Provides to be lower than bind package
-%define upname_compat() \
+# Conflict with all packages not yet using alternatives
+%define upname_compat(as:) \
 %if "%{name}" != "%{upname}" \
-Provides: %1 = %{version}-%{release} \
-Provides: alternative(%1) = %{version}-%{release} \
-%endif
+Provides: %{?epoch:%{epoch}:}%{upname}%{-s:-}%{-s*} = %{version}-%{release} \
+%endif \
+%if "%{name}" != "%{oldname}" \
+Provides: %{?epoch:%{epoch}:}%{oldname}%{-s:-}%{-s*} = %{version}-%{release} \
+%endif \
+%if 0%{-a:1} \
+Provides: alternative(%{upname}%{-s:-}%{-s*}) = %{version}-%{release} \
+%endif \
+Conflicts: ((%{upname}%{-s:-}%{-s*} or %{oldname}%{-s:-}%{-s*}) unless alternative(%{upname}%{-s:-}%{-s*})) \
+Obsoletes: %{name}%{-s:-}%{-s*} < 32:9.18.50-22
 
 Summary:  The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server
 Name:     bind
@@ -115,10 +126,10 @@ Release:  %autorelease
 Epoch:    32
 Url:      https://www.isc.org/downloads/bind/
 #
-%dnl Source0:  https://downloads.isc.org/isc/bind9/%{version}/%{upname}-%{version}.tar.xz
+%dnl Source0:  https://downloads.isc.org/isc/bind9/%{version}/%{oldname}-%{version}.tar.xz
 Source0:  https://gitlab.isc.org/isc-projects/bind9/-/archive/%{git_commit}/bind9-%{git_commit}.tar.bz2
 Source1:  named.sysconfig
-%dnl Source2:  https://downloads.isc.org/isc/bind9/%{version}/%{upname}-%{version}.tar.xz.asc
+%dnl Source2:  https://downloads.isc.org/isc/bind9/%{version}/%{oldname}-%{version}.tar.xz.asc
 Source3:  named.logrotate
 Source4:  https://www.isc.org/docs/isc-keyblock.asc
 Source16: named.conf
@@ -189,7 +200,7 @@ Requires(post):   %{_sbindir}/alternatives
 Requires(postun): %{_sbindir}/alternatives
 Requires:       %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
 Recommends:     %{name}-utils %{name}-dnssec-utils
-%upname_compat  %{upname}
+%upname_compat -a
 Obsoletes:      %{name}-pkcs11 < 32:9.18.4-2
 
 BuildRequires:  gcc
@@ -289,7 +300,7 @@ Provides: dnsutils = %{epoch}:%{version}-%{release}
 Obsoletes: %{name}-pkcs11-utils < 32:9.18.4-2
 Requires(post):   %{_sbindir}/alternatives
 Requires(postun): %{_sbindir}/alternatives
-%upname_compat %{upname}-utils
+%upname_compat -a -s utils
 
 %description utils
 Bind-utils contains a collection of utilities for querying DNS (Domain
@@ -309,7 +320,7 @@ Obsoletes: python3-%{name} < 32:9.18.0
 Obsoletes: %{name}-dnssec-doc < 32:9.18.4-2
 Requires(post):   %{_sbindir}/alternatives
 Requires(postun): %{_sbindir}/alternatives
-%upname_compat %{upname}-dnssec-utils
+%upname_compat -a -s dnssec-utils
 
 %description dnssec-utils
 %{name}-dnssec-utils contains a collection of utilities for editing
@@ -329,7 +340,7 @@ Requires: pkgconfig(libxml-2.0)
 Requires: pkgconfig(libcap)
 Requires(post):   %{_sbindir}/alternatives
 Requires(postun): %{_sbindir}/alternatives
-%upname_compat %{upname}-devel
+%upname_compat -a -s devel
 %if %{with GSSTSIG}
 Requires: pkgconfig(krb5)
 %endif
@@ -358,11 +369,16 @@ Prefix:         %{chroot_prefix}
 # grep is required due to setup-named-chroot.sh script
 Requires:       grep
 Requires:       %{name}%{?_isa} = %{epoch}:%{version}-%{release}
-%upname_compat %{upname}-chroot
-%if "%{name}" != "%{upname}"
+# chroot does not use alternatives (yet)
+%upname_compat -s chroot
+%if "%{name}" != "%{upname}" && "%{name}" != "%{oldname}"
 Conflicts:      %{upname}-chroot
 Conflicts:      %{upname}-sdb-chroot
 %endif
+%if "%{name}" != "%{oldname}"
+Conflicts:      %{oldname}-chroot
+Conflicts:      %{oldname}-sdb-chroot
+%endif
 
 %description chroot
 This package contains a tree of files which can be used as a
@@ -406,7 +422,7 @@ in HTML and PDF format.
 # RHEL does not yet support this verification
 %{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE2}' --data='%{SOURCE0}'
 %endif
-%autosetup -n bind9-%{git_commit} -p1
+%autosetup -n %{upname}-%{git_commit} -p1
 
 # Sparc and s390 arches need to use -fPIE
 %ifarch sparcv9 sparc64 s390 s390x

                 reply	other threads:[~2026-10-16 14:51 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=179216229276.1.17230585647465387120.rpms-bind-5dc0c4dca7d1@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