Created attachment 179134 [details] patch-fixes_mysql56_libressl Currently MySQL 56 failed to build/configure if you used LibreSSL instead of OpenSSL With this patch this problem is fixed.
portlint is fine. poudriere builds fine.
See review D9272 for a fix that works both for LibreSSL and OpenSSL.
The patch as such is OK but I feel the check that MySQL added is a bit weird. All they are looking for is version 1.x. The VERSION_GREATER will always match that unless OpenSSL is 0.9.8 (which FreeBSD no longer has).
(In reply to Bernard Spil from comment #3) Yeah they are actually just search for openssl/libressl components in BASEDIR including headers, shared/static libs and conf files. So, yes, that makes sense why it always matches (and should be :D)
A commit references this bug: Author: brnrd Date: Sat Jan 21 13:22:52 UTC 2017 New revision: 432035 URL: https://svnweb.freebsd.org/changeset/ports/432035 Log: databases/mysql56-server: Fix build with LibreSSL - Fix CMake SSL detection - Always set WITH_SSL=${OPENSSLBASE} PR: 216311 Approved by: Mahdi Moktari <mokhi64@gmail.com> (maintainer) Differential Revision: D9272 Changes: head/databases/mysql56-client/files/patch-cmake_ssl.cmake head/databases/mysql56-server/Makefile head/databases/mysql56-server/files/patch-cmake_ssl.cmake
ReOpen this issue, Commit was reverted due breakage. brnrd@, would you please commit the attached patch instead of review?
Created attachment 179246 [details] svn diff for databases/mysql56-server Reworked the patch. MySQL tries to link statically (hence issues on libssl.a) whereas FreeBSD ports prefers dynamic linking. Attached patch fixes the OpenSSL version detection by switching from STREQUAL to VERSION_GREATER_EQUAL as supported by current CMake. Additionally, it forces MySQL to dynamically link libssl and libcrypto from the user-selected SSL_DEFAULT. Please test build/run thoroughly! (both client and user)
(In reply to Bernard Spil from comment #7) Okay, I've tested build with both libressl and openssl on a 10.3 jail, both built fine, and ran (mysql-server daemon and client) fine inside the jail. I'm attaching the build logs as a reference.
Build log for mysql56 + libressl --> http://s000.tinyupload.com/index.php?file_id=39612543602085433765 Build log for mysql56 + openssl --> http://s000.tinyupload.com/index.php?file_id=73538428972672226996
Created attachment 179253 [details] The tested patch (brnrd's) + revisions This is exactly the tested patch (brnrd@ 's) plus that I increased PORTREVISIONs
A commit references this bug: Author: brnrd Date: Thu Jan 26 19:58:07 UTC 2017 New revision: 432535 URL: https://svnweb.freebsd.org/changeset/ports/432535 Log: MFH: r431919 r431968 r431975 r432035 r432066 r432458 databases/mysql56: Update to 5.6.35 - Port improvements from MySQL 5.7 port - Use system libs instead of bundled - Fix many open PRs - Change MAINTAINER PR: 216244 192657 198812 199751 205093 PR: 209618 211248 205983 209338 databases/mysql56-server: Rollback rc script changes databases/mysql56-server: Do not install my.cnf sample An issue was discovered where users of mysql did not have a my.cnf and the recent update was causing mysqld to find a sample my.cnf and load its parameters. This was causing errors on startup for users of innodb as the parameters used to init the database did not match the ones in the sample config file it was now reading. databases/mysql56-server: Fix build with LibreSSL - Fix CMake SSL detection - Always set WITH_SSL=${OPENSSLBASE} PR: 216311 Approved by: Mahdi Moktari <mokhi64@gmail.com> (maintainer) Differential Revision: D9272 Revert r432035 part 2, it breaks build with openssl from base With hat: portmgr databases/mysql56-server: Fix OpenSSL linking - Force dynamic linking with OpenSSL Approved by: ports-secteam (feld) Changes: _U branches/2017Q1/ branches/2017Q1/databases/mysql56-client/Makefile branches/2017Q1/databases/mysql56-client/files/patch-CMakeLists.txt branches/2017Q1/databases/mysql56-client/files/patch-cmake_ssl.cmake branches/2017Q1/databases/mysql56-client/files/patch-extra_CMakeLists.txt branches/2017Q1/databases/mysql56-client/files/patch-man_CMakeLists.txt branches/2017Q1/databases/mysql56-client/files/patch-mysys_ssl_my_default.cc branches/2017Q1/databases/mysql56-client/files/patch-scripts_CMakeLists.txt branches/2017Q1/databases/mysql56-client/files/patch-support-files_CMakeLists.txt branches/2017Q1/databases/mysql56-client/pkg-message branches/2017Q1/databases/mysql56-server/Makefile branches/2017Q1/databases/mysql56-server/distinfo branches/2017Q1/databases/mysql56-server/files/my.cnf.sample.in branches/2017Q1/databases/mysql56-server/files/patch-cmake_ssl.cmake branches/2017Q1/databases/mysql56-server/files/patch-mysys_ssl_my_default.cc branches/2017Q1/databases/mysql56-server/pkg-message branches/2017Q1/databases/mysql56-server/pkg-plist
(In reply to commit-hook from comment #11) Thanks :)