Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1079637 - mariadb bundles readline
Summary: mariadb bundles readline
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mariadb
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Staněk
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: DuplicSysLibsTracker
TreeView+ depends on / blocked
 
Reported: 2014-03-22 11:26 UTC by Ville Skyttä
Modified: 2015-02-17 02:48 UTC (History)
3 users (show)

Fixed In Version: mariadb-10.0.14-6.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-12 15:42:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ville Skyttä 2014-03-22 11:26:38 UTC
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 09:24:19 UTC
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 06:18:24 UTC
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 12:02:25 UTC
(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 12:06:03 UTC
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 13:05:47 UTC
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 09:35:04 UTC
MariaDB issue link: https://mariadb.atlassian.net/browse/MDEV-6755

Comment 7 Jan Staněk 2014-09-23 11:42:16 UTC
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 18:37:22 UTC
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 08:13:39 UTC
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 10:29:38 UTC
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 16:08:48 UTC
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 07:46:59 UTC
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 10:51:40 UTC
(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 15:41:42 UTC
Now it should be fixed properly in mariadb-10.0.14-6.fc21.

Comment 15 Sergio Basto 2015-02-17 02:06:21 UTC
(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 Basto 2015-02-17 02:48:55 UTC
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.