From 736914670eb14156061602c7b3f1a250ef69cb86 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 26 2018 09:15:29 +0000 Subject: import rh-mysql57-mysql-5.7.21-2.el7.1 --- diff --git a/.gitignore b/.gitignore index 6deb4fb..368c7ed 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/mysql-boost-5.7.20.tar.gz +SOURCES/mysql-boost-5.7.21.tar.gz diff --git a/.rh-mysql57-mysql.metadata b/.rh-mysql57-mysql.metadata index 6a5a5a7..78bcfaa 100644 --- a/.rh-mysql57-mysql.metadata +++ b/.rh-mysql57-mysql.metadata @@ -1 +1 @@ -1fcbaea0d75d71a8a868f518b5b0afaaa18c5cda SOURCES/mysql-boost-5.7.20.tar.gz +63b07cfd33d494b223e9b4d73492d3508834abd0 SOURCES/mysql-boost-5.7.21.tar.gz diff --git a/SOURCES/mysql-check-socket.sh b/SOURCES/mysql-check-socket.sh index b15cd32..0e24c96 100644 --- a/SOURCES/mysql-check-socket.sh +++ b/SOURCES/mysql-check-socket.sh @@ -25,10 +25,10 @@ if test -e "$socketfile" ; then fi # some process uses the socket file - if fuser "$socketfile" &>/dev/null ; then - socketpid=$(fuser "$socketfile" 2>/dev/null) + response=`@bindir@/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER --connect-timeout="${CHECKSOCKETTIMEOUT:-10}" ping 2>&1` + if [ $? -eq 0 ] || echo "$response" | grep -q "Access denied for user" || echo "$response" | grep -q "Lost connection to MySQL server" ; then echo "Is another MySQL daemon already running with the same unix socket?" >&2 - echo "Please, stop the process $socketpid or remove $socketfile manually to start the service." >&2 + echo "Please, stop the process using the socket $socketfile or remove the file manually to start the service." >&2 exit 1 fi diff --git a/SOURCES/mysql-tirpc.patch b/SOURCES/mysql-tirpc.patch new file mode 100644 index 0000000..1ddff40 --- /dev/null +++ b/SOURCES/mysql-tirpc.patch @@ -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 diff --git a/SOURCES/mysql.init.in b/SOURCES/mysql.init.in index 983e50d..008f917 100644 --- a/SOURCES/mysql.init.in +++ b/SOURCES/mysql.init.in @@ -60,7 +60,7 @@ start(){ MYSQLDRUNNING=1 fi fi - RESPONSE=`@bindir@/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` + RESPONSE=`@bindir@/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER --connect-timeout="${CHECKSOCKETTIMEOUT:-10}" ping 2>&1` if [ $MYSQLDRUNNING = 1 ] && [ $? = 0 ]; then # already running, do nothing action $"Starting $prog: " /bin/true diff --git a/SPECS/mysql.spec b/SPECS/mysql.spec index fc2382c..eab0f5f 100644 --- a/SPECS/mysql.spec +++ b/SPECS/mysql.spec @@ -113,8 +113,8 @@ %endif Name: %{?scl_prefix}mysql -Version: 5.7.20 -Release: 1%{?with_debug:.debug}%{?dist} +Version: 5.7.21 +Release: 2%{?with_debug:.debug}%{?dist}.1 Summary: MySQL client programs and shared libraries Group: Applications/Databases URL: http://www.mysql.com @@ -161,6 +161,7 @@ Patch52: %{pkgnamepatch}-sharedir.patch Patch57: %{pkgnamepatch}-files-path.patch Patch70: %{pkgnamepatch}-5.7.9-major.patch Patch71: %{pkgnamepatch}-remove_oracle_systemd_unit.patch +Patch72: %{pkgnamepatch}-tirpc.patch # Patches specific for scl Patch90: %{pkgnamepatch}-scl-env-check.patch @@ -185,6 +186,10 @@ BuildRequires: perl %if 0%{?fedora} > 24 || 0%{?rhel} > 7 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: %{?scl_prefix}multilib-rpm-config @@ -447,6 +452,7 @@ the MySQL sources. %patch70 -p1 %endif %patch71 -p1 +%patch72 -p1 # Patch Boost pushd boost/boost_1_59_0 @@ -1096,6 +1102,23 @@ fi %endif %changelog +* Tue Feb 20 2018 Honza Horak - 5.7.21-2.1 +- Use mysqladmin instead of fuser for checking whether socket is used + Related: #1461445 + +* Sun Jan 21 2018 Norvald H. Ryeng - 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 +- CVE fixes: #1533832 + CVE-2018-2696 CVE-2018-2703 CVE-2018-2565 CVE-2018-2573 CVE-2018-2576 + CVE-2018-2583 CVE-2018-2586 CVE-2018-2590 CVE-2018-2600 CVE-2018-2612 + CVE-2018-2622 CVE-2018-2640 CVE-2018-2645 CVE-2018-2646 CVE-2018-2647 + CVE-2018-2665 CVE-2018-2667 CVE-2018-2668 + * Fri Oct 27 2017 Honza Horak - 5.7.20-1 - Update to MySQL 5.7.20, for various fixes described at https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-20.html