Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [1/1,RFC] mysql: replace mysql with mariadb 10.0
  2016-09-12 22:05 [Buildroot] [PATCH 1/1] [RFC] " Ryan Coe
@ 2016-09-14 14:46 ` Floris Bos
  2016-09-14 18:44   ` Ryan Coe
  0 siblings, 1 reply; 5+ messages in thread
From: Floris Bos @ 2016-09-14 14:46 UTC (permalink / raw)
  To: buildroot

Hi,

On 09/13/2016 12:05 AM, Ryan Coe wrote:
> Replaces the old mysql 5.1 with mariadb 10.0. The package was not renamed
> as mariadb is a drop-in replacement for mysql.

Give your patch a try

- openssl is mentioned in the dependencies but not selected in Config.in

- fails to compile for me when using uclibc as C library:

==
[ 82%] Building CXX object sql/CMakeFiles/sql.dir/signal_handler.cc.o
/mnt/nfs/mdbtest/buildroot/output/build/mysql-10.0.27/sql/signal_handler.cc: 
In function ?void handle_fatal_signal(int)?:
/mnt/nfs/mdbtest/buildroot/output/build/mysql-10.0.27/sql/signal_handler.cc:274:21: 
error: ?thd? was not declared in this scope
       my_write_stderr(thd->query(), MY_MIN(65536U, thd->query_length()));
                       ^
/mnt/nfs/mdbtest/buildroot/output/build/mysql-10.0.27/sql/signal_handler.cc: 
In function ?void handle_fatal_signal(int)?:
/mnt/nfs/mdbtest/buildroot/output/build/mysql-10.0.27/sql/signal_handler.cc:274:21: 
error: ?thd? was not declared in this scope
       my_write_stderr(thd->query(), MY_MIN(65536U, thd->query_length()));
                       ^
libmysqld/CMakeFiles/sql_embedded.dir/build.make:590: recipe for target 
'libmysqld/CMakeFiles/sql_embedded.dir/__/sql/signal_handler.cc.o' failed
make[4]: *** 
[libmysqld/CMakeFiles/sql_embedded.dir/__/sql/signal_handler.cc.o] Error 1
make[4]: *** Waiting for unfinished jobs....
==

- is the custom my.cnf necessary?

- any specific reason to choose the older MariaDB 10.0.x branch over the 
current stable 10.1.x?
(believe the newer version also comes with systemd support, which may 
save you from having to create your own unit files)

> diff --git a/package/Config.in b/package/Config.in
> index 332f05d..9fca1f6 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -902,8 +902,8 @@ menu "Database"
>   	source "package/kompexsqlite/Config.in"
>   	source "package/leveldb/Config.in"
>   	source "package/libpqxx/Config.in"
> -	source "package/mongodb/Config.in"
>   	source "package/mysql/Config.in"
> +	source "package/mongodb/Config.in"
>   	source "package/postgresql/Config.in"
>   	source "package/redis/Config.in"
>   	source "package/sqlcipher/Config.in"

Why move it?



Yours sincerely,

Floris Bos

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [1/1,RFC] mysql: replace mysql with mariadb 10.0
  2016-09-14 14:46 ` [Buildroot] [1/1,RFC] " Floris Bos
@ 2016-09-14 18:44   ` Ryan Coe
  0 siblings, 0 replies; 5+ messages in thread
From: Ryan Coe @ 2016-09-14 18:44 UTC (permalink / raw)
  To: buildroot

Floris, All,

On 09/14/2016 07:46 AM, Floris Bos wrote:
> Hi,
>
> On 09/13/2016 12:05 AM, Ryan Coe wrote:
>> Replaces the old mysql 5.1 with mariadb 10.0. The package was not 
>> renamed
>> as mariadb is a drop-in replacement for mysql.
>
> Give your patch a try
>
> - openssl is mentioned in the dependencies but not selected in Config.in
That was a mistake on my end.  It will be added for the second version.
>
> - fails to compile for me when using uclibc as C library:
>
> ==
> [ 82%] Building CXX object sql/CMakeFiles/sql.dir/signal_handler.cc.o
> /mnt/nfs/mdbtest/buildroot/output/build/mysql-10.0.27/sql/signal_handler.cc: 
> In function ?void handle_fatal_signal(int)?:
> /mnt/nfs/mdbtest/buildroot/output/build/mysql-10.0.27/sql/signal_handler.cc:274:21: 
> error: ?thd? was not declared in this scope
>       my_write_stderr(thd->query(), MY_MIN(65536U, thd->query_length()));
>                       ^
> /mnt/nfs/mdbtest/buildroot/output/build/mysql-10.0.27/sql/signal_handler.cc: 
> In function ?void handle_fatal_signal(int)?:
> /mnt/nfs/mdbtest/buildroot/output/build/mysql-10.0.27/sql/signal_handler.cc:274:21: 
> error: ?thd? was not declared in this scope
>       my_write_stderr(thd->query(), MY_MIN(65536U, thd->query_length()));
>                       ^
> libmysqld/CMakeFiles/sql_embedded.dir/build.make:590: recipe for 
> target 
> 'libmysqld/CMakeFiles/sql_embedded.dir/__/sql/signal_handler.cc.o' failed
> make[4]: *** 
> [libmysqld/CMakeFiles/sql_embedded.dir/__/sql/signal_handler.cc.o] 
> Error 1
> make[4]: *** Waiting for unfinished jobs....
> ==
I will look into this.  I am using glibc for my project.
>
> - is the custom my.cnf necessary?
I'm not entirely sure about this.  By default, it does not install a 
configuration file.  There are several sample ones installed to 
/usr/share/mysql.  We could use my-small.cnf as it would probably be 
best suited to embedded systems.  The only thing I saw was all of the 
innodb stuff was commented out.  I'm using that for my project. Feedback 
from others would be welcome here.
>
> - any specific reason to choose the older MariaDB 10.0.x branch over 
> the current stable 10.1.x?
> (believe the newer version also comes with systemd support, which may 
> save you from having to create your own unit files)
No, I updated the version to the latest 10.1.17.  That will be part of 
my v2 patch.
>
>> diff --git a/package/Config.in b/package/Config.in
>> index 332f05d..9fca1f6 100644
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -902,8 +902,8 @@ menu "Database"
>>       source "package/kompexsqlite/Config.in"
>>       source "package/leveldb/Config.in"
>>       source "package/libpqxx/Config.in"
>> -    source "package/mongodb/Config.in"
>>       source "package/mysql/Config.in"
>> +    source "package/mongodb/Config.in"
>>       source "package/postgresql/Config.in"
>>       source "package/redis/Config.in"
>>       source "package/sqlcipher/Config.in"
>
> Why move it?
I moved it to keep alphabetical order since I changed the name from 
mysql to mariadb in the Config.in file.
>
>
>
> Yours sincerely,
>
> Floris Bos
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Thanks,
Ryan Coe

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [1/1,RFC] mysql: replace mysql with mariadb 10.0
@ 2016-09-15 21:09 Floris Bos
  2016-09-15 21:17 ` Arnout Vandecappelle
  0 siblings, 1 reply; 5+ messages in thread
From: Floris Bos @ 2016-09-15 21:09 UTC (permalink / raw)
  To: buildroot

> >/This patch represents my attempt to replace the aging mysql 5.1 that is />/currently shipped with Buildroot. I am replacing mysql altogether with 
> mariadb />/version 10.0. I have been able to test this with both an arm and a 
> x86_64 />/build. I have not tested it with systemd. This patch is based on the 
> work done />/by Sylvain Raybaud. /
> Would it be better to just add MariaDB rather than replace MySQL,
> there's reasons to use one over the other.


While a virtual package may be helpful if in the future someone would 
like to add another MySQL implementation.
I do have concerns about the existing mysql package, given that:

- the MySQL branch used has been EOL since 2013
- there has been an number of CVE issues since: 
https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=oracle+mysql
(and cve-2016-6662 not yet in the list)
- it listens to all interfaces by default

How responsible is it to keep packages in such state around, when there 
do are alternatives?


Yours sincerely,

Floris Bos

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160915/5ca5ee8f/attachment.html>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [1/1,RFC] mysql: replace mysql with mariadb 10.0
  2016-09-15 21:09 [Buildroot] [1/1,RFC] mysql: replace mysql with mariadb 10.0 Floris Bos
@ 2016-09-15 21:17 ` Arnout Vandecappelle
  2016-09-17 13:50   ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle @ 2016-09-15 21:17 UTC (permalink / raw)
  To: buildroot



On 15-09-16 23:09, Floris Bos wrote:
>> >/This patch represents my attempt to replace the aging mysql 5.1 that is />/currently shipped with Buildroot. I am replacing mysql altogether with mariadb />/version 10.0. I have been able to test this with both an arm and a x86_64 />/build. I have not tested it with systemd. This patch is based on the work done />/by Sylvain Raybaud. /
>> Would it be better to just add MariaDB rather than replace MySQL,
>> there's reasons to use one over the other.
> 
> 
> While a virtual package may be helpful if in the future someone would like to
> add another MySQL implementation.
> I do have concerns about the existing mysql package, given that:
> 
> - the MySQL branch used has been EOL since 2013
> - there has been an number of CVE issues since:
> https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=oracle+mysql
> (and cve-2016-6662 not yet in the list)
> - it listens to all interfaces by default
> 
> How responsible is it to keep packages in such state around, when there do are
> alternatives?

 True. But it should be relatively easy to bump the existing mysql package. If
it is completely replaced by mariadb, it won't be so easy anymore.

 We could mark mysql as deprecated pending the bump. That could motivate people
to step up and fix it.

 Regards,
 Arnout


> Yours sincerely,
> 
> Floris Bos
> 
> 
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [1/1,RFC] mysql: replace mysql with mariadb 10.0
  2016-09-15 21:17 ` Arnout Vandecappelle
@ 2016-09-17 13:50   ` Thomas Petazzoni
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2016-09-17 13:50 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 15 Sep 2016 23:17:51 +0200, Arnout Vandecappelle wrote:

> > How responsible is it to keep packages in such state around, when there do are
> > alternatives?  
> 
>  True. But it should be relatively easy to bump the existing mysql package. If
> it is completely replaced by mariadb, it won't be so easy anymore.
> 
>  We could mark mysql as deprecated pending the bump. That could motivate people
> to step up and fix it.

As Floris said, our mysql package is deprecated, so I'm all for
replacing it with an up-to-date mariadb package. If later on, someone
else really needs MySQL, we can re-add it, and add the necessary
virtual package to allow selecting between mysql and mariadb. But until
there's a decent mysql package available, I believe replacing it
completely with an up-to-date mariadb package is better.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-17 13:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-15 21:09 [Buildroot] [1/1,RFC] mysql: replace mysql with mariadb 10.0 Floris Bos
2016-09-15 21:17 ` Arnout Vandecappelle
2016-09-17 13:50   ` Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2016-09-12 22:05 [Buildroot] [PATCH 1/1] [RFC] " Ryan Coe
2016-09-14 14:46 ` [Buildroot] [1/1,RFC] " Floris Bos
2016-09-14 18:44   ` Ryan Coe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox