Bug #45534 Vendor name change breaks RPM upgrades
Submitted: 16 Jun 2009 17:02 Modified: 10 Aug 2009 22:53
Reporter: Matthew Lord Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S2 (Serious)
Version:5.0.82 OS:Linux (RPM based distros)
Assigned to: Joerg Bruehe CPU Architecture:Any

[16 Jun 2009 17:02] Matthew Lord
Description:
bash# rpm -Uvh MySQL-server-enterprise-gpl-5.0.82-0.rhel5.x86_64.rpm
Preparing... ########################################### [100%]

******************************************************************
A MySQL server package (MySQL-server-enterprise-gpl-5.0.68-0.rhel5.x86_64) is installed.

The current MySQL server package is provided by a different
vendor (MySQL AB) than Sun Microsystems, Inc.. Some files may be installed
to different locations, including log files and the service
startup script in /etc/init.d/.

A manual upgrade is required.

- Ensure that you have a complete, working backup of your data and my.cnf
files
- Shut down the MySQL server cleanly
- Remove the existing MySQL packages. Usually this command will
list the packages you should remove:
rpm -qa | grep -i '^mysql-'

You may choose to use 'rpm --nodeps -ev <package-name>' to remove
the package which contains the mysqlclient shared library. The
library will be reinstalled by the MySQL-shared-compat package.
- Install the new MySQL packages supplied by Sun Microsystems, Inc.
- Ensure that the MySQL server is started
- Run the 'mysql_upgrade' program

This is a brief description of the upgrade process. Important details
can be found in the MySQL manual, in the Upgrading section.
******************************************************************
error: %pre(MySQL-server-enterprise-gpl-5.0.82-0.rhel5.x86_64) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping MySQL-server-enterprise-gpl-5.0.82-0.rhel5
[root@mc01bprdb-05 ~]#

This is the current state of my installed server.

bash# rpm -qa | grep -i mysql
MySQL-server-enterprise-gpl-5.0.68-0.rhel5.x86_64

How to repeat:
N/A

Suggested fix:
We need to add an exception in the scriptlet so that it treats "MySQL AB"
and "Sun Microsystems, Inc." as a special case.
[17 Jun 2009 9:54] A P
The same for 5.0.83
[17 Jun 2009 23:24] Roel Van de Paar
Also see bug #42953
[15 Jul 2009 6:42] Sveta Smirnova
Bug #46174 was marked as duplicate of this one.
[29 Jul 2009 20:34] Joerg Bruehe
When the "vendor" was changed from "MySQL AB" to "Sun Microsystems",
it was forgotten to accept the old vendor for upgrading.

The "generic" RPMs (which are built from other spec files, and only for community configurations) had their code expanded to accept the old vendor, but the "specific" ones (for specific SuSE and RedHat versions) did not receive this expansion in their spec files.

I am currently adding this code and building a new RPM to verify it works.

Bugs #42953 and #46174 seem to be about the same problem.
[30 Jul 2009 17:50] Joerg Bruehe
Jonathan approved of the patch via IRC.
[30 Jul 2009 18:00] Joerg Bruehe
The patch is pushed to our build environment,
it will take effect in any build of 5.0 (starting from 5.0.85)
and 5.1 (starting from 5.1.38).

It fixes this bug#45534 and its duplicates, #42953 and #46174.

Our server RPMs will continue to not allow upgrading RPMs that
provide "mysql-server" ("provide" meaning the RPM header field)
and have a different "vendor" (also a RPM header field) than
"Sun Microsystems",
but they will now allow upgrading those from "MySQL AB"
(the vendor before we changed it because of the acquisition by Sun).

As written in my yesterday's comment, the "generic" RPMs
(those for the community, not targeted specifically at RHEL or SLES)
were never affected by this issue.
[10 Aug 2009 22:53] Paul DuBois
Note in 5.0.85, 5.1.38, 5.4.4 changelogs.

The vendor name change from MySQL AB to Sun Microsystems, Inc. in RPM
packages was not handled gracefully when upgrading MySQL using an RPM
package.
[7 Oct 2009 18:32] Paul DuBois
The 5.4 fix has been pushed to 5.4.2.