Bug 1079637 - mariadb bundles readline
mariadb bundles readline
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mariadb (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jan Staněk
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: DuplicSysLibsTracker
  Show dependency treegraph
 
Reported: 2014-03-22 07:26 EDT by Ville Skyttä
Modified: 2015-02-16 21:48 EST (History)
3 users (show)

See Also:
Fixed In Version: mariadb-10.0.14-6.fc21
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-11-12 10:42:10 EST
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)

  None (edit)
Description Ville Skyttä 2014-03-22 07:26:38 EDT
https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries
https://fedoraproject.org/wiki/Packaging:Treatment_Of_Bundled_Libraries

mariadb is using a bundled copy of readline instead of the system one.

$ repoquery --repoid=rawhide-debuginfo -l mariadb-debuginfo | grep readline/

Untested, but based on a quick look a fix would start with removing the -DWITH_READLINE=ON build arg which forces use of bundled readline, and "rm -r cmd-cline-utils" in %prep.
Comment 1 Honza Horak 2014-05-21 05:24:19 EDT
Thanks for reporting, but it is not so simple as I thought.

First thing one would try would be compiling against the recent version of readline. However, since version 6.x it is GPLv3+, so we cannot use it because mariadb is GPLv2 only.

Another option is to use libedit, which is a non-GPL alternative to readline, but support for libedit in mariadb seems to be unmaintained and the mariadb code needs to be fixed first.

I also thought of a temporary solution, i.e. to build against compat-readline5, but it also does not work fine and we get compiling errors.

To sum it up, we are not able to just stop bundle it right now. We will work on fixing issues with libedit and start compiling against it asap, but it may take some time.

If we find that fixing it would be a long term issue, we will ask FESCO for temporary exception.
Comment 2 Honza Horak 2014-08-26 02:18:24 EDT
This might be related/helpful, but I've not looked deeper into it:
https://github.com/webscalesql/webscalesql-5.6/commit/49273e52fb5f1e608225f73c2deee0e94962db8c
Comment 3 Jan Staněk 2014-09-09 08:02:25 EDT
(In reply to Honza Horak from comment #2)
> This might be related/helpful, but I've not looked deeper into it:
> https://github.com/webscalesql/webscalesql-5.6/commit/
> 49273e52fb5f1e608225f73c2deee0e94962db8c

Unfortunately, that patch forces the mariadb to build with system readline and drop bundled libedit. As stated before, it is not applicable because of the GPLv2 vs. GPLv3+ license conflict.
Comment 4 Honza Horak 2014-09-09 08:06:03 EDT
community-mysql is using libedit since 5.6, I haven't looked deep into it, but it might help to explore how it is done there.
Comment 5 Jan Staněk 2014-09-16 09:05:47 EDT
The community-mysql could help, but unfortunately the transition would not be easy. The main problem I'm running into is the client (mysql) app, which in the mysql.cc file contains declarations of various readline functions. When I try to use the modified community-mysql cmake files and force system libedit on mariadb, the client fails to link due to undefined references to said functions.

I will contact the upstream and asks for help, but from my POV it seems that in order to use any libedit with mariadb, the client code would have to be fixed/updated first.
Comment 6 Jan Staněk 2014-09-18 05:35:04 EDT
MariaDB issue link: https://mariadb.atlassian.net/browse/MDEV-6755
Comment 7 Jan Staněk 2014-09-23 07:42:16 EDT
According to [1], this issue is fixed in upcoming 5.5.40 and 10.0.14 versions of mariadb. I suggest waiting for those versions.

[1] https://mariadb.atlassian.net/browse/MDEV-6755?focusedCommentId=60435&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-60435
Comment 8 Fedora Update System 2014-10-03 14:37:22 EDT
mariadb-10.0.14-4.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mariadb-10.0.14-4.fc21
Comment 9 Fedora Update System 2014-10-05 04:13:39 EDT
Package mariadb-10.0.14-4.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mariadb-10.0.14-4.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-12200/mariadb-10.0.14-4.fc21
then log in and leave karma (feedback).
Comment 10 Ville Skyttä 2014-10-05 06:29:38 EDT
The fix in 10.0.14-4 is incomplete: it fails to do the "rm -r cmd-line-utils" or equivalent in %prep to remove the bundled library code. This was noted in the initial comment; it is a must per the packaging guidelines:

https://fedoraproject.org/wiki/Packaging:Treatment_Of_Bundled_Libraries#Packages_with_Bundled_Libraries
Comment 11 Fedora Update System 2014-10-10 12:08:48 EDT
mariadb-10.0.14-4.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 12 Ville Skyttä 2014-10-13 03:46:59 EDT
Reopening due to comment 10, feel free to close+clone as another bug if you prefer that approach instead.
Comment 13 Honza Horak 2014-10-13 06:51:40 EDT
(In reply to Ville Skyttä from comment #12)
> Reopening due to comment 10, feel free to close+clone as another bug if you
> prefer that approach instead.

Thanks for notice, Fedora Update System should let it be now, so we should be fine with this bug.
Comment 14 Honza Horak 2014-11-12 10:41:42 EST
Now it should be fixed properly in mariadb-10.0.14-6.fc21.
Comment 15 Sergio Monteiro Basto 2015-02-16 21:06:21 EST
(In reply to Honza Horak from comment #1) 
> First thing one would try would be compiling against the recent version of
> readline. However, since version 6.x it is GPLv3+, so we cannot use it
> because mariadb is GPLv2 only.

I think this is a mistake , GPLv2 only is "linkable" with GPLv3+  but result will be GPLv2 and GPLv3+ .

mariadb is GPLv2 only and use a copy of readline under GPLv2 that is fine. We can use mariadb with readline GPLv3+ but the final License will be GPLv2 and GPLv3+ . 

Can I block this bug with FE-Legal tracker bug 182235 and reopen this bug  ?
Comment 16 Sergio Monteiro Basto 2015-02-16 21:48:55 EST
Reference: 

http://gplv3.fsf.org/rms-why.html

" Keeping a program under GPLv2 won't create problems. "

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