All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-webserver/meta-oe][PATCH 0/5] Recipe upgrades
@ 2014-08-05 13:20 Paul Eggleton
  2014-08-05 13:20 ` [meta-webserver][PATCH 1/5] apache2: do not patch generated file Paul Eggleton
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Paul Eggleton @ 2014-08-05 13:20 UTC (permalink / raw)
  To: openembedded-devel

The usual series of recipe upgrades for Apache / (mod-)PHP / phpMyAdmin;
however current phpMyAdmin now refuses to work with MariaDB/MySQL older
than 5.5. We shouldn't be shipping 5.1 anymore anyway since it's
unmaintained, so I went ahead with the upgrade, which turned out to be
quite a pain :( It's now working, and build-wise it's a significant
improvement. However, there has been a fairly major increase in package
size, so we ought to be going through and trying to trim things down
where possible. I don't really have time (nor, to be honest, enough
specific knowledge of MariaDB/MySQL) to do this, so if anyone feels like
diving in and doing that, please do.


The following changes since commit 7d9440a1e7bdf69403c55d1d21c7d1db1f07969e:

  concurrencykit: fix SRC_URI, add PV, inherit autotools-brokensep (2014-08-05 12:02:42 +0200)

are available in the git repository at:

  git://git.openembedded.org/meta-openembedded-contrib paule/upgrades4
  http://cgit.openembedded.org/cgit.cgi/meta-openembedded-contrib/log/?h=paule/upgrades4

Paul Eggleton (5):
  apache2: do not patch generated file
  apache2: update to 2.4.10
  modphp: update to 5.5.15
  phpmyadmin: update to 4.2.7
  mariadb: update to 5.5.38

 ...b-native_5.1.67.bb => mariadb-native_5.5.38.bb} |   5 +-
 .../mysql/mariadb/Makefile.am.patch                |  19 -
 .../mariadb/avoid-plugin-options-warnings.patch    |  17 -
 .../mysql/mariadb/configure-ps-cache-check.patch   |  27 --
 .../mysql/mariadb/configure.in.patch               |  13 -
 .../mysql/mariadb/fix-cmake-module-path.patch      |  29 ++
 .../mysql/mariadb/fix-cve-2013-1861-1.patch        | 174 ---------
 .../mysql/mariadb/fix-cve-2013-1861-2.patch        | 257 -------------
 .../mysql/mariadb/fix-link-error-ub1310.patch      |  37 --
 .../mysql/mariadb/fix-mysqlclient-r-version.patch  | 161 ++++++++
 .../mysql/mariadb/fix_host_path.patch              |  37 --
 .../recipes-support/mysql/mariadb/misc.m4.patch    |  13 -
 meta-oe/recipes-support/mysql/mariadb/my.cnf       |   1 +
 meta-oe/recipes-support/mysql/mariadb/mysqld.sh    |  24 --
 .../recipes-support/mysql/mariadb/plug.in.patch    | 405 ---------------------
 .../mysql/mariadb/remove-bad-path.patch            |  18 +
 ...orage-forbids-absolute-addresses-on-IA-32.patch |  44 ---
 .../mariadb/zlib-let-libdir-configurable.patch     |  63 ----
 .../mysql/{mariadb_5.1.67.bb => mariadb_5.5.38.bb} |   2 +
 .../{mariadb_5.1.67.inc => mariadb_5.5.38.inc}     | 113 +++---
 ...e2-native_2.4.9.bb => apache2-native_2.4.10.bb} |   4 +-
 .../apache2/apache2/apache-configure_perlbin.patch |  17 -
 .../{apache2_2.4.9.bb => apache2_2.4.10.bb}        |   4 +-
 meta-webserver/recipes-php/modphp/modphp5.inc      |   2 +-
 meta-webserver/recipes-php/modphp/modphp_5.5.12.bb |   7 -
 meta-webserver/recipes-php/modphp/modphp_5.5.15.bb |   7 +
 .../{phpmyadmin_4.2.0.bb => phpmyadmin_4.2.7.bb}   |   4 +-
 27 files changed, 287 insertions(+), 1217 deletions(-)
 rename meta-oe/recipes-support/mysql/{mariadb-native_5.1.67.bb => mariadb-native_5.5.38.bb} (71%)
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/Makefile.am.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/avoid-plugin-options-warnings.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/configure-ps-cache-check.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/configure.in.patch
 create mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-1.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-2.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-link-error-ub1310.patch
 create mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix_host_path.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/misc.m4.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/mysqld.sh
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/plug.in.patch
 create mode 100644 meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/storage-forbids-absolute-addresses-on-IA-32.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch
 rename meta-oe/recipes-support/mysql/{mariadb_5.1.67.bb => mariadb_5.5.38.bb} (94%)
 rename meta-oe/recipes-support/mysql/{mariadb_5.1.67.inc => mariadb_5.5.38.inc} (68%)
 rename meta-webserver/recipes-httpd/apache2/{apache2-native_2.4.9.bb => apache2-native_2.4.10.bb} (91%)
 rename meta-webserver/recipes-httpd/apache2/{apache2_2.4.9.bb => apache2_2.4.10.bb} (97%)
 delete mode 100644 meta-webserver/recipes-php/modphp/modphp_5.5.12.bb
 create mode 100644 meta-webserver/recipes-php/modphp/modphp_5.5.15.bb
 rename meta-webserver/recipes-php/phpmyadmin/{phpmyadmin_4.2.0.bb => phpmyadmin_4.2.7.bb} (87%)

-- 
1.9.3



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

* [meta-webserver][PATCH 1/5] apache2: do not patch generated file
  2014-08-05 13:20 [meta-webserver/meta-oe][PATCH 0/5] Recipe upgrades Paul Eggleton
@ 2014-08-05 13:20 ` Paul Eggleton
  2014-08-05 13:20 ` [meta-webserver][PATCH 2/5] apache2: update to 2.4.10 Paul Eggleton
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Paul Eggleton @ 2014-08-05 13:20 UTC (permalink / raw)
  To: openembedded-devel

We already patch configure.ac and we're not bypassing autoreconf,
so we don't need to patch configure as well.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 .../apache2/apache2/apache-configure_perlbin.patch      | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch b/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch
index baa739f..c90279d 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch
+++ b/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch
@@ -4,23 +4,6 @@
 #
 # Upstream-Status: Inappropriate [configuration]
 
---- a/configure
-+++ b/configure
-@@ -22365,13 +22365,7 @@
- #define APACHE_MPM_DIR "$MPM_DIR"
- _ACEOF
-
--
--perlbin=`$ac_aux_dir/PrintPath perl`
--if test "x$perlbin" = "x"; then
--    perlbin="/replace/with/path/to/perl/interpreter"
--fi
--
--
-+perlbin='/usr/bin/perl'
-
- BSD_MAKEFILE=no
- ap_make_include=include
 --- a/configure.in
 +++ b/configure.in
 @@ -638,10 +638,7 @@
-- 
1.9.3



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

* [meta-webserver][PATCH 2/5] apache2: update to 2.4.10
  2014-08-05 13:20 [meta-webserver/meta-oe][PATCH 0/5] Recipe upgrades Paul Eggleton
  2014-08-05 13:20 ` [meta-webserver][PATCH 1/5] apache2: do not patch generated file Paul Eggleton
@ 2014-08-05 13:20 ` Paul Eggleton
  2014-08-05 13:20 ` [meta-webserver][PATCH 3/5] modphp: update to 5.5.15 Paul Eggleton
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Paul Eggleton @ 2014-08-05 13:20 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 .../apache2/{apache2-native_2.4.9.bb => apache2-native_2.4.10.bb}     | 4 ++--
 .../recipes-httpd/apache2/{apache2_2.4.9.bb => apache2_2.4.10.bb}     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
 rename meta-webserver/recipes-httpd/apache2/{apache2-native_2.4.9.bb => apache2-native_2.4.10.bb} (91%)
 rename meta-webserver/recipes-httpd/apache2/{apache2_2.4.9.bb => apache2_2.4.10.bb} (97%)

diff --git a/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.9.bb b/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.10.bb
similarity index 91%
rename from meta-webserver/recipes-httpd/apache2/apache2-native_2.4.9.bb
rename to meta-webserver/recipes-httpd/apache2/apache2-native_2.4.10.bb
index 107480e..5963b79 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.9.bb
+++ b/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.10.bb
@@ -15,8 +15,8 @@ SRC_URI = "http://www.apache.org/dist/httpd/httpd-${PV}.tar.bz2 \
 S = "${WORKDIR}/httpd-${PV}"
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=dbff5a2b542fa58854455bf1a0b94b83"
-SRC_URI[md5sum] = "2ef4e65353497606b24fa9bb3e5a3c40"
-SRC_URI[sha256sum] = "f78cc90dfa47caf3d83ad18fd6b4e85f237777c1733fc9088594b70ce2847603"
+SRC_URI[md5sum] = "44543dff14a4ebc1e9e2d86780507156"
+SRC_URI[sha256sum] = "176c4dac1a745f07b7b91e7f4fd48f9c48049fa6f088efe758d61d9738669c6a"
 
 EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
                 --with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.9.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.10.bb
similarity index 97%
rename from meta-webserver/recipes-httpd/apache2/apache2_2.4.9.bb
rename to meta-webserver/recipes-httpd/apache2/apache2_2.4.10.bb
index fd8ed92..614dd4e 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2_2.4.9.bb
+++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.10.bb
@@ -21,8 +21,8 @@ SRC_URI = "http://www.apache.org/dist/httpd/httpd-${PV}.tar.bz2 \
            file://apache2-volatile.conf"
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=dbff5a2b542fa58854455bf1a0b94b83"
-SRC_URI[md5sum] = "2ef4e65353497606b24fa9bb3e5a3c40"
-SRC_URI[sha256sum] = "f78cc90dfa47caf3d83ad18fd6b4e85f237777c1733fc9088594b70ce2847603"
+SRC_URI[md5sum] = "44543dff14a4ebc1e9e2d86780507156"
+SRC_URI[sha256sum] = "176c4dac1a745f07b7b91e7f4fd48f9c48049fa6f088efe758d61d9738669c6a"
 
 S = "${WORKDIR}/httpd-${PV}"
 
-- 
1.9.3



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

* [meta-webserver][PATCH 3/5] modphp: update to 5.5.15
  2014-08-05 13:20 [meta-webserver/meta-oe][PATCH 0/5] Recipe upgrades Paul Eggleton
  2014-08-05 13:20 ` [meta-webserver][PATCH 1/5] apache2: do not patch generated file Paul Eggleton
  2014-08-05 13:20 ` [meta-webserver][PATCH 2/5] apache2: update to 2.4.10 Paul Eggleton
@ 2014-08-05 13:20 ` Paul Eggleton
  2014-08-05 13:20 ` [meta-webserver][PATCH 4/5] phpmyadmin: update to 4.2.7 Paul Eggleton
  2014-08-05 13:20 ` [meta-oe][PATCH 5/5] mariadb: update to 5.5.38 Paul Eggleton
  4 siblings, 0 replies; 14+ messages in thread
From: Paul Eggleton @ 2014-08-05 13:20 UTC (permalink / raw)
  To: openembedded-devel

LIC_FILES_CHKSUM changed since the copyright year changed.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta-webserver/recipes-php/modphp/modphp5.inc      | 2 +-
 meta-webserver/recipes-php/modphp/modphp_5.5.12.bb | 7 -------
 meta-webserver/recipes-php/modphp/modphp_5.5.15.bb | 7 +++++++
 3 files changed, 8 insertions(+), 8 deletions(-)
 delete mode 100644 meta-webserver/recipes-php/modphp/modphp_5.5.12.bb
 create mode 100644 meta-webserver/recipes-php/modphp/modphp_5.5.15.bb

diff --git a/meta-webserver/recipes-php/modphp/modphp5.inc b/meta-webserver/recipes-php/modphp/modphp5.inc
index a1d550d..6932429 100644
--- a/meta-webserver/recipes-php/modphp/modphp5.inc
+++ b/meta-webserver/recipes-php/modphp/modphp5.inc
@@ -12,7 +12,7 @@ SRC_URI = "http://www.php.net/distributions/php-${PV}.tar.bz2 \
 
 S = "${WORKDIR}/php-${PV}"
 
-LIC_FILES_CHKSUM = "file://LICENSE;md5=5bb09683f8f09b15b7076f4b4c31d61f"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=52dd90569008fee5bcdbb22d945b1108"
 
 inherit autotools
 
diff --git a/meta-webserver/recipes-php/modphp/modphp_5.5.12.bb b/meta-webserver/recipes-php/modphp/modphp_5.5.12.bb
deleted file mode 100644
index 3f4e8f2..0000000
--- a/meta-webserver/recipes-php/modphp/modphp_5.5.12.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-include modphp5.inc
-
-EXTRA_OECONF += "--disable-opcache"
-
-SRC_URI[md5sum] = "943af92c2e67bba29429bdd9acf9cbd4"
-SRC_URI[sha256sum] = "519ee29e28532782676f3d8e31a808ffbfee383e0279ccc8cbd2b12ed53c2335"
-
diff --git a/meta-webserver/recipes-php/modphp/modphp_5.5.15.bb b/meta-webserver/recipes-php/modphp/modphp_5.5.15.bb
new file mode 100644
index 0000000..aed620f
--- /dev/null
+++ b/meta-webserver/recipes-php/modphp/modphp_5.5.15.bb
@@ -0,0 +1,7 @@
+include modphp5.inc
+
+EXTRA_OECONF += "--disable-opcache"
+
+SRC_URI[md5sum] = "5cb5f2ed9099299f8a4c952d59d93812"
+SRC_URI[sha256sum] = "00f24226b12fee27e332383b6304f1b9ed3f4d9173dd728a68c5c3f5a59b8ba7"
+
-- 
1.9.3



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

* [meta-webserver][PATCH 4/5] phpmyadmin: update to 4.2.7
  2014-08-05 13:20 [meta-webserver/meta-oe][PATCH 0/5] Recipe upgrades Paul Eggleton
                   ` (2 preceding siblings ...)
  2014-08-05 13:20 ` [meta-webserver][PATCH 3/5] modphp: update to 5.5.15 Paul Eggleton
@ 2014-08-05 13:20 ` Paul Eggleton
  2014-08-05 13:20 ` [meta-oe][PATCH 5/5] mariadb: update to 5.5.38 Paul Eggleton
  4 siblings, 0 replies; 14+ messages in thread
From: Paul Eggleton @ 2014-08-05 13:20 UTC (permalink / raw)
  To: openembedded-devel

Note that this now requires MariaDB/MySQL 5.5+.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 .../phpmyadmin/{phpmyadmin_4.2.0.bb => phpmyadmin_4.2.7.bb}           | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta-webserver/recipes-php/phpmyadmin/{phpmyadmin_4.2.0.bb => phpmyadmin_4.2.7.bb} (87%)

diff --git a/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.2.0.bb b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.2.7.bb
similarity index 87%
rename from meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.2.0.bb
rename to meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.2.7.bb
index 0298f6b..8054c35 100644
--- a/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.2.0.bb
+++ b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.2.7.bb
@@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a \
 SRC_URI = "${SOURCEFORGE_MIRROR}/phpmyadmin/phpMyAdmin/${PV}/phpMyAdmin-${PV}-all-languages.tar.xz \
            file://apache.conf"
 
-SRC_URI[md5sum] = "f787bcf5c98a1702d9c8c653e72eb689"
-SRC_URI[sha256sum] = "fef460aa493f696b8536c273ef126bb142b88dd15c7ef584aca90d2ea07d3bbc"
+SRC_URI[md5sum] = "0dcd755450dac819f33502590c88ad29"
+SRC_URI[sha256sum] = "5d101dd88a99a869bc0c684a7f687cf290abc4bf306daac73337cbde2d7743e4"
 
 S = "${WORKDIR}/phpMyAdmin-${PV}-all-languages"
 
-- 
1.9.3



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

* [meta-oe][PATCH 5/5] mariadb: update to 5.5.38
  2014-08-05 13:20 [meta-webserver/meta-oe][PATCH 0/5] Recipe upgrades Paul Eggleton
                   ` (3 preceding siblings ...)
  2014-08-05 13:20 ` [meta-webserver][PATCH 4/5] phpmyadmin: update to 4.2.7 Paul Eggleton
@ 2014-08-05 13:20 ` Paul Eggleton
  2014-08-06 19:22   ` Martin Jansa
  4 siblings, 1 reply; 14+ messages in thread
From: Paul Eggleton @ 2014-08-05 13:20 UTC (permalink / raw)
  To: openembedded-devel

* Upstream switched from autotools to cmake
* Separate build dir and parallel make now work
* Library versioning no longer used for plugins; other libtool cruft
  gone
* Proper upstream initscript
* Plugins moved from client library package to mariadb-server package
  (matches how Fedora packages these)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 ...b-native_5.1.67.bb => mariadb-native_5.5.38.bb} |   5 +-
 .../mysql/mariadb/Makefile.am.patch                |  19 -
 .../mariadb/avoid-plugin-options-warnings.patch    |  17 -
 .../mysql/mariadb/configure-ps-cache-check.patch   |  27 --
 .../mysql/mariadb/configure.in.patch               |  13 -
 .../mysql/mariadb/fix-cmake-module-path.patch      |  29 ++
 .../mysql/mariadb/fix-cve-2013-1861-1.patch        | 174 ---------
 .../mysql/mariadb/fix-cve-2013-1861-2.patch        | 257 -------------
 .../mysql/mariadb/fix-link-error-ub1310.patch      |  37 --
 .../mysql/mariadb/fix-mysqlclient-r-version.patch  | 161 ++++++++
 .../mysql/mariadb/fix_host_path.patch              |  37 --
 .../recipes-support/mysql/mariadb/misc.m4.patch    |  13 -
 meta-oe/recipes-support/mysql/mariadb/my.cnf       |   1 +
 meta-oe/recipes-support/mysql/mariadb/mysqld.sh    |  24 --
 .../recipes-support/mysql/mariadb/plug.in.patch    | 405 ---------------------
 .../mysql/mariadb/remove-bad-path.patch            |  18 +
 ...orage-forbids-absolute-addresses-on-IA-32.patch |  44 ---
 .../mariadb/zlib-let-libdir-configurable.patch     |  63 ----
 .../mysql/{mariadb_5.1.67.bb => mariadb_5.5.38.bb} |   2 +
 .../{mariadb_5.1.67.inc => mariadb_5.5.38.inc}     | 113 +++---
 20 files changed, 273 insertions(+), 1186 deletions(-)
 rename meta-oe/recipes-support/mysql/{mariadb-native_5.1.67.bb => mariadb-native_5.5.38.bb} (71%)
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/Makefile.am.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/avoid-plugin-options-warnings.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/configure-ps-cache-check.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/configure.in.patch
 create mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-1.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-2.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-link-error-ub1310.patch
 create mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix_host_path.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/misc.m4.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/mysqld.sh
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/plug.in.patch
 create mode 100644 meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/storage-forbids-absolute-addresses-on-IA-32.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch
 rename meta-oe/recipes-support/mysql/{mariadb_5.1.67.bb => mariadb_5.5.38.bb} (94%)
 rename meta-oe/recipes-support/mysql/{mariadb_5.1.67.inc => mariadb_5.5.38.inc} (68%)

diff --git a/meta-oe/recipes-support/mysql/mariadb-native_5.1.67.bb b/meta-oe/recipes-support/mysql/mariadb-native_5.5.38.bb
similarity index 71%
rename from meta-oe/recipes-support/mysql/mariadb-native_5.1.67.bb
rename to meta-oe/recipes-support/mysql/mariadb-native_5.5.38.bb
index 942afcc..9148dee 100644
--- a/meta-oe/recipes-support/mysql/mariadb-native_5.1.67.bb
+++ b/meta-oe/recipes-support/mysql/mariadb-native_5.5.38.bb
@@ -7,14 +7,13 @@ DEPENDS = "ncurses-native zlib-native"
 RDEPENDS_${PN} = ""
 PACKAGES = ""
 EXTRA_OEMAKE = ""
-EXTRA_OECONF = " --with-embedded-server "
 
 do_install() {
     oe_runmake 'DESTDIR=${D}' install
-    mv -f ${D}${libdir}/mysql/* ${D}${libdir}
-    rmdir ${D}${libdir}/mysql
 
     install -d ${D}${bindir}
     install -m 0755 sql/gen_lex_hash ${D}${bindir}/
+    install -m 0755 extra/comp_err ${D}${bindir}/
+    install -m 0755 scripts/comp_sql ${D}${bindir}/
 }
 
diff --git a/meta-oe/recipes-support/mysql/mariadb/Makefile.am.patch b/meta-oe/recipes-support/mysql/mariadb/Makefile.am.patch
deleted file mode 100644
index 33fd17a..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/Makefile.am.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: mysql-5.1.40/sql/Makefile.am
-===================================================================
---- mysql-5.1.40.orig/sql/Makefile.am
-+++ mysql-5.1.40/sql/Makefile.am
-@@ -174,10 +174,10 @@ link_sources:
- # This generates lex_hash.h
- # NOTE Built sources should depend on their sources not the tool
- # this avoid the rebuild of the built files in a source dist
--lex_hash.h:	gen_lex_hash.cc lex.h
--		$(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
--		./gen_lex_hash$(EXEEXT) > $@-t
--		$(MV) $@-t $@
-+GEN_LEX_HASH = ./gen_lex_hash$(EXEEXT)
-+
-+lex_hash.h:	gen_lex_hash$(EXEEXT)
-+		$(GEN_LEX_HASH) > $@
- 
- # For testing of udf_example.so
- udf_example_la_SOURCES= udf_example.c
diff --git a/meta-oe/recipes-support/mysql/mariadb/avoid-plugin-options-warnings.patch b/meta-oe/recipes-support/mysql/mariadb/avoid-plugin-options-warnings.patch
deleted file mode 100644
index 84ff6f0..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/avoid-plugin-options-warnings.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Tell autoconf about with-plugin option to avoid warnings like:
-configure: WARNING: unrecognized options: --with-plugin-maria
-
-Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-
-Index: mariadb-5.1.67/config/ac-macros/plugins.m4
-===================================================================
---- mariadb-5.1.67.orig/config/ac-macros/plugins.m4
-+++ mariadb-5.1.67/config/ac-macros/plugins.m4
-@@ -38,6 +38,7 @@ AC_DEFUN([_MYSQL_PLUGIN],[
-   _MYSQL_PLUGAPPEND([__mysql_plugin_list__],[$1])
-   m4_define([MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]), [$3])
-   m4_define([MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]), [$4])
-+  m4_ifdef([_AC_ENABLE_IF], [_AC_ENABLE_IF([with],[plugin-$1])])
-   _MYSQL_PLUGAPPEND_META([$1], $5)
-   ifelse(m4_bregexp(__mysql_include__,[/plug\.in$]),-1,[],[
-      MYSQL_PLUGIN_DIRECTORY([$1],
diff --git a/meta-oe/recipes-support/mysql/mariadb/configure-ps-cache-check.patch b/meta-oe/recipes-support/mysql/mariadb/configure-ps-cache-check.patch
deleted file mode 100644
index 3b5b3fd..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/configure-ps-cache-check.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Index: mysql-4.1.22/configure.in
-===================================================================
---- mysql-4.1.22.orig/configure.in	2009-01-28 16:33:28.000000000 +0000
-+++ mysql-4.1.22/configure.in	2009-01-28 16:43:26.000000000 +0000
-@@ -471,8 +471,8 @@
- 
- # Lock for PS
- AC_PATH_PROG(PS, ps, ps)
--AC_MSG_CHECKING("how to check if pid exists")
--PS=$ac_cv_path_PS
-+AC_CACHE_CHECK([how to check if pid exists], [ac_cv_FIND_PROC],
-+[
- # Linux style
- if $PS p $$ 2> /dev/null | grep $0 > /dev/null
- then
-@@ -511,8 +511,9 @@
-       AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
-   esac
- fi
--AC_SUBST(FIND_PROC)
--AC_MSG_RESULT("$FIND_PROC")
-+ac_cv_FIND_PROC="$FIND_PROC"
-+])
-+AC_SUBST([FIND_PROC], [$ac_cv_FIND_PROC])
- 
- # Check if a pid is valid
- AC_PATH_PROG(KILL, kill, kill)
diff --git a/meta-oe/recipes-support/mysql/mariadb/configure.in.patch b/meta-oe/recipes-support/mysql/mariadb/configure.in.patch
deleted file mode 100644
index 6fe2dfa..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/configure.in.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: mysql-5.1.40/configure.in
-===================================================================
---- mysql-5.1.40.orig/configure.in
-+++ mysql-5.1.40/configure.in
-@@ -226,8 +226,6 @@ else
-   AC_PATH_PROG(AS, as, as)
- fi
- 
--# Still need ranlib for readline; local static use only so no libtool.
--AC_PROG_RANLIB
- # We use libtool
- #AC_LIBTOOL_WIN32_DLL
- AC_PROG_LIBTOOL
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch b/meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch
new file mode 100644
index 0000000..8d9f558
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch
@@ -0,0 +1,29 @@
+Avoid CMAKE_MODULE_PATH being overwritten
+
+OE-Core's setting of CMAKE_MODULE_PATH stomps on MariaDB's value unless
+we set it after setting the project name.
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+Upstream-Status: Inappropriate [working around OE-Core bug]
+
+--- mariadb/CMakeLists.txt	2014-07-17 11:01:07.676353047 +0100
++++ mariadb/CMakeLists.txt	2014-07-17 11:01:31.299353107 +0100
+@@ -28,8 +28,6 @@
+ 
+ MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}")
+ 
+-SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
+-
+ # Distinguish between community and non-community builds, with the
+ # default being a community build. This does not impact the feature
+ # set that will be compiled in; it's merely provided as a hint to
+@@ -77,6 +75,8 @@
+ ENDIF()
+ PROJECT(${MYSQL_PROJECT_NAME})
+ 
++SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
++
+ IF(BUILD_CONFIG)
+   INCLUDE(
+   ${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-1.patch b/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-1.patch
deleted file mode 100644
index df2e708..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-1.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From 24404044ad4c28026e400e1fcd85358f2060aa96 Mon Sep 17 00:00:00 2001
-From: Alexey Botchkov <holyfoot@askmonty.org>
-Date: Sun, 10 Mar 2013 23:08:05 +0400
-Subject: [PATCH] MDEV-4252 geometry query crashes server.       The bug was
- found by Alyssa Milburn.       If the number of points of a geometry feature
- read from       binary representation is greater than 0x10000000, then      
- the (uint32) (num_points * 16) will cut the higher byte,       which leads to
- various errors.       Fixed by additional check if (num_points >
- max_n_points).
-
-Upstream-Status: Backport
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
----
- mysql-test/r/gis.result |  3 +++
- mysql-test/t/gis.test   |  1 +
- sql/spatial.cc          | 27 ++++++++++++++++++---------
- sql/spatial.h           |  9 +++++----
- 4 files changed, 27 insertions(+), 13 deletions(-)
-
-diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
-index 8dad72f..69e73d0 100644
---- a/mysql-test/r/gis.result
-+++ b/mysql-test/r/gis.result
-@@ -1087,4 +1087,7 @@ NULL
- #
- SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
- ERROR 22007: Illegal non geometric '' value found during parsing
-+select astext(0x0100000000030000000100000000000010);
-+astext(0x0100000000030000000100000000000010)
-+NULL
- End of 5.1 tests
-diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
-index abda3e9..cc5d158 100644
---- a/mysql-test/t/gis.test
-+++ b/mysql-test/t/gis.test
-@@ -826,5 +826,6 @@ SELECT ISCLOSED(CONVERT(CONCAT('     ', 0x2), BINARY(20)));
- --error ER_ILLEGAL_VALUE_FOR_TYPE
- SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
- 
-+select astext(0x0100000000030000000100000000000010);
- 
- --echo End of 5.1 tests
-diff --git a/sql/spatial.cc b/sql/spatial.cc
-index eec028e..94d0238 100644
---- a/sql/spatial.cc
-+++ b/sql/spatial.cc
-@@ -556,7 +556,7 @@ bool Gis_line_string::get_data_as_wkt(String *txt, const char **end) const
-   n_points= uint4korr(data);
-   data += 4;
- 
--  if (n_points < 1 ||
-+  if (n_points < 1 || n_points > max_n_points ||
-       no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points) ||
-       txt->reserve(((MAX_DIGITS_IN_DOUBLE + 1)*2 + 1) * n_points))
-     return 1;
-@@ -594,7 +594,8 @@ int Gis_line_string::geom_length(double *len) const
-     return 1;
-   n_points= uint4korr(data);
-   data+= 4;
--  if (n_points < 1 || no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points))
-+  if (n_points < 1 || n_points > max_n_points ||
-+      no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points))
-     return 1;
- 
-   get_point(&prev_x, &prev_y, data);
-@@ -628,7 +629,7 @@ int Gis_line_string::is_closed(int *closed) const
-     return 0;
-   }
-   data+= 4;
--  if (n_points == 0 ||
-+  if (n_points == 0 || n_points > max_n_points ||
-       no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points))
-     return 1;
- 
-@@ -798,7 +799,8 @@ bool Gis_polygon::get_data_as_wkt(String *txt, const char **end) const
-       return 1;
-     n_points= uint4korr(data);
-     data+= 4;
--    if (no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points) ||
-+    if (n_points > max_n_points ||
-+        no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points) ||
- 	txt->reserve(2 + ((MAX_DIGITS_IN_DOUBLE + 1) * 2 + 1) * n_points))
-       return 1;
-     txt->qs_append('(');
-@@ -852,7 +854,8 @@ int Gis_polygon::area(double *ar, const char **end_of_data) const
-     if (no_data(data, 4))
-       return 1;
-     n_points= uint4korr(data);
--    if (no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points))
-+    if (n_points > max_n_points ||
-+        no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points))
-       return 1;
-     get_point(&prev_x, &prev_y, data+4);
-     data+= (4+SIZEOF_STORED_DOUBLE*2);
-@@ -888,7 +891,8 @@ int Gis_polygon::exterior_ring(String *result) const
-   n_points= uint4korr(data);
-   data+= 4;
-   length= n_points * POINT_DATA_SIZE;
--  if (no_data(data, length) || result->reserve(1+4+4+ length))
-+  if (n_points > max_n_points ||
-+      no_data(data, length) || result->reserve(1+4+4+ length))
-     return 1;
- 
-   result->q_append((char) wkb_ndr);
-@@ -973,7 +977,8 @@ int Gis_polygon::centroid_xy(double *x, double *y) const
-       return 1;
-     org_n_points= n_points= uint4korr(data);
-     data+= 4;
--    if (no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points))
-+    if (n_points > max_n_points ||
-+        no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points))
-       return 1;
-     get_point(&prev_x, &prev_y, data);
-     data+= (SIZEOF_STORED_DOUBLE*2);
-@@ -1260,7 +1265,8 @@ bool Gis_multi_line_string::get_data_as_wkt(String *txt,
-       return 1;
-     n_points= uint4korr(data + WKB_HEADER_SIZE);
-     data+= WKB_HEADER_SIZE + 4;
--    if (no_data(data, n_points * (SIZEOF_STORED_DOUBLE*2)) ||
-+    if (n_points > max_n_points ||
-+        no_data(data, n_points * (SIZEOF_STORED_DOUBLE*2)) ||
- 	txt->reserve(2 + ((MAX_DIGITS_IN_DOUBLE + 1) * 2 + 1) * n_points))
-       return 1;
-     txt->qs_append('(');
-@@ -1521,7 +1527,8 @@ bool Gis_multi_polygon::get_data_as_wkt(String *txt, const char **end) const
-         return 1;
-       uint32 n_points= uint4korr(data);
-       data+= 4;
--      if (no_data(data, (SIZEOF_STORED_DOUBLE * 2) * n_points) ||
-+      if (n_points > max_n_points ||
-+          no_data(data, (SIZEOF_STORED_DOUBLE * 2) * n_points) ||
- 	  txt->reserve(2 + ((MAX_DIGITS_IN_DOUBLE + 1) * 2 + 1) * n_points,
- 		       512))
- 	return 1;
-@@ -1604,6 +1611,8 @@ int Gis_multi_polygon::geometry_n(uint32 num, String *result) const
-       if (no_data(data, 4))
- 	return 1;
-       n_points= uint4korr(data);
-+      if (n_points > max_n_points)
-+        return 1;
-       data+= 4 + POINT_DATA_SIZE * n_points;
-     }
-   } while (--num);
-diff --git a/sql/spatial.h b/sql/spatial.h
-index 20b3856..7d25425 100644
---- a/sql/spatial.h
-+++ b/sql/spatial.h
-@@ -197,6 +197,11 @@ struct MBR
- class Geometry
- {
- public:
-+  // Maximum number of points in feature that can fit into String
-+  static const uint32 max_n_points=
-+    (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
-+    POINT_DATA_SIZE;
-+public:
-   Geometry() {}                               /* Remove gcc warning */
-   virtual ~Geometry() {}                        /* Remove gcc warning */
-   static void *operator new(size_t size, void *buffer)
-@@ -379,10 +384,6 @@ class Gis_point: public Geometry
- 
- class Gis_line_string: public Geometry
- {
--  // Maximum number of points in LineString that can fit into String
--  static const uint32 max_n_points=
--    (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
--    POINT_DATA_SIZE;
- public:
-   Gis_line_string() {}                        /* Remove gcc warning */
-   virtual ~Gis_line_string() {}               /* Remove gcc warning */
--- 
-1.8.1.6
-
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-2.patch b/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-2.patch
deleted file mode 100644
index c35cdfb..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-2.patch
+++ /dev/null
@@ -1,257 +0,0 @@
-From 9f714cdd3bf4bd8ee06cd38dcd2c6e8990a4ec48 Mon Sep 17 00:00:00 2001
-From: Alexey Botchkov <holyfoot@askmonty.org>
-Date: Mon, 18 Mar 2013 17:58:00 +0400
-Subject: [PATCH] MDEV-4252 geometry query crashes server.     Additional fixes
- for possible overflows in length-related     calculations in 'spatial'
- implementations.     Checks added to the ::get_data_size() methods.    
- max_n_points decreased to occupy less 2G size. An     object of that size is
- practically inoperable anyway.
-
-Upstream-Status: Backport
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
----
- mysql-test/r/gis.result | 12 +++++++++
- mysql-test/t/gis.test   |  6 +++++
- sql/spatial.cc          | 67 ++++++++++++++++++++++++++++++++++---------------
- sql/spatial.h           |  2 +-
- 4 files changed, 66 insertions(+), 21 deletions(-)
-
-diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
-index 69e73d0..7566f0b 100644
---- a/mysql-test/r/gis.result
-+++ b/mysql-test/r/gis.result
-@@ -1087,7 +1087,19 @@ NULL
- #
- SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
- ERROR 22007: Illegal non geometric '' value found during parsing
-+#
-+# MDEV-4252 geometry query crashes server
-+#
- select astext(0x0100000000030000000100000000000010);
- astext(0x0100000000030000000100000000000010)
- NULL
-+select envelope(0x0100000000030000000100000000000010);
-+envelope(0x0100000000030000000100000000000010)
-+NULL
-+select geometryn(0x0100000000070000000100000001030000000200000000000000ffff0000, 1);
-+geometryn(0x0100000000070000000100000001030000000200000000000000ffff0000, 1)
-+NULL
-+select geometryn(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1);
-+geometryn(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1)
-+NULL
- End of 5.1 tests
-diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
-index cc5d158..c42541e 100644
---- a/mysql-test/t/gis.test
-+++ b/mysql-test/t/gis.test
-@@ -826,6 +826,12 @@ SELECT ISCLOSED(CONVERT(CONCAT('     ', 0x2), BINARY(20)));
- --error ER_ILLEGAL_VALUE_FOR_TYPE
- SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
- 
-+--echo #
-+--echo # MDEV-4252 geometry query crashes server
-+--echo #
- select astext(0x0100000000030000000100000000000010);
-+select envelope(0x0100000000030000000100000000000010);
-+select geometryn(0x0100000000070000000100000001030000000200000000000000ffff0000, 1);
-+select geometryn(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1);
- 
- --echo End of 5.1 tests
-diff --git a/sql/spatial.cc b/sql/spatial.cc
-index 94d0238..5a4b768 100644
---- a/sql/spatial.cc
-+++ b/sql/spatial.cc
-@@ -394,18 +394,19 @@ const char *Geometry::append_points(String *txt, uint32 n_points,
- const char *Geometry::get_mbr_for_points(MBR *mbr, const char *data,
- 					 uint offset) const
- {
--  uint32 points;
-+  uint32 n_points;
-   /* read number of points */
-   if (no_data(data, 4))
-     return 0;
--  points= uint4korr(data);
-+  n_points= uint4korr(data);
-   data+= 4;
- 
--  if (no_data(data, (SIZEOF_STORED_DOUBLE * 2 + offset) * points))
-+  if (n_points > max_n_points ||
-+      no_data(data, (POINT_DATA_SIZE + offset) * n_points))
-     return 0;
- 
-   /* Calculate MBR for points */
--  while (points--)
-+  while (n_points--)
-   {
-     data+= offset;
-     mbr->add_xy(data, data + SIZEOF_STORED_DOUBLE);
-@@ -484,9 +485,12 @@ const Geometry::Class_info *Gis_point::get_class_info() const
- 
- uint32 Gis_line_string::get_data_size() const 
- {
--  if (no_data(m_data, 4))
-+  uint32 n_points, size;
-+  if (no_data(m_data, 4) ||
-+      (n_points= uint4korr(m_data)) > max_n_points ||
-+      no_data(m_data, (size= 4 + n_points * POINT_DATA_SIZE)))
-     return GET_SIZE_ERROR;
--  return 4 + uint4korr(m_data) * POINT_DATA_SIZE;
-+  return size;
- }
- 
- 
-@@ -665,6 +669,9 @@ int Gis_line_string::end_point(String *result) const
-   if (no_data(m_data, 4))
-     return 1;
-   n_points= uint4korr(m_data);
-+  if (n_points == 0 || n_points > max_n_points ||
-+      no_data(m_data, POINT_DATA_SIZE * n_points))
-+    return 1;
-   return create_point(result, m_data + 4 + (n_points - 1) * POINT_DATA_SIZE);
- }
- 
-@@ -674,11 +681,14 @@ int Gis_line_string::point_n(uint32 num, String *result) const
-   uint32 n_points;
-   if (no_data(m_data, 4))
-     return 1;
-+  num--;
-   n_points= uint4korr(m_data);
--  if ((uint32) (num - 1) >= n_points) // means (num > n_points || num < 1)
-+  if (num >= n_points ||
-+      num > max_n_points || // means (num > n_points || num < 1)
-+      no_data(m_data, num * POINT_DATA_SIZE))
-     return 1;
- 
--  return create_point(result, m_data + 4 + (num - 1) * POINT_DATA_SIZE);
-+  return create_point(result, m_data + 4 + num*POINT_DATA_SIZE);
- }
- 
- const Geometry::Class_info *Gis_line_string::get_class_info() const
-@@ -692,6 +702,7 @@ const Geometry::Class_info *Gis_line_string::get_class_info() const
- uint32 Gis_polygon::get_data_size() const 
- {
-   uint32 n_linear_rings;
-+  uint32 n_points;
-   const char *data= m_data;
- 
-   if (no_data(data, 4))
-@@ -701,10 +712,13 @@ uint32 Gis_polygon::get_data_size() const
- 
-   while (n_linear_rings--)
-   {
--    if (no_data(data, 4))
-+    if (no_data(data, 4) ||
-+        (n_points= uint4korr(data)) > max_n_points)
-       return GET_SIZE_ERROR;
--    data+= 4 + uint4korr(data)*POINT_DATA_SIZE;
-+    data+= 4 + n_points*POINT_DATA_SIZE;
-   }
-+  if (no_data(data, 0))
-+    return GET_SIZE_ERROR;
-   return (uint32) (data - m_data);
- }
- 
-@@ -1037,9 +1051,14 @@ const Geometry::Class_info *Gis_polygon::get_class_info() const
- 
- uint32 Gis_multi_point::get_data_size() const 
- {
--  if (no_data(m_data, 4))
--    return GET_SIZE_ERROR;
--  return 4 + uint4korr(m_data)*(POINT_DATA_SIZE + WKB_HEADER_SIZE);
-+  uint32 n_points;
-+  uint32 size;
-+
-+  if (no_data(m_data, 4) ||
-+      (n_points= uint4korr(m_data)) > max_n_points ||
-+      no_data(m_data, (size= 4 + n_points*(POINT_DATA_SIZE + WKB_HEADER_SIZE))))
-+     return GET_SIZE_ERROR;
-+  return size;
- }
- 
- 
-@@ -1107,7 +1126,8 @@ bool Gis_multi_point::get_data_as_wkt(String *txt, const char **end) const
-     return 1;
- 
-   n_points= uint4korr(m_data);
--  if (no_data(m_data+4,
-+  if (n_points > max_n_points ||
-+      no_data(m_data+4,
- 	      n_points * (SIZEOF_STORED_DOUBLE * 2 + WKB_HEADER_SIZE)) ||
-       txt->reserve(((MAX_DIGITS_IN_DOUBLE + 1) * 2 + 1) * n_points))
-     return 1;
-@@ -1160,6 +1180,7 @@ const Geometry::Class_info *Gis_multi_point::get_class_info() const
- uint32 Gis_multi_line_string::get_data_size() const 
- {
-   uint32 n_line_strings;
-+  uint32 n_points;
-   const char *data= m_data;
- 
-   if (no_data(data, 4))
-@@ -1169,11 +1190,13 @@ uint32 Gis_multi_line_string::get_data_size() const
- 
-   while (n_line_strings--)
-   {
--    if (no_data(data, WKB_HEADER_SIZE + 4))
-+    if (no_data(data, WKB_HEADER_SIZE + 4) ||
-+        (n_points= uint4korr(data + WKB_HEADER_SIZE)) > max_n_points)
-       return GET_SIZE_ERROR;
--    data+= (WKB_HEADER_SIZE + 4 + uint4korr(data + WKB_HEADER_SIZE) *
--	    POINT_DATA_SIZE);
-+    data+= (WKB_HEADER_SIZE + 4 + n_points*POINT_DATA_SIZE);
-   }
-+  if (no_data(data, 0))
-+    return GET_SIZE_ERROR;
-   return (uint32) (data - m_data);
- }
- 
-@@ -1327,7 +1350,7 @@ int Gis_multi_line_string::geometry_n(uint32 num, String *result) const
-       return 1;
-     n_points= uint4korr(data + WKB_HEADER_SIZE);
-     length= WKB_HEADER_SIZE + 4+ POINT_DATA_SIZE * n_points;
--    if (no_data(data, length))
-+    if (n_points > max_n_points || no_data(data, length))
-       return 1;
-     if (!--num)
-       break;
-@@ -1407,6 +1430,7 @@ const Geometry::Class_info *Gis_multi_line_string::get_class_info() const
- uint32 Gis_multi_polygon::get_data_size() const 
- {
-   uint32 n_polygons;
-+  uint32 n_points;
-   const char *data= m_data;
- 
-   if (no_data(data, 4))
-@@ -1425,11 +1449,14 @@ uint32 Gis_multi_polygon::get_data_size() const
- 
-     while (n_linear_rings--)
-     {
--      if (no_data(data, 4))
-+      if (no_data(data, 4) ||
-+          (n_points= uint4korr(data)) > max_n_points)
- 	return GET_SIZE_ERROR;
--      data+= 4 + uint4korr(data) * POINT_DATA_SIZE;
-+      data+= 4 + n_points * POINT_DATA_SIZE;
-     }
-   }
-+  if (no_data(data, 0))
-+    return GET_SIZE_ERROR;
-   return (uint32) (data - m_data);
- }
- 
-diff --git a/sql/spatial.h b/sql/spatial.h
-index 7d25425..d7632c1 100644
---- a/sql/spatial.h
-+++ b/sql/spatial.h
-@@ -199,7 +199,7 @@ class Geometry
- public:
-   // Maximum number of points in feature that can fit into String
-   static const uint32 max_n_points=
--    (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
-+    (uint32) (INT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
-     POINT_DATA_SIZE;
- public:
-   Geometry() {}                               /* Remove gcc warning */
--- 
-1.8.1.6
-
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-link-error-ub1310.patch b/meta-oe/recipes-support/mysql/mariadb/fix-link-error-ub1310.patch
deleted file mode 100644
index a528ea7..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/fix-link-error-ub1310.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-mariadb-native: fix link error on Ubuntu 13.10
-
-Below errors only occurs on Ubuntu 13.10:
-
-$arch-linux-libtool: link: g++ ... -o .libs/mysqltest_embedded \
-    ../../libmysqld/.libs/libmysqld.so -ldl
-
-    ../../libmysqld/.libs/libmysqld.so: undefined reference to `dlopen'
-    ../../libmysqld/.libs/libmysqld.so: undefined reference to `dlclose'
-    ../../libmysqld/.libs/libmysqld.so: undefined reference to `dlerror'
-    ../../libmysqld/.libs/libmysqld.so: undefined reference to `dlsym'
-
-GCC/ld verion on the host:
-    gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1
-    GNU ld (GNU Binutils for Ubuntu) 2.23.52.20130913
-
-This is a strange behavior on Ub13.10, it fails even '-ldl' in the
-link command line. Below fix will append '-ldl' to dependency_libs
-in libmysqld.la.
-
-Upstream-Status: Submitted [https://mariadb.atlassian.net/browse/MDEV-5362]
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-================================================
-diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am
-index 7a2c92e..eee501e 100644
---- a/libmysqld/Makefile.am
-+++ b/libmysqld/Makefile.am
-@@ -92,7 +92,7 @@ INC_LIB=	$(top_builddir)/regex/libregex.la \
-                 @ndbcluster_libs@ @NDB_SCI_LIBS@ \
- 		@mysql_embedded_plugin_libs@ \
- 		$(libevent_inc_libs) \
--		$(yassl_inc_libs)
-+		$(yassl_inc_libs) @LIBDL@
- 
- if HAVE_YASSL
- yassl_inc_libs=	$(top_builddir)/extra/yassl/src/libyassl.la \
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch b/meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch
new file mode 100644
index 0000000..7516619
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch
@@ -0,0 +1,161 @@
+From 6db2a606196fb38a6d106dc409eee1cb9a40a440 Mon Sep 17 00:00:00 2001
+From: Tor Didriksen <tor.didriksen@oracle.com>
+Date: Mon, 24 Jun 2013 17:15:35 +0200
+Subject: [PATCH] Bug#16809055 MYSQL 5.6 AND 5.7 STILL USE LIBMYSQLCLIENT.SO.18
+
+With this patch, the libmysql/ directory contains:
+libmysqlclient.a
+libmysqlclient_r.a -> libmysqlclient.a
+libmysqlclient_r.so -> libmysqlclient.so*
+libmysqlclient_r.so.18 -> libmysqlclient.so.18*
+libmysqlclient_r.so.18.1.0 -> libmysqlclient.so.18.1.0*
+libmysqlclient.so -> libmysqlclient.so.18*
+libmysqlclient.so.18 -> libmysqlclient.so.18.1.0*
+libmysqlclient.so.18.1.0*
+
+This fixes libmysqlclient_r symlinks pointing to the unversioned
+libmysqlclient.so symlink (leading to package QA errors since the
+libmysqlclient-r package ends up depending on libmysqlclient-dev).
+
+Borrowed from MySQL 5.6 tree at https://github.com/percona/mysql/
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+---
+ cmake/install_macros.cmake | 25 +++++++++++++++----------
+ cmake/mysql_version.cmake  |  3 ++-
+ libmysql/CMakeLists.txt    | 36 ++++++++++++++++++++++++++++--------
+ 3 files changed, 45 insertions(+), 19 deletions(-)
+
+diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake
+index b8efdf8..a0d0e68 100644
+--- a/cmake/install_macros.cmake
++++ b/cmake/install_macros.cmake
+@@ -1,4 +1,4 @@
+-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
++# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+@@ -111,28 +111,33 @@ FUNCTION(INSTALL_SCRIPT)
+ ENDFUNCTION()
+ 
+ # Install symbolic link to CMake target. 
+-# the link is created in the same directory as target
+-# and extension will be the same as for target file.
+-MACRO(INSTALL_SYMLINK linkname target destination component)
++# We do 'cd path; ln -s target_name link_name'
++# We also add an INSTALL target for "${path}/${link_name}"
++MACRO(INSTALL_SYMLINK target target_name link_name destination component)
+ IF(UNIX)
+   GET_TARGET_PROPERTY(location ${target} LOCATION)
+   GET_FILENAME_COMPONENT(path ${location} PATH)
+-  GET_FILENAME_COMPONENT(name ${location} NAME)
+-  SET(output ${path}/${linkname})
++  MESSAGE(STATUS "target ${target}")
++  MESSAGE(STATUS "link_name ${link_name}")
++  MESSAGE(STATUS "target_name ${target_name}")
++  MESSAGE(STATUS "path ${path}")
++  MESSAGE(STATUS "")
++
++  SET(output ${path}/${link_name})
+   ADD_CUSTOM_COMMAND(
+     OUTPUT ${output}
+     COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${output}
+     COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink 
+-      ${name} 
+-      ${linkname}
++      ${target_name} 
++      ${link_name}
+     WORKING_DIRECTORY ${path}
+     DEPENDS ${target}
+     )
+   
+-  ADD_CUSTOM_TARGET(symlink_${linkname}
++  ADD_CUSTOM_TARGET(symlink_${link_name}
+     ALL
+     DEPENDS ${output})
+-  SET_TARGET_PROPERTIES(symlink_${linkname} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
++  SET_TARGET_PROPERTIES(symlink_${link_name} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+   IF(CMAKE_GENERATOR MATCHES "Xcode")
+     # For Xcode, replace project config with install config
+     STRING(REPLACE "${CMAKE_CFG_INTDIR}" 
+diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
+index be5760f..96286ff 100644
+--- a/libmysql/CMakeLists.txt
++++ b/libmysql/CMakeLists.txt
+@@ -180,6 +180,12 @@ IF(MSVC)
+  INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug)
+ ENDIF()
+ 
++MACRO(GET_TARGET_NAME target out_name)
++  GET_TARGET_PROPERTY(location ${target} LOCATION)
++  GET_FILENAME_COMPONENT(name ${location} NAME)
++  SET(${out_name} ${name})
++ENDMACRO()
++
+ IF(UNIX)
+   MACRO(GET_VERSIONED_LIBNAME LIBNAME EXTENSION VERSION OUTNAME)
+     SET(DOT_VERSION ".${VERSION}")
+@@ -192,7 +198,13 @@ IF(UNIX)
+       SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION})
+     ENDIF() 
+   ENDMACRO()
+-  INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} Development)
++ENDIF()
++
++IF(UNIX)
++  GET_TARGET_NAME(mysqlclient lib_name)
++  INSTALL_SYMLINK(mysqlclient
++    ${lib_name} ${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a
++    ${INSTALL_LIBDIR} Development)
+ ENDIF()
+ 
+ IF(NOT DISABLE_SHARED)
+@@ -205,10 +217,9 @@ IF(NOT DISABLE_SHARED)
+     # libtool compatability
+     IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
+       SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}")
+-    ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
+-      SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0")
+     ELSE()
+-      SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0")
++      SET(OS_SHARED_LIB_VERSION
++        "${SHARED_LIB_MAJOR_VERSION}.${SHARED_LIB_MINOR_VERSION}.0")
+     ENDIF()
+     # Name of shared library is mysqlclient on Unix
+     SET_TARGET_PROPERTIES(libmysql PROPERTIES 
+@@ -239,8 +250,13 @@ IF(NOT DISABLE_SHARED)
+       "${CMAKE_SHARED_LIBRARY_SUFFIX}"
+       ""
+       linkname)
+-    INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
+-    SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
++    GET_TARGET_NAME(libmysql lib_name)
++    GET_FILENAME_COMPONENT(lib_name_we ${lib_name} NAME_WE)
++    INSTALL_SYMLINK(libmysql
++      ${lib_name} ${linkname}
++      ${INSTALL_LIBDIR} SharedLibraries)
++    SET(OS_SHARED_LIB_SYMLINKS
++      "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
+     LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS)
+     FOREACH(ver ${OS_SHARED_LIB_SYMLINKS})
+       GET_VERSIONED_LIBNAME(
+@@ -248,7 +264,11 @@ IF(NOT DISABLE_SHARED)
+         "${CMAKE_SHARED_LIBRARY_SUFFIX}"
+         "${ver}"
+         linkname)
+-      INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
++      GET_VERSIONED_LIBNAME(
++        ${lib_name_we} "${CMAKE_SHARED_LIBRARY_SUFFIX}" "${ver}" lib_name_ver)
++      INSTALL_SYMLINK(libmysql
++        ${lib_name_ver} ${linkname}
++        ${INSTALL_LIBDIR} SharedLibraries)
+     ENDFOREACH()
+   ENDIF()
+ ENDIF()
+-- 
+2.0.3
+
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix_host_path.patch b/meta-oe/recipes-support/mysql/mariadb/fix_host_path.patch
deleted file mode 100644
index 4f69cd5..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/fix_host_path.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- mysql-4.1.22/configure.in.old	2008-09-18 20:11:15.000000000 -0500
-+++ mysql-4.1.22/configure.in	2008-09-18 20:12:28.000000000 -0500
-@@ -456,9 +456,9 @@ else
-   fi
- fi
- 
--AC_SUBST(HOSTNAME)
--AC_SUBST(PERL)
--AC_SUBST(PERL5)
-+AC_SUBST(HOSTNAME,/bin/hostname)
-+AC_SUBST(PERL,$(bindir)/perl)
-+AC_SUBST(PERL5,$(bindir)/perl)
- 
- # for build ndb docs
- 
-@@ -516,16 +516,17 @@ AC_MSG_RESULT("$FIND_PROC")
- 
- # Check if a pid is valid
- AC_PATH_PROG(KILL, kill, kill)
-+AC_SUBST(KILL,/bin/kill)
- AC_MSG_CHECKING("for kill switches")
--if $ac_cv_path_KILL -0 $$
-+if $KILL -0 $$
- then
--  CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null"
-+  CHECK_PID="$KILL -0 \$\$PID > /dev/null 2> /dev/null"
- elif kill -s 0 $$
- then
--  CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
-+  CHECK_PID="$KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
- else
-   AC_MSG_WARN([kill -0 to check for pid seems to fail])
--    CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
-+    CHECK_PID="$KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
- fi
- AC_SUBST(CHECK_PID)
- AC_MSG_RESULT("$CHECK_PID")
diff --git a/meta-oe/recipes-support/mysql/mariadb/misc.m4.patch b/meta-oe/recipes-support/mysql/mariadb/misc.m4.patch
deleted file mode 100644
index 7b0acff..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/misc.m4.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: mysql-5.1.40/config/ac-macros/misc.m4
-===================================================================
---- mysql-5.1.40.orig/config/ac-macros/misc.m4
-+++ mysql-5.1.40/config/ac-macros/misc.m4
-@@ -476,7 +476,7 @@ AC_DEFUN([MYSQL_STACK_DIRECTION],
-  {
-    exit (find_stack_direction() < 0);
-  }], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
--   ac_cv_c_stack_direction=)])
-+   ac_cv_c_stack_direction=0)])
-  AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
- ])dnl
- 
diff --git a/meta-oe/recipes-support/mysql/mariadb/my.cnf b/meta-oe/recipes-support/mysql/mariadb/my.cnf
index d174381..f2c9b90 100644
--- a/meta-oe/recipes-support/mysql/mariadb/my.cnf
+++ b/meta-oe/recipes-support/mysql/mariadb/my.cnf
@@ -17,5 +17,6 @@ datadir 					= /var/mysql
 skip-external-locking
 skip-networking
 ignore-builtin-innodb
+default-storage-engine				= myisam
 bind-address					= localhost
 
diff --git a/meta-oe/recipes-support/mysql/mariadb/mysqld.sh b/meta-oe/recipes-support/mysql/mariadb/mysqld.sh
deleted file mode 100644
index 479ebdb..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/mysqld.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-# MySQL init script
-
-. /etc/default/rcS
-
-case "$1" in
-	start)
-		/usr/bin/mysqld_safe &
-		;;
-	stop)
-		if test -f /var/lib/mysql/mysqld.pid ; then
-			PID=`cat /var/lib/mysql/mysqld.pid`
-			kill $PID
-		fi
-		;;
-	restart)
-		$0 stop
-		$0 start
-		;;
-	*)
-		echo "Usage: /etc/init.d/mysqld {start|stop|restart}"
-		;;
-esac
-
-exit 0
diff --git a/meta-oe/recipes-support/mysql/mariadb/plug.in.patch b/meta-oe/recipes-support/mysql/mariadb/plug.in.patch
deleted file mode 100644
index 156fd10..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/plug.in.patch
+++ /dev/null
@@ -1,405 +0,0 @@
-diff --git a/storage/innodb_plugin/plug.in b/storage/innodb_plugin/plug.in
-index 7650251..3cc22c5 100644
---- a/storage/innodb_plugin/plug.in
-+++ b/storage/innodb_plugin/plug.in
-@@ -56,180 +56,10 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin,  [
-   esac
-   AC_SUBST(INNODB_DYNAMIC_CFLAGS)
- 
--  AC_MSG_CHECKING(whether GCC atomic builtins are available)
--  # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
--  AC_TRY_RUN(
--    [
--      int main()
--      {
--	long	x;
--	long	y;
--	long	res;
--	char	c;
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x, y);
--	if (!res || x != y) {
--          return(1);
--        }
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x + 1, y);
--	if (res || x != 10) {
--          return(1);
--        }
--
--	x = 10;
--	y = 123;
--	res = __sync_add_and_fetch(&x, y);
--	if (res != 123 + 10 || x != 123 + 10) {
--	  return(1);
--	}
--
--	c = 10;
--	res = __sync_lock_test_and_set(&c, 123);
--	if (res != 10 || c != 123) {
--	  return(1);
--	}
--
--	return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
--                [GCC atomic builtins are available])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
--  AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
--  # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
--  AC_TRY_RUN(
--    [
--      #include <pthread.h>
--      #include <string.h>
--
--      int main(int argc, char** argv) {
--        pthread_t       x1;
--        pthread_t       x2;
--        pthread_t       x3;
--
--	memset(&x1, 0x0, sizeof(x1));
--	memset(&x2, 0x0, sizeof(x2));
--	memset(&x3, 0x0, sizeof(x3));
--
--        __sync_bool_compare_and_swap(&x1, x2, x3);
--
--        return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
--                [pthread_t can be used by GCC atomic builtins])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
--  AC_MSG_CHECKING(whether Solaris libc atomic functions are available)
--  # Define HAVE_IB_SOLARIS_ATOMICS if _all_ of the following
--  # functions are present.
--  AC_CHECK_FUNCS(atomic_add_long_nv \
--		 atomic_cas_32 \
--		 atomic_cas_64 \
--		 atomic_cas_ulong \
--		 atomic_swap_uchar)
--
--  if test "${ac_cv_func_atomic_add_long_nv}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_32}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_64}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_ulong}" = "yes" -a \
--          "${ac_cv_func_atomic_swap_uchar}" = "yes" ; then
--
--    AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1],
--      [Define to 1 if Solaris libc atomic functions are available]
--    )
--  fi
--
--  AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions)
--  # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
--  AC_TRY_RUN(
--    [
--      #include <pthread.h>
--      #include <string.h>
--
--      int main(int argc, char** argv) {
--        pthread_t       x1;
--        pthread_t       x2;
--        pthread_t       x3;
--
--        memset(&x1, 0x0, sizeof(x1));
--        memset(&x2, 0x0, sizeof(x2));
--        memset(&x3, 0x0, sizeof(x3));
--
--        if (sizeof(pthread_t) == 4) {
--        
--          atomic_cas_32(&x1, x2, x3);
--        
--        } else if (sizeof(pthread_t) == 8) {
--        
--          atomic_cas_64(&x1, x2, x3);
--        
--        } else {
--        
--          return(1);
--        }
--
--	return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
--                [pthread_t can be used by solaris atomics])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
-   # this is needed to know which one of atomic_cas_32() or atomic_cas_64()
-   # to use in the source
-   AC_CHECK_SIZEOF([pthread_t], [], [#include <pthread.h>])
- 
--  # Check for x86 PAUSE instruction
--  AC_MSG_CHECKING(for x86 PAUSE instruction)
--  # We have to actually try running the test program, because of a bug
--  # in Solaris on x86_64, where it wrongly reports that PAUSE is not
--  # supported when trying to run an application. See
--  # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684
--  # We use ib_ prefix to avoid collisoins if this code is added to
--  # mysql's configure.in.
--  AC_TRY_RUN(
--    [
--      int main() {
--        __asm__ __volatile__ ("pause");
--        return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
-   ])
- 
- # vim: set ft=config:
-diff --git a/storage/xtradb/plug.in b/storage/xtradb/plug.in
-index 3fadacc..a33f4dc 100644
---- a/storage/xtradb/plug.in
-+++ b/storage/xtradb/plug.in
-@@ -56,215 +56,10 @@ MYSQL_PLUGIN_ACTIONS(xtradb,  [
-   esac
-   AC_SUBST(INNODB_DYNAMIC_CFLAGS)
- 
--  AC_MSG_CHECKING(whether GCC atomic builtins are available)
--  # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
--  AC_TRY_RUN(
--    [
--      int main()
--      {
--	long	x;
--	long	y;
--	long	res;
--	char	c;
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x, y);
--	if (!res || x != y) {
--          return(1);
--        }
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x + 1, y);
--	if (res || x != 10) {
--          return(1);
--        }
--
--	x = 10;
--	y = 123;
--	res = __sync_add_and_fetch(&x, y);
--	if (res != 123 + 10 || x != 123 + 10) {
--	  return(1);
--	}
--
--	c = 10;
--	res = __sync_lock_test_and_set(&c, 123);
--	if (res != 10 || c != 123) {
--	  return(1);
--	}
--	return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
--                [GCC atomic builtins are available])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
--  AC_MSG_CHECKING(whether GCC 64-bit atomic builtins are available)
--  # either define HAVE_IB_GCC_ATOMIC_BUILTINS_64 or not
--  AC_TRY_RUN(
--    [
--      #include <stdint.h>
--      int main()
--      {
--        int64_t x, y, res;
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x, y);
--	if (!res || x != y) {
--	  return(1);
--	}
--
--	x = 10;
--	y = 123;
--	res = __sync_add_and_fetch(&x, y);
--	if (res != 123 + 10 || x != 123 + 10) {
--	  return(1);
--	}
--
--	return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS_64], [1],
--                [GCC 64-bit atomic builtins are available])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
--  AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
--  # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
--  AC_TRY_RUN(
--    [
--      #include <pthread.h>
--      #include <string.h>
--
--      int main(int argc, char** argv) {
--        pthread_t       x1;
--        pthread_t       x2;
--        pthread_t       x3;
--
--	memset(&x1, 0x0, sizeof(x1));
--	memset(&x2, 0x0, sizeof(x2));
--	memset(&x3, 0x0, sizeof(x3));
--
--        __sync_bool_compare_and_swap(&x1, x2, x3);
--
--        return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
--                [pthread_t can be used by GCC atomic builtins])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
--  AC_MSG_CHECKING(whether Solaris libc atomic functions are available)
--  # Define HAVE_IB_SOLARIS_ATOMICS if _all_ of the following
--  # functions are present.
--  AC_CHECK_FUNCS(atomic_add_long_nv \
--		 atomic_cas_32 \
--		 atomic_cas_64 \
--		 atomic_cas_ulong \
--		 atomic_swap_uchar)
--
--  if test "${ac_cv_func_atomic_add_long_nv}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_32}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_64}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_ulong}" = "yes" -a \
--          "${ac_cv_func_atomic_swap_uchar}" = "yes" ; then
--
--    AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1],
--      [Define to 1 if Solaris libc atomic functions are available]
--    )
--  fi
--
--  AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions)
--  # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
--  AC_TRY_RUN(
--    [
--      #include <pthread.h>
--      #include <string.h>
--
--      int main(int argc, char** argv) {
--        pthread_t       x1;
--        pthread_t       x2;
--        pthread_t       x3;
--
--        memset(&x1, 0x0, sizeof(x1));
--        memset(&x2, 0x0, sizeof(x2));
--        memset(&x3, 0x0, sizeof(x3));
--
--        if (sizeof(pthread_t) == 4) {
--        
--          atomic_cas_32(&x1, x2, x3);
--        
--        } else if (sizeof(pthread_t) == 8) {
--        
--          atomic_cas_64(&x1, x2, x3);
--        
--        } else {
--        
--          return(1);
--        }
--
--	return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
--                [pthread_t can be used by solaris atomics])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
-   # this is needed to know which one of atomic_cas_32() or atomic_cas_64()
-   # to use in the source
-   AC_CHECK_SIZEOF([pthread_t], [], [#include <pthread.h>])
- 
--  # Check for x86 PAUSE instruction
--  AC_MSG_CHECKING(for x86 PAUSE instruction)
--  # We have to actually try running the test program, because of a bug
--  # in Solaris on x86_64, where it wrongly reports that PAUSE is not
--  # supported when trying to run an application. See
--  # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684
--  # We use ib_ prefix to avoid collisoins if this code is added to
--  # mysql's configure.in.
--  AC_TRY_RUN(
--    [
--      int main() {
--        __asm__ __volatile__ ("pause");
--        return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
-   ])
- 
- # vim: set ft=config:
diff --git a/meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch b/meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch
new file mode 100644
index 0000000..ff26b0b
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch
@@ -0,0 +1,18 @@
+Remove host path from include directories
+
+Naturally this breaks cross-compilation if present.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+--- mariadb-5.5.38/storage/tokudb/ft-index/CMakeLists.txt	2014-07-17 14:37:04.529327998 +0100
++++ mariadb-5.5.38/storage/tokudb/ft-index/CMakeLists.txt	2014-07-17 14:43:56.991337895 +0100
+@@ -39,7 +39,6 @@
+ 
+ ## default includes and libraries
+ include_directories(SYSTEM
+-  /usr/local/include
+   ${ZLIB_INCLUDE_DIRS}
+   )
+ 
diff --git a/meta-oe/recipes-support/mysql/mariadb/storage-forbids-absolute-addresses-on-IA-32.patch b/meta-oe/recipes-support/mysql/mariadb/storage-forbids-absolute-addresses-on-IA-32.patch
deleted file mode 100644
index 0530cd9..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/storage-forbids-absolute-addresses-on-IA-32.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-storage: forbids absolute addresses on IA-32
-
-The shared lib has relocations in .text
-...
-WARNING: QA Issue: ELF binary '/usr/lib/plugin/ha_xtradb.so.0.0.0' has relocations in .text
-WARNING: QA Issue: ELF binary '/usr/lib/plugin/ha_innodb_plugin.so.0.0.0' has relocations in .text
-...
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- storage/innodb_plugin/plug.in |    2 +-
- storage/xtradb/plug.in        |    2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/storage/innodb_plugin/plug.in b/storage/innodb_plugin/plug.in
---- a/storage/innodb_plugin/plug.in
-+++ b/storage/innodb_plugin/plug.in
-@@ -50,7 +50,7 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin,  [
- 		;;
- 	*86)
- 		# Use absolute addresses on IA-32
--		INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
-+		# INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
- 		;;
-   esac
-   AC_SUBST(INNODB_DYNAMIC_CFLAGS)
-diff --git a/storage/xtradb/plug.in b/storage/xtradb/plug.in
-index a33f4dc..4c186fd 100644
---- a/storage/xtradb/plug.in
-+++ b/storage/xtradb/plug.in
-@@ -51,7 +51,7 @@ MYSQL_PLUGIN_ACTIONS(xtradb,  [
- 		;;
- 	*86)
- 		# Use absolute addresses on IA-32
--		INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
-+		# INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
- 		;;
-   esac
-   AC_SUBST(INNODB_DYNAMIC_CFLAGS)
--- 
-1.7.9.5
-
diff --git a/meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch b/meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch
deleted file mode 100644
index 880c2a7..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-zlib: let lib dir configurable
-
-The zlib were found in $mysql_zlib_dir/lib, and the
-search will fail if zlib in $mysql_zlib_dir/lib64.
-
-Let lib dir configurable rather than hardcode.
-
-Upstream-Status: Pending
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- config/ac-macros/zlib.m4 | 12 ++++++------
- configure.in             |  8 ++++++++
- 2 files changed, 14 insertions(+), 6 deletions(-)
-
-diff --git a/config/ac-macros/zlib.m4 b/config/ac-macros/zlib.m4
---- a/config/ac-macros/zlib.m4
-+++ b/config/ac-macros/zlib.m4
-@@ -106,17 +106,17 @@ case $SYSTEM_TYPE in
-         ;;
-       *)
-         # Test for libz using all known library file endings
--        if test \( -f "$mysql_zlib_dir/lib/libz.a"  -o \
--                   -f "$mysql_zlib_dir/lib/libz.so" -o \
--                   -f "$mysql_zlib_dir/lib/libz.sl" -o \
--                   -f "$mysql_zlib_dir/lib/libz.dylib" \) \
-+        if test \( -f "$mysql_zlib_dir/$base_libdir/libz.a"  -o \
-+                   -f "$mysql_zlib_dir/$base_libdir/libz.so" -o \
-+                   -f "$mysql_zlib_dir/$base_libdir/libz.sl" -o \
-+                   -f "$mysql_zlib_dir/$base_libdir/libz.dylib" \) \
-                 -a -f "$mysql_zlib_dir/include/zlib.h"; then
-           ZLIB_INCLUDES="-I$mysql_zlib_dir/include"
--          ZLIB_LIBS="-L$mysql_zlib_dir/lib -lz"
-+          ZLIB_LIBS="-L$mysql_zlib_dir/$base_libdir -lz"
-           MYSQL_CHECK_ZLIB_DIR
-         fi
-         if test "x$mysql_cv_compress" != "xyes"; then 
--          AC_MSG_ERROR([headers or binaries were not found in $mysql_zlib_dir/{include,lib}])
-+          AC_MSG_ERROR([headers or binaries were not found in $mysql_zlib_dir/{include,$base_libdir}])
-         fi
-         ;;
-     esac
-diff --git a/configure.in b/configure.in
-index 2c6c08e..193b59a 100644
---- a/configure.in
-+++ b/configure.in
-@@ -104,6 +104,14 @@ AC_SUBST(SHARED_LIB_MAJOR_VERSION)
- AC_SUBST(SHARED_LIB_VERSION)
- AC_SUBST(AVAILABLE_LANGUAGES)
- 
-+AC_ARG_WITH([baselib-dir],
-+            AC_HELP_STRING([--baselib-dir=DIR],
-+                           [Provide MySQL with a custom location of
-+                           baselib dir. Given DIR, such as zlib binary is
-+                           assumed to be in $zlib-dir/$DIR.]),
-+            [base_libdir=${withval}],
-+            [base_libdir="lib"])
-+
- # Check whether a debug mode should be enabled.
- AC_ARG_WITH([debug],
-     AS_HELP_STRING([--with-debug@<:@=full@:>@],
--- 
-1.8.1.2
-
diff --git a/meta-oe/recipes-support/mysql/mariadb_5.1.67.bb b/meta-oe/recipes-support/mysql/mariadb_5.5.38.bb
similarity index 94%
rename from meta-oe/recipes-support/mysql/mariadb_5.1.67.bb
rename to meta-oe/recipes-support/mysql/mariadb_5.5.38.bb
index 6ad1fe6..3b5ad3c 100644
--- a/meta-oe/recipes-support/mysql/mariadb_5.1.67.bb
+++ b/meta-oe/recipes-support/mysql/mariadb_5.5.38.bb
@@ -1,5 +1,7 @@
 require ${PN}_${PV}.inc
 
+EXTRA_OECMAKE += "-DSTACK_DIRECTION=-1"
+
 DEPENDS += "mariadb-native ncurses zlib"
 
 PROVIDES += "mysql5"
diff --git a/meta-oe/recipes-support/mysql/mariadb_5.1.67.inc b/meta-oe/recipes-support/mysql/mariadb_5.5.38.inc
similarity index 68%
rename from meta-oe/recipes-support/mysql/mariadb_5.1.67.inc
rename to meta-oe/recipes-support/mysql/mariadb_5.5.38.inc
index 0c83c71..9cfd987 100644
--- a/meta-oe/recipes-support/mysql/mariadb_5.1.67.inc
+++ b/meta-oe/recipes-support/mysql/mariadb_5.5.38.inc
@@ -4,31 +4,21 @@ SECTION = "libs"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
-SRC_URI = "http://mirrors.coreix.net/mariadb/mariadb-${PV}/kvm-tarbake-jaunty-x86/mariadb-${PV}.tar.gz \
-           file://configure.in.patch \
-           file://plug.in.patch \
-           file://misc.m4.patch \
-           file://Makefile.am.patch \
-           file://fix_host_path.patch \
-           file://configure-ps-cache-check.patch \
-           file://fix-cve-2013-1861-1.patch \
-           file://fix-cve-2013-1861-2.patch \
-           file://zlib-let-libdir-configurable.patch \
-           file://storage-forbids-absolute-addresses-on-IA-32.patch \
+SRC_URI = "http://mirror.stshosting.co.uk/mariadb/mariadb-${PV}/source/mariadb-${PV}.tar.gz \
+           file://fix-cmake-module-path.patch \
+           file://remove-bad-path.patch \
+           file://fix-mysqlclient-r-version.patch \
            file://my.cnf \
-           file://mysqld.sh \
-           file://avoid-plugin-options-warnings.patch \
-           file://fix-link-error-ub1310.patch \
           "
 
-SRC_URI[md5sum] = "44c331fa91943155e4796f89e17a0612"
-SRC_URI[sha256sum] = "33471e9275c9b03919cabc38eb39f807d645adabf6a1a18f2e41ed73f47677c8"
+SRC_URI[md5sum] = "fa9ba00b084b95a45fab70860c412f10"
+SRC_URI[sha256sum] = "efc839e6627064b3b5c6c39854198f0d34907f48937804758d4c09c7717be8d3"
 
 S = "${WORKDIR}/mariadb-${PV}"
 
 BINCONFIG_GLOB = "mysql_config"
 
-inherit autotools-brokensep binconfig update-rc.d useradd
+inherit cmake gettext binconfig update-rc.d useradd
 
 INITSCRIPT_PACKAGES = "${PN}-server"
 INITSCRIPT_NAME = "mysqld"
@@ -38,29 +28,39 @@ USERADD_PACKAGES = "${PN}-server"
 USERADD_PARAM_${PN}-server = "--system --home-dir /var/mysql -g nogroup --shell /bin/false mysql"
 
 
-export ac_cv_path_PS="/bin/ps"
-export ac_cv_FIND_PROC="/bin/ps p \$\$PID | grep -v grep | grep mysqld > /dev/null"
-PARALLEL_MAKE = " "
 EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'"
-EXTRA_OECONF = "--with-atomic-ops=up \
-                --with-embedded-server \
-                --sysconfdir=/etc/mysql \
-                --localstatedir=/var/mysql \
-                --disable-dependency-tracking \
-                --without-debug \
-                --with-low-memory \
-                --without-query-cache \
-                --without-plugin-maria \
-                --without-man \
-                --without-docs \
-                --with-zlib-dir=${STAGING_EXECPREFIXDIR} \
-                --with-baselib-dir=${base_libdir} \
-                --with-pic \
-                "
 
-do_configure_append() {
-    sed -i /comp_err/d ${B}/sql/share/Makefile
+python __anonymous() {
+    # This is a pain but it's the only way to pass these in since
+    # MariaDB's cmake scripts insist on prepending the prefix to the
+    # specified values for INSTALL_*
+    localdata = d.createCopy()
+    localdata.setVar('prefix', '')
+    localdata.setVar('exec_prefix', '')
+    d.setVar('bindir_noprefix', localdata.getVar('bindir', True).lstrip('/'))
+    d.setVar('sbindir_noprefix', localdata.getVar('sbindir', True).lstrip('/'))
+    d.setVar('datadir_noprefix', localdata.getVar('datadir', True).lstrip('/'))
+    d.setVar('libdir_noprefix', localdata.getVar('libdir', True).lstrip('/'))
+}
+
+EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \
+                 -DWITH_JEMALLOC=no \
+                 -DWITHOUT_TOKUDB=true \
+                 -DWITH_PIC=ON \
+                 -DINSTALL_DOCDIR:PATH=${datadir_noprefix}/doc/${BPN} \
+                 -DINSTALL_BINDIR:PATH=${bindir_noprefix} \
+                 -DINSTALL_SBINDIR:PATH=${sbindir_noprefix} \
+                 -DINSTALL_SCRIPTDIR:PATH=${bindir_noprefix} \
+                 -DINSTALL_LIBDIR:PATH=${libdir_noprefix} \
+                 -DINSTALL_PLUGINDIR:PATH=${libdir_noprefix}/plugin \
+                 -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \
+                 -DINSTALL_MYSQLSHAREDIR:PATH=${datadir_noprefix}/mysql \
+                 -DINSTALL_SUPPORTFILESDIR:PATH=${datadir_noprefix}/mysql-support-files \
+                 -DMYSQL_DATADIR:PATH=/var/mysql \
+                 -DCAT_EXECUTABLE=`which cat` \
+                 -DCMAKE_AR:FILEPATH=${AR}"
 
+do_configure_append() {
     # handle distros with different values of ${libexecdir}
     libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'`
     sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysql_install_db.sh
@@ -68,6 +68,20 @@ do_configure_append() {
     sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysqld_safe.sh
 }
 
+do_generate_toolchain_file_append_class-native () {
+    # If these are set cmake will assume we're cross-compiling, which will
+    # result in certain things we want being disabled
+    sed -i "/set( CMAKE_SYSTEM_NAME/d" ${WORKDIR}/toolchain.cmake
+    sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake
+}
+
+do_compile_prepend_class-target () {
+    # These need to be in-tree or make will think they need to be built,
+    # and since we're cross-compiling that is disabled
+    cp ${STAGING_BINDIR_NATIVE}/comp_err ${S}/extra
+    cp ${STAGING_BINDIR_NATIVE}/comp_sql ${S}/scripts
+}
+
 SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess"
 
 # We need to append this so it runs *after* binconfig's preprocess function
@@ -82,13 +96,10 @@ mariadb_sysroot_preprocess () {
 
 do_install() {
     oe_runmake 'DESTDIR=${D}' install
-    mv -f ${D}${libdir}/mysql/* ${D}${libdir}
-    rmdir ${D}${libdir}/mysql
-    find ${D}${libdir} -name '*.la'|xargs sed -i 's#${libdir}/mysql#${libdir}#'
 
-    install -d ${D}/etc/init.d
-    install -m 0644 ${WORKDIR}/my.cnf ${D}/etc/
-    install -m 0755 ${WORKDIR}/mysqld.sh ${D}/etc/init.d/mysqld
+    install -d ${D}/${sysconfdir}/init.d
+    install -m 0644 ${WORKDIR}/my.cnf ${D}/${sysconfdir}/
+    mv ${D}/${sysconfdir}/init.d/mysql ${D}/${sysconfdir}/init.d/mysqld
 }
 
 pkg_postinst_${PN}-server () {
@@ -102,7 +113,7 @@ pkg_postinst_${PN}-server () {
     mkdir /var/lib/mysql
     chown mysql.nogroup /var/lib/mysql
 
-    mysql_install_db
+    mysql_install_db --basedir=${prefix} --user=mysql
 
 }
 
@@ -130,19 +141,14 @@ RDEPENDS_${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-modu
     perl-module-io-socket-inet perl-module-io-select"
 
 FILES_libmysqlclient = "\
-    ${libdir}/libmysqlclient.so.* \
-    ${libdir}/plugin/*.so.*"
+    ${libdir}/libmysqlclient.so.*"
 FILES_libmysqlclient-dev = " \
     ${includedir}/mysql/ \
     ${libdir}/libmysqlclient.so \
-    ${libdir}/libmysqlclient.la \
-    ${libdir}/plugin/*.so \
-    ${libdir}/plugin/*.la \
     ${sysconfdir}/aclocal \
     ${bindir}/mysql_config"
 FILES_libmysqlclient-staticdev = "\
-    ${libdir}/*.a \
-    ${libdir}/plugin/*.a"
+    ${libdir}/*.a"
 FILES_libmysqlclient-dbg = "${libdir}/plugin/.debug/ \
     /usr/mysql-test/lib/My/SafeProcess/.debug/my_safe_process"
 
@@ -153,8 +159,7 @@ INSANE_SKIP_libmysqlclient_append_i586 = " textrel"
 
 FILES_libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*"
 FILES_libmysqlclient-r-dev = "\
-    ${libdir}/libmysqlclient_r.so \
-    ${libdir}/libmysqlclient_r.la"
+    ${libdir}/libmysqlclient_r.so"
 FILES_libmysqlclient-r-staticdev = "${libdir}/libmysqlclient_r.a"
 FILES_libmysqlclient-r-dbg = "${libdir}/plugin/.debuglibmysqlclient_r.so.*"
 
@@ -199,6 +204,7 @@ FILES_${PN}-server = "\
     ${bindir}/mysql_setpermission \
     ${bindir}/mysql_tzinfo_to_sql \
     ${bindir}/mysql_upgrade \
+    ${bindir}/mysql_plugin \
     ${bindir}/mysql_zap \
     ${bindir}/mysqlbinlog \
     ${bindir}/mysqld_multi \
@@ -225,6 +231,7 @@ FILES_${PN}-server = "\
     ${sbindir}/ndb_cpcd \
     ${sbindir}/ndbd \
     ${sbindir}/ndb_mgmd \
+    ${libdir}/plugin/*.so \
     ${datadir}/mysql/ \
     ${localstatedir}/mysql/ \
     ${sysconfdir}/init.d \
-- 
1.9.3



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

* Re: [meta-oe][PATCH 5/5] mariadb: update to 5.5.38
  2014-08-05 13:20 ` [meta-oe][PATCH 5/5] mariadb: update to 5.5.38 Paul Eggleton
@ 2014-08-06 19:22   ` Martin Jansa
  2014-08-07 13:31     ` [meta-oe][PATCH v2] " Paul Eggleton
  0 siblings, 1 reply; 14+ messages in thread
From: Martin Jansa @ 2014-08-06 19:22 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 5447 bytes --]

On Tue, Aug 05, 2014 at 02:20:46PM +0100, Paul Eggleton wrote:
> * Upstream switched from autotools to cmake
> * Separate build dir and parallel make now work
> * Library versioning no longer used for plugins; other libtool cruft
>   gone
> * Proper upstream initscript
> * Plugins moved from client library package to mariadb-server package
>   (matches how Fedora packages these)
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
>  ...b-native_5.1.67.bb => mariadb-native_5.5.38.bb} |   5 +-
>  .../mysql/mariadb/Makefile.am.patch                |  19 -
>  .../mariadb/avoid-plugin-options-warnings.patch    |  17 -
>  .../mysql/mariadb/configure-ps-cache-check.patch   |  27 --
>  .../mysql/mariadb/configure.in.patch               |  13 -
>  .../mysql/mariadb/fix-cmake-module-path.patch      |  29 ++
>  .../mysql/mariadb/fix-cve-2013-1861-1.patch        | 174 ---------
>  .../mysql/mariadb/fix-cve-2013-1861-2.patch        | 257 -------------
>  .../mysql/mariadb/fix-link-error-ub1310.patch      |  37 --
>  .../mysql/mariadb/fix-mysqlclient-r-version.patch  | 161 ++++++++
>  .../mysql/mariadb/fix_host_path.patch              |  37 --
>  .../recipes-support/mysql/mariadb/misc.m4.patch    |  13 -
>  meta-oe/recipes-support/mysql/mariadb/my.cnf       |   1 +
>  meta-oe/recipes-support/mysql/mariadb/mysqld.sh    |  24 --
>  .../recipes-support/mysql/mariadb/plug.in.patch    | 405 ---------------------
>  .../mysql/mariadb/remove-bad-path.patch            |  18 +
>  ...orage-forbids-absolute-addresses-on-IA-32.patch |  44 ---
>  .../mariadb/zlib-let-libdir-configurable.patch     |  63 ----
>  .../mysql/{mariadb_5.1.67.bb => mariadb_5.5.38.bb} |   2 +
>  .../{mariadb_5.1.67.inc => mariadb_5.5.38.inc}     | 113 +++---
>  20 files changed, 273 insertions(+), 1186 deletions(-)
>  rename meta-oe/recipes-support/mysql/{mariadb-native_5.1.67.bb => mariadb-native_5.5.38.bb} (71%)
>  delete mode 100644 meta-oe/recipes-support/mysql/mariadb/Makefile.am.patch
>  delete mode 100644 meta-oe/recipes-support/mysql/mariadb/avoid-plugin-options-warnings.patch
>  delete mode 100644 meta-oe/recipes-support/mysql/mariadb/configure-ps-cache-check.patch
>  delete mode 100644 meta-oe/recipes-support/mysql/mariadb/configure.in.patch
>  create mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch
>  delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-1.patch
>  delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-2.patch
>  delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-link-error-ub1310.patch
>  create mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch
>  delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix_host_path.patch
>  delete mode 100644 meta-oe/recipes-support/mysql/mariadb/misc.m4.patch
>  delete mode 100644 meta-oe/recipes-support/mysql/mariadb/mysqld.sh
>  delete mode 100644 meta-oe/recipes-support/mysql/mariadb/plug.in.patch
>  create mode 100644 meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch
>  delete mode 100644 meta-oe/recipes-support/mysql/mariadb/storage-forbids-absolute-addresses-on-IA-32.patch
>  delete mode 100644 meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch
>  rename meta-oe/recipes-support/mysql/{mariadb_5.1.67.bb => mariadb_5.5.38.bb} (94%)
>  rename meta-oe/recipes-support/mysql/{mariadb_5.1.67.inc => mariadb_5.5.38.inc} (68%)

We've already discussed this on IRC, here is more details:

19:08:49 < JaMa> bluelightning: ping, mariadb is failing here (when building after world, not with minimal deps):
19:08:51 < JaMa> mariadb/5.5.38-r0/build'
19:08:51 < JaMa> | make -f dbug/CMakeFiles/t.dir/build.make dbug/CMakeFiles/t.dir/build
19:08:51 < JaMa> | ./factorial: 1: ./factorial: Syntax error: word unexpected (expecting ")")
19:08:51 < JaMa> | make[2]: *** [dbug/output1.r] Error 2
19:09:05 < JaMa> bluelightning: have you seen something like that before in your builds?
19:09:14 < bluelightning> I haven't, no
19:09:29 < bluelightning> I wonder what triggers it...
19:10:16 < JaMa> I would compare log.do_configure to see what's new, but both TMPDIRs are already gone so it will take some time
19:11:24 < bluelightning> hmm, ok... well I'm happy to hold until we figure out where the issue is

Failing version autodetected boost:
$ diff -uNr temp/log.do_configure
--- mariadb/5.5.38-r0/temp/log.do_configure.fail 2014-08-06 11:44:44.426248399 -0700
+++ mariadb/5.5.38-r0/temp/log.do_configure.ok   2014-08-06 11:57:23.110273393 -0700
@@ -727,9 +727,7 @@
 -- Looking for io_queue_init in aio - not found
 -- Check size of pthread_t
 -- Check size of pthread_t - done
--- Boost version: 1.55.0
--- Performing Test BOOST_OK
--- Performing Test BOOST_OK - Failed
+-- Could NOT find Boost
 -- Looking for include file netdb.h
 -- Looking for include file netdb.h - found
 -- Looking for include file security/pam_appl.h

Maybe that's not the only difference. Let me know if you can reproduce the issue after building boost before mariadb.

When it doesn't fail, it also reports some more autodetected dependencies:
WARNING: QA Issue: mariadb-client rdepends on readline but its not a build dependency? [build-deps]
WARNING: QA Issue: mariadb-leftovers rdepends on readline but its not a build dependency? [build-deps]

Regards,

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* [meta-oe][PATCH v2] mariadb: update to 5.5.38
  2014-08-06 19:22   ` Martin Jansa
@ 2014-08-07 13:31     ` Paul Eggleton
  2014-08-08  0:45       ` Martin Jansa
  0 siblings, 1 reply; 14+ messages in thread
From: Paul Eggleton @ 2014-08-07 13:31 UTC (permalink / raw)
  To: openembedded-devel

* Upstream switched from autotools to cmake
* Separate build dir and parallel make now work
* Library versioning no longer used for plugins; other libtool cruft
  gone
* Proper upstream initscript
* Plugins moved from client library package to mariadb-server package
  (matches how Fedora packages these)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---

Changes since v1:
* Add readline and libaio to DEPENDS
* Disable usage of boost

(Also updated on the branch)

 ...b-native_5.1.67.bb => mariadb-native_5.5.38.bb} |   5 +-
 .../mysql/mariadb/Makefile.am.patch                |  19 -
 .../mariadb/avoid-plugin-options-warnings.patch    |  17 -
 .../mysql/mariadb/configure-ps-cache-check.patch   |  27 --
 .../mysql/mariadb/configure.in.patch               |  13 -
 .../mysql/mariadb/fix-cmake-module-path.patch      |  29 ++
 .../mysql/mariadb/fix-cve-2013-1861-1.patch        | 174 ---------
 .../mysql/mariadb/fix-cve-2013-1861-2.patch        | 257 -------------
 .../mysql/mariadb/fix-link-error-ub1310.patch      |  37 --
 .../mysql/mariadb/fix-mysqlclient-r-version.patch  | 161 ++++++++
 .../mysql/mariadb/fix_host_path.patch              |  37 --
 .../recipes-support/mysql/mariadb/misc.m4.patch    |  13 -
 meta-oe/recipes-support/mysql/mariadb/my.cnf       |   1 +
 meta-oe/recipes-support/mysql/mariadb/mysqld.sh    |  24 --
 .../recipes-support/mysql/mariadb/plug.in.patch    | 405 ---------------------
 .../mysql/mariadb/remove-bad-path.patch            |  18 +
 ...orage-forbids-absolute-addresses-on-IA-32.patch |  44 ---
 .../mariadb/zlib-let-libdir-configurable.patch     |  63 ----
 .../mysql/{mariadb_5.1.67.bb => mariadb_5.5.38.bb} |   4 +-
 .../{mariadb_5.1.67.inc => mariadb_5.5.38.inc}     | 114 +++---
 20 files changed, 275 insertions(+), 1187 deletions(-)
 rename meta-oe/recipes-support/mysql/{mariadb-native_5.1.67.bb => mariadb-native_5.5.38.bb} (71%)
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/Makefile.am.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/avoid-plugin-options-warnings.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/configure-ps-cache-check.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/configure.in.patch
 create mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-1.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-2.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-link-error-ub1310.patch
 create mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix_host_path.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/misc.m4.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/mysqld.sh
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/plug.in.patch
 create mode 100644 meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/storage-forbids-absolute-addresses-on-IA-32.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch
 rename meta-oe/recipes-support/mysql/{mariadb_5.1.67.bb => mariadb_5.5.38.bb} (86%)
 rename meta-oe/recipes-support/mysql/{mariadb_5.1.67.inc => mariadb_5.5.38.inc} (67%)

diff --git a/meta-oe/recipes-support/mysql/mariadb-native_5.1.67.bb b/meta-oe/recipes-support/mysql/mariadb-native_5.5.38.bb
similarity index 71%
rename from meta-oe/recipes-support/mysql/mariadb-native_5.1.67.bb
rename to meta-oe/recipes-support/mysql/mariadb-native_5.5.38.bb
index 942afcc..9148dee 100644
--- a/meta-oe/recipes-support/mysql/mariadb-native_5.1.67.bb
+++ b/meta-oe/recipes-support/mysql/mariadb-native_5.5.38.bb
@@ -7,14 +7,13 @@ DEPENDS = "ncurses-native zlib-native"
 RDEPENDS_${PN} = ""
 PACKAGES = ""
 EXTRA_OEMAKE = ""
-EXTRA_OECONF = " --with-embedded-server "
 
 do_install() {
     oe_runmake 'DESTDIR=${D}' install
-    mv -f ${D}${libdir}/mysql/* ${D}${libdir}
-    rmdir ${D}${libdir}/mysql
 
     install -d ${D}${bindir}
     install -m 0755 sql/gen_lex_hash ${D}${bindir}/
+    install -m 0755 extra/comp_err ${D}${bindir}/
+    install -m 0755 scripts/comp_sql ${D}${bindir}/
 }
 
diff --git a/meta-oe/recipes-support/mysql/mariadb/Makefile.am.patch b/meta-oe/recipes-support/mysql/mariadb/Makefile.am.patch
deleted file mode 100644
index 33fd17a..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/Makefile.am.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: mysql-5.1.40/sql/Makefile.am
-===================================================================
---- mysql-5.1.40.orig/sql/Makefile.am
-+++ mysql-5.1.40/sql/Makefile.am
-@@ -174,10 +174,10 @@ link_sources:
- # This generates lex_hash.h
- # NOTE Built sources should depend on their sources not the tool
- # this avoid the rebuild of the built files in a source dist
--lex_hash.h:	gen_lex_hash.cc lex.h
--		$(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
--		./gen_lex_hash$(EXEEXT) > $@-t
--		$(MV) $@-t $@
-+GEN_LEX_HASH = ./gen_lex_hash$(EXEEXT)
-+
-+lex_hash.h:	gen_lex_hash$(EXEEXT)
-+		$(GEN_LEX_HASH) > $@
- 
- # For testing of udf_example.so
- udf_example_la_SOURCES= udf_example.c
diff --git a/meta-oe/recipes-support/mysql/mariadb/avoid-plugin-options-warnings.patch b/meta-oe/recipes-support/mysql/mariadb/avoid-plugin-options-warnings.patch
deleted file mode 100644
index 84ff6f0..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/avoid-plugin-options-warnings.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Tell autoconf about with-plugin option to avoid warnings like:
-configure: WARNING: unrecognized options: --with-plugin-maria
-
-Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-
-Index: mariadb-5.1.67/config/ac-macros/plugins.m4
-===================================================================
---- mariadb-5.1.67.orig/config/ac-macros/plugins.m4
-+++ mariadb-5.1.67/config/ac-macros/plugins.m4
-@@ -38,6 +38,7 @@ AC_DEFUN([_MYSQL_PLUGIN],[
-   _MYSQL_PLUGAPPEND([__mysql_plugin_list__],[$1])
-   m4_define([MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]), [$3])
-   m4_define([MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]), [$4])
-+  m4_ifdef([_AC_ENABLE_IF], [_AC_ENABLE_IF([with],[plugin-$1])])
-   _MYSQL_PLUGAPPEND_META([$1], $5)
-   ifelse(m4_bregexp(__mysql_include__,[/plug\.in$]),-1,[],[
-      MYSQL_PLUGIN_DIRECTORY([$1],
diff --git a/meta-oe/recipes-support/mysql/mariadb/configure-ps-cache-check.patch b/meta-oe/recipes-support/mysql/mariadb/configure-ps-cache-check.patch
deleted file mode 100644
index 3b5b3fd..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/configure-ps-cache-check.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Index: mysql-4.1.22/configure.in
-===================================================================
---- mysql-4.1.22.orig/configure.in	2009-01-28 16:33:28.000000000 +0000
-+++ mysql-4.1.22/configure.in	2009-01-28 16:43:26.000000000 +0000
-@@ -471,8 +471,8 @@
- 
- # Lock for PS
- AC_PATH_PROG(PS, ps, ps)
--AC_MSG_CHECKING("how to check if pid exists")
--PS=$ac_cv_path_PS
-+AC_CACHE_CHECK([how to check if pid exists], [ac_cv_FIND_PROC],
-+[
- # Linux style
- if $PS p $$ 2> /dev/null | grep $0 > /dev/null
- then
-@@ -511,8 +511,9 @@
-       AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
-   esac
- fi
--AC_SUBST(FIND_PROC)
--AC_MSG_RESULT("$FIND_PROC")
-+ac_cv_FIND_PROC="$FIND_PROC"
-+])
-+AC_SUBST([FIND_PROC], [$ac_cv_FIND_PROC])
- 
- # Check if a pid is valid
- AC_PATH_PROG(KILL, kill, kill)
diff --git a/meta-oe/recipes-support/mysql/mariadb/configure.in.patch b/meta-oe/recipes-support/mysql/mariadb/configure.in.patch
deleted file mode 100644
index 6fe2dfa..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/configure.in.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: mysql-5.1.40/configure.in
-===================================================================
---- mysql-5.1.40.orig/configure.in
-+++ mysql-5.1.40/configure.in
-@@ -226,8 +226,6 @@ else
-   AC_PATH_PROG(AS, as, as)
- fi
- 
--# Still need ranlib for readline; local static use only so no libtool.
--AC_PROG_RANLIB
- # We use libtool
- #AC_LIBTOOL_WIN32_DLL
- AC_PROG_LIBTOOL
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch b/meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch
new file mode 100644
index 0000000..8d9f558
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch
@@ -0,0 +1,29 @@
+Avoid CMAKE_MODULE_PATH being overwritten
+
+OE-Core's setting of CMAKE_MODULE_PATH stomps on MariaDB's value unless
+we set it after setting the project name.
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+Upstream-Status: Inappropriate [working around OE-Core bug]
+
+--- mariadb/CMakeLists.txt	2014-07-17 11:01:07.676353047 +0100
++++ mariadb/CMakeLists.txt	2014-07-17 11:01:31.299353107 +0100
+@@ -28,8 +28,6 @@
+ 
+ MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}")
+ 
+-SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
+-
+ # Distinguish between community and non-community builds, with the
+ # default being a community build. This does not impact the feature
+ # set that will be compiled in; it's merely provided as a hint to
+@@ -77,6 +75,8 @@
+ ENDIF()
+ PROJECT(${MYSQL_PROJECT_NAME})
+ 
++SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
++
+ IF(BUILD_CONFIG)
+   INCLUDE(
+   ${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-1.patch b/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-1.patch
deleted file mode 100644
index df2e708..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-1.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From 24404044ad4c28026e400e1fcd85358f2060aa96 Mon Sep 17 00:00:00 2001
-From: Alexey Botchkov <holyfoot@askmonty.org>
-Date: Sun, 10 Mar 2013 23:08:05 +0400
-Subject: [PATCH] MDEV-4252 geometry query crashes server.       The bug was
- found by Alyssa Milburn.       If the number of points of a geometry feature
- read from       binary representation is greater than 0x10000000, then      
- the (uint32) (num_points * 16) will cut the higher byte,       which leads to
- various errors.       Fixed by additional check if (num_points >
- max_n_points).
-
-Upstream-Status: Backport
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
----
- mysql-test/r/gis.result |  3 +++
- mysql-test/t/gis.test   |  1 +
- sql/spatial.cc          | 27 ++++++++++++++++++---------
- sql/spatial.h           |  9 +++++----
- 4 files changed, 27 insertions(+), 13 deletions(-)
-
-diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
-index 8dad72f..69e73d0 100644
---- a/mysql-test/r/gis.result
-+++ b/mysql-test/r/gis.result
-@@ -1087,4 +1087,7 @@ NULL
- #
- SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
- ERROR 22007: Illegal non geometric '' value found during parsing
-+select astext(0x0100000000030000000100000000000010);
-+astext(0x0100000000030000000100000000000010)
-+NULL
- End of 5.1 tests
-diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
-index abda3e9..cc5d158 100644
---- a/mysql-test/t/gis.test
-+++ b/mysql-test/t/gis.test
-@@ -826,5 +826,6 @@ SELECT ISCLOSED(CONVERT(CONCAT('     ', 0x2), BINARY(20)));
- --error ER_ILLEGAL_VALUE_FOR_TYPE
- SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
- 
-+select astext(0x0100000000030000000100000000000010);
- 
- --echo End of 5.1 tests
-diff --git a/sql/spatial.cc b/sql/spatial.cc
-index eec028e..94d0238 100644
---- a/sql/spatial.cc
-+++ b/sql/spatial.cc
-@@ -556,7 +556,7 @@ bool Gis_line_string::get_data_as_wkt(String *txt, const char **end) const
-   n_points= uint4korr(data);
-   data += 4;
- 
--  if (n_points < 1 ||
-+  if (n_points < 1 || n_points > max_n_points ||
-       no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points) ||
-       txt->reserve(((MAX_DIGITS_IN_DOUBLE + 1)*2 + 1) * n_points))
-     return 1;
-@@ -594,7 +594,8 @@ int Gis_line_string::geom_length(double *len) const
-     return 1;
-   n_points= uint4korr(data);
-   data+= 4;
--  if (n_points < 1 || no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points))
-+  if (n_points < 1 || n_points > max_n_points ||
-+      no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points))
-     return 1;
- 
-   get_point(&prev_x, &prev_y, data);
-@@ -628,7 +629,7 @@ int Gis_line_string::is_closed(int *closed) const
-     return 0;
-   }
-   data+= 4;
--  if (n_points == 0 ||
-+  if (n_points == 0 || n_points > max_n_points ||
-       no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points))
-     return 1;
- 
-@@ -798,7 +799,8 @@ bool Gis_polygon::get_data_as_wkt(String *txt, const char **end) const
-       return 1;
-     n_points= uint4korr(data);
-     data+= 4;
--    if (no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points) ||
-+    if (n_points > max_n_points ||
-+        no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points) ||
- 	txt->reserve(2 + ((MAX_DIGITS_IN_DOUBLE + 1) * 2 + 1) * n_points))
-       return 1;
-     txt->qs_append('(');
-@@ -852,7 +854,8 @@ int Gis_polygon::area(double *ar, const char **end_of_data) const
-     if (no_data(data, 4))
-       return 1;
-     n_points= uint4korr(data);
--    if (no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points))
-+    if (n_points > max_n_points ||
-+        no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points))
-       return 1;
-     get_point(&prev_x, &prev_y, data+4);
-     data+= (4+SIZEOF_STORED_DOUBLE*2);
-@@ -888,7 +891,8 @@ int Gis_polygon::exterior_ring(String *result) const
-   n_points= uint4korr(data);
-   data+= 4;
-   length= n_points * POINT_DATA_SIZE;
--  if (no_data(data, length) || result->reserve(1+4+4+ length))
-+  if (n_points > max_n_points ||
-+      no_data(data, length) || result->reserve(1+4+4+ length))
-     return 1;
- 
-   result->q_append((char) wkb_ndr);
-@@ -973,7 +977,8 @@ int Gis_polygon::centroid_xy(double *x, double *y) const
-       return 1;
-     org_n_points= n_points= uint4korr(data);
-     data+= 4;
--    if (no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points))
-+    if (n_points > max_n_points ||
-+        no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points))
-       return 1;
-     get_point(&prev_x, &prev_y, data);
-     data+= (SIZEOF_STORED_DOUBLE*2);
-@@ -1260,7 +1265,8 @@ bool Gis_multi_line_string::get_data_as_wkt(String *txt,
-       return 1;
-     n_points= uint4korr(data + WKB_HEADER_SIZE);
-     data+= WKB_HEADER_SIZE + 4;
--    if (no_data(data, n_points * (SIZEOF_STORED_DOUBLE*2)) ||
-+    if (n_points > max_n_points ||
-+        no_data(data, n_points * (SIZEOF_STORED_DOUBLE*2)) ||
- 	txt->reserve(2 + ((MAX_DIGITS_IN_DOUBLE + 1) * 2 + 1) * n_points))
-       return 1;
-     txt->qs_append('(');
-@@ -1521,7 +1527,8 @@ bool Gis_multi_polygon::get_data_as_wkt(String *txt, const char **end) const
-         return 1;
-       uint32 n_points= uint4korr(data);
-       data+= 4;
--      if (no_data(data, (SIZEOF_STORED_DOUBLE * 2) * n_points) ||
-+      if (n_points > max_n_points ||
-+          no_data(data, (SIZEOF_STORED_DOUBLE * 2) * n_points) ||
- 	  txt->reserve(2 + ((MAX_DIGITS_IN_DOUBLE + 1) * 2 + 1) * n_points,
- 		       512))
- 	return 1;
-@@ -1604,6 +1611,8 @@ int Gis_multi_polygon::geometry_n(uint32 num, String *result) const
-       if (no_data(data, 4))
- 	return 1;
-       n_points= uint4korr(data);
-+      if (n_points > max_n_points)
-+        return 1;
-       data+= 4 + POINT_DATA_SIZE * n_points;
-     }
-   } while (--num);
-diff --git a/sql/spatial.h b/sql/spatial.h
-index 20b3856..7d25425 100644
---- a/sql/spatial.h
-+++ b/sql/spatial.h
-@@ -197,6 +197,11 @@ struct MBR
- class Geometry
- {
- public:
-+  // Maximum number of points in feature that can fit into String
-+  static const uint32 max_n_points=
-+    (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
-+    POINT_DATA_SIZE;
-+public:
-   Geometry() {}                               /* Remove gcc warning */
-   virtual ~Geometry() {}                        /* Remove gcc warning */
-   static void *operator new(size_t size, void *buffer)
-@@ -379,10 +384,6 @@ class Gis_point: public Geometry
- 
- class Gis_line_string: public Geometry
- {
--  // Maximum number of points in LineString that can fit into String
--  static const uint32 max_n_points=
--    (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
--    POINT_DATA_SIZE;
- public:
-   Gis_line_string() {}                        /* Remove gcc warning */
-   virtual ~Gis_line_string() {}               /* Remove gcc warning */
--- 
-1.8.1.6
-
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-2.patch b/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-2.patch
deleted file mode 100644
index c35cdfb..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-2.patch
+++ /dev/null
@@ -1,257 +0,0 @@
-From 9f714cdd3bf4bd8ee06cd38dcd2c6e8990a4ec48 Mon Sep 17 00:00:00 2001
-From: Alexey Botchkov <holyfoot@askmonty.org>
-Date: Mon, 18 Mar 2013 17:58:00 +0400
-Subject: [PATCH] MDEV-4252 geometry query crashes server.     Additional fixes
- for possible overflows in length-related     calculations in 'spatial'
- implementations.     Checks added to the ::get_data_size() methods.    
- max_n_points decreased to occupy less 2G size. An     object of that size is
- practically inoperable anyway.
-
-Upstream-Status: Backport
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
----
- mysql-test/r/gis.result | 12 +++++++++
- mysql-test/t/gis.test   |  6 +++++
- sql/spatial.cc          | 67 ++++++++++++++++++++++++++++++++++---------------
- sql/spatial.h           |  2 +-
- 4 files changed, 66 insertions(+), 21 deletions(-)
-
-diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
-index 69e73d0..7566f0b 100644
---- a/mysql-test/r/gis.result
-+++ b/mysql-test/r/gis.result
-@@ -1087,7 +1087,19 @@ NULL
- #
- SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
- ERROR 22007: Illegal non geometric '' value found during parsing
-+#
-+# MDEV-4252 geometry query crashes server
-+#
- select astext(0x0100000000030000000100000000000010);
- astext(0x0100000000030000000100000000000010)
- NULL
-+select envelope(0x0100000000030000000100000000000010);
-+envelope(0x0100000000030000000100000000000010)
-+NULL
-+select geometryn(0x0100000000070000000100000001030000000200000000000000ffff0000, 1);
-+geometryn(0x0100000000070000000100000001030000000200000000000000ffff0000, 1)
-+NULL
-+select geometryn(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1);
-+geometryn(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1)
-+NULL
- End of 5.1 tests
-diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
-index cc5d158..c42541e 100644
---- a/mysql-test/t/gis.test
-+++ b/mysql-test/t/gis.test
-@@ -826,6 +826,12 @@ SELECT ISCLOSED(CONVERT(CONCAT('     ', 0x2), BINARY(20)));
- --error ER_ILLEGAL_VALUE_FOR_TYPE
- SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
- 
-+--echo #
-+--echo # MDEV-4252 geometry query crashes server
-+--echo #
- select astext(0x0100000000030000000100000000000010);
-+select envelope(0x0100000000030000000100000000000010);
-+select geometryn(0x0100000000070000000100000001030000000200000000000000ffff0000, 1);
-+select geometryn(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1);
- 
- --echo End of 5.1 tests
-diff --git a/sql/spatial.cc b/sql/spatial.cc
-index 94d0238..5a4b768 100644
---- a/sql/spatial.cc
-+++ b/sql/spatial.cc
-@@ -394,18 +394,19 @@ const char *Geometry::append_points(String *txt, uint32 n_points,
- const char *Geometry::get_mbr_for_points(MBR *mbr, const char *data,
- 					 uint offset) const
- {
--  uint32 points;
-+  uint32 n_points;
-   /* read number of points */
-   if (no_data(data, 4))
-     return 0;
--  points= uint4korr(data);
-+  n_points= uint4korr(data);
-   data+= 4;
- 
--  if (no_data(data, (SIZEOF_STORED_DOUBLE * 2 + offset) * points))
-+  if (n_points > max_n_points ||
-+      no_data(data, (POINT_DATA_SIZE + offset) * n_points))
-     return 0;
- 
-   /* Calculate MBR for points */
--  while (points--)
-+  while (n_points--)
-   {
-     data+= offset;
-     mbr->add_xy(data, data + SIZEOF_STORED_DOUBLE);
-@@ -484,9 +485,12 @@ const Geometry::Class_info *Gis_point::get_class_info() const
- 
- uint32 Gis_line_string::get_data_size() const 
- {
--  if (no_data(m_data, 4))
-+  uint32 n_points, size;
-+  if (no_data(m_data, 4) ||
-+      (n_points= uint4korr(m_data)) > max_n_points ||
-+      no_data(m_data, (size= 4 + n_points * POINT_DATA_SIZE)))
-     return GET_SIZE_ERROR;
--  return 4 + uint4korr(m_data) * POINT_DATA_SIZE;
-+  return size;
- }
- 
- 
-@@ -665,6 +669,9 @@ int Gis_line_string::end_point(String *result) const
-   if (no_data(m_data, 4))
-     return 1;
-   n_points= uint4korr(m_data);
-+  if (n_points == 0 || n_points > max_n_points ||
-+      no_data(m_data, POINT_DATA_SIZE * n_points))
-+    return 1;
-   return create_point(result, m_data + 4 + (n_points - 1) * POINT_DATA_SIZE);
- }
- 
-@@ -674,11 +681,14 @@ int Gis_line_string::point_n(uint32 num, String *result) const
-   uint32 n_points;
-   if (no_data(m_data, 4))
-     return 1;
-+  num--;
-   n_points= uint4korr(m_data);
--  if ((uint32) (num - 1) >= n_points) // means (num > n_points || num < 1)
-+  if (num >= n_points ||
-+      num > max_n_points || // means (num > n_points || num < 1)
-+      no_data(m_data, num * POINT_DATA_SIZE))
-     return 1;
- 
--  return create_point(result, m_data + 4 + (num - 1) * POINT_DATA_SIZE);
-+  return create_point(result, m_data + 4 + num*POINT_DATA_SIZE);
- }
- 
- const Geometry::Class_info *Gis_line_string::get_class_info() const
-@@ -692,6 +702,7 @@ const Geometry::Class_info *Gis_line_string::get_class_info() const
- uint32 Gis_polygon::get_data_size() const 
- {
-   uint32 n_linear_rings;
-+  uint32 n_points;
-   const char *data= m_data;
- 
-   if (no_data(data, 4))
-@@ -701,10 +712,13 @@ uint32 Gis_polygon::get_data_size() const
- 
-   while (n_linear_rings--)
-   {
--    if (no_data(data, 4))
-+    if (no_data(data, 4) ||
-+        (n_points= uint4korr(data)) > max_n_points)
-       return GET_SIZE_ERROR;
--    data+= 4 + uint4korr(data)*POINT_DATA_SIZE;
-+    data+= 4 + n_points*POINT_DATA_SIZE;
-   }
-+  if (no_data(data, 0))
-+    return GET_SIZE_ERROR;
-   return (uint32) (data - m_data);
- }
- 
-@@ -1037,9 +1051,14 @@ const Geometry::Class_info *Gis_polygon::get_class_info() const
- 
- uint32 Gis_multi_point::get_data_size() const 
- {
--  if (no_data(m_data, 4))
--    return GET_SIZE_ERROR;
--  return 4 + uint4korr(m_data)*(POINT_DATA_SIZE + WKB_HEADER_SIZE);
-+  uint32 n_points;
-+  uint32 size;
-+
-+  if (no_data(m_data, 4) ||
-+      (n_points= uint4korr(m_data)) > max_n_points ||
-+      no_data(m_data, (size= 4 + n_points*(POINT_DATA_SIZE + WKB_HEADER_SIZE))))
-+     return GET_SIZE_ERROR;
-+  return size;
- }
- 
- 
-@@ -1107,7 +1126,8 @@ bool Gis_multi_point::get_data_as_wkt(String *txt, const char **end) const
-     return 1;
- 
-   n_points= uint4korr(m_data);
--  if (no_data(m_data+4,
-+  if (n_points > max_n_points ||
-+      no_data(m_data+4,
- 	      n_points * (SIZEOF_STORED_DOUBLE * 2 + WKB_HEADER_SIZE)) ||
-       txt->reserve(((MAX_DIGITS_IN_DOUBLE + 1) * 2 + 1) * n_points))
-     return 1;
-@@ -1160,6 +1180,7 @@ const Geometry::Class_info *Gis_multi_point::get_class_info() const
- uint32 Gis_multi_line_string::get_data_size() const 
- {
-   uint32 n_line_strings;
-+  uint32 n_points;
-   const char *data= m_data;
- 
-   if (no_data(data, 4))
-@@ -1169,11 +1190,13 @@ uint32 Gis_multi_line_string::get_data_size() const
- 
-   while (n_line_strings--)
-   {
--    if (no_data(data, WKB_HEADER_SIZE + 4))
-+    if (no_data(data, WKB_HEADER_SIZE + 4) ||
-+        (n_points= uint4korr(data + WKB_HEADER_SIZE)) > max_n_points)
-       return GET_SIZE_ERROR;
--    data+= (WKB_HEADER_SIZE + 4 + uint4korr(data + WKB_HEADER_SIZE) *
--	    POINT_DATA_SIZE);
-+    data+= (WKB_HEADER_SIZE + 4 + n_points*POINT_DATA_SIZE);
-   }
-+  if (no_data(data, 0))
-+    return GET_SIZE_ERROR;
-   return (uint32) (data - m_data);
- }
- 
-@@ -1327,7 +1350,7 @@ int Gis_multi_line_string::geometry_n(uint32 num, String *result) const
-       return 1;
-     n_points= uint4korr(data + WKB_HEADER_SIZE);
-     length= WKB_HEADER_SIZE + 4+ POINT_DATA_SIZE * n_points;
--    if (no_data(data, length))
-+    if (n_points > max_n_points || no_data(data, length))
-       return 1;
-     if (!--num)
-       break;
-@@ -1407,6 +1430,7 @@ const Geometry::Class_info *Gis_multi_line_string::get_class_info() const
- uint32 Gis_multi_polygon::get_data_size() const 
- {
-   uint32 n_polygons;
-+  uint32 n_points;
-   const char *data= m_data;
- 
-   if (no_data(data, 4))
-@@ -1425,11 +1449,14 @@ uint32 Gis_multi_polygon::get_data_size() const
- 
-     while (n_linear_rings--)
-     {
--      if (no_data(data, 4))
-+      if (no_data(data, 4) ||
-+          (n_points= uint4korr(data)) > max_n_points)
- 	return GET_SIZE_ERROR;
--      data+= 4 + uint4korr(data) * POINT_DATA_SIZE;
-+      data+= 4 + n_points * POINT_DATA_SIZE;
-     }
-   }
-+  if (no_data(data, 0))
-+    return GET_SIZE_ERROR;
-   return (uint32) (data - m_data);
- }
- 
-diff --git a/sql/spatial.h b/sql/spatial.h
-index 7d25425..d7632c1 100644
---- a/sql/spatial.h
-+++ b/sql/spatial.h
-@@ -199,7 +199,7 @@ class Geometry
- public:
-   // Maximum number of points in feature that can fit into String
-   static const uint32 max_n_points=
--    (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
-+    (uint32) (INT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
-     POINT_DATA_SIZE;
- public:
-   Geometry() {}                               /* Remove gcc warning */
--- 
-1.8.1.6
-
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-link-error-ub1310.patch b/meta-oe/recipes-support/mysql/mariadb/fix-link-error-ub1310.patch
deleted file mode 100644
index a528ea7..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/fix-link-error-ub1310.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-mariadb-native: fix link error on Ubuntu 13.10
-
-Below errors only occurs on Ubuntu 13.10:
-
-$arch-linux-libtool: link: g++ ... -o .libs/mysqltest_embedded \
-    ../../libmysqld/.libs/libmysqld.so -ldl
-
-    ../../libmysqld/.libs/libmysqld.so: undefined reference to `dlopen'
-    ../../libmysqld/.libs/libmysqld.so: undefined reference to `dlclose'
-    ../../libmysqld/.libs/libmysqld.so: undefined reference to `dlerror'
-    ../../libmysqld/.libs/libmysqld.so: undefined reference to `dlsym'
-
-GCC/ld verion on the host:
-    gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1
-    GNU ld (GNU Binutils for Ubuntu) 2.23.52.20130913
-
-This is a strange behavior on Ub13.10, it fails even '-ldl' in the
-link command line. Below fix will append '-ldl' to dependency_libs
-in libmysqld.la.
-
-Upstream-Status: Submitted [https://mariadb.atlassian.net/browse/MDEV-5362]
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-================================================
-diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am
-index 7a2c92e..eee501e 100644
---- a/libmysqld/Makefile.am
-+++ b/libmysqld/Makefile.am
-@@ -92,7 +92,7 @@ INC_LIB=	$(top_builddir)/regex/libregex.la \
-                 @ndbcluster_libs@ @NDB_SCI_LIBS@ \
- 		@mysql_embedded_plugin_libs@ \
- 		$(libevent_inc_libs) \
--		$(yassl_inc_libs)
-+		$(yassl_inc_libs) @LIBDL@
- 
- if HAVE_YASSL
- yassl_inc_libs=	$(top_builddir)/extra/yassl/src/libyassl.la \
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch b/meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch
new file mode 100644
index 0000000..7516619
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch
@@ -0,0 +1,161 @@
+From 6db2a606196fb38a6d106dc409eee1cb9a40a440 Mon Sep 17 00:00:00 2001
+From: Tor Didriksen <tor.didriksen@oracle.com>
+Date: Mon, 24 Jun 2013 17:15:35 +0200
+Subject: [PATCH] Bug#16809055 MYSQL 5.6 AND 5.7 STILL USE LIBMYSQLCLIENT.SO.18
+
+With this patch, the libmysql/ directory contains:
+libmysqlclient.a
+libmysqlclient_r.a -> libmysqlclient.a
+libmysqlclient_r.so -> libmysqlclient.so*
+libmysqlclient_r.so.18 -> libmysqlclient.so.18*
+libmysqlclient_r.so.18.1.0 -> libmysqlclient.so.18.1.0*
+libmysqlclient.so -> libmysqlclient.so.18*
+libmysqlclient.so.18 -> libmysqlclient.so.18.1.0*
+libmysqlclient.so.18.1.0*
+
+This fixes libmysqlclient_r symlinks pointing to the unversioned
+libmysqlclient.so symlink (leading to package QA errors since the
+libmysqlclient-r package ends up depending on libmysqlclient-dev).
+
+Borrowed from MySQL 5.6 tree at https://github.com/percona/mysql/
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+---
+ cmake/install_macros.cmake | 25 +++++++++++++++----------
+ cmake/mysql_version.cmake  |  3 ++-
+ libmysql/CMakeLists.txt    | 36 ++++++++++++++++++++++++++++--------
+ 3 files changed, 45 insertions(+), 19 deletions(-)
+
+diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake
+index b8efdf8..a0d0e68 100644
+--- a/cmake/install_macros.cmake
++++ b/cmake/install_macros.cmake
+@@ -1,4 +1,4 @@
+-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
++# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+@@ -111,28 +111,33 @@ FUNCTION(INSTALL_SCRIPT)
+ ENDFUNCTION()
+ 
+ # Install symbolic link to CMake target. 
+-# the link is created in the same directory as target
+-# and extension will be the same as for target file.
+-MACRO(INSTALL_SYMLINK linkname target destination component)
++# We do 'cd path; ln -s target_name link_name'
++# We also add an INSTALL target for "${path}/${link_name}"
++MACRO(INSTALL_SYMLINK target target_name link_name destination component)
+ IF(UNIX)
+   GET_TARGET_PROPERTY(location ${target} LOCATION)
+   GET_FILENAME_COMPONENT(path ${location} PATH)
+-  GET_FILENAME_COMPONENT(name ${location} NAME)
+-  SET(output ${path}/${linkname})
++  MESSAGE(STATUS "target ${target}")
++  MESSAGE(STATUS "link_name ${link_name}")
++  MESSAGE(STATUS "target_name ${target_name}")
++  MESSAGE(STATUS "path ${path}")
++  MESSAGE(STATUS "")
++
++  SET(output ${path}/${link_name})
+   ADD_CUSTOM_COMMAND(
+     OUTPUT ${output}
+     COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${output}
+     COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink 
+-      ${name} 
+-      ${linkname}
++      ${target_name} 
++      ${link_name}
+     WORKING_DIRECTORY ${path}
+     DEPENDS ${target}
+     )
+   
+-  ADD_CUSTOM_TARGET(symlink_${linkname}
++  ADD_CUSTOM_TARGET(symlink_${link_name}
+     ALL
+     DEPENDS ${output})
+-  SET_TARGET_PROPERTIES(symlink_${linkname} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
++  SET_TARGET_PROPERTIES(symlink_${link_name} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+   IF(CMAKE_GENERATOR MATCHES "Xcode")
+     # For Xcode, replace project config with install config
+     STRING(REPLACE "${CMAKE_CFG_INTDIR}" 
+diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
+index be5760f..96286ff 100644
+--- a/libmysql/CMakeLists.txt
++++ b/libmysql/CMakeLists.txt
+@@ -180,6 +180,12 @@ IF(MSVC)
+  INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug)
+ ENDIF()
+ 
++MACRO(GET_TARGET_NAME target out_name)
++  GET_TARGET_PROPERTY(location ${target} LOCATION)
++  GET_FILENAME_COMPONENT(name ${location} NAME)
++  SET(${out_name} ${name})
++ENDMACRO()
++
+ IF(UNIX)
+   MACRO(GET_VERSIONED_LIBNAME LIBNAME EXTENSION VERSION OUTNAME)
+     SET(DOT_VERSION ".${VERSION}")
+@@ -192,7 +198,13 @@ IF(UNIX)
+       SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION})
+     ENDIF() 
+   ENDMACRO()
+-  INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} Development)
++ENDIF()
++
++IF(UNIX)
++  GET_TARGET_NAME(mysqlclient lib_name)
++  INSTALL_SYMLINK(mysqlclient
++    ${lib_name} ${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a
++    ${INSTALL_LIBDIR} Development)
+ ENDIF()
+ 
+ IF(NOT DISABLE_SHARED)
+@@ -205,10 +217,9 @@ IF(NOT DISABLE_SHARED)
+     # libtool compatability
+     IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
+       SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}")
+-    ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
+-      SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0")
+     ELSE()
+-      SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0")
++      SET(OS_SHARED_LIB_VERSION
++        "${SHARED_LIB_MAJOR_VERSION}.${SHARED_LIB_MINOR_VERSION}.0")
+     ENDIF()
+     # Name of shared library is mysqlclient on Unix
+     SET_TARGET_PROPERTIES(libmysql PROPERTIES 
+@@ -239,8 +250,13 @@ IF(NOT DISABLE_SHARED)
+       "${CMAKE_SHARED_LIBRARY_SUFFIX}"
+       ""
+       linkname)
+-    INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
+-    SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
++    GET_TARGET_NAME(libmysql lib_name)
++    GET_FILENAME_COMPONENT(lib_name_we ${lib_name} NAME_WE)
++    INSTALL_SYMLINK(libmysql
++      ${lib_name} ${linkname}
++      ${INSTALL_LIBDIR} SharedLibraries)
++    SET(OS_SHARED_LIB_SYMLINKS
++      "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
+     LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS)
+     FOREACH(ver ${OS_SHARED_LIB_SYMLINKS})
+       GET_VERSIONED_LIBNAME(
+@@ -248,7 +264,11 @@ IF(NOT DISABLE_SHARED)
+         "${CMAKE_SHARED_LIBRARY_SUFFIX}"
+         "${ver}"
+         linkname)
+-      INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
++      GET_VERSIONED_LIBNAME(
++        ${lib_name_we} "${CMAKE_SHARED_LIBRARY_SUFFIX}" "${ver}" lib_name_ver)
++      INSTALL_SYMLINK(libmysql
++        ${lib_name_ver} ${linkname}
++        ${INSTALL_LIBDIR} SharedLibraries)
+     ENDFOREACH()
+   ENDIF()
+ ENDIF()
+-- 
+2.0.3
+
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix_host_path.patch b/meta-oe/recipes-support/mysql/mariadb/fix_host_path.patch
deleted file mode 100644
index 4f69cd5..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/fix_host_path.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- mysql-4.1.22/configure.in.old	2008-09-18 20:11:15.000000000 -0500
-+++ mysql-4.1.22/configure.in	2008-09-18 20:12:28.000000000 -0500
-@@ -456,9 +456,9 @@ else
-   fi
- fi
- 
--AC_SUBST(HOSTNAME)
--AC_SUBST(PERL)
--AC_SUBST(PERL5)
-+AC_SUBST(HOSTNAME,/bin/hostname)
-+AC_SUBST(PERL,$(bindir)/perl)
-+AC_SUBST(PERL5,$(bindir)/perl)
- 
- # for build ndb docs
- 
-@@ -516,16 +516,17 @@ AC_MSG_RESULT("$FIND_PROC")
- 
- # Check if a pid is valid
- AC_PATH_PROG(KILL, kill, kill)
-+AC_SUBST(KILL,/bin/kill)
- AC_MSG_CHECKING("for kill switches")
--if $ac_cv_path_KILL -0 $$
-+if $KILL -0 $$
- then
--  CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null"
-+  CHECK_PID="$KILL -0 \$\$PID > /dev/null 2> /dev/null"
- elif kill -s 0 $$
- then
--  CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
-+  CHECK_PID="$KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
- else
-   AC_MSG_WARN([kill -0 to check for pid seems to fail])
--    CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
-+    CHECK_PID="$KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
- fi
- AC_SUBST(CHECK_PID)
- AC_MSG_RESULT("$CHECK_PID")
diff --git a/meta-oe/recipes-support/mysql/mariadb/misc.m4.patch b/meta-oe/recipes-support/mysql/mariadb/misc.m4.patch
deleted file mode 100644
index 7b0acff..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/misc.m4.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: mysql-5.1.40/config/ac-macros/misc.m4
-===================================================================
---- mysql-5.1.40.orig/config/ac-macros/misc.m4
-+++ mysql-5.1.40/config/ac-macros/misc.m4
-@@ -476,7 +476,7 @@ AC_DEFUN([MYSQL_STACK_DIRECTION],
-  {
-    exit (find_stack_direction() < 0);
-  }], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
--   ac_cv_c_stack_direction=)])
-+   ac_cv_c_stack_direction=0)])
-  AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
- ])dnl
- 
diff --git a/meta-oe/recipes-support/mysql/mariadb/my.cnf b/meta-oe/recipes-support/mysql/mariadb/my.cnf
index d174381..f2c9b90 100644
--- a/meta-oe/recipes-support/mysql/mariadb/my.cnf
+++ b/meta-oe/recipes-support/mysql/mariadb/my.cnf
@@ -17,5 +17,6 @@ datadir 					= /var/mysql
 skip-external-locking
 skip-networking
 ignore-builtin-innodb
+default-storage-engine				= myisam
 bind-address					= localhost
 
diff --git a/meta-oe/recipes-support/mysql/mariadb/mysqld.sh b/meta-oe/recipes-support/mysql/mariadb/mysqld.sh
deleted file mode 100644
index 479ebdb..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/mysqld.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-# MySQL init script
-
-. /etc/default/rcS
-
-case "$1" in
-	start)
-		/usr/bin/mysqld_safe &
-		;;
-	stop)
-		if test -f /var/lib/mysql/mysqld.pid ; then
-			PID=`cat /var/lib/mysql/mysqld.pid`
-			kill $PID
-		fi
-		;;
-	restart)
-		$0 stop
-		$0 start
-		;;
-	*)
-		echo "Usage: /etc/init.d/mysqld {start|stop|restart}"
-		;;
-esac
-
-exit 0
diff --git a/meta-oe/recipes-support/mysql/mariadb/plug.in.patch b/meta-oe/recipes-support/mysql/mariadb/plug.in.patch
deleted file mode 100644
index 156fd10..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/plug.in.patch
+++ /dev/null
@@ -1,405 +0,0 @@
-diff --git a/storage/innodb_plugin/plug.in b/storage/innodb_plugin/plug.in
-index 7650251..3cc22c5 100644
---- a/storage/innodb_plugin/plug.in
-+++ b/storage/innodb_plugin/plug.in
-@@ -56,180 +56,10 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin,  [
-   esac
-   AC_SUBST(INNODB_DYNAMIC_CFLAGS)
- 
--  AC_MSG_CHECKING(whether GCC atomic builtins are available)
--  # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
--  AC_TRY_RUN(
--    [
--      int main()
--      {
--	long	x;
--	long	y;
--	long	res;
--	char	c;
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x, y);
--	if (!res || x != y) {
--          return(1);
--        }
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x + 1, y);
--	if (res || x != 10) {
--          return(1);
--        }
--
--	x = 10;
--	y = 123;
--	res = __sync_add_and_fetch(&x, y);
--	if (res != 123 + 10 || x != 123 + 10) {
--	  return(1);
--	}
--
--	c = 10;
--	res = __sync_lock_test_and_set(&c, 123);
--	if (res != 10 || c != 123) {
--	  return(1);
--	}
--
--	return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
--                [GCC atomic builtins are available])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
--  AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
--  # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
--  AC_TRY_RUN(
--    [
--      #include <pthread.h>
--      #include <string.h>
--
--      int main(int argc, char** argv) {
--        pthread_t       x1;
--        pthread_t       x2;
--        pthread_t       x3;
--
--	memset(&x1, 0x0, sizeof(x1));
--	memset(&x2, 0x0, sizeof(x2));
--	memset(&x3, 0x0, sizeof(x3));
--
--        __sync_bool_compare_and_swap(&x1, x2, x3);
--
--        return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
--                [pthread_t can be used by GCC atomic builtins])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
--  AC_MSG_CHECKING(whether Solaris libc atomic functions are available)
--  # Define HAVE_IB_SOLARIS_ATOMICS if _all_ of the following
--  # functions are present.
--  AC_CHECK_FUNCS(atomic_add_long_nv \
--		 atomic_cas_32 \
--		 atomic_cas_64 \
--		 atomic_cas_ulong \
--		 atomic_swap_uchar)
--
--  if test "${ac_cv_func_atomic_add_long_nv}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_32}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_64}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_ulong}" = "yes" -a \
--          "${ac_cv_func_atomic_swap_uchar}" = "yes" ; then
--
--    AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1],
--      [Define to 1 if Solaris libc atomic functions are available]
--    )
--  fi
--
--  AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions)
--  # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
--  AC_TRY_RUN(
--    [
--      #include <pthread.h>
--      #include <string.h>
--
--      int main(int argc, char** argv) {
--        pthread_t       x1;
--        pthread_t       x2;
--        pthread_t       x3;
--
--        memset(&x1, 0x0, sizeof(x1));
--        memset(&x2, 0x0, sizeof(x2));
--        memset(&x3, 0x0, sizeof(x3));
--
--        if (sizeof(pthread_t) == 4) {
--        
--          atomic_cas_32(&x1, x2, x3);
--        
--        } else if (sizeof(pthread_t) == 8) {
--        
--          atomic_cas_64(&x1, x2, x3);
--        
--        } else {
--        
--          return(1);
--        }
--
--	return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
--                [pthread_t can be used by solaris atomics])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
-   # this is needed to know which one of atomic_cas_32() or atomic_cas_64()
-   # to use in the source
-   AC_CHECK_SIZEOF([pthread_t], [], [#include <pthread.h>])
- 
--  # Check for x86 PAUSE instruction
--  AC_MSG_CHECKING(for x86 PAUSE instruction)
--  # We have to actually try running the test program, because of a bug
--  # in Solaris on x86_64, where it wrongly reports that PAUSE is not
--  # supported when trying to run an application. See
--  # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684
--  # We use ib_ prefix to avoid collisoins if this code is added to
--  # mysql's configure.in.
--  AC_TRY_RUN(
--    [
--      int main() {
--        __asm__ __volatile__ ("pause");
--        return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
-   ])
- 
- # vim: set ft=config:
-diff --git a/storage/xtradb/plug.in b/storage/xtradb/plug.in
-index 3fadacc..a33f4dc 100644
---- a/storage/xtradb/plug.in
-+++ b/storage/xtradb/plug.in
-@@ -56,215 +56,10 @@ MYSQL_PLUGIN_ACTIONS(xtradb,  [
-   esac
-   AC_SUBST(INNODB_DYNAMIC_CFLAGS)
- 
--  AC_MSG_CHECKING(whether GCC atomic builtins are available)
--  # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
--  AC_TRY_RUN(
--    [
--      int main()
--      {
--	long	x;
--	long	y;
--	long	res;
--	char	c;
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x, y);
--	if (!res || x != y) {
--          return(1);
--        }
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x + 1, y);
--	if (res || x != 10) {
--          return(1);
--        }
--
--	x = 10;
--	y = 123;
--	res = __sync_add_and_fetch(&x, y);
--	if (res != 123 + 10 || x != 123 + 10) {
--	  return(1);
--	}
--
--	c = 10;
--	res = __sync_lock_test_and_set(&c, 123);
--	if (res != 10 || c != 123) {
--	  return(1);
--	}
--	return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
--                [GCC atomic builtins are available])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
--  AC_MSG_CHECKING(whether GCC 64-bit atomic builtins are available)
--  # either define HAVE_IB_GCC_ATOMIC_BUILTINS_64 or not
--  AC_TRY_RUN(
--    [
--      #include <stdint.h>
--      int main()
--      {
--        int64_t x, y, res;
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x, y);
--	if (!res || x != y) {
--	  return(1);
--	}
--
--	x = 10;
--	y = 123;
--	res = __sync_add_and_fetch(&x, y);
--	if (res != 123 + 10 || x != 123 + 10) {
--	  return(1);
--	}
--
--	return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS_64], [1],
--                [GCC 64-bit atomic builtins are available])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
--  AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
--  # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
--  AC_TRY_RUN(
--    [
--      #include <pthread.h>
--      #include <string.h>
--
--      int main(int argc, char** argv) {
--        pthread_t       x1;
--        pthread_t       x2;
--        pthread_t       x3;
--
--	memset(&x1, 0x0, sizeof(x1));
--	memset(&x2, 0x0, sizeof(x2));
--	memset(&x3, 0x0, sizeof(x3));
--
--        __sync_bool_compare_and_swap(&x1, x2, x3);
--
--        return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
--                [pthread_t can be used by GCC atomic builtins])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
--  AC_MSG_CHECKING(whether Solaris libc atomic functions are available)
--  # Define HAVE_IB_SOLARIS_ATOMICS if _all_ of the following
--  # functions are present.
--  AC_CHECK_FUNCS(atomic_add_long_nv \
--		 atomic_cas_32 \
--		 atomic_cas_64 \
--		 atomic_cas_ulong \
--		 atomic_swap_uchar)
--
--  if test "${ac_cv_func_atomic_add_long_nv}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_32}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_64}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_ulong}" = "yes" -a \
--          "${ac_cv_func_atomic_swap_uchar}" = "yes" ; then
--
--    AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1],
--      [Define to 1 if Solaris libc atomic functions are available]
--    )
--  fi
--
--  AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions)
--  # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
--  AC_TRY_RUN(
--    [
--      #include <pthread.h>
--      #include <string.h>
--
--      int main(int argc, char** argv) {
--        pthread_t       x1;
--        pthread_t       x2;
--        pthread_t       x3;
--
--        memset(&x1, 0x0, sizeof(x1));
--        memset(&x2, 0x0, sizeof(x2));
--        memset(&x3, 0x0, sizeof(x3));
--
--        if (sizeof(pthread_t) == 4) {
--        
--          atomic_cas_32(&x1, x2, x3);
--        
--        } else if (sizeof(pthread_t) == 8) {
--        
--          atomic_cas_64(&x1, x2, x3);
--        
--        } else {
--        
--          return(1);
--        }
--
--	return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
--                [pthread_t can be used by solaris atomics])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
-   # this is needed to know which one of atomic_cas_32() or atomic_cas_64()
-   # to use in the source
-   AC_CHECK_SIZEOF([pthread_t], [], [#include <pthread.h>])
- 
--  # Check for x86 PAUSE instruction
--  AC_MSG_CHECKING(for x86 PAUSE instruction)
--  # We have to actually try running the test program, because of a bug
--  # in Solaris on x86_64, where it wrongly reports that PAUSE is not
--  # supported when trying to run an application. See
--  # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684
--  # We use ib_ prefix to avoid collisoins if this code is added to
--  # mysql's configure.in.
--  AC_TRY_RUN(
--    [
--      int main() {
--        __asm__ __volatile__ ("pause");
--        return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
-   ])
- 
- # vim: set ft=config:
diff --git a/meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch b/meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch
new file mode 100644
index 0000000..ff26b0b
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch
@@ -0,0 +1,18 @@
+Remove host path from include directories
+
+Naturally this breaks cross-compilation if present.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+--- mariadb-5.5.38/storage/tokudb/ft-index/CMakeLists.txt	2014-07-17 14:37:04.529327998 +0100
++++ mariadb-5.5.38/storage/tokudb/ft-index/CMakeLists.txt	2014-07-17 14:43:56.991337895 +0100
+@@ -39,7 +39,6 @@
+ 
+ ## default includes and libraries
+ include_directories(SYSTEM
+-  /usr/local/include
+   ${ZLIB_INCLUDE_DIRS}
+   )
+ 
diff --git a/meta-oe/recipes-support/mysql/mariadb/storage-forbids-absolute-addresses-on-IA-32.patch b/meta-oe/recipes-support/mysql/mariadb/storage-forbids-absolute-addresses-on-IA-32.patch
deleted file mode 100644
index 0530cd9..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/storage-forbids-absolute-addresses-on-IA-32.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-storage: forbids absolute addresses on IA-32
-
-The shared lib has relocations in .text
-...
-WARNING: QA Issue: ELF binary '/usr/lib/plugin/ha_xtradb.so.0.0.0' has relocations in .text
-WARNING: QA Issue: ELF binary '/usr/lib/plugin/ha_innodb_plugin.so.0.0.0' has relocations in .text
-...
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- storage/innodb_plugin/plug.in |    2 +-
- storage/xtradb/plug.in        |    2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/storage/innodb_plugin/plug.in b/storage/innodb_plugin/plug.in
---- a/storage/innodb_plugin/plug.in
-+++ b/storage/innodb_plugin/plug.in
-@@ -50,7 +50,7 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin,  [
- 		;;
- 	*86)
- 		# Use absolute addresses on IA-32
--		INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
-+		# INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
- 		;;
-   esac
-   AC_SUBST(INNODB_DYNAMIC_CFLAGS)
-diff --git a/storage/xtradb/plug.in b/storage/xtradb/plug.in
-index a33f4dc..4c186fd 100644
---- a/storage/xtradb/plug.in
-+++ b/storage/xtradb/plug.in
-@@ -51,7 +51,7 @@ MYSQL_PLUGIN_ACTIONS(xtradb,  [
- 		;;
- 	*86)
- 		# Use absolute addresses on IA-32
--		INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
-+		# INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
- 		;;
-   esac
-   AC_SUBST(INNODB_DYNAMIC_CFLAGS)
--- 
-1.7.9.5
-
diff --git a/meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch b/meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch
deleted file mode 100644
index 880c2a7..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-zlib: let lib dir configurable
-
-The zlib were found in $mysql_zlib_dir/lib, and the
-search will fail if zlib in $mysql_zlib_dir/lib64.
-
-Let lib dir configurable rather than hardcode.
-
-Upstream-Status: Pending
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- config/ac-macros/zlib.m4 | 12 ++++++------
- configure.in             |  8 ++++++++
- 2 files changed, 14 insertions(+), 6 deletions(-)
-
-diff --git a/config/ac-macros/zlib.m4 b/config/ac-macros/zlib.m4
---- a/config/ac-macros/zlib.m4
-+++ b/config/ac-macros/zlib.m4
-@@ -106,17 +106,17 @@ case $SYSTEM_TYPE in
-         ;;
-       *)
-         # Test for libz using all known library file endings
--        if test \( -f "$mysql_zlib_dir/lib/libz.a"  -o \
--                   -f "$mysql_zlib_dir/lib/libz.so" -o \
--                   -f "$mysql_zlib_dir/lib/libz.sl" -o \
--                   -f "$mysql_zlib_dir/lib/libz.dylib" \) \
-+        if test \( -f "$mysql_zlib_dir/$base_libdir/libz.a"  -o \
-+                   -f "$mysql_zlib_dir/$base_libdir/libz.so" -o \
-+                   -f "$mysql_zlib_dir/$base_libdir/libz.sl" -o \
-+                   -f "$mysql_zlib_dir/$base_libdir/libz.dylib" \) \
-                 -a -f "$mysql_zlib_dir/include/zlib.h"; then
-           ZLIB_INCLUDES="-I$mysql_zlib_dir/include"
--          ZLIB_LIBS="-L$mysql_zlib_dir/lib -lz"
-+          ZLIB_LIBS="-L$mysql_zlib_dir/$base_libdir -lz"
-           MYSQL_CHECK_ZLIB_DIR
-         fi
-         if test "x$mysql_cv_compress" != "xyes"; then 
--          AC_MSG_ERROR([headers or binaries were not found in $mysql_zlib_dir/{include,lib}])
-+          AC_MSG_ERROR([headers or binaries were not found in $mysql_zlib_dir/{include,$base_libdir}])
-         fi
-         ;;
-     esac
-diff --git a/configure.in b/configure.in
-index 2c6c08e..193b59a 100644
---- a/configure.in
-+++ b/configure.in
-@@ -104,6 +104,14 @@ AC_SUBST(SHARED_LIB_MAJOR_VERSION)
- AC_SUBST(SHARED_LIB_VERSION)
- AC_SUBST(AVAILABLE_LANGUAGES)
- 
-+AC_ARG_WITH([baselib-dir],
-+            AC_HELP_STRING([--baselib-dir=DIR],
-+                           [Provide MySQL with a custom location of
-+                           baselib dir. Given DIR, such as zlib binary is
-+                           assumed to be in $zlib-dir/$DIR.]),
-+            [base_libdir=${withval}],
-+            [base_libdir="lib"])
-+
- # Check whether a debug mode should be enabled.
- AC_ARG_WITH([debug],
-     AS_HELP_STRING([--with-debug@<:@=full@:>@],
--- 
-1.8.1.2
-
diff --git a/meta-oe/recipes-support/mysql/mariadb_5.1.67.bb b/meta-oe/recipes-support/mysql/mariadb_5.5.38.bb
similarity index 86%
rename from meta-oe/recipes-support/mysql/mariadb_5.1.67.bb
rename to meta-oe/recipes-support/mysql/mariadb_5.5.38.bb
index 6ad1fe6..fee5b62 100644
--- a/meta-oe/recipes-support/mysql/mariadb_5.1.67.bb
+++ b/meta-oe/recipes-support/mysql/mariadb_5.5.38.bb
@@ -1,6 +1,8 @@
 require ${PN}_${PV}.inc
 
-DEPENDS += "mariadb-native ncurses zlib"
+EXTRA_OECMAKE += "-DSTACK_DIRECTION=-1"
+
+DEPENDS += "mariadb-native ncurses zlib readline libaio"
 
 PROVIDES += "mysql5"
 
diff --git a/meta-oe/recipes-support/mysql/mariadb_5.1.67.inc b/meta-oe/recipes-support/mysql/mariadb_5.5.38.inc
similarity index 67%
rename from meta-oe/recipes-support/mysql/mariadb_5.1.67.inc
rename to meta-oe/recipes-support/mysql/mariadb_5.5.38.inc
index 0c83c71..11b4046 100644
--- a/meta-oe/recipes-support/mysql/mariadb_5.1.67.inc
+++ b/meta-oe/recipes-support/mysql/mariadb_5.5.38.inc
@@ -4,31 +4,21 @@ SECTION = "libs"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
-SRC_URI = "http://mirrors.coreix.net/mariadb/mariadb-${PV}/kvm-tarbake-jaunty-x86/mariadb-${PV}.tar.gz \
-           file://configure.in.patch \
-           file://plug.in.patch \
-           file://misc.m4.patch \
-           file://Makefile.am.patch \
-           file://fix_host_path.patch \
-           file://configure-ps-cache-check.patch \
-           file://fix-cve-2013-1861-1.patch \
-           file://fix-cve-2013-1861-2.patch \
-           file://zlib-let-libdir-configurable.patch \
-           file://storage-forbids-absolute-addresses-on-IA-32.patch \
+SRC_URI = "http://mirror.stshosting.co.uk/mariadb/mariadb-${PV}/source/mariadb-${PV}.tar.gz \
+           file://fix-cmake-module-path.patch \
+           file://remove-bad-path.patch \
+           file://fix-mysqlclient-r-version.patch \
            file://my.cnf \
-           file://mysqld.sh \
-           file://avoid-plugin-options-warnings.patch \
-           file://fix-link-error-ub1310.patch \
           "
 
-SRC_URI[md5sum] = "44c331fa91943155e4796f89e17a0612"
-SRC_URI[sha256sum] = "33471e9275c9b03919cabc38eb39f807d645adabf6a1a18f2e41ed73f47677c8"
+SRC_URI[md5sum] = "fa9ba00b084b95a45fab70860c412f10"
+SRC_URI[sha256sum] = "efc839e6627064b3b5c6c39854198f0d34907f48937804758d4c09c7717be8d3"
 
 S = "${WORKDIR}/mariadb-${PV}"
 
 BINCONFIG_GLOB = "mysql_config"
 
-inherit autotools-brokensep binconfig update-rc.d useradd
+inherit cmake gettext binconfig update-rc.d useradd
 
 INITSCRIPT_PACKAGES = "${PN}-server"
 INITSCRIPT_NAME = "mysqld"
@@ -38,29 +28,40 @@ USERADD_PACKAGES = "${PN}-server"
 USERADD_PARAM_${PN}-server = "--system --home-dir /var/mysql -g nogroup --shell /bin/false mysql"
 
 
-export ac_cv_path_PS="/bin/ps"
-export ac_cv_FIND_PROC="/bin/ps p \$\$PID | grep -v grep | grep mysqld > /dev/null"
-PARALLEL_MAKE = " "
 EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'"
-EXTRA_OECONF = "--with-atomic-ops=up \
-                --with-embedded-server \
-                --sysconfdir=/etc/mysql \
-                --localstatedir=/var/mysql \
-                --disable-dependency-tracking \
-                --without-debug \
-                --with-low-memory \
-                --without-query-cache \
-                --without-plugin-maria \
-                --without-man \
-                --without-docs \
-                --with-zlib-dir=${STAGING_EXECPREFIXDIR} \
-                --with-baselib-dir=${base_libdir} \
-                --with-pic \
-                "
 
-do_configure_append() {
-    sed -i /comp_err/d ${B}/sql/share/Makefile
+python __anonymous() {
+    # This is a pain but it's the only way to pass these in since
+    # MariaDB's cmake scripts insist on prepending the prefix to the
+    # specified values for INSTALL_*
+    localdata = d.createCopy()
+    localdata.setVar('prefix', '')
+    localdata.setVar('exec_prefix', '')
+    d.setVar('bindir_noprefix', localdata.getVar('bindir', True).lstrip('/'))
+    d.setVar('sbindir_noprefix', localdata.getVar('sbindir', True).lstrip('/'))
+    d.setVar('datadir_noprefix', localdata.getVar('datadir', True).lstrip('/'))
+    d.setVar('libdir_noprefix', localdata.getVar('libdir', True).lstrip('/'))
+}
+
+EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \
+                 -DWITH_JEMALLOC=no \
+                 -DWITHOUT_TOKUDB=true \
+                 -DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE \
+                 -DWITH_PIC=ON \
+                 -DINSTALL_DOCDIR:PATH=${datadir_noprefix}/doc/${BPN} \
+                 -DINSTALL_BINDIR:PATH=${bindir_noprefix} \
+                 -DINSTALL_SBINDIR:PATH=${sbindir_noprefix} \
+                 -DINSTALL_SCRIPTDIR:PATH=${bindir_noprefix} \
+                 -DINSTALL_LIBDIR:PATH=${libdir_noprefix} \
+                 -DINSTALL_PLUGINDIR:PATH=${libdir_noprefix}/plugin \
+                 -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \
+                 -DINSTALL_MYSQLSHAREDIR:PATH=${datadir_noprefix}/mysql \
+                 -DINSTALL_SUPPORTFILESDIR:PATH=${datadir_noprefix}/mysql-support-files \
+                 -DMYSQL_DATADIR:PATH=/var/mysql \
+                 -DCAT_EXECUTABLE=`which cat` \
+                 -DCMAKE_AR:FILEPATH=${AR}"
 
+do_configure_append() {
     # handle distros with different values of ${libexecdir}
     libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'`
     sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysql_install_db.sh
@@ -68,6 +69,20 @@ do_configure_append() {
     sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysqld_safe.sh
 }
 
+do_generate_toolchain_file_append_class-native () {
+    # If these are set cmake will assume we're cross-compiling, which will
+    # result in certain things we want being disabled
+    sed -i "/set( CMAKE_SYSTEM_NAME/d" ${WORKDIR}/toolchain.cmake
+    sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake
+}
+
+do_compile_prepend_class-target () {
+    # These need to be in-tree or make will think they need to be built,
+    # and since we're cross-compiling that is disabled
+    cp ${STAGING_BINDIR_NATIVE}/comp_err ${S}/extra
+    cp ${STAGING_BINDIR_NATIVE}/comp_sql ${S}/scripts
+}
+
 SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess"
 
 # We need to append this so it runs *after* binconfig's preprocess function
@@ -82,13 +97,10 @@ mariadb_sysroot_preprocess () {
 
 do_install() {
     oe_runmake 'DESTDIR=${D}' install
-    mv -f ${D}${libdir}/mysql/* ${D}${libdir}
-    rmdir ${D}${libdir}/mysql
-    find ${D}${libdir} -name '*.la'|xargs sed -i 's#${libdir}/mysql#${libdir}#'
 
-    install -d ${D}/etc/init.d
-    install -m 0644 ${WORKDIR}/my.cnf ${D}/etc/
-    install -m 0755 ${WORKDIR}/mysqld.sh ${D}/etc/init.d/mysqld
+    install -d ${D}/${sysconfdir}/init.d
+    install -m 0644 ${WORKDIR}/my.cnf ${D}/${sysconfdir}/
+    mv ${D}/${sysconfdir}/init.d/mysql ${D}/${sysconfdir}/init.d/mysqld
 }
 
 pkg_postinst_${PN}-server () {
@@ -102,7 +114,7 @@ pkg_postinst_${PN}-server () {
     mkdir /var/lib/mysql
     chown mysql.nogroup /var/lib/mysql
 
-    mysql_install_db
+    mysql_install_db --basedir=${prefix} --user=mysql
 
 }
 
@@ -130,19 +142,14 @@ RDEPENDS_${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-modu
     perl-module-io-socket-inet perl-module-io-select"
 
 FILES_libmysqlclient = "\
-    ${libdir}/libmysqlclient.so.* \
-    ${libdir}/plugin/*.so.*"
+    ${libdir}/libmysqlclient.so.*"
 FILES_libmysqlclient-dev = " \
     ${includedir}/mysql/ \
     ${libdir}/libmysqlclient.so \
-    ${libdir}/libmysqlclient.la \
-    ${libdir}/plugin/*.so \
-    ${libdir}/plugin/*.la \
     ${sysconfdir}/aclocal \
     ${bindir}/mysql_config"
 FILES_libmysqlclient-staticdev = "\
-    ${libdir}/*.a \
-    ${libdir}/plugin/*.a"
+    ${libdir}/*.a"
 FILES_libmysqlclient-dbg = "${libdir}/plugin/.debug/ \
     /usr/mysql-test/lib/My/SafeProcess/.debug/my_safe_process"
 
@@ -153,8 +160,7 @@ INSANE_SKIP_libmysqlclient_append_i586 = " textrel"
 
 FILES_libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*"
 FILES_libmysqlclient-r-dev = "\
-    ${libdir}/libmysqlclient_r.so \
-    ${libdir}/libmysqlclient_r.la"
+    ${libdir}/libmysqlclient_r.so"
 FILES_libmysqlclient-r-staticdev = "${libdir}/libmysqlclient_r.a"
 FILES_libmysqlclient-r-dbg = "${libdir}/plugin/.debuglibmysqlclient_r.so.*"
 
@@ -199,6 +205,7 @@ FILES_${PN}-server = "\
     ${bindir}/mysql_setpermission \
     ${bindir}/mysql_tzinfo_to_sql \
     ${bindir}/mysql_upgrade \
+    ${bindir}/mysql_plugin \
     ${bindir}/mysql_zap \
     ${bindir}/mysqlbinlog \
     ${bindir}/mysqld_multi \
@@ -225,6 +232,7 @@ FILES_${PN}-server = "\
     ${sbindir}/ndb_cpcd \
     ${sbindir}/ndbd \
     ${sbindir}/ndb_mgmd \
+    ${libdir}/plugin/*.so \
     ${datadir}/mysql/ \
     ${localstatedir}/mysql/ \
     ${sysconfdir}/init.d \
-- 
1.9.3



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

* Re: [meta-oe][PATCH v2] mariadb: update to 5.5.38
  2014-08-07 13:31     ` [meta-oe][PATCH v2] " Paul Eggleton
@ 2014-08-08  0:45       ` Martin Jansa
  2014-08-08 10:02         ` Martin Jansa
  2014-08-08 13:01         ` [meta-oe][PATCH v2] " Paul Eggleton
  0 siblings, 2 replies; 14+ messages in thread
From: Martin Jansa @ 2014-08-08  0:45 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2704 bytes --]

On Thu, Aug 07, 2014 at 02:31:55PM +0100, Paul Eggleton wrote:
> * Upstream switched from autotools to cmake
> * Separate build dir and parallel make now work
> * Library versioning no longer used for plugins; other libtool cruft
>   gone
> * Proper upstream initscript
> * Plugins moved from client library package to mariadb-server package
>   (matches how Fedora packages these)
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
> 
> Changes since v1:
> * Add readline and libaio to DEPENDS
> * Disable usage of boost

Thanks for update, I've found few more differences between failing (after building world) and
working (with minimal deps) build:

646c646
< -- Looking for include files valgrind/memcheck.h, valgrind/valgrind.h - found
---
> -- Looking for include files valgrind/memcheck.h, valgrind/valgrind.h - not found
733c733
< -- Looking for include file security/pam_appl.h - found
---
> -- Looking for include file security/pam_appl.h - not found
759c759
< -- Looking for event.h - found
---
> -- Looking for event.h - not found

There is also floating systemtap-native dependency which enables DTRACE support
in mariadb (see mariadb-5.5.38/cmake/dtrace.cmake).


And groff-native is the cause for following error:
| Scanning dependencies of target ps
| make[2]: Leaving directory `/work/i586-oe-linux/mariadb/5.5.38-r0/build'
| make -f dbug/CMakeFiles/ps.dir/build.make dbug/CMakeFiles/ps.dir/build
| make[2]: Entering directory `/work/i586-oe-linux/mariadb/5.5.38-r0/build'
| /sysroots/x86_64-linux/usr/bin/cmake -E cmake_progress_report /work/i586-oe-linux/mariadb/5.5.38-r0/build/CMakeFiles
| [ 84%] Generating example3.r
| cd /work/i586-oe-linux/mariadb/5.5.38-r0/build/dbug && sed -e 's!\\!\\\\!g' </work/i586-oe-linux/mariadb/5.5.38-r0/mariadb-5.5.38/dbug/example3.c >example3.r
| /sysroots/x86_64-linux/usr/bin/cmake -E cmake_progress_report /work/i586-oe-linux/mariadb/5.5.38-r0/build/CMakeFiles
| [ 84%] Generating output1.r, output2.r, output3.r, output4.r, output5.r
| cd /work/i586-oe-linux/mariadb/5.5.38-r0/build/dbug && ./factorial 1 2 3 4 5 > output1.r
| ./factorial: /lib/i386-linux-gnu/libc.so.6: version `GLIBC_2.17' not found (required by ./factorial)
| make[2]: *** [dbug/output1.r] Error 1
| make[2]: Leaving directory `/work/i586-oe-linux/mariadb/5.5.38-r0/build'
| make[1]: *** [dbug/CMakeFiles/ps.dir/all] Error 2
| make[1]: Leaving directory `/work/i586-oe-linux/mariadb/5.5.38-r0/build'
| make: *** [all] Error 2
| ERROR: oe_runmake failed

Adding -DGROFF=False -DNROFF=False to EXTRA_OECMAKE allowed me to build it after world, but please check other floating deps as well.

Thanks

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [meta-oe][PATCH v2] mariadb: update to 5.5.38
  2014-08-08  0:45       ` Martin Jansa
@ 2014-08-08 10:02         ` Martin Jansa
  2014-08-08 13:05           ` Paul Eggleton
  2014-08-08 13:01         ` [meta-oe][PATCH v2] " Paul Eggleton
  1 sibling, 1 reply; 14+ messages in thread
From: Martin Jansa @ 2014-08-08 10:02 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 4801 bytes --]

On Fri, Aug 08, 2014 at 02:45:07AM +0200, Martin Jansa wrote:
> On Thu, Aug 07, 2014 at 02:31:55PM +0100, Paul Eggleton wrote:
> > * Upstream switched from autotools to cmake
> > * Separate build dir and parallel make now work
> > * Library versioning no longer used for plugins; other libtool cruft
> >   gone
> > * Proper upstream initscript
> > * Plugins moved from client library package to mariadb-server package
> >   (matches how Fedora packages these)
> > 
> > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> > ---
> > 
> > Changes since v1:
> > * Add readline and libaio to DEPENDS
> > * Disable usage of boost
> 
> Thanks for update, I've found few more differences between failing (after building world) and
> working (with minimal deps) build:
> 
> 646c646
> < -- Looking for include files valgrind/memcheck.h, valgrind/valgrind.h - found
> ---
> > -- Looking for include files valgrind/memcheck.h, valgrind/valgrind.h - not found
> 733c733
> < -- Looking for include file security/pam_appl.h - found
> ---
> > -- Looking for include file security/pam_appl.h - not found
> 759c759
> < -- Looking for event.h - found
> ---
> > -- Looking for event.h - not found
> 
> There is also floating systemtap-native dependency which enables DTRACE support
> in mariadb (see mariadb-5.5.38/cmake/dtrace.cmake).
> 
> 
> And groff-native is the cause for following error:
> | Scanning dependencies of target ps
> | make[2]: Leaving directory `/work/i586-oe-linux/mariadb/5.5.38-r0/build'
> | make -f dbug/CMakeFiles/ps.dir/build.make dbug/CMakeFiles/ps.dir/build
> | make[2]: Entering directory `/work/i586-oe-linux/mariadb/5.5.38-r0/build'
> | /sysroots/x86_64-linux/usr/bin/cmake -E cmake_progress_report /work/i586-oe-linux/mariadb/5.5.38-r0/build/CMakeFiles
> | [ 84%] Generating example3.r
> | cd /work/i586-oe-linux/mariadb/5.5.38-r0/build/dbug && sed -e 's!\\!\\\\!g' </work/i586-oe-linux/mariadb/5.5.38-r0/mariadb-5.5.38/dbug/example3.c >example3.r
> | /sysroots/x86_64-linux/usr/bin/cmake -E cmake_progress_report /work/i586-oe-linux/mariadb/5.5.38-r0/build/CMakeFiles
> | [ 84%] Generating output1.r, output2.r, output3.r, output4.r, output5.r
> | cd /work/i586-oe-linux/mariadb/5.5.38-r0/build/dbug && ./factorial 1 2 3 4 5 > output1.r
> | ./factorial: /lib/i386-linux-gnu/libc.so.6: version `GLIBC_2.17' not found (required by ./factorial)
> | make[2]: *** [dbug/output1.r] Error 1
> | make[2]: Leaving directory `/work/i586-oe-linux/mariadb/5.5.38-r0/build'
> | make[1]: *** [dbug/CMakeFiles/ps.dir/all] Error 2
> | make[1]: Leaving directory `/work/i586-oe-linux/mariadb/5.5.38-r0/build'
> | make: *** [all] Error 2
> | ERROR: oe_runmake failed
> 
> Adding -DGROFF=False -DNROFF=False to EXTRA_OECMAKE allowed me to build it after world, but please check other floating deps as well.

And now it failed on jenkins builder (maybe because this one is using
gold)

| cd /home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/mariadb/5.5.38-r0/build/storage/myisam && /home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc  -DHAVE_CONFIG_H -Wall  -march=armv5te -marm -mthumb-interwork  --sysroot=/home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/qemuarm  -O2 -pipe -g -feliminate-unused-debug-types -fPIC -O2 -g -DNDEBUG -DDBUG_OFF -I/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/mariadb/5.5.38-r0/build/include -I/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/mariadb/5.5.38-r0/mariadb-5.5.38/include -I/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/mariadb/5.5.38-r0/mariadb-5.5.38/sql -I/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/mariadb/5.5.38-r0/mariadb-5.5.38/regex -I/home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/qemuarm/usr/include     -fvisibility=hidden -o CMakeFiles/myisam.dir/mi_create.c.o   -c /home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/mariadb/5.5.38-r0/mariadb-5.5.38/storage/myisam/mi_create.c
| /home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.1/ld: error: /home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/mariadb/5.5.38-r0/build/libmysql/libmysql_versions.ld:155:9: invalid use of VERSION in input file
| collect2: error: ld returned 1 exit status
| make[2]: *** [libmysql/libmysqlclient.so.18..0] Error 1
| make[2]: Leaving directory `/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/mariadb/5.5.38-r0/build'
| make[1]: *** [libmysql/CMakeFiles/libmysql.dir/all] Error 2

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [meta-oe][PATCH v2] mariadb: update to 5.5.38
  2014-08-08  0:45       ` Martin Jansa
  2014-08-08 10:02         ` Martin Jansa
@ 2014-08-08 13:01         ` Paul Eggleton
  1 sibling, 0 replies; 14+ messages in thread
From: Paul Eggleton @ 2014-08-08 13:01 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-devel

On Friday 08 August 2014 02:45:07 Martin Jansa wrote:
> On Thu, Aug 07, 2014 at 02:31:55PM +0100, Paul Eggleton wrote:
> > * Upstream switched from autotools to cmake
> > * Separate build dir and parallel make now work
> > * Library versioning no longer used for plugins; other libtool cruft
> >   gone
> > * Proper upstream initscript
> > * Plugins moved from client library package to mariadb-server package
> > 
> >   (matches how Fedora packages these)
> > 
> > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> > ---
> > 
> > Changes since v1:
> > * Add readline and libaio to DEPENDS
> > * Disable usage of boost
> 
> Thanks for update, I've found few more differences between failing (after
> building world) and working (with minimal deps) build:
> 
> 646c646
> < -- Looking for include files valgrind/memcheck.h, valgrind/valgrind.h -
> found ---
> 
> > -- Looking for include files valgrind/memcheck.h, valgrind/valgrind.h -
> > not found
> 733c733
> < -- Looking for include file security/pam_appl.h - found
> ---
> 
> > -- Looking for include file security/pam_appl.h - not found
> 
> 759c759
> < -- Looking for event.h - found
> ---
> 
> > -- Looking for event.h - not found

PAM is an issue, I will fix that one. The other two are unconditional checks, 
but actually making use of the dependency is off by default regardless of 
whether or not it is present (don't you just love consistency...)

> There is also floating systemtap-native dependency which enables DTRACE
> support in mariadb (see mariadb-5.5.38/cmake/dtrace.cmake).

OK, I'll explicitly set ENABLE_DTRACE to FALSE then.
 
> And groff-native is the cause for following error:
> | Scanning dependencies of target ps
> | make[2]: Leaving directory `/work/i586-oe-linux/mariadb/5.5.38-r0/build'
> | make -f dbug/CMakeFiles/ps.dir/build.make dbug/CMakeFiles/ps.dir/build
> | make[2]: Entering directory `/work/i586-oe-linux/mariadb/5.5.38-r0/build'
> | /sysroots/x86_64-linux/usr/bin/cmake -E cmake_progress_report
> | /work/i586-oe-linux/mariadb/5.5.38-r0/build/CMakeFiles [ 84%] Generating
> | example3.r
> | cd /work/i586-oe-linux/mariadb/5.5.38-r0/build/dbug && sed -e
> | 's!\\!\\\\!g'
> | </work/i586-oe-linux/mariadb/5.5.38-r0/mariadb-5.5.38/dbug/example3.c
> | >example3.r /sysroots/x86_64-linux/usr/bin/cmake -E cmake_progress_report
> | /work/i586-oe-linux/mariadb/5.5.38-r0/build/CMakeFiles [ 84%] Generating
> | output1.r, output2.r, output3.r, output4.r, output5.r cd
> | /work/i586-oe-linux/mariadb/5.5.38-r0/build/dbug && ./factorial 1 2 3 4 5
> | > output1.r ./factorial: /lib/i386-linux-gnu/libc.so.6: version
> | `GLIBC_2.17' not found (required by ./factorial) make[2]: ***
> | [dbug/output1.r] Error 1
> | make[2]: Leaving directory `/work/i586-oe-linux/mariadb/5.5.38-r0/build'
> | make[1]: *** [dbug/CMakeFiles/ps.dir/all] Error 2
> | make[1]: Leaving directory `/work/i586-oe-linux/mariadb/5.5.38-r0/build'
> | make: *** [all] Error 2
> | ERROR: oe_runmake failed
> 
> Adding -DGROFF=False -DNROFF=False to EXTRA_OECMAKE allowed me to build it
> after world, but please check other floating deps as well.

OK, I'll add those.

Thanks,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: [meta-oe][PATCH v2] mariadb: update to 5.5.38
  2014-08-08 10:02         ` Martin Jansa
@ 2014-08-08 13:05           ` Paul Eggleton
  2014-08-08 13:52             ` Martin Jansa
  0 siblings, 1 reply; 14+ messages in thread
From: Paul Eggleton @ 2014-08-08 13:05 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-devel

On Friday 08 August 2014 12:02:08 Martin Jansa wrote:
> And now it failed on jenkins builder (maybe because this one is using
> gold)
> 
> | cd
> | /home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/
> | mariadb/5.5.38-r0/build/storage/myisam &&
> | /home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/
> | arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc  -DHAVE_CONFIG_H -Wall 
> | -march=armv5te -marm -mthumb-interwork 
> | --sysroot=/home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/qemuarm 
> | -O2 -pipe -g -feliminate-unused-debug-types -fPIC -O2 -g -DNDEBUG
> | -DDBUG_OFF
> | -I/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueab
> | i/mariadb/5.5.38-r0/build/include
> | -I/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueab
> | i/mariadb/5.5.38-r0/mariadb-5.5.38/include
> | -I/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueab
> | i/mariadb/5.5.38-r0/mariadb-5.5.38/sql
> | -I/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueab
> | i/mariadb/5.5.38-r0/mariadb-5.5.38/regex
> | -I/home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/qemuarm/usr/include
> |     -fvisibility=hidden -o CMakeFiles/myisam.dir/mi_create.c.o   -c
> | /home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/
> | mariadb/5.5.38-r0/mariadb-5.5.38/storage/myisam/mi_create.c
> | /home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/libe
> | xec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.1/ld: error:
> | /home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/
> | mariadb/5.5.38-r0/build/libmysql/libmysql_versions.ld:155:9: invalid use
> | of VERSION in input file collect2: error: ld returned 1 exit status
> | make[2]: *** [libmysql/libmysqlclient.so.18..0] Error 1
> | make[2]: Leaving directory
> | `/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi
> | /mariadb/5.5.38-r0/build' make[1]: ***
> | [libmysql/CMakeFiles/libmysql.dir/all] Error 2

I'm really not sure what to do about this. There is a bug report about this 
here:

  https://sourceware.org/bugzilla/show_bug.cgi?id=16895

Unfortunately there is no viable workaround or patch either in the linked 
gentoo/mariadb bugs.

Any suggestions?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: [meta-oe][PATCH v2] mariadb: update to 5.5.38
  2014-08-08 13:05           ` Paul Eggleton
@ 2014-08-08 13:52             ` Martin Jansa
  2014-08-08 14:16               ` [meta-oe][PATCH v3] " Paul Eggleton
  0 siblings, 1 reply; 14+ messages in thread
From: Martin Jansa @ 2014-08-08 13:52 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2701 bytes --]

On Fri, Aug 08, 2014 at 02:05:42PM +0100, Paul Eggleton wrote:
> On Friday 08 August 2014 12:02:08 Martin Jansa wrote:
> > And now it failed on jenkins builder (maybe because this one is using
> > gold)
> > 
> > | cd
> > | /home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/
> > | mariadb/5.5.38-r0/build/storage/myisam &&
> > | /home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/
> > | arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc  -DHAVE_CONFIG_H -Wall 
> > | -march=armv5te -marm -mthumb-interwork 
> > | --sysroot=/home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/qemuarm 
> > | -O2 -pipe -g -feliminate-unused-debug-types -fPIC -O2 -g -DNDEBUG
> > | -DDBUG_OFF
> > | -I/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueab
> > | i/mariadb/5.5.38-r0/build/include
> > | -I/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueab
> > | i/mariadb/5.5.38-r0/mariadb-5.5.38/include
> > | -I/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueab
> > | i/mariadb/5.5.38-r0/mariadb-5.5.38/sql
> > | -I/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueab
> > | i/mariadb/5.5.38-r0/mariadb-5.5.38/regex
> > | -I/home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/qemuarm/usr/include
> > |     -fvisibility=hidden -o CMakeFiles/myisam.dir/mi_create.c.o   -c
> > | /home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/
> > | mariadb/5.5.38-r0/mariadb-5.5.38/storage/myisam/mi_create.c
> > | /home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/libe
> > | xec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.1/ld: error:
> > | /home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/
> > | mariadb/5.5.38-r0/build/libmysql/libmysql_versions.ld:155:9: invalid use
> > | of VERSION in input file collect2: error: ld returned 1 exit status
> > | make[2]: *** [libmysql/libmysqlclient.so.18..0] Error 1
> > | make[2]: Leaving directory
> > | `/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi
> > | /mariadb/5.5.38-r0/build' make[1]: ***
> > | [libmysql/CMakeFiles/libmysql.dir/all] Error 2
> 
> I'm really not sure what to do about this. There is a bug report about this 
> here:
> 
>   https://sourceware.org/bugzilla/show_bug.cgi?id=16895
> 
> Unfortunately there is no viable workaround or patch either in the linked 
> gentoo/mariadb bugs.
> 
> Any suggestions?

When I've found this, I was looking on u-boot hack to use ld.bfd instead
of default ld, maybe we can temporary add something similar here.

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* [meta-oe][PATCH v3] mariadb: update to 5.5.38
  2014-08-08 13:52             ` Martin Jansa
@ 2014-08-08 14:16               ` Paul Eggleton
  0 siblings, 0 replies; 14+ messages in thread
From: Paul Eggleton @ 2014-08-08 14:16 UTC (permalink / raw)
  To: openembedded-devel

* Upstream switched from autotools to cmake
* Separate build dir and parallel make now work
* Library versioning no longer used for plugins; other libtool cruft
  gone
* Proper upstream initscript
* Plugins moved from client library package to mariadb-server package
  (matches how Fedora packages these)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---

Changes since v2:
* Disable floating dependency on libpam
* Disable floating dependency on systemtap-native by disabling dtrace
* Disable usage of groff/nroff
* Disable linking with gold

 ...b-native_5.1.67.bb => mariadb-native_5.5.38.bb} |   5 +-
 .../mysql/mariadb/Makefile.am.patch                |  19 -
 .../mariadb/avoid-plugin-options-warnings.patch    |  17 -
 .../mysql/mariadb/configure-ps-cache-check.patch   |  27 --
 .../mysql/mariadb/configure.in.patch               |  13 -
 .../mysql/mariadb/fix-cmake-module-path.patch      |  29 ++
 .../mysql/mariadb/fix-cve-2013-1861-1.patch        | 174 ---------
 .../mysql/mariadb/fix-cve-2013-1861-2.patch        | 257 -------------
 .../mysql/mariadb/fix-link-error-ub1310.patch      |  37 --
 .../mysql/mariadb/fix-mysqlclient-r-version.patch  | 161 ++++++++
 .../mysql/mariadb/fix_host_path.patch              |  37 --
 .../recipes-support/mysql/mariadb/misc.m4.patch    |  13 -
 meta-oe/recipes-support/mysql/mariadb/my.cnf       |   1 +
 meta-oe/recipes-support/mysql/mariadb/mysqld.sh    |  24 --
 .../recipes-support/mysql/mariadb/plug.in.patch    | 405 ---------------------
 .../mysql/mariadb/remove-bad-path.patch            |  18 +
 ...orage-forbids-absolute-addresses-on-IA-32.patch |  44 ---
 .../mariadb/zlib-let-libdir-configurable.patch     |  63 ----
 .../mysql/{mariadb_5.1.67.bb => mariadb_5.5.38.bb} |   4 +-
 .../{mariadb_5.1.67.inc => mariadb_5.5.38.inc}     | 125 ++++---
 20 files changed, 286 insertions(+), 1187 deletions(-)
 rename meta-oe/recipes-support/mysql/{mariadb-native_5.1.67.bb => mariadb-native_5.5.38.bb} (71%)
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/Makefile.am.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/avoid-plugin-options-warnings.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/configure-ps-cache-check.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/configure.in.patch
 create mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-1.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-2.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-link-error-ub1310.patch
 create mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix_host_path.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/misc.m4.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/mysqld.sh
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/plug.in.patch
 create mode 100644 meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/storage-forbids-absolute-addresses-on-IA-32.patch
 delete mode 100644 meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch
 rename meta-oe/recipes-support/mysql/{mariadb_5.1.67.bb => mariadb_5.5.38.bb} (86%)
 rename meta-oe/recipes-support/mysql/{mariadb_5.1.67.inc => mariadb_5.5.38.inc} (64%)

diff --git a/meta-oe/recipes-support/mysql/mariadb-native_5.1.67.bb b/meta-oe/recipes-support/mysql/mariadb-native_5.5.38.bb
similarity index 71%
rename from meta-oe/recipes-support/mysql/mariadb-native_5.1.67.bb
rename to meta-oe/recipes-support/mysql/mariadb-native_5.5.38.bb
index 942afcc..9148dee 100644
--- a/meta-oe/recipes-support/mysql/mariadb-native_5.1.67.bb
+++ b/meta-oe/recipes-support/mysql/mariadb-native_5.5.38.bb
@@ -7,14 +7,13 @@ DEPENDS = "ncurses-native zlib-native"
 RDEPENDS_${PN} = ""
 PACKAGES = ""
 EXTRA_OEMAKE = ""
-EXTRA_OECONF = " --with-embedded-server "
 
 do_install() {
     oe_runmake 'DESTDIR=${D}' install
-    mv -f ${D}${libdir}/mysql/* ${D}${libdir}
-    rmdir ${D}${libdir}/mysql
 
     install -d ${D}${bindir}
     install -m 0755 sql/gen_lex_hash ${D}${bindir}/
+    install -m 0755 extra/comp_err ${D}${bindir}/
+    install -m 0755 scripts/comp_sql ${D}${bindir}/
 }
 
diff --git a/meta-oe/recipes-support/mysql/mariadb/Makefile.am.patch b/meta-oe/recipes-support/mysql/mariadb/Makefile.am.patch
deleted file mode 100644
index 33fd17a..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/Makefile.am.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: mysql-5.1.40/sql/Makefile.am
-===================================================================
---- mysql-5.1.40.orig/sql/Makefile.am
-+++ mysql-5.1.40/sql/Makefile.am
-@@ -174,10 +174,10 @@ link_sources:
- # This generates lex_hash.h
- # NOTE Built sources should depend on their sources not the tool
- # this avoid the rebuild of the built files in a source dist
--lex_hash.h:	gen_lex_hash.cc lex.h
--		$(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
--		./gen_lex_hash$(EXEEXT) > $@-t
--		$(MV) $@-t $@
-+GEN_LEX_HASH = ./gen_lex_hash$(EXEEXT)
-+
-+lex_hash.h:	gen_lex_hash$(EXEEXT)
-+		$(GEN_LEX_HASH) > $@
- 
- # For testing of udf_example.so
- udf_example_la_SOURCES= udf_example.c
diff --git a/meta-oe/recipes-support/mysql/mariadb/avoid-plugin-options-warnings.patch b/meta-oe/recipes-support/mysql/mariadb/avoid-plugin-options-warnings.patch
deleted file mode 100644
index 84ff6f0..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/avoid-plugin-options-warnings.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Tell autoconf about with-plugin option to avoid warnings like:
-configure: WARNING: unrecognized options: --with-plugin-maria
-
-Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-
-Index: mariadb-5.1.67/config/ac-macros/plugins.m4
-===================================================================
---- mariadb-5.1.67.orig/config/ac-macros/plugins.m4
-+++ mariadb-5.1.67/config/ac-macros/plugins.m4
-@@ -38,6 +38,7 @@ AC_DEFUN([_MYSQL_PLUGIN],[
-   _MYSQL_PLUGAPPEND([__mysql_plugin_list__],[$1])
-   m4_define([MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]), [$3])
-   m4_define([MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]), [$4])
-+  m4_ifdef([_AC_ENABLE_IF], [_AC_ENABLE_IF([with],[plugin-$1])])
-   _MYSQL_PLUGAPPEND_META([$1], $5)
-   ifelse(m4_bregexp(__mysql_include__,[/plug\.in$]),-1,[],[
-      MYSQL_PLUGIN_DIRECTORY([$1],
diff --git a/meta-oe/recipes-support/mysql/mariadb/configure-ps-cache-check.patch b/meta-oe/recipes-support/mysql/mariadb/configure-ps-cache-check.patch
deleted file mode 100644
index 3b5b3fd..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/configure-ps-cache-check.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Index: mysql-4.1.22/configure.in
-===================================================================
---- mysql-4.1.22.orig/configure.in	2009-01-28 16:33:28.000000000 +0000
-+++ mysql-4.1.22/configure.in	2009-01-28 16:43:26.000000000 +0000
-@@ -471,8 +471,8 @@
- 
- # Lock for PS
- AC_PATH_PROG(PS, ps, ps)
--AC_MSG_CHECKING("how to check if pid exists")
--PS=$ac_cv_path_PS
-+AC_CACHE_CHECK([how to check if pid exists], [ac_cv_FIND_PROC],
-+[
- # Linux style
- if $PS p $$ 2> /dev/null | grep $0 > /dev/null
- then
-@@ -511,8 +511,9 @@
-       AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
-   esac
- fi
--AC_SUBST(FIND_PROC)
--AC_MSG_RESULT("$FIND_PROC")
-+ac_cv_FIND_PROC="$FIND_PROC"
-+])
-+AC_SUBST([FIND_PROC], [$ac_cv_FIND_PROC])
- 
- # Check if a pid is valid
- AC_PATH_PROG(KILL, kill, kill)
diff --git a/meta-oe/recipes-support/mysql/mariadb/configure.in.patch b/meta-oe/recipes-support/mysql/mariadb/configure.in.patch
deleted file mode 100644
index 6fe2dfa..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/configure.in.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: mysql-5.1.40/configure.in
-===================================================================
---- mysql-5.1.40.orig/configure.in
-+++ mysql-5.1.40/configure.in
-@@ -226,8 +226,6 @@ else
-   AC_PATH_PROG(AS, as, as)
- fi
- 
--# Still need ranlib for readline; local static use only so no libtool.
--AC_PROG_RANLIB
- # We use libtool
- #AC_LIBTOOL_WIN32_DLL
- AC_PROG_LIBTOOL
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch b/meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch
new file mode 100644
index 0000000..8d9f558
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch
@@ -0,0 +1,29 @@
+Avoid CMAKE_MODULE_PATH being overwritten
+
+OE-Core's setting of CMAKE_MODULE_PATH stomps on MariaDB's value unless
+we set it after setting the project name.
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+Upstream-Status: Inappropriate [working around OE-Core bug]
+
+--- mariadb/CMakeLists.txt	2014-07-17 11:01:07.676353047 +0100
++++ mariadb/CMakeLists.txt	2014-07-17 11:01:31.299353107 +0100
+@@ -28,8 +28,6 @@
+ 
+ MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}")
+ 
+-SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
+-
+ # Distinguish between community and non-community builds, with the
+ # default being a community build. This does not impact the feature
+ # set that will be compiled in; it's merely provided as a hint to
+@@ -77,6 +75,8 @@
+ ENDIF()
+ PROJECT(${MYSQL_PROJECT_NAME})
+ 
++SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
++
+ IF(BUILD_CONFIG)
+   INCLUDE(
+   ${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-1.patch b/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-1.patch
deleted file mode 100644
index df2e708..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-1.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From 24404044ad4c28026e400e1fcd85358f2060aa96 Mon Sep 17 00:00:00 2001
-From: Alexey Botchkov <holyfoot@askmonty.org>
-Date: Sun, 10 Mar 2013 23:08:05 +0400
-Subject: [PATCH] MDEV-4252 geometry query crashes server.       The bug was
- found by Alyssa Milburn.       If the number of points of a geometry feature
- read from       binary representation is greater than 0x10000000, then      
- the (uint32) (num_points * 16) will cut the higher byte,       which leads to
- various errors.       Fixed by additional check if (num_points >
- max_n_points).
-
-Upstream-Status: Backport
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
----
- mysql-test/r/gis.result |  3 +++
- mysql-test/t/gis.test   |  1 +
- sql/spatial.cc          | 27 ++++++++++++++++++---------
- sql/spatial.h           |  9 +++++----
- 4 files changed, 27 insertions(+), 13 deletions(-)
-
-diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
-index 8dad72f..69e73d0 100644
---- a/mysql-test/r/gis.result
-+++ b/mysql-test/r/gis.result
-@@ -1087,4 +1087,7 @@ NULL
- #
- SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
- ERROR 22007: Illegal non geometric '' value found during parsing
-+select astext(0x0100000000030000000100000000000010);
-+astext(0x0100000000030000000100000000000010)
-+NULL
- End of 5.1 tests
-diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
-index abda3e9..cc5d158 100644
---- a/mysql-test/t/gis.test
-+++ b/mysql-test/t/gis.test
-@@ -826,5 +826,6 @@ SELECT ISCLOSED(CONVERT(CONCAT('     ', 0x2), BINARY(20)));
- --error ER_ILLEGAL_VALUE_FOR_TYPE
- SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
- 
-+select astext(0x0100000000030000000100000000000010);
- 
- --echo End of 5.1 tests
-diff --git a/sql/spatial.cc b/sql/spatial.cc
-index eec028e..94d0238 100644
---- a/sql/spatial.cc
-+++ b/sql/spatial.cc
-@@ -556,7 +556,7 @@ bool Gis_line_string::get_data_as_wkt(String *txt, const char **end) const
-   n_points= uint4korr(data);
-   data += 4;
- 
--  if (n_points < 1 ||
-+  if (n_points < 1 || n_points > max_n_points ||
-       no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points) ||
-       txt->reserve(((MAX_DIGITS_IN_DOUBLE + 1)*2 + 1) * n_points))
-     return 1;
-@@ -594,7 +594,8 @@ int Gis_line_string::geom_length(double *len) const
-     return 1;
-   n_points= uint4korr(data);
-   data+= 4;
--  if (n_points < 1 || no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points))
-+  if (n_points < 1 || n_points > max_n_points ||
-+      no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points))
-     return 1;
- 
-   get_point(&prev_x, &prev_y, data);
-@@ -628,7 +629,7 @@ int Gis_line_string::is_closed(int *closed) const
-     return 0;
-   }
-   data+= 4;
--  if (n_points == 0 ||
-+  if (n_points == 0 || n_points > max_n_points ||
-       no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points))
-     return 1;
- 
-@@ -798,7 +799,8 @@ bool Gis_polygon::get_data_as_wkt(String *txt, const char **end) const
-       return 1;
-     n_points= uint4korr(data);
-     data+= 4;
--    if (no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points) ||
-+    if (n_points > max_n_points ||
-+        no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points) ||
- 	txt->reserve(2 + ((MAX_DIGITS_IN_DOUBLE + 1) * 2 + 1) * n_points))
-       return 1;
-     txt->qs_append('(');
-@@ -852,7 +854,8 @@ int Gis_polygon::area(double *ar, const char **end_of_data) const
-     if (no_data(data, 4))
-       return 1;
-     n_points= uint4korr(data);
--    if (no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points))
-+    if (n_points > max_n_points ||
-+        no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points))
-       return 1;
-     get_point(&prev_x, &prev_y, data+4);
-     data+= (4+SIZEOF_STORED_DOUBLE*2);
-@@ -888,7 +891,8 @@ int Gis_polygon::exterior_ring(String *result) const
-   n_points= uint4korr(data);
-   data+= 4;
-   length= n_points * POINT_DATA_SIZE;
--  if (no_data(data, length) || result->reserve(1+4+4+ length))
-+  if (n_points > max_n_points ||
-+      no_data(data, length) || result->reserve(1+4+4+ length))
-     return 1;
- 
-   result->q_append((char) wkb_ndr);
-@@ -973,7 +977,8 @@ int Gis_polygon::centroid_xy(double *x, double *y) const
-       return 1;
-     org_n_points= n_points= uint4korr(data);
-     data+= 4;
--    if (no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points))
-+    if (n_points > max_n_points ||
-+        no_data(data, (SIZEOF_STORED_DOUBLE*2) * n_points))
-       return 1;
-     get_point(&prev_x, &prev_y, data);
-     data+= (SIZEOF_STORED_DOUBLE*2);
-@@ -1260,7 +1265,8 @@ bool Gis_multi_line_string::get_data_as_wkt(String *txt,
-       return 1;
-     n_points= uint4korr(data + WKB_HEADER_SIZE);
-     data+= WKB_HEADER_SIZE + 4;
--    if (no_data(data, n_points * (SIZEOF_STORED_DOUBLE*2)) ||
-+    if (n_points > max_n_points ||
-+        no_data(data, n_points * (SIZEOF_STORED_DOUBLE*2)) ||
- 	txt->reserve(2 + ((MAX_DIGITS_IN_DOUBLE + 1) * 2 + 1) * n_points))
-       return 1;
-     txt->qs_append('(');
-@@ -1521,7 +1527,8 @@ bool Gis_multi_polygon::get_data_as_wkt(String *txt, const char **end) const
-         return 1;
-       uint32 n_points= uint4korr(data);
-       data+= 4;
--      if (no_data(data, (SIZEOF_STORED_DOUBLE * 2) * n_points) ||
-+      if (n_points > max_n_points ||
-+          no_data(data, (SIZEOF_STORED_DOUBLE * 2) * n_points) ||
- 	  txt->reserve(2 + ((MAX_DIGITS_IN_DOUBLE + 1) * 2 + 1) * n_points,
- 		       512))
- 	return 1;
-@@ -1604,6 +1611,8 @@ int Gis_multi_polygon::geometry_n(uint32 num, String *result) const
-       if (no_data(data, 4))
- 	return 1;
-       n_points= uint4korr(data);
-+      if (n_points > max_n_points)
-+        return 1;
-       data+= 4 + POINT_DATA_SIZE * n_points;
-     }
-   } while (--num);
-diff --git a/sql/spatial.h b/sql/spatial.h
-index 20b3856..7d25425 100644
---- a/sql/spatial.h
-+++ b/sql/spatial.h
-@@ -197,6 +197,11 @@ struct MBR
- class Geometry
- {
- public:
-+  // Maximum number of points in feature that can fit into String
-+  static const uint32 max_n_points=
-+    (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
-+    POINT_DATA_SIZE;
-+public:
-   Geometry() {}                               /* Remove gcc warning */
-   virtual ~Geometry() {}                        /* Remove gcc warning */
-   static void *operator new(size_t size, void *buffer)
-@@ -379,10 +384,6 @@ class Gis_point: public Geometry
- 
- class Gis_line_string: public Geometry
- {
--  // Maximum number of points in LineString that can fit into String
--  static const uint32 max_n_points=
--    (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
--    POINT_DATA_SIZE;
- public:
-   Gis_line_string() {}                        /* Remove gcc warning */
-   virtual ~Gis_line_string() {}               /* Remove gcc warning */
--- 
-1.8.1.6
-
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-2.patch b/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-2.patch
deleted file mode 100644
index c35cdfb..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/fix-cve-2013-1861-2.patch
+++ /dev/null
@@ -1,257 +0,0 @@
-From 9f714cdd3bf4bd8ee06cd38dcd2c6e8990a4ec48 Mon Sep 17 00:00:00 2001
-From: Alexey Botchkov <holyfoot@askmonty.org>
-Date: Mon, 18 Mar 2013 17:58:00 +0400
-Subject: [PATCH] MDEV-4252 geometry query crashes server.     Additional fixes
- for possible overflows in length-related     calculations in 'spatial'
- implementations.     Checks added to the ::get_data_size() methods.    
- max_n_points decreased to occupy less 2G size. An     object of that size is
- practically inoperable anyway.
-
-Upstream-Status: Backport
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
----
- mysql-test/r/gis.result | 12 +++++++++
- mysql-test/t/gis.test   |  6 +++++
- sql/spatial.cc          | 67 ++++++++++++++++++++++++++++++++++---------------
- sql/spatial.h           |  2 +-
- 4 files changed, 66 insertions(+), 21 deletions(-)
-
-diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
-index 69e73d0..7566f0b 100644
---- a/mysql-test/r/gis.result
-+++ b/mysql-test/r/gis.result
-@@ -1087,7 +1087,19 @@ NULL
- #
- SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
- ERROR 22007: Illegal non geometric '' value found during parsing
-+#
-+# MDEV-4252 geometry query crashes server
-+#
- select astext(0x0100000000030000000100000000000010);
- astext(0x0100000000030000000100000000000010)
- NULL
-+select envelope(0x0100000000030000000100000000000010);
-+envelope(0x0100000000030000000100000000000010)
-+NULL
-+select geometryn(0x0100000000070000000100000001030000000200000000000000ffff0000, 1);
-+geometryn(0x0100000000070000000100000001030000000200000000000000ffff0000, 1)
-+NULL
-+select geometryn(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1);
-+geometryn(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1)
-+NULL
- End of 5.1 tests
-diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
-index cc5d158..c42541e 100644
---- a/mysql-test/t/gis.test
-+++ b/mysql-test/t/gis.test
-@@ -826,6 +826,12 @@ SELECT ISCLOSED(CONVERT(CONCAT('     ', 0x2), BINARY(20)));
- --error ER_ILLEGAL_VALUE_FOR_TYPE
- SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
- 
-+--echo #
-+--echo # MDEV-4252 geometry query crashes server
-+--echo #
- select astext(0x0100000000030000000100000000000010);
-+select envelope(0x0100000000030000000100000000000010);
-+select geometryn(0x0100000000070000000100000001030000000200000000000000ffff0000, 1);
-+select geometryn(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1);
- 
- --echo End of 5.1 tests
-diff --git a/sql/spatial.cc b/sql/spatial.cc
-index 94d0238..5a4b768 100644
---- a/sql/spatial.cc
-+++ b/sql/spatial.cc
-@@ -394,18 +394,19 @@ const char *Geometry::append_points(String *txt, uint32 n_points,
- const char *Geometry::get_mbr_for_points(MBR *mbr, const char *data,
- 					 uint offset) const
- {
--  uint32 points;
-+  uint32 n_points;
-   /* read number of points */
-   if (no_data(data, 4))
-     return 0;
--  points= uint4korr(data);
-+  n_points= uint4korr(data);
-   data+= 4;
- 
--  if (no_data(data, (SIZEOF_STORED_DOUBLE * 2 + offset) * points))
-+  if (n_points > max_n_points ||
-+      no_data(data, (POINT_DATA_SIZE + offset) * n_points))
-     return 0;
- 
-   /* Calculate MBR for points */
--  while (points--)
-+  while (n_points--)
-   {
-     data+= offset;
-     mbr->add_xy(data, data + SIZEOF_STORED_DOUBLE);
-@@ -484,9 +485,12 @@ const Geometry::Class_info *Gis_point::get_class_info() const
- 
- uint32 Gis_line_string::get_data_size() const 
- {
--  if (no_data(m_data, 4))
-+  uint32 n_points, size;
-+  if (no_data(m_data, 4) ||
-+      (n_points= uint4korr(m_data)) > max_n_points ||
-+      no_data(m_data, (size= 4 + n_points * POINT_DATA_SIZE)))
-     return GET_SIZE_ERROR;
--  return 4 + uint4korr(m_data) * POINT_DATA_SIZE;
-+  return size;
- }
- 
- 
-@@ -665,6 +669,9 @@ int Gis_line_string::end_point(String *result) const
-   if (no_data(m_data, 4))
-     return 1;
-   n_points= uint4korr(m_data);
-+  if (n_points == 0 || n_points > max_n_points ||
-+      no_data(m_data, POINT_DATA_SIZE * n_points))
-+    return 1;
-   return create_point(result, m_data + 4 + (n_points - 1) * POINT_DATA_SIZE);
- }
- 
-@@ -674,11 +681,14 @@ int Gis_line_string::point_n(uint32 num, String *result) const
-   uint32 n_points;
-   if (no_data(m_data, 4))
-     return 1;
-+  num--;
-   n_points= uint4korr(m_data);
--  if ((uint32) (num - 1) >= n_points) // means (num > n_points || num < 1)
-+  if (num >= n_points ||
-+      num > max_n_points || // means (num > n_points || num < 1)
-+      no_data(m_data, num * POINT_DATA_SIZE))
-     return 1;
- 
--  return create_point(result, m_data + 4 + (num - 1) * POINT_DATA_SIZE);
-+  return create_point(result, m_data + 4 + num*POINT_DATA_SIZE);
- }
- 
- const Geometry::Class_info *Gis_line_string::get_class_info() const
-@@ -692,6 +702,7 @@ const Geometry::Class_info *Gis_line_string::get_class_info() const
- uint32 Gis_polygon::get_data_size() const 
- {
-   uint32 n_linear_rings;
-+  uint32 n_points;
-   const char *data= m_data;
- 
-   if (no_data(data, 4))
-@@ -701,10 +712,13 @@ uint32 Gis_polygon::get_data_size() const
- 
-   while (n_linear_rings--)
-   {
--    if (no_data(data, 4))
-+    if (no_data(data, 4) ||
-+        (n_points= uint4korr(data)) > max_n_points)
-       return GET_SIZE_ERROR;
--    data+= 4 + uint4korr(data)*POINT_DATA_SIZE;
-+    data+= 4 + n_points*POINT_DATA_SIZE;
-   }
-+  if (no_data(data, 0))
-+    return GET_SIZE_ERROR;
-   return (uint32) (data - m_data);
- }
- 
-@@ -1037,9 +1051,14 @@ const Geometry::Class_info *Gis_polygon::get_class_info() const
- 
- uint32 Gis_multi_point::get_data_size() const 
- {
--  if (no_data(m_data, 4))
--    return GET_SIZE_ERROR;
--  return 4 + uint4korr(m_data)*(POINT_DATA_SIZE + WKB_HEADER_SIZE);
-+  uint32 n_points;
-+  uint32 size;
-+
-+  if (no_data(m_data, 4) ||
-+      (n_points= uint4korr(m_data)) > max_n_points ||
-+      no_data(m_data, (size= 4 + n_points*(POINT_DATA_SIZE + WKB_HEADER_SIZE))))
-+     return GET_SIZE_ERROR;
-+  return size;
- }
- 
- 
-@@ -1107,7 +1126,8 @@ bool Gis_multi_point::get_data_as_wkt(String *txt, const char **end) const
-     return 1;
- 
-   n_points= uint4korr(m_data);
--  if (no_data(m_data+4,
-+  if (n_points > max_n_points ||
-+      no_data(m_data+4,
- 	      n_points * (SIZEOF_STORED_DOUBLE * 2 + WKB_HEADER_SIZE)) ||
-       txt->reserve(((MAX_DIGITS_IN_DOUBLE + 1) * 2 + 1) * n_points))
-     return 1;
-@@ -1160,6 +1180,7 @@ const Geometry::Class_info *Gis_multi_point::get_class_info() const
- uint32 Gis_multi_line_string::get_data_size() const 
- {
-   uint32 n_line_strings;
-+  uint32 n_points;
-   const char *data= m_data;
- 
-   if (no_data(data, 4))
-@@ -1169,11 +1190,13 @@ uint32 Gis_multi_line_string::get_data_size() const
- 
-   while (n_line_strings--)
-   {
--    if (no_data(data, WKB_HEADER_SIZE + 4))
-+    if (no_data(data, WKB_HEADER_SIZE + 4) ||
-+        (n_points= uint4korr(data + WKB_HEADER_SIZE)) > max_n_points)
-       return GET_SIZE_ERROR;
--    data+= (WKB_HEADER_SIZE + 4 + uint4korr(data + WKB_HEADER_SIZE) *
--	    POINT_DATA_SIZE);
-+    data+= (WKB_HEADER_SIZE + 4 + n_points*POINT_DATA_SIZE);
-   }
-+  if (no_data(data, 0))
-+    return GET_SIZE_ERROR;
-   return (uint32) (data - m_data);
- }
- 
-@@ -1327,7 +1350,7 @@ int Gis_multi_line_string::geometry_n(uint32 num, String *result) const
-       return 1;
-     n_points= uint4korr(data + WKB_HEADER_SIZE);
-     length= WKB_HEADER_SIZE + 4+ POINT_DATA_SIZE * n_points;
--    if (no_data(data, length))
-+    if (n_points > max_n_points || no_data(data, length))
-       return 1;
-     if (!--num)
-       break;
-@@ -1407,6 +1430,7 @@ const Geometry::Class_info *Gis_multi_line_string::get_class_info() const
- uint32 Gis_multi_polygon::get_data_size() const 
- {
-   uint32 n_polygons;
-+  uint32 n_points;
-   const char *data= m_data;
- 
-   if (no_data(data, 4))
-@@ -1425,11 +1449,14 @@ uint32 Gis_multi_polygon::get_data_size() const
- 
-     while (n_linear_rings--)
-     {
--      if (no_data(data, 4))
-+      if (no_data(data, 4) ||
-+          (n_points= uint4korr(data)) > max_n_points)
- 	return GET_SIZE_ERROR;
--      data+= 4 + uint4korr(data) * POINT_DATA_SIZE;
-+      data+= 4 + n_points * POINT_DATA_SIZE;
-     }
-   }
-+  if (no_data(data, 0))
-+    return GET_SIZE_ERROR;
-   return (uint32) (data - m_data);
- }
- 
-diff --git a/sql/spatial.h b/sql/spatial.h
-index 7d25425..d7632c1 100644
---- a/sql/spatial.h
-+++ b/sql/spatial.h
-@@ -199,7 +199,7 @@ class Geometry
- public:
-   // Maximum number of points in feature that can fit into String
-   static const uint32 max_n_points=
--    (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
-+    (uint32) (INT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
-     POINT_DATA_SIZE;
- public:
-   Geometry() {}                               /* Remove gcc warning */
--- 
-1.8.1.6
-
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-link-error-ub1310.patch b/meta-oe/recipes-support/mysql/mariadb/fix-link-error-ub1310.patch
deleted file mode 100644
index a528ea7..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/fix-link-error-ub1310.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-mariadb-native: fix link error on Ubuntu 13.10
-
-Below errors only occurs on Ubuntu 13.10:
-
-$arch-linux-libtool: link: g++ ... -o .libs/mysqltest_embedded \
-    ../../libmysqld/.libs/libmysqld.so -ldl
-
-    ../../libmysqld/.libs/libmysqld.so: undefined reference to `dlopen'
-    ../../libmysqld/.libs/libmysqld.so: undefined reference to `dlclose'
-    ../../libmysqld/.libs/libmysqld.so: undefined reference to `dlerror'
-    ../../libmysqld/.libs/libmysqld.so: undefined reference to `dlsym'
-
-GCC/ld verion on the host:
-    gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1
-    GNU ld (GNU Binutils for Ubuntu) 2.23.52.20130913
-
-This is a strange behavior on Ub13.10, it fails even '-ldl' in the
-link command line. Below fix will append '-ldl' to dependency_libs
-in libmysqld.la.
-
-Upstream-Status: Submitted [https://mariadb.atlassian.net/browse/MDEV-5362]
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-================================================
-diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am
-index 7a2c92e..eee501e 100644
---- a/libmysqld/Makefile.am
-+++ b/libmysqld/Makefile.am
-@@ -92,7 +92,7 @@ INC_LIB=	$(top_builddir)/regex/libregex.la \
-                 @ndbcluster_libs@ @NDB_SCI_LIBS@ \
- 		@mysql_embedded_plugin_libs@ \
- 		$(libevent_inc_libs) \
--		$(yassl_inc_libs)
-+		$(yassl_inc_libs) @LIBDL@
- 
- if HAVE_YASSL
- yassl_inc_libs=	$(top_builddir)/extra/yassl/src/libyassl.la \
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch b/meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch
new file mode 100644
index 0000000..7516619
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch
@@ -0,0 +1,161 @@
+From 6db2a606196fb38a6d106dc409eee1cb9a40a440 Mon Sep 17 00:00:00 2001
+From: Tor Didriksen <tor.didriksen@oracle.com>
+Date: Mon, 24 Jun 2013 17:15:35 +0200
+Subject: [PATCH] Bug#16809055 MYSQL 5.6 AND 5.7 STILL USE LIBMYSQLCLIENT.SO.18
+
+With this patch, the libmysql/ directory contains:
+libmysqlclient.a
+libmysqlclient_r.a -> libmysqlclient.a
+libmysqlclient_r.so -> libmysqlclient.so*
+libmysqlclient_r.so.18 -> libmysqlclient.so.18*
+libmysqlclient_r.so.18.1.0 -> libmysqlclient.so.18.1.0*
+libmysqlclient.so -> libmysqlclient.so.18*
+libmysqlclient.so.18 -> libmysqlclient.so.18.1.0*
+libmysqlclient.so.18.1.0*
+
+This fixes libmysqlclient_r symlinks pointing to the unversioned
+libmysqlclient.so symlink (leading to package QA errors since the
+libmysqlclient-r package ends up depending on libmysqlclient-dev).
+
+Borrowed from MySQL 5.6 tree at https://github.com/percona/mysql/
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+---
+ cmake/install_macros.cmake | 25 +++++++++++++++----------
+ cmake/mysql_version.cmake  |  3 ++-
+ libmysql/CMakeLists.txt    | 36 ++++++++++++++++++++++++++++--------
+ 3 files changed, 45 insertions(+), 19 deletions(-)
+
+diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake
+index b8efdf8..a0d0e68 100644
+--- a/cmake/install_macros.cmake
++++ b/cmake/install_macros.cmake
+@@ -1,4 +1,4 @@
+-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
++# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+@@ -111,28 +111,33 @@ FUNCTION(INSTALL_SCRIPT)
+ ENDFUNCTION()
+ 
+ # Install symbolic link to CMake target. 
+-# the link is created in the same directory as target
+-# and extension will be the same as for target file.
+-MACRO(INSTALL_SYMLINK linkname target destination component)
++# We do 'cd path; ln -s target_name link_name'
++# We also add an INSTALL target for "${path}/${link_name}"
++MACRO(INSTALL_SYMLINK target target_name link_name destination component)
+ IF(UNIX)
+   GET_TARGET_PROPERTY(location ${target} LOCATION)
+   GET_FILENAME_COMPONENT(path ${location} PATH)
+-  GET_FILENAME_COMPONENT(name ${location} NAME)
+-  SET(output ${path}/${linkname})
++  MESSAGE(STATUS "target ${target}")
++  MESSAGE(STATUS "link_name ${link_name}")
++  MESSAGE(STATUS "target_name ${target_name}")
++  MESSAGE(STATUS "path ${path}")
++  MESSAGE(STATUS "")
++
++  SET(output ${path}/${link_name})
+   ADD_CUSTOM_COMMAND(
+     OUTPUT ${output}
+     COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${output}
+     COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink 
+-      ${name} 
+-      ${linkname}
++      ${target_name} 
++      ${link_name}
+     WORKING_DIRECTORY ${path}
+     DEPENDS ${target}
+     )
+   
+-  ADD_CUSTOM_TARGET(symlink_${linkname}
++  ADD_CUSTOM_TARGET(symlink_${link_name}
+     ALL
+     DEPENDS ${output})
+-  SET_TARGET_PROPERTIES(symlink_${linkname} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
++  SET_TARGET_PROPERTIES(symlink_${link_name} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+   IF(CMAKE_GENERATOR MATCHES "Xcode")
+     # For Xcode, replace project config with install config
+     STRING(REPLACE "${CMAKE_CFG_INTDIR}" 
+diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
+index be5760f..96286ff 100644
+--- a/libmysql/CMakeLists.txt
++++ b/libmysql/CMakeLists.txt
+@@ -180,6 +180,12 @@ IF(MSVC)
+  INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug)
+ ENDIF()
+ 
++MACRO(GET_TARGET_NAME target out_name)
++  GET_TARGET_PROPERTY(location ${target} LOCATION)
++  GET_FILENAME_COMPONENT(name ${location} NAME)
++  SET(${out_name} ${name})
++ENDMACRO()
++
+ IF(UNIX)
+   MACRO(GET_VERSIONED_LIBNAME LIBNAME EXTENSION VERSION OUTNAME)
+     SET(DOT_VERSION ".${VERSION}")
+@@ -192,7 +198,13 @@ IF(UNIX)
+       SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION})
+     ENDIF() 
+   ENDMACRO()
+-  INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} Development)
++ENDIF()
++
++IF(UNIX)
++  GET_TARGET_NAME(mysqlclient lib_name)
++  INSTALL_SYMLINK(mysqlclient
++    ${lib_name} ${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a
++    ${INSTALL_LIBDIR} Development)
+ ENDIF()
+ 
+ IF(NOT DISABLE_SHARED)
+@@ -205,10 +217,9 @@ IF(NOT DISABLE_SHARED)
+     # libtool compatability
+     IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
+       SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}")
+-    ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
+-      SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0")
+     ELSE()
+-      SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0")
++      SET(OS_SHARED_LIB_VERSION
++        "${SHARED_LIB_MAJOR_VERSION}.${SHARED_LIB_MINOR_VERSION}.0")
+     ENDIF()
+     # Name of shared library is mysqlclient on Unix
+     SET_TARGET_PROPERTIES(libmysql PROPERTIES 
+@@ -239,8 +250,13 @@ IF(NOT DISABLE_SHARED)
+       "${CMAKE_SHARED_LIBRARY_SUFFIX}"
+       ""
+       linkname)
+-    INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
+-    SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
++    GET_TARGET_NAME(libmysql lib_name)
++    GET_FILENAME_COMPONENT(lib_name_we ${lib_name} NAME_WE)
++    INSTALL_SYMLINK(libmysql
++      ${lib_name} ${linkname}
++      ${INSTALL_LIBDIR} SharedLibraries)
++    SET(OS_SHARED_LIB_SYMLINKS
++      "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
+     LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS)
+     FOREACH(ver ${OS_SHARED_LIB_SYMLINKS})
+       GET_VERSIONED_LIBNAME(
+@@ -248,7 +264,11 @@ IF(NOT DISABLE_SHARED)
+         "${CMAKE_SHARED_LIBRARY_SUFFIX}"
+         "${ver}"
+         linkname)
+-      INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
++      GET_VERSIONED_LIBNAME(
++        ${lib_name_we} "${CMAKE_SHARED_LIBRARY_SUFFIX}" "${ver}" lib_name_ver)
++      INSTALL_SYMLINK(libmysql
++        ${lib_name_ver} ${linkname}
++        ${INSTALL_LIBDIR} SharedLibraries)
+     ENDFOREACH()
+   ENDIF()
+ ENDIF()
+-- 
+2.0.3
+
diff --git a/meta-oe/recipes-support/mysql/mariadb/fix_host_path.patch b/meta-oe/recipes-support/mysql/mariadb/fix_host_path.patch
deleted file mode 100644
index 4f69cd5..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/fix_host_path.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- mysql-4.1.22/configure.in.old	2008-09-18 20:11:15.000000000 -0500
-+++ mysql-4.1.22/configure.in	2008-09-18 20:12:28.000000000 -0500
-@@ -456,9 +456,9 @@ else
-   fi
- fi
- 
--AC_SUBST(HOSTNAME)
--AC_SUBST(PERL)
--AC_SUBST(PERL5)
-+AC_SUBST(HOSTNAME,/bin/hostname)
-+AC_SUBST(PERL,$(bindir)/perl)
-+AC_SUBST(PERL5,$(bindir)/perl)
- 
- # for build ndb docs
- 
-@@ -516,16 +516,17 @@ AC_MSG_RESULT("$FIND_PROC")
- 
- # Check if a pid is valid
- AC_PATH_PROG(KILL, kill, kill)
-+AC_SUBST(KILL,/bin/kill)
- AC_MSG_CHECKING("for kill switches")
--if $ac_cv_path_KILL -0 $$
-+if $KILL -0 $$
- then
--  CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null"
-+  CHECK_PID="$KILL -0 \$\$PID > /dev/null 2> /dev/null"
- elif kill -s 0 $$
- then
--  CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
-+  CHECK_PID="$KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
- else
-   AC_MSG_WARN([kill -0 to check for pid seems to fail])
--    CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
-+    CHECK_PID="$KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
- fi
- AC_SUBST(CHECK_PID)
- AC_MSG_RESULT("$CHECK_PID")
diff --git a/meta-oe/recipes-support/mysql/mariadb/misc.m4.patch b/meta-oe/recipes-support/mysql/mariadb/misc.m4.patch
deleted file mode 100644
index 7b0acff..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/misc.m4.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: mysql-5.1.40/config/ac-macros/misc.m4
-===================================================================
---- mysql-5.1.40.orig/config/ac-macros/misc.m4
-+++ mysql-5.1.40/config/ac-macros/misc.m4
-@@ -476,7 +476,7 @@ AC_DEFUN([MYSQL_STACK_DIRECTION],
-  {
-    exit (find_stack_direction() < 0);
-  }], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
--   ac_cv_c_stack_direction=)])
-+   ac_cv_c_stack_direction=0)])
-  AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
- ])dnl
- 
diff --git a/meta-oe/recipes-support/mysql/mariadb/my.cnf b/meta-oe/recipes-support/mysql/mariadb/my.cnf
index d174381..f2c9b90 100644
--- a/meta-oe/recipes-support/mysql/mariadb/my.cnf
+++ b/meta-oe/recipes-support/mysql/mariadb/my.cnf
@@ -17,5 +17,6 @@ datadir 					= /var/mysql
 skip-external-locking
 skip-networking
 ignore-builtin-innodb
+default-storage-engine				= myisam
 bind-address					= localhost
 
diff --git a/meta-oe/recipes-support/mysql/mariadb/mysqld.sh b/meta-oe/recipes-support/mysql/mariadb/mysqld.sh
deleted file mode 100644
index 479ebdb..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/mysqld.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-# MySQL init script
-
-. /etc/default/rcS
-
-case "$1" in
-	start)
-		/usr/bin/mysqld_safe &
-		;;
-	stop)
-		if test -f /var/lib/mysql/mysqld.pid ; then
-			PID=`cat /var/lib/mysql/mysqld.pid`
-			kill $PID
-		fi
-		;;
-	restart)
-		$0 stop
-		$0 start
-		;;
-	*)
-		echo "Usage: /etc/init.d/mysqld {start|stop|restart}"
-		;;
-esac
-
-exit 0
diff --git a/meta-oe/recipes-support/mysql/mariadb/plug.in.patch b/meta-oe/recipes-support/mysql/mariadb/plug.in.patch
deleted file mode 100644
index 156fd10..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/plug.in.patch
+++ /dev/null
@@ -1,405 +0,0 @@
-diff --git a/storage/innodb_plugin/plug.in b/storage/innodb_plugin/plug.in
-index 7650251..3cc22c5 100644
---- a/storage/innodb_plugin/plug.in
-+++ b/storage/innodb_plugin/plug.in
-@@ -56,180 +56,10 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin,  [
-   esac
-   AC_SUBST(INNODB_DYNAMIC_CFLAGS)
- 
--  AC_MSG_CHECKING(whether GCC atomic builtins are available)
--  # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
--  AC_TRY_RUN(
--    [
--      int main()
--      {
--	long	x;
--	long	y;
--	long	res;
--	char	c;
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x, y);
--	if (!res || x != y) {
--          return(1);
--        }
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x + 1, y);
--	if (res || x != 10) {
--          return(1);
--        }
--
--	x = 10;
--	y = 123;
--	res = __sync_add_and_fetch(&x, y);
--	if (res != 123 + 10 || x != 123 + 10) {
--	  return(1);
--	}
--
--	c = 10;
--	res = __sync_lock_test_and_set(&c, 123);
--	if (res != 10 || c != 123) {
--	  return(1);
--	}
--
--	return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
--                [GCC atomic builtins are available])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
--  AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
--  # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
--  AC_TRY_RUN(
--    [
--      #include <pthread.h>
--      #include <string.h>
--
--      int main(int argc, char** argv) {
--        pthread_t       x1;
--        pthread_t       x2;
--        pthread_t       x3;
--
--	memset(&x1, 0x0, sizeof(x1));
--	memset(&x2, 0x0, sizeof(x2));
--	memset(&x3, 0x0, sizeof(x3));
--
--        __sync_bool_compare_and_swap(&x1, x2, x3);
--
--        return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
--                [pthread_t can be used by GCC atomic builtins])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
--  AC_MSG_CHECKING(whether Solaris libc atomic functions are available)
--  # Define HAVE_IB_SOLARIS_ATOMICS if _all_ of the following
--  # functions are present.
--  AC_CHECK_FUNCS(atomic_add_long_nv \
--		 atomic_cas_32 \
--		 atomic_cas_64 \
--		 atomic_cas_ulong \
--		 atomic_swap_uchar)
--
--  if test "${ac_cv_func_atomic_add_long_nv}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_32}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_64}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_ulong}" = "yes" -a \
--          "${ac_cv_func_atomic_swap_uchar}" = "yes" ; then
--
--    AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1],
--      [Define to 1 if Solaris libc atomic functions are available]
--    )
--  fi
--
--  AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions)
--  # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
--  AC_TRY_RUN(
--    [
--      #include <pthread.h>
--      #include <string.h>
--
--      int main(int argc, char** argv) {
--        pthread_t       x1;
--        pthread_t       x2;
--        pthread_t       x3;
--
--        memset(&x1, 0x0, sizeof(x1));
--        memset(&x2, 0x0, sizeof(x2));
--        memset(&x3, 0x0, sizeof(x3));
--
--        if (sizeof(pthread_t) == 4) {
--        
--          atomic_cas_32(&x1, x2, x3);
--        
--        } else if (sizeof(pthread_t) == 8) {
--        
--          atomic_cas_64(&x1, x2, x3);
--        
--        } else {
--        
--          return(1);
--        }
--
--	return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
--                [pthread_t can be used by solaris atomics])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
-   # this is needed to know which one of atomic_cas_32() or atomic_cas_64()
-   # to use in the source
-   AC_CHECK_SIZEOF([pthread_t], [], [#include <pthread.h>])
- 
--  # Check for x86 PAUSE instruction
--  AC_MSG_CHECKING(for x86 PAUSE instruction)
--  # We have to actually try running the test program, because of a bug
--  # in Solaris on x86_64, where it wrongly reports that PAUSE is not
--  # supported when trying to run an application. See
--  # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684
--  # We use ib_ prefix to avoid collisoins if this code is added to
--  # mysql's configure.in.
--  AC_TRY_RUN(
--    [
--      int main() {
--        __asm__ __volatile__ ("pause");
--        return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
-   ])
- 
- # vim: set ft=config:
-diff --git a/storage/xtradb/plug.in b/storage/xtradb/plug.in
-index 3fadacc..a33f4dc 100644
---- a/storage/xtradb/plug.in
-+++ b/storage/xtradb/plug.in
-@@ -56,215 +56,10 @@ MYSQL_PLUGIN_ACTIONS(xtradb,  [
-   esac
-   AC_SUBST(INNODB_DYNAMIC_CFLAGS)
- 
--  AC_MSG_CHECKING(whether GCC atomic builtins are available)
--  # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
--  AC_TRY_RUN(
--    [
--      int main()
--      {
--	long	x;
--	long	y;
--	long	res;
--	char	c;
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x, y);
--	if (!res || x != y) {
--          return(1);
--        }
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x + 1, y);
--	if (res || x != 10) {
--          return(1);
--        }
--
--	x = 10;
--	y = 123;
--	res = __sync_add_and_fetch(&x, y);
--	if (res != 123 + 10 || x != 123 + 10) {
--	  return(1);
--	}
--
--	c = 10;
--	res = __sync_lock_test_and_set(&c, 123);
--	if (res != 10 || c != 123) {
--	  return(1);
--	}
--	return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
--                [GCC atomic builtins are available])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
--  AC_MSG_CHECKING(whether GCC 64-bit atomic builtins are available)
--  # either define HAVE_IB_GCC_ATOMIC_BUILTINS_64 or not
--  AC_TRY_RUN(
--    [
--      #include <stdint.h>
--      int main()
--      {
--        int64_t x, y, res;
--
--	x = 10;
--	y = 123;
--	res = __sync_bool_compare_and_swap(&x, x, y);
--	if (!res || x != y) {
--	  return(1);
--	}
--
--	x = 10;
--	y = 123;
--	res = __sync_add_and_fetch(&x, y);
--	if (res != 123 + 10 || x != 123 + 10) {
--	  return(1);
--	}
--
--	return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS_64], [1],
--                [GCC 64-bit atomic builtins are available])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
--  AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
--  # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
--  AC_TRY_RUN(
--    [
--      #include <pthread.h>
--      #include <string.h>
--
--      int main(int argc, char** argv) {
--        pthread_t       x1;
--        pthread_t       x2;
--        pthread_t       x3;
--
--	memset(&x1, 0x0, sizeof(x1));
--	memset(&x2, 0x0, sizeof(x2));
--	memset(&x3, 0x0, sizeof(x3));
--
--        __sync_bool_compare_and_swap(&x1, x2, x3);
--
--        return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
--                [pthread_t can be used by GCC atomic builtins])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
--  AC_MSG_CHECKING(whether Solaris libc atomic functions are available)
--  # Define HAVE_IB_SOLARIS_ATOMICS if _all_ of the following
--  # functions are present.
--  AC_CHECK_FUNCS(atomic_add_long_nv \
--		 atomic_cas_32 \
--		 atomic_cas_64 \
--		 atomic_cas_ulong \
--		 atomic_swap_uchar)
--
--  if test "${ac_cv_func_atomic_add_long_nv}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_32}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_64}" = "yes" -a \
--          "${ac_cv_func_atomic_cas_ulong}" = "yes" -a \
--          "${ac_cv_func_atomic_swap_uchar}" = "yes" ; then
--
--    AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1],
--      [Define to 1 if Solaris libc atomic functions are available]
--    )
--  fi
--
--  AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions)
--  # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
--  AC_TRY_RUN(
--    [
--      #include <pthread.h>
--      #include <string.h>
--
--      int main(int argc, char** argv) {
--        pthread_t       x1;
--        pthread_t       x2;
--        pthread_t       x3;
--
--        memset(&x1, 0x0, sizeof(x1));
--        memset(&x2, 0x0, sizeof(x2));
--        memset(&x3, 0x0, sizeof(x3));
--
--        if (sizeof(pthread_t) == 4) {
--        
--          atomic_cas_32(&x1, x2, x3);
--        
--        } else if (sizeof(pthread_t) == 8) {
--        
--          atomic_cas_64(&x1, x2, x3);
--        
--        } else {
--        
--          return(1);
--        }
--
--	return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
--                [pthread_t can be used by solaris atomics])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
--
-   # this is needed to know which one of atomic_cas_32() or atomic_cas_64()
-   # to use in the source
-   AC_CHECK_SIZEOF([pthread_t], [], [#include <pthread.h>])
- 
--  # Check for x86 PAUSE instruction
--  AC_MSG_CHECKING(for x86 PAUSE instruction)
--  # We have to actually try running the test program, because of a bug
--  # in Solaris on x86_64, where it wrongly reports that PAUSE is not
--  # supported when trying to run an application. See
--  # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684
--  # We use ib_ prefix to avoid collisoins if this code is added to
--  # mysql's configure.in.
--  AC_TRY_RUN(
--    [
--      int main() {
--        __asm__ __volatile__ ("pause");
--        return(0);
--      }
--    ],
--    [
--      AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
--      AC_MSG_RESULT(yes)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ],
--    [
--      AC_MSG_RESULT(no)
--    ]
--  )
-   ])
- 
- # vim: set ft=config:
diff --git a/meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch b/meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch
new file mode 100644
index 0000000..ff26b0b
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch
@@ -0,0 +1,18 @@
+Remove host path from include directories
+
+Naturally this breaks cross-compilation if present.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+--- mariadb-5.5.38/storage/tokudb/ft-index/CMakeLists.txt	2014-07-17 14:37:04.529327998 +0100
++++ mariadb-5.5.38/storage/tokudb/ft-index/CMakeLists.txt	2014-07-17 14:43:56.991337895 +0100
+@@ -39,7 +39,6 @@
+ 
+ ## default includes and libraries
+ include_directories(SYSTEM
+-  /usr/local/include
+   ${ZLIB_INCLUDE_DIRS}
+   )
+ 
diff --git a/meta-oe/recipes-support/mysql/mariadb/storage-forbids-absolute-addresses-on-IA-32.patch b/meta-oe/recipes-support/mysql/mariadb/storage-forbids-absolute-addresses-on-IA-32.patch
deleted file mode 100644
index 0530cd9..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/storage-forbids-absolute-addresses-on-IA-32.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-storage: forbids absolute addresses on IA-32
-
-The shared lib has relocations in .text
-...
-WARNING: QA Issue: ELF binary '/usr/lib/plugin/ha_xtradb.so.0.0.0' has relocations in .text
-WARNING: QA Issue: ELF binary '/usr/lib/plugin/ha_innodb_plugin.so.0.0.0' has relocations in .text
-...
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- storage/innodb_plugin/plug.in |    2 +-
- storage/xtradb/plug.in        |    2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/storage/innodb_plugin/plug.in b/storage/innodb_plugin/plug.in
---- a/storage/innodb_plugin/plug.in
-+++ b/storage/innodb_plugin/plug.in
-@@ -50,7 +50,7 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin,  [
- 		;;
- 	*86)
- 		# Use absolute addresses on IA-32
--		INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
-+		# INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
- 		;;
-   esac
-   AC_SUBST(INNODB_DYNAMIC_CFLAGS)
-diff --git a/storage/xtradb/plug.in b/storage/xtradb/plug.in
-index a33f4dc..4c186fd 100644
---- a/storage/xtradb/plug.in
-+++ b/storage/xtradb/plug.in
-@@ -51,7 +51,7 @@ MYSQL_PLUGIN_ACTIONS(xtradb,  [
- 		;;
- 	*86)
- 		# Use absolute addresses on IA-32
--		INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
-+		# INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
- 		;;
-   esac
-   AC_SUBST(INNODB_DYNAMIC_CFLAGS)
--- 
-1.7.9.5
-
diff --git a/meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch b/meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch
deleted file mode 100644
index 880c2a7..0000000
--- a/meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-zlib: let lib dir configurable
-
-The zlib were found in $mysql_zlib_dir/lib, and the
-search will fail if zlib in $mysql_zlib_dir/lib64.
-
-Let lib dir configurable rather than hardcode.
-
-Upstream-Status: Pending
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- config/ac-macros/zlib.m4 | 12 ++++++------
- configure.in             |  8 ++++++++
- 2 files changed, 14 insertions(+), 6 deletions(-)
-
-diff --git a/config/ac-macros/zlib.m4 b/config/ac-macros/zlib.m4
---- a/config/ac-macros/zlib.m4
-+++ b/config/ac-macros/zlib.m4
-@@ -106,17 +106,17 @@ case $SYSTEM_TYPE in
-         ;;
-       *)
-         # Test for libz using all known library file endings
--        if test \( -f "$mysql_zlib_dir/lib/libz.a"  -o \
--                   -f "$mysql_zlib_dir/lib/libz.so" -o \
--                   -f "$mysql_zlib_dir/lib/libz.sl" -o \
--                   -f "$mysql_zlib_dir/lib/libz.dylib" \) \
-+        if test \( -f "$mysql_zlib_dir/$base_libdir/libz.a"  -o \
-+                   -f "$mysql_zlib_dir/$base_libdir/libz.so" -o \
-+                   -f "$mysql_zlib_dir/$base_libdir/libz.sl" -o \
-+                   -f "$mysql_zlib_dir/$base_libdir/libz.dylib" \) \
-                 -a -f "$mysql_zlib_dir/include/zlib.h"; then
-           ZLIB_INCLUDES="-I$mysql_zlib_dir/include"
--          ZLIB_LIBS="-L$mysql_zlib_dir/lib -lz"
-+          ZLIB_LIBS="-L$mysql_zlib_dir/$base_libdir -lz"
-           MYSQL_CHECK_ZLIB_DIR
-         fi
-         if test "x$mysql_cv_compress" != "xyes"; then 
--          AC_MSG_ERROR([headers or binaries were not found in $mysql_zlib_dir/{include,lib}])
-+          AC_MSG_ERROR([headers or binaries were not found in $mysql_zlib_dir/{include,$base_libdir}])
-         fi
-         ;;
-     esac
-diff --git a/configure.in b/configure.in
-index 2c6c08e..193b59a 100644
---- a/configure.in
-+++ b/configure.in
-@@ -104,6 +104,14 @@ AC_SUBST(SHARED_LIB_MAJOR_VERSION)
- AC_SUBST(SHARED_LIB_VERSION)
- AC_SUBST(AVAILABLE_LANGUAGES)
- 
-+AC_ARG_WITH([baselib-dir],
-+            AC_HELP_STRING([--baselib-dir=DIR],
-+                           [Provide MySQL with a custom location of
-+                           baselib dir. Given DIR, such as zlib binary is
-+                           assumed to be in $zlib-dir/$DIR.]),
-+            [base_libdir=${withval}],
-+            [base_libdir="lib"])
-+
- # Check whether a debug mode should be enabled.
- AC_ARG_WITH([debug],
-     AS_HELP_STRING([--with-debug@<:@=full@:>@],
--- 
-1.8.1.2
-
diff --git a/meta-oe/recipes-support/mysql/mariadb_5.1.67.bb b/meta-oe/recipes-support/mysql/mariadb_5.5.38.bb
similarity index 86%
rename from meta-oe/recipes-support/mysql/mariadb_5.1.67.bb
rename to meta-oe/recipes-support/mysql/mariadb_5.5.38.bb
index 6ad1fe6..fee5b62 100644
--- a/meta-oe/recipes-support/mysql/mariadb_5.1.67.bb
+++ b/meta-oe/recipes-support/mysql/mariadb_5.5.38.bb
@@ -1,6 +1,8 @@
 require ${PN}_${PV}.inc
 
-DEPENDS += "mariadb-native ncurses zlib"
+EXTRA_OECMAKE += "-DSTACK_DIRECTION=-1"
+
+DEPENDS += "mariadb-native ncurses zlib readline libaio"
 
 PROVIDES += "mysql5"
 
diff --git a/meta-oe/recipes-support/mysql/mariadb_5.1.67.inc b/meta-oe/recipes-support/mysql/mariadb_5.5.38.inc
similarity index 64%
rename from meta-oe/recipes-support/mysql/mariadb_5.1.67.inc
rename to meta-oe/recipes-support/mysql/mariadb_5.5.38.inc
index 0c83c71..e6eae78 100644
--- a/meta-oe/recipes-support/mysql/mariadb_5.1.67.inc
+++ b/meta-oe/recipes-support/mysql/mariadb_5.5.38.inc
@@ -4,31 +4,21 @@ SECTION = "libs"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
-SRC_URI = "http://mirrors.coreix.net/mariadb/mariadb-${PV}/kvm-tarbake-jaunty-x86/mariadb-${PV}.tar.gz \
-           file://configure.in.patch \
-           file://plug.in.patch \
-           file://misc.m4.patch \
-           file://Makefile.am.patch \
-           file://fix_host_path.patch \
-           file://configure-ps-cache-check.patch \
-           file://fix-cve-2013-1861-1.patch \
-           file://fix-cve-2013-1861-2.patch \
-           file://zlib-let-libdir-configurable.patch \
-           file://storage-forbids-absolute-addresses-on-IA-32.patch \
+SRC_URI = "http://mirror.stshosting.co.uk/mariadb/mariadb-${PV}/source/mariadb-${PV}.tar.gz \
+           file://fix-cmake-module-path.patch \
+           file://remove-bad-path.patch \
+           file://fix-mysqlclient-r-version.patch \
            file://my.cnf \
-           file://mysqld.sh \
-           file://avoid-plugin-options-warnings.patch \
-           file://fix-link-error-ub1310.patch \
           "
 
-SRC_URI[md5sum] = "44c331fa91943155e4796f89e17a0612"
-SRC_URI[sha256sum] = "33471e9275c9b03919cabc38eb39f807d645adabf6a1a18f2e41ed73f47677c8"
+SRC_URI[md5sum] = "fa9ba00b084b95a45fab70860c412f10"
+SRC_URI[sha256sum] = "efc839e6627064b3b5c6c39854198f0d34907f48937804758d4c09c7717be8d3"
 
 S = "${WORKDIR}/mariadb-${PV}"
 
 BINCONFIG_GLOB = "mysql_config"
 
-inherit autotools-brokensep binconfig update-rc.d useradd
+inherit cmake gettext binconfig update-rc.d useradd
 
 INITSCRIPT_PACKAGES = "${PN}-server"
 INITSCRIPT_NAME = "mysqld"
@@ -38,29 +28,51 @@ USERADD_PACKAGES = "${PN}-server"
 USERADD_PARAM_${PN}-server = "--system --home-dir /var/mysql -g nogroup --shell /bin/false mysql"
 
 
-export ac_cv_path_PS="/bin/ps"
-export ac_cv_FIND_PROC="/bin/ps p \$\$PID | grep -v grep | grep mysqld > /dev/null"
-PARALLEL_MAKE = " "
 EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'"
-EXTRA_OECONF = "--with-atomic-ops=up \
-                --with-embedded-server \
-                --sysconfdir=/etc/mysql \
-                --localstatedir=/var/mysql \
-                --disable-dependency-tracking \
-                --without-debug \
-                --with-low-memory \
-                --without-query-cache \
-                --without-plugin-maria \
-                --without-man \
-                --without-docs \
-                --with-zlib-dir=${STAGING_EXECPREFIXDIR} \
-                --with-baselib-dir=${base_libdir} \
-                --with-pic \
-                "
 
-do_configure_append() {
-    sed -i /comp_err/d ${B}/sql/share/Makefile
+python __anonymous() {
+    # This is a pain but it's the only way to pass these in since
+    # MariaDB's cmake scripts insist on prepending the prefix to the
+    # specified values for INSTALL_*
+    localdata = d.createCopy()
+    localdata.setVar('prefix', '')
+    localdata.setVar('exec_prefix', '')
+    d.setVar('bindir_noprefix', localdata.getVar('bindir', True).lstrip('/'))
+    d.setVar('sbindir_noprefix', localdata.getVar('sbindir', True).lstrip('/'))
+    d.setVar('datadir_noprefix', localdata.getVar('datadir', True).lstrip('/'))
+    d.setVar('libdir_noprefix', localdata.getVar('libdir', True).lstrip('/'))
+}
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam"
+
+# MariaDB doesn't link properly with gold
+# https://mariadb.atlassian.net/browse/MDEV-5982
+TARGET_CFLAGS += "-fuse-ld=bfd"
+
+EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \
+                 -DWITH_JEMALLOC=no \
+                 -DWITHOUT_TOKUDB=TRUE \
+                 -DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE \
+                 -DGROFF=FALSE \
+                 -DNROFF=FALSE \
+                 -DENABLE_DTRACE=FALSE \
+                 -DWITH_PIC=ON \
+                 -DINSTALL_DOCDIR:PATH=${datadir_noprefix}/doc/${BPN} \
+                 -DINSTALL_BINDIR:PATH=${bindir_noprefix} \
+                 -DINSTALL_SBINDIR:PATH=${sbindir_noprefix} \
+                 -DINSTALL_SCRIPTDIR:PATH=${bindir_noprefix} \
+                 -DINSTALL_LIBDIR:PATH=${libdir_noprefix} \
+                 -DINSTALL_PLUGINDIR:PATH=${libdir_noprefix}/plugin \
+                 -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \
+                 -DINSTALL_MYSQLSHAREDIR:PATH=${datadir_noprefix}/mysql \
+                 -DINSTALL_SUPPORTFILESDIR:PATH=${datadir_noprefix}/mysql-support-files \
+                 -DMYSQL_DATADIR:PATH=/var/mysql \
+                 -DCAT_EXECUTABLE=`which cat` \
+                 -DCMAKE_AR:FILEPATH=${AR}"
 
+do_configure_append() {
     # handle distros with different values of ${libexecdir}
     libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'`
     sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysql_install_db.sh
@@ -68,6 +80,20 @@ do_configure_append() {
     sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysqld_safe.sh
 }
 
+do_generate_toolchain_file_append_class-native () {
+    # If these are set cmake will assume we're cross-compiling, which will
+    # result in certain things we want being disabled
+    sed -i "/set( CMAKE_SYSTEM_NAME/d" ${WORKDIR}/toolchain.cmake
+    sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake
+}
+
+do_compile_prepend_class-target () {
+    # These need to be in-tree or make will think they need to be built,
+    # and since we're cross-compiling that is disabled
+    cp ${STAGING_BINDIR_NATIVE}/comp_err ${S}/extra
+    cp ${STAGING_BINDIR_NATIVE}/comp_sql ${S}/scripts
+}
+
 SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess"
 
 # We need to append this so it runs *after* binconfig's preprocess function
@@ -82,13 +108,10 @@ mariadb_sysroot_preprocess () {
 
 do_install() {
     oe_runmake 'DESTDIR=${D}' install
-    mv -f ${D}${libdir}/mysql/* ${D}${libdir}
-    rmdir ${D}${libdir}/mysql
-    find ${D}${libdir} -name '*.la'|xargs sed -i 's#${libdir}/mysql#${libdir}#'
 
-    install -d ${D}/etc/init.d
-    install -m 0644 ${WORKDIR}/my.cnf ${D}/etc/
-    install -m 0755 ${WORKDIR}/mysqld.sh ${D}/etc/init.d/mysqld
+    install -d ${D}/${sysconfdir}/init.d
+    install -m 0644 ${WORKDIR}/my.cnf ${D}/${sysconfdir}/
+    mv ${D}/${sysconfdir}/init.d/mysql ${D}/${sysconfdir}/init.d/mysqld
 }
 
 pkg_postinst_${PN}-server () {
@@ -102,7 +125,7 @@ pkg_postinst_${PN}-server () {
     mkdir /var/lib/mysql
     chown mysql.nogroup /var/lib/mysql
 
-    mysql_install_db
+    mysql_install_db --basedir=${prefix} --user=mysql
 
 }
 
@@ -130,19 +153,14 @@ RDEPENDS_${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-modu
     perl-module-io-socket-inet perl-module-io-select"
 
 FILES_libmysqlclient = "\
-    ${libdir}/libmysqlclient.so.* \
-    ${libdir}/plugin/*.so.*"
+    ${libdir}/libmysqlclient.so.*"
 FILES_libmysqlclient-dev = " \
     ${includedir}/mysql/ \
     ${libdir}/libmysqlclient.so \
-    ${libdir}/libmysqlclient.la \
-    ${libdir}/plugin/*.so \
-    ${libdir}/plugin/*.la \
     ${sysconfdir}/aclocal \
     ${bindir}/mysql_config"
 FILES_libmysqlclient-staticdev = "\
-    ${libdir}/*.a \
-    ${libdir}/plugin/*.a"
+    ${libdir}/*.a"
 FILES_libmysqlclient-dbg = "${libdir}/plugin/.debug/ \
     /usr/mysql-test/lib/My/SafeProcess/.debug/my_safe_process"
 
@@ -153,8 +171,7 @@ INSANE_SKIP_libmysqlclient_append_i586 = " textrel"
 
 FILES_libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*"
 FILES_libmysqlclient-r-dev = "\
-    ${libdir}/libmysqlclient_r.so \
-    ${libdir}/libmysqlclient_r.la"
+    ${libdir}/libmysqlclient_r.so"
 FILES_libmysqlclient-r-staticdev = "${libdir}/libmysqlclient_r.a"
 FILES_libmysqlclient-r-dbg = "${libdir}/plugin/.debuglibmysqlclient_r.so.*"
 
@@ -199,6 +216,7 @@ FILES_${PN}-server = "\
     ${bindir}/mysql_setpermission \
     ${bindir}/mysql_tzinfo_to_sql \
     ${bindir}/mysql_upgrade \
+    ${bindir}/mysql_plugin \
     ${bindir}/mysql_zap \
     ${bindir}/mysqlbinlog \
     ${bindir}/mysqld_multi \
@@ -225,6 +243,7 @@ FILES_${PN}-server = "\
     ${sbindir}/ndb_cpcd \
     ${sbindir}/ndbd \
     ${sbindir}/ndb_mgmd \
+    ${libdir}/plugin/*.so \
     ${datadir}/mysql/ \
     ${localstatedir}/mysql/ \
     ${sysconfdir}/init.d \
-- 
1.9.3



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

end of thread, other threads:[~2014-08-08 14:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-05 13:20 [meta-webserver/meta-oe][PATCH 0/5] Recipe upgrades Paul Eggleton
2014-08-05 13:20 ` [meta-webserver][PATCH 1/5] apache2: do not patch generated file Paul Eggleton
2014-08-05 13:20 ` [meta-webserver][PATCH 2/5] apache2: update to 2.4.10 Paul Eggleton
2014-08-05 13:20 ` [meta-webserver][PATCH 3/5] modphp: update to 5.5.15 Paul Eggleton
2014-08-05 13:20 ` [meta-webserver][PATCH 4/5] phpmyadmin: update to 4.2.7 Paul Eggleton
2014-08-05 13:20 ` [meta-oe][PATCH 5/5] mariadb: update to 5.5.38 Paul Eggleton
2014-08-06 19:22   ` Martin Jansa
2014-08-07 13:31     ` [meta-oe][PATCH v2] " Paul Eggleton
2014-08-08  0:45       ` Martin Jansa
2014-08-08 10:02         ` Martin Jansa
2014-08-08 13:05           ` Paul Eggleton
2014-08-08 13:52             ` Martin Jansa
2014-08-08 14:16               ` [meta-oe][PATCH v3] " Paul Eggleton
2014-08-08 13:01         ` [meta-oe][PATCH v2] " Paul Eggleton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.