Bug 986959 - MariaDB is not a proper multilib package
MariaDB is not a proper multilib package
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mariadb (Show other bugs)
19
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Honza Horak
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-22 09:55 EDT by Zoltan Boszormenyi
Modified: 2013-08-27 19:32 EDT (History)
1 user (show)

See Also:
Fixed In Version: mariadb-5.5.32-8.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-27 19:32:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Changes against current Fedora 19 mariadb.spec (2.52 KB, patch)
2013-07-24 10:35 EDT, Zoltan Boszormenyi
no flags Details | Diff

  None (edit)
Description Zoltan Boszormenyi 2013-07-22 09:55:34 EDT
Description of problem:

I have mariadb-devel.i686 installed on Fedora 19/x86_64, its dependencies are mariadb-libs.i686 and mariadb.i686. The latter contains "mysql_config".

Installing the mariadb-server (which doesn't exist as an i686 package under the x86_64 distro) pulls in mariadb.x86_64. But these conflict:

Transaction check error:
  file /usr/bin/mysql_config from install of mariadb-1:5.5.31-4.fc19.x86_64 conflicts with file from package mariadb-1:5.5.31-4.fc19.i686

Shouldn't this binary exist only in the -devel package?

Version-Release number of selected component (if applicable):

$ rpm -q mariadb
mariadb-5.5.31-4.fc19.i686

How reproducible:

Always.

Steps to Reproduce:
1.
2.
3.

Actual results:

Multilib library packages not co-installable.

Expected results:

They should be co-installable.

Additional info:
Comment 1 Zoltan Boszormenyi 2013-07-24 10:32:25 EDT
This prevents installing the 64-bit server and the 32-bit devel package as well.
Comment 2 Zoltan Boszormenyi 2013-07-24 10:35:25 EDT
Created attachment 777823 [details]
Changes against current Fedora 19 mariadb.spec

Since the mysql_config and mysqlbug scripts/binaries moved to %{_libdir}/mysql/ the only thing to do is to not install a static symlink, use alternatives instead. It makes the mariadb packages co-installable.
Comment 3 Honza Horak 2013-07-30 16:50:28 EDT
Thanks for the report, I've reverted a solutions that uses wrapper binary instead of alternatives.
Comment 4 Fedora Update System 2013-07-30 16:53:33 EDT
mariadb-5.5.32-6.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mariadb-5.5.32-6.fc19
Comment 5 Zoltan Boszormenyi 2013-07-31 05:31:11 EDT
(In reply to Honza Horak from comment #3)
> Thanks for the report, I've reverted a solutions that uses wrapper binary
> instead of alternatives.

Sorry, but this solution wouldn't work in a satisfactory way.

Both the i686 and x86_64 packages contain the mysql_config (scriptstub) binary.
The 64-bit is preferred at installation time, so the 32-bit one is lost.
There is no way to say

   alternatives  --set mysql_config /usr/lib/mysql/mysql_config

and then build 32-bit software that happens to use the MySQL/MariaDB client library.

The scriptstub.c contains a statically compiled-in path to point to the real script and doesn't distinguish between e.g. setach i386 and native mode.

pkg-config at least parses PKG_CONFIG_PATH and make it preferred so there is a way to build 32-bit software using regular infrastructure and 32-bit *-devel packages.

"mock" just isn't applicable when you need to compile an ad-hoc in-house piece of software without an RPM spec file.

The way I modified mariadb.spec (for the 5.5.31-4 version) is almost the same what the LLVM spec file has. llvm-config is renamed in %install this way:

mv %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}}

Since the original %{buildroot}%{_bindir}/mysql_config is moved to %{buildroot}%{_libdir} , only the call to "alternatives --install ..." is needed.

Now THIS would allow building both 32 and 64-bit software separately.
Comment 6 Fedora Update System 2013-08-01 23:47:06 EDT
Package mariadb-5.5.32-6.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mariadb-5.5.32-6.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-14040/mariadb-5.5.32-6.fc19
then log in and leave karma (feedback).
Comment 7 Zoltan Boszormenyi 2013-08-04 05:16:13 EDT
I have tested mariadb-5.5.32-6.fc19 from updates-testing and it indeed solves the letter of the report but loses the spirit of multilib -devel packages.

After installing both the i686 and x86_64 mariadb-devel packages, the ability to compile for 32-bit is lost. My spec file modification attached to this bug report allowed that by using alternatives.
Comment 8 Honza Horak 2013-08-16 08:34:54 EDT
I've issued a new build that uses alternatives-way to handle multilib problems:
https://admin.fedoraproject.org/updates/FEDORA-2013-14040/mariadb-5.5.32-8.fc19

Feel free to test.
Comment 9 Fedora Update System 2013-08-16 19:04:59 EDT
Package mariadb-5.5.32-8.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mariadb-5.5.32-8.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-14040/mariadb-5.5.32-8.fc19
then log in and leave karma (feedback).
Comment 10 Zoltan Boszormenyi 2013-08-17 08:28:40 EDT
(In reply to Honza Horak from comment #8)
> I've issued a new build that uses alternatives-way to handle multilib
> problems:
> https://admin.fedoraproject.org/updates/FEDORA-2013-14040/mariadb-5.5.32-8.
> fc19
> 
> Feel free to test.

I just tested it. Thanks very much, it works. This bug can be closed.
Comment 11 Fedora Update System 2013-08-27 19:32:25 EDT
mariadb-5.5.32-8.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.