Skip to content

Commit 082a54c

Browse files
committed
Deb: Install PAM modules and systemd units from /lib to /usr/lib
Since Fedora 17 and about 2012, the directory /lib has been a symlink to /usr/lib. Debian started a similar migration in 2019. Nowadays all major Linux distributions have a merged /usr, and the canonical location for files should be /usr/lib instead of just /lib. The location of PAM modules and systemd files is the last remaining `*_DEB` variables should fully complete the usr merge migration. References: - https://fedoraproject.org/wiki/Features/UsrMove - https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#a-merged-usr-is-now-required - https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/
1 parent fd15fd2 commit 082a54c

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

cmake/install_layout.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ SET(INSTALL_MYSQLDATADIR_DEB "/var/lib/mysql")
196196

197197
SET(INSTALL_RUNDATADIR_DEB "/run/mysqld")
198198
SET(INSTALL_UNIX_ADDRDIR_DEB "${INSTALL_RUNDATADIR_DEB}/mysqld.sock")
199-
SET(INSTALL_SYSTEMD_UNITDIR_DEB "/lib/systemd/system")
199+
SET(INSTALL_SYSTEMD_UNITDIR_DEB "/usr/lib/systemd/system")
200200
SET(INSTALL_SYSTEMD_SYSUSERSDIR_DEB "/usr/lib/sysusers.d")
201201
SET(INSTALL_SYSTEMD_TMPFILESDIR_DEB "/usr/lib/tmpfiles.d")
202-
SET(INSTALL_PAMDIR_DEB "/lib/${CMAKE_CXX_LIBRARY_ARCHITECTURE}/security")
202+
SET(INSTALL_PAMDIR_DEB "/usr/lib/${CMAKE_CXX_LIBRARY_ARCHITECTURE}/security")
203203
SET(INSTALL_PAMDATADIR_DEB "/etc/security")
204204

205205
#

debian/mariadb-server.install

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ debian/additions/source_mariadb.py usr/share/apport/package-hooks
66
etc/apparmor.d/usr.sbin.mariadbd
77
etc/logrotate.d/mariadb
88
etc/security/user_map.conf
9-
lib/*/security/pam_user_map.so
10-
lib/systemd/system/[email protected]/use_galera_new_cluster.conf
11-
lib/systemd/system/[email protected]
12-
lib/systemd/system/mariadb.service
13-
lib/systemd/system/[email protected]
14-
lib/systemd/system/[email protected]
15-
lib/systemd/system/mysql.service
16-
lib/systemd/system/mysqld.service
9+
usr/lib/*/security/pam_user_map.so
10+
usr/lib/systemd/system/[email protected]/use_galera_new_cluster.conf
11+
usr/lib/systemd/system/[email protected]
12+
usr/lib/systemd/system/mariadb.service
13+
usr/lib/systemd/system/[email protected]
14+
usr/lib/systemd/system/[email protected]
15+
usr/lib/systemd/system/mysql.service
16+
usr/lib/systemd/system/mysqld.service
1717
support-files/rpm/enable_encryption.preset etc/mysql/mariadb.conf.d/99-enable-encryption.cnf.preset
1818
usr/lib/tmpfiles.d/mariadb.conf
1919
usr/bin/aria_chk

debian/not-installed

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ etc/mysql/mariadb.conf.d/client.cnf # Debian packaging uses files from debian/ad
44
etc/mysql/mariadb.conf.d/enable_encryption.preset # Debian packaging uses files from debian/additions/mariadb.cnf.d/
55
etc/mysql/mariadb.conf.d/mysql-clients.cnf # Debian packaging uses files from debian/additions/mariadb.cnf.d/
66
etc/mysql/mariadb.conf.d/server.cnf # Debian packaging uses files from debian/additions/mariadb.cnf.d/
7-
lib/systemd/system/mariadb-extra.socket # Installed by rules file
8-
lib/systemd/system/mariadb.socket # Installed by rules file
7+
usr/lib/systemd/system/mariadb-extra.socket # Installed by rules file
8+
usr/lib/systemd/system/mariadb.socket # Installed by rules file
99
usr/bin/mariadb-embedded # Shipping the embedded server in distro packaging does not make sense
1010
usr/bin/mysql_config # Debian packaging has mysql_config as symlink to mariadb_config
1111
usr/bin/mysql_embedded # Symlink to mariadb-embedded which is intentionally not included

0 commit comments

Comments
 (0)