Skip to contentSkip to conversation

package/mariadb: use host-openssl from buildroot-system

PATCH New Ryan Coe 4 participants 16 messages Sep 15, 2019 – Sep 30, 2019

lore
Share & tools
lore

Ryan Coe

author
#0 lore raw

PATCH 1/5 package/mariadb: use host-openssl from buildroot-system

From: Peter Seiderer <[email protected]>

- change WITH_SSL for host build from bundled to system (and add host-openssl dependency) to avoid the following configure failure:

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find GnuTLS (missing: GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR) (Required is at least version "3.3.24")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindGnuTLS.cmake:54 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) libmariadb/CMakeLists.txt:298 (FIND_PACKAGE)

---
 package/mariadb/mariadb.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/mariadb/mariadb.mk +2 -1
index bc22642beb..8aa10d6de1 100644
@@ -86,7 +86,8 @@ MARIADB_CONF_OPTS += \
 	-DMYSQL_DATADIR=/var/lib/mysql \
 	-DMYSQL_UNIX_ADDR=$(MYSQL_SOCKET)
 
-HOST_MARIADB_CONF_OPTS += -DWITH_SSL=OFF
+HOST_MARIADB_DEPENDENCIES = host-openssl
+HOST_MARIADB_CONF_OPTS += -DWITH_SSL=system
 
 # Some helpers must be compiled for host in order to crosscompile mariadb for
 # the target. They are then included by import_executables.cmake which is
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/5 package/mariadb: add bug tracker link to existing patch

---
 package/mariadb/0001-add-extra-check-for-librt.patch | 2 ++
 1 file changed, 2 insertions(+)
package/mariadb/0001-add-extra-check-for-librt.patch +2 -0
index 26bff7546c..90aa626a0b 100644
@@ -3,6 +3,8 @@ From: Ryan Coe <[email protected]>
 Date: Thu, 27 Oct 2016 20:33:21 -0700
 Subject: [PATCH] add extra check for librt
 
+https://jira.mariadb.org/browse/MDEV-10841
+
 Signed-off-by: Ryan Coe <[email protected]>
 ---
  configure.cmake | 3 +++
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/5 package/mariadb: add bug tracker link to existing patch

Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ryan" == Ryan Coe <[email protected]> writes:

Committed to 2019.02.x, 2019.05.x and 2019.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
author
#3 lore raw

PATCH 3/5 package/mariadb: bump to version 10.3.17

In reply to Ryan Coe

Release notes:
https://mariadb.com/kb/en/library/mariadb-10317-release-notes/

Changelog:
https://mariadb.com/kb/en/mariadb-10317-changelog/

Fixes the following security vulnerabilities:
CVE-2019-2805
CVE-2019-2740
CVE-2019-2739
CVE-2019-2737
CVE-2019-2758

---
 package/mariadb/mariadb.hash | 10 +++++-----
 package/mariadb/mariadb.mk   |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
package/mariadb/mariadb.hash +5 -5
index 839407463a..a6534d8d6a 100644
@@ -1,8 +1,8 @@
-# From https://downloads.mariadb.org/mariadb/10.3.16
-md5 11220d0b94c5c24caa2e1e9eaba38e31  mariadb-10.3.16.tar.gz
-sha1 6a4ee3be06f38b9aef1cd4f99099abea6a17de69  mariadb-10.3.16.tar.gz
-sha256 39e9723eaf620afd99b0925b2c2a5a50a89110ba50040adf14cce7cf89e5e21b  mariadb-10.3.16.tar.gz
-sha512 b22a8c8fa0265f88962432ade71c3f0ec554f7d38042def832cfcb50f3aa1dd77a715c76706ffeae679b95438529b06e98b73b7e219f9c645980802027ec022f  mariadb-10.3.16.tar.gz
+# From https://downloads.mariadb.org/mariadb/10.3.17
+md5 6bcee042bcc393cfcffeccbddbf6fe0e  mariadb-10.3.17.tar.gz
+sha1 16edbd4762c8804118dda10de713cbddc675df5a  mariadb-10.3.17.tar.gz
+sha256 20a1ea4fc59aae89dcc82aff0d4907b036daf9bfbd252f08162399f055097097  mariadb-10.3.17.tar.gz
+sha512 6fba995d8c284a12f19ee5635f5d69d8fa89fc314f512cd1764b2c4593933baf71a472ddce630463debd3bfbafa1cf5afee3f40d3c4062242f58cea16259561e  mariadb-10.3.17.tar.gz
 
 # Hash for license files
 sha256 a4665c1189fe31e0bbc27e9b55439df7dad6e99805407fe58d78da7aabe678f8  README.md
package/mariadb/mariadb.mk +1 -1
index 8aa10d6de1..c59235adb1 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-MARIADB_VERSION = 10.3.16
+MARIADB_VERSION = 10.3.17
 MARIADB_SITE = https://downloads.mariadb.org/interstitial/mariadb-$(MARIADB_VERSION)/source
 MARIADB_LICENSE = GPL-2.0 (server), GPL-2.0 with FLOSS exception (GPL client library), LGPL-2.0 (LGPL client library)
 # Tarball no longer contains LGPL license text
Signature · 1 line
2.17.1
#4 lore raw

PATCH 3/5 package/mariadb: bump to version 10.3.17

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ryan" == Ryan Coe <[email protected]> writes:

Release notes:
https://mariadb.com/kb/en/library/mariadb-10317-release-notes/

Changelog:
https://mariadb.com/kb/en/mariadb-10317-changelog/

Quoted 8 lines

Fixes the following security vulnerabilities:
CVE-2019-2805
CVE-2019-2740
CVE-2019-2739
CVE-2019-2737
CVE-2019-2758

Committed to 2019.02.x, 2019.05.x and 2019.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
author
#5 lore raw

PATCH 4/5 package/mariadb: bump to version 10.3.18

In reply to Ryan Coe

Release notes:
https://mariadb.com/kb/en/library/mariadb-10318-release-notes/

Changelog:
https://mariadb.com/kb/en/mariadb-10318-changelog/

---
 package/mariadb/mariadb.hash | 10 +++++-----
 package/mariadb/mariadb.mk   |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
package/mariadb/mariadb.hash +5 -5
index a6534d8d6a..a742d87daa 100644
@@ -1,8 +1,8 @@
-# From https://downloads.mariadb.org/mariadb/10.3.17
-md5 6bcee042bcc393cfcffeccbddbf6fe0e  mariadb-10.3.17.tar.gz
-sha1 16edbd4762c8804118dda10de713cbddc675df5a  mariadb-10.3.17.tar.gz
-sha256 20a1ea4fc59aae89dcc82aff0d4907b036daf9bfbd252f08162399f055097097  mariadb-10.3.17.tar.gz
-sha512 6fba995d8c284a12f19ee5635f5d69d8fa89fc314f512cd1764b2c4593933baf71a472ddce630463debd3bfbafa1cf5afee3f40d3c4062242f58cea16259561e  mariadb-10.3.17.tar.gz
+# From https://downloads.mariadb.org/mariadb/10.3.18
+md5 b3524c0825c3a1c255496daea38304a0  mariadb-10.3.18.tar.gz
+sha1 922a317edd6f44baacc49831ca278e7a9878a363  mariadb-10.3.18.tar.gz
+sha256 69456ca85bf9d96c6d28b4ade2a9f6787d79a602e27ef941f9ba4e0b55dddedc  mariadb-10.3.18.tar.gz
+sha512 817253d18f20c74f9ec8030678fd50a28b1726fd59153023a3a5e9b3f79e1f44d79feb24ae9ed72d8c1c04017110c932aba7be0610fb06245590c7f5610db242  mariadb-10.3.18.tar.gz
 
 # Hash for license files
 sha256 a4665c1189fe31e0bbc27e9b55439df7dad6e99805407fe58d78da7aabe678f8  README.md
package/mariadb/mariadb.mk +1 -1
index c59235adb1..6a18db48ab 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-MARIADB_VERSION = 10.3.17
+MARIADB_VERSION = 10.3.18
 MARIADB_SITE = https://downloads.mariadb.org/interstitial/mariadb-$(MARIADB_VERSION)/source
 MARIADB_LICENSE = GPL-2.0 (server), GPL-2.0 with FLOSS exception (GPL client library), LGPL-2.0 (LGPL client library)
 # Tarball no longer contains LGPL license text
Signature · 1 line
2.17.1
#6 lore raw

PATCH 4/5 package/mariadb: bump to version 10.3.18

Quoted 7 lines · On Sun, 15 Sep 2019 12:35:58 -0700 Ryan Coe <[email protected]> wrote:

Release notes:
https://mariadb.com/kb/en/library/mariadb-10318-release-notes/

Changelog:
https://mariadb.com/kb/en/mariadb-10318-changelog/

So, I assume you kept this separate from the 10.3.17 bump, because the 10.3.17 bump is a version bump that fixes security issues ?

Also, do these bumps require PATCH 1/5 ?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#7 lore raw

PATCH 4/5 package/mariadb: bump to version 10.3.18

Thomas, All,

Quoted 6 lines · Thomas Petazzoni
Quoted 3 lines · On Sun, 15 Sep 2019 12:35:58 -0700 Ryan Coe <[email protected]> wrote:

Release notes:
https://mariadb.com/kb/en/library/mariadb-10318-release-notes/

Quoted 6 lines
Quoted 4 lines

Changelog:
https://mariadb.com/kb/en/mariadb-10318-changelog/

So, I assume you kept this separate from the 10.3.17 bump, because the 10.3.17 bump is a version bump that fixes security issues ?

My apologies... Yes, 10.3.17 should be labeled as a security bump and it was separate to allow cherry-picking into the LTS branches.

Quoted 1 line

Also, do these bumps require PATCH 1/5 ?

Yes, this patch is needed even for the current version.

Quoted 3 lines

Thanks,

Thomas

author
#8 lore raw

PATCH 5/5 package/mariadb: fix build error with newer cmake

In reply to Ryan Coe

When using a newer host system cmake to build MariaDB, the following build error occurs:

CMake Error at cmake/os/Linux.cmake:29 (STRING):
STRING sub-command REPLACE requires at least four arguments. Call Stack (most recent call first):
CMakeLists.txt:101 (INCLUDE)

CMake Error at cmake/os/Linux.cmake:29 (STRING):
STRING sub-command REPLACE requires at least four arguments. Call Stack (most recent call first):
CMakeLists.txt:101 (INCLUDE)

---
 ...002-fix-build-error-with-newer-cmake.patch | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 package/mariadb/0002-fix-build-error-with-newer-cmake.patch
package/mariadb/0002-fix-build-error-with-newer-cmake.patch new file +44 -0
new file mode 100644
index 0000000000..02cee296cb
@@ -0,0 +1,44 @@
+From c90ae2ca3dff267b9e21595376d22de397f6f78f Mon Sep 17 00:00:00 2001
+From: Ryan Coe <[email protected]>
+Date: Tue, 20 Aug 2019 06:22:43 -0700
+Subject: [PATCH 1/1] Fix build error with newer cmake
+
+Fixes the following build error:
+
+CMake Error at cmake/os/Linux.cmake:29 (STRING):
+STRING sub-command REPLACE requires at least four arguments.
+Call Stack (most recent call first):
+CMakeLists.txt:101 (INCLUDE)
+
+CMake Error at cmake/os/Linux.cmake:29 (STRING):
+STRING sub-command REPLACE requires at least four arguments.
+Call Stack (most recent call first):
+CMakeLists.txt:101 (INCLUDE)
+
+https://jira.mariadb.org/browse/MDEV-20596
+
+Signed-off-by: Ryan Coe <[email protected]>
+---
+ cmake/os/Linux.cmake | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/cmake/os/Linux.cmake b/cmake/os/Linux.cmake
+index 50a2b21c838d8d6ca4cacc0704a9be4da3a57a0a..b871586acc9cfaddc3836cc9afafd85969120420 100644
+--- a/cmake/os/Linux.cmake
++++ b/cmake/os/Linux.cmake
+@@ -26,9 +26,9 @@ SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE=1)
+ 
+ # Fix CMake (< 2.8) flags. -rdynamic exports too many symbols.
+ FOREACH(LANG C CXX)
+-  STRING(REPLACE "-rdynamic" "" 
+-  CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS
+-  ${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS}  
++  STRING(REPLACE "-rdynamic" ""
++  "CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS"
++  "${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS}"
+   )
+ ENDFOREACH()
+ 
+-- 
+2.17.1
+
Signature · 1 line
2.17.1
#9 lore raw

PATCH 5/5 package/mariadb: fix build error with newer cmake

Hello Ryan,

Quoted 8 lines · On Sun, 15 Sep 2019 12:35:59 -0700 Ryan Coe <[email protected]> wrote:

When using a newer host system cmake to build MariaDB, the following build error occurs:

CMake Error at cmake/os/Linux.cmake:29 (STRING):
STRING sub-command REPLACE requires at least four arguments. Call Stack (most recent call first):
CMakeLists.txt:101 (INCLUDE)

Quoted 8 lines

CMake Error at cmake/os/Linux.cmake:29 (STRING):
STRING sub-command REPLACE requires at least four arguments. Call Stack (most recent call first):
CMakeLists.txt:101 (INCLUDE)

So, this error occurs with the mariadb version currently in Buildroot. So this patch is a fix that is unrelated to the version bumps. It should ideally appear *before* the version bumps in the patch series. No need to resend, but please confirm that it is independent of the version bumps.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#10 lore raw

PATCH 5/5 package/mariadb: fix build error with newer cmake

Thomas, All,

Quoted 18 lines · Thomas Petazzoni

Hello Ryan,

Quoted 13 lines · On Sun, 15 Sep 2019 12:35:59 -0700 Ryan Coe <[email protected]> wrote:

When using a newer host system cmake to build MariaDB, the following build error occurs:

CMake Error at cmake/os/Linux.cmake:29 (STRING):
STRING sub-command REPLACE requires at least four arguments. Call Stack (most recent call first):
CMakeLists.txt:101 (INCLUDE)

CMake Error at cmake/os/Linux.cmake:29 (STRING):
STRING sub-command REPLACE requires at least four arguments. Call Stack (most recent call first):
CMakeLists.txt:101 (INCLUDE)

Quoted 8 lines
Quoted 3 lines

So, this error occurs with the mariadb version currently in Buildroot. So this patch is a fix that is unrelated to the version bumps. It should ideally appear *before* the version bumps in the patch series. No need to resend, but please confirm that it is independent of the version bumps.

That is correct.? It is independent of the version bumps.? I will order differently in the future.

Quoted 3 lines

Thanks!

Thomas

#11 lore raw

PATCH 5/5 package/mariadb: fix build error with newer cmake

In reply to Ryan Coe
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ryan" == Ryan Coe <[email protected]> writes:

When using a newer host system cmake to build MariaDB, the following build error occurs:

CMake Error at cmake/os/Linux.cmake:29 (STRING):
STRING sub-command REPLACE requires at least four arguments. Call Stack (most recent call first):
CMakeLists.txt:101 (INCLUDE)

Quoted 8 lines

CMake Error at cmake/os/Linux.cmake:29 (STRING):
STRING sub-command REPLACE requires at least four arguments. Call Stack (most recent call first):
CMakeLists.txt:101 (INCLUDE)

Committed to 2019.02.x, 2019.05.x and 2019.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#12 lore raw

PATCH 1/5 package/mariadb: use host-openssl from buildroot-system

In reply to Ryan Coe

Hello Ryan,

Quoted 5 lines · On Sun, 15 Sep 2019 12:35:55 -0700 Ryan Coe <[email protected]> wrote:

From: Peter Seiderer <[email protected]>

- change WITH_SSL for host build from bundled to system (and add host-openssl dependency) to avoid the following configure failure:

Quoted 7 lines

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find GnuTLS (missing: GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR) (Required is at least version "3.3.24")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindGnuTLS.cmake:54 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) libmariadb/CMakeLists.txt:298 (FIND_PACKAGE)

We're not getting any build failures about mariadb. Under what conditions/configurations does the above error take place ?

Quoted 1 line

-HOST_MARIADB_CONF_OPTS += -DWITH_SSL=OFF

This says "SSL=OFF", not "use bundled SSL". Could you clarify ?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#13 lore raw

PATCH 1/5 package/mariadb: use host-openssl from buildroot-system

Thomas, Peter, All,

Quoted 17 lines · Thomas Petazzoni

Hello Ryan,

Quoted 5 lines · On Sun, 15 Sep 2019 12:35:55 -0700 Ryan Coe <[email protected]> wrote:

From: Peter Seiderer <[email protected]>

- change WITH_SSL for host build from bundled to system (and add host-openssl dependency) to avoid the following configure failure:

Quoted 7 lines

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find GnuTLS (missing: GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR) (Required is at least version "3.3.24")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindGnuTLS.cmake:54 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) libmariadb/CMakeLists.txt:298 (FIND_PACKAGE)

Quoted 5 lines

We're not getting any build failures about mariadb. Under what conditions/configurations does the above error take place ?

Quoted 1 line

-HOST_MARIADB_CONF_OPTS += -DWITH_SSL=OFF

This says "SSL=OFF", not "use bundled SSL". Could you clarify ?

MariaDB isn't built with the autobuilders.? Upstream no longer allows -DWITH_SSL=OFF as a configure option.? It will fail if it doesn't find host OpenSSL or GnuTLS headers.? The patch text should probably say "from off to system".? This patch was sent by Peter after the 10.3 bump but was never merged.? Thanks.

Quoted 3 lines

Thanks,

Thomas

#14 lore raw

PATCH 1/5 package/mariadb: use host-openssl from buildroot-system

In reply to Ryan Coe
Quoted 5 lines · Ryan Coe

From: Peter Seiderer <[email protected]>

- change WITH_SSL for host build from bundled to system (and add host-openssl dependency) to avoid the following configure failure:

Quoted 8 lines

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find GnuTLS (missing: GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR) (Required is at least version "3.3.24")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindGnuTLS.cmake:54 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) libmariadb/CMakeLists.txt:298 (FIND_PACKAGE)

I've added some of the feedback from Thomas to the commit message here and
applied the series to master, thanks. I've also put patch 5/5 as the second patch.

Peter, the first 3 are probably for backporting to both stable branches. The
version bump should definitely go to 2019.08.x, but I believe also 10.3.15 is affected by those CVEs so maybe the bump should be carried there as well...

Regards,
Arnout

Quoted 21 lines
---
 package/mariadb/mariadb.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/mariadb/mariadb.mk +2 -1
index bc22642beb..8aa10d6de1 100644
@@ -86,7 +86,8 @@ MARIADB_CONF_OPTS += \
 	-DMYSQL_DATADIR=/var/lib/mysql \
 	-DMYSQL_UNIX_ADDR=$(MYSQL_SOCKET)
 
-HOST_MARIADB_CONF_OPTS += -DWITH_SSL=OFF
+HOST_MARIADB_DEPENDENCIES = host-openssl
+HOST_MARIADB_CONF_OPTS += -DWITH_SSL=system
 
 # Some helpers must be compiled for host in order to crosscompile mariadb for
 # the target. They are then included by import_executables.cmake which is
#15 lore raw

PATCH 1/5 package/mariadb: use host-openssl from buildroot-system

In reply to Ryan Coe
Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ryan" == Ryan Coe <[email protected]> writes:

From: Peter Seiderer <[email protected]>
- change WITH_SSL for host build from bundled to system (and add host-openssl dependency) to avoid the following configure failure:

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find GnuTLS (missing: GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR) (Required is at least version "3.3.24")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindGnuTLS.cmake:54 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) libmariadb/CMakeLists.txt:298 (FIND_PACKAGE)

Quoted 2 lines

Committed to 2019.02.x, 2019.05.x and 2019.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard