diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 50a4da774758d41fa83fc5b9413160216b2f401c..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# percona-xtrabackup - -#### Description -Percona XtraBackup is an open-source hot backup utility for MySQL-based servers that doesn't lock the database during the backup. - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index e61a37daf7013b284d9a27df335357ef6b61d22c..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# percona-xtrabackup - -#### 介绍 -Percona XtraBackup is an open-source hot backup utility for MySQL-based servers that doesn't lock the database during the backup. - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/boost_1_73_0.tar.gz b/boost_1_73_0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..2dd69ebd96b0c8a4a8605dda12898e39698c49f3 Binary files /dev/null and b/boost_1_73_0.tar.gz differ diff --git a/compilec-fix.patch b/compilec-fix.patch deleted file mode 100644 index 6337019d7274e6803d68a5c442fd8a1e4f3d032c..0000000000000000000000000000000000000000 --- a/compilec-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruNa percona-xtrabackup-percona-xtrabackup-2.3.6/cmake/build_configurations/compiler_options.cmake percona-xtrabackup-percona-xtrabackup-2.3.6_patched/cmake/build_configurations/compiler_options.cmake ---- percona-xtrabackup-percona-xtrabackup-2.3.6/cmake/build_configurations/compiler_options.cmake 2016-11-25 17:05:53.000000000 +0800 -+++ percona-xtrabackup-percona-xtrabackup-2.3.6_patched/cmake/build_configurations/compiler_options.cmake 2021-07-16 21:10:47.260642064 +0800 -@@ -25,7 +25,7 @@ - - # 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 -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -Wno-implicit-fallthrough -Wno-stringop-truncation -Wno-stringop-overflow") - # Disable inline optimizations for valgrind testing to avoid false positives - IF(WITH_VALGRIND) - SET(COMMON_C_FLAGS "-fno-inline ${COMMON_C_FLAGS}") diff --git a/gcc-10-cflags-fix.patch b/gcc-10-cflags-fix.patch deleted file mode 100644 index 641390d68cc196cd2f066322b55d30a9943855d3..0000000000000000000000000000000000000000 --- a/gcc-10-cflags-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruNa percona-xtrabackup-percona-xtrabackup-2.3.6/cmake/build_configurations/compiler_options.cmake percona-xtrabackup-percona-xtrabackup-2.3.6_patched/cmake/build_configurations/compiler_options.cmake ---- percona-xtrabackup-percona-xtrabackup-2.3.6/cmake/build_configurations/compiler_options.cmake 2021-08-02 10:04:35.684407534 +0800 -+++ percona-xtrabackup-percona-xtrabackup-2.3.6_patched/cmake/build_configurations/compiler_options.cmake 2021-08-02 10:05:25.068932898 +0800 -@@ -25,7 +25,7 @@ - - # Default GCC flags - IF(CMAKE_COMPILER_IS_GNUCC) -- SET(COMMON_C_FLAGS "-g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -Wno-implicit-fallthrough -Wno-stringop-truncation -Wno-stringop-overflow") -+ SET(COMMON_C_FLAGS "-g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -Wno-implicit-fallthrough -Wno-stringop-truncation -Wno-stringop-overflow -fcommon") - # Disable inline optimizations for valgrind testing to avoid false positives - IF(WITH_VALGRIND) - SET(COMMON_C_FLAGS "-fno-inline ${COMMON_C_FLAGS}") diff --git a/gcc-7-flags-fix.patch b/gcc-7-flags-fix.patch deleted file mode 100644 index 4fe57da0678715bcad6013b883eda975ef1f8abd..0000000000000000000000000000000000000000 --- a/gcc-7-flags-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/cmake/build_configurations/compiler_options.cmake 2021-07-16 04:05:53.000000000 -0500 -+++ b/cmake/build_configurations/compiler_options.cmake 2021-07-16 12:20:04.708833670 -0500 -@@ -34,7 +34,7 @@ - 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 -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -fpermissive") - # Disable inline optimizations for valgrind testing to avoid false positives - IF(WITH_VALGRIND) - SET(COMMON_CXX_FLAGS "-fno-inline ${COMMON_CXX_FLAGS}") diff --git a/percona-xtrabackup-2.3.6.tar.gz b/percona-xtrabackup-2.3.6.tar.gz deleted file mode 100644 index ae4809c7888d7604f77fe8b0f06772193ad76092..0000000000000000000000000000000000000000 Binary files a/percona-xtrabackup-2.3.6.tar.gz and /dev/null differ diff --git a/percona-xtrabackup-8.0.26-18.tar.gz b/percona-xtrabackup-8.0.26-18.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..c772f34b2ce515fb26c88bf984f5ff7567f86e50 Binary files /dev/null and b/percona-xtrabackup-8.0.26-18.tar.gz differ diff --git a/percona-xtrabackup.spec b/percona-xtrabackup.spec index cc34c815b4d9dd2c5aed92f1cb646a4ca26e66f7..affa05938421c48348cbc20b6fda9783bae34c8e 100644 --- a/percona-xtrabackup.spec +++ b/percona-xtrabackup.spec @@ -1,105 +1,126 @@ -Name: percona-xtrabackup -Summary: Online backup for InnoDB/XtraDB in MySQL, Percona Server and MariaDB -Version: 2.3.6 -Release: 2 -License: GPLv2 -URL: http://www.percona.com/software/percona-xtrabackup/ -Source: percona-xtrabackup-%{version}.tar.gz -Patch1: gcc-7-flags-fix.patch -Patch2: compilec-fix.patch -Patch3: gcc-10-cflags-fix.patch - -Provides: %{name} - -BuildRequires: automake -BuildRequires: cmake >= 2.6.3 -BuildRequires: patch -BuildRequires: gcc -BuildRequires: gcc-c++ -BuildRequires: libtool - -BuildRequires: perl-generators -BuildRequires: procps -BuildRequires: python-sphinx - -BuildRequires: vim-common -BuildRequires: bison -BuildRequires: ncurses-devel -BuildRequires: openssl-devel -BuildRequires: libaio-devel -BuildRequires: libgcrypt-devel -BuildRequires: libcurl-devel -BuildRequires: libev-devel -Requires: perl(DBD::mysql) -Requires: libcurl -Requires: libev +%define xb_version_major 8 +%define xb_version_minor 0 +%define xb_version_patch 26 +%define xb_version_extra -18 + +%define cmake_bin cmake +%global mysqldatadir /var/lib/mysql + +%global __python %{__python3} + + +##################################### +Name: percona-xtrabackup +Version: %{xb_version_major}.%{xb_version_minor}.%{xb_version_patch} +Release: 1 +Summary: XtraBackup online backup for MySQL / InnoDB + +Group: Applications/Databases +License: GPLv2 +URL: http://www.percona.com/software/percona-xtrabackup +Source0: percona-xtrabackup-%{version}%{xb_version_extra}.tar.gz +Source1: boost_1_73_0.tar.gz + +BuildRequires: %{cmake_bin}, libaio-devel, libgcrypt-devel, ncurses-devel, readline-devel, zlib-devel, libev-devel openssl-devel +BuildRequires: libcurl-devel +Conflicts: percona-xtrabackup < %{xb_version_major}.%{xb_version_minor}.%{xb_version_patch} +Requires: perl(DBD::mysql), rsync +Requires: perl(Digest::MD5) +#BuildRoot: %{_tmppath}/%{name}-%{version}%{xb_version_extra}-root + %description -Online backup for InnoDB/XtraDB in MySQL, MariaDB and Percona Server. +Percona XtraBackup is OpenSource online (non-blockable) backup solution for InnoDB and XtraDB engines -%package test -Summary: Test suite for Percona Xtrabackup -Provides: %{name}-test -Requires: %{name} -Requires: /usr/bin/mysql -Requires: %{name} = %{version}-%{release} +%package -n percona-xtrabackup-test-%{xb_version_major}%{xb_version_minor} +Summary: Test suite for Percona XtraBackup +Group: Applications/Databases +Requires: percona-xtrabackup-%{xb_version_major}%{xb_version_minor} = %{version}-%{release} +Requires: /usr/bin/mysql +AutoReqProv: no -%description test -This package contains the test suite for Percona Xtrabackup +%description -n percona-xtrabackup-test-%{xb_version_major}%{xb_version_minor} +This package contains the test suite for Percona XtraBackup %{version}%{xb_version_extra} %prep -%setup -qn %{name}-%{name}-%{version} -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +%setup -q -n percona-xtrabackup-%{version}%{xb_version_extra} +mkdir -p libboost +cp -rf %{SOURCE1} ./libboost/ +%bcond_with dummy %build -cmake -DBUILD_CONFIG=xtrabackup_release && make %{?_smp_mflags} - +# +%if %{with dummy} +# Dummy binaries that avoid compilation +echo 'main() { return 300; }' | gcc -x c - -o storage/innobase/xtrabackup/src/xtrabackup +echo 'main() { return 300; }' | gcc -x c - -o storage/innobase/xtrabackup/src/xbstream +echo 'main() { return 300; }' | gcc -x c - -o storage/innobase/xtrabackup/src/xbcrypt +echo 'main() { return 300; }' | gcc -x c - -o storage/innobase/xtrabackup/src/xbcloud +# +%else +# +export CC=${CC-"gcc"} +export CXX=${CXX-"g++"} +export CFLAGS=${CFLAGS:-} +export CXXFLAGS=${CXXFLAGS:-} +# +sed -i 's:#!/usr/bin/env python:#!/usr/bin/env python2:g' storage/innobase/xtrabackup/test/subunit2junitxml +sed -i 's:#!/usr/bin/env python:#!/usr/bin/env python2:g' storage/innobase/xtrabackup/test/python/subunit/tests/sample-two-script.py +sed -i 's:#!/usr/bin/env python:#!/usr/bin/env python2:g' storage/innobase/xtrabackup/test/python/subunit/tests/sample-script.py +sed -i 's:#!/usr/bin/env python:#!/usr/bin/env python2:g' storage/innobase/xtrabackup/test/python/subunit/run.py +# +%{cmake_bin} . -DBUILD_CONFIG=xtrabackup_release -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DWITH_SSL=system -DINSTALL_MANDIR=%{_mandir} -DWITH_MAN_PAGES=1 \ + -DINSTALL_MYSQLTESTDIR=%{_datadir}/percona-xtrabackup-test-%{xb_version_major}%{xb_version_minor} \ + -DWITH_BOOST=./libboost -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DINSTALL_PLUGINDIR="%{_lib}/xtrabackup/plugin" -DFORCE_INSOURCE_BUILD=1 -DWITH_ZLIB=bundled -DWITH_ZSTD=bundled +# +make %{?_smp_mflags} +# +%endif +# %install -[ "%{buildroot}" != '/' ] && rm -rf %{buildroot} -install -d %{buildroot}%{_bindir} -install -d %{buildroot}%{_datadir} -install -d %{buildroot}%{_mandir}/man1 -# install binaries and configs - -SRC_DIR=storage/innobase/xtrabackup/src -pushd . -cd $SRC_DIR -install -p -m 755 xtrabackup %{buildroot}%{_bindir} -ln -sf xtrabackup %{buildroot}%{_bindir}/innobackupex -install -p -m 755 xbstream %{buildroot}%{_bindir} -install -p -m 755 xbcrypt %{buildroot}%{_bindir} -cd .. -find test -size 0 -delete -cp -pR test %{buildroot}%{_datadir}/percona-xtrabackup-test -rm -rf %{buildroot}%{_datadir}/percona-xtrabackup-test/kewpie -rm -rf %{buildroot}%{_datadir}/percona-xtrabackup-test/*Make* -cd doc/source/build/man -install -m 644 *.1 %{buildroot}%{_mandir}/man1 - -popd +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +rm -rf $RPM_BUILD_ROOT/%{_libdir}/libmysqlservices.a +rm -rf $RPM_BUILD_ROOT/usr/lib/libmysqlservices.a +rm -rf $RPM_BUILD_ROOT/usr/lib/private/libprotobuf* +rm -rf $RPM_BUILD_ROOT/usr/docs/INFO_SRC +rm -rf $RPM_BUILD_ROOT/%{_mandir}/man8 +rm -rf $RPM_BUILD_ROOT/%{_mandir}/man1/c* +rm -rf $RPM_BUILD_ROOT/%{_mandir}/man1/m* +rm -rf $RPM_BUILD_ROOT/%{_mandir}/man1/i* +rm -rf $RPM_BUILD_ROOT/%{_mandir}/man1/l* +rm -rf $RPM_BUILD_ROOT/%{_mandir}/man1/p* +rm -rf $RPM_BUILD_ROOT/%{_mandir}/man1/z* + +%clean +rm -rf $RPM_BUILD_ROOT %files -%{_bindir}/innobackupex +%defattr(-,root,root,-) %{_bindir}/xtrabackup %{_bindir}/xbstream %{_bindir}/xbcrypt -%doc COPYING README VERSION -%{_mandir}/man1/innobackupex.1.gz -%{_mandir}/man1/xtrabackup.1.gz -%{_mandir}/man1/xbstream.1.gz -%{_mandir}/man1/xbcrypt.1.gz - -%files -n percona-xtrabackup-test -%{_datadir}/percona-xtrabackup-test -%doc COPYING +%{_bindir}/xbcloud +%{_bindir}/xbcloud_osenv +%{_libdir}/xtrabackup/plugin/keyring_file.so +%{_libdir}/xtrabackup/plugin/keyring_vault.so +%{_libdir}/xtrabackup/plugin/component_keyring_file.so +%doc LICENSE +%doc %{_mandir}/man1/*.1.gz + +%files -n percona-xtrabackup-test-%{xb_version_major}%{xb_version_minor} +%defattr(-,root,root,-) +%{_datadir}/percona-xtrabackup-test-%{xb_version_major}%{xb_version_minor} %changelog +* Mon Nov 29 2021 bzhaoop - 8.0.26-1 +- Init package 8.0.26-1 for openEuler + * Mon Aug 2 2021 bzhaoop - 2.3.6-2 - Fix gcc 10 compiling issue * Mon Jul 26 2021 bzhaoop - 2.3.6-1 - Init project for percona-xtrabackup -