Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 2018 22:43:46 +0000 (UTC)
From:      Mahdi Mokhtari <mmokhi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r459295 - in head/databases: mysql57-client mysql57-client/files mysql57-server mysql57-server/files
Message-ID:  <201801172243.w0HMhkj2023258@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mmokhi
Date: Wed Jan 17 22:43:46 2018
New Revision: 459295
URL: https://svnweb.freebsd.org/changeset/ports/459295

Log:
  databases/mysql56-{client, server}: Update to 5.7.21
  This update fixes bugs like CVE-2018-2696, CVE-2018-2562, CVE-2018-2640,
  CVE-2018-2668, CVE-2017-3737 (and more) in MySQL protocol by upstream.
  
  Delete local patches (CMake plugin macros) that are merged by upstream.
  
  PR:		225195
  Sponsored by:	Netzkommune GmbH

Added:
  head/databases/mysql57-client/files/patch-configure.cmake   (contents, props changed)
Deleted:
  head/databases/mysql57-client/files/patch-libmysql_authentication__ldap_CMakeLists.txt
Modified:
  head/databases/mysql57-client/files/patch-client_CMakeLists.txt
  head/databases/mysql57-client/files/patch-cmake_plugin.cmake
  head/databases/mysql57-client/pkg-plist
  head/databases/mysql57-server/Makefile
  head/databases/mysql57-server/distinfo
  head/databases/mysql57-server/files/patch-cmake_plugin.cmake
  head/databases/mysql57-server/files/patch-libmysql_CMakeLists.txt

Modified: head/databases/mysql57-client/files/patch-client_CMakeLists.txt
==============================================================================
--- head/databases/mysql57-client/files/patch-client_CMakeLists.txt	Wed Jan 17 22:43:24 2018	(r459294)
+++ head/databases/mysql57-client/files/patch-client_CMakeLists.txt	Wed Jan 17 22:43:46 2018	(r459295)
@@ -18,10 +18,10 @@
  MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test)
  SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS")
  TARGET_LINK_LIBRARIES(mysqltest mysqlclient regex)
+ ADD_DEPENDENCIES(mysqltest GenError)
 +ENDIF()
  
  ADD_CONVENIENCE_LIBRARY(mysqlcheck_core check/mysqlcheck_core.cc)
- TARGET_LINK_LIBRARIES(mysqlcheck_core mysqlclient)
 @@ -78,8 +82,10 @@ TARGET_LINK_LIBRARIES(mysqlimport mysqlc
  MYSQL_ADD_EXECUTABLE(mysqlshow mysqlshow.c)
  TARGET_LINK_LIBRARIES(mysqlshow mysqlclient)

Modified: head/databases/mysql57-client/files/patch-cmake_plugin.cmake
==============================================================================
--- head/databases/mysql57-client/files/patch-cmake_plugin.cmake	Wed Jan 17 22:43:24 2018	(r459294)
+++ head/databases/mysql57-client/files/patch-cmake_plugin.cmake	Wed Jan 17 22:43:46 2018	(r459295)
@@ -1,24 +1,6 @@
 --- cmake/plugin.cmake.orig	2017-06-22 14:13:19 UTC
 +++ cmake/plugin.cmake
-@@ -219,9 +219,16 @@ MACRO(MYSQL_ADD_PLUGIN)
-     # Thus we skip TARGET_LINK_LIBRARIES on Linux, as it would only generate
-     # an additional dependency.
-     # Use MYSQL_PLUGIN_IMPORT for static data symbols to be exported.
--    IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
-+    #
-+    # P.S. "FreeBSD" is obviously not "Linux" but it behaves near similar in this case.
-+    IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
-       TARGET_LINK_LIBRARIES (${target} mysqld ${ARG_LINK_LIBRARIES})
-     ENDIF()
-+    IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
-+        SET_TARGET_PROPERTIES(${target} PROPERTIES
-+          LINK_FLAGS "-L%%FREEBSD_LOCAL_LIB%% ${LINK_FLAGS} "
-+        )
-+    ENDIF()
-     ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDENCIES})
- 
-      IF(NOT ARG_MODULE_ONLY)
-@@ -239,13 +246,17 @@ MACRO(MYSQL_ADD_PLUGIN)
+@@ -263,13 +270,17 @@ MACRO(MYSQL_ADD_PLUGIN)
      MYSQL_INSTALL_TARGETS(${target}
        DESTINATION ${INSTALL_PLUGINDIR}
        COMPONENT ${INSTALL_COMPONENT})

Added: head/databases/mysql57-client/files/patch-configure.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql57-client/files/patch-configure.cmake	Wed Jan 17 22:43:46 2018	(r459295)
@@ -0,0 +1,15 @@
+--- configure.cmake.orig	2018-01-16 23:26:09 UTC
++++ configure.cmake
+@@ -43,6 +43,12 @@ IF(UNIX)
+ ENDIF()
+ 
+ 
++IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
++  SET(CMAKE_SHARED_LIBRARY_C_FLAGS
++    "${CMAKE_SHARED_LIBRARY_C_FLAGS} ${CMAKE_C_FLAGS} -L%%FREEBSD_LOCAL_LIB%%")
++ENDIF()
++
++
+ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_COMPILER_IS_GNUCXX)
+   ## We will be using gcc to generate .so files
+   ## Add C flags (e.g. -m64) to CMAKE_SHARED_LIBRARY_C_FLAGS

Modified: head/databases/mysql57-client/pkg-plist
==============================================================================
--- head/databases/mysql57-client/pkg-plist	Wed Jan 17 22:43:24 2018	(r459294)
+++ head/databases/mysql57-client/pkg-plist	Wed Jan 17 22:43:46 2018	(r459295)
@@ -121,7 +121,6 @@ include/mysql/typelib.h
 lib/mysql/libmysqlclient.a
 lib/mysql/libmysqlclient.so
 lib/mysql/libmysqlclient.so.20
-lib/mysql/libmysqlservices.a
 lib/mysql/libmysqlclient_r.a
 lib/mysql/libmysqlclient_r.so
 lib/mysql/libmysqlclient_r.so.20

Modified: head/databases/mysql57-server/Makefile
==============================================================================
--- head/databases/mysql57-server/Makefile	Wed Jan 17 22:43:24 2018	(r459294)
+++ head/databases/mysql57-server/Makefile	Wed Jan 17 22:43:46 2018	(r459295)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME?=	mysql
-PORTVERSION=	5.7.20
-PORTREVISION=	2
+PORTVERSION=	5.7.21
 CATEGORIES=	databases ipv6
 MASTER_SITES=	MYSQL/MySQL-5.7
 PKGNAMESUFFIX?=	57-server
@@ -157,7 +156,7 @@ post-patch:
 	@${REINPLACE_CMD} 's/*.1/${MMAN1}/' ${WRKSRC}/man/CMakeLists.txt
 	# issue 220865: MySQL developers forgot that FreeBSD != Linux
 	@${REINPLACE_CMD} -e 's|%%FREEBSD_LOCAL_LIB%%|${LOCALBASE}/lib|g' \
-	    ${WRKSRC}/cmake/plugin.cmake
+	    ${WRKSRC}/configure.cmake
 
 .if !defined(CLIENT_ONLY)
 post-install:

Modified: head/databases/mysql57-server/distinfo
==============================================================================
--- head/databases/mysql57-server/distinfo	Wed Jan 17 22:43:24 2018	(r459294)
+++ head/databases/mysql57-server/distinfo	Wed Jan 17 22:43:46 2018	(r459295)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1508434184
-SHA256 (mysql-boost-5.7.20.tar.gz) = 260582844ac18222ce2826f48b6c7ca387990b19ddb88331af26738b394e42a4
-SIZE (mysql-boost-5.7.20.tar.gz) = 48833145
+TIMESTAMP = 1516137476
+SHA256 (mysql-boost-5.7.21.tar.gz) = ad29ecb6fb3c3571394fe231633a2d1d188d49e9eb749daa4e8799b7630daa09
+SIZE (mysql-boost-5.7.21.tar.gz) = 48931457

Modified: head/databases/mysql57-server/files/patch-cmake_plugin.cmake
==============================================================================
--- head/databases/mysql57-server/files/patch-cmake_plugin.cmake	Wed Jan 17 22:43:24 2018	(r459294)
+++ head/databases/mysql57-server/files/patch-cmake_plugin.cmake	Wed Jan 17 22:43:46 2018	(r459295)
@@ -1,24 +1,6 @@
 --- cmake/plugin.cmake.orig	2017-06-22 14:13:19 UTC
 +++ cmake/plugin.cmake
-@@ -219,9 +219,16 @@ MACRO(MYSQL_ADD_PLUGIN)
-     # Thus we skip TARGET_LINK_LIBRARIES on Linux, as it would only generate
-     # an additional dependency.
-     # Use MYSQL_PLUGIN_IMPORT for static data symbols to be exported.
--    IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
-+    #
-+    # P.S. "FreeBSD" is obviously not "Linux" but it behaves near similar in this case.
-+    IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
-       TARGET_LINK_LIBRARIES (${target} mysqld ${ARG_LINK_LIBRARIES})
-     ENDIF()
-+    IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
-+        SET_TARGET_PROPERTIES(${target} PROPERTIES
-+          LINK_FLAGS "-L%%FREEBSD_LOCAL_LIB%% ${LINK_FLAGS} "
-+        )
-+    ENDIF()
-     ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDENCIES})
- 
-      IF(NOT ARG_MODULE_ONLY)
-@@ -239,13 +246,17 @@ MACRO(MYSQL_ADD_PLUGIN)
+@@ -263,13 +270,17 @@ MACRO(MYSQL_ADD_PLUGIN)
      MYSQL_INSTALL_TARGETS(${target}
        DESTINATION ${INSTALL_PLUGINDIR}
        COMPONENT ${INSTALL_COMPONENT})

Modified: head/databases/mysql57-server/files/patch-libmysql_CMakeLists.txt
==============================================================================
--- head/databases/mysql57-server/files/patch-libmysql_CMakeLists.txt	Wed Jan 17 22:43:24 2018	(r459294)
+++ head/databases/mysql57-server/files/patch-libmysql_CMakeLists.txt	Wed Jan 17 22:43:46 2018	(r459295)
@@ -1,11 +1,11 @@
 --- libmysql/CMakeLists.txt.orig	2016-03-28 18:06:12 UTC
 +++ libmysql/CMakeLists.txt
-@@ -215,7 +215,7 @@ IF(WIN32)
- ENDIF()
+@@ -235,7 +235,7 @@ MESSAGE(STATUS
+ ADD_SUBDIRECTORY(authentication_ldap)
  
  # Merge several convenience libraries into one big mysqlclient
--MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development)
-+MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development NOINSTALL)
+-MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS} COMPONENT Development)
++MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS} COMPONENT Development SKIP_INSTALL)
  
  # Visual Studio users need debug  static library for debug projects
  IF(MSVC)
@@ -14,7 +14,7 @@
    MERGE_LIBRARIES(libmysql SHARED ${LIBS}
      EXPORTS ${CLIENT_API_FUNCTIONS} ${CLIENT_API_FUNCTIONS_UNDOCUMENTED}
 -    COMPONENT SharedLibraries)
-+    COMPONENT SharedLibraries NOINSTALL)
++    COMPONENT SharedLibraries SKIP_INSTALL)
 +IF(FALSE)
    IF(UNIX)
      # libtool compatability



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801172243.w0HMhkj2023258>