[Fix for Fedora Change] Fix versioned layout macros
- cover both arch and noarch sub-packages - add obsoletes against the older versions to the distribution default version Related: RHEL-104250
This commit is contained in:
parent
509086ab6f
commit
5501d7be55
@ -104,7 +104,7 @@ ExcludeArch: %{ix86}
|
||||
|
||||
Name: %{majorname}%{majorversion}
|
||||
Version: %{package_version}
|
||||
Release: 1%{?with_debug:.debug}%{?dist}
|
||||
Release: 2%{?with_debug:.debug}%{?dist}
|
||||
Summary: MySQL client programs and shared libraries
|
||||
URL: http://www.mysql.com
|
||||
|
||||
@ -265,20 +265,32 @@ Conflicts: %{majorname}%{?1:-%{1}}-any\
|
||||
|
||||
# Provide also mysqlX.X if default
|
||||
%if %?mysql_default
|
||||
%define mysqlX_if_default() %{expand:\
|
||||
%define mysqlX_if_default_arched() %{expand:\
|
||||
Obsoletes: mysql%{?1:-%{1}} < %{sameevr}\
|
||||
Obsoletes: mysql%{majorversion}%{?1:-%{1}} < %{sameevr}\
|
||||
Provides: mysql%{majorversion}%{?1:-%{1}} = %{sameevr}\
|
||||
Provides: mysql%{majorversion}%{?1:-%{1}}%{?_isa} = %{sameevr}\
|
||||
}
|
||||
%define mysqlX_if_default_noarch() %{expand:\
|
||||
Obsoletes: mysql%{?1:-%{1}} < %{sameevr}\
|
||||
Obsoletes: mysql%{majorversion}%{?1:-%{1}} < %{sameevr}\
|
||||
Provides: mysql%{majorversion}%{?1:-%{1}} = %{sameevr}\
|
||||
}
|
||||
%else
|
||||
%define mysqlX_if_default() %{nil}
|
||||
%define mysqlX_if_default_arched() %{nil}
|
||||
%define mysqlX_if_default_noarch() %{nil}
|
||||
%endif
|
||||
|
||||
%define add_metadata() %{expand:\
|
||||
%define add_metadata_arched() %{expand:\
|
||||
%conflict_with_other_streams %{**}\
|
||||
%mysqlX_if_default %{**}\
|
||||
%mysqlX_if_default_arched %{**}\
|
||||
}
|
||||
%define add_metadata_noarch() %{expand:\
|
||||
%conflict_with_other_streams %{**}\
|
||||
%mysqlX_if_default_noarch %{**}\
|
||||
}
|
||||
|
||||
%add_metadata
|
||||
%add_metadata_arched
|
||||
|
||||
%description
|
||||
MySQL is a multi-user, multi-threaded SQL database server. MySQL is a
|
||||
@ -302,7 +314,7 @@ Requires: %{pkgname}-common = %{sameevr}
|
||||
%{?with_provides_community_mysql:Provides: community-mysql-libs%{?_isa}= %community_mysql_version}
|
||||
%{?with_obsoletes_community_mysql:Obsoletes: community-mysql-libs <= %obsolete_community_mysql_version}
|
||||
|
||||
%add_metadata libs
|
||||
%add_metadata_arched libs
|
||||
|
||||
%description -n %{pkgname}-libs
|
||||
The mysql-libs package provides the essential shared libraries for any
|
||||
@ -319,7 +331,7 @@ Summary: The config files required by server and client
|
||||
%{?with_provides_community_mysql:Provides: community-mysql-config%{?_isa} = %community_mysql_version}
|
||||
%{?with_obsoletes_community_mysql:Obsoletes: community-mysql-config <= %obsolete_community_mysql_version}
|
||||
|
||||
%add_metadata config
|
||||
%add_metadata_arched config
|
||||
|
||||
%description -n %{pkgname}-config
|
||||
The package provides the config file my.cnf and my.cnf.d directory used by any
|
||||
@ -342,7 +354,7 @@ Requires: %{_sysconfdir}/my.cnf
|
||||
%{?with_obsoletes_community_mysql:Obsoletes: community-mysql-common <= %obsolete_community_mysql_version}
|
||||
|
||||
# As this package is noarch, it can't use the %%{?_isa} RPM macro
|
||||
%conflict_with_other_streams common
|
||||
%add_metadata_noarch common
|
||||
|
||||
%description -n %{pkgname}-common
|
||||
The mysql-common package provides the essential shared files for any
|
||||
@ -360,7 +372,7 @@ Requires: %{pkgname}-common = %{sameevr}
|
||||
%{?with_obsoletes_community_mysql:Obsoletes: community-mysql-errmsg <= %obsolete_community_mysql_version}
|
||||
|
||||
# As this package is noarch, it can't use the %%{?_isa} RPM macro
|
||||
%conflict_with_other_streams errmsg
|
||||
%add_metadata_noarch errmsg
|
||||
|
||||
%description -n %{pkgname}-errmsg
|
||||
The package provides error messages files for the MySQL daemon
|
||||
@ -409,7 +421,7 @@ Suggests: logrotate
|
||||
%{?with_provides_community_mysql:Provides: community-mysql-server%{?_isa} = %community_mysql_version}
|
||||
%{?with_obsoletes_community_mysql:Obsoletes: community-mysql-server <= %obsolete_community_mysql_version}
|
||||
|
||||
%add_metadata server
|
||||
%add_metadata_arched server
|
||||
|
||||
%description -n %{pkgname}-server
|
||||
MySQL is a multi-user, multi-threaded SQL database server. MySQL is a
|
||||
@ -431,7 +443,7 @@ Requires: libzstd-devel
|
||||
%{?with_provides_community_mysql:Provides: community-mysql-devel%{?_isa} = %community_mysql_version}
|
||||
%{?with_obsoletes_community_mysql:Obsoletes: community-mysql-devel <= %obsolete_community_mysql_version}
|
||||
|
||||
%add_metadata devel
|
||||
%add_metadata_arched devel
|
||||
|
||||
%description -n %{pkgname}-devel
|
||||
MySQL is a multi-user, multi-threaded SQL database server. This
|
||||
@ -473,7 +485,7 @@ Requires: perl(File::Compare)
|
||||
%{?with_provides_community_mysql:Provides: community-mysql-test%{?_isa} = %community_mysql_version}
|
||||
%{?with_obsoletes_community_mysql:Obsoletes: community-mysql-test <= %obsolete_community_mysql_version}
|
||||
|
||||
%add_metadata test
|
||||
%add_metadata_arched test
|
||||
|
||||
%description -n %{pkgname}-test
|
||||
MySQL is a multi-user, multi-threaded SQL database server. This
|
||||
@ -486,7 +498,7 @@ BuildArch: noarch
|
||||
Requires: %{pkgname}-test = %{sameevr}
|
||||
|
||||
# As this package is noarch, it can't use the %%{?_isa} RPM macro
|
||||
%conflict_with_other_streams test-data
|
||||
%add_metadata_noarch test-data
|
||||
|
||||
%description -n %{pkgname}-test-data
|
||||
MySQL is a multi-user, multi-threaded SQL database server. This
|
||||
|
||||
Loading…
Reference in New Issue
Block a user