git: 91f311910cae - main - databases/mariadb1011-server: Update to 10.11.9

From: Bernard Spil <brnrd_at_FreeBSD.org>
Date: Sun, 18 Aug 2024 12:30:59 UTC
The branch main has been updated by brnrd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=91f311910cae4e5d87db8cdf202c918ba57ca437

commit 91f311910cae4e5d87db8cdf202c918ba57ca437
Author:     Bernard Spil <brnrd@FreeBSD.org>
AuthorDate: 2024-08-18 12:28:53 +0000
Commit:     Bernard Spil <brnrd@FreeBSD.org>
CommitDate: 2024-08-18 12:28:53 +0000

    databases/mariadb1011-server: Update to 10.11.9
    
    * Don't set db_dir twice [1]
    * Fix build with ports LibreSSL [2]
    
    PR:             280841 [1], 274494 [2]
    Reported by:    <pradeep michchi gmail com> [1], Ivan Rozhuk <rozhuk im gmail com> [2]
---
 databases/mariadb1011-server/Makefile              |  3 +-
 databases/mariadb1011-server/distinfo              |  6 +-
 databases/mariadb1011-server/files/patch-PR279362  | 85 ----------------------
 .../files/patch-mysys__ssl_openssl.c               | 15 ++++
 .../mariadb1011-server/files/server.cnf.sample.in  |  2 +-
 5 files changed, 20 insertions(+), 91 deletions(-)

diff --git a/databases/mariadb1011-server/Makefile b/databases/mariadb1011-server/Makefile
index 9859fd79a8b4..e123af229447 100644
--- a/databases/mariadb1011-server/Makefile
+++ b/databases/mariadb1011-server/Makefile
@@ -1,6 +1,5 @@
 PORTNAME?=	mariadb
-PORTVERSION=	10.11.8
-PORTREVISION=	1
+PORTVERSION=	10.11.9
 CATEGORIES=	databases
 MASTER_SITES=	https://mirror.nodesdirect.com/${SITESDIR}/ \
 		https://mirror.one.com/${SITESDIR}/ \
diff --git a/databases/mariadb1011-server/distinfo b/databases/mariadb1011-server/distinfo
index 6b0e0badf4b8..fdbd697c9482 100644
--- a/databases/mariadb1011-server/distinfo
+++ b/databases/mariadb1011-server/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1716456949
-SHA256 (mariadb-10.11.8.tar.gz) = 5f04f3e33d9f1cbeff05e79c54d41d302630500c995aee72b0638e2f9dfcdf0f
-SIZE (mariadb-10.11.8.tar.gz) = 100913048
+TIMESTAMP = 1723391398
+SHA256 (mariadb-10.11.9.tar.gz) = 0a00180864cd016187c986faab8010de23a117b9a75f91d6456421f894e48d20
+SIZE (mariadb-10.11.9.tar.gz) = 101611566
diff --git a/databases/mariadb1011-server/files/patch-PR279362 b/databases/mariadb1011-server/files/patch-PR279362
deleted file mode 100644
index f779ad442e1e..000000000000
--- a/databases/mariadb1011-server/files/patch-PR279362
+++ /dev/null
@@ -1,85 +0,0 @@
-From 45279cb03d55859423349df7e11caa5ae2b012c5 Mon Sep 17 00:00:00 2001
-From: Dave Gosselin <dave.gosselin@mariadb.com>
-Date: Mon, 13 May 2024 10:36:11 -0400
-Subject: [PATCH] MDEV-34129 mariadb-install-db appears to hang on macOS
-
-A bug in signal_handler thread initialization led to an overcomplicated
-implementation of wait_for_signal_handler_to_end, namely that we could
-fail to initialize the signal handler but mark it as active anyway.
-This meant that we could wait for it to terminate when it didn't exist
-in the first place.
-
-Additionally, let's immediately close down the signal handler loop when
-we decide to break connections--it's the start of process termination
-anyway, and there's no need to wait once we've invoked break_connections.
---- mysql-test/suite/rpl/r/rpl_shutdown_sighup.result.orig	2024-05-10 21:02:44 UTC
-+++ mysql-test/suite/rpl/r/rpl_shutdown_sighup.result
-@@ -41,7 +41,6 @@ connection slave;
- shutdown;
- connection server_2;
- connection slave;
--include/assert_grep.inc [Ensure warning is issued that signal handler thread is still processing]
- #
- # Cleanup
- connection master;
- .../suite/rpl/r/rpl_shutdown_sighup.result    |  1 -
- .../suite/rpl/t/rpl_shutdown_sighup.test      |  7 ---
- sql/mysqld.cc                                 | 61 ++++++++++---------
- 3 files changed, 32 insertions(+), 37 deletions(-)
-
---- mysql-test/suite/rpl/t/rpl_shutdown_sighup.test.orig	2024-05-10 21:02:44 UTC
-+++ mysql-test/suite/rpl/t/rpl_shutdown_sighup.test
-@@ -137,13 +137,6 @@ --source include/wait_until_connected_again.inc
- --enable_reconnect
- --source include/wait_until_connected_again.inc
- 
----let $assert_text= Ensure warning is issued that signal handler thread is still processing
----let $assert_select= Signal handler thread did not exit in a timely manner.
----let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.2.err
----let $assert_count= 1
----let $assert_only_after = CURRENT_TEST: rpl.rpl_shutdown_sighup
----source include/assert_grep.inc
--
- 
- --echo #
- --echo # Cleanup
-diff --git a/sql/mysqld.cc b/sql/mysqld.cc
-index 5ae30282729..68d8a04430f 100644
---- sql/mysqld.cc.orig
-+++ sql/mysqld.cc
-@@ -3205,6 +3205,15 @@ static void start_signal_handler(void)
-   DBUG_VOID_RETURN;
- }
- 
-+/** Called only from signal_hand function. */
-+static void* exit_signal_handler()
-+{
-+    my_thread_end();
-+    signal_thread_in_use= 0;
-+    pthread_exit(0);  // Safety
-+    return nullptr;  // Avoid compiler warnings
-+}
-+
- 
- /** This threads handles all signals and alarms. */
- /* ARGSUSED */
-@@ -3265,10 +3274,7 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
-     if (abort_loop)
-     {
-       DBUG_PRINT("quit",("signal_handler: calling my_thread_end()"));
--      my_thread_end();
--      signal_thread_in_use= 0;
--      pthread_exit(0);				// Safety
--      return 0;                                 // Avoid compiler warnings
-+      return exit_signal_handler();
-     }
-     switch (sig) {
-     case SIGTERM:
-@@ -3287,6 +3293,7 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
-         PSI_CALL_delete_current_thread();
-         my_sigset(sig, SIG_IGN);
-         break_connect_loop(); // MIT THREAD has a alarm thread
-+        return exit_signal_handler();
-       }
-       break;
-     case SIGHUP:
diff --git a/databases/mariadb1011-server/files/patch-mysys__ssl_openssl.c b/databases/mariadb1011-server/files/patch-mysys__ssl_openssl.c
index dd66a716fa84..8a141435bd67 100644
--- a/databases/mariadb1011-server/files/patch-mysys__ssl_openssl.c
+++ b/databases/mariadb1011-server/files/patch-mysys__ssl_openssl.c
@@ -12,3 +12,18 @@
  #else
  #include <openssl/evp.h>
  
+@@ -36,8 +36,12 @@
+ static uint testing;
+ static size_t alloc_size, alloc_count;
+ 
+-static void *coc_malloc(size_t size, const char *f __attribute__((unused)),
+-                                             int l __attribute__((unused)))
++static void *coc_malloc(size_t size
++#if !(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x30500000L)
++                                           , const char *f __attribute__((unused)),
++                                             int l __attribute__((unused))
++#endif
++)
+ {
+   if (unlikely(testing))
+   {
diff --git a/databases/mariadb1011-server/files/server.cnf.sample.in b/databases/mariadb1011-server/files/server.cnf.sample.in
index 9e84965c7679..cdd9478e1243 100644
--- a/databases/mariadb1011-server/files/server.cnf.sample.in
+++ b/databases/mariadb1011-server/files/server.cnf.sample.in
@@ -17,7 +17,7 @@ user				= %%MARIADB_USER%%
 # socket			= %%MARIADB_RUNDIR%%/mysql.sock # inherited from %%ETCDIR%%/my.cnf
 bind-address			= 127.0.0.1
 basedir				= %%PREFIX%%
-datadir				= %%MARIADB_DBDIR%%
+# datadir			= %%MARIADB_DBDIR%% # --db_dir is set from rc.d
 net_retry_count			= 16384
 log_error			= %%MARIADB_LOGDIR%%/mysqld.err
 # [mysqld] configuration for ZFS