Skip to contentSkip to conversation

integrating MariaDB Galera Cluster into BR

Buildroot Sylvain Raybaud 3 participants 4 messages Apr 24, 2015 – May 5, 2015

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear all,

I would like to integrate MariaDB Galera Cluster
(https://mariadb.com/kb/en/mariadb/what-is-mariadb-galera-cluster/)
into Buildroot. Before I prepare and submit patches I would like to ask a few questions about how to do things properly: MariaDB conflicts with MySQL (they install the same files). Should I:

a) Create a meta-package, for example "mysql compatible DB", the
selection of which would let the user choose between MariaDB Galera Cluster or MySQL?

b) Integrate MariaDB Galera Cluster into MySQL package and let the
user choose which implementation he wants?

c) Make these packages mutually exclusive using "depends on !"?

Cheers,

Sylvain

- --
Sylvain Raybaud
www.green-communications.fr
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJVOlgFAAoJEEkkwl4JtJ9yOKIQALfJAo7xOEYYOka3Q3dPOVeF F/z2I1/Z1rS+x7bQi+QL2LunRE8ESWOLQIG1GHzwILrSg//lVbXuNHu9ZNSfvZpJ MYdmWutbElopWlDOO7HmrQbKtatqELDKBRH+izPtZHB/tZrHkKCbrsTsj7u95jC9 C1NNCVVDS6X9HbPbesGye9A5hZrKB+j72A7J2jbwhA0xw7PfTbaMD6bcXmhKISvU gAx0xzb/oFaTvtxxiJ8lqgjiukYpg6kPVK875yXdwFNZlW8DzHbif8kvWrJyO7cY Ip+XFmNncf7pZHJu5sLHHtohoDg70P2MYoDfSks+ScFd3y/KEzWFfFvzlPH/mM3k SVgzVmNeXgUM0bTxp9qkMRcjW0JoxQqt/AAxl7juaxC3beXiI24998R+o7suO5zd NHCx6kwa3b0sgpYRApvkXWlXbAUFatkYSxZQ3PpYx+lSIDQt36xiEA52sXCCCutu g64J4LIEm/xIfPrHpBuWJi21FnavjbvHqVtSWiPx5TwxzJ3XoOzV289CwKJozkdD Dp/yJIiiH4vVIXSC7nq33kclcno3/eO1mIn0Z8U6fJhPN0kjOrNQ6R/zooC7qJje 53zFHwaZ+TtMfAxaEYavzoI8i+Bfl140yK99oDCiXVWtdJsuQrW3pcNcK45FVji7 ZPts496plApkgnlSs5CX
=44RM
-----END PGP SIGNATURE-----

#1 lore raw

Sylvain, All,

On 2015-04-24 16:49 +0200, Sylvain Raybaud spake thusly:

Quoted 6 lines

I would like to integrate MariaDB Galera Cluster
(https://mariadb.com/kb/en/mariadb/what-is-mariadb-galera-cluster/)
into Buildroot. Before I prepare and submit patches I would like to ask a few questions about how to do things properly: MariaDB conflicts with MySQL (they install the same files). Should I:

Quoted 8 lines

a) Create a meta-package, for example "mysql compatible DB", the
selection of which would let the user choose between MariaDB Galera Cluster or MySQL?

b) Integrate MariaDB Galera Cluster into MySQL package and let the
user choose which implementation he wants?

c) Make these packages mutually exclusive using "depends on !"?

I would say either b) or c). Which one depends on how MariaDB Galera is seen with respect to MySQL:

1- is it a completely different implementation that is 100% compatible?

2- is it a fork that is 100% compatible?

3- is it a fork that is not 100% compatible?

For 1 or 2, I'd say go with b), otherwise go for c).

If you decide for c), then only one can depend on not the ther (otherwise you'd have a crcular dependency). That is, something like:

config BR2_PKG_MYSQL
bool "mysql"

config BR2_PKG_MARIADB
bool "mariadb"
depends on !BR2_PKG_MYSQL

Anyway, if you're not sure, go for c); we will review the patch, and we can guide you based on the details.

in any case, be sure to read:

- the section(s) from the "Adding new packages to Buildroot" chapter, that applies to mariadb (e.g. generic, autotools, cmake...):
http://buildroot.net/downloads/manual/manual.html#adding-packages

- the section on how to send patches:
http://buildroot.net/downloads/manual/manual.html#submitting-patches

Happy hacking! ;-)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

Thanks for your fast reply! Sorry mine is late, I was on vacation.

Quoted 16 lines · Yann E. MORIN

Sylvain, All,

On 2015-04-24 16:49 +0200, Sylvain Raybaud spake thusly:

Quoted 8 lines

a) Create a meta-package, for example "mysql compatible DB", the selection of which would let the user choose between MariaDB Galera Cluster or MySQL?

b) Integrate MariaDB Galera Cluster into MySQL package and let the user choose which implementation he wants?

c) Make these packages mutually exclusive using "depends on !"?

I would say either b) or c). Which one depends on how MariaDB Galera is seen with respect to MySQL:

Quoted 8 lines

1- is it a completely different implementation that is 100% compatible?

2- is it a fork that is 100% compatible?

3- is it a fork that is not 100% compatible?

For 1 or 2, I'd say go with b), otherwise go for c).

MariaDB is supposed to be a "drop-in replacement for MySQL" so I suppose I should go for b).
https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/
lists some differences but it seems that everything you can do with MySQL you can do with MariaDB.

Does option b) allow dependencies specific to MariaDB?

Quoted 14 lines

If you decide for c), then only one can depend on not the ther (otherwise you'd have a crcular dependency). That is, something like:

config BR2_PKG_MYSQL bool "mysql"

config BR2_PKG_MARIADB bool "mariadb" depends on !BR2_PKG_MYSQL

Anyway, if you're not sure, go for c); we will review the patch, and we can guide you based on the details.

in any case, be sure to read:

Quoted 7 lines

- the section(s) from the "Adding new packages to Buildroot" chapter, that applies to mariadb (e.g. generic, autotools, cmake...):
http://buildroot.net/downloads/manual/manual.html#adding-packages

- the section on how to send patches:
http://buildroot.net/downloads/manual/manual.html#submitting-patches

Doing

Quoted 1 line

so now. Thanks again!

Sylvain

Quoted 5 lines

Happy hacking! ;-)

Regards, Yann E. MORIN.

- --
Sylvain Raybaud
www.green-communications.fr
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJVSJvlAAoJEEkkwl4JtJ9ybe0QAIEH9Yx2Y8Wxoqb+XXpjTjAE 9BLu/ev4h9lyBCvQkYjmeM/0pwU0atUTazEfNMVV/sJFsO5FmoC/jddNuPznHFcc XPcWynMmhjDGlPSBGgY7wqWV1UCvZ5GOmPUJlQsehAq1QLQpzGoV00FJ33xl5roF Lk8ugiWIMldvqTrjsnsmsCwvxnYFO02fEYJFpEeGmemMdFP0aCsJvSKXuo3ETxGp ajMluiqiqNAiQnj/s33ZtytxOtbp7LjDnQ6qDIFA4/UjdXh9QTWBvvLlGuoRDboR iNvHeksSBzsW8AmgUeL3qwurMPPpaOY8qI+rRo6LtfGOPmXvltKaUxK1jFH+4V1D buG87tUXp3dGeg91WJP46GC+DbsSjm1ygzFH3Nsxtyj5zFVNXw7QmsjtFpgPpIRN uTW4Ks80pwFn8FAZ14NpHPVgB3t58yskHmMzvN1Fbb+/82G2xU77hgWmXUVOTTyo EWzdZwlhZ3g/Xv4nqHXGmLRnIqspwOh/+UDekZc3YT5PwbERYAZTfMztarLc83aq 0VlYzAJyWcGRcTH+IOom+ZExanIpSfgfWIMD2nLl6xW/Vqn8/9iiPI2+u04ByZlu GcE8mK2yE68kHLWjQrfe/MBe+jQCOlptm4NaXo7n6Iv2V5YzWcR/+fLIlNg3+qXf 8cMwqBnt8FGwblLrv9rm
=R/jW
-----END PGP SIGNATURE-----

#3 lore raw
Quoted 24 lines · Sylvain Raybaud
Quoted 14 lines · Yann E. MORIN

On 2015-04-24 16:49 +0200, Sylvain Raybaud spake thusly:

Quoted 8 lines

a) Create a meta-package, for example "mysql compatible DB", the selection of which would let the user choose between MariaDB Galera Cluster or MySQL?

b) Integrate MariaDB Galera Cluster into MySQL package and let the user choose which implementation he wants?

c) Make these packages mutually exclusive using "depends on !"?

I would say either b) or c). Which one depends on how MariaDB Galera is seen with respect to MySQL:

Quoted 8 lines

1- is it a completely different implementation that is 100% compatible?

2- is it a fork that is 100% compatible?

3- is it a fork that is not 100% compatible?

For 1 or 2, I'd say go with b), otherwise go for c).

Quoted 7 lines

MariaDB is supposed to be a "drop-in replacement for MySQL" so I suppose I should go for b).
https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/
lists some differences but it seems that everything you can do with MySQL you can do with MariaDB.

Does option b) allow dependencies specific to MariaDB?

It's very easy to add something like this to mysql.mk:

ifeq ($(BR2_PACKAGE_MYSQL_MARIADB),y)
MYSQL_DEPENDENCIES += foo
else
MYSQL_DEPENDENCIES += bar
endif

And so on for all other things that are different between the two builds. Even
if they were completely different, you could put a big ifeq around the entire .mk file.

You'll have more trouble with the patches. The only solution for those is to
move them to a version-specific directory, so 5.1/ for the mysql version and 10.0.17 for MariaDB.

Regards,
Arnout

[snip]

Signature · 14 lines
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150505/2d023c98/attachment.asc>