RPM Spec file requiring MySQL or MariaDB

696 Views Asked by At

I have a spec file that currently requires mysql packages. I now have a requirement to require either mysql or MariaDB. But, I'm not sure how to set up such an OR releationship in my .spec file. I am somewhat familiar with the virtual "Provides" piece, but I am not sure if these mysql and equivilant mariadb packages provide the same thing.

%if 0%{?build6}
Requires        : mysql-server, mysql, ...
%endif

%if 0%{?build7}
Requires        : mysql-community-server, mysql-community-client, ...
%endif
1

There are 1 best solutions below

4
Etan Reisner On

RPM Requires entries do not support OR logic. The RPM solution to that problem is "virtual" Provides entries.

You will need to look at the appropriate MySQL and MariaDB packages and compare the list of things they provide and look for something appropriate to Require.

That's the only correct solution possible.