MFH: r477077

databases/xtrabackup: Update to 2.4.12

- Disable version check functionality which is an information disclosure
vulnerability as it posts system information and hostnames to
https://v.percona.com

PR:		230417
Approved by:	maintainer
Differential Revision:	https://reviews.freebsd.org/D16609
This commit is contained in:
Mark Felder 2018-08-13 16:52:40 +00:00
parent 253bf150b5
commit d5d05e0f0e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2018Q3/; revision=477078
9 changed files with 107 additions and 78 deletions

View File

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= xtrabackup
DISTVERSION= 2.4.9
PORTREVISION= 2
DISTVERSION= 2.4.12
CATEGORIES= databases
MASTER_SITES= https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-${PORTVERSION}/source/tarball/:xtrabackup \
SF/boost/boost/1.59.0/:boost
@ -16,22 +15,20 @@ COMMENT= OpenSource version of InnoDB backup with support of Percona extensions
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
# quilt is required by build.sh
BUILD_DEPENDS= bash:shells/bash \
cmake:devel/cmake \
xxd:editors/vim-console
LIB_DEPENDS= libcurl.so:ftp/curl \
libev.so:devel/libev \
libgcrypt.so:security/libgcrypt \
libgpg-error.so:security/libgpg-error
RUN_DEPENDS= p5-DBD-mysql>=0:databases/p5-DBD-mysql \
qpress:archivers/qpress
BROKEN_armv6= fails to compile: cannot combine with previous 'type-name' declaration specifier
BROKEN_armv7= fails to compile: cannot combine with previous 'type-name' declaration specifier
BROKEN_mips64= fails to compile: 'fpsetmask' was not declared in this scope
BROKEN_powerpc64= fails to link: ld: final link failed: Bad value
# quilt is required by build.sh
BUILD_DEPENDS= bash:shells/bash \
cmake:devel/cmake
LIB_DEPENDS= libcurl.so:ftp/curl \
libev.so:devel/libev \
libgcrypt.so:security/libgcrypt \
libgpg-error.so:security/libgpg-error
RUN_DEPENDS= qpress:archivers/qpress
# autotool is in use for 5.1 builds
USES= alias autoreconf:build bison cpe gettext cmake:noninja libtool perl5 shebangfix
CPE_VENDOR= percona
@ -43,4 +40,8 @@ WRKSRC= ${WRKDIR}/percona-${PORTNAME}-${PORTVERSION}
PLIST_FILES= bin/xtrabackup bin/xbstream bin/innobackupex bin/xbcrypt \
bin/xbcloud bin/xbcloud_osenv
# Not sure why it's trying to install mysql client libraries now
post-install:
${RM} -rf ${STAGEDIR}${LOCALBASE}/lib
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
TIMESTAMP = 1521236900
SHA256 (percona-xtrabackup-2.4.9.tar.gz) = 23c1e42ad4161b38edef126cf600e28779788a4d1736cadbb8e8f3dc219135a7
SIZE (percona-xtrabackup-2.4.9.tar.gz) = 58001052
TIMESTAMP = 1533575308
SHA256 (percona-xtrabackup-2.4.12.tar.gz) = de02cfd5bde96ddbf50339ef3a4646004dde52239698df45c19ed3e8ee40738e
SIZE (percona-xtrabackup-2.4.12.tar.gz) = 57232309
SHA256 (boost_1_59_0.tar.bz2) = 727a932322d94287b62abb1bd2d41723eec4356a7728909e38adb65ca25241ca
SIZE (boost_1_59_0.tar.bz2) = 70389425

View File

@ -1,11 +0,0 @@
--- sql/json_dom.h.orig 2018-03-17 00:21:21.146040000 +0300
+++ sql/json_dom.h 2018-03-17 00:21:26.264131000 +0300
@@ -368,7 +368,7 @@
Json_object class.
*/
typedef std::map<std::string, Json_dom *, Json_key_comparator,
- Malloc_allocator<std::pair<std::string, Json_dom *> > > Json_object_map;
+ Malloc_allocator<std::pair<const std::string, Json_dom *> > > Json_object_map;
/**
Represents a JSON container value of type "object" (ECMA), type

View File

@ -1,11 +0,0 @@
--- storage/innobase/buf/buf0buf.cc.orig 2018-03-17 00:16:39.121076000 +0300
+++ storage/innobase/buf/buf0buf.cc 2018-03-17 00:17:08.295213000 +0300
@@ -340,7 +340,7 @@
const byte*,
buf_chunk_t*,
std::less<const byte*>,
- ut_allocator<std::pair<const byte*, buf_chunk_t*> > >
+ ut_allocator<std::pair<const byte* const, buf_chunk_t*> > >
buf_pool_chunk_map_t;
static buf_pool_chunk_map_t* buf_chunk_map_reg;

View File

@ -1,11 +0,0 @@
--- storage/innobase/dict/dict0stats.cc.orig 2018-03-17 00:37:34.099255000 +0300
+++ storage/innobase/dict/dict0stats.cc 2018-03-17 00:37:59.009449000 +0300
@@ -139,7 +139,7 @@
typedef std::vector<ib_uint64_t, ut_allocator<ib_uint64_t> > boundaries_t;
/** Allocator type used for index_map_t. */
-typedef ut_allocator<std::pair<const char*, dict_index_t*> >
+typedef ut_allocator<std::pair<const char* const, dict_index_t*> >
index_map_t_allocator;
/** Auxiliary map used for sorting indexes by name in dict_stats_save(). */

View File

@ -1,29 +0,0 @@
--- storage/innobase/sync/sync0debug.cc.orig 2018-03-17 00:25:16.778406000 +0300
+++ storage/innobase/sync/sync0debug.cc 2018-03-17 00:27:34.072173000 +0300
@@ -129,7 +129,7 @@
os_thread_id_t,
Latches*,
os_thread_id_less,
- ut_allocator<std::pair<const std::string, latch_meta_t> > >
+ ut_allocator<std::pair<const os_thread_id_t, Latches*> > >
ThreadMap;
/** Constructor */
@@ -424,7 +424,7 @@
latch_level_t,
std::string,
latch_level_less,
- ut_allocator<std::pair<latch_level_t, std::string> > >
+ ut_allocator<std::pair<const latch_level_t, std::string> > >
Levels;
/** Mutex protecting the deadlock detector data structures. */
@@ -1718,7 +1718,7 @@
const void*,
File,
std::less<const void*>,
- ut_allocator<std::pair<const void*, File> > >
+ ut_allocator<std::pair<const void* const, File> > >
Files;
typedef OSMutex Mutex;

View File

@ -0,0 +1,31 @@
--- storage/innobase/xtrabackup/src/CMakeLists.txt.orig 2018-08-09 13:51:49 UTC
+++ storage/innobase/xtrabackup/src/CMakeLists.txt
@@ -28,13 +28,6 @@ FIND_GCRYPT()
MYSQL_CHECK_CURL()
FIND_EV()
-# xxd is needed to embed version_check script
-FIND_PROGRAM(XXD_PATH xxd)
-
-IF(NOT XXD_PATH)
- MESSAGE(FATAL_ERROR "xxd not found. Try to install vim-common.")
-ENDIF(NOT XXD_PATH)
-
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/storage/innobase/include
@@ -56,14 +49,6 @@ ADD_DEFINITIONS(${SSL_DEFINES})
########################################################################
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/xtrabackup_version.h.in
${CMAKE_CURRENT_BINARY_DIR}/xtrabackup_version.h )
-
-ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version_check_pl.h
- COMMAND ${XXD_PATH} --include version_check.pl
- ${CMAKE_CURRENT_BINARY_DIR}/version_check_pl.h
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-
-ADD_CUSTOM_TARGET(GenVersionCheck
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version_check_pl.h)
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/plugin/keyring

View File

@ -0,0 +1,46 @@
--- storage/innobase/xtrabackup/src/backup_copy.cc.orig 2018-08-09 14:07:34 UTC
+++ storage/innobase/xtrabackup/src/backup_copy.cc
@@ -53,7 +53,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include <string>
#include <mysqld.h>
#include <my_default.h>
-#include <version_check_pl.h>
#include <sstream>
#include <algorithm>
#include "fil_cur.h"
@@ -2296,35 +2295,4 @@ decrypt_decompress()
sync_check_close();
return(ret);
-}
-
-void
-version_check()
-{
- if (opt_password != NULL) {
- setenv("option_mysql_password", opt_password, 1);
- }
- if (opt_user != NULL) {
- setenv("option_mysql_user", opt_user, 1);
- }
- if (opt_host != NULL) {
- setenv("option_mysql_host", opt_host, 1);
- }
- if (opt_socket != NULL) {
- setenv("option_mysql_socket", opt_socket, 1);
- }
- if (opt_port != 0) {
- char port[20];
- snprintf(port, sizeof(port), "%u", opt_port);
- setenv("option_mysql_port", port, 1);
- }
-
- FILE *pipe = popen("perl", "w");
- if (pipe == NULL) {
- return;
- }
-
- fwrite((const char *) version_check_pl, version_check_pl_len, 1, pipe);
-
- pclose(pipe);
}

View File

@ -0,0 +1,13 @@
--- storage/innobase/xtrabackup/src/xtrabackup.cc.orig 2018-08-09 13:53:57 UTC
+++ storage/innobase/xtrabackup/src/xtrabackup.cc
@@ -8236,10 +8236,6 @@ xb_init()
if (xtrabackup_backup) {
- if (!opt_noversioncheck) {
- version_check();
- }
-
if ((mysql_connection = xb_mysql_connect()) == NULL) {
return(false);
}