Skip to content
/ server Public

Commit 15e6ba6

Browse files
committed
MDEV-37197 Deb: Install PAM modules and systemd units in /usr/lib (not /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. Additionally re-applied `debputy reformat --style=black` to get files sorted in a standardized order. 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 0513a4a commit 15e6ba6

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,6 @@ 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/mariadb-extra@.socket
11-
lib/systemd/system/mariadb.service
12-
lib/systemd/system/mariadb@.service
13-
lib/systemd/system/mariadb@.socket
14-
lib/systemd/system/mariadb@bootstrap.service.d/use_galera_new_cluster.conf
15-
lib/systemd/system/mysql.service
16-
lib/systemd/system/mysqld.service
179
support-files/rpm/enable_encryption.preset etc/mysql/mariadb.conf.d/99-enable-encryption.cnf.preset
1810
usr/bin/aria_chk
1911
usr/bin/aria_dump_log
@@ -35,6 +27,7 @@ usr/bin/wsrep_sst_mariabackup
3527
usr/bin/wsrep_sst_mysqldump
3628
usr/bin/wsrep_sst_rsync
3729
usr/bin/wsrep_sst_rsync_wan
30+
usr/lib/*/security/pam_user_map.so
3831
usr/lib/mysql/plugin/auth_ed25519.so
3932
usr/lib/mysql/plugin/auth_mysql_sha2.so
4033
usr/lib/mysql/plugin/auth_pam.so
@@ -59,6 +52,13 @@ usr/lib/mysql/plugin/simple_password_check.so
5952
usr/lib/mysql/plugin/sql_errlog.so
6053
usr/lib/mysql/plugin/type_mysql_json.so
6154
usr/lib/mysql/plugin/wsrep_info.so
55+
usr/lib/systemd/system/mariadb-extra@.socket
56+
usr/lib/systemd/system/mariadb.service
57+
usr/lib/systemd/system/mariadb@.service
58+
usr/lib/systemd/system/mariadb@.socket
59+
usr/lib/systemd/system/mariadb@bootstrap.service.d/use_galera_new_cluster.conf
60+
usr/lib/systemd/system/mysql.service
61+
usr/lib/systemd/system/mysqld.service
6262
usr/lib/tmpfiles.d/mariadb.conf
6363
usr/share/doc/mariadb-server/mariadbd.sym.gz
6464
usr/share/man/man1/aria_chk.1

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)