From aef125a80b6e7c149c4cb81d5c17e443fe2954b3 Mon Sep 17 00:00:00 2001 From: Evgeniy Patlan Date: Mon, 23 Mar 2026 20:35:29 +0200 Subject: [PATCH 1/2] Align Percona Server RPM and DEB packaging with MySQL upstream Modernize RPM and DEB packaging infrastructure to align with MySQL 9.6.0 upstream patterns, improving maintainability, security, and feature parity. RPM changes: - Remove SysV init support, make systemd unconditional - Drop EL6 compat libs (libmysqlclient.so.16 / MySQL 5.1.73) - Replace custom filter-provides.sh/filter-requires.sh with modern __requires_exclude/__provides_exclude_from RPM macros - Add Profile-Guided Optimization (PGO) build support - Add libmysqlclient.so.21 compat for EL8/9, built from MySQL 8.0.37 source - Create percona-server-client-plugins subpackage for auth plugins - Factor telemetry setup into external helper scripts - Convert @@VAR@@ shell substitution to CMake @VAR@ spec templating - Create Docker/minimal spec variant (percona-server-minimal.spec.in) - Update build-rpm.sh to use git instead of bzr DEB changes: - Upgrade debhelper compat level from 9 to 13 - Replace deprecated dh_systemd_enable/dh_installinit/dh_systemd_start with dh_installsystemd - Consolidate 80+ individual dh_strip -X calls into prefix-based patterns - Activate AppArmor integration (previously commented out) - Create percona-server-client-plugins package - Split into server-core/client-core and server/client wrapper packages - Add meta packages (percona-server, percona-client, percona-testsuite) - Add PGO build support via DEB_PGO=1 environment variable - Switch zlib, LZ4, zstd from bundled to system libraries - Factor telemetry into external helper scripts - Remove monolithic percona-server-dbg in favor of auto-generated dbgsym - Create rules.in template for CMake-based generation Builder script (percona-server-9.0_builder.sh): - Update spec generation to use .spec.in template with @VAR@ markers - Remove call-home.sh wget/heredoc injection for both RPM and DEB - Add telemetry helper script extraction for SRPM builds - Remove EL6 devtoolset-8 references - Use exact spec filename for tarball extraction --- build-ps/CMakeLists.txt | 54 + build-ps/build-rpm.sh | 2 +- build-ps/debian/compat | 1 - build-ps/debian/control | 81 +- .../debian/extra/percona-telemetry-cleanup.sh | 3 + .../debian/extra/percona-telemetry-setup.sh | 15 + build-ps/debian/not-installed | 50 + .../debian/percona-server-client-core.install | 6 + .../percona-server-client-plugins.install | 16 + build-ps/debian/percona-server-client.install | 4 - .../debian/percona-server-server-core.install | 155 + build-ps/debian/percona-server-server.install | 263 +- .../debian/percona-server-server.postinst | 10 +- build-ps/debian/rules | 207 +- build-ps/debian/rules.in | 327 ++ build-ps/percona-server-9.0_builder.sh | 66 +- build-ps/percona-server-minimal.spec.in | 251 ++ ...ona-server.spec => percona-server.spec.in} | 408 +-- build-ps/percona-server.spec.legacy | 2629 +++++++++++++++++ build-ps/rpm/filter-provides.sh | 6 - build-ps/rpm/filter-requires.sh | 6 - build-ps/rpm/mysql.init | 248 -- build-ps/rpm/percona-telemetry-cleanup.sh | 3 + build-ps/rpm/percona-telemetry-setup.sh | 15 + 24 files changed, 3931 insertions(+), 895 deletions(-) create mode 100644 build-ps/CMakeLists.txt delete mode 100644 build-ps/debian/compat create mode 100644 build-ps/debian/extra/percona-telemetry-cleanup.sh create mode 100644 build-ps/debian/extra/percona-telemetry-setup.sh create mode 100644 build-ps/debian/not-installed create mode 100644 build-ps/debian/percona-server-client-core.install create mode 100644 build-ps/debian/percona-server-client-plugins.install create mode 100644 build-ps/debian/percona-server-server-core.install create mode 100755 build-ps/debian/rules.in create mode 100644 build-ps/percona-server-minimal.spec.in rename build-ps/{percona-server.spec => percona-server.spec.in} (93%) create mode 100644 build-ps/percona-server.spec.legacy delete mode 100755 build-ps/rpm/filter-provides.sh delete mode 100755 build-ps/rpm/filter-requires.sh delete mode 100644 build-ps/rpm/mysql.init create mode 100644 build-ps/rpm/percona-telemetry-cleanup.sh create mode 100644 build-ps/rpm/percona-telemetry-setup.sh diff --git a/build-ps/CMakeLists.txt b/build-ps/CMakeLists.txt new file mode 100644 index 000000000000..92cc5118b907 --- /dev/null +++ b/build-ps/CMakeLists.txt @@ -0,0 +1,54 @@ +# Generate percona-server.spec from template +# This file is processed by CMake's CONFIGURE_FILE with @ONLY mode, +# substituting @VARIABLE@ markers with CMake variable values. + +IF(NOT LINUX) + RETURN() +ENDIF() + +# Derive Percona Server version from MYSQL_VERSION_EXTRA (strip leading dash) +STRING(REGEX REPLACE "^-" "" PERCONA_SERVER_VERSION "${MYSQL_VERSION_EXTRA}") + +# Git revision for the spec +IF(NOT DEFINED PERCONA_REVISION) + EXECUTE_PROCESS( + COMMAND git rev-parse --short HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE PERCONA_REVISION + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + ) + IF(NOT PERCONA_REVISION) + SET(PERCONA_REVISION "unknown") + ENDIF() +ENDIF() + +# RPM release number +IF(NOT DEFINED RPM_RELEASE) + SET(RPM_RELEASE "1") +ENDIF() + +# Copyright year +STRING(TIMESTAMP MYSQL_COPYRIGHT_YEAR "%Y") + +SET(SPECFILENAME "percona-server.spec") +CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/percona-server.spec.in + ${CMAKE_CURRENT_BINARY_DIR}/${SPECFILENAME} + @ONLY +) + +MESSAGE(STATUS "Generated ${SPECFILENAME} with version ${MYSQL_NO_DASH_VERSION}-${PERCONA_SERVER_VERSION}") + +# Generate DEB packaging files from templates +# TokuDB backup version +SET(TOKUDB_BACKUP_VERSION "${MYSQL_NO_DASH_VERSION}-${PERCONA_SERVER_VERSION}") + +IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/debian/rules.in") + CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/debian/rules.in + ${CMAKE_CURRENT_BINARY_DIR}/debian/rules + @ONLY + ) + MESSAGE(STATUS "Generated debian/rules") +ENDIF() diff --git a/build-ps/build-rpm.sh b/build-ps/build-rpm.sh index eec4c5d8f076..17e54c53d4a9 100755 --- a/build-ps/build-rpm.sh +++ b/build-ps/build-rpm.sh @@ -116,7 +116,7 @@ PRODUCT="Percona-Server-$MYSQL_VERSION-$PERCONA_SERVER_VERSION" # Build information DISTRO_NAME="$(lsb_release -is)" REDHAT_RELEASE="$(lsb_release -rs)" -REVISION="$(cd "$SOURCEDIR"; bzr revno)" +REVISION="$(cd "$SOURCEDIR"; git rev-parse --short HEAD 2>/dev/null || echo unknown)" # Compilation flags export CC="${CC:-gcc}" diff --git a/build-ps/debian/compat b/build-ps/debian/compat deleted file mode 100644 index ec635144f600..000000000000 --- a/build-ps/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/build-ps/debian/control b/build-ps/debian/control index 89f4f33fc85c..3e1e59bc12b8 100644 --- a/build-ps/debian/control +++ b/build-ps/debian/control @@ -6,8 +6,10 @@ Uploaders: George Lorch , Tomislav Plavcic Build-Depends: bison, cmake, - debhelper (>= 9.0.0), + debhelper-compat (= 13), + dh-apparmor, fakeroot, + pkg-config, libaio-dev[linux-any], libmecab-dev, libncurses5-dev (>= 5.0-6), @@ -16,8 +18,11 @@ Build-Depends: bison, po-debconf, psmisc, zlib1g-dev (>= 1:1.1.3-5), + liblz4-dev, + libzstd-dev, libpam-dev, libssl-dev, + libsystemd-dev, libnuma-dev, gcc (>= 4.4), g++ (>= 4.4), @@ -128,9 +133,31 @@ Description: Percona Server database common files (e.g. /etc/mysql/my.cnf) This package includes files needed by all versions of the client library (e.g. /etc/mysql/my.cnf). +Package: percona-server-client-plugins +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Provides: mysql-client-plugins +Description: Percona Server - Client Plugins + This package contains shared plugins for Percona Server client applications, + including authentication plugins for LDAP, Kerberos, WebAuthn, OpenID Connect, + and OCI. + +Package: percona-server-client-core +Architecture: any +Depends: percona-server-client-plugins (= ${binary:Version}), + ${shlibs:Depends}, ${misc:Depends} +Provides: virtual-mysql-client-core +Description: Percona Server database core client binaries + Percona Server is a fast, stable and true multi-user, multi-threaded SQL + database server. + . + This package includes the core client binaries (mysql, mysqldump). + Package: percona-server-client Architecture: any Depends: percona-server-common (= ${binary:Version}), + percona-server-client-core (= ${binary:Version}), + percona-server-client-plugins (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Provides: mysql-client, virtual-mysql-client, virtual-mysql-client-core, @@ -184,12 +211,26 @@ Description: Percona Server database client binaries . This package includes the client binaries. +Package: percona-server-server-core +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Provides: virtual-mysql-server-core +Breaks: mysql-server-core-8.0, mysql-community-server-core +Replaces: mysql-server-core-8.0, mysql-community-server-core +Description: Percona Server database core server binaries + Percona Server is a fast, stable and true multi-user, multi-threaded SQL + database server. + . + This package includes the core server binaries (mysqld), plugins, and + private shared libraries. + Package: percona-server-server Architecture: any Pre-Depends: adduser, debconf (>= 0.2.17) Depends: percona-server-common (= ${binary:Version}), percona-server-client (= ${binary:Version}), + percona-server-server-core (= ${binary:Version}), percona-telemetry-agent, ${shlibs:Depends}, ${misc:Depends}, psmisc, @@ -274,20 +315,34 @@ Description: Percona Server 8.0 source This package includes the source code to Percona Server as configured before building. -Package: percona-server-dbg -Architecture: any -Section: debug -Depends: percona-server-server (= ${binary:Version}), ${misc:Depends} -Description: Debugging package for Percona Server - Percona Server is a fast, stable and true multi-user, multi-threaded SQL - database server. SQL (Structured Query Language) is the most popular database - query language in the world. The main goals of Percona Server are speed, - robustness and ease of use. - . - This package contains the debugging symbols for the Percona Server binaries. - Package: percona-mysql-router Architecture: any Description: Percona MySQL Router Depends: ${shlibs:Depends}, ${misc:Depends} +Package: percona-server +Architecture: any +Depends: percona-server-server (= ${binary:Version}), + percona-server-client (= ${binary:Version}), + ${misc:Depends} +Description: Percona Server (metapackage depending on the latest version) + This is an empty package that depends on the current percona-server-server + and percona-server-client packages. Install this package to get the latest + Percona Server version. + +Package: percona-client +Architecture: any +Depends: percona-server-client (= ${binary:Version}), + ${misc:Depends} +Description: Percona Server client (metapackage depending on the latest version) + This is an empty package that depends on the current percona-server-client + package. Install this package to get the latest Percona Server client tools. + +Package: percona-testsuite +Architecture: any +Depends: percona-server-test (= ${binary:Version}), + ${misc:Depends} +Description: Percona Server test suite (metapackage depending on the latest version) + This is an empty package that depends on the current percona-server-test + package. Install this package to get the latest Percona Server test suite. + diff --git a/build-ps/debian/extra/percona-telemetry-cleanup.sh b/build-ps/debian/extra/percona-telemetry-cleanup.sh new file mode 100644 index 000000000000..f776fd77d3d4 --- /dev/null +++ b/build-ps/debian/extra/percona-telemetry-cleanup.sh @@ -0,0 +1,3 @@ +#!/bin/sh +# Cleanup Percona telemetry directory on package removal +rm -rf /usr/local/percona/telemetry/ps diff --git a/build-ps/debian/extra/percona-telemetry-setup.sh b/build-ps/debian/extra/percona-telemetry-setup.sh new file mode 100644 index 000000000000..97dc4ba5e4b6 --- /dev/null +++ b/build-ps/debian/extra/percona-telemetry-setup.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# Setup Percona telemetry directory with proper ownership and SELinux context +PS_TELEMETRY=/usr/local/percona/telemetry/ps + +mkdir -p "$PS_TELEMETRY" +chown mysql:percona-telemetry "$PS_TELEMETRY" 2>/dev/null || : +chmod 775 "$PS_TELEMETRY" 2>/dev/null || : +chmod g+s "$PS_TELEMETRY" 2>/dev/null || : +chmod u+s "$PS_TELEMETRY" 2>/dev/null || : +chcon -t mysqld_db_t "$PS_TELEMETRY" 2>/dev/null || : +chcon -u system_u "$PS_TELEMETRY" 2>/dev/null || : + +# Setup telemetry UUID file +chgrp percona-telemetry /usr/local/percona/telemetry_uuid 2>/dev/null || : +chmod 664 /usr/local/percona/telemetry_uuid 2>/dev/null || : diff --git a/build-ps/debian/not-installed b/build-ps/debian/not-installed new file mode 100644 index 000000000000..2645ac4856a7 --- /dev/null +++ b/build-ps/debian/not-installed @@ -0,0 +1,50 @@ +# Files intentionally not installed to any package +usr/cmake/coredumper-relwithdebinfo.cmake +usr/cmake/coredumper.cmake +usr/include/kmip.h +usr/include/kmippp.h +usr/lib/*/pkgconfig/perconaserverclient.pc +usr/lib/libkmip.a +usr/lib/libkmippp.a +usr/share/mysql/LICENSE +usr/share/mysql/README.md +usr/share/mysql/docs/INFO_BIN +usr/share/mysql/docs/INFO_SRC +usr/share/mysql/mysql.server +usr/src/percona-server/percona-server-source.tar.gz +# Plugins packaged in percona-server-test or intentionally excluded +usr/lib/mysql/plugin/ha_mock.so +usr/lib/mysql/plugin/debug/ha_mock.so +usr/lib/mysql/plugin/ddl_rewriter.so +usr/lib/mysql/plugin/debug/ddl_rewriter.so +usr/lib/mysql/plugin/pfs_example_plugin_employee.so +usr/lib/mysql/plugin/component_test_audit_api_message.so +usr/lib/mysql/plugin/debug/component_test_audit_api_message.so +usr/lib/mysql/plugin/component_test_host_application_signal.so +usr/lib/mysql/plugin/debug/component_test_host_application_signal.so +usr/lib/mysql/plugin/test_services_host_application_signal.so +usr/lib/mysql/plugin/debug/test_services_host_application_signal.so +usr/lib/mysql/plugin/component_test_sensitive_system_variables.so +usr/lib/mysql/plugin/debug/component_test_sensitive_system_variables.so +usr/lib/mysql/plugin/component_test_event_tracking_consumer.so +usr/lib/mysql/plugin/debug/component_test_event_tracking_consumer.so +usr/lib/mysql/plugin/component_test_event_tracking_consumer_a.so +usr/lib/mysql/plugin/debug/component_test_event_tracking_consumer_a.so +usr/lib/mysql/plugin/component_test_event_tracking_consumer_b.so +usr/lib/mysql/plugin/debug/component_test_event_tracking_consumer_b.so +usr/lib/mysql/plugin/component_test_event_tracking_consumer_c.so +usr/lib/mysql/plugin/debug/component_test_event_tracking_consumer_c.so +usr/lib/mysql/plugin/component_test_event_tracking_producer_a.so +usr/lib/mysql/plugin/debug/component_test_event_tracking_producer_a.so +usr/lib/mysql/plugin/component_test_event_tracking_producer_b.so +usr/lib/mysql/plugin/debug/component_test_event_tracking_producer_b.so +# Debug plugins already in server-core +usr/lib/mysql/plugin/debug/component_audit_api_message_emit.so +usr/lib/mysql/plugin/debug/component_log_filter_dragnet.so +usr/lib/mysql/plugin/debug/component_log_sink_json.so +usr/lib/mysql/plugin/debug/component_log_sink_syseventlog.so +usr/lib/mysql/plugin/debug/component_validate_password.so +usr/lib/mysql/plugin/debug/authentication_ldap_simple.so +# Router plugins +usr/lib/mysqlrouter/plugin/mysql_rest_service.so +usr/lib/mysqlrouter/private/libprotobuf.so.* diff --git a/build-ps/debian/percona-server-client-core.install b/build-ps/debian/percona-server-client-core.install new file mode 100644 index 000000000000..cec9617fedd5 --- /dev/null +++ b/build-ps/debian/percona-server-client-core.install @@ -0,0 +1,6 @@ +# Core client binaries +usr/bin/mysql +usr/bin/mysqldump +# man pages +usr/share/man/man1/mysql.1 +usr/share/man/man1/mysqldump.1 diff --git a/build-ps/debian/percona-server-client-plugins.install b/build-ps/debian/percona-server-client-plugins.install new file mode 100644 index 000000000000..df2c3a943b07 --- /dev/null +++ b/build-ps/debian/percona-server-client-plugins.install @@ -0,0 +1,16 @@ +usr/lib/mysql/plugin/authentication_ldap_sasl_client.so +usr/lib/mysql/plugin/authentication_kerberos_client.so +usr/lib/mysql/plugin/authentication_webauthn_client.so +usr/lib/mysql/plugin/authentication_openid_connect_client.so +usr/lib/mysql/plugin/authentication_oci_client.so +usr/lib/mysql/plugin/mysql_native_password.so +usr/lib/mysql/plugin/dialog.so +usr/lib/mysql/private/libfido2.so.* +# debug variants +usr/lib/mysql/plugin/debug/authentication_ldap_sasl_client.so +usr/lib/mysql/plugin/debug/authentication_kerberos_client.so +usr/lib/mysql/plugin/debug/authentication_webauthn_client.so +usr/lib/mysql/plugin/debug/authentication_openid_connect_client.so +usr/lib/mysql/plugin/debug/authentication_oci_client.so +usr/lib/mysql/plugin/debug/mysql_native_password.so +usr/lib/mysql/plugin/debug/dialog.so diff --git a/build-ps/debian/percona-server-client.install b/build-ps/debian/percona-server-client.install index 83034fb13a98..810c8ea42cc4 100644 --- a/build-ps/debian/percona-server-client.install +++ b/build-ps/debian/percona-server-client.install @@ -1,10 +1,8 @@ # binaries usr/bin/innochecksum usr/bin/myisam_ftdump -usr/bin/mysql usr/bin/mysqladmin usr/bin/mysqlcheck -usr/bin/mysqldump usr/bin/mysqldumpslow usr/bin/mysqlimport usr/bin/mysqlshow @@ -12,10 +10,8 @@ usr/bin/mysqlslap # manpages usr/share/man/man1/innochecksum.1 usr/share/man/man1/myisam_ftdump.1 -usr/share/man/man1/mysql.1 usr/share/man/man1/mysqladmin.1 usr/share/man/man1/mysqlcheck.1 -usr/share/man/man1/mysqldump.1 usr/share/man/man1/mysqldumpslow.1 usr/share/man/man1/mysqlimport.1 usr/share/man/man1/mysqlman.1 diff --git a/build-ps/debian/percona-server-server-core.install b/build-ps/debian/percona-server-server-core.install new file mode 100644 index 000000000000..327d33f89cdb --- /dev/null +++ b/build-ps/debian/percona-server-server-core.install @@ -0,0 +1,155 @@ +# Core server binaries +usr/bin/comp_err +usr/bin/myisamchk +usr/bin/myisamlog +usr/bin/myisampack +usr/bin/my_print_defaults +usr/bin/mysql_secure_installation +usr/bin/mysql_tzinfo_to_sql +usr/bin/mysqlbinlog +usr/bin/mysqld_multi +usr/bin/mysqld_safe +usr/bin/ps_mysqld_helper +usr/bin/perror +usr/sbin/mysqld +usr/bin/ps-admin +usr/bin/ibd2sdi +usr/bin/mysql_migrate_keyring + +# debug binary +usr/sbin/mysqld-debug + +# man pages +usr/share/man/man1/comp_err.1 +usr/share/man/man1/myisamchk.1 +usr/share/man/man1/myisamlog.1 +usr/share/man/man1/myisampack.1 +usr/share/man/man1/my_print_defaults.1 +usr/share/man/man1/mysql_secure_installation.1 +usr/share/man/man1/mysql_tzinfo_to_sql.1 +usr/share/man/man1/mysqlbinlog.1 +usr/share/man/man1/mysqld_multi.1 +usr/share/man/man1/mysqld_safe.1 +usr/share/man/man1/mysql.server.1 +usr/share/man/man1/ibd2sdi.1 +usr/share/man/man1/perror.1 +usr/share/man/man8/mysqld.8 + +# private shared libs +usr/lib/mysql/private/libprotobuf-lite.so.* +usr/lib/mysql/private/libprotobuf.so.* +usr/lib/mysql/private/libabsl_*.so +usr/lib/mysql/private/icudt7?l/*.icu +usr/lib/mysql/private/icudt7?l/brkitr/* +usr/lib/mysql/private/libicui18n.so.* +usr/lib/mysql/private/libicustubdata.so.* +usr/lib/mysql/private/libicuuc.so.* + +# plugins +usr/lib/mysql/plugin/adt_null.so +usr/lib/mysql/plugin/auth_socket.so +usr/lib/mysql/plugin/libpluginmecab.so +usr/lib/mysql/plugin/locking_service.so +usr/lib/mysql/plugin/mypluglib.so +usr/lib/mysql/plugin/mysql_no_login.so +usr/lib/mysql/plugin/rewriter.so +usr/lib/mysql/plugin/test_security_context.so +usr/lib/mysql/plugin/validate_password.so +usr/lib/mysql/plugin/connection_control.so +usr/lib/mysql/plugin/component_keyring_file.so +usr/lib/mysql/plugin/keyring_udf.so +usr/lib/mysql/plugin/component_log_filter_dragnet.so +usr/lib/mysql/plugin/component_log_sink_json.so +usr/lib/mysql/plugin/component_log_sink_syseventlog.so +usr/lib/mysql/plugin/component_validate_password.so +usr/lib/mysql/plugin/component_audit_api_message_emit.so +usr/lib/mysql/plugin/component_query_attributes.so +usr/lib/mysql/plugin/component_test_udf_services.so +usr/lib/mysql/plugin/component_reference_cache.so +usr/lib/mysql/plugin/mysql_clone.so +usr/lib/mysql/plugin/component_mysqlbackup.so +usr/lib/mysql/plugin/component_percona_telemetry.so +usr/lib/mysql/plugin/component_test_server_telemetry_metrics.so +usr/lib/mysql/plugin/component_test_session_var_service.so +usr/lib/mysql/plugin/component_test_server_telemetry_logs_client.so +usr/lib/mysql/plugin/component_test_server_telemetry_logs_export.so +usr/lib/mysql/plugin/component_connection_control.so +usr/lib/mysql/plugin/component_classic_hashing.so +usr/lib/mysql/plugin/group_replication.so +usr/lib/mysql/plugin/semisync_replica.so +usr/lib/mysql/plugin/semisync_source.so + +# debug plugins +usr/lib/mysql/plugin/debug/component_mysqlbackup.so +usr/lib/mysql/plugin/debug/component_percona_telemetry.so +usr/lib/mysql/plugin/debug/mysql_clone.so +usr/lib/mysql/plugin/debug/adt_null.so +usr/lib/mysql/plugin/debug/auth_socket.so +usr/lib/mysql/plugin/debug/libpluginmecab.so +usr/lib/mysql/plugin/debug/locking_service.so +usr/lib/mysql/plugin/debug/mypluglib.so +usr/lib/mysql/plugin/debug/mysql_no_login.so +usr/lib/mysql/plugin/debug/rewriter.so +usr/lib/mysql/plugin/debug/test_security_context.so +usr/lib/mysql/plugin/debug/validate_password.so +usr/lib/mysql/plugin/debug/keyring_udf.so +usr/lib/mysql/plugin/debug/connection_control.so +usr/lib/mysql/plugin/debug/component_keyring_file.so +usr/lib/mysql/plugin/debug/group_replication.so +usr/lib/mysql/plugin/debug/component_test_udf_services.so +usr/lib/mysql/plugin/debug/component_query_attributes.so +usr/lib/mysql/plugin/debug/component_test_component_deinit.so +usr/lib/mysql/plugin/debug/component_reference_cache.so +usr/lib/mysql/plugin/debug/component_test_table_access.so +usr/lib/mysql/plugin/debug/component_test_mysql_system_variable_set.so +usr/lib/mysql/plugin/debug/semisync_replica.so +usr/lib/mysql/plugin/debug/semisync_source.so +usr/lib/mysql/plugin/debug/component_test_server_telemetry_metrics.so +usr/lib/mysql/plugin/debug/component_test_session_var_service.so +usr/lib/mysql/plugin/debug/component_test_server_telemetry_logs_client.so +usr/lib/mysql/plugin/debug/component_test_server_telemetry_logs_export.so +usr/lib/mysql/plugin/debug/component_connection_control.so +usr/lib/mysql/plugin/debug/component_classic_hashing.so + +# Percona plugins +usr/lib/mysql/plugin/auth_pam.so +usr/lib/mysql/plugin/debug/auth_pam.so +usr/lib/mysql/plugin/auth_pam_compat.so +usr/lib/mysql/plugin/debug/auth_pam_compat.so +usr/lib/mysql/plugin/debug/component_keyring_vault.so +usr/lib/mysql/plugin/component_keyring_vault.so +usr/lib/mysql/plugin/authentication_ldap_simple.so +usr/lib/mysql/plugin/component_test_component_deinit.so +usr/lib/mysql/plugin/component_binlog_utils_udf.so +usr/lib/mysql/plugin/test_udf_wrappers.so +usr/lib/mysql/plugin/debug/component_binlog_utils_udf.so +usr/lib/mysql/plugin/debug/test_udf_wrappers.so +usr/lib/mysql/plugin/procfs.so +usr/lib/mysql/plugin/debug/procfs.so +usr/lib/mysql/plugin/component_test_table_access.so +usr/lib/mysql/plugin/component_test_mysql_system_variable_set.so +usr/lib/mysql/plugin/component_keyring_kmip.so +usr/lib/mysql/plugin/debug/component_keyring_kmip.so +usr/lib/mysql/plugin/component_encryption_udf.so +usr/lib/mysql/plugin/debug/component_encryption_udf.so +usr/lib/mysql/plugin/component_uuid_vx_udf.so +usr/lib/mysql/plugin/debug/component_uuid_vx_udf.so +usr/lib/mysql/plugin/component_keyring_kms.so +usr/lib/mysql/plugin/debug/component_keyring_kms.so +usr/lib/mysql/plugin/authentication_ldap_sasl.so +usr/lib/mysql/plugin/debug/authentication_ldap_sasl.so +usr/lib/mysql/plugin/component_test_mysql_thd_store_service.so +usr/lib/mysql/plugin/debug/component_test_mysql_thd_store_service.so +usr/lib/mysql/plugin/component_test_server_telemetry_traces.so +usr/lib/mysql/plugin/debug/component_test_server_telemetry_traces.so +usr/lib/mysql/plugin/component_audit_log_filter.so +usr/lib/mysql/plugin/debug/component_audit_log_filter.so +usr/lib/mysql/plugin/component_masking_functions.so +usr/lib/mysql/plugin/debug/component_masking_functions.so +usr/lib/mysql/plugin/component_percona_udf.so +usr/lib/mysql/plugin/debug/component_percona_udf.so + +# data files +usr/share/mysql/dictionary.txt +usr/share/mysql/mysql-log-rotate +usr/share/mysql/*.sql diff --git a/build-ps/debian/percona-server-server.install b/build-ps/debian/percona-server-server.install index e50ee158d5d2..8c511c7f14fe 100644 --- a/build-ps/debian/percona-server-server.install +++ b/build-ps/debian/percona-server-server.install @@ -1,22 +1,4 @@ -# binaries -usr/bin/comp_err -usr/bin/myisamchk -usr/bin/myisamlog -usr/bin/myisampack -usr/bin/my_print_defaults -usr/bin/mysql_secure_installation -usr/bin/mysql_tzinfo_to_sql -usr/bin/mysqlbinlog -usr/bin/mysqld_multi -usr/bin/mysqld_safe -usr/bin/ps_mysqld_helper -usr/bin/perror -usr/sbin/mysqld -usr/bin/ps-admin -usr/bin/ibd2sdi -usr/bin/mysql_migrate_keyring - -# configuration files +# Configuration files debian/extra/mysql.cnf etc/mysql/ debian/extra/mysqld.cnf /etc/mysql/mysql.conf.d/ @@ -25,243 +7,14 @@ debian/extra/apparmor.d/usr.sbin.mysqld.in2 etc/apparmor.d/ debian/extra/apparmor.d/old_apparmor etc/apparmor.d/ debian/extra/apparmor.d/local/usr.sbin.mysqld.in etc/apparmor.d/local/ -# debug binary -usr/sbin/mysqld-debug -# man pages -usr/share/man/man1/comp_err.1 -usr/share/man/man1/myisamchk.1 -usr/share/man/man1/myisamlog.1 -usr/share/man/man1/myisampack.1 -usr/share/man/man1/my_print_defaults.1 -usr/share/man/man1/mysql_secure_installation.1 -usr/share/man/man1/mysql_tzinfo_to_sql.1 -usr/share/man/man1/mysqlbinlog.1 -usr/share/man/man1/mysqld_multi.1 -usr/share/man/man1/mysqld_safe.1 -usr/share/man/man1/mysql.server.1 -usr/share/man/man1/ibd2sdi.1 -usr/share/man/man1/perror.1 -usr/share/man/man8/mysqld.8 -# SQL files -usr/share/mysql/*.sql -#private shared libs -usr/lib/mysql/private/libprotobuf-lite.so.* -usr/lib/mysql/private/libprotobuf.so.* -usr/lib/mysql/private/libabsl_bad_any_cast_impl.so -usr/lib/mysql/private/libabsl_bad_optional_access.so -usr/lib/mysql/private/libabsl_bad_variant_access.so -usr/lib/mysql/private/libabsl_base.so -usr/lib/mysql/private/libabsl_city.so -usr/lib/mysql/private/libabsl_civil_time.so -usr/lib/mysql/private/libabsl_cord_internal.so -usr/lib/mysql/private/libabsl_cord.so -usr/lib/mysql/private/libabsl_cordz_functions.so -usr/lib/mysql/private/libabsl_cordz_handle.so -usr/lib/mysql/private/libabsl_cordz_info.so -usr/lib/mysql/private/libabsl_cordz_sample_token.so -usr/lib/mysql/private/libabsl_crc32c.so -usr/lib/mysql/private/libabsl_crc_cord_state.so -usr/lib/mysql/private/libabsl_crc_cpu_detect.so -usr/lib/mysql/private/libabsl_crc_internal.so -usr/lib/mysql/private/libabsl_debugging_internal.so -usr/lib/mysql/private/libabsl_demangle_internal.so -usr/lib/mysql/private/libabsl_die_if_null.so -usr/lib/mysql/private/libabsl_examine_stack.so -usr/lib/mysql/private/libabsl_exponential_biased.so -usr/lib/mysql/private/libabsl_failure_signal_handler.so -usr/lib/mysql/private/libabsl_flags_commandlineflag_internal.so -usr/lib/mysql/private/libabsl_flags_commandlineflag.so -usr/lib/mysql/private/libabsl_flags_config.so -usr/lib/mysql/private/libabsl_flags_internal.so -usr/lib/mysql/private/libabsl_flags_marshalling.so -usr/lib/mysql/private/libabsl_flags_parse.so -usr/lib/mysql/private/libabsl_flags_private_handle_accessor.so -usr/lib/mysql/private/libabsl_flags_program_name.so -usr/lib/mysql/private/libabsl_flags_reflection.so -usr/lib/mysql/private/libabsl_flags.so -usr/lib/mysql/private/libabsl_flags_usage_internal.so -usr/lib/mysql/private/libabsl_flags_usage.so -usr/lib/mysql/private/libabsl_graphcycles_internal.so -usr/lib/mysql/private/libabsl_hash.so -usr/lib/mysql/private/libabsl_hashtablez_sampler.so -usr/lib/mysql/private/libabsl_int128.so -usr/lib/mysql/private/libabsl_kernel_timeout_internal.so -usr/lib/mysql/private/libabsl_leak_check.so -usr/lib/mysql/private/libabsl_log_entry.so -usr/lib/mysql/private/libabsl_log_flags.so -usr/lib/mysql/private/libabsl_log_globals.so -usr/lib/mysql/private/libabsl_log_initialize.so -usr/lib/mysql/private/libabsl_log_internal_check_op.so -usr/lib/mysql/private/libabsl_log_internal_conditions.so -usr/lib/mysql/private/libabsl_log_internal_format.so -usr/lib/mysql/private/libabsl_log_internal_globals.so -usr/lib/mysql/private/libabsl_log_internal_log_sink_set.so -usr/lib/mysql/private/libabsl_log_internal_message.so -usr/lib/mysql/private/libabsl_log_internal_nullguard.so -usr/lib/mysql/private/libabsl_log_internal_proto.so -usr/lib/mysql/private/libabsl_log_severity.so -usr/lib/mysql/private/libabsl_log_sink.so -usr/lib/mysql/private/libabsl_low_level_hash.so -usr/lib/mysql/private/libabsl_malloc_internal.so -usr/lib/mysql/private/libabsl_periodic_sampler.so -usr/lib/mysql/private/libabsl_random_distributions.so -usr/lib/mysql/private/libabsl_random_internal_distribution_test_util.so -usr/lib/mysql/private/libabsl_random_internal_platform.so -usr/lib/mysql/private/libabsl_random_internal_pool_urbg.so -usr/lib/mysql/private/libabsl_random_internal_randen_hwaes_impl.so -usr/lib/mysql/private/libabsl_random_internal_randen_hwaes.so -usr/lib/mysql/private/libabsl_random_internal_randen_slow.so -usr/lib/mysql/private/libabsl_random_internal_randen.so -usr/lib/mysql/private/libabsl_random_internal_seed_material.so -usr/lib/mysql/private/libabsl_random_seed_gen_exception.so -usr/lib/mysql/private/libabsl_random_seed_sequences.so -usr/lib/mysql/private/libabsl_raw_hash_set.so -usr/lib/mysql/private/libabsl_raw_logging_internal.so -usr/lib/mysql/private/libabsl_scoped_set_env.so -usr/lib/mysql/private/libabsl_spinlock_wait.so -usr/lib/mysql/private/libabsl_stacktrace.so -usr/lib/mysql/private/libabsl_statusor.so -usr/lib/mysql/private/libabsl_status.so -usr/lib/mysql/private/libabsl_strerror.so -usr/lib/mysql/private/libabsl_str_format_internal.so -usr/lib/mysql/private/libabsl_strings_internal.so -usr/lib/mysql/private/libabsl_strings.so -usr/lib/mysql/private/libabsl_string_view.so -usr/lib/mysql/private/libabsl_symbolize.so -usr/lib/mysql/private/libabsl_synchronization.so -usr/lib/mysql/private/libabsl_throw_delegate.so -usr/lib/mysql/private/libabsl_time.so -usr/lib/mysql/private/libabsl_time_zone.so -# private data files -usr/lib/mysql/private/icudt7?l/*.icu -usr/lib/mysql/private/icudt7?l/brkitr/* -usr/lib/mysql/private/libicui18n.so.* -usr/lib/mysql/private/libicustubdata.so.* -usr/lib/mysql/private/libicuuc.so.* -# plugins -usr/lib/mysql/plugin/adt_null.so -usr/lib/mysql/plugin/auth_socket.so -usr/lib/mysql/plugin/libpluginmecab.so -usr/lib/mysql/plugin/locking_service.so -usr/lib/mysql/plugin/mypluglib.so -usr/lib/mysql/plugin/mysql_no_login.so -usr/lib/mysql/plugin/rewriter.so -usr/lib/mysql/plugin/test_security_context.so -usr/lib/mysql/plugin/validate_password.so -usr/lib/mysql/plugin/connection_control.so -usr/lib/mysql/plugin/component_keyring_file.so -usr/lib/mysql/plugin/keyring_udf.so -usr/lib/mysql/plugin/component_log_filter_dragnet.so -usr/lib/mysql/plugin/component_log_sink_json.so -usr/lib/mysql/plugin/component_log_sink_syseventlog.so -usr/lib/mysql/plugin/component_validate_password.so -usr/lib/mysql/plugin/component_audit_api_message_emit.so -usr/lib/mysql/plugin/component_query_attributes.so -usr/lib/mysql/plugin/component_test_udf_services.so -usr/lib/mysql/plugin/component_reference_cache.so -usr/lib/mysql/plugin/mysql_clone.so -usr/lib/mysql/plugin/component_mysqlbackup.so -usr/lib/mysql/plugin/component_percona_telemetry.so -usr/lib/mysql/plugin/authentication_webauthn_client.so -usr/lib/mysql/plugin/component_test_server_telemetry_metrics.so -usr/lib/mysql/plugin/component_test_session_var_service.so -usr/lib/mysql/plugin/mysql_native_password.so -usr/lib/mysql/plugin/component_test_server_telemetry_logs_client.so -usr/lib/mysql/plugin/component_test_server_telemetry_logs_export.so -usr/lib/mysql/plugin/authentication_openid_connect_client.so -usr/lib/mysql/plugin/component_connection_control.so -usr/lib/mysql/plugin/component_classic_hashing.so - -usr/lib/mysql/plugin/debug/component_mysqlbackup.so -usr/lib/mysql/plugin/debug/component_percona_telemetry.so -usr/lib/mysql/plugin/debug/mysql_clone.so -usr/lib/mysql/plugin/debug/adt_null.so -usr/lib/mysql/plugin/debug/auth_socket.so -usr/lib/mysql/plugin/debug/libpluginmecab.so -usr/lib/mysql/plugin/debug/locking_service.so -usr/lib/mysql/plugin/debug/mypluglib.so -usr/lib/mysql/plugin/debug/mysql_no_login.so -usr/lib/mysql/plugin/debug/rewriter.so -usr/lib/mysql/plugin/debug/test_security_context.so -usr/lib/mysql/plugin/debug/validate_password.so -usr/lib/mysql/plugin/debug/keyring_udf.so -usr/lib/mysql/plugin/debug/connection_control.so -usr/lib/mysql/plugin/debug/component_keyring_file.so -usr/lib/mysql/plugin/debug/group_replication.so -usr/lib/mysql/plugin/debug/authentication_ldap_sasl_client.so -usr/lib/mysql/plugin/debug/component_test_udf_services.so -usr/lib/mysql/plugin/debug/component_query_attributes.so -usr/lib/mysql/plugin/debug/component_test_component_deinit.so -usr/lib/mysql/plugin/debug/component_reference_cache.so -usr/lib/mysql/plugin/debug/authentication_kerberos_client.so -usr/lib/mysql/plugin/debug/component_test_table_access.so -usr/lib/mysql/plugin/debug/component_test_mysql_system_variable_set.so -usr/lib/mysql/plugin/debug/semisync_replica.so -usr/lib/mysql/plugin/debug/semisync_source.so -usr/lib/mysql/plugin/debug/authentication_webauthn_client.so -usr/lib/mysql/plugin/debug/component_test_server_telemetry_metrics.so -usr/lib/mysql/plugin/debug/component_test_session_var_service.so -usr/lib/mysql/plugin/debug/mysql_native_password.so -usr/lib/mysql/plugin/debug/component_test_server_telemetry_logs_client.so -usr/lib/mysql/plugin/debug/component_test_server_telemetry_logs_export.so -usr/lib/mysql/plugin/debug/authentication_openid_connect_client.so -usr/lib/mysql/plugin/debug/component_connection_control.so -usr/lib/mysql/plugin/debug/component_classic_hashing.so - -# Percona plugins -usr/lib/mysql/plugin/auth_pam.so -usr/lib/mysql/plugin/debug/auth_pam.so -usr/lib/mysql/plugin/auth_pam_compat.so -usr/lib/mysql/plugin/debug/auth_pam_compat.so -usr/lib/mysql/plugin/dialog.so -usr/lib/mysql/plugin/debug/dialog.so -usr/lib/mysql/plugin/connection_control.so -usr/lib/mysql/plugin/group_replication.so -usr/lib/mysql/plugin/authentication_ldap_sasl_client.so -usr/lib/mysql/plugin/debug/component_keyring_vault.so -usr/lib/mysql/plugin/component_keyring_vault.so -usr/lib/mysql/plugin/authentication_ldap_simple.so -usr/lib/mysql/plugin/component_test_component_deinit.so -usr/lib/mysql/plugin/component_binlog_utils_udf.so -usr/lib/mysql/plugin/test_udf_wrappers.so -usr/lib/mysql/plugin/debug/component_binlog_utils_udf.so -usr/lib/mysql/plugin/debug/test_udf_wrappers.so -usr/lib/mysql/plugin/procfs.so -usr/lib/mysql/plugin/debug/procfs.so -usr/lib/mysql/plugin/authentication_kerberos_client.so -usr/lib/mysql/plugin/semisync_replica.so -usr/lib/mysql/plugin/semisync_source.so -usr/lib/mysql/plugin/component_test_table_access.so -usr/lib/mysql/plugin/component_test_mysql_system_variable_set.so -usr/lib/mysql/plugin/authentication_oci_client.so -usr/lib/mysql/plugin/component_keyring_kmip.so -usr/lib/mysql/plugin/debug/authentication_oci_client.so -usr/lib/mysql/plugin/debug/component_keyring_kmip.so -usr/lib/mysql/plugin/component_encryption_udf.so -usr/lib/mysql/plugin/debug/component_encryption_udf.so -usr/lib/mysql/plugin/component_uuid_vx_udf.so -usr/lib/mysql/plugin/debug/component_uuid_vx_udf.so -usr/lib/mysql/plugin/component_keyring_kms.so -usr/lib/mysql/plugin/debug/component_keyring_kms.so -usr/lib/mysql/plugin/authentication_ldap_sasl.so -usr/lib/mysql/plugin/debug/authentication_ldap_sasl.so -usr/lib/mysql/plugin/component_test_mysql_thd_store_service.so -usr/lib/mysql/plugin/debug/component_test_mysql_thd_store_service.so -usr/lib/mysql/plugin/component_test_server_telemetry_traces.so -usr/lib/mysql/plugin/debug/component_test_server_telemetry_traces.so -usr/lib/mysql/plugin/component_audit_log_filter.so -usr/lib/mysql/plugin/debug/component_audit_log_filter.so -usr/lib/mysql/plugin/component_masking_functions.so -usr/lib/mysql/plugin/debug/component_masking_functions.so -usr/lib/mysql/plugin/component_percona_udf.so -usr/lib/mysql/plugin/debug/component_percona_udf.so - - -# support files -usr/share/mysql/dictionary.txt -usr/share/mysql/mysql-log-rotate +# Service support files usr/share/mysql/mysql-helpers usr/share/mysql/mysql-systemd-start usr/share/mysql/mysqld_multi.server -# defaults file + +# Telemetry helper scripts +debian/extra/percona-telemetry-setup.sh usr/libexec/percona-server/ +debian/extra/percona-telemetry-cleanup.sh usr/libexec/percona-server/ + +# Defaults file etc/default/mysql diff --git a/build-ps/debian/percona-server-server.postinst b/build-ps/debian/percona-server-server.postinst index d7142df05c55..dac7f8b18378 100755 --- a/build-ps/debian/percona-server-server.postinst +++ b/build-ps/debian/percona-server-server.postinst @@ -3,13 +3,9 @@ . /usr/share/debconf/confmodule . /usr/share/mysql/mysql-helpers -# Create directory for telemetry -if [ -d /usr/local/percona/telemetry ]; then - mkdir -p /usr/local/percona/telemetry/ps - chown mysql:percona-telemetry /usr/local/percona/telemetry/ps - chmod 775 /usr/local/percona/telemetry/ps - chmod g+s /usr/local/percona/telemetry/ps - chmod u+s /usr/local/percona/telemetry/ps +# Setup telemetry directory +if [ -x /usr/libexec/percona-server/percona-telemetry-setup.sh ]; then + /usr/libexec/percona-server/percona-telemetry-setup.sh || : fi diff --git a/build-ps/debian/rules b/build-ps/debian/rules index bd3dfe910ee0..7708763adc91 100755 --- a/build-ps/debian/rules +++ b/build-ps/debian/rules @@ -52,8 +52,36 @@ else LTO_FLAG = -DWITH_LTO=ON endif +# Use bundled zlib on distros with zlib < 1.2.13 +ifeq ($(DISTRELEASE),focal) + ZLIB_OPTION = -DWITH_ZLIB=bundled +else ifeq ($(DISTRELEASE),jammy) + ZLIB_OPTION = -DWITH_ZLIB=bundled +else ifeq ($(DISTRELEASE),bullseye) + ZLIB_OPTION = -DWITH_ZLIB=bundled +else ifeq ($(DISTRELEASE),buster) + ZLIB_OPTION = -DWITH_ZLIB=bundled +else + ZLIB_OPTION = -DWITH_ZLIB=system +endif + +# Use bundled lz4 on distros with lz4 < 1.9.3 +ifeq ($(DISTRELEASE),focal) + LZ4_OPTION = -DWITH_LZ4=bundled +else ifeq ($(DISTRELEASE),buster) + LZ4_OPTION = -DWITH_LZ4=bundled +else + LZ4_OPTION = -DWITH_LZ4=system +endif + MYSQL_SRC = $(shell pwd) +# Profile-Guided Optimization: set DEB_PGO=1 to enable +ifdef DEB_PGO +PGO_GENERATE = -DFPROFILE_GENERATE=1 +PGO_USE = -DFPROFILE_USE=1 +endif + builddir = builddir builddebug = debug @@ -97,9 +125,9 @@ ifeq ($(SKIP_DEBUG_BINARY),) -DWITH_PROTOBUF=bundled \ -DWITH_RAPIDJSON=bundled \ -DWITH_ICU=bundled \ - -DWITH_ZSTD=bundled \ - -DWITH_ZLIB=bundled \ - -DWITH_LZ4=bundled \ + -DWITH_ZSTD=system \ + $(ZLIB_OPTION) \ + $(LZ4_OPTION) \ -DWITH_EDITLINE=bundled \ -DWITH_LIBEVENT=bundled \ -DWITH_FIDO=bundled \ @@ -113,7 +141,8 @@ ifeq ($(SKIP_DEBUG_BINARY),) endif ( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \ - cmake -DBUILD_CONFIG=mysql_release \ + cmake $(PGO_GENERATE) \ + -DBUILD_CONFIG=mysql_release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DINSTALL_DOCDIR=share/mysql/docs \ -DINSTALL_DOCREADMEDIR=share/mysql \ @@ -148,9 +177,9 @@ endif -DWITH_PROTOBUF=bundled \ -DWITH_RAPIDJSON=bundled \ -DWITH_ICU=bundled \ - -DWITH_ZSTD=bundled \ - -DWITH_LZ4=bundled \ - -DWITH_ZLIB=bundled \ + -DWITH_ZSTD=system \ + $(LZ4_OPTION) \ + $(ZLIB_OPTION) \ -DWITH_EDITLINE=bundled \ -DWITH_LIBEVENT=bundled \ -DWITH_FIDO=bundled \ @@ -178,7 +207,58 @@ endif cd $(builddir) && $(MAKE) -j$(NCPU) VERBOSE=1 - touch $@ +ifdef DEB_PGO + # PGO: Run MTR load to generate profile data, then rebuild + cd $(builddir) && $(MAKE) run-profile-suite && rm -r $$(readlink mysql-test/var) + rm -rf $(builddir) + mkdir $(builddir) && cd $(builddir) && \ + cmake $(PGO_USE) \ + -DBUILD_CONFIG=mysql_release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DINSTALL_DOCDIR=share/mysql/docs \ + -DINSTALL_DOCREADMEDIR=share/mysql \ + -DINSTALL_INCLUDEDIR=include/mysql \ + -DINSTALL_INFODIR=share/mysql/docs \ + -DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \ + -DINSTALL_MANDIR=share/man \ + -DINSTALL_MYSQLSHAREDIR=share/mysql \ + -DINSTALL_MYSQLTESTDIR=lib/mysql-test \ + -DINSTALL_PLUGINDIR=lib/mysql/plugin \ + -DINSTALL_SBINDIR=sbin \ + -DINSTALL_SCRIPTDIR=bin \ + -DINSTALL_SUPPORTFILESDIR=share/mysql \ + -DSYSCONFDIR=/etc/mysql \ + -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCOMPILATION_COMMENT=$(COMPILATION_COMMENT_RELEASE) \ + -DSYSTEM_TYPE="debian-linux-gnu" \ + -DINSTALL_LAYOUT=DEB \ + -DWITH_INNODB_MEMCACHED=ON \ + -DFORCE_INSOURCE_BUILD=1 \ + -DWITH_MECAB=system \ + -DWITH_PAM=ON \ + -DWITH_ROCKSDB=ON \ + -DROCKSDB_DISABLE_AVX2=1 \ + -DROCKSDB_DISABLE_MARCH_NATIVE=1 \ + -DWITH_PACKAGE_FLAGS=OFF \ + -DWITH_SYSTEM_LIBS=ON \ + -DWITH_PROTOBUF=bundled \ + -DWITH_RAPIDJSON=bundled \ + -DWITH_ICU=bundled \ + -DWITH_ZSTD=system \ + $(LZ4_OPTION) \ + $(ZLIB_OPTION) \ + -DWITH_EDITLINE=bundled \ + -DWITH_LIBEVENT=bundled \ + -DWITH_FIDO=bundled \ + -DWITH_ENCRYPTION_UDF=ON \ + -DWITH_NUMA=ON \ + -DWITH_LDAP=system \ + -DWITH_PERCONA_TELEMETRY=ON \ + $(LTO_FLAG) \ + -DWITH_EXTRA_CHARSETS=all $(TOKUDB_OPTS_RELEASE) .. + cd $(builddir) && $(MAKE) -j$(NCPU) VERBOSE=1 +endif override_dh_builddeb: dh_builddeb -- -Zgzip @@ -218,107 +298,30 @@ override_dh_auto_install: install -d $(TMP)/etc/apparmor.d/local override_dh_strip: - dh_strip --dbg-package=percona-server-dbg - dh_strip -Xlibprotobuf-lite - dh_strip -Xlibabsl_bad_any_cast_impl - dh_strip -Xlibabsl_bad_optional_access - dh_strip -Xlibabsl_bad_variant_access - dh_strip -Xlibabsl_base - dh_strip -Xlibabsl_city - dh_strip -Xlibabsl_civil_time - dh_strip -Xlibabsl_cord_internal - dh_strip -Xlibabsl_cord - dh_strip -Xlibabsl_cordz_functions - dh_strip -Xlibabsl_cordz_handle - dh_strip -Xlibabsl_cordz_info - dh_strip -Xlibabsl_cordz_sample_token - dh_strip -Xlibabsl_crc32c - dh_strip -Xlibabsl_crc_cord_state - dh_strip -Xlibabsl_crc_cpu_detect - dh_strip -Xlibabsl_crc_internal - dh_strip -Xlibabsl_debugging_internal - dh_strip -Xlibabsl_demangle_internal - dh_strip -Xlibabsl_die_if_null - dh_strip -Xlibabsl_examine_stack - dh_strip -Xlibabsl_exponential_biased - dh_strip -Xlibabsl_failure_signal_handler - dh_strip -Xlibabsl_flags_commandlineflag_internal - dh_strip -Xlibabsl_flags_commandlineflag - dh_strip -Xlibabsl_flags_config - dh_strip -Xlibabsl_flags_internal - dh_strip -Xlibabsl_flags_marshalling - dh_strip -Xlibabsl_flags_parse - dh_strip -Xlibabsl_flags_private_handle_accessor - dh_strip -Xlibabsl_flags_program_name - dh_strip -Xlibabsl_flags_reflection - dh_strip -Xlibabsl_flags - dh_strip -Xlibabsl_flags_usage_internal - dh_strip -Xlibabsl_flags_usage - dh_strip -Xlibabsl_graphcycles_internal - dh_strip -Xlibabsl_hash - dh_strip -Xlibabsl_hashtablez_sampler - dh_strip -Xlibabsl_int128 - dh_strip -Xlibabsl_kernel_timeout_internal - dh_strip -Xlibabsl_leak_check - dh_strip -Xlibabsl_log_entry - dh_strip -Xlibabsl_log_flags - dh_strip -Xlibabsl_log_globals - dh_strip -Xlibabsl_log_initialize - dh_strip -Xlibabsl_log_internal_check_op - dh_strip -Xlibabsl_log_internal_conditions - dh_strip -Xlibabsl_log_internal_format - dh_strip -Xlibabsl_log_internal_globals - dh_strip -Xlibabsl_log_internal_log_sink_set - dh_strip -Xlibabsl_log_internal_message - dh_strip -Xlibabsl_log_internal_nullguard - dh_strip -Xlibabsl_log_internal_proto - dh_strip -Xlibabsl_log_severity - dh_strip -Xlibabsl_log_sink - dh_strip -Xlibabsl_low_level_hash - dh_strip -Xlibabsl_malloc_internal - dh_strip -Xlibabsl_periodic_sampler - dh_strip -Xlibabsl_random_distributions - dh_strip -Xlibabsl_random_internal_distribution_test_util - dh_strip -Xlibabsl_random_internal_platform - dh_strip -Xlibabsl_random_internal_pool_urbg - dh_strip -Xlibabsl_random_internal_randen_hwaes_impl - dh_strip -Xlibabsl_random_internal_randen_hwaes - dh_strip -Xlibabsl_random_internal_randen_slow - dh_strip -Xlibabsl_random_internal_randen - dh_strip -Xlibabsl_random_internal_seed_material - dh_strip -Xlibabsl_random_seed_gen_exception - dh_strip -Xlibabsl_random_seed_sequences - dh_strip -Xlibabsl_raw_hash_set - dh_strip -Xlibabsl_raw_logging_internal - dh_strip -Xlibabsl_scoped_set_env - dh_strip -Xlibabsl_spinlock_wait - dh_strip -Xlibabsl_stacktrace - dh_strip -Xlibabsl_statusor - dh_strip -Xlibabsl_status - dh_strip -Xlibabsl_strerror - dh_strip -Xlibabsl_str_format_internal - dh_strip -Xlibabsl_strings_internal - dh_strip -Xlibabsl_strings - dh_strip -Xlibabsl_string_view - dh_strip -Xlibabsl_symbolize - dh_strip -Xlibabsl_synchronization - dh_strip -Xlibabsl_throw_delegate - dh_strip -Xlibabsl_time - dh_strip -Xlibabsl_time_zone + dh_strip \ + -Xlibprotobuf-lite -Xlibprotobuf. \ + -Xlibabsl_ \ + -Xlibicu \ + -Xlibmysqlclient.a -Xlibperconaserverclient.a override_dh_shlibdeps: dh_shlibdeps -Lpercona-server-server -l/usr/lib/mysql/private --dpkg-shlibdeps-params=--ignore-missing-info +override_dh_missing: + dh_missing --list-missing + override_dh_install: dh_install + # Install mysqld_pre_systemd if built (requires libsystemd-dev at cmake time) + if [ -f debian/tmp/usr/bin/mysqld_pre_systemd ]; then \ + install -D -m 0755 debian/tmp/usr/bin/mysqld_pre_systemd debian/percona-server-server/usr/bin/mysqld_pre_systemd; \ + fi cp js/LICENSE* debian/percona-server-js/usr/share/doc/percona-server-js/ override_dh_installinit: @echo "RULES.$@" -# dh_apparmor -ppercona-server-server --profile-name=usr.sbin.mysqld -# dh_apparmor -ppercona-mysql-router --profile-name=usr.bin.mysqlrouter - dh_systemd_enable --name=mysql; dh_systemd_enable --no-enable --name=mysql@ - dh_installinit --name=mysql -- defaults 19 21 - dh_installinit --name=mysqlrouter -- defaults 19 21 - dh_systemd_start --restart-after-upgrade - touch $@ + dh_apparmor -ppercona-server-server --profile-name=usr.sbin.mysqld + dh_apparmor -ppercona-mysql-router --profile-name=usr.bin.mysqlrouter + dh_installsystemd --name=mysql + dh_installsystemd --name=mysql@ --no-enable --no-start + dh_installsystemd --name=mysqlrouter diff --git a/build-ps/debian/rules.in b/build-ps/debian/rules.in new file mode 100755 index 000000000000..a55311624372 --- /dev/null +++ b/build-ps/debian/rules.in @@ -0,0 +1,327 @@ +#!/usr/bin/make -f + +%: + dh $@ + +export DH_VERBOSE=1 +export CFLAGS=-Wno-error=free-nonheap-object -Wno-error=implicit-function-declaration +export CXXFLAGS=-Wno-error=free-nonheap-object -Wno-error=implicit-function-declaration +export CPPFLAGS=-Wno-error=free-nonheap-object -Wno-error=implicit-function-declaration + +PACKAGE=percona-server +PS_VERSION_EXTRA = '@PERCONA_SERVER_VERSION@' +REVISION = '@PERCONA_REVISION@' +COMPILATION_COMMENT_RELEASE = "Percona Server (GPL), Release $(PS_VERSION_EXTRA), Revision $(REVISION)" +COMPILATION_COMMENT_DEBUG = "Percona Server - Debug (GPL), Release $(PS_VERSION_EXTRA), Revision $(REVISION)" +TOKUDB_BACKUP_VERSION = "@TOKUDB_BACKUP_VERSION@" + +V8PWD= +TMP=$(CURDIR)/debian/tmp/ +TMPD=$(CURDIR)/debian/tmp-debug/ +prefix=/usr +rpath='$$ORIGIN/../private' + +ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH) +ARCH_OS = $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) +NCPU = $(shell grep -c processor /proc/cpuinfo) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) + +DEB_SOURCE_PACKAGE ?= $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':')) +DEB_VERSION ?= $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') +DEB_NOEPOCH_VERSION ?= $(shell echo $(DEB_VERSION) | cut -d: -f2-) +DEB_UPSTREAM_VERSION ?= $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//') +DEB_UPSTREAM_VERSION_MAJOR_MINOR := $(shell echo $(DEB_UPSTREAM_VERSION) | sed -r -n 's/^([0-9]+\.[0-9]+).*/\1/p') +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +TOKUDB_OPTS_DEFAULT ?= -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) +TOKUDB_OPTS_RELEASE ?= $(TOKUDB_OPTS_DEFAULT) -DTOKU_DEBUG_PARANOID=OFF +TOKUDB_OPTS_DEBUG ?= $(TOKUDB_OPTS_DEFAULT) -DTOKU_DEBUG_PARANOID=ON + +EXPORTED_SOURCE_TARBALL = debian/percona-server-source.tar.gz + +DISTRIBUTION = $(shell lsb_release -i -s) +DISTRELEASE = $(shell lsb_release -c -s) + +# Disable LTO only for focal and bullseye +ifeq ($(DISTRELEASE),focal) + LTO_FLAG = -DWITH_LTO=OFF +else ifeq ($(DISTRELEASE),bullseye) + LTO_FLAG = -DWITH_LTO=OFF +else + LTO_FLAG = -DWITH_LTO=ON +endif + +# Use bundled zlib on distros with zlib < 1.2.13 (focal, jammy, bullseye, buster) +ifeq ($(DISTRELEASE),focal) + ZLIB_OPTION = -DWITH_ZLIB=bundled +else ifeq ($(DISTRELEASE),jammy) + ZLIB_OPTION = -DWITH_ZLIB=bundled +else ifeq ($(DISTRELEASE),bullseye) + ZLIB_OPTION = -DWITH_ZLIB=bundled +else ifeq ($(DISTRELEASE),buster) + ZLIB_OPTION = -DWITH_ZLIB=bundled +else + ZLIB_OPTION = -DWITH_ZLIB=system +endif + +# Use bundled lz4 on distros with lz4 < 1.9.3 +ifeq ($(DISTRELEASE),focal) + LZ4_OPTION = -DWITH_LZ4=bundled +else ifeq ($(DISTRELEASE),buster) + LZ4_OPTION = -DWITH_LZ4=bundled +else + LZ4_OPTION = -DWITH_LZ4=system +endif + +MYSQL_SRC = $(shell pwd) + +# Profile-Guided Optimization: set DEB_PGO=1 to enable +ifdef DEB_PGO +PGO_GENERATE = -DFPROFILE_GENERATE=1 +PGO_USE = -DFPROFILE_USE=1 +endif + +builddir = builddir +builddebug = debug + +override_dh_auto_configure: + @echo "RULES.$@" + +ifeq ($(SKIP_DEBUG_BINARY),) + ( test -d $(builddebug) || mkdir $(builddebug) ) && cd $(builddebug) && \ + cmake -DBUILD_CONFIG=mysql_release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DINSTALL_DOCDIR=share/mysql/docs \ + -DINSTALL_DOCREADMEDIR=share/mysql \ + -DINSTALL_INCLUDEDIR=include/mysql \ + -DINSTALL_INFODIR=share/mysql/docs \ + -DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \ + -DINSTALL_MANDIR=share/man \ + -DINSTALL_MYSQLSHAREDIR=share/mysql \ + -DINSTALL_MYSQLTESTDIR=lib/mysql-test \ + -DINSTALL_PLUGINDIR=lib/mysql/plugin/debug \ + -DINSTALL_SBINDIR=sbin \ + -DINSTALL_SCRIPTDIR=bin \ + -DINSTALL_SUPPORTFILESDIR=share/mysql \ + -DSYSCONFDIR=/etc/mysql \ + -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCOMPILATION_COMMENT=$(COMPILATION_COMMENT_DEBUG) \ + -DSYSTEM_TYPE="debian-linux-gnu" \ + -DINSTALL_LAYOUT=DEB \ + -DWITH_INNODB_MEMCACHED=ON \ + -DWITH_MECAB=system \ + -DWITH_ARCHIVE_STORAGE_ENGINE=ON \ + -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \ + -DWITH_FEDERATED_STORAGE_ENGINE=ON \ + -DWITH_PAM=ON \ + -DWITH_ROCKSDB=ON \ + -DROCKSDB_DISABLE_AVX2=1 \ + -DROCKSDB_DISABLE_MARCH_NATIVE=1 \ + -DFORCE_INSOURCE_BUILD=1 \ + -DWITH_PACKAGE_FLAGS=OFF \ + -DWITH_SYSTEM_LIBS=ON \ + -DWITH_PROTOBUF=bundled \ + -DWITH_RAPIDJSON=bundled \ + -DWITH_ICU=bundled \ + -DWITH_ZSTD=system \ + $(ZLIB_OPTION) \ + $(LZ4_OPTION) \ + -DWITH_EDITLINE=bundled \ + -DWITH_LIBEVENT=bundled \ + -DWITH_FIDO=bundled \ + -DWITH_ENCRYPTION_UDF=ON \ + -DWITH_NUMA=ON \ + -DWITH_LDAP=system \ + -DWITH_PERCONA_TELEMETRY=ON \ + -DWITH_JS_LANG=ON -DV8_INCLUDE_DIR=$(V8PWD)/include -DV8_LIB_DIR=$(V8PWD)/out.gn/static/obj \ + $(LTO_FLAG) \ + -DWITH_EXTRA_CHARSETS=all $(TOKUDB_OPTS_DEBUG) .. +endif + + ( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \ + cmake $(PGO_GENERATE) \ + -DBUILD_CONFIG=mysql_release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DINSTALL_DOCDIR=share/mysql/docs \ + -DINSTALL_DOCREADMEDIR=share/mysql \ + -DINSTALL_INCLUDEDIR=include/mysql \ + -DINSTALL_INFODIR=share/mysql/docs \ + -DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \ + -DINSTALL_MANDIR=share/man \ + -DINSTALL_MYSQLSHAREDIR=share/mysql \ + -DINSTALL_MYSQLTESTDIR=lib/mysql-test \ + -DINSTALL_PLUGINDIR=lib/mysql/plugin \ + -DINSTALL_SBINDIR=sbin \ + -DINSTALL_SCRIPTDIR=bin \ + -DINSTALL_SUPPORTFILESDIR=share/mysql \ + -DSYSCONFDIR=/etc/mysql \ + -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCOMPILATION_COMMENT=$(COMPILATION_COMMENT_RELEASE) \ + -DSYSTEM_TYPE="debian-linux-gnu" \ + -DINSTALL_LAYOUT=DEB \ + -DWITH_INNODB_MEMCACHED=ON \ + -DFORCE_INSOURCE_BUILD=1 \ + -DWITH_MECAB=system \ + -DWITH_ARCHIVE_STORAGE_ENGINE=ON \ + -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \ + -DWITH_FEDERATED_STORAGE_ENGINE=ON \ + -DWITH_PAM=ON \ + -DWITH_ROCKSDB=ON \ + -DROCKSDB_DISABLE_AVX2=1 \ + -DROCKSDB_DISABLE_MARCH_NATIVE=1 \ + -DWITH_PACKAGE_FLAGS=OFF \ + -DWITH_SYSTEM_LIBS=ON \ + -DWITH_PROTOBUF=bundled \ + -DWITH_RAPIDJSON=bundled \ + -DWITH_ICU=bundled \ + -DWITH_ZSTD=system \ + $(LZ4_OPTION) \ + $(ZLIB_OPTION) \ + -DWITH_EDITLINE=bundled \ + -DWITH_LIBEVENT=bundled \ + -DWITH_FIDO=bundled \ + -DWITH_ENCRYPTION_UDF=ON \ + -DWITH_NUMA=ON \ + -DWITH_LDAP=system \ + -DWITH_PERCONA_TELEMETRY=ON \ + -DWITH_JS_LANG=ON -DV8_INCLUDE_DIR=$(V8PWD)/include -DV8_LIB_DIR=$(V8PWD)/out.gn/static/obj \ + $(LTO_FLAG) \ + -DWITH_EXTRA_CHARSETS=all $(TOKUDB_OPTS_RELEASE) .. + + touch $@ + +override_dh_auto_build: + @echo "RULES.$@" + + [ -f $(EXPORTED_SOURCE_TARBALL) ] || tar -zcf $(EXPORTED_SOURCE_TARBALL) \ + --exclude=debian . \ + --transform="s,^\./,percona-server/," + +ifeq ($(SKIP_DEBUG_BINARY),) + # limited to 4 due to WITH_LTO=ON + cd $(builddebug) && $(MAKE) -j4 VERBOSE=1 +endif + + cd $(builddir) && $(MAKE) -j$(NCPU) VERBOSE=1 + +ifdef DEB_PGO + # PGO: Run MTR load to generate profile data, then rebuild + cd $(builddir) && $(MAKE) run-profile-suite && rm -r $$(readlink mysql-test/var) + rm -rf $(builddir) + mkdir $(builddir) && cd $(builddir) && \ + cmake $(PGO_USE) \ + -DBUILD_CONFIG=mysql_release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DINSTALL_DOCDIR=share/mysql/docs \ + -DINSTALL_DOCREADMEDIR=share/mysql \ + -DINSTALL_INCLUDEDIR=include/mysql \ + -DINSTALL_INFODIR=share/mysql/docs \ + -DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \ + -DINSTALL_MANDIR=share/man \ + -DINSTALL_MYSQLSHAREDIR=share/mysql \ + -DINSTALL_MYSQLTESTDIR=lib/mysql-test \ + -DINSTALL_PLUGINDIR=lib/mysql/plugin \ + -DINSTALL_SBINDIR=sbin \ + -DINSTALL_SCRIPTDIR=bin \ + -DINSTALL_SUPPORTFILESDIR=share/mysql \ + -DSYSCONFDIR=/etc/mysql \ + -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCOMPILATION_COMMENT=$(COMPILATION_COMMENT_RELEASE) \ + -DSYSTEM_TYPE="debian-linux-gnu" \ + -DINSTALL_LAYOUT=DEB \ + -DWITH_INNODB_MEMCACHED=ON \ + -DFORCE_INSOURCE_BUILD=1 \ + -DWITH_MECAB=system \ + -DWITH_PAM=ON \ + -DWITH_ROCKSDB=ON \ + -DROCKSDB_DISABLE_AVX2=1 \ + -DROCKSDB_DISABLE_MARCH_NATIVE=1 \ + -DWITH_PACKAGE_FLAGS=OFF \ + -DWITH_SYSTEM_LIBS=ON \ + -DWITH_PROTOBUF=bundled \ + -DWITH_RAPIDJSON=bundled \ + -DWITH_ICU=bundled \ + -DWITH_ZSTD=system \ + $(LZ4_OPTION) \ + $(ZLIB_OPTION) \ + -DWITH_EDITLINE=bundled \ + -DWITH_LIBEVENT=bundled \ + -DWITH_FIDO=bundled \ + -DWITH_ENCRYPTION_UDF=ON \ + -DWITH_NUMA=ON \ + -DWITH_LDAP=system \ + -DWITH_PERCONA_TELEMETRY=ON \ + $(LTO_FLAG) \ + -DWITH_EXTRA_CHARSETS=all $(TOKUDB_OPTS_RELEASE) .. + cd $(builddir) && $(MAKE) -j$(NCPU) VERBOSE=1 +endif + +override_dh_builddeb: + dh_builddeb -- -Zgzip + +override_dh_auto_install: + @echo "RULES.$@" + + # complete install first + (cd $(builddebug) && $(MAKE) install DESTDIR=$(TMPD)/) + (cd $(builddir) && $(MAKE) install DESTDIR=$(TMP)/) + + # add Percona Server configuration file my.cnf to mysql-common package + #install -g root -o root -m 0644 -D debian/extra/my.cnf $(TMP)/etc/mysql/my.cnf + + # add MySQL Server debug binary and library to package + #install -g root -o root -m 0755 debian/extra/server-binary $(TMP)/usr/sbin/mysqld-debug + + # add systemd script + install -m 0755 debian/extra/mysql-systemd-start $(TMP)/usr/share/mysql/ + install -m 0755 debian/extra/mysqlrouter-systemd-start $(TMP)usr/share/mysqlrouter/ + + # install default file for init script timeout params + install -d $(TMP)/etc/default + install -m 0644 debian/extra/default-mysql $(TMP)/etc/default/mysql + # Add helper functions for maintainer scripts + install -m 0644 debian/extra/mysql-helpers debian/tmp/usr/share/mysql/ + # add apparmor profile +# install -g root -o root -m 0644 -D debian/extra/apparmor-profile $(TMP)/etc/apparmor.d/usr.sbin.mysqld +# install -g root -o root -m 0644 -D debian/extra/apparmor-profile-router $(TMP)/etc/apparmor.d/usr.bin.mysqlrouter + + + # install source tarball for source package + install -D -m 0644 $(EXPORTED_SOURCE_TARBALL) $(TMP)/usr/src/percona-server/`basename $(EXPORTED_SOURCE_TARBALL)` + + # install AppArmor profile for Percona Server + install -d $(TMP)/etc/apparmor.d + install -d $(TMP)/etc/apparmor.d/local + +override_dh_strip: + dh_strip \ + -Xlibprotobuf-lite -Xlibprotobuf. \ + -Xlibabsl_ \ + -Xlibicu \ + -Xlibmysqlclient.a -Xlibperconaserverclient.a + +override_dh_shlibdeps: + dh_shlibdeps -Lpercona-server-server -l/usr/lib/mysql/private --dpkg-shlibdeps-params=--ignore-missing-info + +override_dh_missing: + dh_missing --list-missing + +override_dh_install: + dh_install + # Install mysqld_pre_systemd if built (requires libsystemd-dev at cmake time) + if [ -f debian/tmp/usr/bin/mysqld_pre_systemd ]; then \ + install -D -m 0755 debian/tmp/usr/bin/mysqld_pre_systemd debian/percona-server-server/usr/bin/mysqld_pre_systemd; \ + fi + cp js/LICENSE* debian/percona-server-js/usr/share/doc/percona-server-js/ + +override_dh_installinit: + @echo "RULES.$@" + dh_apparmor -ppercona-server-server --profile-name=usr.sbin.mysqld + dh_apparmor -ppercona-mysql-router --profile-name=usr.bin.mysqlrouter + dh_installsystemd --name=mysql + dh_installsystemd --name=mysql@ --no-enable --no-start + dh_installsystemd --name=mysqlrouter diff --git a/build-ps/percona-server-9.0_builder.sh b/build-ps/percona-server-9.0_builder.sh index 6ecc3860b026..3e4da7fe9721 100644 --- a/build-ps/percona-server-9.0_builder.sh +++ b/build-ps/percona-server-9.0_builder.sh @@ -306,17 +306,21 @@ get_sources(){ sed -i "s:V8PWD=:V8PWD=${WORKDIR}/v8:g" build-ps/debian/rules + # Generate debian/rules from template sed -i "s:@@PERCONA_VERSION_EXTRA@@:${MYSQL_VERSION_EXTRA#-}:g" build-ps/debian/rules sed -i "s:@@REVISION@@:${REVISION}:g" build-ps/debian/rules sed -i "s:@@TOKUDB_BACKUP_VERSION@@:${TOKUDB_VERSION}:g" build-ps/debian/rules # - sed -i "s:@@MYSQL_VERSION@@:${MYSQL_VERSION_MAJOR}.${MYSQL_VERSION_MINOR}.${MYSQL_VERSION_PATCH}:g" build-ps/percona-server.spec - sed -i "s:@@PERCONA_VERSION@@:${MYSQL_VERSION_EXTRA#-}:g" build-ps/percona-server.spec - sed -i "s:@@REVISION@@:${REVISION}:g" build-ps/percona-server.spec - sed -i "s:@@RPM_RELEASE@@:${RPM_RELEASE}:g" build-ps/percona-server.spec - if [ "x${RHEL}" = "x6" ]; then - sed -i "s:-DWITH_ENCRYPTION_UDF=ON:-DWITH_ENCRYPTION_UDF=OFF:g" build-ps/percona-server.spec - fi + # Generate percona-server.spec from .spec.in template + PERCONA_VERSION="${MYSQL_VERSION_EXTRA#-}" + MYSQL_VERSION="${MYSQL_VERSION_MAJOR}.${MYSQL_VERSION_MINOR}.${MYSQL_VERSION_PATCH}" + COPYRIGHT_YEAR=$(date +"%Y") + cp build-ps/percona-server.spec.in build-ps/percona-server.spec + sed -i "s:@MYSQL_NO_DASH_VERSION@:${MYSQL_VERSION}:g" build-ps/percona-server.spec + sed -i "s:@PERCONA_SERVER_VERSION@:${PERCONA_VERSION}:g" build-ps/percona-server.spec + sed -i "s:@PERCONA_REVISION@:${REVISION}:g" build-ps/percona-server.spec + sed -i "s:@RPM_RELEASE@:${RPM_RELEASE}:g" build-ps/percona-server.spec + sed -i "s:@MYSQL_COPYRIGHT_YEAR@:${COPYRIGHT_YEAR}:g" build-ps/percona-server.spec cd ${WORKDIR}/percona-server # mv "${WORKDIR}"/v8/LICENSE "${WORKDIR}"/v8/LICENSE.v8.libraries @@ -519,7 +523,7 @@ install_deps() { apt-get -y install dh-systemd || true apt-get -y install copyright-update apt-get -y install curl bison cmake perl libssl-dev libaio-dev libldap2-dev libwrap0-dev gdb unzip gawk - apt-get -y install lsb-release libmecab-dev libncurses5-dev libpam-dev zlib1g-dev libcurl4-openssl-dev + apt-get -y install lsb-release libmecab-dev libncurses5-dev libpam-dev zlib1g-dev libcurl4-openssl-dev libsystemd-dev apt-get -y install libldap2-dev libnuma-dev libjemalloc-dev libc6-dbg valgrind libjson-perl libsasl2-dev patchelf if [ x"${DIST}" = xfocal -o x"${DIST}" = xbullseye -o x"${DIST}" = xjammy -o x"${DIST}" = xbookworm -o x"${DIST}" = xnoble -o x"${DIST}" = xtrixie ]; then apt-get -y install python3-mysqldb @@ -553,7 +557,8 @@ install_deps() { apt-get -y install libudev-dev apt-get -y install build-essential devscripts doxygen doxygen-gui graphviz rsync apt-get -y install cmake autotools-dev autoconf automake build-essential devscripts debconf debhelper fakeroot libaio-dev - apt-get -y install ccache libevent-dev libgsasl7 liblz4-dev libre2-dev libtool po-debconf + apt-get -y install ccache libevent-dev libre2-dev libtool po-debconf liblz4-dev + apt-get -y install libgsasl7 || apt-get -y install gsasl-common || true if [ x"${DIST}" = xfocal -o x"${DIST}" = xbionic -o x"${DIST}" = xdisco -o x"${DIST}" = xbuster -o x"${DIST}" = xbullseye -o x"${DIST}" = xjammy -o x"${DIST}" = xbookworm -o x"${DIST}" = xnoble -o x"${DIST}" = xtrixie ]; then apt-get -y install libeatmydata1 fi @@ -645,28 +650,16 @@ build_srpm(){ mkdir -vp rpmbuild/{SOURCES,SPECS,BUILD,SRPMS,RPMS} # cd ${WORKDIR}/rpmbuild/SPECS - tar vxzf ${WORKDIR}/${TARFILE} --wildcards '*/build-ps/*.spec' --strip=2 + tar vxzf ${WORKDIR}/${TARFILE} --wildcards '*/build-ps/percona-server.spec' --strip=2 # sed -i "/^%changelog/a - Release ${VERSION}-${RELEASE}" percona-server.spec sed -i "/^%changelog/a * $(date "+%a") $(date "+%b") $(date "+%d") $(date "+%Y") Percona Development Team - ${VERSION}-${RELEASE}" percona-server.spec # cd ${WORKDIR}/rpmbuild/SOURCES - wget https://raw.githubusercontent.com/Percona-Lab/telemetry-agent/phase-0/call-home.sh tar vxzf ${WORKDIR}/${TARFILE} --wildcards '*/build-ps/rpm/*.patch' --strip=3 - tar vxzf ${WORKDIR}/${TARFILE} --wildcards '*/build-ps/rpm/filter-provides.sh' --strip=3 - tar vxzf ${WORKDIR}/${TARFILE} --wildcards '*/build-ps/rpm/filter-requires.sh' --strip=3 tar vxzf ${WORKDIR}/${TARFILE} --wildcards '*/build-ps/rpm/mysql_config.sh' --strip=3 - cd ${WORKDIR}/rpmbuild/SPECS - line_number=$(grep -n SOURCE999 percona-server.spec | awk -F ':' '{print $1}') - cp ../SOURCES/call-home.sh ./ - awk -v n=$line_number 'NR <= n {print > "part1.txt"} NR > n {print > "part2.txt"}' percona-server.spec - head -n -1 part1.txt > temp && mv temp part1.txt - echo "cat <<'CALLHOME' > /tmp/call-home.sh" >> part1.txt - cat call-home.sh >> part1.txt - echo "CALLHOME" >> part1.txt - cat part2.txt >> part1.txt - rm -f call-home.sh part2.txt - mv part1.txt percona-server.spec + tar vxzf ${WORKDIR}/${TARFILE} --wildcards '*/build-ps/rpm/percona-telemetry-setup.sh' --strip=3 + tar vxzf ${WORKDIR}/${TARFILE} --wildcards '*/build-ps/rpm/percona-telemetry-cleanup.sh' --strip=3 cd ${WORKDIR} # mv -fv ${TARFILE} ${WORKDIR}/rpmbuild/SOURCES @@ -778,9 +771,6 @@ build_rpm(){ mkdir -vp rpmbuild/{SOURCES,SPECS,BUILD,SRPMS,RPMS} # mv *.src.rpm rpmbuild/SRPMS - if [ "x${RHEL}" = "x6" ]; then - source /opt/rh/devtoolset-8/enable - fi if [ "x${RHEL}" = "x7" ]; then source /opt/rh/devtoolset-11/enable fi @@ -791,11 +781,6 @@ build_rpm(){ build_mecab_dict cd ${WORKDIR} - if [ "x${RHEL}" = "x6" ]; then - source /opt/rh/devtoolset-8/enable - sudo mv /usr/bin/strip /usr/bin/strip_back - sudo ln -s /opt/rh/devtoolset-8/root/usr/bin/strip /usr/bin/strip - fi if [ "x${RHEL}" = "x7" ]; then source /opt/rh/devtoolset-11/enable fi @@ -907,19 +892,7 @@ build_deb(){ cd ${DIRNAME} dch -b -m -D "$DEBIAN_VERSION" --force-distribution -v "${VERSION}-${RELEASE}-${DEB_RELEASE}.${DEBIAN_VERSION}" 'Update distribution' - cd debian/ - wget https://raw.githubusercontent.com/Percona-Lab/telemetry-agent/phase-0/call-home.sh - sed -i 's:exit 0::' percona-server-server.postinst - echo "cat <<'CALLHOME' > /tmp/call-home.sh" >> percona-server-server.postinst - cat call-home.sh >> percona-server-server.postinst - echo "CALLHOME" >> percona-server-server.postinst - echo "bash +x /tmp/call-home.sh -f \"PRODUCT_FAMILY_PS\" -v \"${VERSION}-${RELEASE}-${DEB_RELEASE}\" -d \"PACKAGE\" &>/dev/null || :" >> percona-server-server.postinst - echo "chgrp percona-telemetry /usr/local/percona/telemetry_uuid &>/dev/null || :" >> percona-server-server"${postfix}".postinst - echo "chmod 664 /usr/local/percona/telemetry_uuid &>/dev/null || :" >> percona-server-server"${postfix}".postinst - echo "rm -rf /tmp/call-home.sh" >> percona-server-server.postinst - echo "exit 0" >> percona-server-server.postinst - rm -f call-home.sh - cd ../ + # Telemetry is now handled by percona-telemetry-setup.sh installed via .install file if [ ${DEBIAN_VERSION} != trusty -a ${DEBIAN_VERSION} != xenial -a ${DEBIAN_VERSION} != jessie -a ${DEBIAN_VERSION} != stretch -a ${DEBIAN_VERSION} != artful -a ${DEBIAN_VERSION} != bionic -a ${DEBIAN_VERSION} != focal -a "${DEBIAN_VERSION}" != disco -a "${DEBIAN_VERSION}" != buster -a "${DEBIAN_VERSION}" != hirsute -a "${DEBIAN_VERSION}" != bullseye -a "${DEBIAN_VERSION}" != jammy -a "${DEBIAN_VERSION}" != bookworm -a "${DEBIAN_VERSION}" != noble -a "${DEBIAN_VERSION}" != trixie ]; then gcc47=$(which gcc-4.7 2>/dev/null || true) @@ -964,9 +937,6 @@ build_tarball(){ if [ -f /etc/redhat-release ]; then export OS_RELEASE="centos$(lsb_release -sr | awk -F'.' '{print $1}')" RHEL=$(rpm --eval %rhel) - if [ "x${RHEL}" = "x6" ]; then - source /opt/rh/devtoolset-8/enable - fi if [ "x${RHEL}" = "x7" ]; then source /opt/rh/devtoolset-11/enable fi diff --git a/build-ps/percona-server-minimal.spec.in b/build-ps/percona-server-minimal.spec.in new file mode 100644 index 000000000000..9ad9a4050f9c --- /dev/null +++ b/build-ps/percona-server-minimal.spec.in @@ -0,0 +1,251 @@ +# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) Percona LLC and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# Minimal/Docker-optimized RPM spec for Percona Server +# Produces a single percona-server-minimal package for container use + +%define build_timestamp @MYSQL_COPYRIGHT_YEAR@ +%undefine _missing_build_ids_terminate_build +%global mysql_vendor Oracle and/or its affiliates +%global percona_server_vendor Percona, Inc +%global mysqldatadir /var/lib/mysql + +%global mysql_version @MYSQL_NO_DASH_VERSION@ +%global percona_server_version @PERCONA_SERVER_VERSION@ +%global revision @PERCONA_REVISION@ +%global rpm_release @RPM_RELEASE@ + +%global release %{percona_server_version}.%{rpm_release}%{?dist} + +%{?with_ssl: %global ssl_option -DWITH_SSL=%{with_ssl}} +%{!?with_ssl: %global ssl_option -DWITH_SSL=system} + +%{!?runselftest:%global runselftest 0} +%{!?feature_set: %global feature_set community} +%{!?compilation_comment_release: %global compilation_comment_release Percona Server Minimal (GPL), Release %{percona_server_version}, Revision %{revision}} +%{!?src_base: %global src_base percona-server} + +# Filter auto-requires/provides for private libs and plugins +%global _privatelibs libabsl_.*|libicu.*|libprotobuf.*|libfido2.* +%global _privateperl perl\\\\((GD|hostnames|lib::mtr|lib::v1|mtr_|My::) +%global __requires_exclude ^((%{_privatelibs})|(%{_privateperl})) +%global __provides_exclude_from ^(/usr/share/(mysql|mysql-test)/.*|%{_libdir}/mysql/plugin/.*\\.so|%{_libdir}/mysql/private/.*)$ + +%global src_dir %{src_base}-%{mysql_version}-%{percona_server_version} + +%global license_files_server %{src_dir}/README.md +%global license_type GPLv2 + +Name: percona-server-minimal +Summary: Percona Server - Minimal/Container build +Group: Applications/Databases +Version: %{mysql_version} +Release: %{release} +License: Copyright (c) 2000, %{build_timestamp}, %{mysql_vendor}. All rights reserved. Under %{?license_type} license. +Source0: %{src_dir}.tar.gz +URL: http://www.percona.com/ +Packager: Percona MySQL Development Team +Vendor: %{percona_server_vendor} +Patch0: mysql-5.7-sharedlib-rename.patch +BuildRequires: cmake >= 3.6.1 +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: perl +BuildRequires: libaio-devel +BuildRequires: ncurses-devel +BuildRequires: openssl-devel +BuildRequires: zlib-devel +BuildRequires: lz4-devel +BuildRequires: libzstd-devel +BuildRequires: systemd +BuildRequires: pkgconfig(systemd) +%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 +BuildRequires: libtirpc-devel +BuildRequires: rpcgen +%endif +Provides: MySQL-server%{?_isa} = %{version}-%{release} +Provides: mysql-server = %{version}-%{release} +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +Requires: coreutils grep procps shadow-utils net-tools + +%description +Percona Server minimal build optimized for containers. Includes the server +binary, essential client tools, and shared libraries in a single package. +No test suite, no debug build, no storage engine plugins beyond InnoDB. + +%prep +%setup -q -T -a 0 -c -n %{src_dir} +pushd %{src_dir} +%patch0 -p0 + +%build +mkdir release +( + cd release + cmake ../%{src_dir} \ + -DBUILD_CONFIG=mysql_release \ + -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_C_FLAGS="%{optflags}" \ + -DCMAKE_CXX_FLAGS="%{optflags}" \ + -DWITH_SYSTEMD=1 \ + -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DINSTALL_MYSQLSHAREDIR=share/percona-server \ + -DINSTALL_SUPPORTFILESDIR=share/percona-server \ + -DINSTALL_MYSQLTESTDIR="" \ + -DFEATURE_SET="%{feature_set}" \ + -DWITH_ROUTER=OFF \ + -DWITH_NUMA=OFF \ + -DWITH_ROCKSDB=0 \ + -DWITHOUT_TOKUDB=1 \ + -DWITH_PAM=0 \ + -DWITH_LDAP=none \ + -DWITH_FIDO=none \ + -DWITH_LZ4=system \ + -DWITH_ZLIB=system \ + -DWITH_ZSTD=system \ + -DWITH_PROTOBUF=bundled \ + -DWITH_ICU=bundled \ + -DWITH_EDITLINE=bundled \ + -DWITH_LIBEVENT=bundled \ + -DWITH_PERCONA_TELEMETRY=OFF \ + -DWITH_ENCRYPTION_UDF=OFF \ + -DWITH_COMPONENT_KEYRING_VAULT=OFF \ + -DFORCE_INSOURCE_BUILD=1 \ + -DREPRODUCIBLE_BUILD=OFF \ + %{?ssl_option} \ + -DCOMPILATION_COMMENT="%{compilation_comment_release}" + make %{?_smp_mflags} VERBOSE=1 +) + +%install +MBD=$RPM_BUILD_DIR/%{src_dir} + +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 + +cd $MBD/release +make DESTDIR=%{buildroot} install + +install -d -m 0755 %{buildroot}%{_sysconfdir}/ld.so.conf.d +echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf + +# Remove files not needed in minimal build +rm -rf %{buildroot}%{_infodir}/mysql.info* +rm -rf %{buildroot}%{_datadir}/percona-server/mysql.server +rm -rf %{buildroot}%{_datadir}/percona-server/mysqld_multi.server +rm -f %{buildroot}%{_datadir}/percona-server/win_install_firewall.sql +rm -f %{buildroot}%{_datadir}/percona-server/audit_log_filter_win_install.sql + +%pre +/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || : +/usr/sbin/useradd -M -N -g mysql -o -r -d /var/lib/mysql -s /bin/false \ + -c "Percona Server" -u 27 mysql >/dev/null 2>&1 || : + +%post +if [ ! -e /var/log/mysqld.log ]; then + /usr/bin/install -m0640 -omysql -gmysql /dev/null /var/log/mysqld.log +fi +%systemd_post mysqld.service +if [ $1 == 1 ]; then + /usr/bin/systemctl enable mysqld >/dev/null 2>&1 || : +fi +/sbin/ldconfig + +%preun +%systemd_preun mysqld.service + +%postun +%systemd_postun_with_restart mysqld.service +/sbin/ldconfig + +%files +%defattr(-, root, root, -) +%doc %{?license_files_server} + +# Server +%attr(755, root, root) %{_sbindir}/mysqld +%attr(755, root, root) %{_bindir}/mysqld_pre_systemd +%attr(755, root, root) %{_bindir}/mysqld_safe +%attr(755, root, root) %{_bindir}/my_print_defaults +%attr(755, root, root) %{_bindir}/mysql_secure_installation +%attr(755, root, root) %{_bindir}/mysql_tzinfo_to_sql +%attr(755, root, root) %{_bindir}/mysqldumpslow +%attr(755, root, root) %{_bindir}/perror +%attr(755, root, root) %{_bindir}/ps_mysqld_helper +%attr(755, root, root) %{_bindir}/innochecksum +%attr(755, root, root) %{_bindir}/ibd2sdi + +# Client tools +%attr(755, root, root) %{_bindir}/mysql +%attr(755, root, root) %{_bindir}/mysqladmin +%attr(755, root, root) %{_bindir}/mysqldump +%attr(755, root, root) %{_bindir}/mysqlcheck +%attr(755, root, root) %{_bindir}/mysqlbinlog +%attr(755, root, root) %{_bindir}/mysqlimport +%attr(755, root, root) %{_bindir}/mysqlshow +%attr(755, root, root) %{_bindir}/mysql_config_editor + +# Shared libraries +%dir %attr(755, root, root) %{_libdir}/mysql +%{_libdir}/mysql/libmysqlclient.so.* +%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf + +# Private libraries +%dir %{_libdir}/mysql/private +%{_libdir}/mysql/private/libprotobuf*.so.* +%{_libdir}/mysql/private/libabsl_*.so +%{_libdir}/mysql/private/libicui18n.so.* +%{_libdir}/mysql/private/libicustubdata.so.* +%{_libdir}/mysql/private/libicuuc.so.* + +# Essential plugins +%dir %{_libdir}/mysql/plugin +%{_libdir}/mysql/plugin/component_validate_password.so +%{_libdir}/mysql/plugin/component_log_sink_json.so +%{_libdir}/mysql/plugin/component_log_sink_syseventlog.so +%{_libdir}/mysql/plugin/component_log_filter_dragnet.so +%{_libdir}/mysql/plugin/mysql_clone.so +%{_libdir}/mysql/plugin/group_replication.so +%{_libdir}/mysql/plugin/component_keyring_file.so +%{_libdir}/mysql/plugin/component_mysqlbackup.so +%{_libdir}/mysql/plugin/mysql_native_password.so + +# 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 + +# Data directories +%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 + +# Data files +%{_datadir}/percona-server/ + +# Man pages +%attr(644, root, root) %{_mandir}/man1/mysql.1* +%attr(644, root, root) %{_mandir}/man1/mysqladmin.1* +%attr(644, root, root) %{_mandir}/man1/mysqldump.1* +%attr(644, root, root) %{_mandir}/man8/mysqld.8* + +%changelog +* Sun Mar 23 2026 Percona Development Team +- Initial minimal/container-optimized package diff --git a/build-ps/percona-server.spec b/build-ps/percona-server.spec.in similarity index 93% rename from build-ps/percona-server.spec rename to build-ps/percona-server.spec.in index 3dc341cc8103..c5171a9afaeb 100644 --- a/build-ps/percona-server.spec +++ b/build-ps/percona-server.spec.in @@ -22,17 +22,17 @@ # NOTE: "vendor" is used in upgrade/downgrade check, so you can't # change these, has to be exactly as is. -%define build_timestamp %(date +"%Y") +%define build_timestamp @MYSQL_COPYRIGHT_YEAR@ %undefine _missing_build_ids_terminate_build %global mysql_vendor Oracle and/or its affiliates %global percona_server_vendor Percona, Inc %global mysqldatadir /var/lib/mysql -%global mysql_version @@MYSQL_VERSION@@ -%global percona_server_version @@PERCONA_VERSION@@ -%global revision @@REVISION@@ +%global mysql_version @MYSQL_NO_DASH_VERSION@ +%global percona_server_version @PERCONA_SERVER_VERSION@ +%global revision @PERCONA_REVISION@ %global tokudb_backup_version %{mysql_version}-%{percona_server_version} -%global rpm_release @@RPM_RELEASE@@ +%global rpm_release @RPM_RELEASE@ %global release %{percona_server_version}.%{rpm_release}%{?dist} @@ -64,12 +64,9 @@ # Regression tests may take a long time, override the default to skip them %{!?runselftest:%global runselftest 0} -%{!?with_systemd: %global systemd 0} -%{?el7: %global systemd 1} -%{?el8: %global systemd 1} -%{?el9: %global systemd 1} -%{?el10: %global systemd 1} -%{?amzn2023: %global systemd 1} +# Profile-Guided Optimization: pass --define 'with_pgo 1' to rpmbuild +%{?with_pgo: %global pgo 1} + %{!?with_debuginfo: %global nodebuginfo 0} %{!?product_suffix: %global product_suffix -80} %{!?feature_set: %global feature_set community} @@ -95,32 +92,26 @@ %global ROCKSDB_FLAGS -DWITH_ROCKSDB=0 %endif -# On rhel 5/6 we still have renamed library to libperconaserverclient -%if 0%{?rhel} > 6 || 0%{?amzn} >= 2023 - %global shared_lib_pri_name mysqlclient - %global shared_lib_sec_name perconaserverclient -%else - %global shared_lib_pri_name mysqlclient - %global shared_lib_sec_name perconaserverclient -%endif +%global shared_lib_pri_name mysqlclient +%global shared_lib_sec_name perconaserverclient # Version for compat libs -%if 0%{?rhel} == 7 || 0%{?rhel} == 8 +%if 0%{?rhel} == 7 %global compat_prefix 56 %global compatver 5.6.51 %global percona_compatver 91.0 %global compatlib 18 -%global compatsrc https://downloads.percona.com/downloads/Percona-Server-5.6/Percona-Server-%{compatver}-%{percona_compatver}/binary/redhat/7/x86_64/Percona-Server-shared-56-%{compatver}-rel%{percona_compatver}.1.el7.x86_64.rpm +%global compatsrc https://downloads.percona.com/downloads/Percona-Server-5.6/Percona-Server-%{compatver}-%{percona_compatver}/binary/redhat/7/%{_arch}/Percona-Server-shared-56-%{compatver}-rel%{percona_compatver}.1.el7.%{_arch}.rpm %endif -%if 0%{?rhel} == 6 -%global compat_prefix 51 -%global compatver 5.1.73 -%global percona_compatver 14.12 -%global compatlib 16 -%global compatsrc https://downloads.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.73-rel14.12/RPM/rhel6/x86_64/Percona-Server-shared-51-5.1.73-rel14.12.624.rhel6.x86_64.rpm +%if 0%{?rhel} == 8 || 0%{?rhel} == 9 +%global compatver 8.0.37 +%global percona_compatver 29 +%global compatlib 21 +%global compatsrc https://repo.percona.com/ps-80/yum/release/8/RPMS/%{_arch}/percona-server-shared-%{compatver}-%{percona_compatver}.1.el8.%{_arch}.rpm %endif + # multiarch %global multiarchs ppc %{power64} %{ix86} x86_64 %{sparc} @@ -155,9 +146,8 @@ URL: http://www.percona.com/ Packager: Percona MySQL Development Team Vendor: %{percona_server_vendor} Source5: mysql_config.sh -Source90: filter-provides.sh -Source91: filter-requires.sh -Source999: call-home.sh +Source11: percona-telemetry-setup.sh +Source12: percona-telemetry-cleanup.sh Patch0: mysql-5.7-sharedlib-rename.patch BuildRequires: cmake >= 2.8.2 BuildRequires: gcc @@ -207,10 +197,8 @@ 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 %if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 @@ -226,15 +214,11 @@ BuildRequires: devtoolset-8-gcc-c++ %endif BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) -%if 0%{?rhel} > 6 || 0%{?amzn} >= 2023 -# 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)$ -%else -# https://fedoraproject.org/wiki/EPEL:Packaging#Generic_Filtering_on_EPEL6 -%global __perl_provides %{SOURCE90} -%global __perl_requires %{SOURCE91} -%endif +# Filter auto-requires/provides for private libs, plugins, and test Perl modules +%global _privatelibs libabsl_.*|libicu.*|libprotobuf.*|libmysqlharness\\.so.*|libmysqlharness_stdx\\.so.*|libmysqlharness_tls\\.so.*|libmysqlrouter\\.so\\..*|libmysqlrouter_.*\\.so\\..*|libfido2.* +%global _privateperl perl\\\\((GD|hostnames|lib::mtr|lib::v1|mtr_|My::) +%global __requires_exclude ^((%{_privatelibs})|(%{_privateperl})) +%global __provides_exclude_from ^(/usr/share/(mysql|mysql-test)/.*|%{_libdir}/mysql/plugin/.*\\.so|%{_libdir}/mysql/private/.*|%{_libdir}/mysqlrouter/.*|%{_libdir}/mysqlrouter/private/.*)$ %description The Percona Server software delivers a very fast, multi-threaded, multi-user, @@ -277,15 +261,9 @@ 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 %if 0%{?rhel} == 8 Obsoletes: mariadb-connector-c-config @@ -315,6 +293,7 @@ package "percona-server-client" as well! Summary: Percona Server - Client Group: Applications/Databases Requires: percona-server-shared +Requires: percona-server-client-plugins = %{version}-%{release} 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 @@ -377,9 +356,7 @@ 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 -%if 0%{?rhel} > 6 || 0%{?amzn} >= 2023 Obsoletes: mariadb-devel -%endif %description -n percona-server-devel This package contains the development header files and libraries necessary @@ -408,31 +385,42 @@ Requires(pre): percona-server-shared-compat This package contains the shared libraries (*.so*) which certain languages and applications need to dynamically load and use Percona Server. +%package -n percona-server-client-plugins +Summary: Percona Server - Client Plugins +Group: Applications/Databases +Provides: mysql-client-plugins = %{version}-%{release} +Provides: mysql-client-plugins%{?_isa} = %{version}-%{release} + +%description -n percona-server-client-plugins +This package contains shared plugins for Percona Server client applications, +including authentication plugins for LDAP, Kerberos, WebAuthn, OpenID Connect, +and OCI. + %ifarch x86_64 %if 0%{?compatlib} %package -n percona-server-shared-compat -Summary: Shared compat libraries for Percona Server %{compatver}-%{percona_compatver} database client applications +Summary: Shared compat libraries for Percona Server 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} -%if 0%{?rhel} > 6 +%if 0%{?rhel} == 7 Provides: libmysqlclient.so.18()(64bit) Provides: libmysqlclient.so.18(libmysqlclient_16)(64bit) Provides: libmysqlclient.so.18(libmysqlclient_18)(64bit) -Obsoletes: mariadb-libs -%else -Obsoletes: mysql-libs %endif +%if 0%{?rhel} == 8 || 0%{?rhel} == 9 +Provides: libmysqlclient.so.21()(64bit) +Provides: libmysqlclient.so.21(libmysqlclient_21)(64bit) +%endif +Obsoletes: mariadb-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 percona-server-shared-compat -This package contains the shared compat libraries for Percona Server %{compatver}-%{percona_compatver} client -applications. +This package contains the shared compat libraries for database client applications. %endif %endif @@ -525,8 +513,10 @@ if [ "x$(id -u)" = "x0" ] ; then fi %endif -# Download compat libs +# Download/build compat libs %if 0%{?compatlib} +%if 0%{?rhel} == 7 +# EL7: download prebuilt Percona Server 5.6 shared lib (.so.18) ( rm -rf percona-compatlib mkdir percona-compatlib @@ -540,14 +530,31 @@ fi sleep 1 timeout=$((timeout - 1)) done -%if 0%{?rhel} > 6 - rpm2cpio Percona-Server-shared-%{compat_prefix}-%{compatver}-rel%{percona_compatver}.1.el7.x86_64.rpm | cpio --extract --make-directories --verbose -%else - rpm2cpio Percona-Server-shared-%{compat_prefix}-%{compatver}-rel%{percona_compatver}.624.rhel6.x86_64.rpm | cpio --extract --make-directories --verbose -%endif # 0%{?rhel} > 6 + rpm2cpio $(basename %{compatsrc}) | cpio --extract --make-directories --verbose + popd +) +%endif # rhel == 7 + +%if 0%{?rhel} == 8 || 0%{?rhel} == 9 +# EL8/9: download prebuilt Percona Server 8.0 shared lib (.so.21) +( + rm -rf percona-compatlib + mkdir percona-compatlib + pushd percona-compatlib + wget --no-check-certificate %{compatsrc} + timeout=10 + while [ $timeout -gt 0 ]; do + if [ -s "$(basename %{compatsrc})" ]; then + break + fi + sleep 1 + timeout=$((timeout - 1)) + done + rpm2cpio $(basename %{compatsrc}) | cpio --extract --make-directories --verbose popd ) -%endif # 0%{?compatlib} +%endif # rhel == 8 || rhel == 9 +%endif # compatlib # Build debug versions of mysqld and libmysqld.a mkdir debug @@ -564,9 +571,7 @@ mkdir debug -DUSE_LD_LLD=0 \ -DWITH_AUTHENTICATION_CLIENT_PLUGINS=1 \ -DWITH_CURL=system \ -%if 0%{?systemd} -DWITH_SYSTEMD=1 \ -%endif -DWITH_INNODB_MEMCACHED=1 \ -DINSTALL_LIBDIR="%{_lib}/mysql" \ -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ @@ -615,6 +620,7 @@ mkdir release ( cd release cmake ../%{src_dir} \ + %{?pgo:-DFPROFILE_GENERATE=1} \ -DBUILD_CONFIG=mysql_release \ -DINSTALL_LAYOUT=RPM \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ @@ -623,9 +629,74 @@ mkdir release -DUSE_LD_LLD=0 \ -DWITH_AUTHENTICATION_CLIENT_PLUGINS=1 \ -DWITH_CURL=system \ -%if 0%{?systemd} -DWITH_SYSTEMD=1 \ + -DWITH_INNODB_MEMCACHED=1 \ + -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DINSTALL_MYSQLSHAREDIR=share/percona-server \ + -DINSTALL_SUPPORTFILESDIR=share/percona-server \ + -DFEATURE_SET="%{feature_set}" \ + -DWITH_PAM=1 \ + -DWITH_ROCKSDB=1 \ + -DROCKSDB_DISABLE_AVX2=1 \ + -DROCKSDB_DISABLE_MARCH_NATIVE=1 \ + -DWITH_INNODB_MEMCACHED=1 \ + -DMYSQL_MAINTAINER_MODE=OFF \ + -DFORCE_INSOURCE_BUILD=1 \ + -DWITH_NUMA=1 \ + -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_EDITLINE=bundled \ + -DWITH_LIBEVENT=bundled \ + -DWITH_ZSTD=bundled \ + -DWITH_PERCONA_TELEMETRY=ON \ +%if 0%{?add_fido_plugins} + -DWITH_FIDO=bundled \ +%else + -DWITH_FIDO=none \ %endif + -DWITH_ENCRYPTION_UDF=ON \ + -DWITH_COMPONENT_KEYRING_VAULT=ON \ +%if 0%{?rhel} > 8 + -DWITH_LTO=ON \ +%endif + %{?ssl_option} \ + %{?mecab_option} \ + %{?js_lang_option} \ + -DCOMPILATION_COMMENT="%{compilation_comment_release}" %{TOKUDB_FLAGS} %{TOKUDB_DEBUG_OFF} %{ROCKSDB_FLAGS} + make %{?_smp_mflags} VERBOSE=1 +) + +# PGO second pass: rebuild with profile data +%if 0%{?pgo} +( + # Run MTR load to generate profile data + pushd release + make run-profile-suite + rm -r $(readlink mysql-test/var) + popd + + # Rebuild with profile data + rm -rf release + mkdir release && pushd release + cmake ../%{src_dir} \ + -DFPROFILE_USE=1 \ + -DBUILD_CONFIG=mysql_release \ + -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_C_FLAGS="%{optflags}" \ + -DCMAKE_CXX_FLAGS="%{optflags}" \ + -DUSE_LD_LLD=0 \ + -DWITH_AUTHENTICATION_CLIENT_PLUGINS=1 \ + -DWITH_CURL=system \ + -DWITH_SYSTEMD=1 \ -DWITH_INNODB_MEMCACHED=1 \ -DINSTALL_LIBDIR="%{_lib}/mysql" \ -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ @@ -652,7 +723,7 @@ mkdir release -DWITH_EDITLINE=bundled \ -DWITH_LIBEVENT=bundled \ -DWITH_ZSTD=bundled \ - -DWITH_PERCONA_TELEMETRY=ON \ + -DWITH_PERCONA_TELEMETRY=ON \ %if 0%{?add_fido_plugins} -DWITH_FIDO=bundled \ %else @@ -668,19 +739,23 @@ mkdir release %{?js_lang_option} \ -DCOMPILATION_COMMENT="%{compilation_comment_release}" %{TOKUDB_FLAGS} %{TOKUDB_DEBUG_OFF} %{ROCKSDB_FLAGS} make %{?_smp_mflags} VERBOSE=1 + popd ) +%endif # pgo %install %ifarch x86_64 %if 0%{?compatlib} # Install compat libs - %if 0%{?rhel} > 6 - install -D -m 0755 percona-compatlib/usr/lib64/libmysqlclient.so.18.1.0 %{buildroot}%{_libdir}/mysql/libmysqlclient.so.18.1.0 - install -D -m 0755 percona-compatlib/usr/lib64/libmysqlclient_r.so.18.1.0 %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so.18.1.0 - %else - install -D -m 0755 percona-compatlib/usr/lib64/libmysqlclient.so.16.0.0 %{buildroot}%{_libdir}/mysql/libmysqlclient.so.16.0.0 - install -D -m 0755 percona-compatlib/usr/lib64/libmysqlclient_r.so.16.0.0 %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so.16.0.0 - %endif # 0%{?rhel} > 6 + %if 0%{?rhel} == 7 + install -D -m 0755 percona-compatlib/usr/lib64/libmysqlclient.so.18.1.0 %{buildroot}%{_libdir}/mysql/libmysqlclient.so.18.1.0 + install -D -m 0755 percona-compatlib/usr/lib64/libmysqlclient_r.so.18.1.0 %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so.18.1.0 + %endif + %if 0%{?rhel} == 8 || 0%{?rhel} == 9 + for lib in percona-compatlib/usr/lib64/mysql/libmysqlclient.so.%{compatlib}*; do + install -D -m 0755 "$lib" %{buildroot}%{_libdir}/mysql/$(basename "$lib") + done + %endif %endif # 0%{?compatlib} %endif # arch x86_64 @@ -707,12 +782,11 @@ install -D -m 0644 $MBD/release/support-files/mysql-log-rotate %{buildroot}%{_sy install -D -m 0644 $MBD/%{src_dir}/build-ps/rpm/mysqld.cnf %{buildroot}%{_sysconfdir}/my.cnf install -d %{buildroot}%{_sysconfdir}/my.cnf.d -#%if 0%{?systemd} -#%else -%if 0%{?rhel} < 7 -%if 0%{?amzn} != 2023 - install -D -m 0755 $MBD/%{src_dir}/build-ps/rpm/mysql.init %{buildroot}%{_sysconfdir}/init.d/mysql -%endif +# Install telemetry helper scripts +%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 +install -d %{buildroot}%{_libexecdir}/percona-server +install -D -m 0755 %{SOURCE11} %{buildroot}%{_libexecdir}/percona-server/percona-telemetry-setup.sh +install -D -m 0755 %{SOURCE12} %{buildroot}%{_libexecdir}/percona-server/percona-telemetry-cleanup.sh %endif # Add libdir to linker @@ -725,10 +799,6 @@ echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/mysql-%{_arch} 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 @@ -802,25 +872,13 @@ 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 +%systemd_post mysqld.service +if [ $1 == 1 ]; then + /usr/bin/systemctl enable mysqld >/dev/null 2>&1 || : +fi %if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 -mkdir -p %{ps_telemetry} -chown mysql:percona-telemetry %{ps_telemetry} -chmod 775 %{ps_telemetry} -chmod g+s %{ps_telemetry} -chmod u+s %{ps_telemetry} -chcon -t mysqld_db_t %{ps_telemetry} -chcon -u system_u %{ps_telemetry} +%{_libexecdir}/percona-server/percona-telemetry-setup.sh || : %endif if [ -d /etc/percona-server.conf.d ]; then @@ -830,26 +888,13 @@ if [ -d /etc/percona-server.conf.d ]; then fi fi -cp %SOURCE999 /tmp/ 2>/dev/null || -bash /tmp/call-home.sh -f "PRODUCT_FAMILY_PS" -v %{mysql_version}-%{percona_server_version}-%{rpm_release} -d "PACKAGE" &>/dev/null || : -chgrp percona-telemetry /usr/local/percona/telemetry_uuid &>/dev/null || : -chmod 664 /usr/local/percona/telemetry_uuid &>/dev/null || : -rm -f /tmp/call-home.sh - echo "Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit." echo "Run the following command to install these functions (fnv_64, fnv1a_64, murmur_hash):" echo "mysql -e \"INSTALL COMPONENT 'file://component_percona_udf'\"" echo "See http://www.percona.com/doc/percona-server/9.0/management/udf_percona_toolkit.html for more details" %preun -n percona-server-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 +%systemd_preun mysqld.service if [ "$1" = 0 ]; then if [ -L %{_datadir}/mysql ]; then rm %{_datadir}/mysql @@ -861,15 +906,9 @@ if [ "$1" = 0 ]; then fi %postun -n percona-server-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 +%systemd_postun_with_restart mysqld.service %if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 -rm -rf %{ps_telemetry} +%{_libexecdir}/percona-server/percona-telemetry-cleanup.sh || : %endif %posttrans -n percona-server-server @@ -901,42 +940,32 @@ fi %ifarch x86_64 %if 0%{?compatlib} -%if 0%{?rhel} > 6 %post -n percona-server-shared-compat +%if 0%{?rhel} == 7 for lib in libmysqlclient{.so.18.0.0,.so.18,_r.so.18.0.0,_r.so.18}; do if [ ! -f %{_libdir}/mysql/${lib} ]; then ln -s libmysqlclient.so.18.1.0 %{_libdir}/mysql/${lib}; fi done +%endif /sbin/ldconfig %postun -n percona-server-shared-compat +%if 0%{?rhel} == 7 for lib in libmysqlclient{.so.18.0.0,.so.18,_r.so.18.0.0,_r.so.18}; do if [ -h %{_libdir}/mysql/${lib} ]; then rm -f %{_libdir}/mysql/${lib}; fi done -/sbin/ldconfig -%else -%post -n percona-server-shared-compat -for lib in libmysqlclient{.so.16.0.0,.so.16,_r.so.16.0.0,_r.so.16}; do - if [ ! -f %{_libdir}/mysql/${lib} ]; then - ln -s libmysqlclient.so.16.1.0 %{_libdir}/mysql/${lib}; - fi -done -/sbin/ldconfig - -%postun -n percona-server-shared-compat -for lib in libmysqlclient{.so.16.0.0,.so.16,_r.so.16.0.0,_r.so.16}; do - if [ -h %{_libdir}/mysql/${lib} ]; then - rm -f %{_libdir}/mysql/${lib}; - fi -done -/sbin/ldconfig %endif +/sbin/ldconfig %endif %endif +%post -n percona-server-client-plugins -p /sbin/ldconfig + +%postun -n percona-server-client-plugins -p /sbin/ldconfig + %if 0%{?tokudb} %post -n percona-server-tokudb if [ $1 -eq 1 ] ; then @@ -964,31 +993,14 @@ fi %post -n percona-mysql-router /sbin/ldconfig -%if 0%{?systemd} %systemd_post mysqlrouter.service -%else -/sbin/chkconfig --add mysqlrouter -%endif # systemd %preun -n percona-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 percona-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 percona-server-server @@ -1004,21 +1016,11 @@ fi %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/mysqlman.1* %attr(644, root, root) %{_mandir}/man1/mysql_tzinfo_to_sql.1* %attr(644, root, root) %{_mandir}/man1/perror.1* -%if 0%{?rhel} < 7 -%if 0%{?amzn} != 2023 -%attr(644, root, root) %{_mandir}/man1/mysql.server.1* -%endif -%endif %config(noreplace) %{_sysconfdir}/my.cnf %dir %{_sysconfdir}/my.cnf.d @@ -1037,13 +1039,8 @@ fi %attr(755, root, root) %{_bindir}/ps_mysqld_helper %attr(755, root, root) %{_bindir}/perror %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 @@ -1134,9 +1131,6 @@ fi %attr(755, root, root) %{_libdir}/mysql/private/libabsl_throw_delegate.so %attr(755, root, root) %{_libdir}/mysql/private/libabsl_time.so %attr(755, root, root) %{_libdir}/mysql/private/libabsl_time_zone.so -%if 0%{?add_fido_plugins} -%attr(755, root, root) %{_libdir}/mysql/private/libfido2.so.* -%endif # add_fido_plugins %attr(755, root, root) %{_libdir}/mysql/private/libicui18n.so.* %attr(755, root, root) %{_libdir}/mysql/private/libicustubdata.so.* %attr(755, root, root) %{_libdir}/mysql/private/libicuuc.so.* @@ -1144,8 +1138,6 @@ fi %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/authentication_kerberos_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 @@ -1186,17 +1178,12 @@ fi %attr(755, root, root) %{_libdir}/mysql/plugin/component_test_mysql_thd_store_service.so %attr(755, root, root) %{_libdir}/mysql/plugin/component_test_server_telemetry_traces.so %attr(755, root, root) %{_libdir}/mysql/plugin/component_audit_log_filter.so -%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 -%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_webauthn_client.so -%endif %attr(755, root, root) %{_libdir}/mysql/plugin/component_test_server_telemetry_metrics.so %attr(755, root, root) %{_libdir}/mysql/plugin/component_keyring_file.so %attr(755, root, root) %{_libdir}/mysql/plugin/component_test_execute_prepared_statement.so %attr(755, root, root) %{_libdir}/mysql/plugin/component_test_execute_regular_statement.so %attr(755, root, root) %{_libdir}/mysql/plugin/component_test_mysql_signal_handler.so %attr(755, root, root) %{_libdir}/mysql/plugin/component_test_session_var_service.so -%attr(755, root, root) %{_libdir}/mysql/plugin/mysql_native_password.so -%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_openid_connect_client.so %attr(755, root, root) %{_libdir}/mysql/plugin/component_test_server_telemetry_logs_client.so %attr(755, root, root) %{_libdir}/mysql/plugin/component_test_server_telemetry_logs_export.so %attr(755, root, root) %{_libdir}/mysql/plugin/component_test_component_deinit_no_deadlock.so @@ -1211,8 +1198,6 @@ fi %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/authentication_kerberos_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 @@ -1254,19 +1239,14 @@ fi %attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_audit_log_filter.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_keyring_file.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_session_var_service.so -%attr(755, root, root) %{_libdir}/mysql/plugin/debug/mysql_native_password.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_server_telemetry_logs_client.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_server_telemetry_logs_export.so -%attr(755, root, root) %{_libdir}/mysql/plugin/debug/authentication_openid_connect_client.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_component_deinit_no_deadlock.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_component_init_fail.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_component_init_then_register.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_udf_aggregate.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_classic_hashing.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_mysql_file_service.so -%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 -%attr(755, root, root) %{_libdir}/mysql/plugin/debug/authentication_webauthn_client.so -%endif %attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_server_telemetry_metrics.so %if 0%{?mecab} %{_libdir}/mysql/mecab @@ -1291,8 +1271,6 @@ fi %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/dialog.so -%attr(755, root, root) %{_libdir}/mysql/plugin/debug/dialog.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/component_keyring_vault.so @@ -1302,10 +1280,8 @@ fi %attr(755, root, root) %{_libdir}/mysql/plugin/authentication_ldap_sasl.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/authentication_ldap_sasl.so -%if 0%{?rhel} > 6 || 0%{?amzn} >= 2023 %attr(755, root, root) %{_libdir}/mysql/plugin/component_encryption_udf.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_encryption_udf.so -%endif %attr(755, root, root) %{_libdir}/mysql/plugin/component_uuid_vx_udf.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_uuid_vx_udf.so %attr(755, root, root) %{_libdir}/mysql/plugin/component_keyring_kms.so @@ -1326,12 +1302,13 @@ fi %attr(644, root, root) %{_datadir}/percona-server/install_rewriter.sql %attr(644, root, root) %{_datadir}/percona-server/uninstall_rewriter.sql %attr(644, root, root) %{_datadir}/percona-server/audit_log_filter_linux_install.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 +%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 +%dir %{_libexecdir}/percona-server +%attr(755, root, root) %{_libexecdir}/percona-server/percona-telemetry-setup.sh +%attr(755, root, root) %{_libexecdir}/percona-server/percona-telemetry-cleanup.sh %endif %attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql %dir %attr(751, mysql, mysql) /var/lib/mysql @@ -1369,9 +1346,7 @@ fi #%attr(755, root, root) %{_datadir}/percona-server/mysql_system_users.sql # %attr(755, root, root) %{_libdir}/mysql/plugin/component_keyring_kmip.so -%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_oci_client.so %attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_keyring_kmip.so -%attr(755, root, root) %{_libdir}/mysql/plugin/debug/authentication_oci_client.so %files -n percona-server-client @@ -1424,6 +1399,30 @@ fi %attr(755, root, root) %{_includedir}/coredumper/coredumper.h %attr(755, root, root) /usr/lib/libcoredumper.a +%files -n percona-server-client-plugins +%defattr(-, root, root, -) +%doc %{?license_files_server} +%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_ldap_sasl_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_kerberos_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/mysql_native_password.so +%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_openid_connect_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_oci_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/dialog.so +%if 0%{?add_fido_plugins} +%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_webauthn_client.so +%attr(755, root, root) %{_libdir}/mysql/private/libfido2.so.* +%endif +# debug variants +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/authentication_ldap_sasl_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/authentication_kerberos_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/mysql_native_password.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/authentication_openid_connect_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/authentication_oci_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/dialog.so +%if 0%{?add_fido_plugins} +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/authentication_webauthn_client.so +%endif + %ifarch x86_64 %if 0%{?compatlib} %files -n percona-server-shared-compat @@ -1431,9 +1430,14 @@ fi %doc %{?license_files_server} %dir %attr(755, root, root) %{_libdir}/mysql %attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf +%if 0%{?rhel} == 7 %{_libdir}/mysql/libmysqlclient.so.%{compatlib}.* %{_libdir}/mysql/libmysqlclient_r.so.%{compatlib}.* %endif +%if 0%{?rhel} == 8 || 0%{?rhel} == 9 +%{_libdir}/mysql/libmysqlclient.so.%{compatlib}* +%endif +%endif %endif %files -n percona-server-test @@ -1663,12 +1667,8 @@ fi %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.* diff --git a/build-ps/percona-server.spec.legacy b/build-ps/percona-server.spec.legacy new file mode 100644 index 000000000000..6f7b0de7cba3 --- /dev/null +++ b/build-ps/percona-server.spec.legacy @@ -0,0 +1,2629 @@ +# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. If not, write to the +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston +# MA 02110-1301 USA. + +# Rebuild on OL5/RHEL5 needs following rpmbuild options: +# rpmbuild --define 'dist .el5' --define 'rhel 5' --define 'el5 1' mysql.spec + +# Install cmake28 from EPEL when building on OL5/RHEL5 and OL6/RHEL6. + +# NOTE: "vendor" is used in upgrade/downgrade check, so you can't +# change these, has to be exactly as is. + +%define build_timestamp %(date +"%Y") +%undefine _missing_build_ids_terminate_build +%global mysql_vendor Oracle and/or its affiliates +%global percona_server_vendor Percona, Inc +%global mysqldatadir /var/lib/mysql + +%global mysql_version @@MYSQL_VERSION@@ +%global percona_server_version @@PERCONA_VERSION@@ +%global revision @@REVISION@@ +%global tokudb_backup_version %{mysql_version}-%{percona_server_version} +%global rpm_release @@RPM_RELEASE@@ + +%global release %{percona_server_version}.%{rpm_release}%{?dist} + +%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 +%global add_fido_plugins 1 +%else +%global add_fido_plugins 0 +%endif # rhel8 or above + +# 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 excluding the TokuDB +%{!?with_tokudb: %global tokudb 0} + +# By default a build will be done including the RocksDB +%{!?with_rocksdb: %global rocksdb 1} + +# Pass path to mecab lib +%{?with_mecab: %global mecab_option -DWITH_MECAB=%{with_mecab}} +%{?with_mecab: %global mecab 1} + +# By default a build will be done including the JS stored routines language support +# Pass path to v8 lib +%{?with_js_lang: %global js_lang_option -DWITH_JS_LANG=ON -DV8_INCLUDE_DIR=%{with_js_lang}/include -DV8_LIB_DIR=%{with_js_lang}/out.gn/static/obj} +%{?with_js_lang: %global js_lang 1} + +# Regression tests may take a long time, override the default to skip them +%{!?runselftest:%global runselftest 0} + +# Profile-Guided Optimization: pass --define 'with_pgo 1' to rpmbuild +%{?with_pgo: %global pgo 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 Percona Server (GPL), Release %{percona_server_version}, Revision %{revision}} +%{!?compilation_comment_debug: %global compilation_comment_debug Percona Server - Debug (GPL), Release %{percona_server_version}, Revision %{revision}} +%{!?src_base: %global src_base percona-server} + +# 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 + +%global shared_lib_pri_name mysqlclient +%global shared_lib_sec_name perconaserverclient + +# Version for compat libs +%if 0%{?rhel} == 7 +%global compat_prefix 56 +%global compatver 5.6.51 +%global percona_compatver 91.0 +%global compatlib 18 +%global compatsrc https://downloads.percona.com/downloads/Percona-Server-5.6/Percona-Server-%{compatver}-%{percona_compatver}/binary/redhat/7/x86_64/Percona-Server-shared-56-%{compatver}-rel%{percona_compatver}.1.el7.x86_64.rpm +%endif + +%if 0%{?rhel} == 8 || 0%{?rhel} == 9 +%global compatver 8.0.37 +%global compatlib 21 +%global compatsrc https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-%{compatver}.tar.gz +%endif + + +# multiarch +%global multiarchs ppc %{power64} %{ix86} x86_64 %{sparc} + +%ifarch x86_64 +%global __isa_bits 64 +%endif + +%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 +%global ps_telemetry /usr/local/percona/telemetry/ps +%endif + +%global src_dir %{src_base}-%{mysql_version}-%{percona_server_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.md +%global license_type GPLv2 + +Name: percona-server +Summary: Percona-Server: a very fast and reliable SQL database server +Group: Applications/Databases +Version: %{mysql_version} +Release: %{release} +License: Copyright (c) 2000, %{build_timestamp}, %{mysql_vendor}. All rights reserved. Under %{?license_type} license as shown in the Description field.. +Source0: http://downloads.percona.com/downloads/Percona-Server-9.0/Percona-Server-%{mysql_version}-%{percona_server_version}/source/%{src_dir}.tar.gz +URL: http://www.percona.com/ +Packager: Percona MySQL Development Team +Vendor: %{percona_server_vendor} +Source5: mysql_config.sh +Source10: %{?compatsrc} +Source11: percona-telemetry-setup.sh +Source12: percona-telemetry-cleanup.sh +Source999: call-home.sh +Patch0: mysql-5.7-sharedlib-rename.patch +BuildRequires: cmake >= 2.8.2 +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: perl +%{?el7:BuildRequires: perl(Time::HiRes)} +%{?el7:BuildRequires: perl(Env)} +%{?el8:BuildRequires: perl(Env)} +%{?el9:BuildRequires: perl(Env)} +%{?amzn2023: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: lz4-devel +BuildRequires: libzstd-devel +BuildRequires: bison +BuildRequires: openldap-devel +BuildRequires: libcurl-devel +BuildRequires: systemd +BuildRequires: pkgconfig(systemd) +BuildRequires: cyrus-sasl-devel +BuildRequires: openldap-devel +%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 +BuildRequires: cmake >= 3.6.1 +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: libtirpc-devel +BuildRequires: rpcgen +%else +BuildRequires: cmake3 >= 3.6.1 +BuildRequires: devtoolset-8-gcc +BuildRequires: devtoolset-8-gcc-c++ +%endif +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +# Filter auto-requires/provides for private libs, plugins, and test Perl modules +%global _privatelibs libabsl_.*|libicu.*|libprotobuf.*|libmysqlharness\\.so.*|libmysqlharness_stdx\\.so.*|libmysqlharness_tls\\.so.*|libmysqlrouter\\.so\\..*|libmysqlrouter_.*\\.so\\..*|libfido2.* +%global _privateperl perl\\\\((GD|hostnames|lib::mtr|lib::v1|mtr_|My::) +%global __requires_exclude ^((%{_privatelibs})|(%{_privateperl})) +%global __provides_exclude_from ^(/usr/share/(mysql|mysql-test)/.*|%{_libdir}/mysql/plugin/.*\\.so|%{_libdir}/mysql/private/.*|%{_libdir}/mysqlrouter/.*|%{_libdir}/mysqlrouter/private/.*)$ + +%description +The Percona Server software delivers a very fast, multi-threaded, multi-user, +and robust SQL (Structured Query Language) database server. Percona Server +is intended for mission-critical, heavy-load production systems. + +Percona recommends that all production deployments be protected with a support +contract (http://www.percona.com/mysql-suppport/) to ensure the highest uptime, +be eligible for hot fixes, and boost your team's productivity. + +%package -n percona-server-server +Summary: Percona Server: a very fast and reliable SQL database server +Group: Applications/Databases +Requires: coreutils +Requires: grep +Requires: procps +Requires: shadow-utils +Requires: net-tools +Requires(pre): percona-server-shared +Requires: percona-server-client +Requires: percona-icu-data-files +Requires: curl +Requires: openssl +%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 +Requires: percona-telemetry-agent +%endif +Obsoletes: community-mysql-bench +Obsoletes: mysql-bench +Obsoletes: mariadb-connector-c-config +Obsoletes: mariadb-backup +Obsoletes: mariadb-bench +Obsoletes: mariadb-server +Obsoletes: mariadb-server-galera +Obsoletes: mariadb-server-utils +Obsoletes: mariadb-galera-server +Obsoletes: mariadb-gssapi-server +Obsoletes: mariadb-oqgraph-engine +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 + +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%if 0%{?rhel} == 8 +Obsoletes: mariadb-connector-c-config +%endif + +%if 0%{?tokudb} == 0 +Obsoletes: percona-server-tokudb +%endif + +%description -n percona-server-server +The Percona Server software delivers a very fast, multi-threaded, multi-user, +and robust SQL (Structured Query Language) database server. Percona Server +is intended for mission-critical, heavy-load production systems. + +Percona recommends that all production deployments be protected with a support +contract (http://www.percona.com/mysql-suppport/) to ensure the highest uptime, +be eligible for hot fixes, and boost your team's productivity. + +This package includes the Percona Server with XtraDB binary +as well as related utilities to run and administer Percona Server. + +If you want to access and work with the database, you have to install +package "percona-server-client" as well! + + +%package -n percona-server-client +Summary: Percona Server - Client +Group: Applications/Databases +Requires: percona-server-shared +Requires: percona-server-client-plugins = %{version}-%{release} +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 percona-server-client +This package contains the standard Percona Server client and administration tools. + +For a description of Percona Server see http://www.percona.com/software/percona-server/ + +%package -n percona-server-test +Summary: Test suite for the Percona Server +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 percona-server-test +This package contains the Percona Server regression test suite. + +For a description of Percona Server see http://www.percona.com/software/percona-server/ + +%package -n percona-server-devel +Summary: Percona Server - Development header files and libraries +Group: Applications/Databases +Obsoletes: mariadb-devel +Obsoletes: mariadb-connector-c-devel +Obsoletes: mysql-connector-c-devel < 6.2 +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 percona-server-devel +This package contains the development header files and libraries necessary +to develop Percona Server client applications. + +For a description of Percona Server see http://www.percona.com/software/percona-server/ + +%package -n percona-server-shared +Summary: Percona Server - Shared libraries +Group: Applications/Databases +Provides: mysql-libs = %{version}-%{release} +Provides: mysql-libs%{?_isa} = %{version}-%{release} +Obsoletes: mariadb-libs +Obsoletes: mysql-connector-c-shared < 6.2 +Obsoletes: mysql-libs < %{version}-%{release} +Provides: mysql-shared +%ifarch x86_64 +%if 0%{?rhel} < 9 +%if 0%{?amzn} != 2023 +Requires(pre): percona-server-shared-compat +%endif +%endif +%endif + +%description -n percona-server-shared +This package contains the shared libraries (*.so*) which certain languages +and applications need to dynamically load and use Percona Server. + +%package -n percona-server-client-plugins +Summary: Percona Server - Client Plugins +Group: Applications/Databases +Provides: mysql-client-plugins = %{version}-%{release} +Provides: mysql-client-plugins%{?_isa} = %{version}-%{release} + +%description -n percona-server-client-plugins +This package contains shared plugins for Percona Server client applications, +including authentication plugins for LDAP, Kerberos, WebAuthn, OpenID Connect, +and OCI. + +%ifarch x86_64 +%if 0%{?compatlib} +%package -n percona-server-shared-compat +Summary: Shared compat libraries for Percona Server 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} +%if 0%{?rhel} == 7 +Provides: libmysqlclient.so.18()(64bit) +Provides: libmysqlclient.so.18(libmysqlclient_16)(64bit) +Provides: libmysqlclient.so.18(libmysqlclient_18)(64bit) +%endif +%if 0%{?rhel} == 8 || 0%{?rhel} == 9 +Provides: libmysqlclient.so.21()(64bit) +Provides: libmysqlclient.so.21(libmysqlclient_21)(64bit) +%endif +Obsoletes: mariadb-libs +Conflicts: Percona-Server-shared-51 +Conflicts: Percona-Server-shared-55 +Conflicts: Percona-Server-shared-56 +Conflicts: Percona-Server-shared-57 + +%description -n percona-server-shared-compat +This package contains the shared compat libraries for database client applications. +%endif +%endif + +%if 0%{?tokudb} +# ---------------------------------------------------------------------------- +%package -n percona-server-tokudb +Summary: Percona Server - TokuDB package +Group: Applications/Databases +Requires: percona-server-server = %{version}-%{release} +Requires: percona-server-shared = %{version}-%{release} +Requires: percona-server-client = %{version}-%{release} +Requires: jemalloc >= 3.3.0 +Provides: tokudb-plugin = %{version}-%{release} + +%description -n percona-server-tokudb +This package contains the TokuDB plugin for Percona Server %{version}-%{release} +%endif + +%if 0%{?rocksdb} +# ---------------------------------------------------------------------------- +%package -n percona-server-rocksdb +Summary: Percona Server - RocksDB package +Group: Applications/Databases +Requires: percona-server-server = %{version}-%{release} +Requires: percona-server-shared = %{version}-%{release} +Requires: percona-server-client = %{version}-%{release} + +%description -n percona-server-rocksdb +This package contains the RocksDB plugin for Percona Server %{version}-%{release} +%endif + +%if 0%{?js_lang} +# ---------------------------------------------------------------------------- +%package -n percona-server-js +Summary: Percona Server - JS stored routines language support package +Group: Applications/Databases +Requires: percona-server-server = %{version}-%{release} +Requires: percona-server-shared = %{version}-%{release} +Requires: percona-server-client = %{version}-%{release} + +%description -n percona-server-js +This package contains JS language component for Percona Server %{version}-%{release} +%endif + +%package -n percona-mysql-router +Summary: Percona MySQL Router +Group: Applications/Databases +Provides: percona-mysql-router = %{version}-%{release} +Obsoletes: percona-mysql-router < %{version}-%{release} +Provides: mysql-router + +%description -n percona-mysql-router +The Percona MySQL Router software delivers a fast, multi-threaded way of +routing connections from MySQL Clients to MySQL Servers. + +%package -n percona-mysql-router-devel +Summary: Development header files and libraries for Percona MySQL Router +Group: Applications/Databases +Provides: percona-mysql-router-devel = %{version}-%{release} +Obsoletes: mysql-router-devel + +%description -n percona-mysql-router-devel +This package contains the development header files and libraries +necessary to develop Percona MySQL Router applications. + +%package -n percona-icu-data-files +Summary: MySQL packaging of ICU data files + +%description -n percona-icu-data-files +This package contains ICU data files needer by MySQL regular expressions. + +%prep +%setup -q -T -a 0 -c -n %{src_dir} +pushd %{src_dir} +%patch0 -p0 +%if 0%{?rhel} == 9 || 0%{?rhel} == 10 +# Ensure getpid is declared +grep -q unistd.h extra/coredumper/src/thread_lister.c || \ + sed -i '1i #include ' extra/coredumper/src/thread_lister.c +%endif + +%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 + +# Download/build compat libs +%if 0%{?compatlib} +%if 0%{?rhel} == 7 +# EL7: download prebuilt Percona Server 5.6 shared lib (.so.18) +( + rm -rf percona-compatlib + mkdir percona-compatlib + pushd percona-compatlib + wget --no-check-certificate %{compatsrc} + timeout=10 + while [ $timeout -gt 0 ]; do + if [ -s "$(basename %{compatsrc})" ]; then + break + fi + sleep 1 + timeout=$((timeout - 1)) + done + rpm2cpio Percona-Server-shared-%{compat_prefix}-%{compatver}-rel%{percona_compatver}.1.el7.x86_64.rpm | cpio --extract --make-directories --verbose + popd +) +%endif # rhel == 7 + +%if 0%{?rhel} == 8 || 0%{?rhel} == 9 +# EL8/9: build libmysqlclient.so.21 from MySQL 8.0 source +( + tar xzf %{SOURCE10} + pushd mysql-%{compatver} + mkdir build && pushd build + cmake .. \ + -DBUILD_CONFIG=mysql_release \ + -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DMYSQL_MAINTAINER_MODE=0 \ + -DCMAKE_C_FLAGS="%{optflags}" \ + -DCMAKE_CXX_FLAGS="%{optflags}" \ + -DWITH_SYSTEMD=0 \ + -DWITH_BOOST=../boost \ + -DWITH_ROUTER=0 \ + -DWITH_AUTHENTICATION_CLIENT_PLUGINS=0 \ + -DWITHOUT_SERVER=1 \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DMYSQLX_UNIX_ADDR="/var/run/mysqld/mysqlx.sock" \ + -DCOMPILATION_COMMENT="%{compilation_comment_release}" + pushd libmysql + make %{?_smp_mflags} VERBOSE=1 + popd && popd && popd +) +%endif # rhel == 8 || rhel == 9 +%endif # compatlib + +# 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-implicit-function-declaration -Wno-error /' -e 's/%{_lto_cflags}/ /') + cmake ../%{src_dir} \ + -DBUILD_CONFIG=mysql_release \ + -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_FLAGS="$optflags" \ + -DCMAKE_CXX_FLAGS="$optflags" \ + -DUSE_LD_LLD=0 \ + -DWITH_AUTHENTICATION_CLIENT_PLUGINS=1 \ + -DWITH_CURL=system \ + -DWITH_SYSTEMD=1 \ + -DWITH_INNODB_MEMCACHED=1 \ + -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DINSTALL_MYSQLSHAREDIR=share/percona-server \ + -DINSTALL_SUPPORTFILESDIR=share/percona-server \ + -DFEATURE_SET="%{feature_set}" \ + -DWITH_PAM=1 \ + -DWITH_ROCKSDB=1 \ + -DROCKSDB_DISABLE_AVX2=1 \ + -DROCKSDB_DISABLE_MARCH_NATIVE=1 \ + -DWITH_INNODB_MEMCACHED=1 \ + -DMYSQL_MAINTAINER_MODE=OFF \ + -DFORCE_INSOURCE_BUILD=1 \ + -DWITH_NUMA=1 \ + -DWITH_LDAP=system \ + -DWITH_PACKAGE_FLAGS=OFF \ + -DWITH_SYSTEM_LIBS=ON \ + -DWITH_PROTOBUF=bundled \ + -DWITH_RAPIDJSON=bundled \ + -DWITH_ICU=bundled \ + -DWITH_LZ4=system \ + -DWITH_ZLIB=system \ + -DWITH_ZSTD=system \ + -DWITH_EDITLINE=bundled \ + -DWITH_LIBEVENT=bundled \ + -DWITH_PERCONA_TELEMETRY=ON \ +%if 0%{?add_fido_plugins} + -DWITH_FIDO=bundled \ +%else + -DWITH_FIDO=none \ +%endif + -DWITH_ENCRYPTION_UDF=ON \ + -DWITH_COMPONENT_KEYRING_VAULT=ON \ +%if 0%{?rhel} > 8 + -DWITH_LTO=ON \ +%endif + %{?ssl_option} \ + %{?mecab_option} \ + %{?js_lang_option} \ + -DCOMPILATION_COMMENT="%{compilation_comment_debug}" %{TOKUDB_FLAGS} %{TOKUDB_DEBUG_OFF} %{ROCKSDB_FLAGS} + make %{?_smp_mflags} VERBOSE=1 +) +# Build full release +mkdir release +( + cd release + cmake ../%{src_dir} \ + %{?pgo:-DFPROFILE_GENERATE=1} \ + -DBUILD_CONFIG=mysql_release \ + -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_C_FLAGS="%{optflags}" \ + -DCMAKE_CXX_FLAGS="%{optflags}" \ + -DUSE_LD_LLD=0 \ + -DWITH_AUTHENTICATION_CLIENT_PLUGINS=1 \ + -DWITH_CURL=system \ + -DWITH_SYSTEMD=1 \ + -DWITH_INNODB_MEMCACHED=1 \ + -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DINSTALL_MYSQLSHAREDIR=share/percona-server \ + -DINSTALL_SUPPORTFILESDIR=share/percona-server \ + -DFEATURE_SET="%{feature_set}" \ + -DWITH_PAM=1 \ + -DWITH_ROCKSDB=1 \ + -DROCKSDB_DISABLE_AVX2=1 \ + -DROCKSDB_DISABLE_MARCH_NATIVE=1 \ + -DWITH_INNODB_MEMCACHED=1 \ + -DMYSQL_MAINTAINER_MODE=OFF \ + -DFORCE_INSOURCE_BUILD=1 \ + -DWITH_NUMA=1 \ + -DWITH_LDAP=system \ + -DWITH_PACKAGE_FLAGS=OFF \ + -DWITH_SYSTEM_LIBS=ON \ + -DWITH_LZ4=system \ + -DWITH_ZLIB=system \ + -DWITH_PROTOBUF=bundled \ + -DWITH_RAPIDJSON=bundled \ + -DWITH_ICU=bundled \ + -DWITH_EDITLINE=bundled \ + -DWITH_LIBEVENT=bundled \ + -DWITH_ZSTD=system \ + -DWITH_PERCONA_TELEMETRY=ON \ +%if 0%{?add_fido_plugins} + -DWITH_FIDO=bundled \ +%else + -DWITH_FIDO=none \ +%endif + -DWITH_ENCRYPTION_UDF=ON \ + -DWITH_COMPONENT_KEYRING_VAULT=ON \ +%if 0%{?rhel} > 8 + -DWITH_LTO=ON \ +%endif + %{?ssl_option} \ + %{?mecab_option} \ + %{?js_lang_option} \ + -DCOMPILATION_COMMENT="%{compilation_comment_release}" %{TOKUDB_FLAGS} %{TOKUDB_DEBUG_OFF} %{ROCKSDB_FLAGS} + make %{?_smp_mflags} VERBOSE=1 +) + +# PGO second pass: rebuild with profile data +%if 0%{?pgo} +( + # Run MTR load to generate profile data + pushd release + make run-profile-suite + rm -r $(readlink mysql-test/var) + popd + + # Rebuild with profile data + rm -rf release + mkdir release && pushd release + cmake ../%{src_dir} \ + -DFPROFILE_USE=1 \ + -DBUILD_CONFIG=mysql_release \ + -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_C_FLAGS="%{optflags}" \ + -DCMAKE_CXX_FLAGS="%{optflags}" \ + -DUSE_LD_LLD=0 \ + -DWITH_AUTHENTICATION_CLIENT_PLUGINS=1 \ + -DWITH_CURL=system \ + -DWITH_SYSTEMD=1 \ + -DWITH_INNODB_MEMCACHED=1 \ + -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DINSTALL_MYSQLSHAREDIR=share/percona-server \ + -DINSTALL_SUPPORTFILESDIR=share/percona-server \ + -DFEATURE_SET="%{feature_set}" \ + -DWITH_PAM=1 \ + -DWITH_ROCKSDB=1 \ + -DROCKSDB_DISABLE_AVX2=1 \ + -DROCKSDB_DISABLE_MARCH_NATIVE=1 \ + -DWITH_INNODB_MEMCACHED=1 \ + -DMYSQL_MAINTAINER_MODE=OFF \ + -DFORCE_INSOURCE_BUILD=1 \ + -DWITH_NUMA=1 \ + -DWITH_LDAP=system \ + -DWITH_PACKAGE_FLAGS=OFF \ + -DWITH_SYSTEM_LIBS=ON \ + -DWITH_LZ4=system \ + -DWITH_ZLIB=system \ + -DWITH_PROTOBUF=bundled \ + -DWITH_RAPIDJSON=bundled \ + -DWITH_ICU=bundled \ + -DWITH_EDITLINE=bundled \ + -DWITH_LIBEVENT=bundled \ + -DWITH_ZSTD=system \ + -DWITH_PERCONA_TELEMETRY=ON \ +%if 0%{?add_fido_plugins} + -DWITH_FIDO=bundled \ +%else + -DWITH_FIDO=none \ +%endif + -DWITH_ENCRYPTION_UDF=ON \ + -DWITH_COMPONENT_KEYRING_VAULT=ON \ +%if 0%{?rhel} > 8 + -DWITH_LTO=ON \ +%endif + %{?ssl_option} \ + %{?mecab_option} \ + %{?js_lang_option} \ + -DCOMPILATION_COMMENT="%{compilation_comment_release}" %{TOKUDB_FLAGS} %{TOKUDB_DEBUG_OFF} %{ROCKSDB_FLAGS} + make %{?_smp_mflags} VERBOSE=1 + popd +) +%endif # pgo + +%install +%ifarch x86_64 + %if 0%{?compatlib} + # Install compat libs + %if 0%{?rhel} == 7 + install -D -m 0755 percona-compatlib/usr/lib64/libmysqlclient.so.18.1.0 %{buildroot}%{_libdir}/mysql/libmysqlclient.so.18.1.0 + install -D -m 0755 percona-compatlib/usr/lib64/libmysqlclient_r.so.18.1.0 %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so.18.1.0 + %endif + %if 0%{?rhel} == 8 || 0%{?rhel} == 9 + pushd mysql-%{compatver}/build/libmysql + make DESTDIR=%{buildroot} mysqlclient install + rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient.{a,so} + popd + %endif + %endif # 0%{?compatlib} +%endif # arch x86_64 + +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 + +# Install telemetry helper scripts +%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 +install -d %{buildroot}%{_libexecdir}/percona-server +install -D -m 0755 %{SOURCE11} %{buildroot}%{_libexecdir}/percona-server/percona-telemetry-setup.sh +install -D -m 0755 %{SOURCE12} %{buildroot}%{_libexecdir}/percona-server/percona-telemetry-cleanup.sh +%endif + +# 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 + +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}/percona-server/mysql.server +rm -rf %{buildroot}%{_datadir}/percona-server/mysqld_multi.server +rm -f %{buildroot}%{_datadir}/percona-server/win_install_firewall.sql +rm -f %{buildroot}%{_datadir}/percona-server/audit_log_filter_win_install.sql +rm -rf %{buildroot}%{_bindir}/mysql_embedded +rm -rf %{buildroot}/usr/cmake/coredumper-relwithdebinfo.cmake +rm -rf %{buildroot}/usr/cmake/coredumper.cmake +rm -rf %{buildroot}/usr/include/kmip.h +rm -rf %{buildroot}/usr/include/kmippp.h +rm -rf %{buildroot}/usr/lib/libkmip.a +rm -rf %{buildroot}/usr/lib/libkmippp.a +%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 percona-server-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 percona-server-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 "Percona Server" -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 percona-server-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 || : +%systemd_post mysqld.service +if [ $1 == 1 ]; then + /usr/bin/systemctl enable mysqld >/dev/null 2>&1 || : +fi + +%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 +%{_libexecdir}/percona-server/percona-telemetry-setup.sh || : +%endif + +if [ -d /etc/percona-server.conf.d ]; then + CONF_EXISTS=$(grep "percona-server.conf.d" /etc/my.cnf | wc -l) + if [ ${CONF_EXISTS} = 0 ]; then + echo "!includedir /etc/percona-server.conf.d/" >> /etc/my.cnf + fi +fi + +echo "Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit." +echo "Run the following command to install these functions (fnv_64, fnv1a_64, murmur_hash):" +echo "mysql -e \"INSTALL COMPONENT 'file://component_percona_udf'\"" +echo "See http://www.percona.com/doc/percona-server/9.0/management/udf_percona_toolkit.html for more details" + +%preun -n percona-server-server +%systemd_preun mysqld.service +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 percona-server-server +%systemd_postun_with_restart mysqld.service +%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 +%{_libexecdir}/percona-server/percona-telemetry-cleanup.sh || : +%endif + +%posttrans -n percona-server-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}/percona-server %{_datadir}/mysql +fi + +%if 0%{?rhel} >= 9 || 0%{?amzn} >= 2023 +if [ -f /usr/lib/systemd/system/mysqld.service ]; then + if [ ! -e /etc/systemd/system/mysql.service ] && [ -d /etc/systemd/system ]; then + ln -s /usr/lib/systemd/system/mysqld.service /etc/systemd/system/mysql.service + fi + if [ ! -e /etc/systemd/system/multi-user.target.wants/mysqld.service ] && [ -d /etc/systemd/system/multi-user.target.wants ]; then + ln -s /usr/lib/systemd/system/mysqld.service /etc/systemd/system/multi-user.target.wants/mysqld.service + fi +fi +%endif + +%post -n percona-server-shared -p /sbin/ldconfig + +%postun -n percona-server-shared -p /sbin/ldconfig + +%ifarch x86_64 +%if 0%{?compatlib} +%post -n percona-server-shared-compat +%if 0%{?rhel} == 7 +for lib in libmysqlclient{.so.18.0.0,.so.18,_r.so.18.0.0,_r.so.18}; do + if [ ! -f %{_libdir}/mysql/${lib} ]; then + ln -s libmysqlclient.so.18.1.0 %{_libdir}/mysql/${lib}; + fi +done +%endif +/sbin/ldconfig + +%postun -n percona-server-shared-compat +%if 0%{?rhel} == 7 +for lib in libmysqlclient{.so.18.0.0,.so.18,_r.so.18.0.0,_r.so.18}; do + if [ -h %{_libdir}/mysql/${lib} ]; then + rm -f %{_libdir}/mysql/${lib}; + fi +done +%endif +/sbin/ldconfig +%endif +%endif + +%post -n percona-server-client-plugins -p /sbin/ldconfig + +%postun -n percona-server-client-plugins -p /sbin/ldconfig + +%if 0%{?tokudb} +%post -n percona-server-tokudb +if [ $1 -eq 1 ] ; then + echo -e "\n\n * This release of Percona Server 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 percona-server-rocksdb +if [ $1 -eq 1 ] ; then + echo -e "\n\n * This release of Percona Server is distributed with RocksDB storage engine." + echo -e " * Run the following script to enable the RocksDB storage engine in Percona Server:\n" + echo -e "\tps-admin --enable-rocksdb -u -p[mysql_admin_pass] [-S ] [-h -P ]\n" +fi +%endif + +%pre -n percona-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 "Percona MySQL Router" mysqlrouter >/dev/null 2>&1 || : + +%post -n percona-mysql-router +/sbin/ldconfig +%systemd_post mysqlrouter.service + +%preun -n percona-mysql-router +%systemd_preun mysqlrouter.service + +%postun -n percona-mysql-router +/sbin/ldconfig +%systemd_postun_with_restart mysqlrouter.service + + +%files -n percona-server-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* +%attr(644, root, root) %{_mandir}/man1/mysqldumpslow.1* +%attr(644, root, root) %{_mandir}/man1/mysql_secure_installation.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* + +%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}/mysqldumpslow +%attr(755, root, root) %{_bindir}/ps_mysqld_helper +%attr(755, root, root) %{_bindir}/perror +%attr(755, root, root) %{_bindir}/ps-admin +%attr(755, root, root) %{_bindir}/mysqld_pre_systemd +%attr(755, root, root) %{_bindir}/mysqld_safe +%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.* +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_bad_any_cast_impl.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_bad_optional_access.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_bad_variant_access.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_base.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_city.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_civil_time.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_cord_internal.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_cord.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_cordz_functions.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_cordz_handle.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_cordz_info.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_cordz_sample_token.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_crc32c.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_crc_cord_state.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_crc_cpu_detect.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_crc_internal.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_debugging_internal.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_demangle_internal.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_die_if_null.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_examine_stack.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_exponential_biased.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_failure_signal_handler.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_flags_commandlineflag_internal.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_flags_commandlineflag.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_flags_config.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_flags_internal.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_flags_marshalling.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_flags_parse.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_flags_private_handle_accessor.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_flags_program_name.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_flags_reflection.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_flags.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_flags_usage_internal.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_flags_usage.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_graphcycles_internal.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_hash.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_hashtablez_sampler.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_int128.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_kernel_timeout_internal.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_leak_check.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_log_entry.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_log_flags.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_log_globals.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_log_initialize.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_log_internal_check_op.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_log_internal_conditions.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_log_internal_format.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_log_internal_globals.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_log_internal_log_sink_set.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_log_internal_message.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_log_internal_nullguard.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_log_internal_proto.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_log_severity.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_log_sink.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_low_level_hash.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_malloc_internal.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_periodic_sampler.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_random_distributions.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_random_internal_distribution_test_util.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_random_internal_platform.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_random_internal_pool_urbg.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_random_internal_randen_hwaes_impl.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_random_internal_randen_hwaes.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_random_internal_randen_slow.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_random_internal_randen.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_random_internal_seed_material.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_random_seed_gen_exception.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_random_seed_sequences.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_raw_hash_set.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_raw_logging_internal.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_scoped_set_env.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_spinlock_wait.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_stacktrace.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_statusor.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_status.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_strerror.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_str_format_internal.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_strings_internal.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_strings.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_string_view.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_symbolize.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_synchronization.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_throw_delegate.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_time.so +%attr(755, root, root) %{_libdir}/mysql/private/libabsl_time_zone.so +%attr(755, root, root) %{_libdir}/mysql/private/libicui18n.so.* +%attr(755, root, root) %{_libdir}/mysql/private/libicustubdata.so.* +%attr(755, root, root) %{_libdir}/mysql/private/libicuuc.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/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/component_connection_control.so +%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 +%attr(755, root, root) %{_libdir}/mysql/plugin/component_percona_telemetry.so +%endif +%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_udf.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/validate_password.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/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/component_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 +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_mysql_system_variable_set.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_table_access.so +%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_replica.so +%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_source.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_mysql_thd_store_service.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_server_telemetry_traces.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_audit_log_filter.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_server_telemetry_metrics.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_keyring_file.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_execute_prepared_statement.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_execute_regular_statement.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_mysql_signal_handler.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_session_var_service.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_server_telemetry_logs_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_server_telemetry_logs_export.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_component_deinit_no_deadlock.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_component_init_fail.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_component_init_then_register.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_udf_aggregate.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_classic_hashing.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_mysql_file_service.so + + +%dir %{_libdir}/mysql/plugin/debug +%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/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/component_connection_control.so +%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_percona_telemetry.so +%endif +%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_udf.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/validate_password.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/component_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 +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_mysql_system_variable_set.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_table_access.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/semisync_replica.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/semisync_source.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_mysql_thd_store_service.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_server_telemetry_traces.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_audit_log_filter.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_keyring_file.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_session_var_service.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_server_telemetry_logs_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_server_telemetry_logs_export.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_component_deinit_no_deadlock.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_component_init_fail.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_component_init_then_register.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_udf_aggregate.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_classic_hashing.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_mysql_file_service.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_server_telemetry_metrics.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(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/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/query_response_time.so +#%attr(755, root, root) %{_libdir}/mysql/plugin/debug/query_response_time.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_keyring_vault.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_keyring_vault.so +%attr(755, root, root) %{_libdir}/mysql/plugin/procfs.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/procfs.so +%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_ldap_sasl.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/authentication_ldap_sasl.so + +%attr(755, root, root) %{_libdir}/mysql/plugin/component_encryption_udf.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_encryption_udf.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_uuid_vx_udf.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_uuid_vx_udf.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_keyring_kms.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_keyring_kms.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_masking_functions.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_masking_functions.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_percona_udf.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_percona_udf.so +# +#%attr(644, root, root) %{_datadir}/percona-server/fill_help_tables.sql +#%attr(644, root, root) %{_datadir}/percona-server/mysql_sys_schema.sql +#%attr(644, root, root) %{_datadir}/percona-server/mysql_system_tables.sql +#%attr(644, root, root) %{_datadir}/percona-server/mysql_system_tables_data.sql +#%attr(644, root, root) %{_datadir}/percona-server/mysql_test_data_timezone.sql +%attr(644, root, root) %{_datadir}/percona-server/mysql-log-rotate +#%attr(644, root, root) %{_datadir}/percona-server/mysql_security_commands.sql +%attr(644, root, root) %{_datadir}/percona-server/dictionary.txt +%attr(644, root, root) %{_datadir}/percona-server/install_rewriter.sql +%attr(644, root, root) %{_datadir}/percona-server/uninstall_rewriter.sql +%attr(644, root, root) %{_datadir}/percona-server/audit_log_filter_linux_install.sql +%attr(644, root, root) %{_unitdir}/mysqld.service +%attr(644, root, root) %{_unitdir}/mysqld@.service +%attr(644, root, root) %{_prefix}/lib/tmpfiles.d/mysql.conf +%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023 +%dir %{_libexecdir}/percona-server +%attr(755, root, root) %{_libexecdir}/percona-server/percona-telemetry-setup.sh +%attr(755, root, root) %{_libexecdir}/percona-server/percona-telemetry-cleanup.sh +%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}/percona-server/messages_to_clients.txt +%attr(755, root, root) %{_datadir}/percona-server/messages_to_error_log.txt +%attr(755, root, root) %{_datadir}/percona-server/charsets/ +%attr(755, root, root) %{_datadir}/percona-server/bulgarian/ +%attr(755, root, root) %{_datadir}/percona-server/czech/ +%attr(755, root, root) %{_datadir}/percona-server/danish/ +%attr(755, root, root) %{_datadir}/percona-server/dutch/ +%attr(755, root, root) %{_datadir}/percona-server/english/ +%attr(755, root, root) %{_datadir}/percona-server/estonian/ +%attr(755, root, root) %{_datadir}/percona-server/french/ +%attr(755, root, root) %{_datadir}/percona-server/german/ +%attr(755, root, root) %{_datadir}/percona-server/greek/ +%attr(755, root, root) %{_datadir}/percona-server/hungarian/ +%attr(755, root, root) %{_datadir}/percona-server/italian/ +%attr(755, root, root) %{_datadir}/percona-server/japanese/ +%attr(755, root, root) %{_datadir}/percona-server/korean/ +%attr(755, root, root) %{_datadir}/percona-server/norwegian-ny/ +%attr(755, root, root) %{_datadir}/percona-server/norwegian/ +%attr(755, root, root) %{_datadir}/percona-server/polish/ +%attr(755, root, root) %{_datadir}/percona-server/portuguese/ +%attr(755, root, root) %{_datadir}/percona-server/romanian/ +%attr(755, root, root) %{_datadir}/percona-server/russian/ +%attr(755, root, root) %{_datadir}/percona-server/serbian/ +%attr(755, root, root) %{_datadir}/percona-server/slovak/ +%attr(755, root, root) %{_datadir}/percona-server/spanish/ +%attr(755, root, root) %{_datadir}/percona-server/swedish/ +%attr(755, root, root) %{_datadir}/percona-server/ukrainian/ +#%attr(755, root, root) %{_datadir}/percona-server/mysql_system_users.sql +# +%attr(755, root, root) %{_libdir}/mysql/plugin/component_keyring_kmip.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_keyring_kmip.so + + +%files -n percona-server-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}/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/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 percona-server-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 +%ifarch %{multiarchs} +%attr(755, root, root) %{_bindir}/mysql_config-%{__isa_bits} +%endif +%{_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 percona-server-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.24* +#coredumper +%attr(755, root, root) %{_includedir}/coredumper/coredumper.h +%attr(755, root, root) /usr/lib/libcoredumper.a + +%files -n percona-server-client-plugins +%defattr(-, root, root, -) +%doc %{?license_files_server} +%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_ldap_sasl_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_kerberos_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/mysql_native_password.so +%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_openid_connect_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_oci_client.so +%attr(755, root, root) %{_libdir}/mysql/plugin/dialog.so +%if 0%{?add_fido_plugins} +%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_webauthn_client.so +%attr(755, root, root) %{_libdir}/mysql/private/libfido2.so.* +%endif + +%ifarch x86_64 +%if 0%{?compatlib} +%files -n percona-server-shared-compat +%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 +%if 0%{?rhel} == 7 +%{_libdir}/mysql/libmysqlclient.so.%{compatlib}.* +%{_libdir}/mysql/libmysqlclient_r.so.%{compatlib}.* +%endif +%if 0%{?rhel} == 8 || 0%{?rhel} == 9 +%{_libdir}/mysql/libmysqlclient.so.%{compatlib}* +%endif +%endif +%endif + +%files -n percona-server-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) %{_bindir}/mysql_test_event_tracking + +%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/component_test_sensitive_system_variables.so +%attr(755, root, root) %{_libdir}/mysql/plugin/conflicting_variables.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_mysql_command_services.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_status_var_reader.so +%attr(755, root, root) %{_libdir}/mysql/plugin/test_services_command_services.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_event_tracking_consumer.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_event_tracking_producer_a.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_event_tracking_producer_b.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_event_tracking_consumer_a.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_event_tracking_consumer_b.so +%attr(755, root, root) %{_libdir}/mysql/plugin/component_test_event_tracking_consumer_c.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 +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_sensitive_system_variables.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/conflicting_variables.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_mysql_command_services.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_status_var_reader.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/test_services_command_services.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_event_tracking_consumer.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_event_tracking_producer_a.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_event_tracking_producer_b.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_event_tracking_consumer_a.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_event_tracking_consumer_b.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_event_tracking_consumer_c.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_execute_prepared_statement.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_execute_regular_statement.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_test_mysql_signal_handler.so + +%if 0%{?tokudb} +%files -n percona-server-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 percona-server-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}/sst_dump +%endif + +%if 0%{?js_lang} +%files -n percona-server-js +%attr(-, root, root) +%doc %{src_dir}/js/LICENSE.* +%{_libdir}/mysql/plugin/component_js_lang.so +%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_js_lang.so +%endif + +%files -n percona-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 +%{_bindir}/mysqlrouter_bootstrap +%{_bindir}/mysqlrouter_mrs_client +%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* +%{_unitdir}/mysqlrouter.service +%{_tmpfilesdir}/mysqlrouter.conf +%{_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_connection_pool.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/libprotobuf.so.* +%{_libdir}/mysqlrouter/private/libabsl_*.so +%{_libdir}/mysqlrouter/private/libmysqlrouter_io_component.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_metadata_cache.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_mysqlxmessages.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_routing.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_routing_connections.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_routing_guidelines.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_destination_status.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_cluster.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_mysqlxclient.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_mysqlclient.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_utils.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_http_server.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_mysql.so.* +%{_libdir}/mysqlrouter/private/libmysqlrouter_http_client.so.* +%{_libdir}/mysqlrouter/private/libicui18n.so.* +%{_libdir}/mysqlrouter/private/libicustubdata.so.* +%{_libdir}/mysqlrouter/private/libicuuc.so.* +%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 + +%files -n percona-icu-data-files +%defattr(-, root, root, -) +%doc %{?license_files_server} +%dir %attr(755, root, root) %{_libdir}/mysql/private/icudt77l +%{_libdir}/mysql/private/icudt77l/*.icu +%{_libdir}/mysql/private/icudt77l/brkitr + +%changelog +* Fri Feb 12 2021 Percona Development Team - 8.0.22-13 +- Release 8.0.22-13 + +* Wed Aug 2 2017 Evgeniy Patlan +- Added RocksDB + +* Thu Sep 1 2016 Evgeniy Patlan +- fix license field + +* Thu Aug 25 2016 Evgeniy Patlan +- Provide my.cnf for all systems + +* Wed Mar 09 2016 Tomislav Plavcic - 5.7.11-4 +- Include mysql-keyring directory +- Provide keyring_file.so plugin + +* Thu Feb 11 2016 Tomislav Plavcic - 5.7.10-3 +- Fix for centos6 to write temp pass into log file instead of stdout (#1541769) + +* Tue Feb 02 2016 Tomislav Plavcic - 5.7.10-2rc2 +- Re-added TokuBackup to the packaging (JEN-439) + +* Thu Dec 10 2015 Tomislav Plavcic - 5.7.10-1rc1 +- Initial release PS 5.7.10-1rc1 + +* Tue Sep 29 2015 Balasubramanian Kandasamy - 5.7.9-1 +- Updated for 5.7.9 +- Added libtest_* plugins to test package subpackage +- Add mysqlpump man page +- Obsolete mysql-connector-c-shared dependencies + +* Mon Jul 06 2015 Murthy Narkedimilli - 5.7.8-0.2.rc +- Bumped the version of libmysqlclient.so and libmysqld.so from 20 -> 21. + +* Thu Jun 25 2015 Balasubramanian Kandasamy - 5.7.8-0.2.rc +- Add support for pkg-config + +* Wed May 20 2015 Balasubramanian Kandasamy - 5.7.8-0.2.rc +- Added libtest_framework.so, libtest_services.so, libtest_services_threaded.so plugins +- Build and ship mecab plugin + +* Tue Feb 3 2015 Balasubramanian Kandasamy - 5.7.6-0.2.m16 +- Include boost sources +- Fix cmake buildrequires +- Fix build on el5 with gcc44 +- Add license info in each subpackage +- Soname bump, more compat packages +- Updated default shell for mysql user +- Added mysql_ssl_rsa_setup +- Include mysql-files directory + +* Thu Sep 18 2014 Balasubramanian Kandasamy - 5.7.6-0.2.m16 +- Provide replication_observers_example_plugin.so plugin + +* Tue Sep 2 2014 Bjorn Munch - 5.7.6-0.1.m16 +- Updated for 5.7.6 + +* Fri Aug 08 2014 Erlend Dahl - 5.7.5-0.6.m15 +- Provide mysql_no_login.so plugin + +* Wed Aug 06 2014 Balasubramanian Kandasamy - 5.7.5-0.5.m15 +- Provide mysql-compat-server dependencies + +* Wed Jul 09 2014 Balasubramanian Kandasamy - 5.7.5-0.4.m15 +- Remove perl(GD) and dtrace dependencies + +* Thu Jun 26 2014 Balasubramanian Kandasamy - 5.7.5-0.3.m15 +- Resolve embedded-devel conflict issue + +* Wed Jun 25 2014 Balasubramanian Kandasamy - 5.7.5-0.2.m15 +- Add bench package +- Enable dtrace + +* Thu Apr 24 2014 Balasubramanian Kandasamy - 5.7.5-0.1.m15 +- Updated for 5.7.5 + +* Mon Apr 07 2014 Balasubramanian Kandasamy - 5.7.4-0.5.m14 +- Fix Cflags for el7 + +* Mon Mar 31 2014 Balasubramanian Kandasamy - 5.7.4-0.4.m14 +- Support for enterprise packages +- Upgrade from MySQL-* packages + +* Wed Mar 12 2014 Balasubramanian Kandasamy - 5.7.4-0.3.m14 +- Resolve conflict with mysql-libs-compat + +* Thu Mar 06 2014 Balasubramanian Kandasamy - 5.7.4-0.2.m14 +- Resolve conflict issues during upgrade +- Add ha_example.so plugin which is now included + +* Fri Feb 07 2014 Balasubramanian Kandasamy - 5.7.4-0.1.m14 +- 5.7.4 +- Enable shared libmysqld by cmake option +- Move mysqltest and test plugins to test subpackage + +* Mon Nov 18 2013 Balasubramanian Kandasamy - 5.7.3-0.3.m13 +- Fixed isa_bits error + +* Fri Oct 25 2013 Balasubramanian Kandasamy - 5.7.3-0.1.m13 +- Initial 5.7 port + +* Fri Oct 25 2013 Balasubramanian Kandasamy - 5.6.15-1 +- Fixed uln advanced rpm libyassl.a error +- Updated to 5.6.15 + +* Wed Oct 16 2013 Balasubramanian Kandasamy - 5.6.14-3 +- Fixed mysql_install_db usage +- Improved handling of plugin directory + +* Fri Sep 27 2013 Balasubramanian Kandasamy - 5.6.14-2 +- Refresh mysql-install patch and service renaming + +* Mon Sep 16 2013 Balasubramanian Kandasamy - 5.6.14-1 +- Updated to 5.6.14 + +* Wed Sep 04 2013 Balasubramanian Kandasamy - 5.6.13-5 +- Support upgrade from 5.5 ULN packages to 5.6 + +* Tue Aug 27 2013 Balasubramanian Kandasamy - 5.6.13-4 +- Enhanced perl filtering +- Added openssl-devel to buildreq + +* Wed Aug 21 2013 Balasubramanian Kandasamy - 5.6.13-3 +- Removed mysql_embedded binary to resolve multilib conflict issue + +* Fri Aug 16 2013 Balasubramanian Kandasamy - 5.6.13-2 +- Fixed Provides and Obsoletes issues in server, test packages + +* Wed Aug 14 2013 Balasubramanian Kandasamy - 5.6.13-1 +- Updated to 5.6.13 + +* Mon Aug 05 2013 Balasubramanian Kandasamy - 5.6.12-9 +- Added files list to embedded packages + +* Thu Aug 01 2013 Balasubramanian Kandasamy - 5.6.12-8 +- Updated libmysqld.a with libmysqld.so in embedded package + +* Mon Jul 29 2013 Balasubramanian Kandasamy - 5.6.12-7 +- Updated test package dependency from client to server + +* Wed Jul 24 2013 Balasubramanian Kandasamy - 5.6.12-6 +- Added libs-compat dependency under libs package to resolve server + installation conflicts issue. + +* Wed Jul 17 2013 Balasubramanian Kandasamy - 5.6.12-5 +- Removed libmysqlclient.so.16 from libs package + +* Fri Jul 05 2013 Balasubramanian Kandasamy - 5.6.12-4 +- Adjusted to work on OEL6 + +* Wed Jun 26 2013 Balasubramanian Kandasamy - 5.6.12-3 +- Move libs to mysql/ +- Basic multi arch support +- Fix changelog dates + +* Thu Jun 20 2013 Balasubramanian Kandasamy - 5.6.12-2 +- Major cleanup + +* Tue Jun 04 2013 Balasubramanian Kandasamy - 5.6.12-1 +- Updated to 5.6.12 + +* Mon Nov 05 2012 Joerg Bruehe + +- Allow to override the default to use the bundled yaSSL by an option like + --define="with_ssl /path/to/ssl" + +* Wed Oct 10 2012 Bjorn Munch + +- Replace old my-*.cnf config file examples with template my-default.cnf + +* Fri Oct 05 2012 Joerg Bruehe + +- Let the installation use the new option "--random-passwords" of "mysql_install_db". + (Bug# 12794345 Ensure root password) +- Fix an inconsistency: "new install" vs "upgrade" are told from the (non)existence + of "$mysql_datadir/mysql" (holding table "mysql.user" and other system stuff). + +* Tue Jul 24 2012 Joerg Bruehe + +- Add a macro "runselftest": + if set to 1 (default), the test suite will be run during the RPM build; + this can be oveeridden via the command line by adding + --define "runselftest 0" + Failures of the test suite will NOT make the RPM build fail! + +* Mon Jul 16 2012 Joerg Bruehe + +- Add the man page for the "mysql_config_editor". + +* Mon Jun 11 2012 Joerg Bruehe + +- Make sure newly added "SPECIFIC-ULN/" directory does not disturb packaging. + +* Wed Feb 29 2012 Brajmohan Saxena + +- Removal all traces of the readline library from mysql (BUG 13738013) + +* Wed Sep 28 2011 Joerg Bruehe + +- Fix duplicate mentioning of "mysql_plugin" and its manual page, + it is better to keep alphabetic order in the files list (merging!). + +* Wed Sep 14 2011 Joerg Bruehe + +- Let the RPM capabilities ("obsoletes" etc) ensure that an upgrade may replace + the RPMs of any configuration (of the current or the preceding release series) + by the new ones. This is done by not using the implicitly generated capabilities + (which include the configuration name) and relying on more generic ones which + just list the function ("server", "client", ...). + The implicit generation cannot be prevented, so all these capabilities must be + explicitly listed in "Obsoletes:" + +* Tue Sep 13 2011 Jonathan Perkin + +- Add support for Oracle Linux 6 and Red Hat Enterprise Linux 6. Due to + changes in RPM behaviour ($RPM_BUILD_ROOT is removed prior to install) + this necessitated a move of the libmygcc.a installation to the install + phase, which is probably where it belonged in the first place. + +* Tue Sep 13 2011 Joerg Bruehe + +- "make_win_bin_dist" and its manual are dropped, cmake does it different. + +* Thu Sep 08 2011 Daniel Fischer + +- Add mysql_plugin man page. + +* Tue Aug 30 2011 Tor Didriksen + +- Set CXX=g++ by default to add a dependency on libgcc/libstdc++. + Also, remove the use of the -fno-exceptions and -fno-rtti flags. + TODO: update distro_buildreq/distro_requires + +* Tue Aug 30 2011 Joerg Bruehe + +- Add the manual page for "mysql_plugin" to the server package. + +* Fri Aug 19 2011 Joerg Bruehe + +- Null-upmerge the fix of bug#37165: This spec file is not affected. +- Replace "/var/lib/mysql" by the spec file variable "%%{mysqldatadir}". + +* Fri Aug 12 2011 Daniel Fischer + +- Source plugin library files list from cmake-generated file. + +* Mon Jul 25 2011 Chuck Bell + +- Added the mysql_plugin client - enables or disables plugins. + +* Thu Jul 21 2011 Sunanda Menon + +- Fix bug#12561297: Added the MySQL embedded binary + +* Thu Jul 07 2011 Joerg Bruehe + +- Fix bug#45415: "rpm upgrade recreates test database" + Let the creation of the "test" database happen only during a new installation, + not in an RPM upgrade. + This affects both the "mkdir" and the call of "mysql_install_db". + +* Wed Feb 09 2011 Joerg Bruehe + +- Fix bug#56581: If an installation deviates from the default file locations + ("datadir" and "pid-file"), the mechanism to detect a running server (on upgrade) + should still work, and use these locations. + The problem was that the fix for bug#27072 did not check for local settings. + +* Mon Jan 31 2011 Joerg Bruehe + +- Install the new "manifest" files: "INFO_SRC" and "INFO_BIN". + +* Tue Nov 23 2010 Jonathan Perkin + +- EXCEPTIONS-CLIENT has been deleted, remove it from here too +- Support MYSQL_BUILD_MAKE_JFLAG environment variable for passing + a '-j' argument to make. + +* Mon Nov 1 2010 Georgi Kodinov + +- Added test authentication (WL#1054) plugin binaries + +* Wed Oct 6 2010 Georgi Kodinov + +- Added example external authentication (WL#1054) plugin binaries + +* Wed Aug 11 2010 Joerg Bruehe + +- With a recent spec file cleanup, names have changed: A "-community" part was dropped. + Reflect that in the "Obsoletes" specifications. +- Add a "triggerpostun" to handle the uninstall of the "-community" server RPM. +- This fixes bug#55015 "MySQL server is not restarted properly after RPM upgrade". + +* Tue Jun 15 2010 Joerg Bruehe + +- Change the behaviour on installation and upgrade: + On installation, do not autostart the server. + *Iff* the server was stopped before the upgrade is started, this is taken as a + sign the administrator is handling that manually, and so the new server will + not be started automatically at the end of the upgrade. + The start/stop scripts will still be installed, so the server will be started + on the next machine boot. + This is the 5.5 version of fixing bug#27072 (RPM autostarting the server). + +* Tue Jun 1 2010 Jonathan Perkin + +- Implement SELinux checks from distribution-specific spec file. + +* Wed May 12 2010 Jonathan Perkin + +- Large number of changes to build using CMake +- Introduce distribution-specific RPMs +- Drop debuginfo, build all binaries with debug/symbols +- Remove __os_install_post, use native macro +- Remove _unpackaged_files_terminate_build, make it an error to have + unpackaged files +- Remove cluster RPMs + +* Wed Mar 24 2010 Joerg Bruehe + +- Add "--with-perfschema" to the configure options. + +* Mon Mar 22 2010 Joerg Bruehe + +- User "usr/lib*" to allow for both "usr/lib" and "usr/lib64", + mask "rmdir" return code 1. +- Remove "ha_example.*" files from the list, they aren't built. + +* Wed Mar 17 2010 Joerg Bruehe + +- Fix a wrong path name in handling the debug plugins. + +* Wed Mar 10 2010 Joerg Bruehe + +- Take the result of the debug plugin build and put it into the optimized tree, + so that it becomes part of the final installation; + include the files in the packlist. Part of the fixes for bug#49022. + +* Mon Mar 01 2010 Joerg Bruehe + +- Set "Oracle and/or its affiliates" as the vendor and copyright owner, + accept upgrading from packages showing MySQL or Sun as vendor. + +* Fri Feb 12 2010 Joerg Bruehe + +- Formatting changes: + Have a consistent structure of separator lines and of indentation + (8 leading blanks => tab). +- Introduce the variable "src_dir". +- Give the environment variables "MYSQL_BUILD_CC(CXX)" precedence + over "CC" ("CXX"). +- Drop the old "with_static" argument analysis, this is not supported + in 5.1 since ages. +- Introduce variables to control the handlers individually, as well + as other options. +- Use the new "--with-plugin" notation for the table handlers. +- Drop handling "/etc/rc.d/init.d/mysql", the switch to "/etc/init.d/mysql" + was done back in 2002 already. +- Make "--with-zlib-dir=bundled" the default, add an option to disable it. +- Add missing manual pages to the file list. +- Improve the runtime check for "libgcc.a", protect it against being tried + with the Intel compiler "icc". + +* Mon Jan 11 2010 Joerg Bruehe + +- Change RPM file naming: + - Suffix like "-m2", "-rc" becomes part of version as "_m2", "_rc". + - Release counts from 1, not 0. + +* Wed Dec 23 2009 Joerg Bruehe + +- The "semisync" plugin file name has lost its introductory "lib", + adapt the file lists for the subpackages. + This is a part missing from the fix for bug#48351. +- Remove the "fix_privilege_tables" manual, it does not exist in 5.5 + (and likely, the whole script will go, too). + +* Mon Nov 16 2009 Joerg Bruehe + +- Fix some problems with the directives around "tcmalloc" (experimental), + remove erroneous traces of the InnoDB plugin (that is 5.1 only). + +* Tue Oct 06 2009 Magnus Blaudd + +- Removed mysql_fix_privilege_tables + +* Fri Oct 02 2009 Alexander Nozdrin + +- "mysqlmanager" got removed from version 5.4, all references deleted. + +* Fri Aug 28 2009 Joerg Bruehe + +- Merge up from 5.1 to 5.4: Remove handling for the InnoDB plugin. + +* Thu Aug 27 2009 Joerg Bruehe + +- This version does not contain the "Instance manager", "mysqlmanager": + Remove it from the spec file so that packaging succeeds. + +* Mon Aug 24 2009 Jonathan Perkin + +- Add conditionals for bundled zlib and innodb plugin + +* Fri Aug 21 2009 Jonathan Perkin + +- Install plugin libraries in appropriate packages. +- Disable libdaemon_example and ftexample plugins. + +* Thu Aug 20 2009 Jonathan Perkin + +- Update variable used for mysql-test suite location to match source. + +* Fri Nov 07 2008 Joerg Bruehe + +- Correct yesterday's fix, so that it also works for the last flag, + and fix a wrong quoting: un-quoted quote marks must not be escaped. + +* Thu Nov 06 2008 Kent Boortz + +- Removed "mysql_upgrade_shell" +- Removed some copy/paste between debug and normal build + +* Thu Nov 06 2008 Joerg Bruehe + +- Modify CFLAGS and CXXFLAGS such that a debug build is not optimized. + This should cover both gcc and icc flags. Fixes bug#40546. + +* Fri Aug 29 2008 Kent Boortz + +- Removed the "Federated" storage engine option, and enabled in all + +* Tue Aug 26 2008 Joerg Bruehe + +- Get rid of the "warning: Installed (but unpackaged) file(s) found:" + Some generated files aren't needed in RPMs: + - the "sql-bench/" subdirectory + Some files were missing: + - /usr/share/aclocal/mysql.m4 ("devel" subpackage) + - Manual "mysqlbug" ("server" subpackage) + - Program "innochecksum" and its manual ("server" subpackage) + - Manual "mysql_find_rows" ("client" subpackage) + - Script "mysql_upgrade_shell" ("client" subpackage) + - Program "ndb_cpcd" and its manual ("ndb-extra" subpackage) + - Manuals "ndb_mgm" + "ndb_restore" ("ndb-tools" subpackage) + +* Mon Mar 31 2008 Kent Boortz + +- Made the "Federated" storage engine an option +- Made the "Cluster" storage engine and sub packages an option + +* Wed Mar 19 2008 Joerg Bruehe + +- Add the man pages for "ndbd" and "ndb_mgmd". + +* Mon Feb 18 2008 Timothy Smith + +- Require a manual upgrade if the alread-installed mysql-server is + from another vendor, or is of a different major version. + +* Wed May 02 2007 Joerg Bruehe + +- "ndb_size.tmpl" is not needed any more, + "man1/mysql_install_db.1" lacked the trailing '*'. + +* Sat Apr 07 2007 Kent Boortz + +- Removed man page for "mysql_create_system_tables" + +* Wed Mar 21 2007 Daniel Fischer + +- Add debug server. + +* Mon Mar 19 2007 Daniel Fischer + +- Remove Max RPMs; the server RPMs contain a mysqld compiled with all + features that previously only were built into Max. + +* Fri Mar 02 2007 Joerg Bruehe + +- Add several man pages for NDB which are now created. + +* Fri Jan 05 2007 Kent Boortz + +- Put back "libmygcc.a", found no real reason it was removed. + +- Add CFLAGS to gcc call with --print-libgcc-file, to make sure the + correct "libgcc.a" path is returned for the 32/64 bit architecture. + +* Mon Dec 18 2006 Joerg Bruehe + +- Fix the move of "mysqlmanager" to section 8: Directory name was wrong. + +* Thu Dec 14 2006 Joerg Bruehe + +- Include the new man pages for "my_print_defaults" and "mysql_tzinfo_to_sql" + in the server RPM. +- The "mysqlmanager" man page got moved from section 1 to 8. + +* Thu Nov 30 2006 Joerg Bruehe + +- Call "make install" using "benchdir_root=%%{_datadir}", + because that is affecting the regression test suite as well. + +* Thu Nov 16 2006 Joerg Bruehe + +- Explicitly note that the "MySQL-shared" RPMs (as built by MySQL AB) + replace "mysql-shared" (as distributed by SuSE) to allow easy upgrading + (bug#22081). + +* Mon Nov 13 2006 Joerg Bruehe + +- Add "--with-partition" t 2006 Joerg Bruehe + +- Use the Perl script to run the tests, because it will automatically check + whether the server is configured with SSL. + +* Tue Jun 27 2006 Joerg Bruehe + +- move "mysqldumpslow" from the client RPM to the server RPM (bug#20216) + +- Revert all previous attempts to call "mysql_upgrade" during RPM upgrade, + there are some more aspects which need to be solved before this is possible. + For now, just ensure the binary "mysql_upgrade" is delivered and installysql.com> + +- To run "mysql_upgrade", we need a running server; + start it in isolation and skip password checks. + +* Sat May 20 2006 Kent Boortz + +- Always compile for PIC, position independent code. + +* Wed May 10 2006 Kent Boortz + +- Use character set "all" when compiling with Cluster, to make Cluster + nodes independent on the character set directory, and the problem + that two RPM sub packages both wants to install this directory. + +* Mon May 01 2006 Kent Boortz + +- Use "./libtool --mode=execute" instead of searching for the + executable in current directory and ".libs". + +* Fri Apr 28 2006 Kent Boortz + +- Install and run "mysql_upgrade" + +* Wed Apr 12 2006 Jim Winstead + +- Remove sql-bench, and MySQL-bench RPM (will be built as an independent + project from the mysql-bench repository) + +* Tue Apr 11 2006 Jim Winstead + +- Remove old mysqltestmanager and related programs +* Sat Apr 01 2006 Kent Boortz + +- Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS + +* Tue Mar 07 2006 Kent Boortz + +- Changed product name from "Community Edition" to "Community Server" + +* Mon Mar 06 2006 Kent Boortz + +- Fast mutexes is now disabled by default, but should be + used in Linux builds. + +* Mon Feb 20 2006 Kent Boortz + +- Reintroduced a max build +- Limited testing of 'debug' and 'max' servers +- Berkeley DB only in 'max' + +* Mon Feb 13 2006 Joerg Bruehe + +- Use "-i" on "make test-force"; + this is essential for later evaluation of this log file. + +* Thu Feb 09 2006 Kent Boortz + +- Pass '-static' to libtool, link static with our own libraries, dynamic + with system libraries. Link with the bundled zlib. + +* Wed Feb 08 2006 Kristian Nielsen + +- Modified RPM spec to match new 5.1 debug+max combined community packaging. + +* Sun Dec 18 2005 Kent Boortz + +- Added "client/mysqlslap" + +* Mon Dec 12 2005 Rodrigo Novo + +- Added zlib to the list of (static) libraries installed +- Added check against libtool wierdness (WRT: sql/mysqld || sql/.libs/mysqld) +- Compile MySQL with bundled zlib +- Fixed %%packager name to "MySQL Production Engineering Team" + +* Mon Dec 05 2005 Joerg Bruehe + +- Avoid using the "bundled" zlib on "shared" builds: + As it is not installed (on the build system), this gives dependency + problems with "libtool" causing the build to fail. + (Change was done on Nov 11, but left uncommented.) + +* Tue Nov 22 2005 Joerg Bruehe + +- Extend the file existence check for "init.d/mysql" on un-install + to also guard the call to "insserv"/"chkconfig". + +* Thu Oct 27 2005 Lenz Grimmer + +- added more man pages + +* Wed Oct 19 2005 Kent Boortz + +- Made yaSSL support an option (off by default) + +* Wed Oct 19 2005 Kent Boortz + +- Enabled yaSSL support + +* Sat Oct 15 2005 Kent Boortz + +- Give mode arguments the same way in all places +lenz@mysql.com> + +- fixed the removing of the RPM_BUILD_ROOT in the %%clean section (the + $RBR variable did not get expanded, thus leaving old build roots behind) + +* Thu Aug 04 2005 Lenz Grimmer + +- Fixed the creation of the mysql user group account in the postinstall + section (BUG 12348) +- Fixed enabling the Archive storage engine in the Max binary + +* Tue Aug 02 2005 Lenz Grimmer + +- Fixed the Requires: tag for the server RPM (BUG 12233) + +* Fri Jul 15 2005 Lenz Grimmer + +- create a "mysql" user group and assign the mysql user account to that group + in the server postinstall section. (BUG 10984) + +* Tue Jun 14 2005 Lenz Grimmer + +- Do not build statically on i386 by default, only when adding either "--with + static" or "--define '_with_static 1'" to the RPM build options. Static + linking really only makes sense when linking against the specially patched + glibc 2.2.5. + +* Mon Jun 06 2005 Lenz Grimmer + +- added mysql_client_test to the "bench" subpackage (BUG 10676) +- added the libndbclient static and shared libraries (BUG 10676) + +* Wed Jun 01 2005 Lenz Grimmer + +- use "mysqldatadir" variable instead of hard-coding the path multiple times +- use the "mysqld_user" variable on all occasions a user name is referenced +- removed (incomplete) Brazilian translations +- removed redundant release tags from the subpackage descriptions + +* Wed May 25 2005 Joerg Bruehe + +- Added a "make clean" between separate calls to "BuildMySQL". + +* Thu May 12 2005 Guilhem Bichot + +- Removed the mysql_tableinfo script made obsolete by the information schema + +* Wed Apr 20 2005 Lenz Grimmer + +- Enabled the "blackhole" storage engine for the Max RPM + +* Wed Apr 13 2005 Lenz Grimmer + +- removed the MySQL manual files (html/ps/texi) - they have been removed + from the MySQL sources and are now available seperately. + +* Mon Apr 4 2005 Petr Chardin + +- old mysqlmanager, mysq* Mon Feb 7 2005 Tomas Ulin + +- enabled the "Ndbcluster" storage engine for the max binary +- added extra make install in ndb subdir after Max build to get ndb binaries +- added packages for ndbcluster storage engine + +* Fri Jan 14 2005 Lenz Grimmer + +- replaced obsoleted "BuildPrereq" with "BuildRequires" instead + +* Thu Jan 13 2005 Lenz Grimmer + +- enabled the "Federated" storage engine for the max binary + +* Tue Jan 04 2005 Petr Chardin + +- ISAM and merge storage engines were purged. As well as appropriate + tools and manpages (isamchk and isamlog) + +* Fri Dec 31 2004 Lenz Grimmer + +- enabled the "Archive" storage engine for the max binary +- enabled the "CSV" storage engine for the max binary +- enabled the "Example" storage engine for the max binary + +* Thu Aug 26 2004 Lenz Grimmer + +- MySQL-Max now requires MySQL-server instead of MySQL (BUG 3860) + +* Fri Aug 20 2004 Lenz Grimmer + +- do not link statically on IA64/AMD64 as these systems do not have + a patched glibc installed + +* Tue Aug 10 2004 Lenz Grimmer + +- Added libmygcc.a to the devel subpackage (required to link applications + against the the embedded server libmysqld.a) (BUG 4921) + +* Mon Aug 09 2004 Lenz Grimmer + +- Added EXCEPTIONS-CLIENT to the "devel" package + +* Thu Jul 29 2004 Lenz Grimmer + +- disabled OpenSSL in the Max binaries again (the RPM packages were the + only exception to this anyway) (BUG 1043) + +* Wed Jun 30 2004 Lenz Grimmer + +- fixed server postinstall (mysql_install_db was called with the wrong + parameter) + +* Thu Jun 24 2004 Lenz Grimmer + +- added mysql_tzinfo_to_sql to the server subpackage +- run "make clean" instead of "make distclean" + +* Mon Apr 05 2004 Lenz Grimmer + +- added ncurses-devel to the build prerequisites (BUG 3377) + +* Thu Feb 12 2004 Lenz Grimmer + +- when using gcc, _always_ use CXX=gcc +- replaced Copyright with License field (Copyright is obsolete) + +* Tue Feb 03 2004 Lenz Grimmer + +- added myisam_ftdump to the Server package + +* Tue Jan 13 2004 Lenz Grimmer + +- link the mysql client against libreadline instead of libedit (BUG 2289) + +* Mon Dec 22 2003 Lenz Grimmer + +- marked /etc/logrotate.d/mysql as a config file (BUG 2156) + +* Sat Dec 13 2003 Lenz Grimmer + +- fixed file permissions (BUG 1672) + +* Thu Dec 11 2003 Lenz Grimmer + +- made testing for gcc3 a bit more robust + +* Fri Dec 05 2003 Lenz Grimmer + +- added missing file mysql_create_system_tables to the server subpackage + +* Fri Nov 21 2003 Lenz Grimmer + +- removed dependency on MySQL-client from the MySQL-devel subpackage + as it is not really required. (BUG 1610) + +* Fri Aug 29 2003 Lenz Grimmer + +- Fixed BUG 1162 (removed macro names from the changelog) +- Really fixed BUG 998 (disable the checking for installed but + unpackaged files) + +* Tue Aug 05 2003 Lenz Grimmer + +- Fixed BUG 959 (libmysqld not being compiled properly) +- Fixed BUG 998 (RPM build errors): added missing files to the + distribution (mysql_fix_extensions, mysql_tableinfo, mysqldumpslow, + mysql_fix_privilege_tables.1), removed "-n" from install section. + +* Wed Jul 09 2003 Lenz Grimmer + +- removed the GIF Icon (file was not included in the sources anyway) +- removed unused variable shared_lib_version +- do not run automake before building the standard binary + (should not be necessary) +- add server suffix '-standard' to standard binary (to be in line + with the binary tarball distributions) +- Use more RPM macros (_exec_prefix, _sbindir, _libdir, _sysconfdir, + _datadir, _includedir) throughout the spec file. +- allow overriding CC and CXX (required when building with other compilers) + +* Fri May 16 2003 Lenz Grimmer + +- re-enabled RAID again + +* Wed Apr 30 2003 Lenz Grimmer + +- disabled MyISAM RAID (--with-raid)- it throws an assertion which + needs to be investigated first. + +* Mon Mar 10 2003 Lenz Grimmer + +- added missing file mysql_secure_installation to server subpackage + (BUG 141) + +* Tue Feb 11 2003 Lenz Grimmer + +- re-added missing pre- and post(un)install scripts to server subpackage +- added config file /etc/my.cnf to the file list (just for completeness) +- make sure to create the datadir with 755 permissions + +* Mon Jan 27 2003 Lenz Grimmer + +- removed unusedql.com> + +- Reworked the build steps a little bit: the Max binary is supposed + to include OpenSSL, which cannot be linked statically, thus trying + to statically link against a special glibc is futile anyway +- because of this, it is not required to make yet another build run + just to compile the shared libs (saves a lot of time) +- updated package description of the Max subpackage +- clean up the BuildRoot directory afterwards + +* Mon Jul 15 2002 Lenz Grimmer + +- Updated Packager information +- Fixed the build options: the regular package is supposed to + include InnoDB and linked statically, while the Max package + should include BDB and SSL support + +* Fri May 03 2002 Lenz Grimmer + +- Use more RPM macros (e.g. infodir, mandir) to make the spec + file more portable +- reorganized the installation of documentation files: let RPM + take care of this +- reorganized the file list: actually install man pages along + with the binaries of the respective subpackage +- do not include libmysqld.a in the devel subpackage as well, if we + have a special "embedded" subpackage +- reworked the package descriptions + +* Mon Oct 8 2001 Monty + +- Added embedded server as a separate RPM + +* Fri Apr 13 2001 Monty + +- Added mysqld-max to the distribution + +* Tue Jan 2 2001 Monty + +- Added mysql-test to the bench package + +* Fri Aug 18 2000 Tim Smith + +- Added separate libmysql_r directory; now both a threaded + and non-threaded library is shipped. + +* Tue Sep 28 1999 David Axmark + +- Added the support-files/my-example.cnf to the docs directory. + +- Removed devel dependency on base since it is about client + development. + +* Wed Sep 8 1999 David Axmark + +- Cleaned up some for 3.23. + +* Thu Jul 1 1999 David Axmark + +- Added support for shared libraries in a separate sub + package. Original fix by David Fox (dsfox@cogsci.ucsd.edu) + +- The --enable-assembler switch is now automatically disables on + platforms there assembler code is unavailable. This should allow + building this RPM on non i386 systems. + +* Mon Feb 22 1999 David Axmark + +- Removed unportable cc switches from the spec file. The defaults can + now be overridden with environment variables. This feature is used + to compile the official RPM with optimal (but compiler version + specific) switches. + +- Removed the repetitive description parts for the sub rpms. Maybe add + again if RPM gets a multiline macro capability. + +- Added support for a pt_BR translation. Translation contributed by + Jorge Godoy . + +* Wed Nov 4 1998 David Axmark + +- A lot of changes in all the rpm and install scripts. This may even + be a working RPM :-) + +* Sun Aug 16 1998 David Axmark + +- A developers changelog for MySQL is available in the source RPM. And + there is a history of major user visible changed in the Reference + Manual. Only RPM specific changes will be documented here. diff --git a/build-ps/rpm/filter-provides.sh b/build-ps/rpm/filter-provides.sh deleted file mode 100755 index bc166bd82d0f..000000000000 --- a/build-ps/rpm/filter-provides.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /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/build-ps/rpm/filter-requires.sh b/build-ps/rpm/filter-requires.sh deleted file mode 100755 index 3fdf43870fa5..000000000000 --- a/build-ps/rpm/filter-requires.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /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/build-ps/rpm/mysql.init b/build-ps/rpm/mysql.init deleted file mode 100644 index 513925cbd69b..000000000000 --- a/build-ps/rpm/mysql.init +++ /dev/null @@ -1,248 +0,0 @@ -#!/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 "Percona 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 Percona 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 Percona 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/build-ps/rpm/percona-telemetry-cleanup.sh b/build-ps/rpm/percona-telemetry-cleanup.sh new file mode 100644 index 000000000000..f776fd77d3d4 --- /dev/null +++ b/build-ps/rpm/percona-telemetry-cleanup.sh @@ -0,0 +1,3 @@ +#!/bin/sh +# Cleanup Percona telemetry directory on package removal +rm -rf /usr/local/percona/telemetry/ps diff --git a/build-ps/rpm/percona-telemetry-setup.sh b/build-ps/rpm/percona-telemetry-setup.sh new file mode 100644 index 000000000000..97dc4ba5e4b6 --- /dev/null +++ b/build-ps/rpm/percona-telemetry-setup.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# Setup Percona telemetry directory with proper ownership and SELinux context +PS_TELEMETRY=/usr/local/percona/telemetry/ps + +mkdir -p "$PS_TELEMETRY" +chown mysql:percona-telemetry "$PS_TELEMETRY" 2>/dev/null || : +chmod 775 "$PS_TELEMETRY" 2>/dev/null || : +chmod g+s "$PS_TELEMETRY" 2>/dev/null || : +chmod u+s "$PS_TELEMETRY" 2>/dev/null || : +chcon -t mysqld_db_t "$PS_TELEMETRY" 2>/dev/null || : +chcon -u system_u "$PS_TELEMETRY" 2>/dev/null || : + +# Setup telemetry UUID file +chgrp percona-telemetry /usr/local/percona/telemetry_uuid 2>/dev/null || : +chmod 664 /usr/local/percona/telemetry_uuid 2>/dev/null || : From 8ea18f9f69ddd7b3ad4c941b74900b7ca3424536 Mon Sep 17 00:00:00 2001 From: Evgeniy Patlan Date: Thu, 26 Mar 2026 16:57:30 +0200 Subject: [PATCH 2/2] Disable PGO builds by default Disabled PGO builds and added param to enable/disable it --- build-ps/debian/rules | 4 +++- build-ps/debian/rules.in | 4 +++- build-ps/percona-server-9.0_builder.sh | 25 +++++++++++++++++++++---- build-ps/percona-server.spec.in | 4 +++- 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/build-ps/debian/rules b/build-ps/debian/rules index 7708763adc91..ae8813326544 100755 --- a/build-ps/debian/rules +++ b/build-ps/debian/rules @@ -76,7 +76,8 @@ endif MYSQL_SRC = $(shell pwd) -# Profile-Guided Optimization: set DEB_PGO=1 to enable +# Profile-Guided Optimization: disabled by default +# To enable: export DEB_PGO=1 before dpkg-buildpackage ifdef DEB_PGO PGO_GENERATE = -DFPROFILE_GENERATE=1 PGO_USE = -DFPROFILE_USE=1 @@ -207,6 +208,7 @@ endif cd $(builddir) && $(MAKE) -j$(NCPU) VERBOSE=1 +# PGO rebuild: only runs when DEB_PGO=1 is set ifdef DEB_PGO # PGO: Run MTR load to generate profile data, then rebuild cd $(builddir) && $(MAKE) run-profile-suite && rm -r $$(readlink mysql-test/var) diff --git a/build-ps/debian/rules.in b/build-ps/debian/rules.in index a55311624372..8450b8b0e591 100755 --- a/build-ps/debian/rules.in +++ b/build-ps/debian/rules.in @@ -76,7 +76,8 @@ endif MYSQL_SRC = $(shell pwd) -# Profile-Guided Optimization: set DEB_PGO=1 to enable +# Profile-Guided Optimization: disabled by default +# To enable: export DEB_PGO=1 before dpkg-buildpackage ifdef DEB_PGO PGO_GENERATE = -DFPROFILE_GENERATE=1 PGO_USE = -DFPROFILE_USE=1 @@ -207,6 +208,7 @@ endif cd $(builddir) && $(MAKE) -j$(NCPU) VERBOSE=1 +# PGO rebuild: only runs when DEB_PGO=1 is set ifdef DEB_PGO # PGO: Run MTR load to generate profile data, then rebuild cd $(builddir) && $(MAKE) run-profile-suite && rm -r $$(readlink mysql-test/var) diff --git a/build-ps/percona-server-9.0_builder.sh b/build-ps/percona-server-9.0_builder.sh index 3e4da7fe9721..b308f864b62f 100644 --- a/build-ps/percona-server-9.0_builder.sh +++ b/build-ps/percona-server-9.0_builder.sh @@ -22,6 +22,7 @@ Usage: $0 [OPTIONS] --rpm_release RPM version( default = 1) --deb_release DEB version( default = 1) --debug Build debug tarball + --enable_pgo If it is 1 PGO (Profile-Guided Optimization) build will be performed --help) usage ;; Example $0 --builddir=/tmp/PS57 --get_sources=1 --build_src_rpm=1 --build_rpm=1 EOF @@ -63,6 +64,7 @@ parse_arguments() { --rpm_release=*) RPM_RELEASE="$val" ;; --deb_release=*) DEB_RELEASE="$val" ;; --debug=*) DEBUG="$val" ;; + --enable_pgo=*) ENABLE_PGO="$val" ;; --help) usage ;; *) if test -n "$pick_args" @@ -784,12 +786,22 @@ build_rpm(){ if [ "x${RHEL}" = "x7" ]; then source /opt/rh/devtoolset-11/enable fi - if [ ${ARCH} = x86_64 ]; then - rpmbuild --define "_topdir ${WORKDIR}/rpmbuild" --define "dist .${OS_NAME}" --define "with_mecab ${MECAB_INSTALL_DIR}/usr" --define "with_js_lang ${WORKDIR}/v8" --rebuild rpmbuild/SRPMS/${SRCRPM} - else - rpmbuild --define "_topdir ${WORKDIR}/rpmbuild" --define "dist .${OS_NAME}" --define "with_tokudb 0" --define "with_mecab ${MECAB_INSTALL_DIR}/usr" --define "with_js_lang ${WORKDIR}/v8" --rebuild rpmbuild/SRPMS/${SRCRPM} + EXTRA_DEFINES=() + if [ ${ARCH} != x86_64 ]; then + EXTRA_DEFINES+=(--define "with_tokudb 0") + fi + if [ "${ENABLE_PGO}" = "1" ]; then + EXTRA_DEFINES+=(--define "with_pgo 1") fi + rpmbuild \ + --define "_topdir ${WORKDIR}/rpmbuild" \ + --define "dist .${OS_NAME}" \ + --define "with_mecab ${MECAB_INSTALL_DIR}/usr" \ + --define "with_js_lang ${WORKDIR}/v8" \ + "${EXTRA_DEFINES[@]}" \ + --rebuild rpmbuild/SRPMS/${SRCRPM} + if [ $RHEL = 6 ]; then sudo rm -f /usr/bin/strip sudo mv /usr/bin/strip_back /usr/bin/strip @@ -912,6 +924,10 @@ build_deb(){ sed -i 's/export CXXFLAGS=/export CXXFLAGS=-Wno-error=deprecated-declarations -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-parameter -Wno-error=date-time -Wno-error=maybe-uninitialized /' debian/rules # fi + if [ "${ENABLE_PGO}" = "1" ]; then + export DEB_PGO=1 + fi + dpkg-buildpackage -rfakeroot -uc -us -b cd ${WORKDIR} @@ -1021,6 +1037,7 @@ INSTALL=0 RPM_RELEASE=1 DEB_RELEASE=1 DEBUG=0 +ENABLE_PGO=0 REVISION=0 BRANCH="release-9.0.1-1" RPM_RELEASE=1 diff --git a/build-ps/percona-server.spec.in b/build-ps/percona-server.spec.in index c5171a9afaeb..69f2e9759599 100644 --- a/build-ps/percona-server.spec.in +++ b/build-ps/percona-server.spec.in @@ -64,7 +64,8 @@ # Regression tests may take a long time, override the default to skip them %{!?runselftest:%global runselftest 0} -# Profile-Guided Optimization: pass --define 'with_pgo 1' to rpmbuild +# Profile-Guided Optimization: disabled by default +# To enable: pass --define 'with_pgo 1' to rpmbuild %{?with_pgo: %global pgo 1} %{!?with_debuginfo: %global nodebuginfo 0} @@ -675,6 +676,7 @@ mkdir release ) # PGO second pass: rebuild with profile data +# Disabled by default. Enable with: rpmbuild --define 'with_pgo 1' %if 0%{?pgo} ( # Run MTR load to generate profile data