Bug #50322 RPM package information is incorrectly reporting my.cnf / mysqlmanager.passwd
Submitted: 14 Jan 2010 9:24 Modified: 1 Dec 2016 13:39
Reporter: Brett Cave Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.1.41 OS:Linux (centos5 / rhel5)
Assigned to: Balasubramanian Kandasamy CPU Architecture:Any
Tags: Bug #47372, my.cnf

[14 Jan 2010 9:24] Brett Cave
Description:
See Bug #47372 "This is not a bug"

The RPM package reports that /etc/my.cnf and /etc/mysqlmanager.passwd is packaged. This is incorrect.

If the files are not provided by the RPM, then the RPM should not have them included in the %files section.

This will also occur if the srpm is used to rebuild the rpm.

How to repeat:

# rpm -ivh MySQL-server-community-5.1.[38-42]-0.rhel5.[x86_64 i386].rpm

# for file in `rpm -ql MySQL-server-community`; do
   if [ ! -e $file ]; then
      echo Not found: $file
   fi
done

Not found: /etc/my.cnf
Not found: /etc/mysqlmanager.passwd

Suggested fix:
FIX 1
-----
mysql-5.1.41.rhel5.spec, line 810 (not sure of line number in other releases) - remove:

touch $RBR%{_sysconfdir}/my.cnf
touch $RBR%{_sysconfdir}/mysqlmanager.passwd

line 1078, remove:
%ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf
%ghost %config(noreplace,missingok) %{_sysconfdir}/mysqlmanager.passwd

FIX 2
-----
create empty files and remove missingok from %files section.
[15 Jan 2010 12:01] Susanne Ebrecht
The my.cnf file must not be placed always in /etc ... the server will look at 4 places to find it.

mysqld --verbose --help will show you where my.cnf can be placed per default.

Do you really think it would be clever to add a blanc file here e.g. in /etc which would overrule the file in e.g. /home
[15 Jan 2010 12:26] Brett Cave
I agree, don't stick in a blank file is not a good idea at all, perhaps the best option would be to remove it from the %files section so that the rpm doesn't report it incorrectly?
[15 Jan 2010 12:45] Susanne Ebrecht
We have to check here how difficult fixing will be here.

Many thank for pointing this out anyway.

Verfied as described.
[1 Dec 2016 13:39] Terje Røsten
Posted by developer:
 
By introduction of RPMS in MySQL repos, file /etc/my.cnf is indeed shipped and tracked as config file in server RPM package.