--- /dev/null
+unique_ptr() in gcc 10 needs -fnew-inheriting-ctors (enabled by default in ABI 11+)
+--- percona-xtrabackup-percona-xtrabackup-2.4.20/cmake/build_configurations/compiler_options.cmake.orig 2020-04-10 21:45:19.000000000 +0200
++++ percona-xtrabackup-percona-xtrabackup-2.4.20/cmake/build_configurations/compiler_options.cmake 2021-04-27 19:18:20.991898949 +0200
+@@ -30,7 +30,7 @@ IF(UNIX)
+
+ # Default GCC flags
+ IF(CMAKE_COMPILER_IS_GNUCC)
+- SET(COMMON_C_FLAGS "-g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing")
++ SET(COMMON_C_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing")
+ # Disable inline optimizations for valgrind testing to avoid false positives
+ IF(WITH_VALGRIND)
+ SET(COMMON_C_FLAGS "-fno-inline ${COMMON_C_FLAGS}")
+@@ -54,7 +54,7 @@ IF(UNIX)
+ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")
+ ENDIF()
+ IF(CMAKE_COMPILER_IS_GNUCXX)
+- SET(COMMON_CXX_FLAGS "-g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing")
++ SET(COMMON_CXX_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing")
+ # GCC 6 has C++14 as default, set it explicitly to the old default.
+ EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
+ OUTPUT_VARIABLE GXX_VERSION)
--- /dev/null
+--- percona-xtrabackup-percona-xtrabackup-2.4.20/storage/innobase/xtrabackup/src/CMakeLists.txt.orig 2020-04-10 21:45:19.000000000 +0200
++++ percona-xtrabackup-percona-xtrabackup-2.4.20/storage/innobase/xtrabackup/src/CMakeLists.txt 2021-04-27 18:10:04.084198107 +0200
+@@ -142,7 +142,6 @@
+ # xbstream binary
+ ########################################################################
+ MYSQL_ADD_EXECUTABLE(xbstream
+- ds_buffer.c
+ ds_local.c
+ ds_stdout.c
+ ds_decrypt.c
+--- percona-xtrabackup-percona-xtrabackup-2.4.20/storage/innobase/xtrabackup/src/ds_tmpfile.c.orig 2020-04-10 21:45:19.000000000 +0200
++++ percona-xtrabackup-percona-xtrabackup-2.4.20/storage/innobase/xtrabackup/src/ds_tmpfile.c 2021-04-27 18:38:59.131491576 +0200
+@@ -55,7 +55,7 @@
+ &tmpfile_deinit
+ };
+
+-MY_TMPDIR mysql_tmpdir_list;
++extern MY_TMPDIR mysql_tmpdir_list;
+
+ static ds_ctxt_t *
+ tmpfile_init(const char *root)
# Source0-md5: dfbd0310f1df084696fe16eea6efdc5d
Source1: http://downloads.sourceforge.net/boost/boost_1_59_0.tar.bz2
# Source1-md5: 6aa9a5c6a4ca1016edd0ed1178e3cb87
+Patch0: %{name}-no-common.patch
+Patch1: %{name}-abiversion.patch
URL: https://www.percona.com/doc/percona-xtrabackup/
BuildRequires: acl-devel
BuildRequires: bash
%prep
%setup -q -n percona-%{name}-percona-%{name}-%{version} -a1
+%patch0 -p1
+%patch1 -p1
-# use system package
+# actually not used
%{__mv} storage/innobase/xtrabackup/src/jsmn jsmn.dist
+# use system package
%{__mv} zlib zlib.dist
%build