1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

databases/proxysql: Update to 2.6.6

This commit is contained in:
Ryan Steinmetz 2024-09-23 19:21:24 -04:00
parent bf227c7354
commit 44c309b0d9
No known key found for this signature in database
GPG Key ID: 1EF8BA6BD02846D7
10 changed files with 14 additions and 69 deletions

View File

@ -1,5 +1,5 @@
PORTNAME= proxysql
PORTVERSION= 2.6.4
PORTVERSION= 2.6.6
CATEGORIES= databases
MAINTAINER= zi@FreeBSD.org
@ -42,24 +42,17 @@ GH_ACCOUNT= sysown
post-patch:
@${REINPLACE_CMD} -e 's,/etc/,${ETCDIR}/,g' ${WRKSRC}/lib/ProxySQL_GloVars.cpp
@${REINPLACE_CMD} \
-e 's|strftime(__buffer, 25, "%Y-%m-%d %H:%M:%S", __tm_info);|snprintf(__buffer, 3, "%s", "");|g' \
-e 's,"%s \[,"%s\[,g' \
-e '/__timer/d' \
-e '/__tm_info/d' \
${WRKSRC}/include/proxysql_debug.h
@${REINPLACE_CMD} \
-e 's,/var/lib,/var/db,g' \
-e '7s/^/errorlog="\/var\/log\/proxysql\/proxysql-error.log"\n\n/g' \
-e '7s/^/pid="\/var\/run\/${PORTNAME}\/${PORTNAME}.pid"\n/g' \
-e '7s/^/pidfile="\/var\/run\/${PORTNAME}\/${PORTNAME}.pid"\n/g' \
${WRKSRC}/src/proxysql.cfg
@${REINPLACE_CMD} \
-e 's,grep,${LOCALBASE}/bin/grep,g' \
-e 's,ln -fsT,ln -fs,' \
-e 's,grep -P,${LOCALBASE}/bin/grep -P,g' \
-e '/ export C/d' \
-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
${WRKSRC}/Makefile ${WRKSRC}/deps/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/proxysql ${STAGEDIR}${LOCALBASE}/sbin
@ -67,11 +60,8 @@ do-install:
post-install:
${MKDIR} ${STAGEDIR}${ETCDIR} ${STAGEDIR}/var/db/${PORTNAME} \
${STAGEDIR}/var/run/${PORTNAME} \
${STAGEDIR}${LOCALBASE}/etc/syslog.d \
${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d \
${STAGEDIR}/var/log/${PORTNAME}
${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.conf \
${STAGEDIR}${LOCALBASE}/etc/syslog.d
${INSTALL_DATA} ${FILESDIR}/proxysql.conf-newsyslog \
${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/proxysql.conf.sample
${INSTALL_DATA} ${WRKSRC}/src/proxysql.cfg \

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1724763891
SHA256 (sysown-proxysql-2.6.4_GH0.tar.gz) = d1b018550fc5a0e16c697795060d98dd8c8d1d77e6ce184c2065c5d4374d26ab
SIZE (sysown-proxysql-2.6.4_GH0.tar.gz) = 50074326
TIMESTAMP = 1727108943
SHA256 (sysown-proxysql-2.6.6_GH0.tar.gz) = c447ac0c4532c6654cc648416e3dd1560824f67406f510efe52c4c6291a1ef4a
SIZE (sysown-proxysql-2.6.6_GH0.tar.gz) = 50425374

View File

@ -1,11 +0,0 @@
--- 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);

View File

@ -1,11 +0,0 @@
--- 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;

View File

@ -1,11 +0,0 @@
--- 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();

View File

@ -1,2 +0,0 @@
!proxysql
*.* /var/log/proxysql.log

View File

@ -1 +1 @@
/var/log/proxysql.log root:wheel 640 10 1000 * JC
/var/log/proxysql.log root:wheel 640 10 1000 * JC /var/run/proxysql/proxysql.pid SIGUSR1

View File

@ -33,15 +33,12 @@ load_rc_config $name
: ${proxysql_args:=""}
: ${proxysql_restart_delay:="10"}
##### REMOVE daemon, allow proxysql to fork
pidfile="/var/run/proxysql/proxysql.pid"
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} \
-D ${proxysql_datadir} \
--no-version-check ${proxysql_args}"
command="%%PREFIX%%/sbin/proxysql"
command_args="-c ${proxysql_config} \
-D ${proxysql_datadir} \
--no-version-check ${proxysql_args}"
required_files="${proxysql_config}"
extra_commands="reload initial"
reload_cmd=proxysql_reload

View File

@ -10,10 +10,6 @@ If you have not yet enabled it, please do the following:
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
EOM
}
]

View File

@ -1,4 +1,3 @@
etc/syslog.d/proxysql.conf
sbin/proxysql
@dir(,proxysql,0750) %%ETCDIR%%
@sample(,proxysql,0640) %%ETCDIR%%/proxysql.cfg.sample
@ -6,5 +5,3 @@ sbin/proxysql
@dir(proxysql,proxysql,0750) /var/db/proxysql
@dir(proxysql,proxysql,0750) /var/run/proxysql
@dir(proxysql,proxysql,0750) /var/log/proxysql
@postexec test -f /var/log/proxysql.log || touch /var/log/proxysql.log
@postexec chmod 600 /var/log/proxysql.log