Skip to content

Packaging changes for PGO and rework to make it as close as possible to upstream#5948

Open
EvgeniyPatlan wants to merge 4 commits into
release-9.7.0-1from
release-9.7.0-1-1
Open

Packaging changes for PGO and rework to make it as close as possible to upstream#5948
EvgeniyPatlan wants to merge 4 commits into
release-9.7.0-1from
release-9.7.0-1-1

Conversation

@EvgeniyPatlan
Copy link
Copy Markdown
Contributor

No description provided.

…lags

Align Percona Server RPM and DEB packaging (build-ps/) with MySQL
upstream modern patterns while preserving Percona-specific features,
and consolidate duplicated cmake invocations across both the custom
build-ps/ packaging and the inherited packaging/ tree.

build-ps RPM:
- Template the spec via build-ps/percona-server.spec.in + CMakeLists.txt
  (CONFIGURE_FILE @var@ substitution)
- Factor telemetry setup/cleanup into helper scripts (rpm/, debian/extra/)
- Keep PGO infrastructure wired through --define "with_pgo 1"
- Drop legacy rpm/filter-provides.sh, filter-requires.sh, mysql.init
- Enable PGO by default in percona-server-9.0_builder.sh

build-ps DEB:
- Upgrade debhelper compat 9 -> 13 (removed debian/compat)
- Split packages: add percona-server-client-plugins,
  percona-server-server-core, percona-server-client-core
- Template debian/rules via rules.in + CONFIGURE_FILE
- Use --list-missing with debian/not-installed
- Factor telemetry into helper scripts shared with RPM

cmake flag consolidation (build-ps + inherited packaging/):
- build-ps/percona-server.spec.in: introduce %{cmake_common_flags} macro
  plus %{cmake_fido_flags} / %{cmake_lto_flags} sub-macros; reduce three
  duplicated cmake invocations (debug, release, PGO) to single-macro
  references. Fix latent bug: duplicate -DWITH_INNODB_MEMCACHED=1.
- build-ps/debian/rules, rules.in: introduce CMAKE_COMMON_FLAGS Make
  variable; reduce three duplicated blocks to shared-variable references.
  Fix latent bug: PGO-rebuild block was missing -DWITH_ARCHIVE_STORAGE_ENGINE,
  -DWITH_BLACKHOLE_STORAGE_ENGINE, -DWITH_FEDERATED_STORAGE_ENGINE.
- packaging/rpm-oel/mysql.spec.in: same %{cmake_common_flags} pattern
  applied to the inherited upstream spec. Fix three latent bugs in PGO
  block: hardcoded cmake3 -> %{cmake3}, inconsistent
  -DWITH_AUTHENTICATION_FIDO=0 / -DWITH_KEYRING_OCI=0 removed, empty
  %if 0%{?ssl_default} branch now emits -DWITH_AUTHENTICATION_CLIENT_PLUGINS=1.
- packaging/deb-in/rules.in, deb_debug.cmake: introduce CMAKE_COMMON_FLAGS.
  Fix two latent bugs: duplicate -DMYSQL_MAINTAINER_MODE=0 and redundant
  -DINSTALL_DOCDIR (implied by INSTALL_LAYOUT=DEB).
The abseil-cpp-20230802.1 bundled library was reorganized between MySQL
9.6.0 and 9.7.0. The %files list explicitly enumerates each .so for
percona-server-server-core, so a stale list trips rpmbuild's
"File not found in BUILDROOT" error.

Remove 6 abseil libs that no longer exist in 9.7.0:
  libabsl_bad_any_cast_impl.so
  libabsl_bad_optional_access.so
  libabsl_bad_variant_access.so
  libabsl_flags.so
  libabsl_low_level_hash.so
  libabsl_random_internal_pool_urbg.so

Add 11 new abseil libs introduced in 9.7.0:
  libabsl_decode_rust_punycode.so
  libabsl_demangle_rust.so
  libabsl_hashtable_profiler.so
  libabsl_log_internal_fnmatch.so
  libabsl_log_internal_structured_proto.so
  libabsl_poison.so
  libabsl_profile_builder.so
  libabsl_random_internal_entropy_pool.so
  libabsl_tracing_internal.so
  libabsl_utf8_for_code_point.so
  libabsl_vlog_config_internal.so

The mysqlrouter/private/libabsl_*.so glob already auto-handles router-
side abseil churn, so no change needed there.
…ke3 fallback

Two bugs in get_sources() on the release-9.7.0-1-1 Jenkins build:

1. Lines 223 / 226: `[ ${PERCONAFT_REPO} = 0 ]` / `[ ${TOKUBACKUP_REPO} = 0 ]`

   When PERCONAFT_REPO / TOKUBACKUP_REPO are empty or unset (the
   normal case for non-TokuDB builds) the unquoted substitution
   collapses the test to literal `[ = 0 ]` and bash reports:

       ./ps_builder.sh: line 223: [: =: unary operator expected
       ./ps_builder.sh: line 226: [: =: unary operator expected

   Quote both sides + add `:-` default so the test evaluates as
   `[ "" = "0" ]` (false) rather than producing a syntax error.

2. Line 269: `cmake . -DWITH_SSL=system ...`

   PS 9.x requires CMake >= 3.17.5 (top-level CMakeLists.txt:112).
   Some release build agents still ship CMake 3.16.3 as the default
   `cmake`, so the configure step aborts:

       CMake Error at CMakeLists.txt:112 (CMAKE_MINIMUM_REQUIRED):
         CMake 3.17.5 or higher is required.  You are running version 3.16.3

   With cmake failing, no Makefile is generated, `make dist` then
   reports `No rule to make target 'dist'`, and EXPORTED_TAR / PSDIR
   end up empty. Every later step cascades into corruption:
   `tar xzf` with no arg, rsync targets resolve to absolute `/storage/...`
   paths, `cd ${PSDIR}` becomes `cd` (home dir), and the subsequent
   sed of `build-ps/debian/rules` fails with "No such file".

   On hosts that have both `cmake` (old) and `cmake3` (EPEL /
   backports alternative), prefer `cmake3` when the default `cmake`
   is older than 3.17.5. Same pattern build-ps/pxc_builder.sh
   already uses for PXC on EL7.

   This does NOT help hosts where neither `cmake` nor `cmake3` is
   >= 3.17.5 — those need either a base-image cmake bump or a
   cmake install in install_deps. Note: the make dist step legitimately
   needs cmake to copy bison-generated sql_yacc.{h,cc} /
   sql_hints.yy.{h,cc} into the tarball and to autoreconf UDF/, so
   replacing it with plain `git archive` would silently drop those
   pre-generated files. Keeping the cmake+make-dist path and just
   choosing a sufficient cmake binary is the right answer.
@EvgeniyPatlan EvgeniyPatlan requested review from adivinho and inikep May 14, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants