Update to MySQL 5.7.21

This commit is contained in:
Michal Schorm 2018-01-21 04:21:00 +01:00
parent 5a03d7e9c7
commit f07a920969
3 changed files with 105 additions and 3 deletions

View File

@ -0,0 +1,88 @@
diff --git a/rapid/plugin/group_replication/rpcgen.cmake b/rapid/plugin/group_replication/rpcgen.cmake
index b9c5895..f4569cd 100644
--- a/rapid/plugin/group_replication/rpcgen.cmake
+++ b/rapid/plugin/group_replication/rpcgen.cmake
@@ -87,6 +87,12 @@ FOREACH(X xcom_vp)
${XCOM_BASEDIR}/xcom_proto_enum.h
${XCOM_BASEDIR}/xcom_limits.h)
ELSE()
+ FIND_PROGRAM(RPCGEN_EXECUTABLE rpcgen DOC "path to the rpcgen executable")
+ MARK_AS_ADVANCED(RPCGEN_EXECUTABLE)
+ IF(NOT RPCGEN_EXECUTABLE)
+ MESSAGE(FATAL_ERROR "Could not find rpcgen")
+ ENDIF()
+
# on unix systems try to generate them if needed
ADD_CUSTOM_COMMAND(OUTPUT ${x_gen_h} ${x_gen_c} ${x_tmp_plat_h}
COMMAND ${CMAKE_COMMAND} -E copy_if_different
@@ -103,10 +109,10 @@ FOREACH(X xcom_vp)
# generate the sources
COMMAND ${CMAKE_COMMAND} -E remove -f ${x_gen_h}
- COMMAND rpcgen -C -h -o
+ COMMAND ${RPCGEN_EXECUTABLE} -C -h -o
${x_gen_h} ${x_tmp_x_canonical_name}
COMMAND ${CMAKE_COMMAND} -E remove -f ${x_gen_c}
- COMMAND rpcgen -C -c -o
+ COMMAND ${RPCGEN_EXECUTABLE} -C -c -o
${x_gen_c} ${x_tmp_x_canonical_name}
WORKING_DIRECTORY ${gen_xdr_dir}
DEPENDS
diff --git a/rapid/plugin/group_replication/CMakeLists.txt b/rapid/plugin/group_replication/CMakeLists.txt
index 5bcaa8b..bce9de4 100644
--- a/rapid/plugin/group_replication/CMakeLists.txt
+++ b/rapid/plugin/group_replication/CMakeLists.txt
@@ -218,6 +218,7 @@ MYSQL_ADD_PLUGIN(group_replication
LINK_LIBRARIES
${LZ4_LIBRARY}
${SSL_LIBRARIES}
+ ${TIRPC_LIBRARY}
MODULE_ONLY MODULE_OUTPUT_NAME "group_replication")
### INSTALLATION ###
diff --git a/rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c b/rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c
index 245dda0..210e124 100644
--- a/rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c
+++ b/rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c
@@ -417,7 +417,11 @@ x_putbytes (XDR *xdrs, const char *bp MY_ATTRIBUTE((unused)), u_int len)
static u_int
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(HAVE_TIRPC)
+x_getpostn(XDR *xdrs)
+#else
x_getpostn (const XDR *xdrs)
+#endif
{
#ifdef OLD_XDR
return (u_int)(xdrs->x_handy);
diff --git a/rapid/plugin/group_replication/rpcgen.cmake b/rapid/plugin/group_replication/rpcgen.cmake
index f4569cd..cccb1c3 100644
--- a/rapid/plugin/group_replication/rpcgen.cmake
+++ b/rapid/plugin/group_replication/rpcgen.cmake
@@ -93,6 +93,24 @@ FOREACH(X xcom_vp)
MESSAGE(FATAL_ERROR "Could not find rpcgen")
ENDIF()
+ # First look for tirpc, then the old Sun RPC
+ FIND_PATH(RPC_INCLUDE_DIR
+ NAMES rpc/rpc.h
+ HINTS /usr/include/tirpc
+ NO_DEFAULT_PATH
+ )
+ FIND_PATH(RPC_INCLUDE_DIR NAMES rpc/rpc.h)
+ IF(NOT RPC_INCLUDE_DIR)
+ MESSAGE(FATAL_ERROR
+ "Could not find rpc/rpc.h in /usr/include or /usr/include/tirpc")
+ ENDIF()
+ MESSAGE(STATUS "RPC_INCLUDE_DIR ${RPC_INCLUDE_DIR}")
+ IF(RPC_INCLUDE_DIR STREQUAL "/usr/include/tirpc")
+ INCLUDE_DIRECTORIES(SYSTEM /usr/include/tirpc)
+ ADD_DEFINITIONS(-DHAVE_TIRPC)
+ SET(TIRPC_LIBRARY tirpc)
+ ENDIF()
+
# on unix systems try to generate them if needed
ADD_CUSTOM_COMMAND(OUTPUT ${x_gen_h} ${x_gen_c} ${x_tmp_plat_h}
COMMAND ${CMAKE_COMMAND} -E copy_if_different

View File

@ -89,8 +89,8 @@
%global sameevr %{?epoch:%{epoch}:}%{version}-%{release}
Name: community-mysql
Version: 5.7.20
Release: 5%{?with_debug:.debug}%{?dist}
Version: 5.7.21
Release: 1%{?with_debug:.debug}%{?dist}
Summary: MySQL client programs and shared libraries
URL: http://www.mysql.com
@ -133,6 +133,7 @@ Patch51: %{pkgnamepatch}-chain-certs.patch
Patch52: %{pkgnamepatch}-sharedir.patch
Patch70: %{pkgnamepatch}-5.7.9-major.patch
Patch71: %{pkgnamepatch}-openssl11.patch
Patch72: %{pkgnamepatch}-tirpc.patch
# Patches taken from boost 1.59
Patch115: boost-1.58.0-pool.patch
@ -157,6 +158,10 @@ BuildRequires: openssl-devel
BuildRequires: perl-interpreter
BuildRequires: perl-generators
%endif
%if 0%{?fedora} > 27 || 0%{?rhel} > 7
BuildRequires: rpcgen
BuildRequires: libtirpc-devel
%endif
BuildRequires: systemtap-sdt-devel
BuildRequires: zlib-devel
BuildRequires: multilib-rpm-config
@ -415,6 +420,7 @@ by any other package than mysql-connector-odbc.
%patch70 -p1
%endif
%patch71 -p1
%patch72 -p1
# Patch Boost
pushd boost/boost_1_59_0
@ -981,6 +987,14 @@ fi
%endif
%changelog
* Wed Jan 17 2018 Norvald H. Ryeng <norvald.ryeng@oracle.com> - 5.7.21-1
- Update to MySQL 5.7.21, for various fixes described at
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-21.html
- Add rpcgen to buildrep
- Add support for libtirpc
- Fix for various CVEs listed on
http://www.oracle.com/technetwork/security-advisory/cpujan2018-3236628.html
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 5.7.20-5
- Rebuilt for switch to libxcrypt

View File

@ -1 +1 @@
SHA512 (mysql-boost-5.7.20.tar.gz) = 4b80e66ee634d965ea54e815b875150beb19c6bd172d94795d4874df51a93925af48d2cd41cdac5dff1f506ad363418793bcecffa35cd50ee6b8b0d389e54729
SHA512 (mysql-boost-5.7.21.tar.gz) = 29a1bfa1f5d5e354b66ca8c9fdaf7ee88de3d57bee3c6368861b46ab6d992affb7604577c06f241df542b96ab088c055473fd76584376dd149956ae1dd8726f3