mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 09:36:41 -04:00
databases/xtrabackup: fix build on the i386 platform
- Copy fix from the databases/mysql57-server to fix boost compliation - Remove all clang workaround as not needed anymore - Remove outdated patches and sync some patches from databases/mysql - Update version ChangeLog: https://docs.percona.com/percona-xtrabackup/2.4/release-notes.html (cherry picked from commitfcc69d2102
) (cherry picked from commitda87c36f4e
)
This commit is contained in:
parent
4ceeb4e53c
commit
321dfcad24
13 changed files with 122 additions and 47 deletions
|
@ -1,5 +1,5 @@
|
|||
PORTNAME= xtrabackup
|
||||
DISTVERSION= 2.4.21
|
||||
DISTVERSION= 2.4.28
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= https://www.percona.com/downloads/Percona-XtraBackup-${PORTVERSION:R}/Percona-XtraBackup-${PORTVERSION}/source/tarball/:xtrabackup \
|
||||
https://ftp.osuosl.org/pub/blfs/conglomeration/boost/:boost SF/boost/boost/1.59.0/:boost
|
||||
|
@ -42,20 +42,13 @@ PLIST_FILES= bin/xtrabackup bin/xbstream bin/innobackupex bin/xbcrypt \
|
|||
bin/xbcloud bin/xbcloud_osenv
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
# xtrabackup/mysql57 fails to compile with llvm11, which was imported to current in r364284
|
||||
# without a version increase (1300109 = r364274).
|
||||
# Until a proper fix is provided, simply use llvm from ports, which probably could be
|
||||
# a backport of amongst other tings:
|
||||
# https://github.com/mysql/mysql-server/commit/08f46b3c00ee70e7ed7825daeb91df2289f80f50
|
||||
.if ${CHOSEN_COMPILER_TYPE} == clang && ${OPSYS} == FreeBSD && ${OSVERSION} >= 1300109
|
||||
_LLVM_VERSION= 10
|
||||
BUILD_DEPENDS+= clang${_LLVM_VERSION}:devel/llvm${_LLVM_VERSION}
|
||||
CC= ${LOCALBASE}/bin/clang${_LLVM_VERSION}
|
||||
CXX= ${LOCALBASE}/bin/clang++${_LLVM_VERSION}
|
||||
.endif
|
||||
|
||||
# Not sure why it's trying to install mysql client libraries now
|
||||
post-install:
|
||||
${RM} -rf ${STAGEDIR}${LOCALBASE}/lib
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|__clang__|__undefined__|g' \
|
||||
${WRKDIR}/boost_1_59_0/boost/atomic/detail/ops_gcc_x86_dcas.hpp
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
TIMESTAMP = 1610454639
|
||||
SHA256 (percona-xtrabackup-2.4.21.tar.gz) = 6427b16348c181df8b570bc9e7c16374fef81277dd8677628ae3b9fb608548cc
|
||||
SIZE (percona-xtrabackup-2.4.21.tar.gz) = 61901220
|
||||
TIMESTAMP = 1685991049
|
||||
SHA256 (percona-xtrabackup-2.4.28.tar.gz) = 1d77f920a0cf536e12ddcd3a154583b1b52cd3db35bd2d06db629cc255367cea
|
||||
SIZE (percona-xtrabackup-2.4.28.tar.gz) = 62525343
|
||||
SHA256 (boost_1_59_0.tar.bz2) = 727a932322d94287b62abb1bd2d41723eec4356a7728909e38adb65ca25241ca
|
||||
SIZE (boost_1_59_0.tar.bz2) = 70389425
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- cmake/install_layout.cmake.orig 2020-04-10 19:45:19 UTC
|
||||
--- cmake/install_layout.cmake.orig 2023-03-14 11:58:56 UTC
|
||||
+++ cmake/install_layout.cmake
|
||||
@@ -160,7 +160,7 @@ SET(INSTALL_INFODIR_STANDALONE "docs")
|
||||
@@ -167,7 +167,7 @@ SET(INSTALL_INFODIR_STANDALONE "docs")
|
||||
#
|
||||
SET(INSTALL_SHAREDIR_STANDALONE "share")
|
||||
SET(INSTALL_MYSQLSHAREDIR_STANDALONE "share")
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
--- cmake/os/FreeBSD.cmake.orig 2020-05-26 05:35:19 UTC
|
||||
--- cmake/os/FreeBSD.cmake.orig 2023-03-14 11:58:56 UTC
|
||||
+++ cmake/os/FreeBSD.cmake
|
||||
@@ -36,6 +36,20 @@ IF(NOT FORCE_UNSUPPORTED_COMPILER)
|
||||
IF(GCC_VERSION VERSION_LESS 4.4)
|
||||
MESSAGE(FATAL_ERROR "GCC 4.4 or newer is required!")
|
||||
@@ -45,6 +45,20 @@ IF(NOT FORCE_UNSUPPORTED_COMPILER)
|
||||
IF(NOT HAVE_SUPPORTED_CLANG_VERSION)
|
||||
MESSAGE(FATAL_ERROR "Clang 3.3 or newer is required!")
|
||||
ENDIF()
|
||||
+ CHECK_C_SOURCE_RUNS("
|
||||
+ int main()
|
||||
|
@ -21,7 +21,7 @@
|
|||
ELSE()
|
||||
MESSAGE(FATAL_ERROR "Unsupported compiler!")
|
||||
ENDIF()
|
||||
@@ -44,4 +58,6 @@ ENDIF()
|
||||
@@ -53,4 +67,6 @@ ENDIF()
|
||||
# Should not be needed any more, but kept for easy resurrection if needed
|
||||
# #Legacy option, maybe not needed anymore , taken as is from autotools build
|
||||
# ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000)
|
||||
|
|
11
databases/xtrabackup/files/patch-include_my__compare.h
Normal file
11
databases/xtrabackup/files/patch-include_my__compare.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- include/my_compare.h.orig 2019-10-21 05:21:41 UTC
|
||||
+++ include/my_compare.h
|
||||
@@ -47,7 +47,7 @@ extern "C" {
|
||||
But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH.
|
||||
*/
|
||||
|
||||
-#define HA_MAX_KEY_LENGTH 1000 /* Max length in bytes */
|
||||
+#define HA_MAX_KEY_LENGTH 4000 /* Max length in bytes */
|
||||
#define HA_MAX_KEY_SEG 16 /* Max segments for key */
|
||||
|
||||
#define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6)
|
11
databases/xtrabackup/files/patch-include_myisam.h
Normal file
11
databases/xtrabackup/files/patch-include_myisam.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- include/myisam.h.orig 2019-10-21 05:21:41 UTC
|
||||
+++ include/myisam.h
|
||||
@@ -52,7 +52,7 @@ extern "C" {
|
||||
The following defines can be increased if necessary.
|
||||
But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and MI_MAX_KEY_LENGTH.
|
||||
*/
|
||||
-#define MI_MAX_KEY_LENGTH 1000 /* Max length in bytes */
|
||||
+#define MI_MAX_KEY_LENGTH 4000 /* Max length in bytes */
|
||||
#define MI_MAX_KEY_SEG 16 /* Max segments for key */
|
||||
|
||||
#define MI_MAX_KEY_BUFF (MI_MAX_KEY_LENGTH+MI_MAX_KEY_SEG*6+8+8)
|
|
@ -0,0 +1,32 @@
|
|||
--- sql/conn_handler/socket_connection.cc.orig 2019-10-21 05:21:41 UTC
|
||||
+++ sql/conn_handler/socket_connection.cc
|
||||
@@ -953,22 +953,25 @@ Channel_info* Mysqld_socket_listener::listen_for_conne
|
||||
signal(SIGCHLD, SIG_DFL);
|
||||
request_init(&req, RQ_DAEMON, m_libwrap_name, RQ_FILE,
|
||||
mysql_socket_getfd(connect_sock), NULL);
|
||||
- fromhost(&req);
|
||||
+ void (*my_fromhost) (void *) = (void (*)(void *)) fromhost;
|
||||
+ my_fromhost(&req);
|
||||
|
||||
- if (!hosts_access(&req))
|
||||
+ int (*my_hosts_access) (void *) = (int (*) (void *)) hosts_access;
|
||||
+ if (!my_hosts_access(&req))
|
||||
{
|
||||
/*
|
||||
This may be stupid but refuse() includes an exit(0)
|
||||
which we surely don't want...
|
||||
clean_exit() - same stupid thing ...
|
||||
*/
|
||||
+ char *(*my_eval_client) (void *) = (char *(*) (void *)) eval_client;
|
||||
syslog(LOG_AUTH | m_deny_severity,
|
||||
- "refused connect from %s", eval_client(&req));
|
||||
+ "refused connect from %s", my_eval_client(&req));
|
||||
|
||||
#ifdef HAVE_LIBWRAP_PROTOTYPES
|
||||
// Some distros have patched tcpd.h to have proper prototypes
|
||||
if (req.sink)
|
||||
- (req.sink)(req.fd);
|
||||
+ ((void (*)(int)) (req.sink))(req.fd);
|
||||
#else
|
||||
// Some distros have not patched tcpd.h
|
||||
if (req.sink)
|
|
@ -0,0 +1,11 @@
|
|||
--- sql/locks/shared_spin_lock.cc.orig 2023-06-05 20:41:14 UTC
|
||||
+++ sql/locks/shared_spin_lock.cc
|
||||
@@ -239,7 +239,7 @@ lock::Shared_spin_lock &lock::Shared_spin_lock::try_or
|
||||
{
|
||||
this->spin_exclusive_lock();
|
||||
}
|
||||
-#if defined(__APPLE__)
|
||||
+#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||
my_atomic_store64(&this->m_exclusive_owner, reinterpret_cast<int64>(self));
|
||||
#else
|
||||
my_atomic_store64(&this->m_exclusive_owner, self);
|
38
databases/xtrabackup/files/patch-sql_sys__vars.cc
Normal file
38
databases/xtrabackup/files/patch-sql_sys__vars.cc
Normal file
|
@ -0,0 +1,38 @@
|
|||
--- sql/sys_vars.cc.orig 2021-06-16 10:56:53 UTC
|
||||
+++ sql/sys_vars.cc
|
||||
@@ -1749,7 +1749,7 @@ static Sys_var_ulong Sys_interactive_timeout(
|
||||
"connection before closing it",
|
||||
SESSION_VAR(net_interactive_timeout),
|
||||
CMD_LINE(REQUIRED_ARG),
|
||||
- VALID_RANGE(1, LONG_TIMEOUT), DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1));
|
||||
+ VALID_RANGE(1, INT_MAX32/1000), DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1));
|
||||
|
||||
static Sys_var_ulong Sys_join_buffer_size(
|
||||
"join_buffer_size",
|
||||
@@ -2629,7 +2629,7 @@ static Sys_var_ulong Sys_net_read_timeout(
|
||||
"Number of seconds to wait for more data from a connection before "
|
||||
"aborting the read",
|
||||
SESSION_VAR(net_read_timeout), CMD_LINE(REQUIRED_ARG),
|
||||
- VALID_RANGE(1, LONG_TIMEOUT), DEFAULT(NET_READ_TIMEOUT), BLOCK_SIZE(1),
|
||||
+ VALID_RANGE(1, INT_MAX32/1000), DEFAULT(NET_READ_TIMEOUT), BLOCK_SIZE(1),
|
||||
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
|
||||
ON_UPDATE(fix_net_read_timeout));
|
||||
|
||||
@@ -2653,7 +2653,7 @@ static Sys_var_ulong Sys_net_write_timeout(
|
||||
"Number of seconds to wait for a block to be written to a connection "
|
||||
"before aborting the write",
|
||||
SESSION_VAR(net_write_timeout), CMD_LINE(REQUIRED_ARG),
|
||||
- VALID_RANGE(1, LONG_TIMEOUT), DEFAULT(NET_WRITE_TIMEOUT), BLOCK_SIZE(1),
|
||||
+ VALID_RANGE(1, INT_MAX32/1000), DEFAULT(NET_WRITE_TIMEOUT), BLOCK_SIZE(1),
|
||||
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
|
||||
ON_UPDATE(fix_net_write_timeout));
|
||||
|
||||
@@ -4389,7 +4389,7 @@ static Sys_var_ulong Sys_net_wait_timeout(
|
||||
"The number of seconds the server waits for activity on a "
|
||||
"connection before closing it",
|
||||
SESSION_VAR(net_wait_timeout), CMD_LINE(REQUIRED_ARG),
|
||||
- VALID_RANGE(1, IF_WIN(INT_MAX32/1000, LONG_TIMEOUT)),
|
||||
+ VALID_RANGE(1, INT_MAX32/1000),
|
||||
DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1));
|
||||
|
||||
static Sys_var_plugin Sys_default_storage_engine(
|
|
@ -1,6 +1,6 @@
|
|||
--- storage/myisam/mi_dynrec.c.orig 2020-04-10 19:45:19 UTC
|
||||
--- storage/myisam/mi_dynrec.c.orig 2023-03-14 11:58:56 UTC
|
||||
+++ storage/myisam/mi_dynrec.c
|
||||
@@ -65,18 +65,13 @@ my_bool mi_dynmap_file(MI_INFO *info, my_off_t size)
|
||||
@@ -72,18 +72,13 @@ my_bool mi_dynmap_file(MI_INFO *info, my_off_t size)
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
/*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- storage/innobase/fsp/fsp0fsp.cc.orig 2020-04-10 19:45:19 UTC
|
||||
--- storage/innobase/fsp/fsp0fsp.cc.orig 2023-03-14 11:58:56 UTC
|
||||
+++ storage/innobase/fsp/fsp0fsp.cc
|
||||
@@ -1289,7 +1289,7 @@ fsp_header_decode_encryption_info(
|
||||
@@ -1293,7 +1293,7 @@ fsp_header_decode_encryption_info(
|
||||
|
||||
if (elen == MY_AES_BAD_DATA) {
|
||||
my_free(master_key);
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- storage/innobase/xtrabackup/src/ds_tmpfile.c.orig 2020-04-10 19:45:19 UTC
|
||||
+++ storage/innobase/xtrabackup/src/ds_tmpfile.c
|
||||
@@ -55,7 +55,7 @@ datasink_t datasink_tmpfile = {
|
||||
&tmpfile_deinit
|
||||
};
|
||||
|
||||
-MY_TMPDIR mysql_tmpdir_list;
|
||||
+extern MY_TMPDIR mysql_tmpdir_list;
|
||||
|
||||
static ds_ctxt_t *
|
||||
tmpfile_init(const char *root)
|
|
@ -1,10 +0,0 @@
|
|||
--- storage/innobase/xtrabackup/src/xbstream.c.orig 2020-04-10 19:45:19 UTC
|
||||
+++ storage/innobase/xtrabackup/src/xbstream.c
|
||||
@@ -55,7 +55,6 @@ datasink_t datasink_xbstream;
|
||||
datasink_t datasink_compress;
|
||||
datasink_t datasink_tmpfile;
|
||||
datasink_t datasink_encrypt;
|
||||
-datasink_t datasink_buffer;
|
||||
|
||||
static run_mode_t opt_mode;
|
||||
static char * opt_directory = NULL;
|
Loading…
Add table
Reference in a new issue