[packages/proxysql] new, version 1.3.7

glen glen at pld-linux.org
Tue Aug 8 10:18:25 CEST 2017


commit d42a0ad952332a41d39e850953ff6d1c0216380e
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Tue Aug 8 11:18:00 2017 +0300

    new, version 1.3.7
    
    based on fedora package, 0fb6b50

 proxysql.1                                         |  82 +++++++++++++
 proxysql.service                                   |  16 +++
 proxysql.spec                                      |  87 ++++++++++++++
 ...ysql_debundle_libconfig_libdaemon_sqlite3.patch | 132 +++++++++++++++++++++
 4 files changed, 317 insertions(+)
---
diff --git a/proxysql.spec b/proxysql.spec
new file mode 100644
index 0000000..e6da187
--- /dev/null
+++ b/proxysql.spec
@@ -0,0 +1,87 @@
+Summary:	A high-performance MySQL proxy
+Name:		proxysql
+Version:	1.3.7
+Release:	0.1
+# The entire source code is GPLv3+ except deps/re2 and deps/jemalloc which is BSD
+# and deps/mariadb-connector-c which is LGPLv2+
+License:	GPLv3+ and LGPLv2+ and BSD
+Group:		Development/Tools
+Source0:	https://github.com/sysown/proxysql/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	0698bb3f4daec5f80dacdf5011f6ac80
+Source1:	%{name}.service
+Source2:	%{name}.1
+Patch0:		%{name}_debundle_libconfig_libdaemon_sqlite3.patch
+URL:		http://www.proxysql.com/
+BuildRequires:	cmake
+BuildRequires:	libconfig-devel
+BuildRequires:	libdaemon-devel
+BuildRequires:	openssl-devel
+BuildRequires:	sqlite-devel
+BuildRequires:	systemd-devel
+Provides:	bundled(jemalloc) = 4.3.1
+Provides:	bundled(mariadb-connector-c) = 2.3.1
+Provides:	bundled(re2) = 20140304
+# Build in other architectures aside from x86 is not yet supported due to some
+# use of assembly code, but is on the upstream roadmap to support them.
+# https://github.com/sysown/proxysql/issues/977
+ExcludeArch:	%{arm} %{power64} s390x aarch64
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+ProxySQL is a high performance, high availability, protocol aware
+proxy for MySQL and forks (like Percona Server and MariaDB).
+
+%prep
+%setup -q
+%patch0 -p1
+
+rm -r deps/libconfig deps/libdaemon deps/sqlite3
+
+%build
+%configure
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -p -D src/proxysql -t $RPM_BUILD_ROOT%{_bindir}
+install -p -D etc/proxysql.cnf -t $RPM_BUILD_ROOT%{_sysconfdir}
+install -p -D tools/proxysql_galera_checker.sh -t $RPM_BUILD_ROOT%{_datadir}/%{name}/tools
+install -p -D tools/proxysql_galera_writer.pl -t $RPM_BUILD_ROOT%{_datadir}/%{name}/tools
+install -p -D %{SOURCE1} -t $RPM_BUILD_ROOT%{systemdunitdir}
+install -p -D README.md -t $RPM_BUILD_ROOT%{_docdir}/proxysql
+install -p -D RUNNING.md -t $RPM_BUILD_ROOT%{_docdir}/proxysql
+install -p -D FAQ.md -t $RPM_BUILD_ROOT%{_docdir}/proxysql
+install -p -D doc/*.md -t $RPM_BUILD_ROOT%{_docdir}/proxysql
+install -p -D %{SOURCE2} -t $RPM_BUILD_ROOT%{_mandir}/man1
+install -d -D $RPM_BUILD_ROOT%{_sharedstatedir}/proxysql
+
+%if 0
+%pre
+/usr/sbin/groupadd -r proxysql >/dev/null 2>&1 || :
+%useradd  -g proxysql -r -d /var/lib/proxysql -s /sbin/nologin     -c "ProxySQL" proxysql >/dev/null 2>&1 || :
+%endif
+
+%post
+%systemd_post proxysql.service
+
+%preun
+%systemd_preun proxysql.service
+
+%postun
+%systemd_postun_with_restart proxysql.service
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE
+%attr(755,root,root) %{_bindir}/*
+%{systemdunitdir}/*
+%{_datadir}/%{name}
+%{_docdir}/%{name}
+%{_mandir}/man1/*
+%defattr(-,proxysql,proxysql,-)
+%{_sharedstatedir}/%{name}
+%defattr(-,proxysql,root,-)
+%config(noreplace) %{_sysconfdir}/%{name}.cnf
diff --git a/proxysql.1 b/proxysql.1
new file mode 100644
index 0000000..cf445e4
--- /dev/null
+++ b/proxysql.1
@@ -0,0 +1,82 @@
+.TH PROXYSQL 1
+.SH NAME
+proxysql \- High Performance Advanced Proxy for MySQL
+.SH SYNOPSIS
+.B proxysql
+[\fIOPTIONS\fR]
+.SH DESCRIPTION
+.B proxysql
+is a high performance, high availability, protocol aware proxy for
+MySQL and forks (like Percona Server and MariaDB).
+.SH OPTIONS
+.TP
+.BR \-c ", " \-\-config " "\fIARG\fR
+Configuration file.
+By default, the proxy looks for the config file in the following locations (in this exact order):
+.RS
+.IP \[bu] 2
+`proxysql.cnf`, in the directory of the proxysql binary
+.IP \[bu]
+`proxysql.cfg`, in the directory of the proxysql binary
+.IP \[bu]
+`/etc/proxysql.cnf`
+.IP \[bu]
+`/etc/proxysql.cfg`
+.RE
+.IP
+ This setting allows you to override the configuration file, and specify a custom location.
+.TP
+.BR \-D ", " \-\-datadir " "\fIARG\fR
+The data directory is where the proxy keeps its running files:
+.RS
+.IP \[bu] 2
+the SQLite database which stores the runtime configuration for the proxy
+.IP \[bu]
+the pidfile
+.IP \[bu]
+the log files
+.RE
+.TP
+.BR \-e ", " \-\-exit-on-error
+Do not restart ProxySQL if crashes.
+.TP
+.BR \-f ", " \-\-foreground
+Run the daemon process in the foreground.
+.TP
+.BR \-h ", " \-help ", " \-\-help ", " \-\-usage
+Display usage instructions.
+.TP
+.BR \-M ", " \-\-no-monitor
+Do not start Monitor Module.
+.TP
+.BR \-n ", " \-\-no-start
+Starts only the admin service, which helps to configure the daemon. This will
+not accept any traffic until the daemon is started from the admin interface.
+.TP
+.BR \-r ", " \-\-reuseport
+Use SO_REUSEPORT.
+.TP
+.BR \-S ", " \-\-admin-socket " "\fIARG\fR
+Administration Unix Socket.
+.TP
+.BR \-V ", " \-\-version
+Print the current version of ProxySQL.
+.TP
+.BR \-\-initial
+Reset the admin database with the content from the configuration file.
+.TP
+.BR \-\-reload
+Merge the configuration from the config file with the current runtime database.
+.SH SEE ALSO
+https://github.com/sysown/proxysql/tree/master/doc -- Online documentation
+.SH FILES
+.TP
+.BR /etc/proxysql.cnf
+Configuration file.
+.SH AUTHOR
+Written by René Cannaò.
+.SH BUG REPORTS
+If you find a bug, please report it at <https://github.com/sysown/proxysql/issues>
+.SH COPYRIGHT
+Copyright (C) 2013-2017 René Cannaò.
+This program is free and without warranty.
diff --git a/proxysql.service b/proxysql.service
new file mode 100644
index 0000000..b6b07c7
--- /dev/null
+++ b/proxysql.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=High Performance Advanced Proxy for MySQL
+After=network.target
+
+[Service]
+Type=simple
+User=proxysql
+Group=proxysql
+PermissionsStartOnly=true
+LimitNOFILE=102400
+LimitCORE=1073741824
+ExecStart=/usr/bin/proxysql -f
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/proxysql_debundle_libconfig_libdaemon_sqlite3.patch b/proxysql_debundle_libconfig_libdaemon_sqlite3.patch
new file mode 100644
index 0000000..45b738e
--- /dev/null
+++ b/proxysql_debundle_libconfig_libdaemon_sqlite3.patch
@@ -0,0 +1,132 @@
+# The upstream code bundles 6 libraries: libconfig, libdaemon, sqlite3, re2,
+# mariadb-connector-c and jemalloc.
+# This patch de-bundles 3 of these libraries: libconfig, libdaemon and sqlite3
+# The remaining libraries are not de-bundled due to different reasons (mainly
+# being patched, more info here: https://bugzilla.redhat.com/show_bug.cgi?id=1457929).
+
+diff --git a/deps/Makefile b/deps/Makefile
+index a1912f1..80f9445 100644
+--- a/deps/Makefile
++++ b/deps/Makefile
+@@ -1,17 +1,9 @@
+ 
+ 
+-default: libconfig libdaemon jemalloc mariadb_client re2 sqlite3
++default: jemalloc mariadb_client re2
+ .PHONY: default
+ 
+ 
+-libdaemon/libdaemon/libdaemon/.libs/libdaemon.a: 
+-	cd libdaemon && rm -rf libdaemon-0.14
+-	cd libdaemon && tar -zxf libdaemon-0.14.tar.gz
+-	cd libdaemon/libdaemon && ./configure --disable-examples
+-	cd libdaemon/libdaemon && CC=${CC} CXX=${CXX} ${MAKE}
+-
+-libdaemon: libdaemon/libdaemon/libdaemon/.libs/libdaemon.a
+-
+ jemalloc/jemalloc/lib/libjemalloc.a:
+ 	cd jemalloc && rm -rf jemalloc-4.3.1
+ 	cd jemalloc && tar -jxf jemalloc-4.3.1.tar.bz2
+@@ -40,20 +32,6 @@ mariadb-client-library/mariadb_client/include/my_config.h:
+ mariadb_client: mariadb-client-library/mariadb_client/include/my_config.h
+ 
+ 
+-sqlite3/sqlite3/sqlite3.o:
+-	cd sqlite3/sqlite3 && ${CC} -O2 -c -o sqlite3.o sqlite3.c -DSQLITE_ENABLE_MEMORY_MANAGEMENT
+-
+-sqlite3: sqlite3/sqlite3/sqlite3.o
+-
+-libconfig/libconfig/lib/.libs/libconfig++.a:
+-	cd libconfig && rm -rf libconfig-1.4.9
+-	cd libconfig && tar -zxf libconfig-1.4.9.tar.gz
+-	cd libconfig/libconfig && ./configure --disable-examples
+-	cd libconfig/libconfig && CC=${CC} CXX=${CXX} ${MAKE}
+-
+-libconfig: libconfig/libconfig/lib/.libs/libconfig++.a
+-
+-
+ re2/re2/obj/libre2.a:
+ 	cd re2 && rm -rf re2
+ 	cd re2 && tar -zxf re2-20140304.tgz
+diff --git a/lib/Makefile b/lib/Makefile
+index cdc28d8..f2cd303 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -11,20 +11,15 @@ MARIADB_IDIR=$(MARIADB_PATH)/include
+ JEMALLOC_PATH=$(DEPS_PATH)/jemalloc/jemalloc
+ JEMALLOC_IDIR=$(JEMALLOC_PATH)/include/jemalloc
+ 
+-LIBCONFIG_PATH=$(DEPS_PATH)/libconfig/libconfig-1.4.9
+-LIBCONFIG_IDIR=-I$(LIBCONFIG_PATH)/lib
+-
+ #INJECTION_PATH=$(DEPS_PATH)/libinjection
+ #INJECTION_IDIR=$(INJECTION_PATH)
+ 
+ RE2_PATH=$(DEPS_PATH)/re2/re2
+ RE2_IDIR=$(RE2_PATH)
+ 
+-SQLITE3_DIR=$(DEPS_PATH)/sqlite3/sqlite3
+-
+ IDIR=../include
+ 
+-IDIRS=-I$(IDIR) -I$(JEMALLOC_IDIR) -I$(MARIADB_IDIR) $(LIBCONFIG_IDIR) -I$(RE2_IDIR) -I$(SQLITE3_DIR)
++IDIRS=-I$(IDIR) -I$(JEMALLOC_IDIR) -I$(MARIADB_IDIR) -I$(RE2_IDIR)
+ 
+ LDIRS=-L$(JEMALLOC_PATH)/lib -L$(RE2_PATH)/obj -L$(INJECTION_PATH)
+ 
+@@ -59,8 +54,8 @@ $(ODIR)/%.o: %.c
+ $(ODIR)/%.oo: %.cpp
+ 	$(CXX) -fPIC -c -o $@ $< $(MYCPPFLAGS) $(CPPFLAGS)
+ 
+-libproxysql.a: $(ODIR) $(OBJ) $(OBJ_CPP) $(RE2_PATH)/obj/libre2.a $(SQLITE3_DIR)/sqlite3.o 
+-	ar rcs $@ $(OBJ) $(OBJ_CPP) $(RE2_PATH)/obj/libre2.a $(SQLITE3_DIR)/sqlite3.o
++libproxysql.a: $(ODIR) $(OBJ) $(OBJ_CPP) $(RE2_PATH)/obj/libre2.a
++	ar rcs $@ $(OBJ) $(OBJ_CPP) $(RE2_PATH)/obj/libre2.a
+ 
+ $(ODIR):
+ 	mkdir $(ODIR)
+diff --git a/src/Makefile b/src/Makefile
+index fbe3741..b6c3234 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -9,36 +9,26 @@ MARIADB_IDIR=$(MARIADB_PATH)/include
+ MARIADB_LDIR=$(MARIADB_PATH)/libmariadb
+ 
+ 
+-DAEMONPATH=$(DEPS_PATH)/libdaemon/libdaemon
+-DAEMONPATH_IDIR=$(DAEMONPATH)
+-DAEMONPATH_LDIR=$(DAEMONPATH)/libdaemon/.libs
+-
+ JEMALLOC_PATH=$(DEPS_PATH)/jemalloc/jemalloc
+ JEMALLOC_IDIR=$(JEMALLOC_PATH)/include/jemalloc
+ JEMALLOC_LDIR=$(JEMALLOC_PATH)/lib
+ 
+-LIBCONFIG_PATH=$(DEPS_PATH)/libconfig/libconfig-1.4.9
+-LIBCONFIG_IDIR=-I$(LIBCONFIG_PATH)/lib
+-LIBCONFIG_LDIR=-L$(LIBCONFIG_PATH)/lib/.libs
+-
+ RE2_PATH=$(DEPS_PATH)/re2/re2
+ RE2_IDIR=$(RE2_PATH)
+ 
+-SQLITE3_DIR=$(DEPS_PATH)/sqlite3/sqlite3
+-
+ IDIR=../include
+ LDIR=../lib
+-IDIRS=-I$(IDIR) -I$(JEMALLOC_IDIR) -I$(MARIADB_IDIR) $(LIBCONFIG_IDIR) -I$(DAEMONPATH_IDIR) -I$(SQLITE3_DIR)
+-LDIRS=-L$(LDIR) -L$(JEMALLOC_LDIR) $(LIBCONFIG_LDIR) -L$(RE2_PATH)/obj -L$(MARIADB_LDIR) -L$(DAEMONPATH_LDIR)
++IDIRS=-I$(IDIR) -I$(JEMALLOC_IDIR) -I$(MARIADB_IDIR)
++LDIRS=-L$(LDIR) -L$(JEMALLOC_LDIR) -L$(RE2_PATH)/obj -L$(MARIADB_LDIR)
+ 
+ 
+ MYCPPFLAGS=-std=c++11 $(IDIRS) $(OPTZ) $(DEBUG)
+ LDFLAGS+=
+ NOJEMALLOC := $(shell echo $(NOJEMALLOC))
+ ifeq ($(NOJEMALLOC),1)
+-MYLIBS=-Wl,--export-dynamic -Wl,-Bstatic -lconfig -lproxysql -ldaemon -lconfig++ -lre2 -lmariadbclient -Wl,-Bdynamic -lpthread -lm -lz -lrt -lcrypto -lssl $(EXTRALINK)
++MYLIBS=-Wl,--export-dynamic -Wl,-Bstatic -lproxysql -lre2 -lmariadbclient -Wl,-Bdynamic -lconfig -lconfig++ -ldaemon -lsqlite3 -lpthread -lm -lz -lrt -lcrypto -lssl $(EXTRALINK)
+ else
+-MYLIBS=-Wl,--export-dynamic -Wl,-Bstatic -lconfig -lproxysql -ldaemon -ljemalloc -lconfig++ -lre2 -lmariadbclient -Wl,-Bdynamic -lpthread -lm -lz -lrt -lcrypto -lssl $(EXTRALINK)
++MYLIBS=-Wl,--export-dynamic -Wl,-Bstatic -lproxysql -ljemalloc -lre2 -lmariadbclient -Wl,-Bdynamic -lconfig -lconfig++ -ldaemon -lsqlite3 -lpthread -lm -lz -lrt -lcrypto -lssl $(EXTRALINK)
+ endif
+ 
+ UNAME_S := $(shell uname -s)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/proxysql.git/commitdiff/d42a0ad952332a41d39e850953ff6d1c0216380e



More information about the pld-cvs-commit mailing list