diff options
Diffstat (limited to 'dev-db/percona-xtrabackup')
-rw-r--r-- | dev-db/percona-xtrabackup/Manifest | 5 | ||||
-rw-r--r-- | dev-db/percona-xtrabackup/files/6038a7934cbd4e6c01389fdc9b8ffabf8c3e006a.patch | 139 | ||||
-rw-r--r-- | dev-db/percona-xtrabackup/percona-xtrabackup-8.0.30.23-r1.ebuild (renamed from dev-db/percona-xtrabackup/percona-xtrabackup-8.0.30.23.ebuild) | 26 | ||||
-rw-r--r-- | dev-db/percona-xtrabackup/percona-xtrabackup-8.3.0.1.ebuild | 104 |
4 files changed, 269 insertions, 5 deletions
diff --git a/dev-db/percona-xtrabackup/Manifest b/dev-db/percona-xtrabackup/Manifest index 7bc85ca5600f..dfd295997f73 100644 --- a/dev-db/percona-xtrabackup/Manifest +++ b/dev-db/percona-xtrabackup/Manifest @@ -1,6 +1,9 @@ +AUX 6038a7934cbd4e6c01389fdc9b8ffabf8c3e006a.patch 4859 BLAKE2B 0a0e1ae82d417ebe4bc7daf05886624d086ece17a16fe07769aad738c67bff3d376596be38b6dd8b8252931ff2fc87c0702be1422708ea87a95049ce23da1d87 SHA512 3a5e3e1a51b684c662eb02154126c1f6e57eeaff6d19002c84ba98cb89c60c08167f5d1bd8bce4030640363c9108dc2eee76178cffaa9be9dbf8db7e018d3210 AUX percona-xtrabackup-8.0.26-remove-rpm.patch 568 BLAKE2B 67c25aaa4abbc2ebc51bc9a2e68e7ea25aec1b82f27fc19bd983bdb59edb5c21e8ea4a1dd954cc41143e126413818987bebfc41d2ee4be3fe79e255ecdcfdd68 SHA512 cd2333cc08dcded5060ab961b4458fe9d04d2d5040efc49552361cad5ff12459e7c72a2abea67fedd46ee7f018f8622b0be528017fe2b98256718dae21f682c7 AUX percona-xtrabackup-8.0.30.23-gcc13.patch 923 BLAKE2B 57f5485e0bccdfbd1b0c3220724e914f676f064c595f7c1d4a707a70cf3a6e9fcbc0668187ab006cc028d328c90e1423a649f3c0a2c058488b3cbc19bb08dc62 SHA512 b14a1b68f61ae867e8288dbece8ba83ce6e6d1e2183b3ec7cefd9fc8420b80c9d0a6835ac2828c5b1f35fbb21f41da84126a162a1ee5bdd0f1c83ec919818ed2 DIST boost_1_77_0.tar.bz2 110361537 BLAKE2B 106aeb09ec7705b595f2ca966a76c53c649eac6fac50d88c156862e0991c33c89a2f3a09edcbcb453fa44bf71cdde030b35d0a0889ad97b65f3a868cb877a532 SHA512 39b45c9b60bc5a2a4c669a4463d1272c1e093376b2fb374d7f20a84ea10a3e23bb04b335a735a83a04575731f874d9bff77e89acd947524b3fbbae1b26ae1f2f DIST percona-xtrabackup-8.0.30-23.tar.gz 338259133 BLAKE2B 3b73731497013aea6abae7d83cd96914cb5300dd867f6066514c71d68f8a1420227e33512a5f2faf082029ccd2c871394acbf43fb58c029472cbeb5605f354fc SHA512 acada88f3509526259281b7f9805fcabb31c5924eb50c5ed761b0813f89adda046b060a57825b6a49178171daec8b4388e99202ef9c9def4b2b0932e73b4d535 -EBUILD percona-xtrabackup-8.0.30.23.ebuild 2565 BLAKE2B 78644689570217599cd2ecc3f3d52d4b0a7c25880da3a88dc1f7f81235c71d570f789dc4b751117f5f1295eae1520ad0526121d91f302492d6419637d2fdff5a SHA512 bf36a5888ad62c3d4563cb78d6fe080de272cccb10ed1975854cb3883c42b347e9e754a567913356d8472ad8a47965c0110f52203d75a93a6fa09990ff4a147d +DIST percona-xtrabackup-8.3.0-1.tar.gz 460238502 BLAKE2B 9c0857c40f5df26ab279e355cbbb37f36c89e2c78197e348d35b903cb337d4c06c0efcc27e9ec3d6254c0314db50a4ef786f19bbd3fd1060d107cff2c301648d SHA512 85351d3e13a4da7394052ac9725fc7793a8fbcafd11f1232669c32ecad2349d9f57a86dc8437359a7db9a0de8bab8d6b0d40942e9e5dff67b5ab143902750c30 +EBUILD percona-xtrabackup-8.0.30.23-r1.ebuild 3179 BLAKE2B 1fedefc5ffc56a29796e1fc233ee154081394f8821cddcb527c369a497747313340ced60022bdb1d3dee2de55fbadd78b22a5d856da9559dc6c5dab46a3814ea SHA512 17f954af9637a688f9159c068fce3398ef3ef97e0366bbe810265e56294dc7374a0f7a5117fe05df4f6a62cd62ad0c6a9e7a910bd463be114f41a499d43a04ce +EBUILD percona-xtrabackup-8.3.0.1.ebuild 2424 BLAKE2B 6c60f18c398fcd1b00a14e3ed07aee3adcc21d0886f48b9871863500c169cc88edc90970c756cc0063741c1bdd33c1a9398d49c80361c3f34cd864150431bd7c SHA512 03f96894f5baf352ced1494f4d51e742ed878a10ecf010c9b49de62c43e8ee53a99d7665141f62792e7d615050a841324047b80069f62956eecddaf39a864900 MISC metadata.xml 259 BLAKE2B 8c0dbb14e3352c1c5ee3a0331d2ecf20277153f56cd49df743368b319f52173e6c95338fcb2844d9abd5222029239bd60e95789512cb486789c79d099ee81cde SHA512 301466f584c5c44f450e104d0388b2b2daa8654ac034bba953e3833be4affb95f20880072030823ff5b9c197a84749fd2a501fce5f891c7b829e8e54601b87ec diff --git a/dev-db/percona-xtrabackup/files/6038a7934cbd4e6c01389fdc9b8ffabf8c3e006a.patch b/dev-db/percona-xtrabackup/files/6038a7934cbd4e6c01389fdc9b8ffabf8c3e006a.patch new file mode 100644 index 000000000000..30c333128166 --- /dev/null +++ b/dev-db/percona-xtrabackup/files/6038a7934cbd4e6c01389fdc9b8ffabf8c3e006a.patch @@ -0,0 +1,139 @@ +From 6038a7934cbd4e6c01389fdc9b8ffabf8c3e006a Mon Sep 17 00:00:00 2001 +From: Marcelo Altmann <marcelo.altmann@percona.com> +Date: Tue, 20 Jun 2023 15:41:12 -0300 +Subject: [PATCH] Fixed PXB-2993 - make PXB compatible with procps-4 + +Fixed Issue with procps version 4. +Now we detect the version during cmake and use the correct library +when linking xbtrabackup + +This also fixes PXB-3066 - Compilation issues on Debian 12 +--- + cmake/procps.cmake | 32 +++++++++++++++++++ + .../innobase/xtrabackup/src/CMakeLists.txt | 10 ++++-- + storage/innobase/xtrabackup/src/utils.cc | 24 +++++++++++++- + 3 files changed, 62 insertions(+), 4 deletions(-) + create mode 100644 cmake/procps.cmake + +diff --git a/cmake/procps.cmake b/cmake/procps.cmake +new file mode 100644 +index 000000000000..f463248c48eb +--- /dev/null ++++ b/cmake/procps.cmake +@@ -0,0 +1,32 @@ ++# Copyright (c) 2023 Percona LLC and/or its affiliates ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; version 2 of the License. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ ++MACRO (FIND_PROCPS) ++ FIND_FILE(PROCPS_INCLUDE_DIR NAMES proc/procps.h NO_CACHE) ++ IF (PROCPS_INCLUDE_DIR) ++ MESSAGE("-- Found proc/sysinfo.h in ${PROCPS_INCLUDE_DIR} Procps version 3.") ++ ADD_DEFINITIONS(-DHAVE_PROCPS_V3) ++ SET(PROCPS_VERSION "3") ++ ELSE() ++ FIND_FILE(PROCPS_INCLUDE_DIR NAMES libproc2/meminfo.h NO_CACHE) ++ IF (PROCPS_INCLUDE_DIR) ++ MESSAGE("-- Found libproc2/meminfo.h in ${PROCPS_INCLUDE_DIR}. Procps version 4.") ++ ADD_DEFINITIONS(-DHAVE_PROCPS_V4) ++ SET(PROCPS_VERSION "4") ++ ELSE() ++ MESSAGE(SEND_ERROR "Cannot find proc/sysinfo.h or libproc2/meminfo.h in ${PROCPS_INCLUDE_PATH}. You can pass it to CMake with -DPROCPS_INCLUDE_PATH=<path> or install procps-devel/procps-ng-devel/libproc2-dev package") ++ ENDIF() ++ ENDIF() ++ENDMACRO() +diff --git a/storage/innobase/xtrabackup/src/CMakeLists.txt b/storage/innobase/xtrabackup/src/CMakeLists.txt +index e3a1b9056536..68e33365a36b 100644 +--- a/storage/innobase/xtrabackup/src/CMakeLists.txt ++++ b/storage/innobase/xtrabackup/src/CMakeLists.txt +@@ -14,12 +14,14 @@ + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + INCLUDE(gcrypt) ++INCLUDE(procps) + + OPTION(WITH_VERSION_CHECK "Build with version check" ON) + + INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake) + + FIND_GCRYPT() ++FIND_PROCPS() + + CHECK_TYPE_SIZE("unsigned long" SIZEOF_UNSIGNED_LONG) + +@@ -134,9 +136,11 @@ TARGET_LINK_LIBRARIES(xtrabackup + ) + + IF(NOT APPLE) +- TARGET_LINK_LIBRARIES(xtrabackup +- procps +- ) ++ IF(PROCPS_VERSION EQUAL 4) ++ TARGET_LINK_LIBRARIES(xtrabackup proc2) ++ ELSE() ++ TARGET_LINK_LIBRARIES(xtrabackup procps) ++ ENDIF() + ENDIF() + + # We depend on protobuf because of the mysqlx plugin and replication. +diff --git a/storage/innobase/xtrabackup/src/utils.cc b/storage/innobase/xtrabackup/src/utils.cc +index 527d17d19d47..635b271b0ab1 100644 +--- a/storage/innobase/xtrabackup/src/utils.cc ++++ b/storage/innobase/xtrabackup/src/utils.cc +@@ -23,8 +23,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + #include <mach/mach_host.h> + #include <sys/sysctl.h> + #else ++#ifdef HAVE_PROCPS_V3 + #include <proc/sysinfo.h> +-#endif ++#else ++#include <libproc2/meminfo.h> ++#endif // HAVE_PROCPS_V3 ++#endif // __APPLE__ + #include <boost/uuid/uuid.hpp> // uuid class + #include <boost/uuid/uuid_generators.hpp> // generators + #include <boost/uuid/uuid_io.hpp> // streaming operators etc. +@@ -141,13 +145,31 @@ unsigned long host_free_memory() { + } + #else + unsigned long host_total_memory() { ++#ifdef HAVE_PROCPS_V3 + meminfo(); + return kb_main_total * 1024; ++#else ++ struct meminfo_info *mem_info; ++ if (procps_meminfo_new(&mem_info) < 0) { ++ return 0; ++ } ++ ++ return MEMINFO_GET(mem_info, MEMINFO_MEM_TOTAL, ul_int) * 1024; ++#endif // HAVE_PROCPS_V3 + } + + unsigned long host_free_memory() { ++#ifdef HAVE_PROCPS_V3 + meminfo(); + return kb_main_available * 1024; ++#else ++ struct meminfo_info *mem_info; ++ if (procps_meminfo_new(&mem_info) < 0) { ++ return 0; ++ } ++ ++ return MEMINFO_GET(mem_info, MEMINFO_MEM_AVAILABLE, ul_int) * 1024; ++#endif // HAVE_PROCPS_V3 + } + #endif + diff --git a/dev-db/percona-xtrabackup/percona-xtrabackup-8.0.30.23.ebuild b/dev-db/percona-xtrabackup/percona-xtrabackup-8.0.30.23-r1.ebuild index c75845fa0b49..3ec110a05eb1 100644 --- a/dev-db/percona-xtrabackup/percona-xtrabackup-8.0.30.23.ebuild +++ b/dev-db/percona-xtrabackup/percona-xtrabackup-8.0.30.23-r1.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 CMAKE_MAKEFILE_GENERATOR="emake" -inherit cmake +inherit cmake flag-o-matic # TODO: just keep it unbundled...? MY_BOOST_VERSION="1.77.0" @@ -26,6 +26,7 @@ KEYWORDS="amd64 x86" DEPEND=" app-arch/lz4:0= + app-arch/zstd:= app-editors/vim-core dev-libs/icu:= dev-libs/libaio @@ -37,11 +38,12 @@ DEPEND=" dev-libs/libgpg-error dev-libs/openssl:0= dev-libs/protobuf:= - dev-libs/rapidjson dev-libs/re2:= dev-python/sphinx net-misc/curl - sys-libs/zlib:=" + sys-libs/zlib:= + sys-process/procps:= +" RDEPEND=" ${DEPEND} @@ -51,6 +53,8 @@ RDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-8.0.26-remove-rpm.patch "${FILESDIR}"/${PN}-8.0.30.23-gcc13.patch + # procps 4 support, released in 8.0.33 + "${FILESDIR}"/6038a7934cbd4e6c01389fdc9b8ffabf8c3e006a.patch ) S="${WORKDIR}/percona-xtrabackup-${MY_PV}" @@ -64,9 +68,21 @@ src_prepare() { eerror "Ebuild Boost version: ${MY_BOOST_VERSION}" die "Ebuild needs to fix MY_BOOST_VERSION!" fi + + local extra + # rapidjson: last released in 2016 and totally unviable to devendor + # lz4: in storage/innobase/xtrabackup/src/CMakeLists.txt it is used even when =system + for extra in curl icu libcbor libedit libevent libfido2 zlib zstd; do + rm -r "extra/${extra}/" || die "failed to remove bundled libs" + done } src_configure() { + # -Werror=odr + # https://bugs.gentoo.org/855245 + # https://perconadev.atlassian.net/browse/PXB-3345 + filter-lto + CMAKE_BUILD_TYPE="RelWithDebInfo" local mycmakeargs=( @@ -78,6 +94,8 @@ src_configure() { -DWITH_BOOST="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})" -DWITH_MAN_PAGES=ON -DWITH_SYSTEM_LIBS=ON + # not handled via SYSTEM_LIBS + -DWITH_ZLIB=system ) cmake_src_configure diff --git a/dev-db/percona-xtrabackup/percona-xtrabackup-8.3.0.1.ebuild b/dev-db/percona-xtrabackup/percona-xtrabackup-8.3.0.1.ebuild new file mode 100644 index 000000000000..c84d5bb7801d --- /dev/null +++ b/dev-db/percona-xtrabackup/percona-xtrabackup-8.3.0.1.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CMAKE_MAKEFILE_GENERATOR="emake" + +inherit cmake flag-o-matic + +MY_PV=$(ver_rs 3 '-') +MY_PV="${MY_PV//_pre*}" +MY_PN="Percona-XtraBackup" +MY_P="${PN}-${MY_PV}" +MY_MAJOR_PV=$(ver_cut 1-2) + +DESCRIPTION="Hot backup utility for MySQL based servers" +HOMEPAGE="https://www.percona.com/software/mysql-database/percona-xtrabackup" +SRC_URI=" + https://downloads.percona.com/downloads/${MY_PN}-innovative-release/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + app-arch/lz4:0= + app-arch/zstd:= + app-editors/vim-core + dev-libs/icu:= + dev-libs/libaio + dev-libs/libedit + dev-libs/libev + dev-libs/libevent:0= + dev-libs/libfido2:= + dev-libs/libgcrypt:0= + dev-libs/libgpg-error + dev-libs/openssl:0= + dev-libs/protobuf:= + dev-libs/re2:= + dev-python/sphinx + net-misc/curl + sys-libs/zlib:= + sys-process/procps:= +" + +RDEPEND=" + ${DEPEND} + !dev-db/percona-xtrabackup-bin + dev-perl/DBD-mysql" + +PATCHES=( + "${FILESDIR}"/${PN}-8.0.26-remove-rpm.patch +) + +S="${WORKDIR}/percona-xtrabackup-${MY_PV}" + +src_prepare() { + cmake_src_prepare + + local extra + # rapidjson: last released in 2016 and totally unviable to devendor + # lz4: in storage/innobase/xtrabackup/src/CMakeLists.txt it is used even when =system + for extra in curl icu libcbor libedit libevent libfido2 zlib zstd; do + rm -r "extra/${extra}/" || die "failed to remove bundled libs" + done +} + +src_configure() { + # -Werror=odr + # https://bugs.gentoo.org/855245 + # https://perconadev.atlassian.net/browse/PXB-3345 + filter-lto + + CMAKE_BUILD_TYPE="RelWithDebInfo" + + local mycmakeargs=( + -DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG + -DBUILD_SHARED_LIBS=OFF + -DCOMPILATION_COMMENT="Gentoo Linux ${PF}" + -DINSTALL_PLUGINDIR=$(get_libdir)/${PN}/plugin + -DWITH_MAN_PAGES=ON + -DWITH_SYSTEM_LIBS=ON + # not handled via SYSTEM_LIBS + -DWITH_ZLIB=system + ) + + cmake_src_configure +} + +src_install() { + local p="${BUILD_DIR}/storage/innobase/xtrabackup" + + dobin "${p}"/xbcloud_osenv + dobin "${BUILD_DIR}"/runtime_output_directory/{xbcloud,xbcrypt,xbstream,xtrabackup} + + # cannot use dolib.so because helper would append libdir to target dir + insinto /usr/$(get_libdir)/${PN}/plugin + insopts -m 0755 + doins "${BUILD_DIR}"/plugin_output_directory/* + + doman "${p}"/doc/source/build/man/* +} |