kumquat-buildroot/package/mariadb/mariadb.mk

149 lines
5.3 KiB
Makefile
Raw Normal View History

################################################################################
#
# mariadb
#
################################################################################
MARIADB_VERSION = 10.3.30
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)
mariadb: security bump to version 10.1.23 Fixes: CVE-2017-3302 - Crash in libmysqlclient.so in Oracle MySQL before 5.6.21 and 5.7.x before 5.7.5 and MariaDB through 5.5.54, 10.0.x through 10.0.29, 10.1.x through 10.1.21, and 10.2.x through 10.2.3. CVE-2017-3313 - Vulnerability in the MySQL Server component of Oracle MySQL (subcomponent: Server: MyISAM). Supported versions that are affected are 5.5.53 and earlier, 5.6.34 and earlier and 5.7.16 and earlier. Difficult to exploit vulnerability allows low privileged attacker with logon to the infrastructure where MySQL Server executes to compromise MySQL Server. Successful attacks of this vulnerability can result in unauthorized access to critical data or complete access to all MySQL Server accessible data. CVE-2017-3308 - Vulnerability in the MySQL Server component of Oracle MySQL (subcomponent: Server: DML). Supported versions that are affected are 5.5.54 and earlier, 5.6.35 and earlier and 5.7.17 and earlier. Easily "exploitable" vulnerability allows low privileged attacker with network access via multiple protocols to compromise MySQL Server. While the vulnerability is in MySQL Server, attacks may significantly impact additional products. Successful attacks of this vulnerability can result in unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of MySQL Server. CVE-2017-3309 - Vulnerability in the MySQL Server component of Oracle MySQL (subcomponent: Server: Optimizer). Supported versions that are affected are 5.5.54 and earlier, 5.6.35 and earlier and 5.7.17 and earlier. Easily "exploitable" vulnerability allows low privileged attacker with network access via multiple protocols to compromise MySQL Server. While the vulnerability is in MySQL Server, attacks may significantly impact additional products. Successful attacks of this vulnerability can result in unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of MySQL Server. CVE-2017-3453 - Vulnerability in the MySQL Server component of Oracle MySQL (subcomponent: Server: Optimizer). Supported versions that are affected are 5.5.54 and earlier, 5.6.35 and earlier and 5.7.17 and earlier. Easily "exploitable" vulnerability allows low privileged attacker with network access via multiple protocols to compromise MySQL Server. Successful attacks of this vulnerability can result in unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of MySQL Server. CVE-2017-3456 - Vulnerability in the MySQL Server component of Oracle MySQL (subcomponent: Server: DML). Supported versions that are affected are 5.5.54 and earlier, 5.6.35 and earlier and 5.7.17 and earlier. Easily "exploitable" vulnerability allows high privileged attacker with network access via multiple protocols to compromise MySQL Server. Successful attacks of this vulnerability can result in unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of MySQL Server. CVE-2017-3464 - Vulnerability in the MySQL Server component of Oracle MySQL (subcomponent: Server: DDL). Supported versions that are affected are 5.5.54 and earlier, 5.6.35 and earlier and 5.7.17 and earlier. Easily "exploitable" vulnerability allows low privileged attacker with network access via multiple protocols to compromise MySQL Server. Successful attacks of this vulnerability can result in unauthorized update, insert or delete access to some of MySQL Server accessible data. And a number of important, but non-security related fixes: MDEV-12602: Fixed some race conditions in InnoDB encryption MariaDB Backup alpha introduced Galera wsrep library updated to 25.3.20 For details, see the release notes: https://mariadb.com/kb/en/mariadb/mariadb-10123-release-notes/ [Peter: drop COPYING.LESSER and add a reference to the bugtracker issue explaining why] Signed-off-by: Ryan Coe <bluemrp9@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2017-05-08 17:37:16 +02:00
# Tarball no longer contains LGPL license text
# https://jira.mariadb.org/browse/MDEV-12297
mariadb: bump version to 10.2.17 Release notes: https://mariadb.com/kb/en/mariadb-10217-release-notes/ Changelog: https://mariadb.com/kb/en/mariadb-10217-changelog/ Note that HOST_MARIADB_CONF_OPTS += -DWITH_SSL=bundled has been changed to HOST_MARIADB_CONF_OPTS += -DWITH_SSL=OFF in order to prevent the following configure error: CMake Error at /usr/share/cmake-3.11/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-3.11/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.11/Modules/FindGnuTLS.cmake:54 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) libmariadb/CMakeLists.txt:303 (FIND_PACKAGE) RocksDB is also disabled to prevent the following build error in some configurations: ./buildroot/output/build/mariadb-10.2.17/storage/rocksdb/rocksdb/utilities/backupable/backupable_db.cc:327:38: error: field 'result' has incomplete type 'std::promise<rocksdb::BackupEngineImpl::CopyOrCreateResult>' std::promise<CopyOrCreateResult> result; ./buildroot/output/build/mariadb-10.2.17/storage/rocksdb/rocksdb/utilities/backupable/backupable_db.cc:378:37: error: field 'result' has incomplete type 'std::future<rocksdb::BackupEngineImpl::CopyOrCreateResult>' std::future<CopyOrCreateResult> result; ./buildroot/output/build/mariadb-10.2.17/storage/rocksdb/rocksdb/utilities/backupable/backupable_db.cc:425:37: error: field 'result' has incomplete type 'std::future<rocksdb::BackupEngineImpl::CopyOrCreateResult>' std::future<CopyOrCreateResult> result; ./buildroot/output/build/mariadb-10.2.17/storage/rocksdb/rocksdb/utilities/backupable/backupable_db.cc: In member function 'rocksdb::Status rocksdb::BackupEngineImpl::AddBackupFileWorkItem(std::unordered_set<std::basic_string<char> >&, std::vector<rocksdb::BackupEngineImpl::BackupAfterCopyOrCreateWorkItem>&, rocksdb::BackupID, bool, const string&, const string&, rocksdb::RateLimiter*, uint64_t, uint64_t, bool, std::function<void()>, const string&)': ./buildroot/output/build/mariadb-10.2.17/storage/rocksdb/rocksdb/utilities/backupable/backupable_db.cc:1366:38: error: aggregate 'std::promise<rocksdb::BackupEngineImpl::CopyOrCreateResult> promise_result' has incomplete type and cannot be defined std::promise<CopyOrCreateResult> promise_result; Signed-off-by: Ryan Coe <bluemrp9@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-21 17:55:36 +02:00
MARIADB_LICENSE_FILES = README.md COPYING
MARIADB_CPE_ID_VENDOR = mariadb
MARIADB_SELINUX_MODULES = mysql
MARIADB_INSTALL_STAGING = YES
MARIADB_PROVIDES = mysql
MARIADB_DEPENDENCIES = \
host-mariadb \
ncurses \
openssl \
zlib \
libaio \
libxml2
# use bundled GPL-2.0+ licensed readline as package/readline is GPL-3.0+
MARIADB_CONF_OPTS += -DWITH_READLINE=ON
# We won't need unit tests
MARIADB_CONF_OPTS += -DWITH_UNIT_TESTS=0
# Mroonga needs libstemmer. Some work still needs to be done before it can be
# included in buildroot. Disable it for now.
MARIADB_CONF_OPTS += -DWITHOUT_MROONGA=1
# This value is determined automatically during straight compile by compiling
# and running a test code. You cannot do that during cross-compile. However the
# stack grows downward in most if not all modern systems. The only exception I
# am aware of is PA-RISC which is not supported by buildroot. Therefore it makes
# sense to hardcode the value. If an arch is added the stack of which grows up
# one should expect unpredictable behavior at run time.
MARIADB_CONF_OPTS += -DSTACK_DIRECTION=-1
# Jemalloc was added for TokuDB. Since its configure script seems somewhat broken
# when it comes to cross-compilation we shall disable it and also disable TokuDB.
MARIADB_CONF_OPTS += -DWITH_JEMALLOC=no -DWITHOUT_TOKUDB=1
mariadb: bump version to 10.2.17 Release notes: https://mariadb.com/kb/en/mariadb-10217-release-notes/ Changelog: https://mariadb.com/kb/en/mariadb-10217-changelog/ Note that HOST_MARIADB_CONF_OPTS += -DWITH_SSL=bundled has been changed to HOST_MARIADB_CONF_OPTS += -DWITH_SSL=OFF in order to prevent the following configure error: CMake Error at /usr/share/cmake-3.11/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-3.11/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.11/Modules/FindGnuTLS.cmake:54 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) libmariadb/CMakeLists.txt:303 (FIND_PACKAGE) RocksDB is also disabled to prevent the following build error in some configurations: ./buildroot/output/build/mariadb-10.2.17/storage/rocksdb/rocksdb/utilities/backupable/backupable_db.cc:327:38: error: field 'result' has incomplete type 'std::promise<rocksdb::BackupEngineImpl::CopyOrCreateResult>' std::promise<CopyOrCreateResult> result; ./buildroot/output/build/mariadb-10.2.17/storage/rocksdb/rocksdb/utilities/backupable/backupable_db.cc:378:37: error: field 'result' has incomplete type 'std::future<rocksdb::BackupEngineImpl::CopyOrCreateResult>' std::future<CopyOrCreateResult> result; ./buildroot/output/build/mariadb-10.2.17/storage/rocksdb/rocksdb/utilities/backupable/backupable_db.cc:425:37: error: field 'result' has incomplete type 'std::future<rocksdb::BackupEngineImpl::CopyOrCreateResult>' std::future<CopyOrCreateResult> result; ./buildroot/output/build/mariadb-10.2.17/storage/rocksdb/rocksdb/utilities/backupable/backupable_db.cc: In member function 'rocksdb::Status rocksdb::BackupEngineImpl::AddBackupFileWorkItem(std::unordered_set<std::basic_string<char> >&, std::vector<rocksdb::BackupEngineImpl::BackupAfterCopyOrCreateWorkItem>&, rocksdb::BackupID, bool, const string&, const string&, rocksdb::RateLimiter*, uint64_t, uint64_t, bool, std::function<void()>, const string&)': ./buildroot/output/build/mariadb-10.2.17/storage/rocksdb/rocksdb/utilities/backupable/backupable_db.cc:1366:38: error: aggregate 'std::promise<rocksdb::BackupEngineImpl::CopyOrCreateResult> promise_result' has incomplete type and cannot be defined std::promise<CopyOrCreateResult> promise_result; Signed-off-by: Ryan Coe <bluemrp9@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-21 17:55:36 +02:00
# RocksDB fails to build in some configurations with the following build error:
# ./output/build/mariadb-10.2.17/storage/rocksdb/rocksdb/utilities/backupable/backupable_db.cc:327:38:
# error: field 'result' has incomplete type 'std::promise<rocksdb::BackupEngineImpl::CopyOrCreateResult>'
# std::promise<CopyOrCreateResult> result;
#
# To work around the issue, we disable RocksDB
MARIADB_CONF_OPTS += -DWITHOUT_ROCKSDB=1
# Make it explicit that we are cross-compiling
MARIADB_CONF_OPTS += -DCMAKE_CROSSCOMPILING=1
# Explicitly disable dtrace to avoid detection of a host version
MARIADB_CONF_OPTS += -DENABLE_DTRACE=0
ifeq ($(BR2_PACKAGE_MARIADB_SERVER),y)
ifeq ($(BR2_PACKAGE_MARIADB_SERVER_EMBEDDED),y)
MARIADB_CONF_OPTS += -DWITH_EMBEDDED_SERVER=ON
else
MARIADB_CONF_OPTS += -DWITH_EMBEDDED_SERVER=OFF
endif
else
MARIADB_CONF_OPTS += -DWITHOUT_SERVER=ON
endif
package/mariadb: bump version to 10.3.10 Release notes: https://mariadb.com/kb/en/library/mariadb-10310-release-notes/ Changelog: https://mariadb.com/kb/en/mariadb-10310-changelog/ This bump also fixes broken atomic support for BR2_TOOLCHAIN_HAS_LIBATOMIC=y with mariadb-10.2: [ 59%] Linking CXX executable mariabackup ../../storage/innobase/libinnobase.a(handler0alter.cc.o): In function `my_atomic_add64': /home/bernd/buildroot/output/build/mariadb-10.2.17/include/my_atomic.h:274: undefined reference to `__sync_fetch_and_add_8' with this defconfig BR2_arcle=y BR2_archs38=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arcle-hs38-full-2018.02-926-gb393c24.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_7=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1=y BR2_TOOLCHAIN_EXTERNAL_LOCALE=y BR2_TOOLCHAIN_EXTERNAL_CXX=y BR2_PACKAGE_MYSQL=y BR2_PACKAGE_MARIADB=y BR2_PACKAGE_MARIADB_SERVER=y Adding "-latomic" to CXXFLAGS and/or adding -DHAVE_GCC_ATOMIC_BUILTINS=1 to CONF_OPTS, like we do for mariadb-10.3, does not fix the build error with mariadb-10.2. There the build would stop even earlier without these options: /home/bernd/buildroot/output/build/mariadb-10.2.17/include/my_atomic.h:138:2: error: #error atomic ops for this platform are not implemented #error atomic ops for this platform are not implemented Mariadb-10.3 contains improved atomic support, this build error does not occur here. Updated license hash of README.md after upstream commits: https://github.com/MariaDB/server/commits/10.3/README.md my-small.cnf.sh is not provided anymore by upstream: https://github.com/MariaDB/server/commit/7fee164faf8fce7be4ebe322d2178efd3d075eae [Peter Seiderer: bumped to version 10.3.7] Signed-off-by: Peter Seiderer <ps.report@gmx.net> [Bernd: bumped to version 10.3.10, fixed atomic support, fixed my-small.cnf.sh, updated license hash] Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-10-07 19:06:37 +02:00
MARIADB_CXXFLAGS = $(TARGET_CXXFLAGS)
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
MARIADB_CXXFLAGS += -latomic
endif
MARIADB_CONF_OPTS += \
package/mariadb: bump version to 10.3.10 Release notes: https://mariadb.com/kb/en/library/mariadb-10310-release-notes/ Changelog: https://mariadb.com/kb/en/mariadb-10310-changelog/ This bump also fixes broken atomic support for BR2_TOOLCHAIN_HAS_LIBATOMIC=y with mariadb-10.2: [ 59%] Linking CXX executable mariabackup ../../storage/innobase/libinnobase.a(handler0alter.cc.o): In function `my_atomic_add64': /home/bernd/buildroot/output/build/mariadb-10.2.17/include/my_atomic.h:274: undefined reference to `__sync_fetch_and_add_8' with this defconfig BR2_arcle=y BR2_archs38=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arcle-hs38-full-2018.02-926-gb393c24.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_7=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1=y BR2_TOOLCHAIN_EXTERNAL_LOCALE=y BR2_TOOLCHAIN_EXTERNAL_CXX=y BR2_PACKAGE_MYSQL=y BR2_PACKAGE_MARIADB=y BR2_PACKAGE_MARIADB_SERVER=y Adding "-latomic" to CXXFLAGS and/or adding -DHAVE_GCC_ATOMIC_BUILTINS=1 to CONF_OPTS, like we do for mariadb-10.3, does not fix the build error with mariadb-10.2. There the build would stop even earlier without these options: /home/bernd/buildroot/output/build/mariadb-10.2.17/include/my_atomic.h:138:2: error: #error atomic ops for this platform are not implemented #error atomic ops for this platform are not implemented Mariadb-10.3 contains improved atomic support, this build error does not occur here. Updated license hash of README.md after upstream commits: https://github.com/MariaDB/server/commits/10.3/README.md my-small.cnf.sh is not provided anymore by upstream: https://github.com/MariaDB/server/commit/7fee164faf8fce7be4ebe322d2178efd3d075eae [Peter Seiderer: bumped to version 10.3.7] Signed-off-by: Peter Seiderer <ps.report@gmx.net> [Bernd: bumped to version 10.3.10, fixed atomic support, fixed my-small.cnf.sh, updated license hash] Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-10-07 19:06:37 +02:00
-DCMAKE_CXX_FLAGS="$(MARIADB_CXXFLAGS)" \
-DINSTALL_DOCDIR=share/doc/mariadb-$(MARIADB_VERSION) \
-DINSTALL_DOCREADMEDIR=share/doc/mariadb-$(MARIADB_VERSION) \
-DINSTALL_MANDIR=share/man \
-DINSTALL_MYSQLSHAREDIR=share/mysql \
-DINSTALL_MYSQLTESTDIR=share/mysql/test \
-DINSTALL_PLUGINDIR=lib/mysql/plugin \
-DINSTALL_SBINDIR=sbin \
-DINSTALL_SCRIPTDIR=bin \
-DINSTALL_SQLBENCHDIR=share/mysql/bench \
-DINSTALL_SUPPORTFILESDIR=share/mysql \
-DMYSQL_DATADIR=/var/lib/mysql \
-DMYSQL_UNIX_ADDR=$(MYSQL_SOCKET)
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
# generated during the build of the host helpers. It is not necessary to build
# the whole host package, only the "import_executables" target.
# -DIMPORT_EXECUTABLES=$(HOST_MARIADB_BUILDDIR)/import_executables.cmake
# must then be passed to cmake during target build.
# see also https://mariadb.com/kb/en/mariadb/cross-compiling-mariadb/
HOST_MARIADB_MAKE_OPTS = import_executables
MARIADB_CONF_OPTS += \
-DIMPORT_EXECUTABLES=$(HOST_MARIADB_BUILDDIR)/import_executables.cmake
# Don't install host-mariadb. We just need to build import_executable
# Therefore only run 'true' and do nothing, not even the default action.
HOST_MARIADB_INSTALL_CMDS = true
ifeq ($(BR2_PACKAGE_MARIADB_SERVER),y)
define MARIADB_USERS
mysql -1 mysql -1 * /var/lib/mysql - - MySQL Server
endef
define MARIADB_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/mariadb/S97mysqld \
$(TARGET_DIR)/etc/init.d/S97mysqld
endef
define MARIADB_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/mariadb/mysqld.service \
$(TARGET_DIR)/usr/lib/systemd/system/mysqld.service
endef
endif
# We don't need mysql_config or mariadb_config on the target as it's
# only useful in staging. We also don't need the test suite on the target.
define MARIADB_POST_INSTALL
mkdir -p $(TARGET_DIR)/var/lib/mysql
$(RM) $(TARGET_DIR)/usr/bin/mysql_config
$(RM) $(TARGET_DIR)/usr/bin/mariadb_config
$(RM) -r $(TARGET_DIR)/usr/share/mysql/test
endef
MARIADB_POST_INSTALL_TARGET_HOOKS += MARIADB_POST_INSTALL
# overwrite cross-compiled mariadb_config executable by an native one
define MARIADB_POST_STAGING_INSTALL
$(HOSTCC) -I$(@D)/libmariadb/include \
-o $(STAGING_DIR)/usr/bin/mariadb_config \
$(@D)/libmariadb/mariadb_config/mariadb_config.c
endef
MARIADB_POST_INSTALL_STAGING_HOOKS += MARIADB_POST_STAGING_INSTALL
$(eval $(cmake-package))
$(eval $(host-cmake-package))