[packages/mysql-proxy] Rel 2; fix build

arekm arekm at pld-linux.org
Sun Aug 9 13:18:39 CEST 2026


commit f967ffe04b9b6c0bcd73bffd3858b4df2b0aa59b
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Aug 9 13:18:06 2026 +0200

    Rel 2; fix build

 glib-string-macros.patch | 23 +++++++++++++++++++++++
 install-examples.patch   | 10 +++++-----
 mysql-8.0.patch          | 16 ++++++++++++++++
 mysql-proxy.spec         |  6 +++++-
 4 files changed, 49 insertions(+), 6 deletions(-)
---
diff --git a/mysql-proxy.spec b/mysql-proxy.spec
index 56828b4..91f2ee9 100644
--- a/mysql-proxy.spec
+++ b/mysql-proxy.spec
@@ -8,7 +8,7 @@ Summary:	MySQL Proxy
 Summary(pl.UTF-8):	Proxy MySQL
 Name:		mysql-proxy
 Version:	0.8.5
-Release:	1
+Release:	2
 License:	GPL v2
 Group:		Applications/Networking
 Source0:	https://downloads.mysql.com/archives/get/p/21/file/%{name}-%{version}.tar.gz
@@ -20,6 +20,8 @@ Source4:	admin-1.lua
 Patch0:		install-examples.patch
 Patch1:		libevent-2.1.patch
 Patch2:		mysql-5.7.patch
+Patch3:		mysql-8.0.patch
+Patch4:		glib-string-macros.patch
 URL:		http://forge.mysql.com/wiki/MySQL_Proxy
 BuildRequires:	autoconf >= 2.62
 BuildRequires:	automake
@@ -69,6 +71,8 @@ zapytań... i wiele więcej.
 %patch -P0 -p1
 %patch -P1 -p1
 %patch -P2 -p1
+%patch -P3 -p1
+%patch -P4 -p1
 
 %{__sed} -i -e 's/g_build_filename(base_dir, "lib"/g_build_filename(base_dir, "%{_lib}"/g' src/chassis-frontend.c
 %{__sed} -i -e 's/g_build_filename(srv->base_dir, "lib"/g_build_filename(srv->base_dir, "%{_lib}"/g' src/chassis-frontend.c
diff --git a/glib-string-macros.patch b/glib-string-macros.patch
new file mode 100644
index 0000000..9f45d10
--- /dev/null
+++ b/glib-string-macros.patch
@@ -0,0 +1,23 @@
+--- mysql-proxy-0.8.5/src/glib-ext.h~	2014-08-19 10:18:26.000000000 +0200
++++ mysql-proxy-0.8.5/src/glib-ext.h	2026-08-09 13:10:15.003872060 +0200
+@@ -24,6 +24,10 @@
+ 
+ #include <glib.h>
+ 
++/* glib makes g_string_append_len() a function-like macro; the C()/S()
++   "ptr, len" idiom is only split into two arguments for a real function */
++#undef g_string_append_len
++
+ #include "chassis-exports.h"
+ 
+ CHASSIS_API void     g_list_string_free(gpointer data, gpointer user_data);
+--- mysql-proxy-0.8.5/src/chassis-frontend.c~	2014-08-19 10:18:26.000000000 +0200
++++ mysql-proxy-0.8.5/src/chassis-frontend.c	2026-08-09 13:10:15.012438470 +0200
+@@ -54,6 +54,7 @@
+ #include "chassis-win32-service.h"
+ 
+ #include "string-len.h"
++#include "glib-ext.h"
+ 
+ /**
+  * initialize the basic components of the chassis
diff --git a/install-examples.patch b/install-examples.patch
index dce5875..34de445 100644
--- a/install-examples.patch
+++ b/install-examples.patch
@@ -1,6 +1,6 @@
---- mysql-proxy-0.8.0/lib/Makefile.am~	2010-01-24 12:26:34.000000000 +0200
-+++ mysql-proxy-0.8.0/lib/Makefile.am	2010-08-04 16:07:07.937180312 +0300
-@@ -3,7 +3,8 @@
+--- mysql-proxy-0.8.5/lib/Makefile.am~	2014-08-19 10:18:26.000000000 +0200
++++ mysql-proxy-0.8.5/lib/Makefile.am	2026-08-09 13:04:46.193135130 +0200
+@@ -22,7 +22,8 @@
  SUBDIRS = proxy 
  
  ## those are in the end examples or proof-of-concepts
@@ -10,7 +10,7 @@
  		active-queries.lua \
  		active-transactions.lua \
  		admin-sql.lua \
-@@ -22,9 +23,9 @@
+@@ -41,9 +42,9 @@
  if USE_WRAPPER_SCRIPT
  ## only install them if we are self-contained
  ## otherwise let the packager decide where to put them
@@ -21,4 +21,4 @@
 +EXTRA_DIST += $(example_scripts_DATA)
  endif
  
- luaext_LTLIBRARIES = lfs.la glib2.la chassis.la mysql.la lpeg.la posix.la
+ dist_luaext_DATA = \
diff --git a/mysql-8.0.patch b/mysql-8.0.patch
new file mode 100644
index 0000000..90da856
--- /dev/null
+++ b/mysql-8.0.patch
@@ -0,0 +1,16 @@
+--- mysql-proxy-0.8.5/src/network-mysqld-proto.h~	2014-08-19 10:18:26.000000000 +0200
++++ mysql-proxy-0.8.5/src/network-mysqld-proto.h	2026-08-09 13:10:15.078895321 +0200
+@@ -29,6 +29,13 @@
+ #endif
+ #include <mysql.h>
+ 
++/* MySQL 8.0+ renamed these to COM_DEPRECATED_1/COM_UNUSED_*, but the proxy
++   still has to decode them off the wire, where the protocol freezes them */
++#define COM_REFRESH		7
++#define COM_SHUTDOWN		8
++#define COM_PROCESS_INFO	10
++#define COM_PROCESS_KILL	12
++
+ #include "network-exports.h"
+ /**
+  * 4.0 is missing too many things for us to support it, so we have to error out.
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mysql-proxy.git/commitdiff/f967ffe04b9b6c0bcd73bffd3858b4df2b0aa59b



More information about the pld-cvs-commit mailing list