diff --git a/boost_1_73_0.tar.gz b/boost_1_73_0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/boost_1_73_0.tar.gz.aa b/boost_1_73_0.tar.gz.aa new file mode 100644 index 0000000000000000000000000000000000000000..8865b3fa69add09a102cccb57224be2041d4395a Binary files /dev/null and b/boost_1_73_0.tar.gz.aa differ diff --git a/boost_1_73_0.tar.gz.ab b/boost_1_73_0.tar.gz.ab new file mode 100644 index 0000000000000000000000000000000000000000..ada818e80681d9a26e5058c57c666483d64095e1 Binary files /dev/null and b/boost_1_73_0.tar.gz.ab differ diff --git a/boost_1_73_0.tar.gz.ac b/boost_1_73_0.tar.gz.ac new file mode 100644 index 0000000000000000000000000000000000000000..28deedc76864bc91cd14f4c7df61a7095f42d69b Binary files /dev/null and b/boost_1_73_0.tar.gz.ac differ diff --git a/filter-provides.sh b/filter-provides.sh new file mode 100755 index 0000000000000000000000000000000000000000..bc166bd82d0f66e6b4801119f502e281b5eaff73 --- /dev/null +++ b/filter-provides.sh @@ -0,0 +1,6 @@ +#! /bin/bash +# + +/usr/lib/rpm/perl.prov $* | +sed -e '/perl(hostnames)/d' -e '/perl(lib::mtr.*/d' -e '/perl(lib::v1.*/d' -e '/perl(mtr_.*/d' -e '/perl(My::.*/d' + diff --git a/filter-requires.sh b/filter-requires.sh new file mode 100755 index 0000000000000000000000000000000000000000..3fdf43870fa526b6b704a91cf1adc9abcfdced04 --- /dev/null +++ b/filter-requires.sh @@ -0,0 +1,6 @@ +#! /bin/bash +# + +/usr/lib/rpm/perl.req $* | +sed -e '/perl(GD)/d' -e '/perl(hostnames)/d' -e '/perl(lib::mtr.*/d' -e '/perl(lib::v1.*/d' -e '/perl(mtr_.*/d' -e '/perl(My::.*/d' + diff --git a/greatsql-8.0.25-15.tar.gz b/greatsql-8.0.25-15.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/greatsql-8.0.25-15.tar.gz.aa b/greatsql-8.0.25-15.tar.gz.aa new file mode 100644 index 0000000000000000000000000000000000000000..e005fed33a40c6f0d17de37398a32b7ee73b60dc Binary files /dev/null and b/greatsql-8.0.25-15.tar.gz.aa differ diff --git a/greatsql-8.0.25-15.tar.gz.ab b/greatsql-8.0.25-15.tar.gz.ab new file mode 100644 index 0000000000000000000000000000000000000000..688e0f269e76f0deb2a3b00a9530692df956caf2 Binary files /dev/null and b/greatsql-8.0.25-15.tar.gz.ab differ diff --git a/greatsql-8.0.25-15.tar.gz.ac b/greatsql-8.0.25-15.tar.gz.ac new file mode 100644 index 0000000000000000000000000000000000000000..3049a24821f87f5afbe68d7e5013cad41ff8090c Binary files /dev/null and b/greatsql-8.0.25-15.tar.gz.ac differ diff --git a/greatsql-8.0.25-15.tar.gz.ad b/greatsql-8.0.25-15.tar.gz.ad new file mode 100644 index 0000000000000000000000000000000000000000..d444c5b2687cc07e0aa0bb6b850e2a411580a1e5 Binary files /dev/null and b/greatsql-8.0.25-15.tar.gz.ad differ diff --git a/greatsql-8.0.25-15.tar.gz.ae b/greatsql-8.0.25-15.tar.gz.ae new file mode 100644 index 0000000000000000000000000000000000000000..8d041453bdd89b257cc05743bd31b952c46f39ce Binary files /dev/null and b/greatsql-8.0.25-15.tar.gz.ae differ diff --git a/greatsql-8.0.25-15.tar.gz.af b/greatsql-8.0.25-15.tar.gz.af new file mode 100644 index 0000000000000000000000000000000000000000..3f7bd510a715975d6523f2e68b2bde3c38eb64ac Binary files /dev/null and b/greatsql-8.0.25-15.tar.gz.af differ diff --git a/greatsql-8.0.25-15.tar.gz.ag b/greatsql-8.0.25-15.tar.gz.ag new file mode 100644 index 0000000000000000000000000000000000000000..c326a19d470528d4a7a776066c820ca46a29dc1e Binary files /dev/null and b/greatsql-8.0.25-15.tar.gz.ag differ diff --git a/greatsql-8.0.25-15.tar.gz.ah b/greatsql-8.0.25-15.tar.gz.ah new file mode 100644 index 0000000000000000000000000000000000000000..908dce0160b1c8d50937ad6cf2e85ef337031417 Binary files /dev/null and b/greatsql-8.0.25-15.tar.gz.ah differ diff --git a/greatsql-8.0.25-15.tar.gz.ai b/greatsql-8.0.25-15.tar.gz.ai new file mode 100644 index 0000000000000000000000000000000000000000..37b386ffe12b311ff1be9cefe04bc5a3ba389fdf Binary files /dev/null and b/greatsql-8.0.25-15.tar.gz.ai differ diff --git a/greatsql-8.0.25-15.tar.gz.aj b/greatsql-8.0.25-15.tar.gz.aj new file mode 100644 index 0000000000000000000000000000000000000000..3ee59851839ba0f628c9062bf8c7143cb6039d57 Binary files /dev/null and b/greatsql-8.0.25-15.tar.gz.aj differ diff --git a/greatsql-8.0.25-15.tar.gz.ak b/greatsql-8.0.25-15.tar.gz.ak new file mode 100644 index 0000000000000000000000000000000000000000..36676d81215a9e8c60d46ab87a414244cc4fa66e Binary files /dev/null and b/greatsql-8.0.25-15.tar.gz.ak differ diff --git a/greatsql.cnf b/greatsql.cnf new file mode 100644 index 0000000000000000000000000000000000000000..4ae3cfe434bfa3473804f6f3942ba3d6285439fa --- /dev/null +++ b/greatsql.cnf @@ -0,0 +1,11 @@ +# +# The GreatSQLconfiguration file. +# +# +# * IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# Please make any edits and changes to the appropriate sectional files +# included below. +# +!includedir /etc/my.cnf.d/ +!includedir /etc/greatsql.conf.d/ diff --git a/greatsql.spec b/greatsql.spec new file mode 100644 index 0000000000000000000000000000000000000000..e4b43c7b602e311676bea8930119cc6588c1ce0f --- /dev/null +++ b/greatsql.spec @@ -0,0 +1,1211 @@ +%undefine _missing_build_ids_terminate_build +%global mysql_vendor Oracle and/or its affiliates +%global greatsql_vendor GreatDB Software Co., Ltd. +%global mysqldatadir /var/lib/mysql + +%global mysql_version 8.0.25 +%global greatsql_version 15 +%global revision c7feae175e0 +%global tokudb_backup_version %{mysql_version}-%{greatsql_version} +%global rpm_release 1 + +%global release %{greatsql_version}.%{rpm_release}%{?dist} + +# By default, a build will be done using the system SSL library +%{?with_ssl: %global ssl_option -DWITH_SSL=%{with_ssl}} +%{!?with_ssl: %global ssl_option -DWITH_SSL=system} + +# By default a build will be done including the TokuDB +%{!?with_tokudb: %global tokudb 0} + +# By default a build will be done including the RocksDB +%{!?with_rocksdb: %global rocksdb 0} + +# Pass path to mecab lib +%{?with_mecab: %global mecab_option -DWITH_MECAB=%{with_mecab}} +%{?with_mecab: %global mecab 1} + +# Regression tests may take a long time, override the default to skip them +%{!?runselftest:%global runselftest 0} + +%global systemd 1 +%{!?with_debuginfo: %global nodebuginfo 0} +%{!?product_suffix: %global product_suffix -80} +%{!?feature_set: %global feature_set community} +%{!?compilation_comment_release: %global compilation_comment_release GreatSQL (GPL), Release %{greatsql_version}, Revision %{revision}} +%{!?compilation_comment_debug: %global compilation_comment_debug GreatSQL - Debug (GPL), Release %{greatsql_version}, Revision %{revision}} +%{!?src_base: %global src_base greatsql} + +# Setup cmake flags for TokuDB +%if 0%{?tokudb} + %global TOKUDB_FLAGS -DWITH_VALGRIND=OFF -DUSE_VALGRIND=OFF -DDEBUG_EXTNAME=OFF -DBUILD_TESTING=OFF -DUSE_GTAGS=OFF -DUSE_CTAGS=OFF -DUSE_ETAGS=OFF -DUSE_CSCOPE=OFF -DTOKUDB_BACKUP_PLUGIN_VERSION=%{tokudb_backup_version} + %global TOKUDB_DEBUG_ON -DTOKU_DEBUG_PARANOID=ON + %global TOKUDB_DEBUG_OFF -DTOKU_DEBUG_PARANOID=OFF +%else + %global TOKUDB_FLAGS -DWITHOUT_TOKUDB=1 + %global TOKUDB_DEBUG_ON %{nil} + %global TOKUDB_DEBUG_OFF %{nil} +%endif + +# Setup cmake flags for RocksDB +%if 0%{?rocksdb} + %global ROCKSDB_FLAGS -DWITH_ROCKSDB=1 +%else + %global ROCKSDB_FLAGS -DWITH_ROCKSDB=0 +%endif + +# On rhel 5/6 we still have renamed library to libperconaserverclient + +%global shared_lib_pri_name mysqlclient +%global shared_lib_sec_name perconaserverclient + +# multiarch +%global multiarchs ppc %{power64} %{ix86} x86_64 %{sparc} %{arm} aarch64 + +%global src_dir %{src_base}-%{mysql_version}-%{greatsql_version} + +# We build debuginfo package so this is not used +%if 0%{?nodebuginfo} +%global _enable_debug_package 0 +%global debug_package %{nil} +%global __os_install_post /usr/lib/rpm/brp-compress %{nil} +%endif + +%global license_files_server %{src_dir}/README +%global license_type GPLv2 + +Name: greatsql +Summary: GreatSQL: Open source database that can be used to replace MySQL or Percona Server, and focuses on improving MGR and InnoDB parallel query. +Group: Applications/Databases +Version: %{mysql_version} +Release: %{release} +License: Copyright (c) 2000, 2018, %{mysql_vendor}. All rights reserved. Under %{?license_type} license as shown in the Description field.. +SOURCE0: greatsql-8.0.25-15.tar.gz +SOURCE101: greatsql-8.0.25-15.tar.gz.aa +SOURCE102: greatsql-8.0.25-15.tar.gz.ab +SOURCE103: greatsql-8.0.25-15.tar.gz.ac +SOURCE104: greatsql-8.0.25-15.tar.gz.ad +SOURCE105: greatsql-8.0.25-15.tar.gz.ae +SOURCE106: greatsql-8.0.25-15.tar.gz.af +SOURCE107: greatsql-8.0.25-15.tar.gz.ag +SOURCE108: greatsql-8.0.25-15.tar.gz.ah +SOURCE109: greatsql-8.0.25-15.tar.gz.ai +SOURCE110: greatsql-8.0.25-15.tar.gz.aj +SOURCE111: greatsql-8.0.25-15.tar.gz.ak +URL: https://gitee.com/GreatSQL/GreatSQL +SOURCE5: mysql_config.sh +SOURCE10: boost_1_73_0.tar.gz +SOURCE201: boost_1_73_0.tar.gz.aa +SOURCE202: boost_1_73_0.tar.gz.ab +SOURCE203: boost_1_73_0.tar.gz.ac +SOURCE90: filter-provides.sh +SOURCE91: filter-requires.sh +Patch0: mysql-5.7-sharedlib-rename.patch +BuildRequires: cmake >= 2.8.2 +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: perl +BuildRequires: perl(Time::HiRes) +BuildRequires: perl(Env) +BuildRequires: perl(Carp) +BuildRequires: perl(Config) +BuildRequires: perl(Cwd) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(English) +BuildRequires: perl(Errno) +BuildRequires: perl(Exporter) +BuildRequires: perl(Fcntl) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(File::Temp) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(IO::File) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IO::Pipe) +BuildRequires: perl(IO::Select) +BuildRequires: perl(IO::Socket) +BuildRequires: perl(IO::Socket::INET) +BuildRequires: perl(JSON) +BuildRequires: perl(Memoize) +BuildRequires: perl(POSIX) +BuildRequires: perl(Sys::Hostname) +BuildRequires: perl(Time::HiRes) +BuildRequires: perl(Time::localtime) +BuildRequires: time +BuildRequires: libaio-devel +BuildRequires: ncurses-devel +BuildRequires: pam-devel +BuildRequires: readline-devel +BuildRequires: numactl-devel +BuildRequires: openssl-devel +BuildRequires: zlib-devel +BuildRequires: bison +BuildRequires: openldap-devel +BuildRequires: libcurl-devel +%if 0%{?systemd} +BuildRequires: systemd +BuildRequires: pkgconfig(systemd) +%endif +BuildRequires: cyrus-sasl-devel +BuildRequires: openldap-devel + +BuildRequires: cmake >= 3.6.1 +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: libtirpc-devel +BuildRequires: rpcgen +BuildRequires: m4 +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +# For rpm => 4.9 only: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering +%global __requires_exclude ^perl\\((GD|hostnames|lib::mtr|lib::v1|mtr_|My::) +%global __provides_exclude_from ^(/usr/share/(mysql|mysql-test)/.*|%{_libdir}/mysql/plugin/.*\\.so)$ + + +%description +GreatSQL focuses on improving the reliability and performance of MGR, supports InnoDB parallel query and other features, and is a domestic MySQL version suitable for financial applications. It can be used as an optional replacement of MySQL or Percona Server. It is completely free and compatible with MySQL or Percona server. + +For a description of GreatSQL see https://gitee.com/GreatSQL/GreatSQL + +%package -n greatsql-server +Summary: GreatSQL: Open source database that can be used to replace MySQL or Percona Server. +Group: Applications/Databases +Requires: coreutils +Requires: grep +Requires: procps +Requires: shadow-utils +Requires: net-tools +Requires(pre): greatsql-shared +Requires: greatsql-client +Requires: openssl +Provides: MySQL-server%{?_isa} = %{version}-%{release} +Provides: mysql-server = %{version}-%{release} +Provides: mysql-server%{?_isa} = %{version}-%{release} +Conflicts: Percona-SQL-server-50 Percona-Server-server-51 Percona-Server-server-55 Percona-Server-server-56 Percona-Server-server-57 + +%if 0%{?systemd} +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +%else +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +%endif + +Obsoletes: mariadb-connector-c-config + +%description -n greatsql-server +GreatSQL focuses on improving the reliability and performance of MGR, supports InnoDB parallel query and other features, and is a domestic MySQL version suitable for financial applications. It can be used as an optional replacement of MySQL or Percona Server. It is completely free and compatible with MySQL or Percona server. + +%package -n greatsql-client +Summary: GreatSQL - Client +Group: Applications/Databases +Requires: greatsql-shared +Provides: mysql-client MySQL-client mysql MySQL +Conflicts: Percona-SQL-client-50 Percona-Server-client-51 Percona-Server-client-55 Percona-Server-client-56 Percona-Server-client-57 + +%description -n greatsql-client +This package contains the standard GreatSQL client and administration tools. + +For a description of GreatSQL see https://gitee.com/GreatSQL/GreatSQL + +%package -n greatsql-test +Summary: Test suite for the GreatSQL +Group: Applications/Databases +Requires: perl(Carp) +Requires: perl(Config) +Requires: perl(Cwd) +Requires: perl(Data::Dumper) +Requires: perl(English) +Requires: perl(Errno) +Requires: perl(Exporter) +Requires: perl(Fcntl) +Requires: perl(File::Basename) +Requires: perl(File::Copy) +Requires: perl(File::Find) +Requires: perl(File::Path) +Requires: perl(File::Spec) +Requires: perl(File::Spec::Functions) +Requires: perl(File::Temp) +Requires: perl(Getopt::Long) +Requires: perl(IO::File) +Requires: perl(IO::Handle) +Requires: perl(IO::Pipe) +Requires: perl(IO::Select) +Requires: perl(IO::Socket) +Requires: perl(IO::Socket::INET) +Requires: perl(JSON) +Requires: perl(Memoize) +Requires: perl(POSIX) +Requires: perl(Sys::Hostname) +Requires: perl(Time::HiRes) +Requires: perl(Time::localtime) +Provides: MySQL-test%{?_isa} = %{version}-%{release} +Obsoletes: MySQL-test < %{version}-%{release} +Obsoletes: mysql-test < %{version}-%{release} +Obsoletes: mariadb-test +Provides: mysql-test = %{version}-%{release} +Provides: mysql-test%{?_isa} = %{version}-%{release} +Conflicts: Percona-SQL-test-50 Percona-Server-test-51 Percona-Server-test-55 Percona-Server-test-56 Percona-Server-test-57 + +%description -n greatsql-test +This package contains the GreatSQL regression test suite. + +For a description of GreatSQL see https://gitee.com/GreatSQL/GreatSQL + +%package -n greatsql-devel +Summary: GreatSQL - Development header files and libraries +Group: Applications/Databases +Provides: mysql-devel = %{version}-%{release} +Provides: mysql-devel%{?_isa} = %{version}-%{release} +Conflicts: Percona-SQL-devel-50 Percona-Server-devel-51 Percona-Server-devel-55 Percona-Server-devel-56 Percona-Server-devel-57 +Obsoletes: mariadb-connector-c-devel +Obsoletes: mariadb-devel + +%description -n greatsql-devel +This package contains the development header files and libraries necessary +to develop GreatSQL client applications. + +For a description of GreatSQL see https://gitee.com/GreatSQL/GreatSQL + +%package -n greatsql-shared +Summary: GreatSQL - Shared libraries +Group: Applications/Databases +Provides: mysql-libs = %{version}-%{release} +Provides: mysql-libs%{?_isa} = %{version}-%{release} +Obsoletes: mysql-libs < %{version}-%{release} +Provides: mysql-shared + +%description -n greatsql-shared +This package contains the shared libraries (*.so*) which certain languages +and applications need to dynamically load and use GreatSQL. + +For a description of GreatSQL see https://gitee.com/GreatSQL/GreatSQL + +%if 0%{?compatlib} +%package -n greatsql-shared-compat +Summary: Shared compat libraries for GreatSQL %{compatver}-%{percona_compatver} database client applications +Group: Applications/Databases + +Provides: mysql-libs-compat = %{version}-%{release} +Provides: mysql-libs-compat%{?_isa} = %{version}-%{release} +Provides: MySQL-shared-compat%{?_isa} = %{version}-%{release} + +Obsoletes: mysql-libs + +Conflicts: Percona-Server-shared-51 +Conflicts: Percona-Server-shared-55 +Conflicts: Percona-Server-shared-55 +Conflicts: Percona-Server-shared-56 +Conflicts: Percona-Server-shared-57 + +%description -n greatsql-shared-compat +This package contains the shared compat libraries for GreatSQL %{compatver}-%{percona_compatver} client +applications. +%endif + +%if 0%{?tokudb} +%package -n greatsql-tokudb +Summary: GreatSQL - TokuDB package +Group: Applications/Databases +Requires: greatsql-server = %{version}-%{release} +Requires: greatsql-shared = %{version}-%{release} +Requires: greatsql-client = %{version}-%{release} +Requires: jemalloc >= 3.3.0 +Provides: tokudb-plugin = %{version}-%{release} + +%description -n greatsql-tokudb +This package contains the TokuDB plugin for GreatSQL %{version}-%{release} +%endif + +%if 0%{?rocksdb} +%package -n greatsql-rocksdb +Summary: GreatSQL - RocksDB package +Group: Applications/Databases +Requires: greatsql-server = %{version}-%{release} +Requires: greatsql-shared = %{version}-%{release} +Requires: greatsql-client = %{version}-%{release} + +%description -n greatsql-rocksdb +This package contains the RocksDB plugin for GreatSQL %{version}-%{release} +%endif + +%package -n greatsql-mysql-router +Summary: GreatSQL MySQL Router +Group: Applications/Databases +Provides: greatsql-mysql-router = %{version}-%{release} +Obsoletes: greatsql-mysql-router < %{version}-%{release} +Provides: mysql-router + +%description -n greatsql-mysql-router +The GreatSQL MySQL Router software delivers a fast, multi-threaded way of +routing connections from GreatSQL Clients to GreatSQL Servers. + +For a description of GreatSQL see https://gitee.com/GreatSQL/GreatSQL + +%package -n greatsql-mysql-router-devel +Summary: Development header files and libraries for GreatSQL MySQL Router +Group: Applications/Databases +Provides: greatsql-mysql-router-devel = %{version}-%{release} +Obsoletes: mysql-router-devel + +%description -n greatsql-mysql-router-devel +This package contains the development header files and libraries +necessary to develop GreatSQL MySQL Router applications. + +For a description of GreatSQL see https://gitee.com/GreatSQL/GreatSQL + +%prep +cat %{SOURCE201} %{SOURCE202} %{SOURCE203} > %{SOURCE10} +cat %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE104} %{SOURCE105} %{SOURCE106} %{SOURCE107} %{SOURCE108} %{SOURCE109} %{SOURCE110} %{SOURCE111} > %{SOURCE0} +%setup -q -T -a 0 -a 10 -c -n %{src_dir} +pushd %{src_dir} +%patch0 -p0 + +%build +# Fail quickly and obviously if user tries to build as root +%if 0%{?runselftest} +if [ "x$(id -u)" = "x0" ] ; then + echo "The MySQL regression tests may fail if run as root." + echo "If you really need to build the RPM as root, use" + echo "--define='runselftest 0' to skip the regression tests." + exit 1 +fi +%endif + +# Build debug versions of mysqld and libmysqld.a +mkdir debug +( + cd debug + # Attempt to remove any optimisation flags from the debug build + optflags=$(echo "%{optflags}" | sed -e 's/-O2 / /' -e 's/-Wp,-D_FORTIFY_SOURCE=2/ -Wno-missing-field-initializers -Wno-error /') + cmake ../%{src_dir} \ + -DBUILD_CONFIG=mysql_release \ + -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=Debug \ + -DWITH_BOOST=.. \ + -DCMAKE_C_FLAGS="$optflags -fcommon" \ + -DCMAKE_CXX_FLAGS="$optflags -fcommon" \ +%if 0%{?systemd} + -DWITH_SYSTEMD=1 \ +%endif + -DWITH_INNODB_MEMCACHED=1 \ + -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DINSTALL_MYSQLSHAREDIR=share/greatsql \ + -DINSTALL_SUPPORTFILESDIR=share/greatsql \ + -DFEATURE_SET="%{feature_set}" \ + -DWITH_PAM=1 \ + -DWITH_ROCKSDB=1 \ + -DROCKSDB_DISABLE_AVX2=1 \ + -DROCKSDB_DISABLE_MARCH_NATIVE=1 \ + -DMYSQL_MAINTAINER_MODE=OFF \ + -DFORCE_INSOURCE_BUILD=1 \ + -DWITH_NUMA=ON \ + -DWITH_LDAP=system \ + -DWITH_PACKAGE_FLAGS=OFF \ + -DWITH_SYSTEM_LIBS=ON \ + -DWITH_PROTOBUF=bundled \ + -DWITH_RAPIDJSON=bundled \ + -DWITH_ICU=bundled \ + -DWITH_LZ4=bundled \ + -DWITH_ZLIB=bundled \ + -DWITH_ZSTD=bundled \ + -DWITH_READLINE=system \ + -DWITH_LIBEVENT=bundled \ + -DWITH_KEYRING_VAULT=ON \ + %{?ssl_option} \ + %{?mecab_option} \ + -DCOMPILATION_COMMENT="%{compilation_comment_debug}" %{TOKUDB_FLAGS} %{TOKUDB_DEBUG_OFF} %{ROCKSDB_FLAGS} + echo BEGIN_DEBUG_CONFIG ; egrep '^#define' include/config.h ; echo END_DEBUG_CONFIG + make %{?_smp_mflags} VERBOSE=1 +) +# Build full release +mkdir release +( + cd release + cmake ../%{src_dir} \ + -DBUILD_CONFIG=mysql_release \ + -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DWITH_BOOST=.. \ + -DCMAKE_C_FLAGS="%{optflags} -fcommon" \ + -DCMAKE_CXX_FLAGS="%{optflags} -fcommon" \ +%if 0%{?systemd} + -DWITH_SYSTEMD=1 \ +%endif + -DWITH_INNODB_MEMCACHED=1 \ + -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DINSTALL_MYSQLSHAREDIR=share/greatsql \ + -DINSTALL_SUPPORTFILESDIR=share/greatsql \ + -DFEATURE_SET="%{feature_set}" \ + -DWITH_PAM=1 \ + -DWITH_ROCKSDB=1 \ + -DROCKSDB_DISABLE_AVX2=1 \ + -DROCKSDB_DISABLE_MARCH_NATIVE=1 \ + -DMYSQL_MAINTAINER_MODE=OFF \ + -DFORCE_INSOURCE_BUILD=1 \ + -DWITH_NUMA=ON \ + -DWITH_LDAP=system \ + -DWITH_PACKAGE_FLAGS=OFF \ + -DWITH_SYSTEM_LIBS=ON \ + -DWITH_LZ4=bundled \ + -DWITH_ZLIB=bundled \ + -DWITH_PROTOBUF=bundled \ + -DWITH_RAPIDJSON=bundled \ + -DWITH_ICU=bundled \ + -DWITH_READLINE=system \ + -DWITH_LIBEVENT=bundled \ + -DWITH_ZSTD=bundled \ + -DWITH_KEYRING_VAULT=ON \ + %{?ssl_option} \ + %{?mecab_option} \ + -DCOMPILATION_COMMENT="%{compilation_comment_release}" %{TOKUDB_FLAGS} %{TOKUDB_DEBUG_OFF} %{ROCKSDB_FLAGS} + echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG + make %{?_smp_mflags} VERBOSE=1 +) + +%install +MBD=$RPM_BUILD_DIR/%{src_dir} + +# Ensure that needed directories exists +install -d -m 0751 %{buildroot}/var/lib/mysql +install -d -m 0755 %{buildroot}/var/run/mysqld +install -d -m 0750 %{buildroot}/var/lib/mysql-files +install -d -m 0750 %{buildroot}/var/lib/mysql-keyring + +# Router directories +install -d -m 0755 %{buildroot}/var/log/mysqlrouter +install -d -m 0755 %{buildroot}/var/run/mysqlrouter + +# Install all binaries +cd $MBD/release +make DESTDIR=%{buildroot} install + +# Install logrotate and autostart +#install -D -m 0644 packaging/rpm-common/mysql.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/mysql +#investigate this logrotate +install -D -m 0644 $MBD/release/support-files/mysql-log-rotate %{buildroot}%{_sysconfdir}/logrotate.d/mysql +install -D -m 0644 $MBD/%{src_dir}/build-ps/rpm/mysqld.cnf %{buildroot}%{_sysconfdir}/my.cnf +install -d %{buildroot}%{_sysconfdir}/my.cnf.d + + +# Add libdir to linker +install -d -m 0755 %{buildroot}%{_sysconfdir}/ld.so.conf.d +echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf + +# multiarch support +%ifarch %{multiarchs} + mv %{buildroot}/%{_bindir}/mysql_config %{buildroot}/%{_bindir}/mysql_config-%{__isa_bits} + install -p -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/mysql_config +%endif + +%if 0%{?systemd} +%else +install -D -p -m 0755 packaging/rpm-common/mysqlrouter.init %{buildroot}%{_sysconfdir}/init.d/mysqlrouter +%endif +install -D -p -m 0644 packaging/rpm-common/mysqlrouter.conf %{buildroot}%{_sysconfdir}/mysqlrouter/mysqlrouter.conf + +# Remove files pages we explicitly do not want to package +rm -rf %{buildroot}%{_infodir}/mysql.info* +rm -rf %{buildroot}%{_datadir}/greatsql/mysql.server +rm -rf %{buildroot}%{_datadir}/greatsql/mysqld_multi.server +rm -f %{buildroot}%{_datadir}/greatsql/win_install_firewall.sql +rm -rf %{buildroot}%{_bindir}/mysql_embedded +rm -rf %{buildroot}/usr/cmake/coredumper-relwithdebinfo.cmake +rm -rf %{buildroot}/usr/cmake/coredumper.cmake +%if 0%{?tokudb} + rm -f %{buildroot}%{_prefix}/README.md + rm -f %{buildroot}%{_prefix}/COPYING.AGPLv3 + rm -f %{buildroot}%{_prefix}/COPYING.GPLv2 + rm -f %{buildroot}%{_prefix}/PATENTS +%endif + +# Remove upcoming man pages, to avoid breakage when they materialize +# Keep this comment as a placeholder for future cases +# rm -f %{buildroot}%{_mandir}/man1/.1 + +# Remove removed manpages here until they are removed from the docs repo + +%check +%if 0%{?runselftest} + pushd release + make test VERBOSE=1 + export MTR_BUILD_THREAD=auto + pushd mysql-test + ./mtr \ + --mem --parallel=auto --force --retry=0 \ + --mysqld=--binlog-format=mixed \ + --suite-timeout=720 --testcase-timeout=30 \ + --clean-vardir + rm -r $(readlink var) var +%endif + +%pretrans -n greatsql-server +if [ -d %{_datadir}/mysql ] && [ ! -L %{_datadir}/mysql ]; then + MYCNF_PACKAGE=$(rpm -qf /usr/share/mysql --queryformat "%{NAME}") +fi + +if [ "$MYCNF_PACKAGE" == "mariadb-libs" -o "$MYCNF_PACKAGE" == "mysql-libs" ]; then + MODIFIED=$(rpm -Va "$MYCNF_PACKAGE" | grep '/usr/share/mysql' | awk '{print $1}' | grep -c 5) + if [ "$MODIFIED" == 1 ]; then + cp -r %{_datadir}/mysql %{_datadir}/mysql.old + fi +fi + +%pre -n greatsql-server +/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || : +/usr/sbin/useradd -M %{!?el5:-N} -g mysql -o -r -d /var/lib/mysql -s /bin/false \ + -c "GreatSQL" -u 27 mysql >/dev/null 2>&1 || : +if [ "$1" = 1 ]; then + if [ -f %{_sysconfdir}/my.cnf ]; then + timestamp=$(date '+%Y%m%d-%H%M') + cp %{_sysconfdir}/my.cnf \ + %{_sysconfdir}/my.cnf.rpmsave-${timestamp} + fi +fi + +%post -n greatsql-server +datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p' | tail -n 1) +/bin/chmod 0751 "$datadir" >/dev/null 2>&1 || : +if [ ! -e /var/log/mysqld.log ]; then + /usr/bin/install -m0640 -omysql -gmysql /dev/null /var/log/mysqld.log +fi +#/bin/touch /var/log/mysqld.log >/dev/null 2>&1 || : +%if 0%{?systemd} + %systemd_post mysqld.service + if [ $1 == 1 ]; then + /usr/bin/systemctl enable mysqld >/dev/null 2>&1 || : + fi +%else + if [ $1 == 1 ]; then + /sbin/chkconfig --add mysql + fi +%endif + +if [ -d /etc/greatsql.conf.d ]; then + CONF_EXISTS=$(grep "greatsql.conf.d" /etc/my.cnf | wc -l) + if [ ${CONF_EXISTS} = 0 ]; then + echo "!includedir /etc/greatsql.conf.d/" >> /etc/my.cnf + fi +fi +echo "slow_query_log = ON" >> /etc/my.cnf +echo "long_query_time = 1" >> /etc/my.cnf +echo "log_slow_verbosity = FULL" >> /etc/my.cnf +echo "log_error_verbosity = 3" >> /etc/my.cnf +echo "innodb_buffer_pool_size = 1G" >> /etc/my.cnf +echo "innodb_log_file_size = 128M" >> /etc/my.cnf + +%preun -n greatsql-server +%if 0%{?systemd} + %systemd_preun mysqld.service +%else + if [ "$1" = 0 ]; then + /sbin/service mysql stop >/dev/null 2>&1 || : + /sbin/chkconfig --del mysql + fi +%endif +if [ "$1" = 0 ]; then + if [ -L %{_datadir}/mysql ]; then + rm %{_datadir}/mysql + fi + if [ -f %{_sysconfdir}/my.cnf ]; then + cp %{_sysconfdir}/my.cnf \ + %{_sysconfdir}/my.cnf.rpmsave + fi +fi + +%postun -n greatsql-server +%if 0%{?systemd} + %systemd_postun_with_restart mysqld.service +%else + if [ $1 -ge 1 ]; then + /sbin/service mysql condrestart >/dev/null 2>&1 || : + fi +%endif + +%posttrans -n greatsql-server +if [ -d %{_datadir}/mysql ] && [ ! -L %{_datadir}/mysql ]; then + MYCNF_PACKAGE=$(rpm -qf /usr/share/mysql --queryformat "%{NAME}") + if [ "$MYCNF_PACKAGE" == "file %{_datadir}/mysql is not owned by any package" ]; then + mv %{_datadir}/mysql %{_datadir}/mysql.old + fi +fi + +if [ ! -d %{_datadir}/mysql ] && [ ! -L %{_datadir}/mysql ]; then + ln -s %{_datadir}/greatsql %{_datadir}/mysql +fi + +%post -n greatsql-shared -p /sbin/ldconfig + +%postun -n greatsql-shared -p /sbin/ldconfig + +%if 0%{?tokudb} +%post -n greatsql-tokudb +if [ $1 -eq 1 ] ; then + echo -e "\n\n * This release of GreatSQL is distributed with TokuDB storage engine." + echo -e " * Run the following script to enable the TokuDB storage engine in Percona Server:\n" + echo -e "\tps-admin --enable-tokudb -u -p[mysql_admin_pass] [-S ] [-h -P ]\n" + echo -e " * See http://www.percona.com/doc/percona-server/8.0/tokudb/tokudb_installation.html for more installation details\n" + echo -e " * See http://www.percona.com/doc/percona-server/8.0/tokudb/tokudb_intro.html for an introduction to TokuDB\n\n" +fi +%endif + +%if 0%{?rocksdb} +%post -n greatsql-rocksdb +if [ $1 -eq 1 ] ; then + echo -e "\n\n * This release of GreatSQL is distributed with RocksDB storage engine." + echo -e " * Run the following script to enable the RocksDB storage engine in GreatSQL:\n" + echo -e "\tps-admin --enable-rocksdb -u -p[mysql_admin_pass] [-S ] [-h -P ]\n" +fi +%endif + +%pre -n greatsql-mysql-router +/usr/sbin/groupadd -r mysqlrouter >/dev/null 2>&1 || : +/usr/sbin/useradd -M -N -g mysqlrouter -r -d /var/lib/mysqlrouter -s /bin/false \ + -c "GreatSQL MySQL Router" mysqlrouter >/dev/null 2>&1 || : + +%post -n greatsql-mysql-router +/sbin/ldconfig +%if 0%{?systemd} +%systemd_post mysqlrouter.service +%else +/sbin/chkconfig --add mysqlrouter +%endif # systemd + +%preun -n greatsql-mysql-router +%if 0%{?systemd} +%systemd_preun mysqlrouter.service +%else +if [ "$1" = 0 ]; then + /sbin/service mysqlrouter stop >/dev/null 2>&1 || : + /sbin/chkconfig --del mysqlrouter +fi +%endif # systemd + +%postun -n greatsql-mysql-router +/sbin/ldconfig +%if 0%{?systemd} +%systemd_postun_with_restart mysqlrouter.service +%else +if [ $1 -ge 1 ]; then + /sbin/service mysqlrouter condrestart >/dev/null 2>&1 || : +fi +%endif # systemd + + +%files -n greatsql-server +%defattr(-, root, root, -) +%doc %{?license_files_server} +%doc %{src_dir}/Docs/INFO_SRC* +%doc release/Docs/INFO_BIN* +%attr(644, root, root) %{_mandir}/man1/innochecksum.1* +%attr(644, root, root) %{_mandir}/man1/ibd2sdi.1* +%attr(644, root, root) %{_mandir}/man1/my_print_defaults.1* +%attr(644, root, root) %{_mandir}/man1/myisam_ftdump.1* +%attr(644, root, root) %{_mandir}/man1/myisamchk.1* +%attr(644, root, root) %{_mandir}/man1/myisamlog.1* +%attr(644, root, root) %{_mandir}/man1/myisampack.1* +%attr(644, root, root) %{_mandir}/man8/mysqld.8* +%if 0%{?systemd} +%else +%attr(644, root, root) %{_mandir}/man1/mysqld_multi.1* +%attr(644, root, root) %{_mandir}/man1/mysqld_safe.1* +%endif +%attr(644, root, root) %{_mandir}/man1/mysqldumpslow.1* +%attr(644, root, root) %{_mandir}/man1/mysql_secure_installation.1* +%attr(644, root, root) %{_mandir}/man1/mysql_upgrade.1* +%attr(644, root, root) %{_mandir}/man1/mysqlman.1* +%attr(644, root, root) %{_mandir}/man1/mysql_tzinfo_to_sql.1* +%attr(644, root, root) %{_mandir}/man1/perror.1* +%attr(644, root, root) %{_mandir}/man1/mysql_ssl_rsa_setup.1* +%attr(644, root, root) %{_mandir}/man1/lz4_decompress.1* +%attr(644, root, root) %{_mandir}/man1/zlib_decompress.1* + + +%config(noreplace) %{_sysconfdir}/my.cnf +%dir %{_sysconfdir}/my.cnf.d + +%attr(755, root, root) %{_bindir}/comp_err +%attr(755, root, root) %{_bindir}/innochecksum +%attr(755, root, root) %{_bindir}/ibd2sdi +%attr(755, root, root) %{_bindir}/my_print_defaults +%attr(755, root, root) %{_bindir}/myisam_ftdump +%attr(755, root, root) %{_bindir}/myisamchk +%attr(755, root, root) %{_bindir}/myisamlog +%attr(755, root, root) %{_bindir}/myisampack +%attr(755, root, root) %{_bindir}/mysql_secure_installation +%attr(755, root, root) %{_bindir}/mysql_tzinfo_to_sql +%attr(755, root, root) %{_bindir}/mysql_upgrade +%attr(755, root, root) %{_bindir}/mysqldumpslow +%attr(755, root, root) %{_bindir}/ps_mysqld_helper +%attr(755, root, root) %{_bindir}/perror +%attr(755, root, root) %{_bindir}/mysql_ssl_rsa_setup +%attr(755, root, root) %{_bindir}/lz4_decompress +%attr(755, root, root) %{_bindir}/zlib_decompress +%attr(755, root, root) %{_bindir}/ps-admin +%if 0%{?systemd} +%attr(755, root, root) %{_bindir}/mysqld_pre_systemd +%attr(755, root, root) %{_bindir}/mysqld_safe +%else +%attr(755, root, root) %{_bindir}/mysqld_multi +%attr(755, root, root) %{_bindir}/mysqld_safe +%endif +%attr(755, root, root) %{_sbindir}/mysqld +%attr(755, root, root) %{_sbindir}/mysqld-debug +%dir %{_libdir}/mysql/private +%attr(755, root, root) %{_libdir}/mysql/private/libprotobuf-lite.so.* +%attr(755, root, root) %{_libdir}/mysql/private/libprotobuf.so.* + +%dir %{_libdir}/mysql/plugin +%attr(755, root, root) %{_libdir}/mysql/plugin/adt_null.so +%attr(755, root, root) %{_libdir}/mysql/plugin/auth_socket.so +%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_ldap_sasl_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/group_replication.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_log_sink_syseventlog.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_log_sink_json.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_log_filter_dragnet.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_mysqlbackup.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_validate_password.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_audit_api_message_emit.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_query_attributes.so +%attr(755, root, root) %{_libdir}/mysql/plugin/connection_control.so +%attr(755, root, root) %{_libdir}/mysql/plugin/ddl_rewriter.so +%attr(755, root, root) %{_libdir}/mysql/plugin/ha_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/ha_mock.so +%attr(755, root, root) %{_libdir}/mysql/plugin/keyring_file.so +%attr(755, root, root) %{_libdir}/mysql/plugin/keyring_udf.so +%attr(755, root, root) %{_libdir}/mysql/plugin/innodb_engine.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libmemcached.so +%attr(755, root, root) %{_libdir}/mysql/plugin/locking_service.so +%attr(755, root, root) %{_libdir}/mysql/plugin/mypluglib.so +%attr(755, root, root) %{_libdir}/mysql/plugin/mysql_clone.so +%attr(755, root, root) %{_libdir}/mysql/plugin/mysql_no_login.so +%attr(755, root, root) %{_libdir}/mysql/plugin/rewrite_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/rewriter.so +%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_master.so +%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_slave.so +%attr(755, root, root) %{_libdir}/mysql/plugin/validate_password.so +%attr(755, root, root) %{_libdir}/mysql/plugin/version_token.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_keyring_file.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_audit_api_message.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_host_application_signal.so +%attr(755, root, root) %{_libdir}/mysql/plugin/test_services_host_application_signal.so +%attr(755, root, root) %{_libdir}/mysql/plugin/data_masking* +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_udf_services.so +%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_ldap_simple.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_component_deinit.so +%attr(755, root, root) %{_libdir}/mysql/plugin/binlog_utils_udf.so +%attr(755, root, root) %{_libdir}/mysql/plugin/test_udf_wrappers.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_reference_cache.so + +%dir %{_libdir}/mysql/plugin/debug +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/data_masking.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/adt_null.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_socket.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/authentication_ldap_simple.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/authentication_ldap_sasl_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/group_replication.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_log_sink_syseventlog.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_log_sink_json.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_log_filter_dragnet.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_mysqlbackup.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_validate_password.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_audit_api_message_emit.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_query_attributes.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/connection_control.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/ddl_rewriter.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/ha_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/ha_mock.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/keyring_file.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/keyring_udf.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/innodb_engine.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libmemcached.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/locking_service.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/mypluglib.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/mysql_clone.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/mysql_no_login.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/rewrite_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/rewriter.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/semisync_master.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/semisync_slave.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/validate_password.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/version_token.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_keyring_file.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_audit_api_message.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_host_application_signal.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/test_services_host_application_signal.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_udf_services.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_component_deinit.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/binlog_utils_udf.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/test_udf_wrappers.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_reference_cache.so +%if 0%{?mecab} +%{_libdir}/mysql/mecab +%attr(755, root, root) %{_libdir}/mysql/plugin/libpluginmecab.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libpluginmecab.so +%endif +# Percona plugins +%attr(755, root, root) %{_libdir}/mysql/plugin/audit_log.so +#%attr(644, root, root) %{_datadir}/mysql-*/audit_log_filter_linux_install.sql +#%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_pam.so +#%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_ldap_sasl.so +#%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_ldap_simple.so +#%attr(755, root, root) %{_libdir}/mysql/plugin/keyring_okv.so +#%attr(755, root, root) %{_libdir}/mysql/plugin/keyring_encrypted_file.so +#%attr(755, root, root) %{_libdir}/mysql/plugin/mysql_clone.so +#%attr(755, root, root) %{_libdir}/mysql/plugin/thread_pool.so +#%attr(755, root, root) %{_libdir}/mysql/plugin/openssl_udf.so +#%attr(755, root, root) %{_libdir}/mysql/plugin/firewall.so +#%attr(644, root, root) %{_datadir}/mysql-*/linux_install_firewall.sql +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/audit_log.so +#%attr(755, root, root) %{_libdir}/mysql/plugin/scalability_metrics.so +#%attr(755, root, root) %{_libdir}/mysql/plugin/debug/scalability_metrics.so +%attr(755, root, root) %{_libdir}/mysql/plugin/auth_pam.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_pam.so +%attr(755, root, root) %{_libdir}/mysql/plugin/auth_pam_compat.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_pam_compat.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libfnv1a_udf.* +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libfnv1a_udf.* +%attr(755, root, root) %{_libdir}/mysql/plugin/libfnv_udf.* +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libfnv_udf.* +%attr(755, root, root) %{_libdir}/mysql/plugin/libmurmur_udf.* +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libmurmur_udf.* +%attr(755, root, root) %{_libdir}/mysql/plugin/dialog.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/dialog.so +%attr(755, root, root) %{_libdir}/mysql/plugin/auth.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth.so +#%attr(755, root, root) %{_libdir}/mysql/plugin/query_response_time.so +#%attr(755, root, root) %{_libdir}/mysql/plugin/debug/query_response_time.so +%attr(755, root, root) %{_libdir}/mysql/plugin/keyring_vault.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/keyring_vault.so +%attr(755, root, root) %{_libdir}/mysql/plugin/procfs.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/procfs.so +# +#%attr(644, root, root) %{_datadir}/greatsql/fill_help_tables.sql +#%attr(644, root, root) %{_datadir}/greatsql/mysql_sys_schema.sql +#%attr(644, root, root) %{_datadir}/greatsql/mysql_system_tables.sql +#%attr(644, root, root) %{_datadir}/greatsql/mysql_system_tables_data.sql +#%attr(644, root, root) %{_datadir}/greatsql/mysql_test_data_timezone.sql +%attr(644, root, root) %{_datadir}/greatsql/mysql-log-rotate +#%attr(644, root, root) %{_datadir}/greatsql/mysql_security_commands.sql +%attr(644, root, root) %{_datadir}/greatsql/dictionary.txt +%attr(644, root, root) %{_datadir}/greatsql/innodb_memcached_config.sql +%attr(644, root, root) %{_datadir}/greatsql/install_rewriter.sql +%attr(644, root, root) %{_datadir}/greatsql/uninstall_rewriter.sql +%if 0%{?systemd} +%attr(644, root, root) %{_unitdir}/mysqld.service +%attr(644, root, root) %{_unitdir}/mysqld@.service +%attr(644, root, root) %{_prefix}/lib/tmpfiles.d/mysql.conf +%else +%attr(755, root, root) %{_sysconfdir}/init.d/mysql +%endif +%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql +%dir %attr(751, mysql, mysql) /var/lib/mysql +%dir %attr(755, mysql, mysql) /var/run/mysqld +%dir %attr(750, mysql, mysql) /var/lib/mysql-files +%dir %attr(750, mysql, mysql) /var/lib/mysql-keyring + +%attr(755, root, root) %{_datadir}/greatsql/messages_to_clients.txt +%attr(755, root, root) %{_datadir}/greatsql/messages_to_error_log.txt +%attr(755, root, root) %{_datadir}/greatsql/charsets/ +%attr(755, root, root) %{_datadir}/greatsql/bulgarian/ +%attr(755, root, root) %{_datadir}/greatsql/czech/ +%attr(755, root, root) %{_datadir}/greatsql/danish/ +%attr(755, root, root) %{_datadir}/greatsql/dutch/ +%attr(755, root, root) %{_datadir}/greatsql/english/ +%attr(755, root, root) %{_datadir}/greatsql/estonian/ +%attr(755, root, root) %{_datadir}/greatsql/french/ +%attr(755, root, root) %{_datadir}/greatsql/german/ +%attr(755, root, root) %{_datadir}/greatsql/greek/ +%attr(755, root, root) %{_datadir}/greatsql/hungarian/ +%attr(755, root, root) %{_datadir}/greatsql/italian/ +%attr(755, root, root) %{_datadir}/greatsql/japanese/ +%attr(755, root, root) %{_datadir}/greatsql/korean/ +%attr(755, root, root) %{_datadir}/greatsql/norwegian-ny/ +%attr(755, root, root) %{_datadir}/greatsql/norwegian/ +%attr(755, root, root) %{_datadir}/greatsql/polish/ +%attr(755, root, root) %{_datadir}/greatsql/portuguese/ +%attr(755, root, root) %{_datadir}/greatsql/romanian/ +%attr(755, root, root) %{_datadir}/greatsql/russian/ +%attr(755, root, root) %{_datadir}/greatsql/serbian/ +%attr(755, root, root) %{_datadir}/greatsql/slovak/ +%attr(755, root, root) %{_datadir}/greatsql/spanish/ +%attr(755, root, root) %{_datadir}/greatsql/swedish/ +%attr(755, root, root) %{_datadir}/greatsql/ukrainian/ +#%attr(755, root, root) %{_datadir}/greatsql/mysql_system_users.sql + +%files -n greatsql-client +%defattr(-, root, root, -) +%doc %{?license_files_server} +%attr(755, root, root) %{_bindir}/mysql +%attr(755, root, root) %{_bindir}/mysqladmin +%attr(755, root, root) %{_bindir}/mysqlbinlog +%attr(755, root, root) %{_bindir}/mysqlcheck +%attr(755, root, root) %{_bindir}/mysqldump +%attr(755, root, root) %{_bindir}/mysqlimport +%attr(755, root, root) %{_bindir}/mysqlpump +%attr(755, root, root) %{_bindir}/mysqlshow +%attr(755, root, root) %{_bindir}/mysqlslap +%attr(755, root, root) %{_bindir}/mysql_config_editor +%attr(755, root, root) %{_bindir}/mysql_migrate_keyring + +%attr(644, root, root) %{_mandir}/man1/mysql.1* +%attr(644, root, root) %{_mandir}/man1/mysqladmin.1* +%attr(644, root, root) %{_mandir}/man1/mysqlbinlog.1* +%attr(644, root, root) %{_mandir}/man1/mysqlcheck.1* +%attr(644, root, root) %{_mandir}/man1/mysqldump.1* +%attr(644, root, root) %{_mandir}/man1/mysqlpump.1* +%attr(644, root, root) %{_mandir}/man1/mysqlimport.1* +%attr(644, root, root) %{_mandir}/man1/mysqlshow.1* +%attr(644, root, root) %{_mandir}/man1/mysqlslap.1* +%attr(644, root, root) %{_mandir}/man1/mysql_config_editor.1* + +%files -n greatsql-devel +%defattr(-, root, root, -) +%doc %{?license_files_server} +%attr(644, root, root) %{_mandir}/man1/comp_err.1* +%attr(644, root, root) %{_mandir}/man1/mysql_config.1* +%attr(755, root, root) %{_bindir}/mysql_config +%attr(755, root, root) %{_bindir}/mysql_config-%{__isa_bits} +%{_includedir}/mysql +%{_datadir}/aclocal/mysql.m4 +%{_libdir}/mysql/lib%{shared_lib_pri_name}.a +%{_libdir}/mysql/libmysqlservices.a +%{_libdir}/mysql/lib%{shared_lib_pri_name}.so +%{_libdir}/pkgconfig/%{shared_lib_pri_name}.pc + +%files -n greatsql-shared +%defattr(-, root, root, -) +%doc %{?license_files_server} +%dir %attr(755, root, root) %{_libdir}/mysql +%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf +%{_libdir}/mysql/lib%{shared_lib_pri_name}.so.21* +#coredumper +%attr(755, root, root) %{_includedir}/coredumper/coredumper.h +%attr(755, root, root) /usr/lib/libcoredumper.a + +%files -n greatsql-test +%defattr(-, root, root, -) +%doc %{?license_files_server} +%attr(-, root, root) %{_datadir}/mysql-test +%attr(755, root, root) %{_bindir}/mysql_client_test +%attr(755, root, root) %{_bindir}/mysqltest +%attr(755, root, root) %{_bindir}/mysqltest_safe_process +%attr(755, root, root) %{_bindir}/mysqlxtest +%attr(755, root, root) %{_bindir}/mysql_keyring_encryption_test + +%attr(755, root, root) %{_libdir}/mysql/plugin/auth.so +%attr(755, root, root) %{_libdir}/mysql/plugin/auth_test_plugin.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_example_component1.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_example_component2.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_example_component3.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_log_sink_test.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_backup_lock_service.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_string_service_charset.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_string_service_long.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_string_service.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_pfs_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_pfs_example_component_population.so +%attr(755, root, root) %{_libdir}/mysql/plugin/pfs_example_plugin_employee.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_pfs_notification.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_pfs_resource_group.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_udf_registration.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_mysql_current_thread_reader.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_udf_reg_3_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_udf_reg_avg_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_udf_reg_int_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_udf_reg_int_same_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_udf_reg_only_3_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_udf_reg_real_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_udf_unreg_3_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_udf_unreg_int_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_udf_unreg_real_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_sys_var_service_int.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_sys_var_service.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_sys_var_service_same.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_sys_var_service_str.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_status_var_service.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_status_var_service_int.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_status_var_service_reg_only.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_status_var_service_str.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_status_var_service_unreg_only.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_system_variable_source.so +%attr(644, root, root) %{_libdir}/mysql/plugin/daemon_example.ini +%attr(755, root, root) %{_libdir}/mysql/plugin/libdaemon_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/replication_observers_example_plugin.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_framework.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_services.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_services_threaded.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_session_detach.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_session_attach.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_session_in_thd.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_session_info.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_2_sessions.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_all_col_types.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_cmds_1.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_commit.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_complex.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_errors.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_lock.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_processlist.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_replication.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_shutdown.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_sleep_is_connected.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_stmt.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_sqlmode.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_stored_procedures_functions.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_views_triggers.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_x_sessions_deinit.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_x_sessions_init.so +%attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_interface.so +%attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_server.so +%attr(755, root, root) %{_libdir}/mysql/plugin/test_security_context.so +%attr(755, root, root) %{_libdir}/mysql/plugin/test_services_plugin_registry.so +%attr(755, root, root) %{_libdir}/mysql/plugin/test_udf_services.so +%attr(755, root, root) %{_libdir}/mysql/plugin/udf_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_mysqlx_global_reset.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_mysql_runtime_error.so +%attr(755, root, root) %{_libdir}/mysql/plugin/libtest_sql_reset_connection.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_mysql_runtime_error.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_reset_connection.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_test_plugin.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_example_component1.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_example_component2.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_example_component3.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_log_sink_test.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_backup_lock_service.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_string_service_charset.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_string_service_long.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_string_service.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_pfs_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_pfs_example_component_population.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/pfs_example_plugin_employee.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_pfs_notification.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_pfs_resource_group.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_udf_registration.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_mysql_current_thread_reader.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_udf_reg_3_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_udf_reg_avg_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_udf_reg_int_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_udf_reg_int_same_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_udf_reg_only_3_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_udf_reg_real_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_udf_unreg_3_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_udf_unreg_int_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_udf_unreg_real_func.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_sys_var_service_int.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_sys_var_service.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_sys_var_service_same.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_sys_var_service_str.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_status_var_service.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_status_var_service_int.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_status_var_service_reg_only.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_status_var_service_str.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_status_var_service_unreg_only.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_system_variable_source.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libdaemon_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/replication_observers_example_plugin.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_framework.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_services.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_services_threaded.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_session_detach.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_session_attach.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_session_in_thd.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_session_info.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_2_sessions.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_all_col_types.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_cmds_1.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_commit.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_complex.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_errors.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_lock.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_processlist.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_replication.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_shutdown.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_sleep_is_connected.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_stmt.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_sqlmode.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_stored_procedures_functions.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_sql_views_triggers.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_x_sessions_deinit.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libtest_x_sessions_init.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_interface.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_server.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/test_security_context.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/test_services_plugin_registry.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/test_udf_services.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/udf_example.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_mysqlx_global_reset.so + +%if 0%{?tokudb} +%files -n greatsql-tokudb +%attr(-, root, root) +%{_bindir}/tokuftdump +%{_libdir}/mysql/plugin/ha_tokudb.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/ha_tokudb.so +%attr(755, root, root) %{_bindir}/tokuft_logprint +%attr(755, root, root) %{_libdir}/mysql/plugin/tokudb_backup.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/tokudb_backup.so +%attr(755, root, root) %{_libdir}/mysql/libHotBackup.so +%{_includedir}/backup.h +%endif + +%if 0%{?rocksdb} +%files -n greatsql-rocksdb +%attr(-, root, root) +%{_libdir}/mysql/plugin/ha_rocksdb.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/ha_rocksdb.so +%attr(755, root, root) %{_bindir}/ldb +%attr(755, root, root) %{_bindir}/mysql_ldb +%attr(755, root, root) %{_bindir}/sst_dump +%endif + +%files -n greatsql-mysql-router +%defattr(-, root, root, -) +%doc %{src_dir}/router/README.router %{src_dir}/router/LICENSE.router +%dir %{_sysconfdir}/mysqlrouter +%config(noreplace) %{_sysconfdir}/mysqlrouter/mysqlrouter.conf +%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysqlrouter +%{_bindir}/mysqlrouter +%{_bindir}/mysqlrouter_keyring +%{_bindir}/mysqlrouter_passwd +%{_bindir}/mysqlrouter_plugin_info +%attr(644, root, root) %{_mandir}/man1/mysqlrouter.1* +%attr(644, root, root) %{_mandir}/man1/mysqlrouter_passwd.1* +%attr(644, root, root) %{_mandir}/man1/mysqlrouter_plugin_info.1* +%if 0%{?systemd} +%{_unitdir}/mysqlrouter.service +%{_tmpfilesdir}/mysqlrouter.conf +%else +%{_sysconfdir}/init.d/mysqlrouter +%endif +%{_libdir}/mysqlrouter/private/libmysqlharness.so.* +%{_libdir}/mysqlrouter/private/libmysqlharness_stdx.so.* +%{_libdir}/mysqlrouter/private/libmysqlharness_tls.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_http.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_http_auth_backend.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_http_auth_realm.so.* +%{_libdir}/mysqlrouter/private/libprotobuf-lite.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_io_component.so.1 +%dir %{_libdir}/mysqlrouter +%dir %{_libdir}/mysqlrouter/private +%{_libdir}/mysqlrouter/*.so +%dir %attr(755, mysqlrouter, mysqlrouter) /var/log/mysqlrouter +%dir %attr(755, mysqlrouter, mysqlrouter) /var/run/mysqlrouter + +%changelog +* Mon Apr 25 2022 GreatSQL - 8.0.25-15 +- Release GreatSQL-8.0.25-15 for openEuler diff --git a/mysql-5.7-sharedlib-rename.patch b/mysql-5.7-sharedlib-rename.patch new file mode 100644 index 0000000000000000000000000000000000000000..0c33fd58a3023a6f76de09c0654f5ed0ffda256d --- /dev/null +++ b/mysql-5.7-sharedlib-rename.patch @@ -0,0 +1,478 @@ +--- client/base/CMakeLists.txt 2018-08-18 03:29:34.986169793 -0400 ++++ client/base/CMakeLists.txt 2018-08-18 03:29:34.991586542 -0400 +@@ -46,4 +46,4 @@ + ${CMAKE_SOURCE_DIR}/sql-common/sql_string.cc + ) + +-TARGET_LINK_LIBRARIES(client_base perconaserverclient) ++TARGET_LINK_LIBRARIES(client_base mysqlclient) +--- client/CMakeLists.txt 2018-08-18 03:29:59.708213642 -0400 ++++ client/CMakeLists.txt 2018-08-18 03:29:59.712547041 -0400 +@@ -40,13 +40,13 @@ MYSQL_ADD_EXECUTABLE(mysql + pattern_matcher.cc + readline.cc + client_query_attributes.cc +- LINK_LIBRARIES perconaserverclient client_base ${MY_READLINE_LIBRARY} ++ LINK_LIBRARIES mysqlclient client_base ${MY_READLINE_LIBRARY} + ) + + IF(NOT WITHOUT_SERVER) + MYSQL_ADD_EXECUTABLE(mysql_upgrade + upgrade/program.cc +- LINK_LIBRARIES perconaserverclient client_base ++ LINK_LIBRARIES mysqlclient client_base + ) + ENDIF() + +@@ -72,24 +72,24 @@ MYSQL_ADD_EXECUTABLE(mysqltest + COMPONENT Test + DEPENDENCIES GenError GenClientError + ENABLE_EXPORTS +- LINK_LIBRARIES perconaserverclient ++ LINK_LIBRARIES mysqlclient + ) + MYSQL_ADD_EXECUTABLE(mysqlcheck + check/mysqlcheck.cc + check/mysqlcheck_core.cc +- LINK_LIBRARIES perconaserverclient ++ LINK_LIBRARIES mysqlclient + ) + MYSQL_ADD_EXECUTABLE(mysqldump + mysqldump.cc +- LINK_LIBRARIES perconaserverclient ++ LINK_LIBRARIES mysqlclient + ) + MYSQL_ADD_EXECUTABLE(mysqlimport + mysqlimport.cc +- LINK_LIBRARIES perconaserverclient ++ LINK_LIBRARIES mysqlclient + ) + MYSQL_ADD_EXECUTABLE(mysqlshow + mysqlshow.cc +- LINK_LIBRARIES perconaserverclient ++ LINK_LIBRARIES mysqlclient + ) + + OPTION(WITH_JSON_BINLOG_LIBRARY +@@ -221,7 +221,7 @@ SET(MYSQLBINLOG_SOURCES + SET(MYSQLBINLOG_LIBRARIES + binlogevents_static + client_base +- perconaserverclient ++ mysqlclient + ) + + IF(WITH_JSON_BINLOG_LIBRARY) +@@ -254,19 +254,19 @@ TARGET_INCLUDE_DIRECTORIES(mysqlbinlog PRIVATE ${CMAKE_SOURCE_DIR}/sql) + + MYSQL_ADD_EXECUTABLE(mysqladmin + mysqladmin.cc +- LINK_LIBRARIES perconaserverclient ++ LINK_LIBRARIES mysqlclient + ) + MYSQL_ADD_EXECUTABLE(mysqlslap + mysqlslap.cc +- LINK_LIBRARIES perconaserverclient ++ LINK_LIBRARIES mysqlclient + ) + MYSQL_ADD_EXECUTABLE(mysql_config_editor + mysql_config_editor.cc +- LINK_LIBRARIES perconaserverclient ++ LINK_LIBRARIES mysqlclient + ) + MYSQL_ADD_EXECUTABLE(mysql_secure_installation + mysql_secure_installation.cc +- LINK_LIBRARIES perconaserverclient ++ LINK_LIBRARIES mysqlclient + ) + MYSQL_ADD_EXECUTABLE(mysql_ssl_rsa_setup + logger.cc +--- client/migrate_keyring/CMakeLists.txt ++++ client/migrate_keyring/CMakeLists.txt +@@ -40,7 +40,7 @@ SET(MIGRATE_KEYRING_LIBRARIES + ${CMAKE_DL_LIBS} + minchassis + mysys +- perconaserverclient ++ mysqlclient + client_base + ${SSL_LIBRARIES} + ) +--- include/mysql.h 2018-08-18 03:30:11.721480261 -0400 ++++ include/mysql.h 2018-08-18 03:30:11.727980360 -0400 +@@ -28,7 +28,7 @@ + /** + @file include/mysql.h + This file defines the client API to MySQL and also the ABI of the +- dynamically linked libperconaserverclient. ++ dynamically linked libmysqlclient. + + The ABI should never be changed in a released product of MySQL, + thus you need to take great care when changing the file. In case +@@ -399,12 +399,12 @@ + + /* + mysql_server_init/end need to be called when using libmysqld or +- libperconaserverclient (exactly, mysql_server_init() is called by ++ libmysqlclient (exactly, mysql_server_init() is called by + mysql_init() so you don't need to call it explicitely; but you need to call + mysql_server_end() to free memory). The names are a bit misleading + (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general + names which suit well whether you're using libmysqld or +- libperconaserverclient. We intend to promote these aliases over the ++ libmysqlclient. We intend to promote these aliases over the + mysql_server* ones. + */ + #define mysql_library_init mysql_server_init +--- libmysql/CMakeLists.txt 2018-08-18 03:30:19.520515918 -0400 ++++ libmysql/CMakeLists.txt 2018-08-18 03:30:19.525932667 -0400 +@@ -273,13 +273,13 @@ ENDIF() + # LDAP authentication SASL client plugin + ADD_SUBDIRECTORY(authentication_ldap) + +-# Merge several convenience libraries into one big perconaserverclient +-MERGE_CONVENIENCE_LIBRARIES(perconaserverclient ${LIBS_TO_MERGE} COMPONENT Development) +-TARGET_LINK_LIBRARIES(perconaserverclient PRIVATE ${LIBS_TO_LINK}) ++# Merge several convenience libraries into one big mysqlclient ++MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERGE} COMPONENT Development) ++TARGET_LINK_LIBRARIES(mysqlclient PRIVATE ${LIBS_TO_LINK}) + + # Visual Studio users need debug static library for debug projects + IF(MSVC) +- INSTALL_DEBUG_TARGET(perconaserverclient DESTINATION ${INSTALL_LIBDIR}/debug) ++ INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug) + + INSTALL_DEBUG_TARGET(auth_win_client DESTINATION ${INSTALL_LIBDIR}/debug) + INSTALL_DEBUG_TARGET(clientlib DESTINATION ${INSTALL_LIBDIR}/debug) +@@ -308,7 +308,7 @@ IF(UNIX) + ENDMACRO() + ENDIF() + +-# Merge several convenience libraries into one big perconaserverclient ++# Merge several convenience libraries into one big mysqlclient + # and link them together into shared library. + MERGE_LIBRARIES_SHARED(libmysql ${LIBS_TO_MERGE} + EXPORTS +@@ -340,9 +340,9 @@ IF(UNIX) + SET(OS_SHARED_LIB_VERSION + "${SHARED_LIB_MAJOR_VERSION}.${SHARED_LIB_MINOR_VERSION}.${SHARED_LIB_PATCH_VERSION}") + ENDIF() +- # Name of shared library is perconaserverclient on Unix ++ # Name of shared library is mysqlclient on Unix + SET_TARGET_PROPERTIES(libmysql PROPERTIES +- OUTPUT_NAME perconaserverclient ++ OUTPUT_NAME mysqlclient + VERSION "${OS_SHARED_LIB_VERSION}" + SOVERSION "${SHARED_LIB_MAJOR_VERSION}") + CONFIGURE_FILE(libmysql.ver.in ${CMAKE_CURRENT_BINARY_DIR}/libmysql.ver) +@@ -364,8 +364,8 @@ IF(UNIX) + "LINKER:--version-script=${CMAKE_CURRENT_BINARY_DIR}/libmysql.ver") + ENDIF() + # clean direct output needs to be set several targets have the same name +- #(perconaserverclient in this case) +- SET_TARGET_PROPERTIES(perconaserverclient PROPERTIES CLEAN_DIRECT_OUTPUT 1) ++ #(mysqlclient in this case) ++ SET_TARGET_PROPERTIES(mysqlclient PROPERTIES CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(libmysql PROPERTIES CLEAN_DIRECT_OUTPUT 1) + + ENDIF() +--- scripts/CMakeLists.txt 2018-08-18 03:31:39.003728628 -0400 ++++ scripts/CMakeLists.txt 2018-08-18 03:31:39.009145377 -0400 +@@ -365,7 +365,7 @@ + ENDIF() + + # Use cmake variables to inspect dependencies for +-# perconaserverclient library (add -l stuff) ++# mysqlclient library (add -l stuff) + SET(CLIENT_LIBS "") + SET(LIBS "") + +@@ -398,11 +398,11 @@ + STRING(REGEX REPLACE "[ ]+$" "" ${var} "${${var}}") + ENDMACRO() + +-EXTRACT_LINK_LIBRARIES(perconaserverclient CLIENT_LIBS) ++EXTRACT_LINK_LIBRARIES(mysqlclient CLIENT_LIBS) + + IF(MSVC) +- GET_TARGET_PROPERTY(LIBMYSQL_OS_SHLIB_VERSION perconaserverclient VERSION) +- GET_TARGET_PROPERTY(LIBMYSQL_OS_OUTPUT_NAME perconaserverclient OUTPUT_NAME) ++ GET_TARGET_PROPERTY(LIBMYSQL_OS_SHLIB_VERSION mysqlclient VERSION) ++ GET_TARGET_PROPERTY(LIBMYSQL_OS_OUTPUT_NAME mysqlclient OUTPUT_NAME) + ELSE() + GET_TARGET_PROPERTY(LIBMYSQL_OS_SHLIB_VERSION libmysql VERSION) + GET_TARGET_PROPERTY(LIBMYSQL_OS_OUTPUT_NAME libmysql OUTPUT_NAME) +--- storage/ndb/ndbapi-examples/mgmapi_logevent/Makefile 2018-08-18 03:31:53.867288716 -0400 ++++ storage/ndb/ndbapi-examples/mgmapi_logevent/Makefile 2018-08-18 03:31:53.870538766 -0400 +@@ -36,7 +36,7 @@ + SYS_LIB = + + $(TARGET): $(OBJS) +- $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lperconaserverclient_r $(SYS_LIB) -o $(TARGET) ++ $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r $(SYS_LIB) -o $(TARGET) + + $(OBJS): $(SRCS) + $(CXX) $(CFLAGS) -I$(TOP_SRCDIR)/include -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/mgmapi -I$(INCLUDE_DIR)/ndbapi $(SRCS) +--- storage/ndb/ndbapi-examples/mgmapi_logevent2/Makefile 2018-08-18 03:32:01.879744295 -0400 ++++ storage/ndb/ndbapi-examples/mgmapi_logevent2/Makefile 2018-08-18 03:32:01.884077695 -0400 +@@ -36,7 +36,7 @@ + SYS_LIB = + + $(TARGET): $(OBJS) +- $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lperconaserverclient_r $(SYS_LIB) -o $(TARGET) ++ $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r $(SYS_LIB) -o $(TARGET) + + $(OBJS): $(SRCS) + $(CXX) $(CFLAGS) -I$(TOP_SRCDIR)/include -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/mgmapi -I$(INCLUDE_DIR)/ndbapi $(SRCS) +--- storage/ndb/ndbapi-examples/ndbapi_async/Makefile 2018-08-18 03:32:11.933231001 -0400 ++++ storage/ndb/ndbapi-examples/ndbapi_async/Makefile 2018-08-18 03:32:11.936481050 -0400 +@@ -36,7 +36,7 @@ + SYS_LIB = + + $(TARGET): $(OBJS) +- $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lperconaserverclient_r $(SYS_LIB) -o $(TARGET) ++ $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r $(SYS_LIB) -o $(TARGET) + + $(TARGET).o: $(SRCS) + $(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/storage/ndb/include -I$(INCLUDE_DIR)/storage/ndb/include/ndbapi $(SRCS) +--- storage/ndb/ndbapi-examples/ndbapi_async1/Makefile 2018-08-18 03:32:17.497315889 -0400 ++++ storage/ndb/ndbapi-examples/ndbapi_async1/Makefile 2018-08-18 03:32:17.501649289 -0400 +@@ -35,7 +35,7 @@ + SYS_LIB = + + $(TARGET): $(OBJS) +- $(CXX) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lperconaserverclient_r $(SYS_LIB) -o $(TARGET) ++ $(CXX) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r $(SYS_LIB) -o $(TARGET) + + $(TARGET).o: $(SRCS) + $(CXX) $(CFLAGS) -I$(TOP_SRCDIR)/include -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/ndbapi $(SRCS) +--- storage/ndb/ndbapi-examples/ndbapi_blob/Makefile 2018-08-18 03:32:25.159849464 -0400 ++++ storage/ndb/ndbapi-examples/ndbapi_blob/Makefile 2018-08-18 03:32:25.163099513 -0400 +@@ -36,7 +36,7 @@ + SYS_LIB = + + $(TARGET): $(OBJS) +- $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lperconaserverclient_r $(SYS_LIB) -o $(TARGET) ++ $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r $(SYS_LIB) -o $(TARGET) + + $(TARGET).o: $(SRCS) + $(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/storage/ndb/include -I$(INCLUDE_DIR)/storage/ndb/include/ndbapi $(SRCS) +--- storage/ndb/ndbapi-examples/ndbapi_blob_ndbrecord/Makefile 2018-08-18 03:32:34.693328250 -0400 ++++ storage/ndb/ndbapi-examples/ndbapi_blob_ndbrecord/Makefile 2018-08-18 03:32:34.697661649 -0400 +@@ -36,7 +36,7 @@ + SYS_LIB = + + $(TARGET): $(OBJS) +- $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lperconaserverclient_r $(SYS_LIB) -o $(TARGET) ++ $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r $(SYS_LIB) -o $(TARGET) + + $(OBJS): $(SRCS) + $(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/storage/ndb/include -I$(INCLUDE_DIR)/storage/ndb/include/ndbapi $(SRCS) +--- storage/ndb/ndbapi-examples/ndbapi_event/Makefile 2018-08-18 03:32:39.731988459 -0400 ++++ storage/ndb/ndbapi-examples/ndbapi_event/Makefile 2018-08-18 03:32:39.736321858 -0400 +@@ -36,7 +36,7 @@ + SYS_LIB = + + $(TARGET): $(OBJS) +- $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lperconaserverclient_r $(SYS_LIB) -o $(TARGET) ++ $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r $(SYS_LIB) -o $(TARGET) + + $(TARGET).o: $(SRCS) Makefile + $(CXX) $(CFLAGS) $(DEBUG) -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/ndbapi -I$(TOP_SRCDIR)/include $(SRCS) +--- storage/ndb/ndbapi-examples/ndbapi_recattr_vs_record/Makefile 2018-08-18 03:32:51.553502151 -0400 ++++ storage/ndb/ndbapi-examples/ndbapi_recattr_vs_record/Makefile 2018-08-18 03:32:51.558918901 -0400 +@@ -36,7 +36,7 @@ + SYS_LIB = + + $(TARGET): $(OBJS) +- $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lperconaserverclient_r $(SYS_LIB) -o $(TARGET) ++ $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r $(SYS_LIB) -o $(TARGET) + + $(OBJS): $(SRCS) + $(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/storage/ndb/include -I$(INCLUDE_DIR)/storage/ndb/include/ndbapi $(SRCS) +--- storage/ndb/ndbapi-examples/ndbapi_retries/Makefile 2018-08-18 03:33:03.477934084 -0400 ++++ storage/ndb/ndbapi-examples/ndbapi_retries/Makefile 2018-08-18 03:33:03.483350833 -0400 +@@ -35,7 +35,7 @@ + SYS_LIB = + + $(TARGET): $(OBJS) +- $(CXX) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lperconaserverclient_r $(SYS_LIB) -o $(TARGET) ++ $(CXX) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r $(SYS_LIB) -o $(TARGET) + + $(TARGET).o: $(SRCS) + $(CXX) $(CFLAGS) -I$(TOP_SRCDIR)/include -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/ndbapi $(SRCS) +--- storage/ndb/ndbapi-examples/ndbapi_scan/Makefile 2018-08-18 03:33:11.319220386 -0400 ++++ storage/ndb/ndbapi-examples/ndbapi_scan/Makefile 2018-08-18 03:33:11.322470436 -0400 +@@ -36,7 +36,7 @@ + SYS_LIB = + + $(TARGET): $(OBJS) +- $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lperconaserverclient_r $(SYS_LIB) -o $(TARGET) ++ $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r $(SYS_LIB) -o $(TARGET) + + $(TARGET).o: $(SRCS) + $(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/storage/ndb/include -I$(INCLUDE_DIR)/storage/ndb/include/ndbapi $(SRCS) +--- storage/ndb/ndbapi-examples/ndbapi_simple/Makefile 2018-08-18 03:33:20.103021067 -0400 ++++ storage/ndb/ndbapi-examples/ndbapi_simple/Makefile 2018-08-18 03:33:20.107354466 -0400 +@@ -36,7 +36,7 @@ + SYS_LIB = + + $(TARGET): $(OBJS) +- $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lperconaserverclient_r $(SYS_LIB) -o $(TARGET) ++ $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r $(SYS_LIB) -o $(TARGET) + + $(TARGET).o: $(SRCS) + $(CXX) $(CFLAGS) -I$(TOP_SRCDIR)/include -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/ndbapi $(SRCS) +--- storage/ndb/ndbapi-examples/ndbapi_simple_dual/Makefile 2018-08-18 03:33:28.880321646 -0400 ++++ storage/ndb/ndbapi-examples/ndbapi_simple_dual/Makefile 2018-08-18 03:33:28.884655046 -0400 +@@ -36,7 +36,7 @@ + SYS_LIB = + + $(TARGET): $(OBJS) +- $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lperconaserverclient_r $(SYS_LIB) -o $(TARGET) ++ $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r $(SYS_LIB) -o $(TARGET) + + $(OBJS): $(SRCS) + $(CXX) $(CFLAGS) -I$(TOP_SRCDIR)/include -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/ndbapi $(SRCS) +--- storage/ndb/ndbapi-examples/ndbapi_simple_index/Makefile 2018-08-18 03:33:37.747540266 -0400 ++++ storage/ndb/ndbapi-examples/ndbapi_simple_index/Makefile 2018-08-18 03:33:37.752957016 -0400 +@@ -36,7 +36,7 @@ + SYS_LIB = + + $(TARGET): $(OBJS) +- $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lperconaserverclient_r $(SYS_LIB) -o $(TARGET) ++ $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r $(SYS_LIB) -o $(TARGET) + + $(OBJS): $(SRCS) + $(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/storage/ndb/include -I$(INCLUDE_DIR)/storage/ndb/include/ndbapi $(SRCS) +--- storage/ndb/ndbapi-examples/ndbapi_s_i_ndbrecord/Makefile 2018-08-18 03:33:46.284337179 -0400 ++++ storage/ndb/ndbapi-examples/ndbapi_s_i_ndbrecord/Makefile 2018-08-18 03:33:46.289753929 -0400 +@@ -36,7 +36,7 @@ + SYS_LIB = + + $(TARGET): $(OBJS) +- $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lperconaserverclient_r $(SYS_LIB) -o $(TARGET) ++ $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r $(SYS_LIB) -o $(TARGET) + + $(OBJS): $(SRCS) + $(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/storage/ndb/include -I$(INCLUDE_DIR)/storage/ndb/include/ndbapi $(SRCS) +--- storage/ndb/test/run-test/CMakeLists.txt 2018-08-18 03:33:54.833050942 -0400 ++++ storage/ndb/test/run-test/CMakeLists.txt 2018-08-18 03:33:54.837384341 -0400 +@@ -46,7 +46,7 @@ + test_execution_resources.cpp + DESTINATION mysql-test/ndb + ENABLE_EXPORTS +- LINK_LIBRARIES ndbNDBT ndbclient_static perconaserverclient ++ LINK_LIBRARIES ndbNDBT ndbclient_static mysqlclient + ) + + FILE(GLOB testcase_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*-tests.txt") +--- testclients/CMakeLists.txt 2018-08-18 03:34:01.038478951 -0400 ++++ testclients/CMakeLists.txt 2018-08-18 03:34:01.042812350 -0400 +@@ -23,9 +23,9 @@ + ADD_WSHADOW_WARNING() + + MYSQL_ADD_EXECUTABLE(mysql_client_test mysql_client_test.cc COMPONENT Test) +-TARGET_LINK_LIBRARIES(mysql_client_test perconaserverclient) ++TARGET_LINK_LIBRARIES(mysql_client_test mysqlclient) + + IF(WITH_UNIT_TESTS) + MYSQL_ADD_EXECUTABLE(bug25714 bug25714.cc SKIP_INSTALL) +- TARGET_LINK_LIBRARIES(bug25714 perconaserverclient) ++ TARGET_LINK_LIBRARIES(bug25714 mysqlclient) + ENDIF() +--- plugin/percona-pam-for-mysql/CMakeLists.txt 2018-08-21 07:01:38.155232659 -0400 ++++ plugin/percona-pam-for-mysql/CMakeLists.txt 2018-08-21 07:02:18.194400527 -0400 +@@ -36,7 +36,7 @@ + MYSQL_ADD_PLUGIN(dialog + src/dialog.cc + ../../sql-common/get_password.cc +- LINK_LIBRARIES perconaserverclient ++ LINK_LIBRARIES mysqlclient + MODULE_ONLY) + + IF(UNIX) +--- unittest/gunit/group_replication/CMakeLists.txt 2018-08-22 01:55:48.775894920 -0400 ++++ unittest/gunit/group_replication/CMakeLists.txt 2018-08-22 01:56:19.804229110 -0400 +@@ -40,7 +40,7 @@ + LINK_LIBRARIES + gr_unit_test_resource + gunit_small +- perconaserverclient ++ mysqlclient + mysqlgcs + ) + ENDFOREACH() +--- plugin/x/tests/driver/CMakeLists.txt 2018-08-22 03:58:32.371339263 -0400 ++++ plugin/x/tests/driver/CMakeLists.txt 2018-08-22 03:58:46.195045928 -0400 +@@ -79,7 +79,7 @@ + LINK_LIBRARIES + mysys + strings +- perconaserverclient ++ mysqlclient + ${MYSQLX_CLIENT_FULL_LIB} + ${MYSQLX_PROTOCOL_FULL_LIB} + ${PROTOBUF_LIBRARY} +--- router/src/metadata_cache/CMakeLists.txt 2019-12-04 10:04:41.972129557 +0200 ++++ router/src/metadata_cache/CMakeLists.txt 2019-12-04 10:06:40.135965582 +0200 +@@ -67,7 +67,7 @@ + ADD_LIBRARY(metadata_cache_static STATIC ${METADATA_CACHE_SOURCES}) + TARGET_LINK_LIBRARIES(metadata_cache_static + router_lib +- perconaserverclient ++ mysqlclient + mysqlxmessages_lite + ${PROTOBUF_LITE_LIBRARY} + ) +--- router/src/metadata_cache/tests/CMakeLists.txt 2019-12-04 10:04:41.972129557 +0200 ++++ router/src/metadata_cache/tests/CMakeLists.txt 2019-12-04 10:08:31.859600010 +0200 +@@ -55,7 +55,7 @@ + ADD_LIBRARY(metadata_cache_tests SHARED ${METADATA_CACHE_TESTS_HELPER}) + TARGET_LINK_LIBRARIES(metadata_cache_tests + router_lib +- perconaserverclient ++ mysqlclient + mysqlxclient_lite + mysqlxmessages_lite + ${PROTOBUF_LITE_LIBRARY} +@@ -65,7 +65,7 @@ + TARGET_LINK_LIBRARIES(metadata_cache_tests + router_lib + metadata_cache +- perconaserverclient ++ mysqlclient + mysqlxclient_lite + mysqlxmessages_lite + ${PROTOBUF_LITE_LIBRARY} +--- router/src/router/src/CMakeLists.txt 2019-12-04 10:04:41.980129555 +0200 ++++ router/src/router/src/CMakeLists.txt 2019-12-04 10:10:55.818892238 +0200 +@@ -71,7 +71,7 @@ TARGET_LINK_LIBRARIES(router_lib + ${CMAKE_DL_LIBS} + harness-library + harness_stdx +- perconaserverclient ++ mysqlclient + ${SSL_LIBRARIES} + io_component + ) +--- router/tests/fuzzers/CMakeLists.txt 2019-12-04 10:04:41.996129551 +0200 ++++ router/tests/fuzzers/CMakeLists.txt 2019-12-04 10:11:53.090550318 +0200 +@@ -32,7 +32,7 @@ + + LINK_LIBRARIES + harness-library +- perconaserverclient ++ mysqlclient + ${SSL_LIBRARIES} + + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +@@ -59,7 +59,7 @@ + + LINK_LIBRARIES + harness-library +- perconaserverclient ++ mysqlclient + ${SSL_LIBRARIES} + + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} diff --git a/mysql.init b/mysql.init new file mode 100644 index 0000000000000000000000000000000000000000..f0bab7892219a5c048c9e3b104bf1d3a2ef5eff9 --- /dev/null +++ b/mysql.init @@ -0,0 +1,248 @@ +#!/bin/sh +# +# mysqld This shell script takes care of starting and stopping +# the MySQL subsystem (mysqld). +# +# chkconfig: 345 64 36 +# description: MySQL database server. +# processname: mysqld +# config: /etc/my.cnf +# pidfile: /var/run/mysqld/mysqld.pid + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + + +exec="/usr/bin/mysqld_safe" +prog="mysqld" + +# Set timeouts here so they can be overridden from /etc/sysconfig/mysqld +STARTTIMEOUT=120 +STOPTIMEOUT=600 + +# Set in /etc/sysconfig/mysqld, will be passed to mysqld_safe +MYSQLD_OPTS= + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog + +# Support for extra options passed to mysqld +command=$1 && shift +extra_opts="$@" + +# Extract value of a MySQL option from config files +# Usage: get_mysql_option OPTION DEFAULT SECTION1 SECTION2 SECTIONN +# Result is returned in $result +# We use my_print_defaults which prints all options from multiple files, +# with the more specific ones later; hence take the last match. +get_mysql_option () { + option=$1 + default=$2 + shift 2 + result=$(/usr/bin/my_print_defaults "$@" | sed -n "s/^--${option}=//p" | tail -n 1) + if [ -z "$result" ]; then + # not found, use default + result="${default}" + fi +} + +get_mysql_option datadir "/var/lib/mysql" mysqld +datadir="$result" +get_mysql_option socket "$datadir/mysql.sock" mysqld +socketfile="$result" +get_mysql_option log-error "/var/log/mysqld.log" mysqld mysqld_safe +errlogfile="$result" +get_mysql_option pid-file "/var/run/mysqld/mysqld.pid" mysqld mysqld_safe +mypidfile="$result" + +case $socketfile in + /*) adminsocket="$socketfile" ;; + *) adminsocket="$datadir/$socketfile" ;; +esac + +install_validate_password_sql_file () { + local initfile + initfile="$(mktemp /var/lib/mysql-files/install-validate-password-plugin.XXXXXX.sql)" + chmod a+r "$initfile" + echo "SET @@SESSION.SQL_LOG_BIN=0;" > "$initfile" + echo "INSERT INTO mysql.component (component_id, component_group_id, component_urn) VALUES (1, 1, 'file://component_validate_password');" >> "$initfile" + echo "$initfile" +} + +start(){ + [ -x $exec ] || exit 5 + # check to see if it's already running + RESPONSE=$(/usr/bin/mysqladmin --no-defaults --socket="$adminsocket" --user=UNKNOWN_MYSQL_USER ping 2>&1) + if [ $? = 0 ]; then + # already running, do nothing + action $"Starting $prog: " /bin/true + ret=0 + elif echo "$RESPONSE" | grep -q "Access denied for user" + then + # already running, do nothing + action $"Starting $prog: " /bin/true + ret=0 + else + # prepare for start + if [ ! -e "$errlogfile" -a ! -h "$errlogfile" -a "x$(dirname "$errlogfile")" = "x/var/log" ]; then + install /dev/null -m0640 -omysql -gmysql "$errlogfile" + fi + [ -x /sbin/restorecon ] && /sbin/restorecon "$errlogfile" + if [ ! -d "$datadir/mysql" ] ; then + # First, make sure $datadir is there with correct permissions + if [ ! -d "$datadir" -a ! -h "$datadir" -a "x$(dirname "$datadir")" = "x/var/lib" ]; then + install -d -m0751 -omysql -gmysql "$datadir" || exit 1 + fi + if [ ! -h "$datadir" -a "x$(dirname "$datadir")" = "x/var/lib" ]; then + chown mysql:mysql "$datadir" + chmod 0751 "$datadir" + fi + if [ -x /sbin/restorecon ]; then + /sbin/restorecon "$datadir" + for dir in /var/lib/mysql-files /var/lib/mysql-keyring ; do + if [ -x /usr/sbin/semanage -a -d /var/lib/mysql -a -d $dir ] ; then + /usr/sbin/semanage fcontext -a -e /var/lib/mysql $dir >/dev/null 2>&1 + /sbin/restorecon -r $dir + fi + done + fi + # Now create the database + initfile="$(install_validate_password_sql_file)" + action $"Initializing MySQL database: " /usr/sbin/mysqld --initialize --datadir="$datadir" --user=mysql --init-file="$initfile" + ret=$? + rm -f "$initfile" + [ $ret -ne 0 ] && return $ret + if [ ! -h "$datadir" -a "x$(dirname "$datadir")" = "x/var/lib" ]; then + chown -R mysql:mysql "$datadir" + fi + # Generate certs if needed + if [ -x /usr/bin/mysql_ssl_rsa_setup -a ! -e "${datadir}/server-key.pem" ] ; then + /usr/bin/mysql_ssl_rsa_setup --datadir="$datadir" --uid=mysql >/dev/null 2>&1 + fi + fi + if [ ! -h "$datadir" -a "x$(dirname "$datadir")" = "x/var/lib" ]; then + chown mysql:mysql "$datadir" + chmod 0751 "$datadir" + fi + # Pass all the options determined above, to ensure consistent behavior. + # In many cases mysqld_safe would arrive at the same conclusions anyway + # but we need to be sure. (An exception is that we don't force the + # log-error setting, since this script doesn't really depend on that, + # and some users might prefer to configure logging to syslog.) + # Note: set --basedir to prevent probes that might trigger SELinux + # alarms, per bug #547485 + $exec $MYSQLD_OPTS --datadir="$datadir" --socket="$socketfile" \ + --pid-file="$mypidfile" \ + --basedir=/usr --user=mysql $extra_opts >/dev/null & + safe_pid=$! + # Spin for a maximum of N seconds waiting for the server to come up; + # exit the loop immediately if mysqld_safe process disappears. + # Rather than assuming we know a valid username, accept an "access + # denied" response as meaning the server is functioning. + ret=0 + TIMEOUT="$STARTTIMEOUT" + while [ $TIMEOUT -gt 0 ]; do + RESPONSE=$(/usr/bin/mysqladmin --no-defaults --socket="$adminsocket" --user=UNKNOWN_MYSQL_USER ping 2>&1) && break + echo "$RESPONSE" | grep -q "Access denied for user" && break + if ! /bin/kill -0 $safe_pid 2>/dev/null; then + echo "GreatSQL MySQL Daemon failed to start." + ret=1 + break + fi + sleep 1 + let TIMEOUT=${TIMEOUT}-1 + done + if [ $TIMEOUT -eq 0 ]; then + echo "Timeout error occurred trying to start GreatSQL MySQL Daemon." + ret=1 + fi + if [ $ret -eq 0 ]; then + action $"Starting $prog: " /bin/true + touch $lockfile + else + action $"Starting $prog: " /bin/false + fi + fi + return $ret +} + +stop(){ + if [ ! -f "$mypidfile" ]; then + # not running; per LSB standards this is "ok" + action $"Stopping $prog: " /bin/true + return 0 + fi + MYSQLPID=$(cat "$mypidfile") + if [ -n "$MYSQLPID" ]; then + /bin/kill "$MYSQLPID" >/dev/null 2>&1 + ret=$? + if [ $ret -eq 0 ]; then + TIMEOUT="$STOPTIMEOUT" + while [ $TIMEOUT -gt 0 ]; do + /bin/kill -0 "$MYSQLPID" >/dev/null 2>&1 || break + sleep 1 + let TIMEOUT=${TIMEOUT}-1 + done + if [ $TIMEOUT -eq 0 ]; then + echo "Timeout error occurred trying to stop GreatSQL MySQL Daemon." + ret=1 + action $"Stopping $prog: " /bin/false + else + rm -f $lockfile + rm -f "$socketfile" + action $"Stopping $prog: " /bin/true + fi + else + action $"Stopping $prog: " /bin/false + fi + else + # failed to read pidfile, probably insufficient permissions + action $"Stopping $prog: " /bin/false + ret=4 + fi + return $ret +} + +restart(){ + stop + start +} + +condrestart(){ + [ -e $lockfile ] && restart || : +} + + +# See how we were called. +case "$command" in + start) + start + ;; + stop) + stop + ;; + status) + status -p "$mypidfile" $prog + ;; + restart) + restart + ;; + condrestart|try-restart) + condrestart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac + +exit $? diff --git a/mysql_config.sh b/mysql_config.sh new file mode 100644 index 0000000000000000000000000000000000000000..05007f7344e020d3f0683b5a04aa9a677b727a0e --- /dev/null +++ b/mysql_config.sh @@ -0,0 +1,36 @@ +#! /bin/bash +# +# Wrapper script for mysql_config to support multilib +# +# + +# This command respects setarch, works on OL6/RHEL6 and later +isa_bits=$(rpm --eval %__isa_bits) + +case $bits in + 32|64) bits=$isa_bits ;; + *) bits=unknown ;; +esac + +# Try mapping by uname if rpm command failed +if [ "$bits" = "unknown" ] ; then + arch=$(uname -m) + case $arch in + x86_64|ppc64) bits=64 ;; + i386|i486|i586|i686|pentium3|pentium4|athlon|ppc) bits=32 ;; + *) bits=unknown ;; + esac +fi + +if [ "$bits" == "unknown" ] ; then + echo "$0: error: failed to determine isa bits on your arch." + exit 1 +fi + +if [ -x /usr/bin/mysql_config-$bits ] ; then + /usr/bin/mysql_config-$bits "$@" +else + echo "$0: error: needed binary: /usr/bin/mysql_config-$bits is missing. Please check your MySQL installation." + exit 1 +fi + diff --git a/mysqld.cnf b/mysqld.cnf new file mode 100644 index 0000000000000000000000000000000000000000..7dc0f928016e44a87ec8c825b35086d1c2f6d3ec --- /dev/null +++ b/mysqld.cnf @@ -0,0 +1,34 @@ +# GreatSQL template configuration +# +# For advice on how to change settings please see +# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html + +[mysqld] +# +# Remove leading # and set to the amount of RAM for the most important data +# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. +# innodb_buffer_pool_size = 128M +# +# Remove the leading "# " to disable binary logging +# Binary logging captures changes between backups and is enabled by +# default. It's default setting is log_bin=binlog +# disable_log_bin +# +# Remove leading # to set options mainly useful for reporting servers. +# The server defaults are faster for transactions and fast SELECTs. +# Adjust sizes as needed, experiment to find the optimal values. +# join_buffer_size = 128M +# sort_buffer_size = 2M +# read_rnd_buffer_size = 2M +# +# Remove leading # to revert to previous value for default_authentication_plugin, +# this will increase compatibility with older clients. For background, see: +# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin +# default-authentication-plugin=mysql_native_password + +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock + +log-error=/var/log/mysqld.log +pid-file=/var/run/mysqld/mysqld.pid +