Bug 1497234
Summary: | Rawhide mariadb-connector-c-devel-3.0.2-8.fc28.x86_64 Fails to Install | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ron Lovell <ron163264> |
Component: | mariadb-connector-c | Assignee: | Michal Schorm <mschorm> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | rawhide | CC: | acaringi, grgoffe, lemenkov, mmuzila, mschorm |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-10-10 19:29:42 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Ron Lovell
2017-09-29 14:27:27 UTC
Hi, Me too. ls -al /usr/lib64 | grep mysql gives: drwxr-xr-x. 3 root root 4096 Sep 29 12:10 mysql lrwxrwxrwx 1 root root 7 Sep 20 05:43 mysql;59c57708 -> mariadb lrwxrwxrwx 1 root root 7 Sep 20 05:43 mysql;59c68911 -> mariadb lrwxrwxrwx 1 root root 7 Sep 20 05:43 mysql;59ce949f -> mariadb lrwxrwxrwx 1 root root 7 Sep 20 05:43 mysql;59cebe71 -> mariadb lrwxrwxrwx 1 root root 7 Sep 20 05:43 mysql;59cebedd -> mariadb Good eye, George. I hadn't noticed those symlinks to mariadb, which I can confirm are left by unsuccessful attempts to install mariadb-connector-c-devel. The problem seems to center around a conflict between mariadb-server, which installs to /usr/lib64/mysql, and mariadb-connector-c[-devel], which install to /usr/lib64/mariadb. mariadb-connector-c-devel expects or creates a symlink /usr/lib64/mysql -> mariadb. Simply reinstalling all in the same order, with the mariadb and mysql* removed from /usr/lib64 in between, just results in the same conflict. However, this does work: Remove all the mariadb* packages. Remove /usr/lib64/mariadb /usr/lib64/mysql* I also removed /var/lib/mysql to toss all old data in the bit bucket. dnf install mariadb-connector-c That installs to /usr/lib64/mariadb, as before. dnf install mariadb-connector-c-devel That installs to /usr/lib64/mariadb and creates symlink /usr/lib64/mysql -> mariadb. dnf install mariadb-server That installs to (symlink) /usr/lib64/mysql, so files go into /usr/lib64/mariadb/. I've been able to start the server, set a database root password, run the /usr/bin/mysql_secure_installation program, add myself as a user, and create a new database. All that works, but I have to wonder what might go wrong because /usr/lib64/mysql isn't a directory. (In particular, I don't run SELinux, so I wouldn't know about SELinux conflicts.) The maintainer should be able to determine what direction they plan to go (w.r.t. installation in /usr/lib64/mariadb versus /usr/lib64/mysql) in the integration of mariadb-connector-c with mariadb. Ron, Thanks for the praise... the ls results just looked a little odd. Thanks too for the writeup. George... George, You're welcome. Oh, and I almost forgot: dnf install mariadb-devel That just installs header files and a pkgconfig file. Hello guys, sorry for the delay, I was away form wednesday's evening. I'll look into this immediatelly. Can you give me your personal reproducer? (dnf update / install from which package to which package ...) --- So far I found two issues. The first one is obvious - a conficlting file 'mysql_version.h' between 'mariadb-connector-c-devel' and 'mariadb-devel'. The second one is symlink '/usr/lib64/mysql' to a directory '/usr/lib64/mariadb', which ... does odd things: https://fedoraproject.org/wiki/Packaging:Directory_Replacement Hi Michal, Thanks for your response. The error installing mariadb-connector-c-devel occurs when mariadb-server (and other mariadb packages) are already installed. I happened to trigger by trying to install mariadb-devel, which depends on mariadb-connector-c-devel. But the problem can be reproduces by trying to install the latter. The mariadb-server etc. packages create and install into directory /usr/lib64/mysql. But mariadb-connect-c-devel expects /usr/lib64/mysql to be a symlink to mariadb, else it tries to create one. My workaround was to install mariadb-connector-c and mariadb-connector-c-devel first, so that the symlink /usr/lib64/mysql -> mariadb exists, then install mariadb-server etc. which will be coerced into installing in /usr/lib64/mariadb by following the symlink. That worked per my brief testing. As for the permament fix, in the process of transitioning from Mariadb 10.1 to 10.2, with the split of client libs to mariadb-connector-c, Fedora packagers will have to decide where things are going to go, then adjust the package installation to be consistent. My other Linux distros are still using Mariadb 10.1, so I don't have an example to follow. Thanks, Ron Yesterday, I released 2 updates, that together should (hopefully) solve this issue (or atleast its part). mariadb-10.2.9-1 https://koji.fedoraproject.org/koji/buildinfo?buildID=978300 mariadb-connector-c-3.0.2-9 https://koji.fedoraproject.org/koji/buildinfo?buildID=978977 Now I'm just waiting them to appear in rawhide repositories. I tested in crafted local repo, that every package from the set can be installed simultaneously, however, they could need to: rm -rf /usr/lib64/mysql rm -rf "/usr/lib64/mariadb*" if they were some directories left with no owner. You can check which package owns a file with: rpm -qf <file> --- Thanks Ron for the complex answer. Correction for the command in previous comment: rm -rf /usr/lib64/{mysql*,mariadb*} Michal, I see what you mean. The mariadb-3:10.2.9-1 and mariadb-connector-c-3.0.2-9 updates came through today. The upgrade of mariadb-connector-c-devel failed because it wanted to create a symlink /usr/lib/mariadb -> mysql, but a directory mariadb already existed (from previous versions of mariadb-connector-c*). I removed the mariadb* packages, removed /usr/lib64/mariadb/, then installed everything successfully. I finally noticed that mariadb-connector-c now installs into /usr/lib64/mysql/. I then realized I could have just removed /usr/lib64/mariadb/, then the upgrade of mariadb-connector-c-devel would have succeeded without having to reinstall any packages. So, a new clean installation of mariadb including mariadb-devel should work, assuming there is not a non-symlink object /usr/lib64/mariadb/ in place beforehand. There will be installation/upgrade issues for sites that had previous versions of mariadb-connector-c installed in /usr/lib64/mariadb/. Since that package is required by mariadb, the issue would apply to all mariadb 10.2 installations, at least as far back as mariadb-connector-c was a requirement by mariadb. How about if upgrade/installation of mariadb-connector-c-devel recursively removed any existing directory /usr/lib64/mariadb/ before creating a symlink? The new versions of -devel and the runtime package both install into /usr/lib64/mysql now. Are there any other Fedora packages that ever installed into /usr/lib64/mariadb/? If there are files that needed to be preserved, they would need to be moved to /usr/lib64/mysql first. At any rate, wer'e making progress. Thanks for the fixes! - Ron Hi Ron, I aimed directly to deliver the hot fix this time. Now, when it works "somehow", I'll look back into upgrade issues. I'm thinking about adding something like this, to the connector-c: %pre rpm -qf /usr/lib64/mysql if [ $? -eq 1 ]; then if [ "$(ls -A /usr/lib64/mysql)" ]; then mv /usr/lib64/mysql /usr/lib64/.mysql_update_tmp fi rm -rf /usr/lib64/{mysql*,mariadb*} fi %post if [ "$(ls -A /usr/lib64/.mysql_update_tmp)" ]; then mv /usr/lib64/.mysql_update_tmp/* /usr/lib64/mysql rm /usr/lib64/.mysql_update_tmp fi --- I'm gonna test it, and see, if that helps. I managed to add some fixes to both mariadb and mariadb-connector-c packages. The results are: * mariadb-connector-c package cleans mess from its older version by scriptlet above * mariadb package use correct obsoletes, making update from mariadb 10.1 to 10.2 possible. --- NOTE: when upgrade from mdb 10.1 to mdb 10.2, option "--allowerasing" is needed. If not used, the update will fail, beacuse won't want to drop mariadb-libs package. --- mariadb-connector-c build 3.0.2-10: https://koji.fedoraproject.org/koji/taskinfo?taskID=22255846 mariadb build 3:10.2.9-2 https://koji.fedoraproject.org/koji/taskinfo?taskID=22258567 I believe this should be pushed to F-27 as well. I have troubles building OpenSIPS for F-27 only due to missing /usr/include/mysql/mysql/mysql_version.h * https://koji.fedoraproject.org/koji/taskinfo?taskID=22257099 (In reply to Peter Lemenkov from comment #13) > I believe this should be pushed to F-27 as well. I have troubles building > OpenSIPS for F-27 only due to missing > /usr/include/mysql/mysql/mysql_version.h > > > * https://koji.fedoraproject.org/koji/taskinfo?taskID=22257099 Sorry, I meant change introduced in 3.0.2-6 mariadb-10.2.9-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-dff1218bfa mariadb-10.2.9-3.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-dff1218bfa The mariadb-3:10.2.9-3.fc28 and mariadb-connector-c-3.0.2-10.fc28 updates came through this morning. They're looking good as best I can test without actually having an old mariadb-connector-c installation in /usr/lib64/mariadb/. First I simply applied the updates. That worked fine. The output included: Running scriptlet: mariadb-connector-c-devel-3.0.2-10.fc28.x86_64 20/201 mariadb-connector-c-devel-3.0.2-9.fc28.x86_64 mariadb-server-10.2.9-3.fc28.x86_64 Upgrading : mariadb-connector-c-devel-3.0.2-10.fc28.x86_64 20/201 Running scriptlet: mariadb-connector-c-devel-3.0.2-10.fc28.x86_64 20/201 ls: cannot access '/usr/lib64/.mysql_update_tmp': No such file or directory Then I removed all mariadb* packages. To make things interesting, I then: mkdir -p /usr/lib64/mariadb/plugin I did not remove /usr/lib64/mysql/. Then I installed mariadb-server and mariadb-devel and their dependencies. That worked fine. Output included: Running scriptlet: mariadb-connector-c-devel-3.0.2-10.fc28.x86_64 6/14 file /usr/lib64/mysql is not owned by any package Installing : mariadb-connector-c-devel-3.0.2-10.fc28.x86_64 6/14 After installation the bogus /usr/lib64/mariadb/ directory has been replaced with symlink /usr/lib64/mariadb -> mysql, as expected. The server starts and works normally. Good work, guys. Thanks! Ron mariadb-10.2.9-3.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report. |