Bug 1241623

Summary: /usr/lib/tmpfiles.d/mariadb.conf is overwritten when mariadb package is updated
Product: Red Hat Enterprise Linux 7 Reporter: Yoshifumi Kinoshita <ykinoshi>
Component: mariadbAssignee: Jakub Dorňák <jdornak>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: low Docs Contact:
Priority: low    
Version: 7.1CC: alaurent, databases-maint, hhorak, jcastran, jscotka, ovasik, rsawhill, wburrows
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mariadb-5.5.47-2.el7 Doc Type: Enhancement
Doc Text:
Feature: Include warning in files put in /usr/lib/tmpfiles.d/ Reason: To inform users to create a file (with same name) in /etc/tmpfiles.d/ when they want to customize anything in that file because that file could be overwritten with the next package update Result:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 20:46:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1203710, 1289025, 1295829, 1313485    

Comment 2 Honza Horak 2015-07-09 16:15:08 UTC
This is what tmpfiles.d(5) man page says about tmpfiles.d files:

Files in /etc/tmpfiles.d override files with the same name in /usr/lib/tmpfiles.d and /run/tmpfiles.d. Files in /run/tmpfiles.d override files with the same name in /usr/lib/tmpfiles.d. Packages should install their configuration files in /usr/lib/tmpfiles.d. Files in /etc/tmpfiles.d are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages. All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same path, the entry in the file with the lexicographically earliest name will be applied, all all other conflicting entries will be logged as errors. When two lines are prefix and suffix of each other, then the prefix is always processed first, the suffix later. Otherwise, the files/directories are processed in the order they are listed.

Comment 3 Honza Horak 2015-07-09 16:19:18 UTC
(In reply to Honza Horak from comment #2)
> This is what tmpfiles.d(5) man page says about tmpfiles.d files:

Which means correct way to change /usr/lib/tmpfiles.d/mariadb.conf is actually creating /etc/tmpfiles.d/mariadb.conf.

Comment 5 Jakub Dorňák 2015-07-14 11:27:04 UTC
If there are no objections, I'd close this as NOTABUG.

Comment 9 Ryan Sawhill 2015-10-20 22:33:33 UTC
For the record, this is a public bug with multiple private comments. The public comments don't reflect it, but the private discussion has turned to adding a warning to the /usr/lib/tmpfiles.d/mariadb.conf file (provided by mariadb-server rpm).

This has purportedly already been added to the mariadb-server rpm in Fedora, though it must be rawhide or something because I don't see it on my Fedora 22.

I've tagged this as GSS-Proposed for RHEL 7.3.

Comment 10 Honza Horak 2015-10-22 05:46:31 UTC
The comment is even in F22 branch but the package was not rebuilt just for this change:
http://pkgs.fedoraproject.org/cgit/mariadb.git/tree/mysql.tmpfiles.d.in

Comment 15 errata-xmlrpc 2016-11-03 20:46:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2595.html