When installing pdns-backend-mysql-4.3 on a system with MariaDB 10.4, the package forces the use of mysql-common-8.0.17.3
Installing:
pdns-backend-mysql x86_64 4.3.0-1pdns.el8 powerdns-auth-43 47 k
Installing dependencies:
mysql-common x86_64 8.0.17-3.module_el8.0.0+181+899d6349AppStream
mysql-libs x86_64 8.0.17-3.module_el8.0.0+181+899d6349
Transaction Summary
Install 3 Packages
(1/3): mysql-common-8.0.17-3.module_el8.0.0+181+899d6349.x86_64.rpm
(2/3): mysql-libs-8.0.17-3.module_el8.0.0+181+899d6349.x86_64.rpm
(3/3): pdns-backend-mysql-4.3.0-1pdns.el8.x86_64.rpm
Error: Transaction check error:
file /usr/share/mysql/charsets/Index.xml from install of mysql-common-8.0.17-3.module_el8.0.0+181+899d6349.x86_64 conflicts with file from package MariaDB-common-10.4.12-1.el8.x86_64
file /usr/share/mysql/charsets/armscii8.xml from install of mysql-common-8.0.17-3.module_el8.0.0+181+899d6349.x86_64 conflicts with file from package MariaDB-common-10.4.12-1.el8.x86_64
file /usr/share/mysql/charsets/ascii.xml from install of mysql-common-8.0.17-3.module_el8.0.0+181+899d6349.x86_64 conflicts with file from package MariaDB-common-10.4.12-1.el8.x86_64
file /usr/share/mysql/charsets/cp1250.xml from install of mysql-common-8.0.17-3.module_el8.0.0+181+899d6349.x86_64 conflicts with file from package MariaDB-common-10.4.12-1.el8.x86_64
file /usr/share/mysql/charsets/cp1251.xml from install of mysql-common-8.0.17-3.module_el8.0.0+181+899d6349.x86_64 conflicts with file from package MariaDB-common-10.4.12-1.el8.x86_64
Do you happen to know what dependency we could list instead, that would be satisfied by either mysql or mariadb, and in case of mariadb, gives us the legacy binary compatible libmysqlclient lib from maria?
Downstream, the EPEL rpm-specfile has this as BuildRequires for the pdns-mysql package:
BuildRequires: mariadb-connector-c-devel openssl-devel
Whereas we use:
BuildRequires: mysql-devel
Simply switching to the downstream requires might fix this issue.
Ah, but what if then somebody wants to use our packages with the MySQL repo?
I was hoping that it would depend on some virtual package.... paging @mortenstevens
In the RPM world, you can depend on a shared lib by name. Let's see what Morten says, indeed :)
Just a quick note to our PowerDNS 4.3.0 package for RHEL8/CentOS8: It's currently in EPEL testing. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-fa71a430c8
The default MySQL implementation for RHEL8 is MariaDB. MariaDB and MySQL cannot be installed in parallel in RHEL8 due to conflicting RPM packages.
That's the reason why we are building pdns-backend-mysql against mariadb-connector-c-devel.
But maybe we can add a subpackage for MySQL 8? (for users which are using MySQL 8 instead of MariaDB) I will check that.
In this case, i've used the Documentation to install the PowerDNS 4.3 based on:
yum install epel-release &&
dnf install -y 'dnf-command(config-manager)' &&
dnf config-manager --set-enabled PowerTools &&
curl -o /etc/yum.repos.d/powerdns-auth-43.repo https://repo.powerdns.com/repo-files/centos-auth-43.repo &&
yum install pdns
We use MariaDB to allow galera replication between PowerDNS servers, and for that, we have chosen MariaDB 10.4 (Stable).
On another setup, with PDNS 4.0, we have MariaDB 5.5 running perfectly without needing the installation of MySQL dependencies.
rpm -qa | egrep -i 'mysql|pdns'
php-mysqlnd-5.4.16-46.el7.x86_64
pdns-backend-mysql-4.0.6-2.el7.x86_64
pdns-4.0.6-2.el7.x86_64
perl-DBD-MySQL-4.023-6.el7.x86_64
@tiagomreis
RHEL8 has MariaDB 10.3. Actually, there is no MariaDB 10.4 module available for RHEL8.
dnf module list | grep mariadb
mariadb 10.3 [d] client, server [d], galera MariaDB Module
You are using MariaDB 10.4? I guess you're installing MariaDB from an external repository? And it looks that you're also installing PowerDNS from an external repository (repo.powerdns.com).
Note: If you're mixing RPM packages between different RPM repositories: This can result in conflicting RPM packages.
@mortenstevens
I'm installing from the source..yes, i'm using the powerdns repo, that is on PDNS documentation:
https://repo.powerdns.com/repo-files/centos-auth-43.repo
Regarding the MariaDB, same, using oficial repos.
https://downloads.mariadb.org/mariadb/repositories/#distro=CentOS&distro_release=centos8-amd64--centos8&mirror=digitalocean-sfo&version=10.4
I'm not mixing "packages", i'm using the oficial repos for each package, PDNS and MariaDB..the PowerDNS in this case, for backend-mysql is requesting the installation of mysql-common-8.0 when the mariadb-common is installed by default when you install MariaDB-Server.
Even in the documentation of PowerDNS or backends (MySQL), there is no referente about the repos needs / requirements. I don't see why an installation from powerdns repo and mariadb repo have different behaviours.
We are not installing from 3rd party sources but from oficial repos from both services.
@tiagomreis
I'm sorry, but as Fedora Maintainer I can tell you: This is not the official supported way, if you're using an enterprise linux platform like RHEL or CentOS.
The supported way is to use the MariaDB server as shipped with RHEL8/CentOS. (from an official RHEL or CentOS repository) Because many RPM packages are built against the MariaDB sources as shipped with RHEL8. If you're replacing the MariaDB package with a newer version from a third party RPM repository: It can work, but it is not supported
Downstream, the EPEL rpm-specfile has this as
BuildRequiresfor the pdns-mysql package:BuildRequires: mariadb-connector-c-devel openssl-develWhereas we use:
BuildRequires: mysql-develSimply switching to the downstream requires might fix this issue.
For Fedora EPEL we have switched to mariadb-connector-c-devel, because MariaDB is the default mysql implementation for RHEL8. mysql-devel should be also work, but in this case users a required to use MySQL 8 instead of MariaDB 10.3.
The following options are available:
1) Switch to mariadb-connector-c-devel
2) Stay with BuildRequires: mysql-devel
3) You can also support MariaDB 10 and MySQL 8 with two different subpackages. For example: pdns-backend-mariadb (BuildRequires: mariadb-connector-c-devel) and pdns-backend-mysql (BuildRequires: mysql-devel)
@tiagomreis
I'm sorry, but as Fedora Maintainer I can tell you: This is not the official supported way, if you're using an enterprise linux platform like RHEL or CentOS.
I understand that, however, using what is distributed by the repos of the system, does not grant the latest versions with improvements, in the end, using the oficial package repo is the solution. MariaDB 10.4 is the stable, in this case, the user must be able to switch the version and not be unable to "upgrade" because of a package dependencie.
The supported way is to use the MariaDB server as shipped with RHEL8/CentOS. (from an official RHEL or CentOS repository) Because many RPM packages are built against the MariaDB sources as shipped with RHEL8. If you're replacing the MariaDB package with a newer version from a third party RPM repository: It can work, but it is not supported
What you are saying is, sticking with the MariaDB 10.3, from RHEL8 repo, this error does not occur?
As you suggest, if there is, on new PowerDNS this requirements and restrictions, having a pdns-backend-mariadb could solve and allow the customers to upgrade their database package.
Note: In my perspective, having a "block" to customers to use only RHEL repos is not the right procedure because, other services have their own repos with the official sources.
In this case, PowerDNS must validate, if continues to have only the backend-mysql if the system is running already a MariaDB version, checking for the package.
There is no 'block', there is only limitations that happen to arise from choices we have made in the past. Those choices can be revisited, but understand very clearly there nothing we 'must'.
Please remember you are using free software.
@tiagomreis
I'm sorry, but as Fedora Maintainer I can tell you: This is not the official supported way, if you're using an enterprise linux platform like RHEL or CentOS.
I understand that, however, using what is distributed by the repos of the system, does not grant the latest versions with improvements, in the end, using the oficial package repo is the solution. MariaDB 10.4 is the stable, in this case, the user must be able to switch the version and not be unable to "upgrade" because of a package dependencie.
Normally, you should not replace base packages with third party repos when using an enterprise platform like RHEL8. If you really need MariaDB 10.4 you can install it into a container or a different virtual machine as MariaDB Server only. Or you wait until Red Hat ships a MariaDB 10.4 package as module for RHEL8.
What you are saying is, sticking with the MariaDB 10.3, from RHEL8 repo, this error does not occur?
In this case not. Because your installed pdns package from repo.powerdns.com is built against MySQL 8.0 and you have MariaDB 10.4 installed. This would result also in a packaging conflict if you have MariaDB 10.3 from official RHEL8 repo installed.
You can try the pdns EPEL 8 package which is built against mariadb-connector-c-devel.
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-fa71a430c8 (you can install it via EPEL 8 testing)
This should work for you. Anyway, it's not a good idea to replace packages like MariaDB with third party repos. Because even then we cannot guarantee that it will work.
@mortenstevens
by your suggestion and testing the install.
yum --enablerepo=epel-testing install pdns-backend-mysql
Installing:
pdns-backend-mysql x86_64 4.3.0-1.el8. epel-testing
Installing dependencies:
MariaDB-shared x86_64 10.4.12-1.el8. mariadb
Downgrading:
pdns x86_64 4.3.0-1.el8. epel-testing
It downgrades the version to the epel-testing and automatically install the MariaDB-shared, allowing the use of MariaDB 10.4 directly from mariadb repo.
There is no 'block', there is only limitations that happen to arise from choices we have made in the past. Those choices can be revisited, but understand very clearly there nothing we 'must'.
Please remember you are using free software.
You can "read" my comment in that way, however, the "must" was related with one of the suggestion that @mortenstevens regarding the use of a another package (mariadb) and not "must" of obligation ;)
I have created #9033 to address this issue.
@tiagomreis here is a tarball of rpms created with that patch, could you dnf localinstall them to test this indeed works as expected?
@pieterlexis thank you for your time and help on this.
As I can see, the rpms are for 4.4.alpha version and not 4.3. Do you advise the use of this for production or is preferable to wait for a release with your fix into the repos?
This is "master" plus this patch, it should be stable though. I only want to know if this indeed fixes the issue you're having :).
Oh sure! Doing a dnf localinstall with both rpm's, i'm not being question about conflict resolution.
dnf localinstall pdns-backend-mysql-4.4.0-0.alpha0.el8mariadbdep.243.g6446b9a3a.dirty.1pdns.el8.x86_64.rpm pdns-4.4.0-0.alpha0.el8mariadbdep.243.g6446b9a3a.dirty.1pdns.el8.x86_64.rpm
Dependencies resolved.
Installing:
pdns-backend-mysql x86_64 4.4.0-0.alpha0.el8mariadbdep.243.g6446b9a3a.dirty.1pdns.el8
Upgrading:
pdns. x86_64 4.4.0-0.alpha0.el8mariadbdep.243.g6446b9a3a.dirty.1pdns.el8
Install 1 Package
Upgrade 1 Package