Bug 986959 - MariaDB is not a proper multilib package
Summary: MariaDB is not a proper multilib package
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mariadb
Version: 19
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Honza Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-22 13:55 UTC by Zoltan Boszormenyi
Modified: 2013-08-27 23:32 UTC (History)
1 user (show)

Fixed In Version: mariadb-5.5.32-8.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-27 23:32:25 UTC
Type: Bug
Embargoed:


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

Description Zoltan Boszormenyi 2013-07-22 13:55:34 UTC
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 14:32:25 UTC
This prevents installing the 64-bit server and the 32-bit devel package as well.

Comment 2 Zoltan Boszormenyi 2013-07-24 14:35:25 UTC
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 20:50:28 UTC
Thanks for the report, I've reverted a solutions that uses wrapper binary instead of alternatives.

Comment 4 Fedora Update System 2013-07-30 20:53:33 UTC
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 09:31:11 UTC
(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-02 03:47:06 UTC
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 09:16:13 UTC
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 12:34:54 UTC
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 23:04:59 UTC
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 12:28:40 UTC
(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 23:32:25 UTC
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.