Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3950

mariadb rpms should not obsolete mysql?

Details

    Description

      Currently mariadb rpms obsolete mysql rpms. This allows the user to install mariadb over the existing mysql installation, without having to uninstall mysql manually first (together with all packages that depend on mysql).

      There are opinions that using "obsolete" in this way is wrong. See, for example, this comment

      We need to study the issue and solve it somehow, if possible.

      Attachments

        Issue Links

          Activity

            americanwookie Scott O'Neil added a comment - - edited

            Currently, the RPMs try to use files and "Provides" that conflict with a MySQL installation on a server:

            [root@master-a rpms]# rpm -ivh MariaDB-5.5.37-centos5-x86_64-* --test
            error: Failed dependencies:
                    MySQL conflicts with mysql-5.0.95-5.el5_9.x86_64
                    MySQL conflicts with mysql-5.0.95-5.el5_9.i386
                    MySQL-server conflicts with mysql-server-5.0.95-5.el5_9.x86_64
            [root@master-a rpms]# 

            as a result, there is no clean pathway to use RPM to handle an upgrade from MySQL -> MariaDB.

            One could rpm -e to remove the pre-existing MySQL RPMs, but if there are any other packages that rely on MySQL, you'll need to use --nodeps. This will render the upgrade process non-transactional. rpm -U really is the best way to do this, and these sorts of conflicts are exactly what Obsoletes is designed to manage.

            The concern described in the cited Comment in the description can be handled differently: We keep our Maria RPMs in a completely separate repository, and when we know we want a server to use Maria, we install that particular repos release RPM. This allows for us to deploy both MySQL and Maria infrastructure. However, because of the lack of comprehensive Obsoletes tags, we have no way "clean" way to programmatically handle upgrades from MySQL to Maria.

            americanwookie Scott O'Neil added a comment - - edited Currently, the RPMs try to use files and "Provides" that conflict with a MySQL installation on a server: [root@master-a rpms]# rpm -ivh MariaDB-5.5.37-centos5-x86_64-* --test error: Failed dependencies: MySQL conflicts with mysql-5.0.95-5.el5_9.x86_64 MySQL conflicts with mysql-5.0.95-5.el5_9.i386 MySQL-server conflicts with mysql-server-5.0.95-5.el5_9.x86_64 [root@master-a rpms]# as a result, there is no clean pathway to use RPM to handle an upgrade from MySQL -> MariaDB. One could rpm -e to remove the pre-existing MySQL RPMs, but if there are any other packages that rely on MySQL, you'll need to use --nodeps. This will render the upgrade process non-transactional. rpm -U really is the best way to do this, and these sorts of conflicts are exactly what Obsoletes is designed to manage. The concern described in the cited Comment in the description can be handled differently: We keep our Maria RPMs in a completely separate repository, and when we know we want a server to use Maria, we install that particular repos release RPM. This allows for us to deploy both MySQL and Maria infrastructure. However, because of the lack of comprehensive Obsoletes tags, we have no way "clean" way to programmatically handle upgrades from MySQL to Maria.

            americanwookie, the recommended way to upgrade is to use yum. It supports transactions and can remove MySQL and install MariaDB in one transaction without breaking dependencies. While rpm is like autocommit mode, you need to have consistent state after every operation or use -nodeps.

            serg Sergei Golubchik added a comment - americanwookie , the recommended way to upgrade is to use yum. It supports transactions and can remove MySQL and install MariaDB in one transaction without breaking dependencies. While rpm is like autocommit mode, you need to have consistent state after every operation or use -nodeps.
            americanwookie Scott O'Neil added a comment - - edited

            I agree, I'd prefer to use yum, but with the Obsoletes as it currently stands, I can't. Here's what happens:

            [root@master-b ~]# yum install -y MariaDB
            Loaded plugins: fastestmirror
            Loading mirror speeds from cached hostfile
             * base: dallas.tx.mirror.xygenhosting.com
             * epel: mirror.utexas.edu
             * extras: centos.mirror.lstn.net
             * updates: mirror.beyondhosting.net
            Excluding Packages from Extra Packages for Enterprise Linux 5 - x86_64
            Finished
            Excluding Packages from MariaDB
            Finished
            Setting up Install Process
            Resolving Dependencies
            --> Running transaction check
            ---> Package MariaDB-server.x86_64 0:5.5.37-1 set to be updated
            --> Processing Dependency: MariaDB-client for package: MariaDB-server
            --> Processing Dependency: MariaDB-common for package: MariaDB-server
            --> Running transaction check
            ---> Package MariaDB-client.x86_64 0:5.5.37-1 set to be updated
            ---> Package MariaDB-common.x86_64 0:5.5.37-1 set to be updated
            --> Processing Conflict: mysql conflicts MySQL
            --> Restarting Dependency Resolution with new changes.
            --> Running transaction check
            ---> Package MariaDB-shared.x86_64 0:5.5.37-1 set to be updated
            --> Processing Dependency: libmysqlclient.so.15()(64bit) for package: perl-DBD-MySQL
            --> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: perl-DBD-MySQL
            --> Processing Dependency: libmysqlclient_r.so.15()(64bit) for package: collectd-mysql
            --> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15)(64bit) for package: collectd-mysql
            --> Running transaction check
            ---> Package MariaDB-compat.x86_64 0:5.5.37-1 set to be updated
            --> Finished Dependency Resolution
             
            Dependencies Resolved
             
            ===============================================================================================================================================================================================================================
             Package                                                    Arch                                               Version                                               Repository                                           Size
            ===============================================================================================================================================================================================================================
            Installing:
             MariaDB-server                                             x86_64                                             5.5.37-1                                              mariadb                                              43 M
                 replacing  mysql-server.x86_64 5.0.95-5.el5_9
             
             MariaDB-shared                                             x86_64                                             5.5.37-1                                              mariadb                                             1.3 M
                 replacing  mysql.x86_64 5.0.95-5.el5_9
             
            Installing for dependencies:
             MariaDB-client                                             x86_64                                             5.5.37-1                                              mariadb                                              12 M
             MariaDB-common                                             x86_64                                             5.5.37-1                                              mariadb                                              29 k
             MariaDB-compat                                             x86_64                                             5.5.37-1                                              mariadb                                             3.4 M
             
            Transaction Summary
            ===============================================================================================================================================================================================================================
            Install       5 Package(s)
            Upgrade       0 Package(s)
             
            Total size: 60 M
            Downloading Packages:
            Running rpm_check_debug
            ERROR with rpm_check_debug vs depsolve:
            MySQL conflicts with mysql-5.0.95-5.el5_9.i386
            Complete!
            (1, [u'Please report this error in http://bugs.centos.org/yum5bug'])
            [root@master-b ~]#

            The crux of this problem seems to be obsoletes. For the sake of simplifying discussion, I've been using rpm directly. AFAIK, rpm is bound by the same concerns as yum when it comes to obsoletes, but rpm gives us a much simpler output/test case than yum.

            americanwookie Scott O'Neil added a comment - - edited I agree, I'd prefer to use yum, but with the Obsoletes as it currently stands, I can't. Here's what happens: [root@master-b ~]# yum install -y MariaDB Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: dallas.tx.mirror.xygenhosting.com * epel: mirror.utexas.edu * extras: centos.mirror.lstn.net * updates: mirror.beyondhosting.net Excluding Packages from Extra Packages for Enterprise Linux 5 - x86_64 Finished Excluding Packages from MariaDB Finished Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package MariaDB-server.x86_64 0:5.5.37-1 set to be updated --> Processing Dependency: MariaDB-client for package: MariaDB-server --> Processing Dependency: MariaDB-common for package: MariaDB-server --> Running transaction check ---> Package MariaDB-client.x86_64 0:5.5.37-1 set to be updated ---> Package MariaDB-common.x86_64 0:5.5.37-1 set to be updated --> Processing Conflict: mysql conflicts MySQL --> Restarting Dependency Resolution with new changes. --> Running transaction check ---> Package MariaDB-shared.x86_64 0:5.5.37-1 set to be updated --> Processing Dependency: libmysqlclient.so.15()(64bit) for package: perl-DBD-MySQL --> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: perl-DBD-MySQL --> Processing Dependency: libmysqlclient_r.so.15()(64bit) for package: collectd-mysql --> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15)(64bit) for package: collectd-mysql --> Running transaction check ---> Package MariaDB-compat.x86_64 0:5.5.37-1 set to be updated --> Finished Dependency Resolution   Dependencies Resolved   =============================================================================================================================================================================================================================== Package Arch Version Repository Size =============================================================================================================================================================================================================================== Installing: MariaDB-server x86_64 5.5.37-1 mariadb 43 M replacing mysql-server.x86_64 5.0.95-5.el5_9   MariaDB-shared x86_64 5.5.37-1 mariadb 1.3 M replacing mysql.x86_64 5.0.95-5.el5_9   Installing for dependencies: MariaDB-client x86_64 5.5.37-1 mariadb 12 M MariaDB-common x86_64 5.5.37-1 mariadb 29 k MariaDB-compat x86_64 5.5.37-1 mariadb 3.4 M   Transaction Summary =============================================================================================================================================================================================================================== Install 5 Package(s) Upgrade 0 Package(s)   Total size: 60 M Downloading Packages: Running rpm_check_debug ERROR with rpm_check_debug vs depsolve: MySQL conflicts with mysql-5.0.95-5.el5_9.i386 Complete! (1, [u'Please report this error in http://bugs.centos.org/yum5bug']) [root@master-b ~]# The crux of this problem seems to be obsoletes. For the sake of simplifying discussion, I've been using rpm directly. AFAIK, rpm is bound by the same concerns as yum when it comes to obsoletes, but rpm gives us a much simpler output/test case than yum.
            americanwookie Scott O'Neil added a comment -

            Wait, I've probably misdiagnosed this. This server has x86_64 and i386 RPMs. More troubleshooting is needed. Updates coming.

            americanwookie Scott O'Neil added a comment - Wait, I've probably misdiagnosed this. This server has x86_64 and i386 RPMs. More troubleshooting is needed. Updates coming.
            americanwookie Scott O'Neil added a comment -

            Well, my apologies for working some troubleshooting in here. The following rpm line did the trick for me:

            rpm -e mysql-5.0.95-5.el5_9.i386

            I'm sure the equivalent yum comand (yum remove mysql-5.0.95-5.el5_9.i386) would've done the trick too. I'm wondering why the Obsoletes didn't catch all the architectures.

            At any rate, my update here is a +1 vote for the Maria project to continue using/maintaining Obsoletes in the RPMs.

            americanwookie Scott O'Neil added a comment - Well, my apologies for working some troubleshooting in here. The following rpm line did the trick for me: rpm -e mysql-5.0.95-5.el5_9.i386 I'm sure the equivalent yum comand (yum remove mysql-5.0.95-5.el5_9.i386) would've done the trick too. I'm wondering why the Obsoletes didn't catch all the architectures. At any rate, my update here is a +1 vote for the Maria project to continue using/maintaining Obsoletes in the RPMs.
            danblack Daniel Black added a comment -

            Thanks americanwookie, I assume you barely remember making this comment but I'll close this, and even though we don't catch all arches, I think the RHEL5 problem is oever.

            I hope if you still have a database need, MariaDB is filling it for you.

            danblack Daniel Black added a comment - Thanks americanwookie , I assume you barely remember making this comment but I'll close this, and even though we don't catch all arches, I think the RHEL5 problem is oever. I hope if you still have a database need, MariaDB is filling it for you.

            People

              Unassigned Unassigned
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.