Bug 244320

Summary: Bug 242474 - databases/mysql56-server and databases/mysql56-client: version 5.6.47 does not build with libressl
Product: Ports & Packages Reporter: gessel
Component: Individual Port(s)Assignee: Jochen Neumeister <joneum>
Status: Closed FIXED    
Severity: Affects Only Me CC: brnrd, joneum
Priority: --- Flags: bugzilla: maintainer-feedback? (joneum)
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
svn diff for databases/mysql57-client none

Description gessel 2020-02-22 18:24:45 UTC
See #242474 Bug 242474 - databases/mysql57-server and databases/mysql57-client: version 5.7.28 does not build with libressl


Build fails at

/var/ports/usr/ports/databases/mysql56-client/work/mysql-5.6.47/vio/viosslfactories.c:230:25: error: use of undeclared identifier 'SSL_OP_NO_TLSv1_3'
                        SSL_OP_NO_TLSv1_3 |
                        ^
/var/ports/usr/ports/databases/mysql56-client/work/mysql-5.6.47/vio/viosslfactories.c:275:12: warning: implicit declaration of function 'SSL_CTX_set_ciphersuites' is invalid in C99 [-Wimplicit-function-declaration]
  if (0 == SSL_CTX_set_ciphersuites(ssl_fd->ssl_context, ""))
           ^
Comment 1 Bernard Spil freebsd_committer freebsd_triage 2020-02-23 13:50:12 UTC
Looks like they're checking OPENSSL_VERSION > 2...
Comment 2 Bernard Spil freebsd_committer freebsd_triage 2020-02-23 14:37:56 UTC
Created attachment 211857 [details]
svn diff for databases/mysql57-client

This should work(TM)

There IS a build-problem, configure and build use openssl includes from /usr and /usr/include leading to issues like these.

Not tested a full build. The cmake/ssl.cmake is actually "in the way" now.
As OPENSSL_NO_* are #define's in the headers, it is safe to check for their existence.
Comment 3 Jochen Neumeister freebsd_committer freebsd_triage 2020-03-07 14:17:00 UTC
(In reply to gessel from comment #0)

do you use libressl according to these instructions?
https://wiki.freebsd.org/LibreSSL
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-03-12 07:43:38 UTC
A commit references this bug:

Author: joneum
Date: Thu Mar 12 07:42:41 UTC 2020
New revision: 528272
URL: https://svnweb.freebsd.org/changeset/ports/528272

Log:
  This fix a Problem, when MySQL build with libressl

  /var/ports/usr/ports/databases/mysql56-client/work/mysql-5.6.47/vio/viosslfactories.c:230:25: error: use of undeclared identifier 'SSL_OP_NO_TLSv1_3'
                          SSL_OP_NO_TLSv1_3 |
                          ^
  /var/ports/usr/ports/databases/mysql56-client/work/mysql-5.6.47/vio/viosslfactories.c:275:12: warning: implicit declaration of function 'SSL_CTX_set_ciphersuites' is invalid in C99 [-Wimplicit-function-declaration]
    if (0 == SSL_CTX_set_ciphersuites(ssl_fd->ssl_context, ""))

  Special thanks for his help to: fluffy

  PR:		244320
  MFH:		2020Q1
  Sponsored by:	Netzkommune GmbH

Changes:
  head/databases/mysql56-client/Makefile
  head/databases/mysql56-client/files/patch-cmake_ssl.cmake
  head/databases/mysql56-client/files/patch-mysys__ssl_my__aes__openssl.cc
  head/databases/mysql56-client/files/patch-sql-common_client.c
  head/databases/mysql56-client/files/patch-sql_mysqld.cc
  head/databases/mysql56-client/files/patch-vio_vio.c
  head/databases/mysql56-client/files/patch-vio_viossl.c
  head/databases/mysql56-client/files/patch-vio_viosslfactories.c
  head/databases/mysql56-server/Makefile
  head/databases/mysql56-server/files/patch-cmake_ssl.cmake
  head/databases/mysql56-server/files/patch-mysys__ssl_my__aes__openssl.cc
  head/databases/mysql56-server/files/patch-sql-common_client.c
  head/databases/mysql56-server/files/patch-sql_mysqld.cc
  head/databases/mysql56-server/files/patch-vio_vio.c
  head/databases/mysql56-server/files/patch-vio_viossl.c
  head/databases/mysql56-server/files/patch-vio_viosslfactories.c
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-03-12 07:48:39 UTC
A commit references this bug:

Author: joneum
Date: Thu Mar 12 07:47:49 UTC 2020
New revision: 528273
URL: https://svnweb.freebsd.org/changeset/ports/528273

Log:
  MFH: r528272

  This fix a Problem, when MySQL build with libressl

  /var/ports/usr/ports/databases/mysql56-client/work/mysql-5.6.47/vio/viosslfactories.c:230:25: error: use of undeclared identifier 'SSL_OP_NO_TLSv1_3'
                          SSL_OP_NO_TLSv1_3 |
                          ^
  /var/ports/usr/ports/databases/mysql56-client/work/mysql-5.6.47/vio/viosslfactories.c:275:12: warning: implicit declaration of function 'SSL_CTX_set_ciphersuites' is invalid in C99 [-Wimplicit-function-declaration]
    if (0 == SSL_CTX_set_ciphersuites(ssl_fd->ssl_context, ""))

  Special thanks for his help to: fluffy

  PR:		244320
  Sponsored by:	Netzkommune GmbH

  Approved by:	ports-secteam (joneum)

Changes:
_U  branches/2020Q1/
  branches/2020Q1/databases/mysql56-client/Makefile
  branches/2020Q1/databases/mysql56-client/files/patch-cmake_ssl.cmake
  branches/2020Q1/databases/mysql56-client/files/patch-mysys__ssl_my__aes__openssl.cc
  branches/2020Q1/databases/mysql56-client/files/patch-sql-common_client.c
  branches/2020Q1/databases/mysql56-client/files/patch-sql_mysqld.cc
  branches/2020Q1/databases/mysql56-client/files/patch-vio_vio.c
  branches/2020Q1/databases/mysql56-client/files/patch-vio_viossl.c
  branches/2020Q1/databases/mysql56-client/files/patch-vio_viosslfactories.c
  branches/2020Q1/databases/mysql56-server/Makefile
  branches/2020Q1/databases/mysql56-server/files/patch-cmake_ssl.cmake
  branches/2020Q1/databases/mysql56-server/files/patch-mysys__ssl_my__aes__openssl.cc
  branches/2020Q1/databases/mysql56-server/files/patch-sql-common_client.c
  branches/2020Q1/databases/mysql56-server/files/patch-sql_mysqld.cc
  branches/2020Q1/databases/mysql56-server/files/patch-vio_vio.c
  branches/2020Q1/databases/mysql56-server/files/patch-vio_viossl.c
  branches/2020Q1/databases/mysql56-server/files/patch-vio_viosslfactories.c
Comment 6 Jochen Neumeister freebsd_committer freebsd_triage 2020-03-12 07:51:03 UTC
Comment on attachment 211857 [details]
svn diff for databases/mysql57-client

this patch is for MySQL57, but the PR was for MySQL56