[MDEV-17028]  Fix glitches with systemd sysusers and tmpfiles Created: 2018-08-21  Updated: 2020-01-24  Resolved: 2020-01-24

Status: Closed
Project: MariaDB Server
Component/s: Packaging, Platform Debian, Platform RedHat
Affects Version/s: 10.1, 10.2, 10.3
Fix Version/s: 10.1.44, 10.2.31, 10.3.22, 10.4.12

Type: Bug Priority: Major
Reporter: Sergei Golubchik Assignee: Vicențiu Ciorbaru
Resolution: Fixed Votes: 0
Labels: systemd

Issue Links:
Relates
relates to MDEV-15052 Allow sysusers and tmpfiles install f... Closed
relates to MDEV-15543 systemd-tmpfiles.d should not be used... Closed

 Description   

Fix glitches with systemd sysusers and tmpfiles:

Subject: [PATCH 1/2] Use descriptive file names for sysusers and tmpfiles configuration
 
These files were installed to:
 
${INSTALL_SYSTEMD_SYSUSERSDIR}/sysusers.conf
${INSTALL_SYSTEMD_TMPFILESDIR}/tmpfiles.conf
 
Instead rename the files to more descriptive file names 'mariadb.conf'.

Subject: [PATCH 2/2] Make systemd-tmpfiles create MYSQL_DATADIR
 
This is a no-op if the directory exists, but makes sure it is created by
systemd-tmpfiles with proper permissions otherwise.
 
This solves packaging issues when the user MYSQLD_USER is created by
systemd-sysusers and uid is not known in advance.



 Comments   
Comment by Daniel Black [ 2018-08-21 ]

Note; PR ignored for 6 months so far.

Comment by Sergei Golubchik [ 2018-08-22 ]

yes, somehow it didn't make to MDEV back then. But now it's in Jira, so should get some attention soon

Comment by Sergei Golubchik [ 2019-04-07 ]

overdue PR

Comment by Axel Schwenke [ 2019-04-30 ]

This PR needs further discussion.

Comment by Vicențiu Ciorbaru [ 2020-01-24 ]

This patch has implications on all systems using systemd, Redhat and Debian alike.

The data-directory is not a volatile file, according to tmpfiles documentation. In this case we can not use tmpfiles for creating it. This is why the second patch was rejected. The problem should be solved in a post-install script in some form, not through tmpfiles.

The first patch however makes both file names agree with the systemd-sysusers and systemd-tmpfiles naming convention. This was accepted.

Generated at Thu Feb 08 08:33:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.