Move backward compatibility into shared define

Fix dependencies of chroot and some other subpackages. Depend on
%name%{?_isa} instead of bind%{?_isa}, Provides: does not provide also
arch provide.

More packages need backward compatibility. Move their definitions to
reusable macro and use it in multiple places.

Resolves: rhbz#1873486
This commit is contained in:
Petr Menšík 2021-12-02 15:12:30 +01:00
parent 50c017891b
commit 76d9b1ec11

View File

@ -50,6 +50,12 @@
# Upstream package name
%global upname bind
%define upname_compat() \
%if "%{name}" != "%{upname}" \
Provides: %1 = %{epoch}:%{version}-%{release} \
Obsoletes: %1 < 32:9.17.0 \
Conflicts: %1 \
%endif
Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server
Name: bind9-next
@ -109,11 +115,8 @@ Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires(post): ((policycoreutils-python-utils and libselinux-utils) if (selinux-policy-targeted or selinux-policy-mls))
Requires(post): ((selinux-policy and selinux-policy-base) if (selinux-policy-targeted or selinux-policy-mls))
Recommends: %{name}-utils %{name}-dnssec-utils
%if "%{name}" != "%{upname}"
Provides: bind = %{epoch}:%{version}-%{release}
Obsoletes: bind < %{epoch}:%{version}-%{release}
Conflicts: bind
%endif
%upname_compat %{upname}
BuildRequires: gcc, make
BuildRequires: openssl-devel, libtool, autoconf, pkgconfig, libcap-devel
BuildRequires: libidn2-devel, libxml2-devel
@ -179,7 +182,7 @@ tools for verifying that the DNS server is operating properly.
%if %{with PKCS11}
%package pkcs11
Summary: Bind with native PKCS#11 functionality for crypto
Requires: bind%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-pkcs11-libs%{?_isa} = %{epoch}:%{version}-%{release}
Recommends: softhsm
@ -247,11 +250,7 @@ Summary: Utilities for querying DNS name servers
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
# For compatibility with Debian package
Provides: dnsutils = %{epoch}:%{version}-%{release}
%if "%{name}" != "%{upname}"
Provides: bind-utils = %{epoch}:%{version}-%{release}
Obsoletes: bind-utils < %{epoch}:%{version}-%{release}
Conflicts: bind-utils
%endif
%upname_compat %{upname}-utils
%description utils
Bind-utils contains a collection of utilities for querying DNS (Domain
@ -268,11 +267,7 @@ Summary: DNSSEC keys and zones management utilities
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Recommends: %{name}-utils
Requires: %{name}-dnssec-doc = %{epoch}:%{version}-%{release}
%if "%{name}" != "%{upname}"
Provides: bind-dnsec-utils = %{epoch}:%{version}-%{release}
Obsoletes: bind-dnssec-utils < %{epoch}:%{version}-%{release}
Conflicts: bind-dnssec-utils
%endif
%upname_compat %{upname}-dnssec-utils
%description dnssec-utils
%{name}-dnssec-utils contains a collection of utilities for editing
@ -334,21 +329,21 @@ Based on the code from Jan "Yenya" Kasprzak <kas@fi.muni.cz>
%if %{with DLZ}
%package dlz-filesystem
Summary: BIND server filesystem DLZ module
Requires: bind%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%description dlz-filesystem
Dynamic Loadable Zones filesystem module for BIND server.
%package dlz-ldap
Summary: BIND server ldap DLZ module
Requires: bind%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%description dlz-ldap
Dynamic Loadable Zones LDAP module for BIND server.
%package dlz-mysql
Summary: BIND server mysql and mysqldyn DLZ modules
Requires: bind%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
Provides: %{name}-dlz-mysqldyn = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-dlz-mysqldyn < 32:9.16.6-3
@ -358,7 +353,7 @@ Contains also mysqldyn module with dynamic DNS updates (DDNS) support.
%package dlz-sqlite3
Summary: BIND server sqlite3 DLZ module
Requires: bind%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%description dlz-sqlite3
Dynamic Loadable Zones sqlite3 module for BIND server.
@ -1088,6 +1083,7 @@ fi;
- Correct with GEOIP2 condition (#2026823)
- Import changes for simple rename (#1873486)
- Do not depend on systemd package
- Move backward compatibility to shared define
* Fri Jun 25 2021 Petr Menšík <pemensik@redhat.com> - 32:9.17.15-1
- Update to 9.17.15