From f1b49babad5093f497a99fb1f4e2ea6f449e6084 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 13 May 2018 08:40:37 +0200 Subject: [PATCH 1/4] mariadb: Makefile cleanups - fix a typo - remove unnecessary trailing slashes Signed-off-by: Sebastian Kemper --- utils/mariadb/Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/utils/mariadb/Makefile b/utils/mariadb/Makefile index ddda900dd..9fba4e454 100644 --- a/utils/mariadb/Makefile +++ b/utils/mariadb/Makefile @@ -398,7 +398,7 @@ CMAKE_HOST_OPTIONS += \ # the whole host package, only the "import_executables" target. # -DIMPORT_EXECUTABLES=$(HOST_BUILD_DIR)/import_executables.cmake # must then be passed to cmake during target build. -# see also https://mariadb.com/kb/en/mariadb/cross-compiling-mariadb/ +# See also https://mariadb.com/kb/en/mariadb/cross-compiling-mariadb/ CMAKE_OPTIONS += -DIMPORT_EXECUTABLES=$(STAGING_DIR_HOSTPKG)/share/mariadb/import_executables.cmake @@ -418,10 +418,10 @@ endef define Build/InstallDev $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib/mysql $(1)/usr/lib/pkgconfig $(1)/usr/share/aclocal - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(1)/usr/bin/ - $(LN) $(STAGING_DIR)/usr/bin/mysql_config $(2)/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/mysql $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmysqlclient*.so* $(1)/usr/lib/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(1)/usr/bin + $(LN) $(STAGING_DIR)/usr/bin/mysql_config $(2)/bin + $(CP) $(PKG_INSTALL_DIR)/usr/include/mysql $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmysqlclient*.so* $(1)/usr/lib cd $(1)/usr/lib/mysql; $(LN) ../libmysqlclient*.so* . $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/mariadb.pc $(1)/usr/lib/pkgconfig $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/mysql.m4 $(1)/usr/share/aclocal @@ -429,7 +429,7 @@ endef define Package/libmariadbclient/install $(INSTALL_DIR) $(1)$(PLUGIN_DIR) - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmysqlclient*.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmysqlclient*.so* $(1)/usr/lib $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/dialog.so $(1)$(PLUGIN_DIR) $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/mysql_clear_password.so $(1)$(PLUGIN_DIR) endef @@ -452,7 +452,7 @@ endef define Package/mariadb-server/install $(INSTALL_DIR) $(1)/usr/bin $(foreach b,$(MARIADB_SERVER),$(call Package/mariadb/install/bin,$(1),$(b));) - $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_DIR) $(1)/etc/mysql $(INSTALL_BIN) files/mysqld.init $(1)/etc/init.d/mysqld $(INSTALL_CONF) conf/my.cnf $(1)/etc/mysql @@ -460,11 +460,11 @@ define Package/mariadb-server/install $(INSTALL_CONF) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/daemon_example.ini $(1)$(PLUGIN_DIR) $(INSTALL_DIR) $(1)/usr/share/mysql/english $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/english/errmsg.sys $(1)/usr/share/mysql/english - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/fill_help_tables.sql $(1)/usr/share/mysql/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/maria_add_gis_sp_bootstrap.sql $(1)/usr/share/mysql/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_performance_tables.sql $(1)/usr/share/mysql/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables.sql $(1)/usr/share/mysql/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables_data.sql $(1)/usr/share/mysql/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/fill_help_tables.sql $(1)/usr/share/mysql + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/maria_add_gis_sp_bootstrap.sql $(1)/usr/share/mysql + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_performance_tables.sql $(1)/usr/share/mysql + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables.sql $(1)/usr/share/mysql + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables_data.sql $(1)/usr/share/mysql endef define Package/mariadb-server-extra/install From 3bdaa522df40c467ac6a75425777a306aa081dfa Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 13 May 2018 08:42:42 +0200 Subject: [PATCH 2/4] mariadb: fix /etc/mysql setup - create directory /etc/mysql/conf.d as without it the server refuses to start - correct the path to my.cnf in the init script Signed-off-by: Sebastian Kemper --- utils/mariadb/Makefile | 2 +- utils/mariadb/files/mysqld.init | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/mariadb/Makefile b/utils/mariadb/Makefile index 9fba4e454..9fdf85972 100644 --- a/utils/mariadb/Makefile +++ b/utils/mariadb/Makefile @@ -453,7 +453,7 @@ define Package/mariadb-server/install $(INSTALL_DIR) $(1)/usr/bin $(foreach b,$(MARIADB_SERVER),$(call Package/mariadb/install/bin,$(1),$(b));) $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_DIR) $(1)/etc/mysql + $(INSTALL_DIR) $(1)/etc/mysql/conf.d $(INSTALL_BIN) files/mysqld.init $(1)/etc/init.d/mysqld $(INSTALL_CONF) conf/my.cnf $(1)/etc/mysql $(INSTALL_DIR) $(1)$(PLUGIN_DIR) diff --git a/utils/mariadb/files/mysqld.init b/utils/mariadb/files/mysqld.init index 98c8c65c4..fcd08d61e 100644 --- a/utils/mariadb/files/mysqld.init +++ b/utils/mariadb/files/mysqld.init @@ -10,7 +10,7 @@ SERVICE_STOP_TIME=9 PROG='/usr/bin/mysqld' start() { - local conf='/etc/my.cnf' + local conf='/etc/mysql/my.cnf' local datadir="$( sed -nE "s/^\s*datadir\s*=\s*('([^']*)'|\x22([^\x22]*)\x22|(.*\S))\s*$/\2\3\4/p" "$conf" )" [ -d "$datadir" ] || { From 13321a569720ec297b721f925cec6860eac3c478 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 13 May 2018 08:46:16 +0200 Subject: [PATCH 3/4] mariadb: bump to 10.1.33 Maintenance release. Fixes the following security vulnerabilities: CVE-2018-2782 CVE-2018-2784 CVE-2018-2787 CVE-2018-2766 CVE-2018-2755 CVE-2018-2819 CVE-2018-2817 CVE-2018-2761 CVE-2018-2781 CVE-2018-2771 CVE-2018-2813 Signed-off-by: Sebastian Kemper --- utils/mariadb/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/mariadb/Makefile b/utils/mariadb/Makefile index 9fdf85972..8aea0043b 100644 --- a/utils/mariadb/Makefile +++ b/utils/mariadb/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mariadb -PKG_VERSION:=10.1.32 -PKG_RELEASE:=2 +PKG_VERSION:=10.1.33 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.mariadb.org/interstitial/$(PKG_NAME)-$(PKG_VERSION)/source -PKG_HASH:=0e2aae6a6a190d07c8e36e87dd43377057fa82651ca3c583462563f3e9369096 +PKG_HASH:=94312c519f2c0c25e1964c64e22aff0036fb22dfb2685638f43a6b2211395d2d PKG_MAINTAINER:=Sebastian Kemper PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING From 7053b12912133a40759e729cfc30bcf49c8683f6 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 13 May 2018 11:13:27 +0200 Subject: [PATCH 4/4] mariadb: add source mirrors As suggested by Daniel Engberg, add some mirror servers to offload from MariaDB's main download server. Signed-off-by: Sebastian Kemper --- utils/mariadb/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/mariadb/Makefile b/utils/mariadb/Makefile index 8aea0043b..545daba01 100644 --- a/utils/mariadb/Makefile +++ b/utils/mariadb/Makefile @@ -12,7 +12,11 @@ PKG_VERSION:=10.1.33 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://downloads.mariadb.org/interstitial/$(PKG_NAME)-$(PKG_VERSION)/source +PKG_SOURCE_URL := \ + https://mirror.netcologne.de/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \ + https://mirror.lstn.net/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \ + https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \ + https://downloads.mariadb.org/interstitial/$(PKG_NAME)-$(PKG_VERSION)/source PKG_HASH:=94312c519f2c0c25e1964c64e22aff0036fb22dfb2685638f43a6b2211395d2d PKG_MAINTAINER:=Sebastian Kemper