From owner-freebsd-database@freebsd.org Sun May 16 09:55:28 2021 Return-Path: Delivered-To: freebsd-database@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 65B4563C4D8 for ; Sun, 16 May 2021 09:55:28 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "anubis.delphij.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fjd1C0wm7z4vBL; Sun, 16 May 2021 09:55:26 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from p51.home.us.delphij.net (unknown [IPv6:2601:646:8601:f4a:e670:b8ff:fe5c:4e69]) by anubis.delphij.net (Postfix) with ESMTPSA id E0813C1E1; Sun, 16 May 2021 02:55:19 -0700 (PDT) Reply-To: d@delphij.net Subject: Re: To: freebsd-database@freebsd.org, joneum@FreeBSD.org References: <956930fc-5209-4ec2-95fa-19fd44a26672@www.fastmail.com> From: Xin Li Organization: The FreeBSD Project Message-ID: <192b6704-d8f5-f780-9916-3f310015c0f3@delphij.net> Date: Sun, 16 May 2021 02:55:19 -0700 MIME-Version: 1.0 In-Reply-To: <956930fc-5209-4ec2-95fa-19fd44a26672@www.fastmail.com> Content-Type: multipart/mixed; boundary="------------8578EAA1B372DDD10A20A150" Content-Language: en-US X-Rspamd-Queue-Id: 4Fjd1C0wm7z4vBL X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.88 / 15.00]; HAS_REPLYTO(0.00)[d@delphij.net]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; HAS_ATTACHMENT(0.00)[]; TO_DN_NONE(0.00)[]; HAS_ORG_HEADER(0.00)[]; DKIM_TRACE(0.00)[delphij.net:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[delphij.net,reject]; NEURAL_HAM_SHORT(-0.88)[-0.885]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[64.62.153.212:from]; ASN(0.00)[asn:6939, ipnet:64.62.128.0/18, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[delphij.net:s=m7e2]; FREEFALL_USER(0.00)[delphij]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.991]; MIME_GOOD(-0.10)[multipart/mixed,text/plain,text/x-patch]; REPLYTO_DOM_EQ_FROM_DOM(0.00)[]; SPAMHAUS_ZRD(0.00)[64.62.153.212:from:127.0.2.255]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-database] X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2021 09:55:28 -0000 This is a multi-part message in MIME format. --------------8578EAA1B372DDD10A20A150 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 5/2/21 10:44 AM, Dan Langille wrote: > On Sat, May 1, 2021, at 10:02 PM, Curtis Villamizar wrote: >> The ports collection still has MySQL server versions 5.7.33 and >> 8.0.23. >> >> The VuXML database has had an entry for mysql since April 20 that >> affects mysql57-server < 5.7.34 and mysql80-server < 8.0.24. It >> sounds rather severe: >> >> This Critical Patch Update contains 49 new security patches for >> Oracle MySQL. 10 of these vulnerabilities may be remotely >> exploitable without authentication, i.e., may be exploited over a >> network without requiring user credentials. The highest CVSS v3.1 >> Base Score of vulnerabilities affecting Oracle MySQL is 9.8. >> >> See http://vuxml.freebsd.org/freebsd/56ba4513-a1be-11eb-9072-d4c9ef517024.html >> >> Any idea when the port will be updated? >> >> It might be good to update this promptly just in case someone wants to >> run some sort of serious mysql application in production. > > MySQL is not an easy port to maintain. I have tried. > > Some months ago, under similar circumstances, I tried to patch the port to help the > maintainer. I failed. It was not as simple as bumping the PORTVERSION, > running `make makesum`, followed by a `poudriere testport`. > > That's when I decided to leave it to the port maintainer who knows what > they are doing and is familiar with the port. I am sure they would appreciate > help though. If someone CAN provide patches, that is always helpful I've took some time to update the mysql80-server port to 8.0.25. Note that I have only build-tested it and have not tested it with real data, yet (will do tomorrow-ish when I have some time). This drops LLVM 9 dependency for most 13.x users. If you have a spare system, especially if you have a set up with replication, please do give it some tests and let us know if it works for you. Cheers, --------------8578EAA1B372DDD10A20A150 Content-Type: text/x-patch; charset=UTF-8; name="0001-database-mysql80-server-update-to-8.0.25.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-database-mysql80-server-update-to-8.0.25.patch" >From 54605e7de9953876581d479fc61f63e5fc9e951d Mon Sep 17 00:00:00 2001 From: Xin LI Date: Sun, 16 May 2021 02:48:11 -0700 Subject: [PATCH] database/mysql80-server: update to 8.0.25. --- databases/mysql80-client/Makefile | 1 - databases/mysql80-client/pkg-plist | 1 + databases/mysql80-server/Makefile | 13 +++------- databases/mysql80-server/distinfo | 6 ++--- .../files/patch-client_CMakeLists.txt | 18 +++++++------- databases/mysql80-server/files/patch-icu68 | 17 ------------- .../files/patch-mysys_my__default.cc | 20 ++++++++-------- .../mysql80-server/files/patch-sql_binlog.cc | 24 +++++++++++++++++++ .../mysql80-server/files/patch-sql_item.h | 18 -------------- databases/mysql80-server/pkg-plist | 2 ++ 10 files changed, 53 insertions(+), 67 deletions(-) delete mode 100644 databases/mysql80-server/files/patch-icu68 create mode 100644 databases/mysql80-server/files/patch-sql_binlog.cc delete mode 100644 databases/mysql80-server/files/patch-sql_item.h diff --git a/databases/mysql80-client/Makefile b/databases/mysql80-client/Makefile index c9b0f181711a..7f99fd15fc3f 100644 --- a/databases/mysql80-client/Makefile +++ b/databases/mysql80-client/Makefile @@ -1,7 +1,6 @@ # Created by: "Mahdi Mokhtari " PORTNAME= mysql -PORTREVISION= 1 PKGNAMESUFFIX= 80-client COMMENT= Multithreaded SQL database (client) diff --git a/databases/mysql80-client/pkg-plist b/databases/mysql80-client/pkg-plist index 7a4b894f123d..1d2f6cfb9268 100644 --- a/databases/mysql80-client/pkg-plist +++ b/databases/mysql80-client/pkg-plist @@ -3,6 +3,7 @@ bin/my_print_defaults bin/mysql bin/mysql_config bin/mysql_config_editor +bin/mysql_migrate_keyring bin/mysqladmin bin/mysqlbinlog bin/mysqlcheck diff --git a/databases/mysql80-server/Makefile b/databases/mysql80-server/Makefile index 2788b4f72991..86a4abd084e3 100644 --- a/databases/mysql80-server/Makefile +++ b/databases/mysql80-server/Makefile @@ -1,8 +1,8 @@ # Created by: Mahdi Mokhtari PORTNAME?= mysql -PORTVERSION= 8.0.23 -PORTREVISION?= 1 +PORTVERSION= 8.0.25 +PORTREVISION?= 0 CATEGORIES= databases MASTER_SITES= MYSQL/MySQL-8.0 PKGNAMESUFFIX?= 80-server @@ -48,7 +48,7 @@ BUILD_DEPENDS_powerpc64= libunwind>0:devel/libunwind BUILD_DEPENDS_powerpc64le= libunwind>0:devel/libunwind CMAKE_BUILD_TYPE= Release -CFLAGS+= -fPIC +CFLAGS+= -fPIC -DNDEBUG -malign-double CMAKE_ARGS+= -DINSTALL_LAYOUT=FREEBSD \ -DINSTALL_LDCONFIGDIR="${LOCALBASE}/libdata/ldconfig" \ @@ -184,13 +184,6 @@ SUB_LIST+= LEGACY_LIMITS="" MODERN_LIMITS="@comment " .include -.if ${CHOSEN_COMPILER_TYPE} == clang && ${OPSYS} == FreeBSD && ${OSVERSION} >= 1300109 || ${ARCH} == "i386" -BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} -CC= ${LOCALBASE}/bin/clang${LLVM_DEFAULT} -CPP= ${LOCALBASE}/bin/clang${LLVM_DEFAULT} -CXX= ${LOCALBASE}/bin/clang++${LLVM_DEFAULT} -.endif - .if ${ARCH} == "i386" && ${OSVERSION} < 1200000 # clang 7.x and 8.x do not build properly on 11i386 CPP= clang-cpp${LLVM_DEFAULT} diff --git a/databases/mysql80-server/distinfo b/databases/mysql80-server/distinfo index 5d0a5737ecff..d8b53adf2580 100644 --- a/databases/mysql80-server/distinfo +++ b/databases/mysql80-server/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1611995725 -SHA256 (mysql-boost-8.0.23.tar.gz) = 1c7a424303c134758e59607a0b3172e43a21a27ff08e8c88c2439ffd4fc724a5 -SIZE (mysql-boost-8.0.23.tar.gz) = 291039175 +TIMESTAMP = 1621139131 +SHA256 (mysql-boost-8.0.25.tar.gz) = 93c5f57cbd69573a8d9798725edec52e92830f70c398a1afaaea2227db331728 +SIZE (mysql-boost-8.0.25.tar.gz) = 290265324 diff --git a/databases/mysql80-server/files/patch-client_CMakeLists.txt b/databases/mysql80-server/files/patch-client_CMakeLists.txt index b037a4de28bb..bbfb4249c799 100644 --- a/databases/mysql80-server/files/patch-client_CMakeLists.txt +++ b/databases/mysql80-server/files/patch-client_CMakeLists.txt @@ -1,18 +1,20 @@ ---- client/CMakeLists.txt.orig 2019-09-20 08:30:51 UTC +--- client/CMakeLists.txt.orig 2021-03-22 08:44:50 UTC +++ client/CMakeLists.txt -@@ -28,8 +28,11 @@ DISABLE_MISSING_PROFILE_WARNING() +@@ -28,10 +28,13 @@ DISABLE_MISSING_PROFILE_WARNING() ## Subdirectory with common client code. ADD_SUBDIRECTORY(base) ## Subdirectory for mysqlpump code. +IF(WITHOUT_SERVER) ADD_SUBDIRECTORY(dump) + ## Subdirectory for mysql_migrate_keyring code. + ADD_SUBDIRECTORY(migrate_keyring) +ENDIF() +IF(NOT WITHOUT_CLIENTLIBS) MYSQL_ADD_EXECUTABLE(mysql ${CMAKE_SOURCE_DIR}/sql-common/net_ns.cc completion_hash.cc -@@ -39,6 +42,7 @@ MYSQL_ADD_EXECUTABLE(mysql +@@ -41,6 +44,7 @@ MYSQL_ADD_EXECUTABLE(mysql client_query_attributes.cc LINK_LIBRARIES mysqlclient client_base ${EDITLINE_LIBRARY} ) @@ -20,7 +22,7 @@ IF(NOT WITHOUT_SERVER) MYSQL_ADD_EXECUTABLE(mysql_upgrade -@@ -55,6 +59,7 @@ IF(SOLARIS_SPARC AND MY_COMPILER_IS_SUNPRO AND +@@ -57,6 +61,7 @@ IF(SOLARIS_SPARC AND MY_COMPILER_IS_SUNPRO AND ) ENDIF() @@ -28,7 +30,7 @@ MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc mysqltest/error_names.cc -@@ -71,6 +76,9 @@ MYSQL_ADD_EXECUTABLE(mysqltest +@@ -73,6 +78,9 @@ MYSQL_ADD_EXECUTABLE(mysqltest ENABLE_EXPORTS LINK_LIBRARIES mysqlclient ) @@ -38,7 +40,7 @@ MYSQL_ADD_EXECUTABLE(mysqlcheck check/mysqlcheck.cc check/mysqlcheck_core.cc -@@ -246,7 +254,9 @@ ENDIF() +@@ -248,7 +256,9 @@ ENDIF() TARGET_COMPILE_DEFINITIONS(mysqlbinlog PRIVATE DISABLE_PSI_MUTEX) TARGET_INCLUDE_DIRECTORIES(mysqlbinlog PRIVATE ${CMAKE_SOURCE_DIR}/sql) @@ -48,7 +50,7 @@ MYSQL_ADD_EXECUTABLE(mysqladmin mysqladmin.cc LINK_LIBRARIES mysqlclient -@@ -259,6 +269,9 @@ MYSQL_ADD_EXECUTABLE(mysql_config_editor +@@ -261,6 +271,9 @@ MYSQL_ADD_EXECUTABLE(mysql_config_editor mysql_config_editor.cc LINK_LIBRARIES mysqlclient ) @@ -58,7 +60,7 @@ MYSQL_ADD_EXECUTABLE(mysql_secure_installation mysql_secure_installation.cc LINK_LIBRARIES mysqlclient -@@ -269,6 +282,7 @@ MYSQL_ADD_EXECUTABLE(mysql_ssl_rsa_setup +@@ -271,6 +284,7 @@ MYSQL_ADD_EXECUTABLE(mysql_ssl_rsa_setup path.cc LINK_LIBRARIES mysys ) diff --git a/databases/mysql80-server/files/patch-icu68 b/databases/mysql80-server/files/patch-icu68 deleted file mode 100644 index 89f0f9b4a54b..000000000000 --- a/databases/mysql80-server/files/patch-icu68 +++ /dev/null @@ -1,17 +0,0 @@ -Regressed by https://github.com/unicode-org/icu/commit/c3fe7e09d844 - -sql/mysqld.cc:6915:30: error: use of undeclared identifier 'TRUE' - my_getopt_skip_unknown = TRUE; - ^ - ---- sql/mysqld.cc.orig 2020-06-16 16:31:03 UTC -+++ sql/mysqld.cc -@@ -6910,7 +6912,7 @@ int mysqld_main(int argc, char **argv) - if (opt_keyring_migration_source || opt_keyring_migration_destination || - migrate_connect_options) { - Migrate_keyring mk; -- my_getopt_skip_unknown = TRUE; -+ my_getopt_skip_unknown = true; - if (mk.init(remaining_argc, remaining_argv, opt_keyring_migration_source, - opt_keyring_migration_destination, opt_keyring_migration_user, - opt_keyring_migration_host, opt_keyring_migration_password, diff --git a/databases/mysql80-server/files/patch-mysys_my__default.cc b/databases/mysql80-server/files/patch-mysys_my__default.cc index ffc76b7a8941..6a8cb5ebbaf2 100644 --- a/databases/mysql80-server/files/patch-mysys_my__default.cc +++ b/databases/mysql80-server/files/patch-mysys_my__default.cc @@ -1,15 +1,15 @@ ---- mysys/my_default.cc.orig 2019-09-20 08:30:51 UTC +--- mysys/my_default.cc.orig 2021-04-23 15:06:40 UTC +++ mysys/my_default.cc -@@ -203,7 +203,7 @@ bool no_defaults = false; +@@ -204,7 +204,7 @@ bool no_defaults = false; /* Which directories are searched for options (and in which order) */ -#define MAX_DEFAULT_DIRS 6 +#define MAX_DEFAULT_DIRS 7 #define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */ - static const char **default_directories = NULL; + static const char **default_directories = nullptr; -@@ -909,6 +909,14 @@ static int search_default_file_with_ext(Process_option +@@ -915,6 +915,14 @@ static int search_default_file_with_ext(Process_option return 1; /* Ignore wrong files */ } @@ -21,10 +21,10 @@ + goto err; + } + - while (mysql_file_getline(buff, sizeof(buff) - 1, fp, is_login_file)) { - line++; - /* Ignore comment and empty lines */ -@@ -1228,7 +1236,8 @@ void my_print_default_files(const char *conf_file) { + while (true) { + auto fileline = mysql_file_getline(buff, sizeof(buff), fp, is_login_file); + char *linebuff = fileline.get(); +@@ -1300,7 +1308,8 @@ void my_print_default_files(const char *conf_file) { end[(strlen(end) - 1)] = ' '; else strxmov(end, conf_file, *ext, " ", NullS); @@ -34,7 +34,7 @@ } } } -@@ -1565,14 +1574,9 @@ static const char **init_default_directories(MEM_ROOT +@@ -1640,14 +1649,9 @@ static const char **init_default_directories(MEM_ROOT #else @@ -51,7 +51,7 @@ #endif if ((env = getenv("MYSQL_HOME"))) errors += add_directory(alloc, env, dirs); -@@ -1635,7 +1639,7 @@ int check_file_permissions(const char *file_name, bool +@@ -1710,7 +1714,7 @@ int check_file_permissions(const char *file_name, bool #if !defined(_WIN32) MY_STAT stat_info; diff --git a/databases/mysql80-server/files/patch-sql_binlog.cc b/databases/mysql80-server/files/patch-sql_binlog.cc new file mode 100644 index 000000000000..6c51f7bf8a61 --- /dev/null +++ b/databases/mysql80-server/files/patch-sql_binlog.cc @@ -0,0 +1,24 @@ +--- sql/binlog.cc.orig 2021-03-22 08:44:50 UTC ++++ sql/binlog.cc +@@ -9156,8 +9156,8 @@ void MYSQL_BIN_LOG::report_missing_purged_gtids( + + char *missing_gtids = NULL; + char *slave_executed_gtids = NULL; +- gtid_missing.to_string(&missing_gtids, NULL); +- slave_executed_gtid_set->to_string(&slave_executed_gtids, NULL); ++ gtid_missing.to_string(&missing_gtids); ++ slave_executed_gtid_set->to_string(&slave_executed_gtids); + + /* + Log the information about the missing purged GTIDs to the error log. +@@ -9210,8 +9210,8 @@ void MYSQL_BIN_LOG::report_missing_gtids( + Gtid_set gtid_missing(slave_executed_gtid_set->get_sid_map()); + gtid_missing.add_gtid_set(slave_executed_gtid_set); + gtid_missing.remove_gtid_set(previous_gtid_set); +- gtid_missing.to_string(&missing_gtids, NULL); +- slave_executed_gtid_set->to_string(&slave_executed_gtids, NULL); ++ gtid_missing.to_string(&missing_gtids); ++ slave_executed_gtid_set->to_string(&slave_executed_gtids); + + String tmp_uuid; + diff --git a/databases/mysql80-server/files/patch-sql_item.h b/databases/mysql80-server/files/patch-sql_item.h deleted file mode 100644 index ebeed4aaa6b7..000000000000 --- a/databases/mysql80-server/files/patch-sql_item.h +++ /dev/null @@ -1,18 +0,0 @@ ---- sql/item.h.orig 2020-12-11 07:42:20 UTC -+++ sql/item.h -@@ -3380,13 +3380,13 @@ class Item_sp_variable : public Item { - Name_string m_name; - - public: --#ifndef DBUG_OFF -+//#ifndef DBUG_OFF - /* - Routine to which this Item_splocal belongs. Used for checking if correct - runtime context is used for variable handling. - */ - sp_head *m_sp{nullptr}; --#endif -+//#endif - - public: - Item_sp_variable(const Name_string sp_var_name); diff --git a/databases/mysql80-server/pkg-plist b/databases/mysql80-server/pkg-plist index fcd2a90b5c6d..fea5ce5c8a63 100644 --- a/databases/mysql80-server/pkg-plist +++ b/databases/mysql80-server/pkg-plist @@ -8,6 +8,7 @@ bin/myisamlog bin/myisampack bin/mysqldumpslow bin/mysql_client_test +bin/mysql_keyring_encryption_test bin/mysql_secure_installation bin/mysql_ssl_rsa_setup bin/mysql_tzinfo_to_sql @@ -58,6 +59,7 @@ lib/mysql/plugin/component_audit_api_message_emit.so lib/mysql/plugin/component_example_component1.so lib/mysql/plugin/component_example_component2.so lib/mysql/plugin/component_example_component3.so +lib/mysql/plugin/component_keyring_file.so lib/mysql/plugin/component_log_filter_dragnet.so lib/mysql/plugin/component_log_sink_json.so lib/mysql/plugin/component_log_sink_syseventlog.so -- 2.31.1 --------------8578EAA1B372DDD10A20A150--