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

LP:857995 - MariaDB packages don't obsolete MySQL rpms

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • None
    • 5.5.28
    • None

    Description

      Since the files contained in the MariaDB rpms conflict with those in the MySQL rpms, this should be reflected in the MariaDB spec files. This will enable yum to handle this at the package level, rather than find out when it tries to install the files.

      Ideally, each MariaDB package would "Obsolete" the corresponding MySQL package. This should allow the MariaDB package to be yum/rpm installed on a system with MySQL installed, with yum/rpm automatically removing the MySQL rpm.

      This is accomplished by adding an "Obsoletes : " tag to the rpm spec file and listing the package to be replaced in the same way as a "Requires :" tag.

      Attachments

        Issue Links

          Activity

            colin Colin Charles added a comment -

            Re: MariaDB packages don't obsolete MySQL rpms
            Hi!

            We do provide the Obsoletes: tag in RPM. Where are you getting this from? mysql, mysql-server, etc. are obsoleted.

            Please provide where you got the RPM from and why yum didn't handle it.

            Thanks

            colin Colin Charles added a comment - Re: MariaDB packages don't obsolete MySQL rpms Hi! We do provide the Obsoletes: tag in RPM. Where are you getting this from? mysql, mysql-server, etc. are obsoleted. Please provide where you got the RPM from and why yum didn't handle it. Thanks

            Re: [Bug 857995] Re: MariaDB packages don't obsolete MySQL rpms
            Hmnnn... Looking closer at the RPMs, they do obsolete mysql. I suspect the problem I ran into is I had the -enterprise-gpl versions installed (e.g. MySQL-client-enterprise-gpl.x86_64). For example:

            MariaDB-shared-5.2.7-101.el5.x86_64 obsoletes mysql-shared
            but
            MySQL-shared-enterprise-gpl-5.0.72sp1-0.rhel5.x86_64 provides MySQL-shared

            could the case difference cause a problem?

            It could also be just a shortcoming of yum/rpm. In any case, I had to first remove the MySQL packages rather than having them removed automatically when installing MariaDB.

            Thanks,
            Jascha

            On Nov 12, 2011, at 7:04 AM, Colin Charles wrote:

            > Hi!
            >
            > We do provide the Obsoletes: tag in RPM. Where are you getting this
            > from? mysql, mysql-server, etc. are obsoleted.
            >
            > Please provide where you got the RPM from and why yum didn't handle it.
            >
            > Thanks
            >
            > ** Tags added: packaging
            >
            > –
            > You received this bug notification because you are subscribed to the bug
            > report.
            > https://bugs.launchpad.net/bugs/857995
            >
            > Title:
            > MariaDB packages don't obsolete MySQL rpms
            >
            > Status in Maria:
            > New
            >
            > Bug description:
            > Since the files contained in the MariaDB rpms conflict with those in
            > the MySQL rpms, this should be reflected in the MariaDB spec files.
            > This will enable yum to handle this at the package level, rather than
            > find out when it tries to install the files.
            >
            > Ideally, each MariaDB package would "Obsolete" the corresponding MySQL
            > package. This should allow the MariaDB package to be yum/rpm
            > installed on a system with MySQL installed, with yum/rpm automatically
            > removing the MySQL rpm.
            >
            > This is accomplished by adding an "Obsoletes : " tag to the rpm spec
            > file and listing the package to be replaced in the same way as a
            > "Requires :" tag.
            >
            > To manage notifications about this bug go to:
            > https://bugs.launchpad.net/maria/+bug/857995/+subscriptions

            jaschalee Jascha Lee (Inactive) added a comment - Re: [Bug 857995] Re: MariaDB packages don't obsolete MySQL rpms Hmnnn... Looking closer at the RPMs, they do obsolete mysql. I suspect the problem I ran into is I had the -enterprise-gpl versions installed (e.g. MySQL-client-enterprise-gpl.x86_64). For example: MariaDB-shared-5.2.7-101.el5.x86_64 obsoletes mysql-shared but MySQL-shared-enterprise-gpl-5.0.72sp1-0.rhel5.x86_64 provides MySQL-shared could the case difference cause a problem? It could also be just a shortcoming of yum/rpm. In any case, I had to first remove the MySQL packages rather than having them removed automatically when installing MariaDB. Thanks, Jascha On Nov 12, 2011, at 7:04 AM, Colin Charles wrote: > Hi! > > We do provide the Obsoletes: tag in RPM. Where are you getting this > from? mysql, mysql-server, etc. are obsoleted. > > Please provide where you got the RPM from and why yum didn't handle it. > > Thanks > > ** Tags added: packaging > > – > You received this bug notification because you are subscribed to the bug > report. > https://bugs.launchpad.net/bugs/857995 > > Title: > MariaDB packages don't obsolete MySQL rpms > > Status in Maria: > New > > Bug description: > Since the files contained in the MariaDB rpms conflict with those in > the MySQL rpms, this should be reflected in the MariaDB spec files. > This will enable yum to handle this at the package level, rather than > find out when it tries to install the files. > > Ideally, each MariaDB package would "Obsolete" the corresponding MySQL > package. This should allow the MariaDB package to be yum/rpm > installed on a system with MySQL installed, with yum/rpm automatically > removing the MySQL rpm. > > This is accomplished by adding an "Obsoletes : " tag to the rpm spec > file and listing the package to be replaced in the same way as a > "Requires :" tag. > > To manage notifications about this bug go to: > https://bugs.launchpad.net/maria/+bug/857995/+subscriptions

            Re: MariaDB packages don't obsolete MySQL rpms
            I think including the Obsoletes is a mistake for a couple different reasons.

            Many folks set up their own repository for use with yum and they put MariaDB packages into that repository to ease rollout to their various hosts. The side-effect of building the MariaDB-Server RPM with these Obsoletes is that it becomes impossible to install MySQL packages that might also be present in the repository. I am not referring here to someone trying to install MySQL and MariaDB simultaneously on the same host; rather, I am referring to someone wanting to be able to select whether to install MySQL or MariaDB, RPMs for both of which are present in their yum repository.

            [root@mariadb53 ~]# yum install mysql-server mysql
            Loaded plugins: fastestmirror
            Loading mirror speeds from cached hostfile

            • base: mirror.fdcservers.net
            • extras: mirror.fdcservers.net
            • updates: mirror.fdcservers.net
              Setting up Install Process
              Package mysql-server is obsoleted by MariaDB-server, trying to install MariaDB-server-5.5.27-1.x86_64 instead
              Package mysql is obsoleted by MariaDB-server, trying to install MariaDB-server-5.5.27-1.x86_64 instead

            This illustrates that an attempt to install (upgrade is also affected!) MySQL from the user's own repository results in MariaDB automatically being selected for installation instead.

            You may note, here, that MariaDB-Server obsoletes "mysql", which is very strange. In Enterprise Linux, "mysql" is the client package ("mysql.x86_64 : MySQL client programs and shared libraries"). By building the MariaDB-Server to Obsolete "mysql", an attempt to install the MySQL client will result in the MariaDB Server being installed! That is, surely, not intended or desirable...

            So, I have two concerns here:

            1) Why does MariaDB "Obsolete" any of these other MySQL packages? I had trouble finding good guidance about what "Obsolete" is used for, but I did find http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-dependencies.html#RPM_Guide-Dependencies-obsoletes which explains it in this way:

            The RPM system supports one more type of dependency, called obsoletes. This refers to a capability that a package provides that makes another capability obsolete. For example, a new version of the perl interpreter may make an older version obsolete. In most cases, the obsoletes dependency should be used when the name of a package changes. For example, the apache Web server package became the httpd package. You would expect the new package, httpd, to obsolete the old package name, apache.

            MariaDB-Server is certainly not a renamed version of MySQL, nor does it logically make MySQL "obsolete". The two certainly conflict, but it does not make sense (except perhaps in a political sense!) to say that MariaDB makes MySQL "obsolete".

            The first "Obsolete" in the spec is to make "MariaDB" obsoleted by "MariaDB-Server". If there is some previous RPM of MariaDB that was called only "MariaDB" and contained mysqld, it does make sense to leave that one in, as this is a case of the package being renamed from "MariaDB" to "MariaDB-Server".

            I am interested to know the logic behind putting these other Obsolete lines into the spec. What does it give that you don't get with Conflicts?

            2) The other issue, beyond whether it is useful to have any Obsoletes for MySQL in the MariaDB RPM, is why MariaDB should Obsolete "mysql". This definitely does not make sense, as "mysql" is the name of the package that contains the MySQL client and shared libraries; MariaDB-Server cannot in any sense make obsolete the MySQL client...

            kolbe Kolbe Kegel (Inactive) added a comment - Re: MariaDB packages don't obsolete MySQL rpms I think including the Obsoletes is a mistake for a couple different reasons. Many folks set up their own repository for use with yum and they put MariaDB packages into that repository to ease rollout to their various hosts. The side-effect of building the MariaDB-Server RPM with these Obsoletes is that it becomes impossible to install MySQL packages that might also be present in the repository. I am not referring here to someone trying to install MySQL and MariaDB simultaneously on the same host; rather, I am referring to someone wanting to be able to select whether to install MySQL or MariaDB, RPMs for both of which are present in their yum repository. [root@mariadb53 ~] # yum install mysql-server mysql Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile base: mirror.fdcservers.net extras: mirror.fdcservers.net updates: mirror.fdcservers.net Setting up Install Process Package mysql-server is obsoleted by MariaDB-server, trying to install MariaDB-server-5.5.27-1.x86_64 instead Package mysql is obsoleted by MariaDB-server, trying to install MariaDB-server-5.5.27-1.x86_64 instead This illustrates that an attempt to install (upgrade is also affected!) MySQL from the user's own repository results in MariaDB automatically being selected for installation instead. You may note, here, that MariaDB-Server obsoletes "mysql", which is very strange. In Enterprise Linux, "mysql" is the client package ("mysql.x86_64 : MySQL client programs and shared libraries"). By building the MariaDB-Server to Obsolete "mysql", an attempt to install the MySQL client will result in the MariaDB Server being installed! That is, surely, not intended or desirable... So, I have two concerns here: 1) Why does MariaDB "Obsolete" any of these other MySQL packages? I had trouble finding good guidance about what "Obsolete" is used for, but I did find http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-dependencies.html#RPM_Guide-Dependencies-obsoletes which explains it in this way: The RPM system supports one more type of dependency, called obsoletes. This refers to a capability that a package provides that makes another capability obsolete. For example, a new version of the perl interpreter may make an older version obsolete. In most cases, the obsoletes dependency should be used when the name of a package changes. For example, the apache Web server package became the httpd package. You would expect the new package, httpd, to obsolete the old package name, apache. MariaDB-Server is certainly not a renamed version of MySQL, nor does it logically make MySQL "obsolete". The two certainly conflict , but it does not make sense (except perhaps in a political sense!) to say that MariaDB makes MySQL "obsolete". The first "Obsolete" in the spec is to make "MariaDB" obsoleted by "MariaDB-Server". If there is some previous RPM of MariaDB that was called only "MariaDB" and contained mysqld, it does make sense to leave that one in, as this is a case of the package being renamed from "MariaDB" to "MariaDB-Server". I am interested to know the logic behind putting these other Obsolete lines into the spec. What does it give that you don't get with Conflicts? 2) The other issue, beyond whether it is useful to have any Obsoletes for MySQL in the MariaDB RPM, is why MariaDB should Obsolete "mysql". This definitely does not make sense, as "mysql" is the name of the package that contains the MySQL client and shared libraries; MariaDB-Server cannot in any sense make obsolete the MySQL client...

            Re: MariaDB packages don't obsolete MySQL rpms
            These are good points. The benefit of the automatic upgrade could be more than offset by the lack of flexibility and the ability to maintain installs of either MySQL or MariaDB hosts from the same repository.

            If there are Obsoletes in the packages they should be consistent. So maybe remove them all?

            As to your question about the mysql Obsoletes. These refer to "providers", not necessarily package names:

            http://www.rpm.org/max-rpm/s1-rpm-inside-tags.html

            http://www.rpm.org/max-rpm/ch-rpm-depend.html

            jaschalee Jascha Lee (Inactive) added a comment - Re: MariaDB packages don't obsolete MySQL rpms These are good points. The benefit of the automatic upgrade could be more than offset by the lack of flexibility and the ability to maintain installs of either MySQL or MariaDB hosts from the same repository. If there are Obsoletes in the packages they should be consistent. So maybe remove them all? As to your question about the mysql Obsoletes. These refer to "providers", not necessarily package names: http://www.rpm.org/max-rpm/s1-rpm-inside-tags.html http://www.rpm.org/max-rpm/ch-rpm-depend.html

            Launchpad bug id: 857995

            ratzpo Rasmus Johansson (Inactive) added a comment - Launchpad bug id: 857995

            People

              serg Sergei Golubchik
              jaschalee Jascha Lee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 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.