Skip to content
/ server Public

MDEV-14296: Relocate wsrep_sst_common from /usr/bin to /usr/share/mariadb#4871

Draft
FaramosCZ wants to merge 1 commit intoMariaDB:mainfrom
FaramosCZ:MDEV-14296
Draft

MDEV-14296: Relocate wsrep_sst_common from /usr/bin to /usr/share/mariadb#4871
FaramosCZ wants to merge 1 commit intoMariaDB:mainfrom
FaramosCZ:MDEV-14296

Conversation

@FaramosCZ
Copy link
Copy Markdown
Contributor

wsrep_sst_common is a bash function library (no shebang, only function definitions and shared variables) that is sourced by other wsrep_sst_* scripts. Unlike those scripts, it is not an executable and should not reside in /usr/bin. This commit moves it to the shared data directory (INSTALL_MYSQLSHAREDIR, typically /usr/share/mariadb on RPM/DEB systems), which is the standard location for architecture-independent data files.

New install path: ${INSTALL_MYSQLSHAREDIR}/wsrep_sst_common

  • RPM layout: /usr/share/mariadb/wsrep_sst_common
  • DEB layout: /usr/share/mariadb/wsrep_sst_common
  • Standalone layout: /share/wsrep_sst_common

Files modified:

scripts/CMakeLists.txt
- Changed INSTALL(FILES ...) destination from ${INSTALL_BINDIR} to ${INSTALL_MYSQLSHAREDIR} for the WSREP_SOURCE (wsrep_sst_common).
- Updated comment to explain the rationale for the non-bindir location.

scripts/wsrep_sst_backup.sh
scripts/wsrep_sst_mariabackup.sh
scripts/wsrep_sst_mysqldump.sh
scripts/wsrep_sst_rsync.sh
- Updated the source command to locate wsrep_sst_common. The new logic first checks the script's own directory (for build-tree / MTR test compatibility, where all scripts are generated into the same build directory), and falls back to the CMake-substituted installed path (@INSTALL_MYSQLSHAREDIRABS@) when the file is not found alongside the calling script.

support-files/policy/apparmor/usr.sbin.mysqld
- Updated AppArmor read permission from /usr/bin/wsrep_sst_common to /usr/share/mariadb/wsrep_sst_common.

debian/mariadb-server.install
- Updated Debian package file list entry from usr/bin/wsrep_sst_common to usr/share/mariadb/wsrep_sst_common.

…iadb

wsrep_sst_common is a bash function library (no shebang, only function
definitions and shared variables) that is sourced by other wsrep_sst_*
scripts. Unlike those scripts, it is not an executable and should not
reside in /usr/bin. This commit moves it to the shared data directory
(INSTALL_MYSQLSHAREDIR, typically /usr/share/mariadb on RPM/DEB systems),
which is the standard location for architecture-independent data files.

New install path: ${INSTALL_MYSQLSHAREDIR}/wsrep_sst_common
  - RPM layout: /usr/share/mariadb/wsrep_sst_common
  - DEB layout: /usr/share/mariadb/wsrep_sst_common
  - Standalone layout: <prefix>/share/wsrep_sst_common

Files modified:

  scripts/CMakeLists.txt
    - Changed INSTALL(FILES ...) destination from ${INSTALL_BINDIR} to
      ${INSTALL_MYSQLSHAREDIR} for the WSREP_SOURCE (wsrep_sst_common).
    - Updated comment to explain the rationale for the non-bindir location.

  scripts/wsrep_sst_backup.sh
  scripts/wsrep_sst_mariabackup.sh
  scripts/wsrep_sst_mysqldump.sh
  scripts/wsrep_sst_rsync.sh
    - Updated the source command to locate wsrep_sst_common. The new logic
      first checks the script's own directory (for build-tree / MTR test
      compatibility, where all scripts are generated into the same build
      directory), and falls back to the CMake-substituted installed path
      (@INSTALL_MYSQLSHAREDIRABS@) when the file is not found alongside
      the calling script.

  support-files/policy/apparmor/usr.sbin.mysqld
    - Updated AppArmor read permission from /usr/bin/wsrep_sst_common
      to /usr/share/mariadb/wsrep_sst_common.

  debian/mariadb-server.install
    - Updated Debian package file list entry from usr/bin/wsrep_sst_common
      to usr/share/mariadb/wsrep_sst_common.

Co-Authored-By: Claude AI <noreply@anthropic.com>
@gkodinov gkodinov added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements.

Development

Successfully merging this pull request may close these issues.

2 participants