Add bcond_without mysql_names

Use more correct path when deleting mysql logrotate script
This commit is contained in:
Honza Horak 2014-10-01 14:13:57 +02:00
parent 4bb43c839e
commit b0dad15adb

View File

@ -88,6 +88,9 @@
%global obsoleted_mysql_evr 5.6-0
%global obsoleted_mysql_case_evr 5.5.30-5
# Provide mysql names for compatibility
%bcond_without mysql_names
# When replacing mysql by mariadb these packages are not upated, but rather
# installed and uninstalled. Thus we loose information about mysqld service
# enablement. To address this we use a file to store that information within
@ -104,7 +107,7 @@
Name: %{pkgname}
Version: %{compatver}.%{bugfixver}
Release: 3%{?with_debug:.debug}%{?dist}
Release: 4%{?with_debug:.debug}%{?dist}
Epoch: 1
Summary: A community developed branch of MySQL
@ -191,10 +194,12 @@ Requires: fileutils
Requires: grep
Requires: %{name}-common%{?_isa} = %{sameevr}
%if %{with mysql_names}
Provides: mysql = %{sameevr}
Provides: mysql%{?_isa} = %{sameevr}
Provides: mysql-compat-client = %{sameevr}
Provides: mysql-compat-client%{?_isa} = %{sameevr}
%endif
# MySQL (with caps) is upstream's spelling of their own RPMs for mysql
%{?obsoleted_mysql_case_evr:Obsoletes: MySQL < %{obsoleted_mysql_case_evr}}
@ -224,8 +229,10 @@ contains the standard MariaDB/MySQL client programs and generic MySQL files.
Summary: The shared libraries required for MariaDB/MySQL clients
Group: Applications/Databases
Requires: %{name}-common%{?_isa} = %{sameevr}
%if %{with mysql_names}
Provides: mysql-libs = %{sameevr}
Provides: mysql-libs%{?_isa} = %{sameevr}
%endif
%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-libs < %{obsoleted_mysql_case_evr}}
%{?obsoleted_mysql_evr:Obsoletes: mysql-libs < %{obsoleted_mysql_evr}}
@ -299,10 +306,12 @@ Requires(posttrans): systemd
# mysqlhotcopy needs DBI/DBD support
Requires: perl(DBI)
Requires: perl(DBD::mysql)
%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
%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-server < %{obsoleted_mysql_case_evr}}
Conflicts: community-mysql-server
Conflicts: mariadb-galera-server
@ -355,8 +364,10 @@ Summary: Files for development of MariaDB/MySQL applications
Group: Applications/Databases
Requires: %{name}-libs%{?_isa} = %{sameevr}
Requires: openssl-devel%{?_isa}
%if %{with mysql_names}
Provides: mysql-devel = %{sameevr}
Provides: mysql-devel%{?_isa} = %{sameevr}
%endif
%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-devel < %{obsoleted_mysql_case_evr}}
%{?obsoleted_mysql_evr:Obsoletes: mysql-devel < %{obsoleted_mysql_evr}}
Conflicts: community-mysql-devel
@ -375,8 +386,10 @@ Summary: MariaDB as an embeddable library
Group: Applications/Databases
Requires: %{name}-common%{?_isa} = %{sameevr}
Requires: %{name}-errmsg%{?_isa} = %{sameevr}
%if %{with mysql_names}
Provides: mysql-embedded = %{sameevr}
Provides: mysql-embedded%{?_isa} = %{sameevr}
%endif
%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-embedded < %{obsoleted_mysql_case_evr}}
%{?obsoleted_mysql_evr:Obsoletes: mysql-embedded < %{obsoleted_mysql_evr}}
@ -392,8 +405,10 @@ Summary: Development files for MariaDB as an embeddable library
Group: Applications/Databases
Requires: %{name}-embedded%{?_isa} = %{sameevr}
Requires: %{name}-devel%{?_isa} = %{sameevr}
%if %{with mysql_names}
Provides: mysql-embedded-devel = %{sameevr}
Provides: mysql-embedded-devel%{?_isa} = %{sameevr}
%endif
Conflicts: community-mysql-embedded-devel
%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-embedded-devel < %{obsoleted_mysql_case_evr}}
%{?obsoleted_mysql_evr:Obsoletes: mysql-embedded-devel < %{obsoleted_mysql_evr}}
@ -411,8 +426,10 @@ MariaDB is a community developed branch of MySQL.
Summary: MariaDB benchmark scripts and data
Group: Applications/Databases
Requires: %{name}%{?_isa} = %{sameevr}
%if %{with mysql_names}
Provides: mysql-bench = %{sameevr}
Provides: mysql-bench%{?_isa} = %{sameevr}
%endif
Conflicts: community-mysql-bench
%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-bench < %{obsoleted_mysql_case_evr}}
%{?obsoleted_mysql_evr:Obsoletes: mysql-bench < %{obsoleted_mysql_evr}}
@ -444,8 +461,10 @@ Requires: perl(Sys::Hostname)
Requires: perl(Test::More)
Requires: perl(Time::HiRes)
Conflicts: community-mysql-test
%if %{with mysql_names}
Provides: mysql-test = %{sameevr}
Provides: mysql-test%{?_isa} = %{sameevr}
%endif
%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-test < %{obsoleted_mysql_case_evr}}
%{?obsoleted_mysql_evr:Obsoletes: mysql-test < %{obsoleted_mysql_evr}}
@ -736,7 +755,7 @@ rm -rf %{buildroot}%{_datadir}/%{name}/SELinux/
rm -f %{buildroot}%{_sysconfdir}/init.d/mysql
# remove duplicate logrotate script
rm -f %{buildroot}%{logrotateddir}/mysql
rm -f %{buildroot}%{_sysconfdir}/logrotate.d/mysql
# remove solaris files
rm -rf %{buildroot}%{_datadir}/%{name}/solaris/
@ -1159,6 +1178,10 @@ fi
%endif
%changelog
* Wed Oct 01 2014 Honza Horak <hhorak@redhat.com> - 1:10.0.14-4
- Add bcond_without mysql_names
Use more correct path when deleting mysql logrotate script
* Wed Oct 01 2014 Honza Horak <hhorak@redhat.com> - 1:10.0.14-3
- Build with system libedit
Resolves: #1079637