From 068e37f35dd18d05df4ee149d71bd9283c5c308a Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 30 Nov 2023 14:37:23 +0100 Subject: [PATCH] F40 Change "MariaDB & MySQL repackaging" - Implement conflicts with 'mariadb' names and provide 'community-mysql' names As per: https://fedoraproject.org/wiki/Changes/F40_MariaDB_MySQL_repackaging specifically the parts: - Rename package 'community-mysql' to 'mysql' and Stop providing 'mysql' symbols by package 'mariadb' - Drop cross-installation functionality --- community-mysql.spec | 72 ++++++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 32 deletions(-) diff --git a/community-mysql.spec b/community-mysql.spec index 9ca53e2..fa2c42a 100644 --- a/community-mysql.spec +++ b/community-mysql.spec @@ -61,9 +61,17 @@ %global dbdatadir %{_localstatedir}/lib/mysql -# Provide mysql names for compatibility -%bcond_without mysql_names -%bcond_without conflicts +# Set explicit conflicts with 'mariadb' packages +%bcond_without conflicts_mariadb +# 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_without provides_community_mysql +# Obsolete the package 'community-mysql' and all its sub-packages +%bcond_without obsoletes_community_mysql +# This is the last version of the 'community-mysql' package production release +%global obsolete_community_mysql_version 8.0.35-1 + # Make long macros shorter %global sameevr %{?epoch:%{epoch}:}%{version}-%{release} @@ -199,14 +207,11 @@ Requires: %{name}-common = %{sameevr} Provides: bundled(boost) = %{boost_bundled_version} -%if %{with mysql_names} -Provides: mysql = %{sameevr} -Provides: mysql%{?_isa} = %{sameevr} -Provides: mysql-compat-client = %{sameevr} -Provides: mysql-compat-client%{?_isa} = %{sameevr} -%endif - -%{?with_conflicts:Conflicts: mariadb} +%{?with_conflicts_mariadb:Conflicts: mariadb} +# Explicitly disallow installation of mysql + mariadb-server +%{?with_conflicts_mariadb:Conflicts: mariadb-server} +%{?with_provides_community_mysql:Provides: community-mysql} +%{?with_obsoletes_community_mysql:Obsoletes: community-mysql <= %obsolete_community_mysql_version} %description MySQL is a multi-user, multi-threaded SQL database server. MySQL is a @@ -219,10 +224,8 @@ contains the standard MySQL client programs and generic MySQL files. %package libs Summary: The shared libraries required for MySQL clients Requires: %{name}-common = %{sameevr} -%if %{with mysql_names} -Provides: mysql-libs = %{sameevr} -Provides: mysql-libs%{?_isa} = %{sameevr} -%endif +%{?with_provides_community_mysql:Provides: community-mysql-libs} +%{?with_obsoletes_community_mysql:Obsoletes: community-mysql-libs <= %obsolete_community_mysql_version} %description libs The mysql-libs package provides the essential shared libraries for any @@ -235,6 +238,8 @@ MySQL server. %if %{with config} %package config Summary: The config files required by server and client +%{?with_provides_community_mysql:Provides: community-mysql-config} +%{?with_obsoletes_community_mysql:Obsoletes: community-mysql-config <= %obsolete_community_mysql_version} %description config The package provides the config file my.cnf and my.cnf.d directory used by any @@ -249,6 +254,8 @@ package itself. Summary: The shared files required for MySQL server and client BuildArch: noarch Requires: %{_sysconfdir}/my.cnf +%{?with_provides_community_mysql:Provides: community-mysql-common} +%{?with_obsoletes_community_mysql:Obsoletes: community-mysql-common <= %obsolete_community_mysql_version} %description common The mysql-common package provides the essential shared files for any @@ -262,6 +269,8 @@ MySQL package. Summary: The error messages files required by MySQL server BuildArch: noarch Requires: %{name}-common = %{sameevr} +%{?with_provides_community_mysql:Provides: community-mysql-errmsg} +%{?with_obsoletes_community_mysql:Obsoletes: community-mysql-errmsg <= %obsolete_community_mysql_version} %description errmsg The package provides error messages files for the MySQL daemon @@ -271,9 +280,7 @@ The package provides error messages files for the MySQL daemon %package server Summary: The MySQL server and related files -# Require any mysql client, but prefer community-mysql client for community-mysql server -Suggests: %{name}%{?_isa} = %{sameevr} -Requires: mysql%{?_isa} +Requires: %{name}%{?_isa} Requires: %{name}-common = %{sameevr} Requires: %{_sysconfdir}/my.cnf @@ -297,14 +304,13 @@ Requires(post): policycoreutils-python-utils Requires: (mysql-selinux if selinux-policy-targeted) %endif -%if %{with mysql_names} -Provides: mysql-server = %{sameevr} -Provides: mysql-server%{?_isa} = %{sameevr} -Provides: mysql-compat-server = %{sameevr} -Provides: mysql-compat-server%{?_isa} = %{sameevr} -%endif -%{?with_conflicts:Conflicts: mariadb-server} -%{?with_conflicts:Conflicts: mariadb-galera-server} +%{?with_conflicts_mariadb:Conflicts: mariadb-server} +%{?with_conflicts_mariadb:Conflicts: mariadb-server-utils} +%{?with_conflicts_mariadb:Conflicts: mariadb-server-galera} +# Explicitly disallow installation of mysql + mariadb-server +%{?with_conflicts_mariadb:Conflicts: mariadb} +%{?with_provides_community_mysql:Provides: community-mysql-server} +%{?with_obsoletes_community_mysql:Obsoletes: community-mysql-server <= %obsolete_community_mysql_version} %description server MySQL is a multi-user, multi-threaded SQL database server. MySQL is a @@ -320,7 +326,10 @@ Summary: Files for development of MySQL applications Requires: openssl-devel Requires: zlib-devel Requires: libzstd-devel -%{?with_conflicts:Conflicts: mariadb-devel} +%{?with_conflicts_mariadb:Conflicts: mariadb-devel} +%{?with_conflicts_mariadb:Conflicts: mariadb-connector-c-devel} +%{?with_provides_community_mysql:Provides: community-mysql-devel} +%{?with_obsoletes_community_mysql:Obsoletes: community-mysql-devel <= %obsolete_community_mysql_version} %description devel MySQL is a multi-user, multi-threaded SQL database server. This @@ -354,11 +363,10 @@ Requires: perl(Socket) Requires: perl(Sys::Hostname) Requires: perl(Test::More) Requires: perl(Time::HiRes) -%{?with_conflicts:Conflicts: mariadb-test} -%if %{with mysql_names} -Provides: mysql-test = %{sameevr} -Provides: mysql-test%{?_isa} = %{sameevr} -%endif + +%{?with_conflicts_mariadb:Conflicts: mariadb-test} +%{?with_provides_community_mysql:Provides: community-mysql-test} +%{?with_obsoletes_community_mysql:Obsoletes: community-mysql-test <= %obsolete_community_mysql_version} %description test MySQL is a multi-user, multi-threaded SQL database server. This