aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Steinmetz <zi@FreeBSD.org>2024-04-01 16:09:29 +0000
committerRyan Steinmetz <zi@FreeBSD.org>2024-04-01 16:09:29 +0000
commit639c8e2e6338063decfaf2f52191c56c7db103c6 (patch)
tree733a5b3c7ba7252b503dbd3ad3a9c74d5d4fde14
parent2eb4487adec45a064417db7a28d670411d6f3a65 (diff)
downloadports-639c8e2e6338063decfaf2f52191c56c7db103c6.tar.gz
ports-639c8e2e6338063decfaf2f52191c56c7db103c6.zip
databases/proxysql: Various Improvements
- Resolve 14.x build issue - Do not force use of admin socket - Fix RESTAPI support - Bump PORTREVISION
-rw-r--r--databases/proxysql/Makefile7
-rw-r--r--databases/proxysql/files/patch-lib_ProxySQL__RESTAPI__Server.cpp11
-rw-r--r--databases/proxysql/files/proxysql.in3
3 files changed, 15 insertions, 6 deletions
diff --git a/databases/proxysql/Makefile b/databases/proxysql/Makefile
index b611737d97d8..c3d62bb928f0 100644
--- a/databases/proxysql/Makefile
+++ b/databases/proxysql/Makefile
@@ -1,5 +1,6 @@
PORTNAME= proxysql
PORTVERSION= 2.6.1
+PORTREVISION= 1
CATEGORIES= databases
MAINTAINER= zi@FreeBSD.org
@@ -22,17 +23,14 @@ RUN_DEPENDS= libgcrypt>0:security/libgcrypt \
e2fsprogs-libuuid>0:misc/e2fsprogs-libuuid \
gnutls>0:security/gnutls
-USES= compiler:gcc-c++11-lib gmake libtool perl5 python:build shebangfix
+USES= compiler:c++11-lang gmake libtool perl5 python:build shebangfix
USE_PERL5= build
USE_GCC= yes
MAKE_ENV= GIT_VERSION=${PORTVERSION}
USE_GITHUB= yes
ALL_TARGET= build_deps default
SHEBANG_FILES= deps/libssl/verify-bio_st-match.sh
-MAKE_JOBS_UNSAFE=yes
LDFLAGS+= -L${LOCALBASE}/lib
-CFLAGS+= -fPIC
-CXXFLAGS+= -fPIC
BINARY_ALIAS= python3=${PYTHON_CMD}
USE_RC_SUBR= ${PORTNAME}
@@ -58,6 +56,7 @@ post-patch:
-e 's,grep,${LOCALBASE}/bin/grep,g' \
-e 's,ln -fsT,ln -fs,' \
-e 's,PROXYSQLCLICKHOUSE=1 ,,g' \
+ -e 's,--enable-fastopen=false ,--enable-fastopen=false --enable-shared=no ,g' \
${WRKSRC}/Makefile ${WRKSRC}/deps/Makefile \
${WRKSRC}/lib/Makefile ${WRKSRC}/src/Makefile
diff --git a/databases/proxysql/files/patch-lib_ProxySQL__RESTAPI__Server.cpp b/databases/proxysql/files/patch-lib_ProxySQL__RESTAPI__Server.cpp
new file mode 100644
index 000000000000..72ae22c8e798
--- /dev/null
+++ b/databases/proxysql/files/patch-lib_ProxySQL__RESTAPI__Server.cpp
@@ -0,0 +1,11 @@
+--- lib/ProxySQL_RESTAPI_Server.cpp.orig 2024-04-01 15:50:50 UTC
++++ lib/ProxySQL_RESTAPI_Server.cpp
+@@ -346,7 +346,7 @@ ProxySQL_RESTAPI_Server::ProxySQL_RESTAPI_Server(
+ // NOTE: Right now ProxySQL is using the simplest mode of 'libhttpserver' for serving 'REST' queries,
+ // in the current mode concurrency on serving requests is low, and throughput is directly related with
+ // the time required to execute the target script, since each of the calls are blocking.
+- ws = std::unique_ptr<httpserver::webserver>(new webserver(create_webserver(p)));
++ ws = std::unique_ptr<httpserver::webserver>(new webserver(create_webserver(p).start_method(http::http_utils::start_method_T::THREAD_PER_CONNECTION)));
+ // NOTE: Enable for benchmarking purposes. In this mode each request will be served by it's own thread.
+ // ws = std::unique_ptr<httpserver::webserver>(new webserver(create_webserver(p).start_method(http::http_utils::start_method_T::THREAD_PER_CONNECTION)));
+ auto sr = new sync_resource();
diff --git a/databases/proxysql/files/proxysql.in b/databases/proxysql/files/proxysql.in
index 781d5b4bdf1f..3e6b805315ee 100644
--- a/databases/proxysql/files/proxysql.in
+++ b/databases/proxysql/files/proxysql.in
@@ -29,7 +29,6 @@ load_rc_config $name
: ${proxysql_user:="proxysql"}
: ${proxysql_group:="proxysql"}
: ${proxysql_config:="%%ETCDIR%%/proxysql.cfg"}
-: ${proxysql_socket:="/var/run/proxysql/proxysql.sock"}
: ${proxysql_datadir:="/var/db/proxysql"}
: ${proxysql_args:=""}
: ${proxysql_restart_delay:="10"}
@@ -40,7 +39,7 @@ command="/usr/sbin/daemon"
proxysql_command="%%PREFIX%%/sbin/proxysql"
command_args="-rP ${pidfile} -S -R ${proxysql_restart_delay} \
-T ${name} ${proxysql_command} \
- -f -c ${proxysql_config} -S ${proxysql_socket} \
+ -f -c ${proxysql_config} \
-D ${proxysql_datadir} \
--no-version-check ${proxysql_args}"
required_files="${proxysql_config}"