Bug #54574 Vendor name change breaks RPM downgrades
Submitted: 17 Jun 2010 5:30 Modified: 28 Oct 2010 18:03
Reporter: Mikiya Okuno Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.1.47 OS:Linux
Assigned to: CPU Architecture:Any

[17 Jun 2010 5:30] Mikiya Okuno
Description:
This bug is similar one to bug #45534, but they are different. In the previous bug, the vendor was changed from MySQL AB to Sun Microsystems Inc. In this bug, the vendor name was changed from Sun to Oracle.

shell>  rpm -Uvh --oldpackage --nopost MySQL-server-advanced-gpl-5.1.43-1.rhel4.x86_64.rpm
warning: MySQL-server-advanced-gpl-5.1.43-1.rhel4.x86_64.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing... ########################################### [100%]

******************************************************************
A MySQL server package (MySQL-server-advanced-gpl-5.1.47-1.rhel4) is installed.

The current MySQL server package is provided by a different
vendor (Oracle and/or its affiliates) than MySQL AB or 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-advanced-gpl-5.1.43-1.rhel4.x86_64) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping MySQL-server-advanced-gpl-5.1.43-1.rhel4

How to repeat:
Upgrade/downgrade from/to 5.1.43 and 5.1.47. I'm not certain exactly in which version the vendor name was changed.

Suggested fix:
Please fix RPM packaging.
[28 Oct 2010 18:03] Joerg Bruehe
First: The step you describe is no upgrade, it is a downgrade.
I do not think we ever planned to support automated downgrades.

This is not a bug, but the direct consequence of Oracle having acquired MySQL.
One implication of this was that we had to change the "vendor" field.

We must check that field on RPM upgrade, because RPMs of MySQL provided by other vendors (like Debian does with ".deb" packages) may use a different structure in the file system so the upgrade script would not work.
The vendor check makes sure this is reported to the user, who must then do it manually.

On a change of the vendor field (MySQL -> Sun, Sun -> Oracle) we have always maintained the scriptlets in the spec file so upgrades from a previous to the current vendor could be done automated.

While in theory we could have RPMs with vendor "MySQL" that accept changing from "Sun" or "Oracle", this is impossible in practice:
These versions are old versions whose RPMs have already been built (and published), so we cannot change them.

Even though the rpm program supports downgrades, the vendor field change will insert barriers there. The only way out would be a rebuild of RPMs from old source versions with changed scriptlets that accept the new vendor.

If there is sufficient justification for such an automated downgrade, ask for a custom build.