rpm upgrade from 5.2.9 broken

Bug #905712 reported by Joe Julian
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MariaDB
Fix Committed
Undecided
Sergey Petrunia
OurDelta
New
Undecided
Unassigned

Bug Description

The following error is produced in %pre. Looks like you're comparing Packager to Vendor.

******************************************************************
A MySQL or MariaDB server package (MariaDB-server-5.2.9-102.el5) is installed.

The current MariaDB server package is provided by a different
vendor (MariaDB (http://mariadb.com/)) than Monty Program - http://www.montyprogram.com/. 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 MariaDB-shared package.
- Install the new MariaDB packages supplied by Monty Program - http://www.montyprogram.com/
- Ensure that the MariaDB server is started
- Run the 'mysql_upgrade' program

This is a brief description of the upgrade process. Important details
can be found in the MariaDB manual, in the Upgrading section.
******************************************************************
error: %pre(MariaDB-server-5.2.10-107.el5.x86_64) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping MariaDB-server-5.2.10-107.el5

Tags: packaging
Joe Julian (joe.julian)
summary: - Vendor name changed, breaking rpm upgrade from 5.2.9
+ rpm upgrade from 5.2.9 broken
Changed in maria:
assignee: nobody → Colin Charles (ccharles)
Revision history for this message
Elena Stepanova (elenst) wrote :

Same problem between 5.3.2 and 5.3.3.

RPM info:

Name : MariaDB-server
Version : 5.2.9
Packager : OurDelta - http://ourdelta.org/
Vendor : MariaDB (http://mariadb.com/)

Name : MariaDB-server
Version : 5.2.10
Packager : Monty Program - http://www.montyprogram.com/
Vendor : MariaDB (http://mariadb.com/)

Changed in maria:
status: New → Confirmed
milestone: none → 5.2
milestone: 5.2 → 5.3
Elena Stepanova (elenst)
Changed in maria:
milestone: 5.3 → 5.2
Revision history for this message
Colin Charles (ccharles) wrote :

What has happened here is that in the last change, we changed the Packager from ourDelta to Monty Program (which is in fact, accurate).

We can fix this similarly to http://bugs.mysql.com/bug.php?id=45534

The fix is actually here: http://bazaar.launchpad.net/~mysql/mysql-server/5.1/view/head:/support-files/mysql.spec.sh
The workaround is to:
%define mysql_old_vendor OurDelta - http://ourdelta.org/
%define mysql_vendor Monty Program - http://www.montyprogram.com/

The 649-689 lines in mysql.spec.sh is the logic behind making a "safe" upgrade

Do you want me to fix this and patch it in bakery, or will you do it?

Thanks

Revision history for this message
Elena Stepanova (elenst) wrote :

Upgrade from 5.2.8 to 5.2.9 and from 5.3.1 to 5.3.2 is broken in the same fashion, only instead of "... than Monty Program " the error message says "... than OurDelta".
I believe the bug reporter correctly pointed at the root of the problem: we are comparing Vendor of the new package with the Packager of the old one.

Revision history for this message
Sergey Petrunia (sergefp) wrote :

Fails on centos 5.7, too:

[root@centos57-vm rpms]# rpm -qa | grep -i maria
MariaDB-shared-5.3.2-102.el5
MariaDB-test-5.3.2-102.el5
MariaDB-debuginfo-5.3.2-102.el5
MariaDB-devel-5.3.2-102.el5
MariaDB-server-5.3.2-102.el5
MariaDB-client-5.3.2-102.el5
[root@centos57-vm rpms]# rpm -U *.rpm
warning: MariaDB-client-5.3.3-108.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1bb943db

******************************************************************
A MySQL or MariaDB server package (MariaDB-server-5.3.2-102.el5) is installed.

The current MariaDB server package is provided by a different
vendor (MariaDB (http://mariadb.com/)) than Monty Program - http://www.montyprogram.com/. 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 MariaDB-shared package.
- Install the new MariaDB packages supplied by Monty Program - http://www.montyprogram.com/
- Ensure that the MariaDB server is started
- Run the 'mysql_upgrade' program

This is a brief description of the upgrade process. Important details
can be found in the MariaDB manual, in the Upgrading section.
******************************************************************
error: %pre(MariaDB-server-5.3.3-108.el5.x86_64) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping MariaDB-server-5.3.3-108.el5

Revision history for this message
Sergey Petrunia (sergefp) wrote :

Pushed a change to our bakery that should fix it. Unfortunately, that happened after MariaDB 5.3.5, so the new rpms will be only in mariadb-5.3.6

Changed in maria:
assignee: Colin Charles (ccharles) → Sergey Petrunia (sergefp)
Changed in maria:
status: Confirmed → Fix Committed
Elena Stepanova (elenst)
tags: added: packaging
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.