mirror of https://github.com/openwrt/packages.git
mariadb: update to 11.4.3
- Remove 2 upstreamed libfmt patches - Manually refresh 180-relax-mysql_install-db-wrt-pam-tool.patch - Automatically refresh remaining patches Signed-off-by: Aleksey Vasilenko <aleksey.vasilenko@gmail.com>pull/25013/head
parent
b892e7274f
commit
3ea5b95203
|
@ -9,13 +9,13 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mariadb
|
||||
PKG_VERSION:=10.9.8
|
||||
PKG_RELEASE:=4
|
||||
PKG_VERSION:=11.4.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL := https://archive.mariadb.org/$(PKG_NAME)-$(PKG_VERSION)/source
|
||||
|
||||
PKG_HASH:=fcdc6f73882477c20310e795a02f746e54934aa7a8b368900bd45e78a5daf6ed
|
||||
PKG_HASH:=6f0017b9901bb1897de0eed21caef9ffa9d66ef559345a0d8a6f011308413ece
|
||||
PKG_MAINTAINER:=Michal Hrusecky <Michal@Hrusecky.net>
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING THIRDPARTY
|
||||
|
@ -320,6 +320,9 @@ CMAKE_OPTIONS += -DSTACK_DIRECTION=-1
|
|||
# Make it explicit that we are cross-compiling
|
||||
CMAKE_OPTIONS += -DCMAKE_CROSSCOMPILING=1
|
||||
|
||||
# Apply workaround to pass LIBFMT check when cross-compiling
|
||||
CMAKE_OPTIONS += -DHAVE_SYSTEM_LIBFMT_EXITCODE=0
|
||||
|
||||
# Explicitly disable dtrace to avoid detection of a host version
|
||||
CMAKE_OPTIONS += -DENABLE_DTRACE=0
|
||||
|
||||
|
@ -435,11 +438,12 @@ endef
|
|||
|
||||
define Host/Install
|
||||
$(SED) 's|$(HOST_BUILD_DIR)|$(STAGING_DIR_HOSTPKG)/share/mariadb|' $(HOST_BUILD_DIR)/import_executables.cmake
|
||||
$(INSTALL_DIR) $(1)/share/mariadb/{dbug,extra,scripts,sql}
|
||||
$(INSTALL_DIR) $(1)/share/mariadb/{dbug,extra,scripts,sql,strings}
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/dbug/factorial $(1)/share/mariadb/dbug
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/extra/comp_err $(1)/share/mariadb/extra
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/scripts/comp_sql $(1)/share/mariadb/scripts
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/sql/{gen_lex_hash,gen_lex_token} $(1)/share/mariadb/sql
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/strings/uca-dump $(1)/share/mariadb/strings
|
||||
$(INSTALL_DATA) $(HOST_BUILD_DIR)/import_executables.cmake $(1)/share/mariadb
|
||||
endef
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/scripts/mysql_install_db.sh
|
||||
+++ b/scripts/mysql_install_db.sh
|
||||
@@ -439,7 +439,7 @@ fi
|
||||
@@ -431,7 +431,7 @@ fi
|
||||
|
||||
|
||||
# Try to determine the hostname
|
||||
|
@ -8,4 +8,4 @@
|
|||
+hostname=`cat /proc/sys/kernel/hostname`
|
||||
|
||||
# Check if hostname is valid
|
||||
if test "$cross_bootstrap" -eq 0 -a "$in_rpm" -eq 0 -a "$force" -eq 0
|
||||
if test "$do_resolve" -eq 1
|
||||
|
|
|
@ -1,116 +0,0 @@
|
|||
From c657a1973e274b16db0631dc3862e276ab354564 Mon Sep 17 00:00:00 2001
|
||||
From: Ruoyu Zhong <zhongruoyu@outlook.com>
|
||||
Date: Sat, 19 Aug 2023 22:48:16 +0800
|
||||
Subject: [PATCH 1/2] MDEV-31963 cmake: fix libfmt usage
|
||||
|
||||
`fmt::detail::make_arg` does not accept temporaries, so the code snippet
|
||||
checking system libfmt needs to be adjusted.
|
||||
|
||||
Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
|
||||
---
|
||||
cmake/libfmt.cmake | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/cmake/libfmt.cmake
|
||||
+++ b/cmake/libfmt.cmake
|
||||
@@ -33,8 +33,9 @@ MACRO (CHECK_LIBFMT)
|
||||
#include <fmt/format-inl.h>
|
||||
#include <iostream>
|
||||
int main() {
|
||||
+ int answer= 42;
|
||||
fmt::format_args::format_arg arg=
|
||||
- fmt::detail::make_arg<fmt::format_context>(42);
|
||||
+ fmt::detail::make_arg<fmt::format_context>(answer);
|
||||
std::cout << fmt::vformat(\"The answer is {}.\",
|
||||
fmt::format_args(&arg, 1));
|
||||
}" HAVE_SYSTEM_LIBFMT)
|
||||
--- a/sql/item_strfunc.cc
|
||||
+++ b/sql/item_strfunc.cc
|
||||
@@ -1382,11 +1382,24 @@ namespace fmt {
|
||||
*/
|
||||
String *Item_func_sformat::val_str(String *res)
|
||||
{
|
||||
+ /*
|
||||
+ A union that stores a numeric format arg value.
|
||||
+ fmt::detail::make_arg does not accept temporaries, so all of its numeric
|
||||
+ args are temporarily stored in the fmt_args array.
|
||||
+ See: https://github.com/fmtlib/fmt/issues/3596
|
||||
+ */
|
||||
+ union Format_arg_store {
|
||||
+ longlong val_int;
|
||||
+ float val_float;
|
||||
+ double val_double;
|
||||
+ };
|
||||
+
|
||||
DBUG_ASSERT(fixed());
|
||||
- using ctx= fmt::format_context;
|
||||
- String *fmt_arg= NULL;
|
||||
- String *parg= NULL;
|
||||
- fmt::format_args::format_arg *vargs= NULL;
|
||||
+ using ctx= fmt::format_context;
|
||||
+ String *fmt_arg= NULL;
|
||||
+ String *parg= NULL;
|
||||
+ fmt::format_args::format_arg *vargs= NULL;
|
||||
+ Format_arg_store *fmt_args= NULL;
|
||||
|
||||
null_value= true;
|
||||
if (!(fmt_arg= args[0]->val_str(res)))
|
||||
@@ -1395,25 +1408,39 @@ String *Item_func_sformat::val_str(Strin
|
||||
if (!(vargs= new fmt::format_args::format_arg[arg_count - 1]))
|
||||
return NULL;
|
||||
|
||||
+ if (!(fmt_args= new Format_arg_store[arg_count - 1]))
|
||||
+ {
|
||||
+ delete [] vargs;
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
/* Creates the array of arguments for vformat */
|
||||
for (uint carg= 1; carg < arg_count; carg++)
|
||||
{
|
||||
switch (args[carg]->result_type())
|
||||
{
|
||||
case INT_RESULT:
|
||||
- vargs[carg-1]= fmt::detail::make_arg<ctx>(args[carg]->val_int());
|
||||
+ fmt_args[carg-1].val_int= args[carg]->val_int();
|
||||
+ vargs[carg-1]= fmt::detail::make_arg<ctx>(fmt_args[carg-1].val_int);
|
||||
break;
|
||||
case DECIMAL_RESULT: // TODO
|
||||
case REAL_RESULT:
|
||||
if (args[carg]->field_type() == MYSQL_TYPE_FLOAT)
|
||||
- vargs[carg-1]= fmt::detail::make_arg<ctx>((float)args[carg]->val_real());
|
||||
+ {
|
||||
+ fmt_args[carg-1].val_float= (float)args[carg]->val_real();
|
||||
+ vargs[carg-1]= fmt::detail::make_arg<ctx>(fmt_args[carg-1].val_float);
|
||||
+ }
|
||||
else
|
||||
- vargs[carg-1]= fmt::detail::make_arg<ctx>(args[carg]->val_real());
|
||||
+ {
|
||||
+ fmt_args[carg-1].val_double= args[carg]->val_real();
|
||||
+ vargs[carg-1]= fmt::detail::make_arg<ctx>(fmt_args[carg-1].val_double);
|
||||
+ }
|
||||
break;
|
||||
case STRING_RESULT:
|
||||
if (!(parg= args[carg]->val_str(&val_arg[carg-1])))
|
||||
{
|
||||
delete [] vargs;
|
||||
+ delete [] fmt_args;
|
||||
return NULL;
|
||||
}
|
||||
vargs[carg-1]= fmt::detail::make_arg<ctx>(*parg);
|
||||
@@ -1423,6 +1450,7 @@ String *Item_func_sformat::val_str(Strin
|
||||
default:
|
||||
DBUG_ASSERT(0);
|
||||
delete [] vargs;
|
||||
+ delete [] fmt_args;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -1446,6 +1474,7 @@ String *Item_func_sformat::val_str(Strin
|
||||
null_value= true;
|
||||
}
|
||||
delete [] vargs;
|
||||
+ delete [] fmt_args;
|
||||
return null_value ? NULL : res;
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From 4375245d5d9f01cabb6e3fd6c637535e724eae38 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Black <daniel@mariadb.org>
|
||||
Date: Wed, 22 May 2024 17:43:17 +1000
|
||||
Subject: [PATCH] MDEV-34206 compile failure: fmt use incompatible with
|
||||
libfmt-10.2.[2]+
|
||||
|
||||
Upstream libfmt commit https://github.com/fmtlib/fmt/commit/d70729215fba1d54862e407b626abf86ddf409bf
|
||||
now requires the format function to be const.
|
||||
|
||||
Adjust the function prototype so it is const and can compile.
|
||||
---
|
||||
sql/item_strfunc.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/sql/item_strfunc.cc
|
||||
+++ b/sql/item_strfunc.cc
|
||||
@@ -1367,7 +1367,7 @@ bool Item_func_sformat::fix_length_and_d
|
||||
namespace fmt {
|
||||
template <> struct formatter<String>: formatter<string_view> {
|
||||
template <typename FormatContext>
|
||||
- auto format(String c, FormatContext& ctx) -> decltype(ctx.out()) {
|
||||
+ auto format(String c, FormatContext& ctx) const -> decltype(ctx.out()) {
|
||||
string_view name = { c.ptr(), c.length() };
|
||||
return formatter<string_view>::format(name, ctx);
|
||||
};
|
|
@ -1,21 +1,6 @@
|
|||
--- a/scripts/mysql_install_db.sh
|
||||
+++ b/scripts/mysql_install_db.sh
|
||||
@@ -371,6 +371,14 @@ then
|
||||
exit 1
|
||||
fi
|
||||
plugindir=`find_in_dirs --dir auth_pam.so $basedir/lib*/plugin $basedir/lib*/mysql/plugin $basedir/lib/*/mariadb19/plugin`
|
||||
+ # Upstream assumes all plugins will be always installed, but in OpenWrt we can
|
||||
+ # install a server without plugins if we want to.
|
||||
+ if test -z "$plugindir"
|
||||
+ then
|
||||
+ echo "Could not find plugin directory." >&2
|
||||
+ echo "Will continue with \"/usr/lib/mariadb/plugin\"." >&2
|
||||
+ plugindir=/usr/lib/mariadb/plugin
|
||||
+ fi
|
||||
pamtooldir=$plugindir
|
||||
# relative from where the script was run for a relocatable install
|
||||
elif test -n "$dirname0" -a -x "$rel_mysqld" -a ! "$rel_mysqld" -ef "@sbindir@/mariadbd"
|
||||
@@ -503,7 +511,9 @@ do
|
||||
@@ -495,7 +495,9 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -24,9 +9,9 @@
|
|||
+# we can revisit.
|
||||
+if test -n ""
|
||||
then
|
||||
if test -z "$srcdir" -a "$in_rpm" -eq 0
|
||||
if test -z "$srcdir" -a "$in_rpm" -eq 0 -a -d "$pamtooldir/auth_pam_tool_dir"
|
||||
then
|
||||
@@ -524,6 +534,10 @@ then
|
||||
@@ -516,6 +518,10 @@ then
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/scripts/mysqld_safe.sh
|
||||
+++ b/scripts/mysqld_safe.sh
|
||||
@@ -247,7 +247,7 @@ wsrep_recover_position() {
|
||||
@@ -253,7 +253,7 @@ wsrep_recover_position() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
|||
|
||||
local wr_options="--disable-log-error --pid-file='$wr_pidfile'"
|
||||
|
||||
@@ -669,7 +669,7 @@ then
|
||||
@@ -675,7 +675,7 @@ then
|
||||
* ) err_log="$DATADIR/$err_log" ;;
|
||||
esac
|
||||
else
|
||||
|
@ -18,7 +18,7 @@
|
|||
fi
|
||||
fi
|
||||
|
||||
@@ -755,7 +755,7 @@ fi
|
||||
@@ -761,7 +761,7 @@ fi
|
||||
|
||||
if test -z "$pid_file"
|
||||
then
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/support-files/CMakeLists.txt
|
||||
+++ b/support-files/CMakeLists.txt
|
||||
@@ -66,7 +66,7 @@ IF(UNIX AND NOT WITHOUT_SERVER)
|
||||
@@ -79,7 +79,7 @@ IF(UNIX AND NOT WITHOUT_SERVER)
|
||||
INSTALL(FILES magic DESTINATION ${inst_location} COMPONENT SupportFiles)
|
||||
INSTALL(DIRECTORY policy DESTINATION ${inst_location} COMPONENT SupportFiles)
|
||||
FIND_PROGRAM(CHECKMODULE checkmodule)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/mysys/CMakeLists.txt
|
||||
+++ b/mysys/CMakeLists.txt
|
||||
@@ -141,7 +141,7 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "a
|
||||
@@ -137,7 +137,7 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "a
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
|||
COMPILE_FLAGS "${COMPILE_FLAGS} -maltivec -mvsx -mpower8-vector -mcrypto -mpower8-vector")
|
||||
--- a/mysys/crc32ieee.cc
|
||||
+++ b/mysys/crc32ieee.cc
|
||||
@@ -52,7 +52,6 @@ static my_crc32_t init_crc32()
|
||||
@@ -51,7 +51,6 @@ static my_crc32_t init_crc32()
|
||||
static const my_crc32_t my_checksum_func= init_crc32();
|
||||
|
||||
#ifdef __powerpc64__
|
||||
|
|
Loading…
Reference in New Issue