[1/3] Code adjustments for RHEL 9.6 - fixup to versioned package layout

In Fedora, package 'mysql8.0' is versioned and it is currently set
as the distribution default. That means it produces un-versioned RPMs
and provides the versioned names, as well as community-mysql names.

In RHEL 10, package 'mysql8.4' is versioned, but it is NOT the
distribution default. That means it produces versioned RPMs and it
does not provide unversioned names.

Here, in RHEL 9 module, the package is named the old unversioned name
'mysql'. We does not want it to produce the provides of the versioned
names, nor conflicts with community-mysql, so small fixup is needed.
This commit is contained in:
Michal Schorm 2025-01-09 12:02:07 +01:00
parent 40728af197
commit 960da07587
2 changed files with 14 additions and 7 deletions

View File

@ -92,9 +92,9 @@ ExcludeArch: %{ix86}
# Provide explicitly the 'community-mysql' names
# 'community-mysql' names are deprecated and to be removed in future Fedora
# but we're leaving them here for compatibility reasons
%bcond provides_community_mysql %{?mysql_default}
%bcond provides_community_mysql 0
# Obsolete the package 'community-mysql' and all its sub-packages
%bcond obsoletes_community_mysql %{?mysql_default}
%bcond obsoletes_community_mysql 0
# This is the last version of the 'community-mysql' package production release
%global obsolete_community_mysql_version 8.0.35-10
%global community_mysql_version 8.0.36-1
@ -102,7 +102,7 @@ ExcludeArch: %{ix86}
# Make long macros shorter
%global sameevr %{?epoch:%{epoch}:}%{version}-%{release}
Name: %{majorname}%{majorversion}
Name: %{majorname}
Version: %{package_version}
Release: 2%{?with_debug:.debug}%{?dist}
Summary: MySQL client programs and shared libraries
@ -153,8 +153,6 @@ Patch112: boost-1.57.0-mpl-print.patch
# This macro is used for package/sub-package names in the entire specfile
%if %?mysql_default
%global pkgname %{majorname}
%package -n %{pkgname}
Summary: MySQL client programs and shared libraries
%else
%global pkgname %{name}
%endif
@ -262,6 +260,8 @@ Provides: bundled(unordered_dense)
%{?with_provides_community_mysql:Provides: community-mysql%{?_isa} = %community_mysql_version}
%{?with_obsoletes_community_mysql:Obsoletes: community-mysql <= %obsolete_community_mysql_version}
%if 0%{?rhel} >= 10
%define conflict_with_other_streams() %{expand:\
Provides: %{majorname}%{?1:-%{1}}-any\
Conflicts: %{majorname}%{?1:-%{1}}-any\
@ -282,14 +282,21 @@ Provides: mysql%{majorversion}%{?1:-%{1}}%{?_isa} = %{sameevr}\
%mysqlX_if_default %{**}\
}
%add_metadata
%description
MySQL is a multi-user, multi-threaded SQL database server. MySQL is a
client/server implementation consisting of a server daemon (mysqld)
and many different client programs and libraries. The base package
contains the standard MySQL client programs and generic MySQL files.
%else
%define conflict_with_other_streams() { %{nil} }
%define add_metadata() { %{nil} }
%endif
%add_metadata
%if %?mysql_default
%description -n %{pkgname}
MySQL is a multi-user, multi-threaded SQL database server. MySQL is a