diff --git a/mariadb-10.5.29.tar.gz b/mariadb-10.11.13.tar.gz similarity index 32% rename from mariadb-10.5.29.tar.gz rename to mariadb-10.11.13.tar.gz index d586339b6146775ba2d170bfd129dd89b98a327f..648e7ae530105809ae55124a1b35716aa7c3bcc0 100644 --- a/mariadb-10.5.29.tar.gz +++ b/mariadb-10.11.13.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de49ed417f6fa90e8fee72a41e526e0983dc47f388caff9e703803cec263b826 -size 117805539 +oid sha256:f8b734749fbd652ea4e255be8cc7880f98d07b6a7feb4e1ea8c736cb480d23e4 +size 109323757 diff --git a/mariadb-RISC-V-use-RDTIME-for-cycle-timer.patch b/mariadb-RISC-V-use-RDTIME-for-cycle-timer.patch deleted file mode 100644 index e9cd5e5cb6173e11bfc3af60988f3512c0ccf1c6..0000000000000000000000000000000000000000 --- a/mariadb-RISC-V-use-RDTIME-for-cycle-timer.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 841bfb4641f4cbad16a3aeb07fa462dcd4449cac Mon Sep 17 00:00:00 2001 -From: IZUMI-Zu -Date: Fri, 23 Aug 2024 00:00:12 +0800 -Subject: [PATCH] RISC-V: use RDTIME for cycle timer and disable __builtin_readcyclecounter - -This commit backports and extends the fixes from MariaDB/server PRs #1981 -and #2980 to address the RISC-V RDCYCLE privileged instruction issue. - -Key changes: -1. Use RDTIME instead of RDCYCLE for cycle timer on RISC-V -2. Disable __builtin_readcyclecounter() for RISC-V as LLVM generates RDCYCLE - -Starting with Linux 6.6 [1], RDCYCLE is a privileged instruction on RISC-V and can't be used directly from userland. -There is a sysctl option to change that as a transition period, but it will eventually disappear. - -Use RDTIME instead, which while less accurate has the advantage of being synchronized between CPU (and thus monotonic) -and of constant frequency. - -[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc4c07c89aada16229084eeb93895c95b7eabaa3 - -Backported-from: https://github.com/MariaDB/server/pull/1981 - https://github.com/MariaDB/server/pull/2980 ---- - include/my_rdtsc.h | 26 +++++++++++++++++++++++++- - mysys/my_rdtsc.c | 2 ++ - 2 files changed, 27 insertions(+), 1 deletion(-) - -diff --git a/include/my_rdtsc.h b/include/my_rdtsc.h -index e8101516..880625fa 100644 ---- a/include/my_rdtsc.h -+++ b/include/my_rdtsc.h -@@ -91,6 +91,7 @@ C_MODE_START - On AARCH64, we use the generic timer base register. We override clang - implementation for aarch64 as it access a PMU register which is not - guaranteed to be active. -+ On RISC-V, we use the rdtime instruction to read from mtime register. - - Sadly, we have nothing for the Digital Alpha, MIPS, Motorola m68k, - HP PA-RISC or other non-mainstream (or obsolete) processors. -@@ -128,7 +129,7 @@ C_MODE_START - */ - static inline ulonglong my_timer_cycles(void) - { --# if __has_builtin(__builtin_readcyclecounter) && !defined (__aarch64__) -+# if __has_builtin(__builtin_readcyclecounter) && !defined(__aarch64__) && !defined(__riscv) - return __builtin_readcyclecounter(); - # elif defined _WIN32 || defined __i386__ || defined __x86_64__ - return __rdtsc(); -@@ -173,6 +174,28 @@ static inline ulonglong my_timer_cycles(void) - __asm __volatile("mrs %0, CNTVCT_EL0" : "=&r" (result)); - return result; - } -+#elif defined(__riscv) -+ /* Use RDTIME (and RDTIMEH on riscv32) */ -+ { -+# if __riscv_xlen == 32 -+ ulong result_lo, result_hi0, result_hi1; -+ /* Implemented in assembly because Clang insisted on branching. */ -+ __asm __volatile__( -+ "rdtimeh %0\n" -+ "rdtime %1\n" -+ "rdtimeh %2\n" -+ "sub %0, %0, %2\n" -+ "seqz %0, %0\n" -+ "sub %0, zero, %0\n" -+ "and %1, %1, %0\n" -+ : "=r"(result_hi0), "=r"(result_lo), "=r"(result_hi1)); -+ return (static_cast(result_hi1) << 32) | result_lo; -+# else -+ ulonglong result; -+ __asm __volatile__("rdtime %0" : "=r"(result)); -+ return result; -+ } -+# endif - #elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME) - /* gethrtime may appear as either cycle or nanosecond counter */ - return (ulonglong) gethrtime(); -@@ -231,6 +254,7 @@ C_MODE_END - #define MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME 26 - #define MY_TIMER_ROUTINE_ASM_S390 28 - #define MY_TIMER_ROUTINE_AARCH64 29 -+#define MY_TIMER_ROUTINE_RISCV 30 - - #endif - -diff --git a/mysys/my_rdtsc.c b/mysys/my_rdtsc.c -index 1503a5db..ffd81602 100644 ---- a/mysys/my_rdtsc.c -+++ b/mysys/my_rdtsc.c -@@ -384,6 +384,8 @@ void my_timer_init(MY_TIMER_INFO *mti) - mti->cycles.routine= MY_TIMER_ROUTINE_ASM_S390; - #elif defined(__GNUC__) && defined (__aarch64__) - mti->cycles.routine= MY_TIMER_ROUTINE_AARCH64; -+#elif defined(__GNUC__) && defined (__riscv) -+ mti->cycles.routine= MY_TIMER_ROUTINE_RISCV; - #elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME) - mti->cycles.routine= MY_TIMER_ROUTINE_GETHRTIME; - #else --- -2.46.0 diff --git a/mariadb-logrotate.patch b/mariadb-logrotate.patch index f436a9d956175ad6f7d56e0a55a48a7817b357d7..ec522b0306c5f2b2e5c9b2c3bdef4662b41aed1d 100644 --- a/mariadb-logrotate.patch +++ b/mariadb-logrotate.patch @@ -1,51 +1,32 @@ -diff -Naur mariadb-10.5.15/support-files/mysql-log-rotate.sh mariadb-10.5.15_patched/support-files/mysql-log-rotate.sh ---- mariadb-10.5.15/support-files/mysql-log-rotate.sh 2022-02-10 20:11:35.000000000 +0000 -+++ mariadb-10.5.15_patched/support-files/mysql-log-rotate.sh 2022-04-14 11:31:55.344000000 +0000 -@@ -3,36 +3,24 @@ - # in the [mysqld] section as follows: - # - # [mysqld] --# log-error=@localstatedir@/mysqld.log --# --# If the root user has a password you have to create a --# /root/.my.cnf configuration file with the following --# content: --# --# [mysqladmin] --# password = --# user= root --# --# where "" is the password. --# --# ATTENTION: This /root/.my.cnf should be readable ONLY --# for root ! -+# log-error=@LOG_LOCATION@ +Adjust the 'mariadb.logrotate.sh' script in several ways: + +* Use the correct log file pathname for Red Hat installations. + +* Remove Debian specific code + for the very unlikely, but possible scenario + in which the debian config file would exist. + +--- mariadb-10.11.6/support-files/mariadb.logrotate.sh 2023-11-08 16:51:43.000000000 +0100 ++++ mariadb-10.11.6/support-files/mariadb.logrotate.sh_patched 2023-12-17 18:03:36.955861025 +0100 +@@ -6,7 +6,7 @@ + # Read https://mariadb.com/kb/en/error-log/ to learn more about logging and + # https://mariadb.com/kb/en/rotating-logs-on-unix-and-linux/ about rotating logs. --@localstatedir@/mysqld.log { -- # create 600 mysql mysql +-@localstatedir@/mysqld.log @localstatedir@/mariadb.log @logdir@/*.log { +@LOG_LOCATION@ { -+ create 600 mysql mysql - su mysql mysql - notifempty - daily - rotate 3 - missingok - compress -+ delaycompress -+ sharedscripts -+ - postrotate -- # just if mariadbd is really running -- if test -x @bindir@/mysqladmin && \ -- @bindir@/mysqladmin ping &>/dev/null -- then -- @bindir@/mysqladmin --local flush-error-log \ -- flush-engine-log flush-general-log flush-slow-log -- fi -+ # just if mariadbd is really running -+ if [ -e @PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid ] -+ then -+ kill -1 $(<@PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid) -+ fi - endscript - } + + # Depends on a mysql@localhost unix_socket authenticated user with RELOAD privilege + @su_user@ +@@ -45,11 +45,6 @@ + # has thanks to the default use of Unix socket authentication for the 'mysql' + # (or root on Debian) account used everywhere since MariaDB 10.4. + postrotate +- if test -r /etc/mysql/debian.cnf +- then +- EXTRAPARAM='--defaults-file=/etc/mysql/debian.cnf' +- fi +- + if test -x @bindir@/mariadb-admin + then + @bindir@/mariadb-admin $EXTRAPARAM --local flush-error-log \ + diff --git a/mariadb.spec b/mariadb.spec index 7a74fe06bf0efb545ab3534dc7868f48c6119758..fcf8e523157ddf13302c9e2bebf6ee3e4de99903 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -73,8 +73,8 @@ %global sameevr %{epoch}:%{version}-%{release} Name: mariadb -Version: 10.5.29 -Release: 2 +Version: 10.11.13 +Release: 1 Epoch: 4 Summary: A very fast and robust SQL database server @@ -112,8 +112,6 @@ Patch9: %{pkgnamepatch}-ownsetup.patch Patch10: %{pkgnamepatch}-ssl-cipher-tests.patch # Patch11: Use PCDIR CMake option, if configured Patch11: %{pkgnamepatch}-pcdir.patch -# Patch12: RISC-V: use RDTIME for cycle timer -Patch12: %{pkgnamepatch}-RISC-V-use-RDTIME-for-cycle-timer.patch BuildRequires: make BuildRequires: cmake gcc-c++ @@ -123,6 +121,12 @@ BuildRequires: systemd systemd-devel # Page compression algorithms for InnoDB & XtraDB BuildRequires: zlib-devel +BuildRequires: liburing-devel +BuildRequires: libcurl-devel +BuildRequires: bzip2-devel +BuildRequires: xz-devel +BuildRequires: lzo-devel +BuildRequires: fmt-devel %{?with_lz4:BuildRequires: lz4-devel} # asynchornous operations stuff; needed also for wsrep API @@ -618,14 +622,7 @@ sources. %prep -%setup -q -n mariadb-%{version} - -%patch -P4 -p1 -%patch -P7 -p1 -%patch -P9 -p1 -%patch -P10 -p1 -%patch -P11 -p1 -%patch -P12 -p1 +%autosetup -p1 -n mariadb-%{version} # Remove JAR files that upstream puts into tarball find . -name "*.jar" -type f -exec rm --verbose -f {} \; @@ -730,6 +727,7 @@ fi -DWITH_MARIABACKUP=%{?with_backup:ON}%{!?with_backup:NO} \ -DWITH_UNIT_TESTS=%{?with_test:ON}%{!?with_test:NO} \ -DCONC_WITH_SSL=%{?with_clibrary:ON}%{!?with_clibrary:NO} \ + -DWITH_LIBFMT=system \ -DWITH_SSL=system \ -DWITH_ZLIB=system \ -DLZ4_LIBS=%{_libdir}/liblz4.so \ @@ -804,6 +802,7 @@ fi %if %{without clibrary} # Client part should be included in package 'mariadb-connector-c' rm %{buildroot}%{_libdir}/pkgconfig/libmariadb.pc +rm %{buildroot}%{_mandir}/man3/* %endif # install INFO_SRC, INFO_BIN into libdir (upstream thinks these are doc files, @@ -889,11 +888,6 @@ rm %{buildroot}%{_mandir}/man1/mytop.1* # Should be shipped with mariadb-connector-c rm %{buildroot}%{_mandir}/man1/mariadb_config.1* -# put logrotate script where it needs to be -mkdir -p %{buildroot}%{logrotateddir} -mv %{buildroot}%{_datadir}/%{pkg_name}/mysql-log-rotate %{buildroot}%{logrotateddir}/%{daemon_name} -chmod 644 %{buildroot}%{logrotateddir}/%{daemon_name} - # for compatibility with upstream RPMs, create mysqld symlink in sbin mkdir -p %{buildroot}%{_sbindir} ln -s %{_libexecdir}/mysqld %{buildroot}%{_sbindir}/mysqld @@ -914,8 +908,9 @@ mkdir -p %{buildroot}%{_sysconfdir}/sysconfig touch %{buildroot}%{_sysconfdir}/sysconfig/clustercheck install -p -m 0755 %{_builddir}/mariadb-%{version}/scripts/clustercheck.sh %{buildroot}%{_bindir}/clustercheck + # remove duplicate logrotate script -rm %{buildroot}%{logrotateddir}/mysql +rm %{buildroot}%{_datadir}/mariadb/mariadb.logrotate # Remove AppArmor files rm -r %{buildroot}%{_datadir}/%{pkg_name}/policy/apparmor @@ -1204,8 +1199,9 @@ fi %lang(es) %{_datadir}/%{pkg_name}/spanish %lang(sv) %{_datadir}/%{pkg_name}/swedish %lang(uk) %{_datadir}/%{pkg_name}/ukrainian -%{_datadir}/%{pkg_name}/bulgarian -%{_datadir}/%{pkg_name}/chinese +%lang(bg) %{_datadir}/%{pkg_name}/bulgarian +%lang(zh) %{_datadir}/%{pkg_name}/chinese +%lang(ka) %{_datadir}/%{pkg_name}/georgian %endif %if %{with galera} @@ -1249,6 +1245,11 @@ fi %config(noreplace) %{_sysconfdir}/my.cnf.d/%{pkg_name}-server.cnf %config(noreplace) %{_sysconfdir}/my.cnf.d/enable_encryption.preset %config(noreplace) %{_sysconfdir}/my.cnf.d/spider.cnf +%config(noreplace) %{_sysconfdir}/my.cnf.d/provider_bzip2.cnf +%config(noreplace) %{_sysconfdir}/my.cnf.d/provider_lz4.cnf +%config(noreplace) %{_sysconfdir}/my.cnf.d/provider_lzma.cnf +%config(noreplace) %{_sysconfdir}/my.cnf.d/provider_lzo.cnf +%config(noreplace) %{_sysconfdir}/my.cnf.d/hashicorp_key_management.cnf %{_sbindir}/mysqld %{_sbindir}/mariadbd @@ -1307,10 +1308,12 @@ fi %{_mandir}/man1/mysql.server.1* +%{_datadir}/%{pkg_name}/mini-benchmark %{_datadir}/%{pkg_name}/fill_help_tables.sql %{_datadir}/%{pkg_name}/maria_add_gis_sp.sql %{_datadir}/%{pkg_name}/maria_add_gis_sp_bootstrap.sql %{_datadir}/%{pkg_name}/mysql_system_tables.sql +%{_datadir}/%{pkg_name}/mysql_sys_schema.sql %{_datadir}/%{pkg_name}/mysql_system_tables_data.sql %{_datadir}/%{pkg_name}/mysql_test_data_timezone.sql %{_datadir}/%{pkg_name}/mysql_performance_tables.sql @@ -1477,6 +1480,9 @@ fi %endif %changelog +* Thu Jul 17 2025 Funda Wang - 4:10.11.13-1 +- update to 10.11.13 + * Tue Jun 17 2025 xiejing - 4:10.5.29-2 - Revert to the old cmake usage pattern to prevent macro definitions from being overridden