diff --git a/databases/xtrabackup8/Makefile b/databases/xtrabackup8/Makefile index c38b83ce5ee1..0a9a58b0f62a 100644 --- a/databases/xtrabackup8/Makefile +++ b/databases/xtrabackup8/Makefile @@ -1,83 +1,83 @@ PORTNAME= xtrabackup PORTVERSION= 8.0.31 DISTVERSIONSUFFIX= -24 CATEGORIES= databases MASTER_SITES= https://github.com/percona/percona-xtrabackup/archive/:percona \ SF/boost/boost/${BOOST_VERSION}:boost PKGNAMESUFFIX= 8 DISTFILES= ${PPORTNAME}-${DVERSION}${EXTRACT_SUFX}:percona \ boost_${BOOST_VERSION_UNDER}${EXTRACT_SUFX}:boost MAINTAINER= eugene@zhegan.in COMMENT= Open-source backup tool for InnoDB and XtraDB WWW= https://www.percona.com/doc/percona-xtrabackup/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= protobuf>=3.0:devel/protobuf \ rapidjson>=1.1.0:devel/rapidjson \ libevent>=2.1:devel/libevent \ ncurses>=6.3:devel/ncurses LIB_DEPENDS= libcurl.so:ftp/curl \ libev.so:devel/libev \ libgcrypt.so:security/libgcrypt \ libgpg-error.so:security/libgpg-error \ libicudata.so:devel/icu \ libncurses.so.6:devel/ncurses \ libprotobuf-lite.so:devel/protobuf \ libunwind.so:devel/libunwind \ libzstd.so:archivers/zstd RUN_DEPENDS= qpress:archivers/qpress USES= bison cmake compiler:c++14-lang cpe pkgconfig ssl CPE_VENDOR= percona CMAKE_ARGS= -DBUILD_CONFIG:STRING=xtrabackup_release \ -DWITHOUT_COMPONENT_KEYRING_KMIP:STRING=yes \ -DWITH_VERSION_CHECK=false .for component in EDITLINE ICU LIBEVENT PROTOBUF RAPIDJSON ZSTD CMAKE_ARGS+= -DWITH_${component}:STRING=system .endfor CONFLICTS_INSTALL= ${PORTNAME} # Bundle last supported Boost release BOOST_VERSION= 1.77.0 BOOST_VERSION_UNDER= ${BOOST_VERSION:C/\./_/g} CMAKE_ARGS+= -DWITH_BOOST=${WRKDIR}/boost_${BOOST_VERSION_UNDER} # Build fails without NDEBUG, so force it CFLAGS+= -DNDEBUG CXXFLAGS+= -DNDEBUG DVERSION= ${PORTVERSION}${DISTVERSIONSUFFIX} PPORTNAME= percona-${PORTNAME} WRKSRC= ${WRKDIR}/${PPORTNAME}-${PPORTNAME}-${DVERSION} .include # Since MySQL 8.0.20 InnoDB engine uses new memory alligned allocator # which is broken on i386 due to different size of types and causes a # 'static_assert(alignof(T) <= alignof(std::max_align_t))' error .if ${ARCH} == i386 -CMAKE_ARGS+= -DDISABLE_PSI_MEMORY=1 +CXXFLAGS+= -malign-double .endif KEEP_EXTRA= lz4 robin-hood-hashing zlib pre-configure: .for dir in ${KEEP_EXTRA} @${MV} ${WRKSRC}/extra/${dir} ${WRKDIR} .endfor @${RM} -r ${WRKSRC}/extra/* .for dir in ${KEEP_EXTRA} @${MV} ${WRKDIR}/${dir} ${WRKSRC}/extra .endfor post-stage: @${RM} -r ${STAGEDIR}${PREFIX}/docs @${RMDIR} ${STAGEDIR}${PREFIX}/lib/plugin/debug .include diff --git a/databases/xtrabackup8/files/patch-storage_innobase_log__log0recv.cc b/databases/xtrabackup8/files/patch-storage_innobase_log__log0recv.cc new file mode 100644 index 000000000000..ad9388decfa4 --- /dev/null +++ b/databases/xtrabackup8/files/patch-storage_innobase_log__log0recv.cc @@ -0,0 +1,29 @@ +--- storage/innobase/log/log0recv.cc.orig 2023-01-30 20:34:34.000000000 +0700 ++++ storage/innobase/log/log0recv.cc 2023-03-10 12:08:29.586971000 +0700 +@@ -3789,7 +3789,7 @@ static bool recv_scan_log_recs(log_t &log, + #else /* !UNIV_HOTBACKUP */ + bool meb_scan_log_recs( + #endif /* !UNIV_HOTBACKUP */ +- size_t *max_memory, const byte *buf, size_t len, ++ size_t max_memory, const byte *buf, size_t len, + lsn_t start_lsn, lsn_t *read_upto_lsn, + dberr_t &err, lsn_t to_lsn) { + const byte *log_block = buf; +@@ -4066,7 +4066,7 @@ bool meb_scan_log_recs( + recv_parse_log_recs(); + + #ifndef UNIV_HOTBACKUP +- if (recv_heap_used() > *max_memory) { ++ if (recv_heap_used() > max_memory) { + recv_apply_hashed_log_recs(log, false); + } + #endif /* !UNIV_HOTBACKUP */ +@@ -4254,7 +4254,7 @@ static dberr_t recv_recovery_begin(log_t &log, const l + + dberr_t err; + +- finished = recv_scan_log_recs(log, &max_mem, log.buf, end_lsn - start_lsn, ++ finished = recv_scan_log_recs(log, max_mem, log.buf, end_lsn - start_lsn, + start_lsn, &log.m_scanned_lsn, err, to_lsn); + + if (err != DB_SUCCESS) {