git: 431a761bd7ba - main - databases/proxysql: Update to 2.6.3

From: Ryan Steinmetz <zi_at_FreeBSD.org>
Date: Mon, 03 Jun 2024 21:53:18 UTC
The branch main has been updated by zi:

URL: https://cgit.FreeBSD.org/ports/commit/?id=431a761bd7bababcfba80828f6d62516c7ead13e

commit 431a761bd7bababcfba80828f6d62516c7ead13e
Author:     Ryan Steinmetz <zi@FreeBSD.org>
AuthorDate: 2024-06-03 21:52:17 +0000
Commit:     Ryan Steinmetz <zi@FreeBSD.org>
CommitDate: 2024-06-03 21:52:17 +0000

    databases/proxysql: Update to 2.6.3
    
    - Mark i386 as BROKEN
    - Note fdescfs requirement/add patch to use fdescfs
---
 databases/proxysql/Makefile                                   |  4 +++-
 databases/proxysql/distinfo                                   |  6 +++---
 .../files/patch-deps_sqlite3_sqlite3__pass__exts.patch        | 11 +++++++++++
 databases/proxysql/files/patch-lib_ProxySQL__Admin.cpp        | 11 +++++++++++
 databases/proxysql/pkg-message                                | 10 ++++++++++
 5 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/databases/proxysql/Makefile b/databases/proxysql/Makefile
index c67986117e8e..f2ee6bdfe1ec 100644
--- a/databases/proxysql/Makefile
+++ b/databases/proxysql/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	proxysql
-PORTVERSION=	2.6.2
+PORTVERSION=	2.6.3
 CATEGORIES=	databases
 
 MAINTAINER=	zi@FreeBSD.org
@@ -9,6 +9,8 @@ WWW=		https://www.proxysql.com/
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BROKEN_i386=	configure: error: Unsupported pointer size: 0
+
 BUILD_DEPENDS=	aclocal:devel/automake \
 		autoreconf:devel/autoconf \
 		bash:shells/bash \
diff --git a/databases/proxysql/distinfo b/databases/proxysql/distinfo
index 835f10ae1ca2..70ace8cf6e3b 100644
--- a/databases/proxysql/distinfo
+++ b/databases/proxysql/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1712301882
-SHA256 (sysown-proxysql-2.6.2_GH0.tar.gz) = dc0bd1cf9261ba8277a94da4db9a5fe4d628d1b21c201424c783f715d0d394db
-SIZE (sysown-proxysql-2.6.2_GH0.tar.gz) = 50030275
+TIMESTAMP = 1716221079
+SHA256 (sysown-proxysql-2.6.3_GH0.tar.gz) = 5f7e19b264f844f765e2cab6f04f51c1f53d600c82da1ec8e45bca2f472d1e55
+SIZE (sysown-proxysql-2.6.3_GH0.tar.gz) = 50064205
diff --git a/databases/proxysql/files/patch-deps_sqlite3_sqlite3__pass__exts.patch b/databases/proxysql/files/patch-deps_sqlite3_sqlite3__pass__exts.patch
new file mode 100644
index 000000000000..6fd69e2b56a6
--- /dev/null
+++ b/databases/proxysql/files/patch-deps_sqlite3_sqlite3__pass__exts.patch
@@ -0,0 +1,11 @@
+--- deps/sqlite3/sqlite3_pass_exts.patch.orig	2024-06-03 21:25:24 UTC
++++ deps/sqlite3/sqlite3_pass_exts.patch
+@@ -11,7 +11,7 @@
+ +////////////////////////////////////////////////////////////////////////////////
+ +
+ +// ctype.h
+-+extern int toupper (int __c) __THROW;
+++extern int toupper (int __c);
+ +
+ +// SHA256_crypt
+ +char * sha256_crypt_r (const char *key, const char *salt, char *buffer, int buflen);
diff --git a/databases/proxysql/files/patch-lib_ProxySQL__Admin.cpp b/databases/proxysql/files/patch-lib_ProxySQL__Admin.cpp
new file mode 100644
index 000000000000..deeac65cb508
--- /dev/null
+++ b/databases/proxysql/files/patch-lib_ProxySQL__Admin.cpp
@@ -0,0 +1,11 @@
+--- lib/ProxySQL_Admin.cpp.orig	2024-04-05 16:24:43 UTC
++++ lib/ProxySQL_Admin.cpp
+@@ -9507,7 +9507,7 @@ void ProxySQL_Admin::p_update_metrics() {
+  * @return On success, the number of currently opened file descriptors, '-1' otherwise.
+  */
+ int32_t get_open_fds() {
+-	DIR* dir = opendir("/proc/self/fd");
++	DIR* dir = opendir("/dev/fd");
+ 	if (dir == NULL) {
+ 		proxy_error("'opendir()' failed with error: '%d'\n", errno);
+ 		return -1;
diff --git a/databases/proxysql/pkg-message b/databases/proxysql/pkg-message
index f8af81593652..d7fdd1560919 100644
--- a/databases/proxysql/pkg-message
+++ b/databases/proxysql/pkg-message
@@ -1,6 +1,16 @@
 [
 { type: install
   message: <<EOM
+proxysql requires fdescfs mounted.
+
+If you have not yet enabled it, please do the following:
+
+        mount -t fdescfs fdesc /dev/fd
+
+To make this change persist through reboots, you must edit /etc/fstab:
+
+        fdesc   /dev/fd         fdescfs         rw      0       0
+
 In order for logging to function, you must restart syslogd:
 
 # service syslogd restart