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

Upgrade from Debian's to MariaDB's 10.1 packages fails

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.1(EOL)
    • 10.5.3
    • Packaging, Platform Debian
    • None
    • Debian testing (stretch) x86_64

    Description

      • install MariaDB server from default Debian repo on stretch:

        $ sudo apt-get install mariadb-server
        ...
        $ dpkg -l | grep -iE 'maria|mysql'
        ii  libdbd-mysql-perl             4.041-1                     amd64        Perl5 database interface to the MariaDB/MySQL database
        ii  libmariadbclient18:amd64      10.1.21-5                   amd64        MariaDB database client library
        ii  mariadb-client-10.1           10.1.21-5                   amd64        MariaDB database client binaries
        ii  mariadb-client-core-10.1      10.1.21-5                   amd64        MariaDB database core client binaries
        ii  mariadb-common                10.1.21-5                   all          MariaDB common metapackage
        ii  mariadb-server                10.1.21-5                   all          MariaDB database server (metapackage depending on the latest version)
        ii  mariadb-server-10.1           10.1.21-5                   amd64        MariaDB database server binaries
        ii  mariadb-server-core-10.1      10.1.21-5                   amd64        MariaDB database core server files
        ii  mysql-common                  5.8+1.0.2                   all          MySQL database common files, e.g. /etc/mysql/my.cnf
        

      • enable MariaDB repo:

        deb http://mirror2.hs-esslingen.de/mariadb/repo/10.1/debian stretch main
        

      • install MariaDB:

        $ sudo apt-get install mariadb-server
        Reading package lists... Done
        Building dependency tree       
        Reading state information... Done
        The following packages were automatically installed and are no longer required:
          libpq5 libstemmer0d
        Use 'sudo apt autoremove' to remove them.
        The following additional packages will be installed:
          iproute libmariadbclient18 libmysqlclient18 mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common mariadb-server-10.1
          mariadb-server-core-10.1
        Suggested packages:
          mailx mariadb-test netcat-openbsd tinyca
        The following NEW packages will be installed:
          iproute libmysqlclient18
        The following packages will be upgraded:
          libmariadbclient18 mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common mariadb-server mariadb-server-10.1 mariadb-server-core-10.1
        7 upgraded, 2 newly installed, 0 to remove and 214 not upgraded.
        Need to get 12.5 MB of archives.
        After this operation, 419 kB of additional disk space will be used.
        

      The attempt fails with the error:

      Unpacking mariadb-server-10.1 (10.1.21+maria-1~stretch) over (10.1.21-5) ...
      dpkg: error processing archive /tmp/apt-dpkg-install-p1JA1s/0-mariadb-server-10.1_10.1.21+maria-1~stretch_amd64.deb (--unpack):
       trying to overwrite '/usr/bin/mysql_upgrade', which is also in package mariadb-server-core-10.1 10.1.21-5
      dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
      dpkg: regarding .../1-mariadb-server-core-10.1_10.1.21+maria-1~stretch_amd64.deb containing mariadb-server-core-10.1:
       mariadb-server-10.1 conflicts with mysql-server-core-5.5
        mariadb-server-core-10.1 provides mysql-server-core-5.5 and is to be installed.
       
      dpkg: error processing archive /tmp/apt-dpkg-install-p1JA1s/1-mariadb-server-core-10.1_10.1.21+maria-1~stretch_amd64.deb (--unpack):
       conflicting packages - not installing mariadb-server-core-10.1
      Selecting previously unselected package iproute.
      Preparing to unpack .../2-iproute_1%3a4.9.0-1_all.deb ...
      Unpacking iproute (1:4.9.0-1) ...
      dpkg: regarding .../3-mariadb-client-core-10.1_10.1.21+maria-1~stretch_amd64.deb containing mariadb-client-core-10.1:
       mariadb-client-10.1 conflicts with mysql-client-core-5.5
        mariadb-client-core-10.1 provides mysql-client-core-5.5 and is to be installed.
       
      dpkg: error processing archive /tmp/apt-dpkg-install-p1JA1s/3-mariadb-client-core-10.1_10.1.21+maria-1~stretch_amd64.deb (--unpack):
       conflicting packages - not installing mariadb-client-core-10.1
      dpkg: regarding .../4-mariadb-client-10.1_10.1.21+maria-1~stretch_amd64.deb containing mariadb-client-10.1:
       mariadb-client-core-10.1 conflicts with mysql-client-5.5
        mariadb-client-10.1 provides mysql-client-5.5 and is to be installed.
       
      dpkg: error processing archive /tmp/apt-dpkg-install-p1JA1s/4-mariadb-client-10.1_10.1.21+maria-1~stretch_amd64.deb (--unpack):
       conflicting packages - not installing mariadb-client-10.1
      Errors were encountered while processing:
       /tmp/apt-dpkg-install-p1JA1s/0-mariadb-server-10.1_10.1.21+maria-1~stretch_amd64.deb
       /tmp/apt-dpkg-install-p1JA1s/1-mariadb-server-core-10.1_10.1.21+maria-1~stretch_amd64.deb
       /tmp/apt-dpkg-install-p1JA1s/3-mariadb-client-core-10.1_10.1.21+maria-1~stretch_amd64.deb
       /tmp/apt-dpkg-install-p1JA1s/4-mariadb-client-10.1_10.1.21+maria-1~stretch_amd64.deb
      E: Sub-process /usr/bin/dpkg returned an error code (1)
      

      Attachments

        Issue Links

          Activity

            otto Otto Kekäläinen added a comment - - edited

            There is no sensible fix for this.You cannot mix two different repos that provide the same package.

            If you want to run MariaDB 10.1 in Debian 9, you can use the ones from the Debian's own repo. There is no need to use 10.1 from the MariaDB.org repos. If you for some reason really want to do so, then use apt pinning to make sure that all of your MariaDB packages are installed from MariaDB.org.

            otto Otto Kekäläinen added a comment - - edited There is no sensible fix for this.You cannot mix two different repos that provide the same package. If you want to run MariaDB 10.1 in Debian 9, you can use the ones from the Debian's own repo. There is no need to use 10.1 from the MariaDB.org repos. If you for some reason really want to do so, then use apt pinning to make sure that all of your MariaDB packages are installed from MariaDB.org.

            otto,

            It's the scenario that you requested in your matrix stretch / test_4: MariaDB 10.1** → 10.1.

            We already discussed this failure earlier. I guess you didn't recognize it because in the example both versions just happen to be the same 10.1.21 (because Debian and MariaDB repos at the moment contain the same version, and I wanted to avoid dealing with local packages just for the sake of filing the report, as it's rather time-consuming).

            But here is the exact replica of the scenario that we discussed – upgrade/dist-upgrade from Debian's MariaDB 10.1.21 to MariaDB's MariaDB 10.1.22:

            $ dpkg -l | grep -iE 'maria|mysql'
            ii  libdbd-mysql-perl             4.041-1                     amd64        Perl5 database interface to the MariaDB/MySQL database
            ii  libmariadbclient18:amd64      10.1.21-5                   amd64        MariaDB database client library
            ii  mariadb-client-10.1           10.1.21-5                   amd64        MariaDB database client binaries
            ii  mariadb-client-core-10.1      10.1.21-5                   amd64        MariaDB database core client binaries
            ii  mariadb-common                10.1.21-5                   all          MariaDB common metapackage
            ii  mariadb-server                10.1.21-5                   all          MariaDB database server (metapackage depending on the latest version)
            ii  mariadb-server-10.1           10.1.21-5                   amd64        MariaDB database server binaries
            ii  mariadb-server-core-10.1      10.1.21-5                   amd64        MariaDB database core server files
            ii  mysql-common                  5.8+1.0.2                   all          MySQL database common files, e.g. /etc/mysql/my.cnf
            

            upgrade

            $ sudo apt-get upgrade
            Reading package lists... Done
            Building dependency tree       
            Reading state information... Done
            Calculating upgrade... Done
            The following packages were automatically installed and are no longer required:
              libpq5 libstemmer0d linux-image-4.7.0-1-amd64
            Use 'sudo apt autoremove' to remove them.
            The following packages have been kept back:
              libmariadbclient18 mariadb-client-10.1 mariadb-client-core-10.1 mariadb-server mariadb-server-10.1 mariadb-server-core-10.1
            The following packages will be upgraded:
              mariadb-common mysql-common
            2 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
            

            $ dpkg -l | grep -iE 'maria|mysql'
            ii  libdbd-mysql-perl             4.041-1                     amd64        Perl5 database interface to the MariaDB/MySQL database
            ii  libmariadbclient18:amd64      10.1.21-5                   amd64        MariaDB database client library
            ii  mariadb-client-10.1           10.1.21-5                   amd64        MariaDB database client binaries
            ii  mariadb-client-core-10.1      10.1.21-5                   amd64        MariaDB database core client binaries
            ii  mariadb-common                10.1.22+maria-1~stretch     all          MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
            ii  mariadb-server                10.1.21-5                   all          MariaDB database server (metapackage depending on the latest version)
            ii  mariadb-server-10.1           10.1.21-5                   amd64        MariaDB database server binaries
            ii  mariadb-server-core-10.1      10.1.21-5                   amd64        MariaDB database core server files
            ii  mysql-common                  10.1.22+maria-1~stretch     all          MariaDB database common files (e.g. /etc/mysql/my.cnf)
            

            dist-upgrade

            $ sudo apt-get dist-upgrade
            Reading package lists... Done
            Building dependency tree       
            Reading state information... Done
            Calculating upgrade... Done
            The following packages were automatically installed and are no longer required:
              libpq5 libstemmer0d linux-image-4.7.0-1-amd64
            Use 'sudo apt autoremove' to remove them.
            The following NEW packages will be installed:
              iproute libmysqlclient18
            The following packages will be upgraded:
              libmariadbclient18 mariadb-client-10.1 mariadb-client-core-10.1 mariadb-server mariadb-server-10.1 mariadb-server-core-10.1
            6 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
            ...
            

            Unpacking mariadb-server-10.1 (10.1.22+maria-1~stretch) over (10.1.21-5) ...
            dpkg: error processing archive /tmp/apt-dpkg-install-Y3YAd8/3-mariadb-server-10.1_10.1.22+maria-1~stretch_amd64.deb (--unpack):
             trying to overwrite '/usr/bin/mysql_upgrade', which is also in package mariadb-server-core-10.1 10.1.21-5
            dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
            dpkg: regarding .../4-mariadb-server-core-10.1_10.1.22+maria-1~stretch_amd64.deb containing mariadb-server-core-10.1:
             mariadb-server-10.1 conflicts with mysql-server-core-5.5
              mariadb-server-core-10.1 provides mysql-server-core-5.5 and is to be installed.
            ...
            Errors were encountered while processing:
             /tmp/apt-dpkg-install-Y3YAd8/3-mariadb-server-10.1_10.1.22+maria-1~stretch_amd64.deb
             /tmp/apt-dpkg-install-Y3YAd8/4-mariadb-server-core-10.1_10.1.22+maria-1~stretch_amd64.deb
             /tmp/apt-dpkg-install-Y3YAd8/6-mariadb-client-core-10.1_10.1.22+maria-1~stretch_amd64.deb
             /tmp/apt-dpkg-install-Y3YAd8/7-mariadb-client-10.1_10.1.22+maria-1~stretch_amd64.deb
            E: Sub-process /usr/bin/dpkg returned an error code (1)
            

            You looked into it and said that it's a packaging problem:

            This is a real error. Testing is correct and detects this. The mysql_upgrade file has moved and packaging needs to be updated with correct breaks/replaces in the debian/control file. I can do this fix.

            Do you want to remove 10.1=>10.1 scenario from the matrix?

            elenst Elena Stepanova added a comment - otto , It's the scenario that you requested in your matrix stretch / test_4: MariaDB 10.1** → 10.1 . We already discussed this failure earlier. I guess you didn't recognize it because in the example both versions just happen to be the same 10.1.21 (because Debian and MariaDB repos at the moment contain the same version, and I wanted to avoid dealing with local packages just for the sake of filing the report, as it's rather time-consuming). But here is the exact replica of the scenario that we discussed – upgrade/dist-upgrade from Debian's MariaDB 10.1.21 to MariaDB's MariaDB 10.1.22: $ dpkg -l | grep -iE 'maria|mysql' ii libdbd-mysql-perl 4.041-1 amd64 Perl5 database interface to the MariaDB/MySQL database ii libmariadbclient18:amd64 10.1.21-5 amd64 MariaDB database client library ii mariadb-client-10.1 10.1.21-5 amd64 MariaDB database client binaries ii mariadb-client-core-10.1 10.1.21-5 amd64 MariaDB database core client binaries ii mariadb-common 10.1.21-5 all MariaDB common metapackage ii mariadb-server 10.1.21-5 all MariaDB database server (metapackage depending on the latest version) ii mariadb-server-10.1 10.1.21-5 amd64 MariaDB database server binaries ii mariadb-server-core-10.1 10.1.21-5 amd64 MariaDB database core server files ii mysql-common 5.8+1.0.2 all MySQL database common files, e.g. /etc/mysql/my.cnf upgrade $ sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages were automatically installed and are no longer required: libpq5 libstemmer0d linux-image-4.7.0-1-amd64 Use 'sudo apt autoremove' to remove them. The following packages have been kept back: libmariadbclient18 mariadb-client-10.1 mariadb-client-core-10.1 mariadb-server mariadb-server-10.1 mariadb-server-core-10.1 The following packages will be upgraded: mariadb-common mysql-common 2 upgraded, 0 newly installed, 0 to remove and 6 not upgraded. $ dpkg -l | grep -iE 'maria|mysql' ii libdbd-mysql-perl 4.041-1 amd64 Perl5 database interface to the MariaDB/MySQL database ii libmariadbclient18:amd64 10.1.21-5 amd64 MariaDB database client library ii mariadb-client-10.1 10.1.21-5 amd64 MariaDB database client binaries ii mariadb-client-core-10.1 10.1.21-5 amd64 MariaDB database core client binaries ii mariadb-common 10.1.22+maria-1~stretch all MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf) ii mariadb-server 10.1.21-5 all MariaDB database server (metapackage depending on the latest version) ii mariadb-server-10.1 10.1.21-5 amd64 MariaDB database server binaries ii mariadb-server-core-10.1 10.1.21-5 amd64 MariaDB database core server files ii mysql-common 10.1.22+maria-1~stretch all MariaDB database common files (e.g. /etc/mysql/my.cnf) dist-upgrade $ sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages were automatically installed and are no longer required: libpq5 libstemmer0d linux-image-4.7.0-1-amd64 Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: iproute libmysqlclient18 The following packages will be upgraded: libmariadbclient18 mariadb-client-10.1 mariadb-client-core-10.1 mariadb-server mariadb-server-10.1 mariadb-server-core-10.1 6 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. ... Unpacking mariadb-server-10.1 (10.1.22+maria-1~stretch) over (10.1.21-5) ... dpkg: error processing archive /tmp/apt-dpkg-install-Y3YAd8/3-mariadb-server-10.1_10.1.22+maria-1~stretch_amd64.deb (--unpack): trying to overwrite '/usr/bin/mysql_upgrade', which is also in package mariadb-server-core-10.1 10.1.21-5 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) dpkg: regarding .../4-mariadb-server-core-10.1_10.1.22+maria-1~stretch_amd64.deb containing mariadb-server-core-10.1: mariadb-server-10.1 conflicts with mysql-server-core-5.5 mariadb-server-core-10.1 provides mysql-server-core-5.5 and is to be installed. ... Errors were encountered while processing: /tmp/apt-dpkg-install-Y3YAd8/3-mariadb-server-10.1_10.1.22+maria-1~stretch_amd64.deb /tmp/apt-dpkg-install-Y3YAd8/4-mariadb-server-core-10.1_10.1.22+maria-1~stretch_amd64.deb /tmp/apt-dpkg-install-Y3YAd8/6-mariadb-client-core-10.1_10.1.22+maria-1~stretch_amd64.deb /tmp/apt-dpkg-install-Y3YAd8/7-mariadb-client-10.1_10.1.22+maria-1~stretch_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) You looked into it and said that it's a packaging problem: This is a real error. Testing is correct and detects this. The mysql_upgrade file has moved and packaging needs to be updated with correct breaks/replaces in the debian/control file. I can do this fix. Do you want to remove 10.1=>10.1 scenario from the matrix?

            Do you want to remove 10.1=>10.1 scenario from the matrix?

            We can have this in the testing matrix and it is fixable, but I'd advice actual users out there not to attempt it, as it makes little sense to have a mariadb.org repo with 10.1 available in parallel to 10.1 from Debian/Ubuntu as the packages might mix and misbehave. Upgrade to 10.2 is the actual use case that is relevant.

            otto Otto Kekäläinen added a comment - Do you want to remove 10.1=>10.1 scenario from the matrix? We can have this in the testing matrix and it is fixable, but I'd advice actual users out there not to attempt it, as it makes little sense to have a mariadb.org repo with 10.1 available in parallel to 10.1 from Debian/Ubuntu as the packages might mix and misbehave. Upgrade to 10.2 is the actual use case that is relevant.

            In this case, I'm leaving it open for informational purposes, but lowering the priority and switching off the test in buildbot for now. We can re-enable it later if we decide it makes sense.

            elenst Elena Stepanova added a comment - In this case, I'm leaving it open for informational purposes, but lowering the priority and switching off the test in buildbot for now. We can re-enable it later if we decide it makes sense.

            We have now extended testing for these types of scenarios when https://github.com/MariaDB/server/pull/1498 is merged.

            ..and it eventually comes almost fully green when the all currently open PR's agains 10.5 are merged:

            otto Otto Kekäläinen added a comment - We have now extended testing for these types of scenarios when https://github.com/MariaDB/server/pull/1498 is merged. ..and it eventually comes almost fully green when the all currently open PR's agains 10.5 are merged:

            I don't plan to do any changes to the 10.1 packaging, but in general the upgrade path from Debian.org MariaDB to MariaDB.org MariaDB is now being tested at least occasionally thanks to
            https://github.com/MariaDB/server/commit/03119c589026f9a8f499255291624f71ba2e9e04
            and fixes like https://github.com/MariaDB/server/commit/9ed7e967b3fe58a0b28e5c21ef3f41042e96b53a ensure that at least upgrading to 10.5 works for whatever legacy there was.

            otto Otto Kekäläinen added a comment - I don't plan to do any changes to the 10.1 packaging, but in general the upgrade path from Debian.org MariaDB to MariaDB.org MariaDB is now being tested at least occasionally thanks to https://github.com/MariaDB/server/commit/03119c589026f9a8f499255291624f71ba2e9e04 and fixes like https://github.com/MariaDB/server/commit/9ed7e967b3fe58a0b28e5c21ef3f41042e96b53a ensure that at least upgrading to 10.5 works for whatever legacy there was.

            People

              otto Otto Kekäläinen
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.