Bug 1043501

Summary: Log files are not config files
Product: [Fedora] Fedora Reporter: Christoph Wickert <christoph.wickert>
Component: mariadbAssignee: Honza Horak <hhorak>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: hhorak, jdornak
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mariadb-5.5.34-3.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-04 02:48: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:

Description Christoph Wickert 2013-12-16 13:43:16 UTC
Description of problem:
When upgradging to F20 I noticed rpm created /var/log/mysqld.log.rpmnew. This does not make sense. This is not a config file and it will always change, so people will end up with *.rpmnew files all the time.

Version-Release number of selected component (if applicable):
mariadb-server-5.5.34-2.fc20.x86_64

How reproducible:
always

Steps to Reproduce:
1. update mariadb

Actual results:
useless rpmnew file.

Expected results:
no useless files

Additional info:
In the spec file, the logs are defines as:

%attr(0640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) %{_localstatedir}/log/mariadb/mariadb.log
%attr(0640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) %{_localstatedir}/log/mysqld.log

The files should be %ghost and not %config. Create them in %install with touch and then include them as %ghost. Problem solved.

Comment 1 Honza Horak 2014-01-06 18:14:26 UTC
I've tested MariaDB according [1] and it seems %config + %ghost combination should work better. Pure %ghost would result in removing files on package removal. Committed to git as [2]. Update in Bodhi will follow.

[1] http://fedoraproject.org/wiki/PackagingDrafts/Logfiles
[2] http://pkgs.fedoraproject.org/cgit/mariadb.git/commit/?h=f20&id=7e95015252688d603e77fef488f3cca47f67623f

Comment 2 Fedora Update System 2014-01-07 06:20:21 UTC
mariadb-5.5.34-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mariadb-5.5.34-3.fc20

Comment 3 Fedora Update System 2014-01-08 07:52:27 UTC
Package mariadb-5.5.34-3.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mariadb-5.5.34-3.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0389/mariadb-5.5.34-3.fc20
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-02-04 02:48:11 UTC
mariadb-5.5.34-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.