diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:04:23 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:04:23 +0000 |
commit | 9a6158e391576f265fbd7d0da2778ecad1dbecd5 (patch) | |
tree | 1409a92dae3e99541a9283fed1d0409adb033557 /debian/patches | |
parent | Adding upstream version 1:10.6.11. (diff) | |
download | mariadb-10.6-debian.tar.xz mariadb-10.6-debian.zip |
Adding debian version 1:10.6.11-2.debian/1%10.6.11-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/0025-Change-the-default-optimization-from-O3-to-O2-in-mys.patch | 54 | ||||
-rw-r--r-- | debian/patches/1556.patch | 140 | ||||
-rw-r--r-- | debian/patches/2006-kfreebsd-amd64.patch | 30 | ||||
-rw-r--r-- | debian/patches/2129-new-script-wsrep-sst-backup-fixes.patch | 51 | ||||
-rw-r--r-- | debian/patches/env-perl-usr-bin-perl.patch | 97 | ||||
-rw-r--r-- | debian/patches/fix-reproducible-builds-rocksdb.patch | 26 | ||||
-rw-r--r-- | debian/patches/fix-spelling-rocksdb.patch | 36 | ||||
-rw-r--r-- | debian/patches/mroonga-mrn-lib-dirs-path-reproducible-build.patch | 39 | ||||
-rw-r--r-- | debian/patches/rocksdb-kfreebsd.patch | 148 | ||||
-rw-r--r-- | debian/patches/series | 9 |
10 files changed, 630 insertions, 0 deletions
diff --git a/debian/patches/0025-Change-the-default-optimization-from-O3-to-O2-in-mys.patch b/debian/patches/0025-Change-the-default-optimization-from-O3-to-O2-in-mys.patch new file mode 100644 index 00000000..3c6f04f4 --- /dev/null +++ b/debian/patches/0025-Change-the-default-optimization-from-O3-to-O2-in-mys.patch @@ -0,0 +1,54 @@ +From: =?utf-8?q?Ond=C5=99ej_Sur=C3=BD?= <ondrej@debian.org> +Date: Wed, 22 Nov 2017 20:32:51 +0000 +Subject: Change the default optimization from -O3 to -O2 in + mysql_release.cmake BUILD_CONFIG profile +Forwarded: https://jira.mariadb.org/browse/MDEV-19734?focusedCommentId=156606&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-156606 + +--- + cmake/build_configurations/mysql_release.cmake | 12 ++++++------ + .../PerconaFT/cmake_modules/TokuSetupCompiler.cmake | 16 ++++++++-------- + 2 files changed, 14 insertions(+), 14 deletions(-) + +--- a/cmake/build_configurations/mysql_release.cmake ++++ b/cmake/build_configurations/mysql_release.cmake +@@ -185,12 +185,12 @@ IF(UNIX) + IF(CMAKE_COMPILER_IS_GNUCC) + SET(COMMON_C_FLAGS "-g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized") + SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}") +- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}") ++ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 ${COMMON_C_FLAGS}") + ENDIF() + IF(CMAKE_COMPILER_IS_GNUCXX) + SET(COMMON_CXX_FLAGS "-g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized") + SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}") +- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}") ++ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 ${COMMON_CXX_FLAGS}") + ENDIF() + + # IBM Z flags +@@ -239,8 +239,8 @@ IF(UNIX) + ENDIF() + SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}") + SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}") +- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -unroll2 -ip ${COMMON_C_FLAGS}") +- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -unroll2 -ip ${COMMON_CXX_FLAGS}") ++ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -unroll2 -ip ${COMMON_C_FLAGS}") ++ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -unroll2 -ip ${COMMON_CXX_FLAGS}") + SET(WITH_SSL no) + ENDIF() + ENDIF() +@@ -249,12 +249,12 @@ IF(UNIX) + IF(CMAKE_C_COMPILER_ID MATCHES "Clang") + SET(COMMON_C_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing -Wno-parentheses-equality -Wno-string-plus-int") + SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}") +- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}") ++ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 ${COMMON_C_FLAGS}") + ENDIF() + IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + SET(COMMON_CXX_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing -Wno-parentheses-equality -Wno-string-plus-int") + SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}") +- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}") ++ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 ${COMMON_CXX_FLAGS}") + ENDIF() + + # Solaris flags diff --git a/debian/patches/1556.patch b/debian/patches/1556.patch new file mode 100644 index 00000000..d1e2f985 --- /dev/null +++ b/debian/patches/1556.patch @@ -0,0 +1,140 @@ +Forwarded: https://github.com/MariaDB/server/pull/1556 +From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= <otto@kekalainen.net> +Date: Wed, 30 Sep 2020 20:01:35 +0300 +Subject: [PATCH] MDEV-22659: Create one single unified and optimal logrotate + config + +Replace mysql-log-rotate.sh and debian/...mysql-server.logrotate with one +new unified and well documented version. + +Name is mariadb.logrotate.in as in 10.6 branch we use now the 'mariadb' +name, and use 'logrotate' to match the actual name of the utility, and +use '.in' instead of '.sh' as this is not a shell script but a template +file. + +--- a/.gitignore ++++ b/.gitignore +@@ -260,7 +260,7 @@ support-files/my-innodb-heavy-4G.cnf + support-files/my-large.cnf + support-files/my-medium.cnf + support-files/my-small.cnf +-support-files/mysql-log-rotate ++support-files/mariadb.logrotate + support-files/mysql.10.0.11.spec + support-files/mysql.server + support-files/mysql.service +--- a/support-files/CMakeLists.txt ++++ b/support-files/CMakeLists.txt +@@ -32,6 +32,9 @@ ELSE() + SET(MYSQLD_GROUP "mysql") + SET(ini_file_extension "cnf") + SET(HOSTNAME "uname -n") ++ ++ # Define directly here, as cmake/install_layout.cmake has no LOGDIR to be inherited ++ SET(logdir "/var/log/mysql") + ENDIF() + + # XXX: shouldn't we just have variables for all this stuff and centralise +@@ -51,9 +54,11 @@ ENDIF() + + IF(UNIX AND NOT WITHOUT_SERVER) + SET(prefix ${CMAKE_INSTALL_PREFIX}) +- FOREACH(script mysqld_multi.server mysql-log-rotate binary-configure wsrep_notify) +- CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${script}.sh ++ FOREACH(script mysqld_multi.server binary-configure wsrep_notify) ++ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${script}.sh + ${CMAKE_CURRENT_BINARY_DIR}/${script} @ONLY ) ++ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mariadb.logrotate.in ++ ${CMAKE_CURRENT_BINARY_DIR}/mariadb.logrotate @ONLY ) + INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${script} + DESTINATION ${inst_location} COMPONENT Server_Scripts) + ENDFOREACH() +@@ -95,7 +100,7 @@ IF(UNIX AND NOT WITHOUT_SERVER) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_LIBDIR}/pkgconfig COMPONENT Development) + + INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development) +- ++ + SET(bindir ${INSTALL_BINDIRABS}) + SET(sbindir ${INSTALL_SBINDIRABS}) + SET(scriptdir ${INSTALL_SCRIPTDIRABS}) +@@ -113,7 +118,7 @@ IF(UNIX AND NOT WITHOUT_SERVER) + ELSE() + SET(sysconf2dir "${sysconfdir}/mysql") + ENDIF() +- CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql.server.sh ++ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql.server.sh + ${CMAKE_CURRENT_BINARY_DIR}/mysql.server @ONLY) + INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/mysql.server + DESTINATION ${inst_location} COMPONENT SupportFiles) +@@ -199,8 +204,9 @@ IF(UNIX AND NOT WITHOUT_SERVER) + ENDIF() + + IF (INSTALL_SYSCONFDIR) +- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mysql-log-rotate DESTINATION ${INSTALL_SYSCONFDIR}/logrotate.d +- RENAME mysql COMPONENT SupportFiles) ++ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.logrotate ++ DESTINATION ${INSTALL_SYSCONFDIR}/logrotate.d ++ RENAME mariadb COMPONENT SupportFiles) + IF(NOT HAVE_SYSTEMD) + INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/mysql.server + DESTINATION ${INSTALL_SYSCONFDIR}/init.d +--- /dev/null ++++ b/support-files/mariadb.logrotate.in +@@ -0,0 +1,56 @@ ++# This is the MariaDB configuration for the logrotate utility ++# ++# Note that on most Linux systems logs are written to journald, which has its ++# own rotation scheme. ++# ++# 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 @logdir@/mysql.log @localstatedir@/mariadb.log @logdir@/mysql-slow.log @logdir@/mariadb-slow.log @logdir@/error.log { ++ ++ # If any of the files listed above is missing, skip them silently without ++ # emitting any errors ++ missingok ++ ++ # If file exists but is empty, don't rotate it ++ notifempty ++ ++ # Run monthly ++ monthly ++ ++ # Keep 6 months of logs ++ rotate 6 ++ ++ # If file is growing too big, rotate immediately ++ maxsize 500M ++ ++ # If file size is too small, don't rotate at all ++ minsize 50M ++ ++ # Compress logs, as they are text and compression will save a lot of disk space ++ compress ++ ++ # Don't compress the log immediately to avoid errors about "file size changed while zipping" ++ delaycompress ++ ++ # Don't run the postrotate script for each file configured in this file, but ++ # run it only once if one or more files were rotated ++ sharedscripts ++ ++ # After each rotation, run this custom script to flush the logs. Note that ++ # this assumes that the mariadb-admin command has database access, which it ++ # has thanks to the default use of Unix socket authentication for the 'root' ++ # 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 \ ++ flush-engine-log flush-general-log flush-slow-log ++ fi ++ endscript ++} diff --git a/debian/patches/2006-kfreebsd-amd64.patch b/debian/patches/2006-kfreebsd-amd64.patch new file mode 100644 index 00000000..dd1ee21a --- /dev/null +++ b/debian/patches/2006-kfreebsd-amd64.patch @@ -0,0 +1,30 @@ +Forwarded: https://github.com/MariaDB/server/pull/2006 +Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/2006.patch +From: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Tue, 8 Feb 2022 00:18:27 +0000 +Subject: [PATCH] MDEV-27804 Fails to build - perf schema - thread id of type + uintptr_t requires header + +While building on GNU/Hurd and kfreebsd. + +On the C++ standard uintptr_t can be defined in <cstdint> +ref: https://www.cplusplus.com/reference/cstdint/ + +Fixes: 0d44792a835128a83ff07f14dbbcdd621df9f7da +--- + storage/perfschema/my_thread.h | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/storage/perfschema/my_thread.h ++++ b/storage/perfschema/my_thread.h +@@ -18,6 +18,10 @@ + #include <cstdint> + #endif + ++#if defined(HAVE_INTEGER_PTHREAD_SELF) ++#include <cstdint> ++#endif ++ + typedef pthread_key_t thread_local_key_t; + typedef pthread_t my_thread_handle; + typedef pthread_attr_t my_thread_attr_t; diff --git a/debian/patches/2129-new-script-wsrep-sst-backup-fixes.patch b/debian/patches/2129-new-script-wsrep-sst-backup-fixes.patch new file mode 100644 index 00000000..8786887e --- /dev/null +++ b/debian/patches/2129-new-script-wsrep-sst-backup-fixes.patch @@ -0,0 +1,51 @@ +Forwarded: https://github.com/MariaDB/server/pull/2129 +Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/2129.patch +From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= <otto@kekalainen.net> +Date: Sun, 22 May 2022 10:13:33 -0700 +Subject: [PATCH] Properly introduce wsrep_sst_backup script in project + packaging + +The script wsrep_sst_backup was introduced on MariaDB 10.3 in commit +9b2fa2a. The new script was automatically included in RPM packages but not +in Debian packages (which started to fail on waring about stray file). + +Include wsrep_sst_backup in the mariadb-server-10.{3..8} package, and +also include a stub man page so that packaging of a new script is complete. + +--- + debian/mariadb-server-10.6.install | 2 ++ + man/CMakeLists.txt | 2 +- + man/wsrep_sst_backup.1 | 16 ++++++++++++++++ + 3 files changed, 19 insertions(+), 1 deletion(-) + create mode 100644 man/wsrep_sst_backup.1 + +--- a/man/CMakeLists.txt ++++ b/man/CMakeLists.txt +@@ -13,7 +13,7 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA + SET(MAN1_WSREP wsrep_sst_rsync.1 wsrep_sst_common.1 wsrep_sst_mariabackup.1 +- wsrep_sst_rsync_wan.1) ++ wsrep_sst_rsync_wan.1 wsrep_sst_backup.1) + SET(MAN1_SERVER innochecksum.1 myisam_ftdump.1 myisamchk.1 + aria_chk.1 aria_dump_log.1 aria_ftdump.1 aria_pack.1 aria_read_log.1 + aria_s3_copy.1 +--- /dev/null ++++ b/man/wsrep_sst_backup.1 +@@ -0,0 +1,16 @@ ++'\" t ++.\" ++.TH "\FBWSREP_SST_BACKUP\FR" "1" "22 May 2022" "MariaDB 10\&.3" "MariaDB Database System" ++.\" ----------------------------------------------------------------- ++.\" * set default formatting ++.\" ----------------------------------------------------------------- ++.\" disable hyphenation ++.nh ++.\" disable justification (adjust text to left margin only) ++.ad l ++.SH NAME ++wsrep_sst_backup \- backup helper script for the MariaDB Galera Cluster ++.SH DESCRIPTION ++Use: See source code of script\. ++.PP ++For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/ diff --git a/debian/patches/env-perl-usr-bin-perl.patch b/debian/patches/env-perl-usr-bin-perl.patch new file mode 100644 index 00000000..28096072 --- /dev/null +++ b/debian/patches/env-perl-usr-bin-perl.patch @@ -0,0 +1,97 @@ +Forwarded: https://github.com/MariaDB/server/pull/1718 +Author: Otto Kekäläinen <otto@debian.org> +Subject: Fix perl path in scripts + Fix Lintian issue + https://lintian.debian.org/tags/incorrect-path-for-interpreter.html + . + Upstream will never accept this patch, see + https://github.com/MariaDB/server/pull/1718 + +--- a/mysql-test/lib/process-purecov-annotations.pl ++++ b/mysql-test/lib/process-purecov-annotations.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # -*- cperl -*- + + # This script processes a .gcov coverage report to honor purecov +--- a/mysql-test/lib/v1/mysql-test-run.pl ++++ b/mysql-test/lib/v1/mysql-test-run.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # -*- cperl -*- + + # Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. +--- a/mysql-test/mariadb-stress-test.pl ++++ b/mysql-test/mariadb-stress-test.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + + # Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. + # +--- a/mysql-test/mariadb-test-run.pl ++++ b/mysql-test/mariadb-test-run.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # -*- cperl -*- + + # Copyright (c) 2004, 2014, Oracle and/or its affiliates. +--- a/mysql-test/std_data/checkDBI_DBD-MariaDB.pl ++++ b/mysql-test/std_data/checkDBI_DBD-MariaDB.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + + # Copyright (c) 2011, Oracle and/or its affiliates + # +--- a/mysql-test/suite/engines/rr_trx/run_stress_tx_rr.pl ++++ b/mysql-test/suite/engines/rr_trx/run_stress_tx_rr.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + ################################################################################ + # + # This script runs the transactional stress test "stress_tx_rr" against the +--- a/mysql-test/suite/funcs_1/lib/DataGen_local.pl ++++ b/mysql-test/suite/funcs_1/lib/DataGen_local.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + + + if ( (scalar(@ARGV) != 1 ) || ($ARGV[0] =~ /[^0-9]/i ) ) +--- a/mysql-test/suite/funcs_1/lib/DataGen_modify.pl ++++ b/mysql-test/suite/funcs_1/lib/DataGen_modify.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + + + if ( (scalar(@ARGV) != 2 ) || ($ARGV[0] =~ /[^0-9]/i ) ) +--- a/mysql-test/suite/funcs_2/lib/gen_charset_utf8.pl ++++ b/mysql-test/suite/funcs_2/lib/gen_charset_utf8.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + + ################################################################################# + # Author: Serge Kozlov # +--- a/mysql-test/suite/rpl/extension/checksum.pl ++++ b/mysql-test/suite/rpl/extension/checksum.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + + # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + # +--- a/scripts/mytop.sh ++++ b/scripts/mytop.sh +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # + # $Id: mytop,v 1.99-maria6 2019/10/22 14:53:51 jweisbuch Exp $ + diff --git a/debian/patches/fix-reproducible-builds-rocksdb.patch b/debian/patches/fix-reproducible-builds-rocksdb.patch new file mode 100644 index 00000000..a31a3901 --- /dev/null +++ b/debian/patches/fix-reproducible-builds-rocksdb.patch @@ -0,0 +1,26 @@ +Origin: upstream, https://github.com/facebook/rocksdb/commit/0a9a05ae12943b1529ef1eabbca5ce5a71c986bf +# Merged in RocksDB 6.19.3, but not updated into MariaDB 10.6 +Bug: https://github.com/facebook/rocksdb/issues/7035 +Author: Otto Kekäläinen <otto@kekalainen.net> +Subject: Make RocksDB build reproducible + +The RocksDB binary included a string with the build timestamp: +> rocksdb_build_git_date:@2021-05-23·16:04:38@ + +As this changes from build to build, it makes the builds unreproducible. +Simply removing it solves the issue. + +This temporary fix can be removed when a proper fix already done in upstream +lands in MariaDB when the RocksDB submodule is updated to a newer release. + +--- a/storage/rocksdb/rocksdb/util/build_version.cc.in ++++ b/storage/rocksdb/rocksdb/util/build_version.cc.in +@@ -1,5 +1,5 @@ + // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + #include "build_version.h" +-const char* rocksdb_build_git_sha = "rocksdb_build_git_sha:@@GIT_SHA@@"; +-const char* rocksdb_build_git_date = "rocksdb_build_git_date:@@GIT_DATE_TIME@@"; +-const char* rocksdb_build_compile_date = __DATE__; ++const char* rocksdb_build_git_sha = "rocksdb_build_git_sha:REDACTED"; ++const char* rocksdb_build_git_date = "rocksdb_build_git_date:REDACTED"; ++const char* rocksdb_build_compile_date = "REDACTED"; diff --git a/debian/patches/fix-spelling-rocksdb.patch b/debian/patches/fix-spelling-rocksdb.patch new file mode 100644 index 00000000..f13352db --- /dev/null +++ b/debian/patches/fix-spelling-rocksdb.patch @@ -0,0 +1,36 @@ +Forwarded: https://github.com/facebook/rocksdb/pull/9653 +Author: Otto Kekäläinen <otto@debian.org> +Subject: Fix various spelling errors still found in code + Two upstream PRs remain that have been merged, but not imported on MariaDB 10.6. + +--- a/storage/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc ++++ b/storage/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc +@@ -46,7 +46,7 @@ Status ExternalSstFileIngestionJob::Prep + TablePropertiesCollectorFactory::Context::kUnknownColumnFamily && + f.cf_id != cfd_->GetID()) { + return Status::InvalidArgument( +- "External file column family id dont match"); ++ "External file column family id don't match"); + } + } + +@@ -646,7 +646,7 @@ Status ExternalSstFileIngestionJob::Assi + return Status::InvalidArgument("Global seqno is required, but disabled"); + } else if (file_to_ingest->global_seqno_offset == 0) { + return Status::InvalidArgument( +- "Trying to set global seqno for a file that dont have a global seqno " ++ "Trying to set global seqno for a file that don't have a global seqno " + "field"); + } + +--- a/storage/rocksdb/rocksdb/include/rocksdb/cache.h ++++ b/storage/rocksdb/rocksdb/include/rocksdb/cache.h +@@ -60,7 +60,7 @@ struct LRUCacheOptions { + // If greater than zero, the LRU list will be split into a high-pri + // list and a low-pri list. High-pri entries will be insert to the + // tail of high-pri list, while low-pri entries will be first inserted to +- // the low-pri list (the midpoint). This is refered to as ++ // the low-pri list (the midpoint). This is referred to as + // midpoint insertion strategy to make entries never get hit in cache + // age out faster. + // diff --git a/debian/patches/mroonga-mrn-lib-dirs-path-reproducible-build.patch b/debian/patches/mroonga-mrn-lib-dirs-path-reproducible-build.patch new file mode 100644 index 00000000..45c84cce --- /dev/null +++ b/debian/patches/mroonga-mrn-lib-dirs-path-reproducible-build.patch @@ -0,0 +1,39 @@ +Origin: upstream, https://github.com/mroonga/mroonga/issues/298#issuecomment-1030815927 +Bug: https://github.com/mroonga/mroonga/issues/298 +Forwarded: not-needed +Author: Sutou Kouhei <kou@clear-code.com> +Date: Sat, 5 Feb 2022 11:05:39 +0900 +Subject: [PATCH] cmake: add support for reproducible buildS + . + We should use relative path not absolute path. + We can use target without breaking reproducibility. +--- a/storage/mroonga/CMakeLists.txt ++++ b/storage/mroonga/CMakeLists.txt +@@ -219,7 +219,7 @@ set(MYSQL_INCLUDE_DIRS + + if(MRN_BUNDLED) + set(MYSQL_PLUGIN_DIR "${INSTALL_PLUGINDIR}") +- set(MYSQL_SERVICES_LIB_DIR "${MYSQL_BUILD_DIR}/libservices") ++ set(MYSQL_SERVICES_LIB_DIR) + set(MYSQL_CFLAGS "${CMAKE_C_FLAGS}") + set(MYSQL_VERSION "${MYSQL_BASE_VERSION}") + else() +@@ -258,15 +258,11 @@ endif() + + if(MRN_GROONGA_BUNDLED) + set(GROONGA_INCLUDE_DIRS "${MRN_BUNDLED_GROONGA_DIR}/include") +- set(GROONGA_LIBRARY_DIRS "${MRN_BUNDLED_GROONGA_DIR}/lib") +- set(GROONGA_LIBRARIES "libgroonga") ++ set(GROONGA_LIBRARY "libgroonga") + +- set(MRN_LIBRARY_DIRS ${GROONGA_LIBRARY_DIRS}) +- set(MRN_LIBRARIES ${GROONGA_LIBRARIES}) ++ set(MRN_LIBRARY_DIRS) ++ set(MRN_LIBRARIES ${GROONGA_LIBRARY}) + if(MRN_GROONGA_NORMALIZER_MYSQL_EMBED) +- set(MRN_LIBRARY_DIRS +- ${MRN_LIBRARY_DIRS} +- "${MRN_BUNDLED_GROONGA_NORMALIZER_MYSQL_DIR}/normalizers") + set(MRN_LIBRARIES ${MRN_LIBRARIES} mysql_normalizer) + endif() + else() diff --git a/debian/patches/rocksdb-kfreebsd.patch b/debian/patches/rocksdb-kfreebsd.patch new file mode 100644 index 00000000..f9e9e63d --- /dev/null +++ b/debian/patches/rocksdb-kfreebsd.patch @@ -0,0 +1,148 @@ +Forwarded: https://github.com/facebook/rocksdb/pull/6992 +# Merged in RocksDB 6.13.fb, but not updated into MariaDB 10.6 +Forwarded: https://jira.mariadb.org/browse/MDEV-19251 +Description: + Upstream has merged this but we still need to wait for it to be included + in a RocksDB release and imported into MariaDB and then into Debian. +--- a/storage/rocksdb/build_rocksdb.cmake ++++ b/storage/rocksdb/build_rocksdb.cmake +@@ -90,6 +90,8 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Linux" + add_definitions(-DOS_LINUX) + elseif(CMAKE_SYSTEM_NAME MATCHES "SunOS") + add_definitions(-DOS_SOLARIS) ++elseif(CMAKE_SYSTEM_NAME MATCHES "kFreeBSD") ++ add_definitions(-DOS_GNU_KFREEBSD) + elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + add_definitions(-DOS_FREEBSD) + elseif(CMAKE_SYSTEM_NAME MATCHES "NetBSD") +--- a/storage/rocksdb/rocksdb/CMakeLists.txt ++++ b/storage/rocksdb/rocksdb/CMakeLists.txt +@@ -91,7 +91,7 @@ if(MSVC) + option(WITH_XPRESS "build with windows built in compression" OFF) + include(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty.inc) + else() +- if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") ++ if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" AND NOT CMAKE_SYSTEM_NAME MATCHES "kFreeBSD") + # FreeBSD has jemalloc as default malloc + # but it does not have all the jemalloc files in include/... + set(WITH_JEMALLOC ON) +@@ -413,6 +413,8 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Linux" + add_definitions(-DOS_LINUX) + elseif(CMAKE_SYSTEM_NAME MATCHES "SunOS") + add_definitions(-DOS_SOLARIS) ++elseif(CMAKE_SYSTEM_NAME MATCHES "kFreeBSD") ++ add_definitions(-DOS_GNU_KFREEBSD) + elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + add_definitions(-DOS_FREEBSD) + elseif(CMAKE_SYSTEM_NAME MATCHES "NetBSD") +--- a/storage/rocksdb/rocksdb/build_tools/build_detect_platform ++++ b/storage/rocksdb/rocksdb/build_tools/build_detect_platform +@@ -190,6 +190,17 @@ EOF + PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lpthread" + # PORT_FILES=port/freebsd/freebsd_specific.cc + ;; ++ GNU/kFreeBSD) ++ PLATFORM=OS_GNU_KFREEBSD ++ COMMON_FLAGS="$COMMON_FLAGS -DOS_GNU_KFREEBSD" ++ if [ -z "$USE_CLANG" ]; then ++ COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp" ++ else ++ PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -latomic" ++ fi ++ PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lpthread -lrt" ++ # PORT_FILES=port/gnu_kfreebsd/gnu_kfreebsd_specific.cc ++ ;; + NetBSD) + PLATFORM=OS_NETBSD + COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp -D_REENTRANT -DOS_NETBSD" +--- a/storage/rocksdb/rocksdb/env/env_posix.cc ++++ b/storage/rocksdb/rocksdb/env/env_posix.cc +@@ -41,7 +41,7 @@ + #include <time.h> + #include <algorithm> + // Get nano time includes +-#if defined(OS_LINUX) || defined(OS_FREEBSD) ++#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_GNU_KFREEBSD) + #elif defined(__MACH__) + #include <Availability.h> + #include <mach/clock.h> +@@ -287,7 +287,8 @@ class PosixEnv : public CompositeEnvWrap + } + + uint64_t NowNanos() override { +-#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_AIX) ++#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_GNU_KFREEBSD) || \ ++ defined(OS_AIX) + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); + return static_cast<uint64_t>(ts.tv_sec) * 1000000000 + ts.tv_nsec; +@@ -307,8 +308,8 @@ class PosixEnv : public CompositeEnvWrap + } + + uint64_t NowCPUNanos() override { +-#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_AIX) || \ +- (defined(__MACH__) && defined(__MAC_10_12)) ++#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_GNU_KFREEBSD) || \ ++ defined(OS_AIX) || (defined(__MACH__) && defined(__MAC_10_12)) + struct timespec ts; + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts); + return static_cast<uint64_t>(ts.tv_sec) * 1000000000 + ts.tv_nsec; +--- a/storage/rocksdb/rocksdb/port/stack_trace.cc ++++ b/storage/rocksdb/rocksdb/port/stack_trace.cc +@@ -32,7 +32,7 @@ namespace port { + + namespace { + +-#if defined(OS_LINUX) || defined(OS_FREEBSD) ++#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_GNU_KFREEBSD) + const char* GetExecutableName() { + static char name[1024]; + +--- a/storage/rocksdb/rdb_io_watchdog.h ++++ b/storage/rocksdb/rdb_io_watchdog.h +@@ -56,19 +56,19 @@ class Rdb_io_watchdog { + int stop_timers() { + int ret = 0; + +- if (m_io_check_watchdog_timer) { ++ if (m_io_check_watchdog_timer != reinterpret_cast<timer_t>(-1)) { + ret = timer_delete(m_io_check_watchdog_timer); + + if (!ret) { +- m_io_check_watchdog_timer = nullptr; ++ m_io_check_watchdog_timer = reinterpret_cast<timer_t>(-1); + } + } + +- if (m_io_check_timer && !ret) { ++ if (m_io_check_timer != reinterpret_cast<timer_t>(-1) && !ret) { + ret = timer_delete(m_io_check_timer); + + if (!ret) { +- m_io_check_timer = nullptr; ++ m_io_check_timer = reinterpret_cast<timer_t>(-1); + } + } + +@@ -93,8 +93,8 @@ class Rdb_io_watchdog { + + public: + explicit Rdb_io_watchdog(std::vector<std::string> &&directories) +- : m_io_check_timer(nullptr), +- m_io_check_watchdog_timer(nullptr), ++ : m_io_check_timer(reinterpret_cast<timer_t>(-1)), ++ m_io_check_watchdog_timer(reinterpret_cast<timer_t>(-1)), + m_io_in_progress(false), + m_dirs_to_check(std::move(directories)), + m_buf(nullptr) { +--- a/storage/rocksdb/rdb_io_watchdog.cc ++++ b/storage/rocksdb/rdb_io_watchdog.cc +@@ -111,7 +111,7 @@ void Rdb_io_watchdog::io_check_callback( + sql_print_warning("Deleting the watchdog I/O timer failed with %d.", errno); + } + +- m_io_check_watchdog_timer = nullptr; ++ m_io_check_watchdog_timer = reinterpret_cast<timer_t>(-1); + + RDB_MUTEX_UNLOCK_CHECK(m_reset_mutex); + } diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..b76d87ec --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,9 @@ +0025-Change-the-default-optimization-from-O3-to-O2-in-mys.patch +rocksdb-kfreebsd.patch +env-perl-usr-bin-perl.patch +fix-spelling-rocksdb.patch +1556.patch +fix-reproducible-builds-rocksdb.patch +mroonga-mrn-lib-dirs-path-reproducible-build.patch +2006-kfreebsd-amd64.patch +2129-new-script-wsrep-sst-backup-fixes.patch |