From 2f5e858b0fe25b23aa5ca226e1f5a3494c01ce8e Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 27 Feb 2026 16:56:02 +1100 Subject: [PATCH] MDEV-38913: pam_mariadb_mtr.so installation path change This reverts the effect of MDEV-21654 and includes pam_mariadb_mtr in the mariadb-test-data Deb package. This allows our CI systems to run tests on the pam implementation on Debian systems. As the pam configuration can include a full path, we've change the installation of the pam module pam_mariadb_mtr.so to under the /usr/lib*/plugins/test_pam_modules directory and configured the pam configuration file, suite/plugins/pam/mariadb_mtr, to include the full path to pam_mariadb_mtr.so. --- debian/mariadb-test-data.install | 1 + plugin/auth_pam/testing/CMakeLists.txt | 9 ++++----- plugin/auth_pam/testing/mariadb_mtr.conf | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/debian/mariadb-test-data.install b/debian/mariadb-test-data.install index 718fc0e122c94..ca9e1bb959bb5 100644 --- a/debian/mariadb-test-data.install +++ b/debian/mariadb-test-data.install @@ -1,3 +1,4 @@ +usr/lib/mysql/plugin/test_pam_modules usr/share/mysql/mysql-test/collections usr/share/mysql/mysql-test/include usr/share/mysql/mysql-test/main diff --git a/plugin/auth_pam/testing/CMakeLists.txt b/plugin/auth_pam/testing/CMakeLists.txt index 9217e23ce02c7..45096c6a9a110 100644 --- a/plugin/auth_pam/testing/CMakeLists.txt +++ b/plugin/auth_pam/testing/CMakeLists.txt @@ -10,8 +10,7 @@ IF(CMAKE_C_COMPILER_ID MATCHES "Clang") PROPERTY COMPILE_FLAGS "-Wno-incompatible-pointer-types-discards-qualifiers") ENDIF() -IF (NOT DEB) # avoid arch-dependent-file-in-usr-share error - SET(dest DESTINATION "${INSTALL_MYSQLTESTDIR}/suite/plugins/pam" COMPONENT Test) - INSTALL(TARGETS pam_mariadb_mtr ${dest}) - INSTALL(FILES mariadb_mtr.conf RENAME mariadb_mtr ${dest}) -ENDIF() +SET(PAM_MARIADB_MTR_LOCATON ${INSTALL_PLUGINDIR}/test_pam_modules) +INSTALL(TARGETS pam_mariadb_mtr DESTINATION ${PAM_MARIADB_MTR_LOCATON} COMPONENT TEST) +CONFIGURE_FILE(mariadb_mtr.conf mariadb_mtr) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb_mtr DESTINATION "${INSTALL_MYSQLTESTDIR}/suite/plugins/pam" COMPONENT TEST) diff --git a/plugin/auth_pam/testing/mariadb_mtr.conf b/plugin/auth_pam/testing/mariadb_mtr.conf index 241afb4367d0f..b88569a25587e 100644 --- a/plugin/auth_pam/testing/mariadb_mtr.conf +++ b/plugin/auth_pam/testing/mariadb_mtr.conf @@ -1,4 +1,4 @@ # Put it in /etc/pam.d/mariadb_mtr -auth required pam_mariadb_mtr.so pam_test +auth required @CMAKE_INSTALL_PREFIX@/@PAM_MARIADB_MTR_LOCATON@/pam_mariadb_mtr.so pam_test account required pam_permit.so