From c6c732034968284c3ecce1fe538d2e39631eca76 Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Sun, 13 Oct 2024 12:11:45 +0200 Subject: [PATCH] change back to original SPEC file for now Signed-off-by: Toshaan Bharvani --- SPECS/mysql.spec | 108 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 103 insertions(+), 5 deletions(-) diff --git a/SPECS/mysql.spec b/SPECS/mysql.spec index eaa9c87..b887fcb 100644 --- a/SPECS/mysql.spec +++ b/SPECS/mysql.spec @@ -28,13 +28,17 @@ %global mysqldatadir /var/lib/mysql # Pass --define 'with_cluster 1' to build with cluster support -%global cluster 1 +%{?with_cluster: %global cluster 1} %if 0%{?cluster} -%global with_meb 1 -%global with_router 1 +%global with_meb 0 +%global with_router 0 %else +%if 0%{?commercial} %global with_meb 1 +%else +%global with_meb 0 +%endif %global with_router 1 %endif @@ -80,6 +84,15 @@ # - Avoid compiling Python 3 code with Python 2 %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # - Ship debuginfo for community +%if 0%{?commercial} +%if 0%{?no_mini_debug} +%else +%global mini_debug_option -DMINIMAL_RELWITHDEBINFO=1 +%endif # no_mini_debug +%else +%global with_debuginfo 1 +%endif # commercial +%endif # rhel 7 %{?el8: %global with_debuginfo 1} %{?el9: %global with_debuginfo 1} @@ -130,7 +143,11 @@ %global license_files_server %{src_dir}/LICENSE %{src_dir}/README +%if 0%{?commercial} +%global license_type Commercial +%else %global license_type GPLv2 +%endif %global min 8.0.11 @@ -138,7 +155,7 @@ Name: mysql%{?cluster:-cluster}-%{product_suffix} Summary: A very fast and reliable SQL database server Group: Applications/Databases Version: 8.4.2 -Release: 1%{?dist} +Release: 1%{?commercial:.1}%{?dist} License: Copyright (c) 2000, 2024, %{mysql_vendor}. Under %{?license_type} license as shown in the Description field. Source0: https://cdn.mysql.com/Downloads/MySQL-8.4/%{src_dir}.tar.gz URL: http://www.mysql.com/ @@ -213,9 +230,13 @@ BuildRequires: perl(Time::HiRes) BuildRequires: perl(Time::localtime) BuildRequires: time BuildRequires: libaio-devel +%if 0%{?commercial} BuildRequires: cyrus-sasl-gssapi -BuildRequires: cyrus-sasl-scram +%{?el7:BuildRequires: cyrus-sasl-scram} +%{?el8:BuildRequires: cyrus-sasl-scram} +%{?el9:BuildRequires: cyrus-sasl-scram} BuildRequires: libcurl-devel +%endif BuildRequires: krb5-devel BuildRequires: ncurses-devel BuildRequires: numactl-devel @@ -246,6 +267,17 @@ is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. MySQL is a trademark of %{mysql_vendor} +The MySQL software has Dual Licensing, which means you can use the MySQL +software free of charge under the GNU General Public License +(http://www.gnu.org/licenses/). You can also purchase commercial MySQL +licenses from %{mysql_vendor} if you do not wish to be bound by the terms of +the GPL. See the chapter "Licensing and Support" in the manual for +further info. + +The MySQL web site (http://www.mysql.com/) provides the latest +news and information about the MySQL software. Also please see the +documentation and the manual for more information. + %package server Summary: A very fast and reliable SQL database server Group: Applications/Databases @@ -260,6 +292,10 @@ Requires: openssl3-fips Requires: %{name}-client%{?_isa} >= %{min} Requires: %{name}-common%{?_isa} = %{version}-%{release} Requires: %{name}-icu-data-files = %{version}-%{release} +%if 0%{?commercial} +Obsoletes: mysql-commercial-bench < 5.7.8 +Obsoletes: mysql-commercial-embedded < 8.0.1 +Obsoletes: mysql-commercial-embedded-devel < 8.0.1 Provides: MySQL-server-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-server-advanced < %{version}-%{release} Obsoletes: MySQL-embedded-advanced < %{version}-%{release} @@ -271,10 +307,13 @@ Obsoletes: mysql-community-server-debug < %{version}-%{release} Provides: MySQL-Cluster-server-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-Cluster-server-advanced < %{version}-%{release} Obsoletes: MySQL-Cluster-embedded-advanced < %{version}-%{release} +Obsoletes: mysql-commercial-server < %{version}-%{release} Obsoletes: mysql-cluster-community-server < %{version}-%{release} %if 0%{?without_debuginfo} Obsoletes: mysql-cluster-community-server-debug < %{version}-%{release} %endif +Obsoletes: mysql-cluster-commercial-embedded < 8.0.1 +Obsoletes: mysql-cluster-commercial-embedded-devel < 8.0.1 %endif %endif %if 0%{?cluster} @@ -317,6 +356,17 @@ is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. MySQL is a trademark of %{mysql_vendor} +The MySQL software has Dual Licensing, which means you can use the MySQL +software free of charge under the GNU General Public License +(http://www.gnu.org/licenses/). You can also purchase commercial MySQL +licenses from %{mysql_vendor} if you do not wish to be bound by the terms of +the GPL. See the chapter "Licensing and Support" in the manual for +further info. + +The MySQL web site (http://www.mysql.com/) provides the latest news and +information about the MySQL software. Also please see the documentation +and the manual for more information. + This package includes the MySQL server binary as well as related utilities to run and administer a MySQL server. @@ -324,13 +374,17 @@ to run and administer a MySQL server. %package server-debug Summary: The debug version of MySQL server Requires: %{name}-server = %{version}-%{release} +%if 0%{?commercial} +Obsoletes: mysql-community-server-debug < %{version}-%{release} %if 0%{?cluster} +Obsoletes: mysql-commercial-server-debug < %{version}-%{release} Obsoletes: mysql-cluster-community-server-debug < %{version}-%{release} %endif # cluster %else %if 0%{?cluster} Obsoletes: mysql-community-server-debug < %{version}-%{release} %endif # cluster +%endif # commercial %description server-debug This packages contains the special debug build of MySQL server. @@ -341,6 +395,10 @@ Summary: MySQL database client applications and tools Group: Applications/Databases Requires: %{name}-libs%{?_isa} >= %{min} Requires: %{name}-client-plugins = %{version}-%{release} +%if 0%{?commercial} +Provides: MySQL-client-advanced%{?_isa} = %{version}-%{release} +Obsoletes: MySQL-client-advanced < %{version}-%{release} +Obsoletes: mysql-community-client < %{version}-%{release} %if 0%{?cluster} Provides: MySQL-Cluster-client-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-Cluster-client-advanced < %{version}-%{release} @@ -372,10 +430,13 @@ This package contains ICU data files needer by MySQL regular expressions. %package common Summary: MySQL database common files for server and client libs Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: mysql-community-common < %{version}-%{release} %if 0%{?cluster} Obsoletes: mysql-commercial-common < %{version}-%{release} Obsoletes: mysql-cluster-community-common < %{version}-%{release} %endif +%endif Provides: mysql-common = %{version}-%{release} Provides: mysql-common%{?_isa} = %{version}-%{release} @@ -419,11 +480,17 @@ Requires: perl(Time::localtime) Requires: %{name}-data-node%{?_isa} >= %{min} Requires: %{name}-management-server%{?_isa} >= %{min} %endif +%if 0%{?commercial} +Provides: MySQL-test-advanced%{?_isa} = %{version}-%{release} +Obsoletes: MySQL-test-advanced < %{version}-%{release} +Obsoletes: mysql-community-test < %{version}-%{release} %if 0%{?cluster} Provides: MySQL-Cluster-test-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-Cluster-test-advanced < %{version}-%{release} +Obsoletes: mysql-commercial-test < %{version}-%{release} Obsoletes: mysql-cluster-community-test < %{version}-%{release} %endif +%endif %if 0%{?cluster} Provides: MySQL-Cluster-test-gpl%{?_isa} = %{version}-%{release} Obsoletes: MySQL-Cluster-test-gpl < %{version}-%{release} @@ -443,11 +510,17 @@ database server. Summary: Development header files and libraries for MySQL database client applications Group: Applications/Databases Requires: %{name}-libs%{?_isa} >= %{min} +%if 0%{?commercial} +Provides: MySQL-devel-advanced%{?_isa} = %{version}-%{release} +Obsoletes: MySQL-devel-advanced < %{version}-%{release} +Obsoletes: mysql-community-devel < %{version}-%{release} %if 0%{?cluster} Provides: MySQL-Cluster-devel-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-Cluster-devel-advanced < %{version}-%{release} +Obsoletes: mysql-commercial-devel < %{version}-%{release} Obsoletes: mysql-cluster-community-devel < %{version}-%{release} %endif +%endif %if 0%{?cluster} Provides: MySQL-Cluster-devel-gpl%{?_isa} = %{version}-%{release} Obsoletes: MySQL-Cluster-devel-gpl < %{version}-%{release} @@ -472,12 +545,17 @@ Summary: Shared libraries for MySQL database client applications Group: Applications/Databases Requires: %{name}-common%{?_isa} >= %{min} Requires: %{name}-client-plugins >= %{version}-%{release} +%if 0%{?commercial} +Provides: MySQL-shared-advanced%{?_isa} = %{version}-%{release} +Obsoletes: MySQL-shared-advanced < %{version}-%{release} +Obsoletes: mysql-community-libs < %{version}-%{release} %if 0%{?cluster} Provides: MySQL-Cluster-shared-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-Cluster-shared-advanced < %{version}-%{release} Obsoletes: MySQL-shared-advanced < %{version}-%{release} Obsoletes: mysql-cluster-community-libs < %{version}-%{release} %endif +%endif %if 0%{?cluster} Provides: MySQL-Cluster-shared-gpl%{?_isa} = %{version}-%{release} Obsoletes: MySQL-Cluster-shared-gpl < %{version}-%{release} @@ -498,6 +576,26 @@ applications. Summary: Shared plugins for MySQL client applications Group: Applications/Databases Provides: mysql-client-plugins = %{version}-%{release} +%if 0%{?commercial} +Conflicts: mysql-commercial-server < 8.0.21 +Conflicts: mysql-commercial-client < 8.0.22 +Obsoletes: mysql-community-client-plugins < %{version}-%{release} +%if 0%{?cluster} +Obsoletes: mysql-commercial-client-plugins < %{version}-%{release} +Conflicts: mysql-cluster-commercial-server < 8.0.21 +Conflicts: mysql-cluster-commercial-client < 8.0.22 +Obsoletes: mysql-community-client-plugins < %{version}-%{release} +Obsoletes: mysql-commercial-client-plugins < %{version}-%{release} +%endif +%else +Conflicts: mysql-community-server < 8.0.21 +Conflicts: mysql-community-client < 8.0.22 +%if 0%{?cluster} +Conflicts: mysql-cluster-community-server < 8.0.21 +Conflicts: mysql-cluster-community-client < 8.0.22 +Obsoletes: mysql-community-client-plugins < %{version}-%{release} +%endif +%endif %description client-plugins This package contains the client-plugins libraries used by MySQL client applications.