If databases/mysql80-server is usedand postfix-current is compiled with mysql support, building postfix-current fails in the file src/global/dict_mysql.c MYSQL_OPT_SSL_VERIFY_SERVER_CERT needs to be replaced by MYSQL_OPT_SSL_MODE to fix this problem. See ==> https://dev.mysql.com/worklog/task/?id=9091 for details. I added a few more lines to the file to for mysql >= 8.0. Maybe a postfix developer can add this Patch in the postfix-source ? ############################################################################## --- dict_mysql.org 2017-06-23 10:25:56.580165000 +0200 +++ dict_mysql.c 2017-06-23 10:14:55.081609000 +0200 @@ -656,7 +656,11 @@ dict_mysql->tls_key_file, dict_mysql->tls_cert_file, dict_mysql->tls_CAfile, dict_mysql->tls_CApath, dict_mysql->tls_ciphers); -#if MYSQL_VERSION_ID >= 50023 +#if MYSQL_VERSION_ID >= 80000 + if (dict_mysql->tls_verify_cert != -1) + mysql_options(host->db, MYSQL_OPT_SSL_MODE, + &dict_mysql->tls_verify_cert); +#elif MYSQL_VERSION_ID >= 50023 if (dict_mysql->tls_verify_cert != -1) mysql_options(host->db, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &dict_mysql->tls_verify_cert); ##############################################################################
Created attachment 183735 [details] proposed patchfile
Feedback please!
I still need to adjust the mentioned postfix source file to change MYSQL_OPT_SSL_VERIFY_SERVER_CERT TO MYSQL_OPT_SSL_MODE to make postfix compile with mysql80-client/server ...
This patch cannot be applied in general, it will break for example mariadb and I suspect also percona backends For example mariadb102 has the following "#define MYSQL_VERSION_ID 100212" but not "MYSQL_OPT_SSL_MODE"
Can we create an optional patch and a make config option instead (default=off) ?
Created attachment 190558 [details] add optional ssl patch für mysql80-server/client
Created attachment 190559 [details] added as optional extra-patch file
A commit references this bug: Author: ohauer Date: Sun Feb 25 15:27:31 UTC 2018 New revision: 462959 URL: https://svnweb.freebsd.org/changeset/ports/462959 Log: - update to 3.3.0 - add patch for MySQL 8.x [1} - add blacklistd support [2] additional: - regenerate patch for src/util/sys_defs.h Release Notes: ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-3.3.0.RELEASE_NOTES PR: 220224 [1], 225664 [2] Submitted by: Klaus Mayr [1], Koichiro IWAO [2] Changes: head/mail/postfix/Makefile head/mail/postfix/distinfo head/mail/postfix/files/extra-patch-blacklistd head/mail/postfix/files/patch-src__util__sys_defs.h head/mail/postfix/files/patch-src_global_dict__mysql.c head/mail/postfix/files/patch-src_util_sys__defs.h
A commit references this bug: Author: ohauer Date: Sun Feb 25 15:39:08 UTC 2018 New revision: 462961 URL: https://svnweb.freebsd.org/changeset/ports/462961 Log: - update to 3.4-20180222 - add patch for MySQL 8.x [1} - add blacklistd support [2] additional: regenerate patch for src/util/sys_defs.h PR: 220224 [1], 225664 [2] Submitted by: Klaus Mayr [1], Koichiro IWAO [2] Changes: head/mail/postfix-current/Makefile head/mail/postfix-current/distinfo head/mail/postfix-current/files/extra-patch-blacklistd head/mail/postfix-current/files/patch-src__util__sys_defs.h head/mail/postfix-current/files/patch-src_global_dict__mysql.c head/mail/postfix-current/files/patch-src_util_sys__defs.h
Thanks for the patch! The main issue was not to apply it as extra patch, since this would be applied also to percona and mariadb but to identify something in percona and mariadb e.g. mariadb defines MARIADB_VERSION_ID but percona defines nothing own and has a higher MYSQL_VERSION_ID the mysql 5.7. I've send the now applied patch also upstream, hopefully it will be adopted by postfix.
A commit references this bug: Author: ohauer Date: Wed Feb 28 21:49:47 UTC 2018 New revision: 463264 URL: https://svnweb.freebsd.org/changeset/ports/463264 Log: - fix build agains maraidb100 [1] Firt definition of MARIADB_VERSION_ID can be found in mariadb102 therefore we have to use MARIADB_BASE_VERSION which is defined in mariadb55 and mariadb10x PR: 226266 [1], 220224 Reported by: Zilon [1] Changes: head/mail/postfix/files/patch-src_global_dict__mysql.c
A commit references this bug: Author: ohauer Date: Wed Feb 28 21:50:21 UTC 2018 New revision: 463265 URL: https://svnweb.freebsd.org/changeset/ports/463265 Log: - fix build agains maraidb100 [1] Firt definition of MARIADB_VERSION_ID can be found in mariadb102 therefore we have to use MARIADB_BASE_VERSION which is defined in mariadb55 and mariadb10x PR: 226266 [1], 220224 Reported by: Zilon [1] Changes: head/mail/postfix-current/files/patch-src_global_dict__mysql.c