From 34aac090f2acc1a4b5850810fe41370c19659d55 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Tue, 21 Apr 2026 15:35:09 +1000 Subject: [PATCH] MDEV-37197 RPM: Install PAM modules and systemd units in /usr/lib (not /lib) Since Fedora 17 and about 2012, the directory /lib{,64} has been a symlink to /usr/lib{,64}. This has been verified on RHEL8, 9, 10, Fedora , OpenEuler. SLES1507, OpenSUSE 1506 and earlier (there is no OpenSUSE 1507) had the old location for pam but since their 1600 version they are now standardised. References: - https://fedoraproject.org/wiki/Features/UsrMove - https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/ --- cmake/install_layout.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake index d52836a4f4a..0911fc94ea9 100644 --- a/cmake/install_layout.cmake +++ b/cmake/install_layout.cmake @@ -164,7 +164,12 @@ SET(INSTALL_SYSTEMD_UNITDIR_RPM "/usr/lib/systemd/system") SET(INSTALL_SYSTEMD_SYSUSERSDIR_RPM "/usr/lib/sysusers.d") SET(INSTALL_SYSTEMD_TMPFILESDIR_RPM "/usr/lib/tmpfiles.d") SET(INSTALL_RUNDATADIR_RPM "/run/mariadb") -SET(INSTALL_PAMDIR_RPM "/${INSTALL_LIBDIR_RPM}/security") +SET(INSTALL_PAMDIR_RPM "/usr/${INSTALL_LIBDIR_RPM}/security") +IF(RPM MATCHES "^(opensuse|sles)([0-9]+)$") + IF(CMAKE_MATCH_2 LESS_EQUAL 1507) + SET(INSTALL_PAMDIR_RPM "/${INSTALL_LIBDIR_RPM}/security") + ENDIF() +ENDIF() SET(INSTALL_PAMDATADIR_RPM "/etc/security") #