2022-08-21 13:32:41 +00:00
|
|
|
diff --git a/Makefile b/Makefile
|
2023-02-09 11:40:11 +00:00
|
|
|
index e7dae058..09c28859 100644
|
2021-12-06 16:07:01 +00:00
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
2022-08-21 13:32:41 +00:00
|
|
|
@@ -57,11 +57,7 @@ endif
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
export MAKEOPT=-j ${NPROCS}
|
|
|
|
|
|
|
|
-ifeq ($(wildcard /usr/lib/systemd/system), /usr/lib/systemd/system)
|
|
|
|
- SYSTEMD=1
|
|
|
|
-else
|
|
|
|
- SYSTEMD=0
|
|
|
|
-endif
|
|
|
|
+SYSTEMD=1
|
|
|
|
USERCHECK := $(shell getent passwd proxysql)
|
|
|
|
GROUPCHECK := $(shell getent group proxysql)
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
@@ -784,16 +780,10 @@ cleanbuild:
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
.PHONY: install
|
|
|
|
install: src/proxysql
|
|
|
|
- install -m 0755 src/proxysql /usr/bin
|
|
|
|
- install -m 0600 etc/proxysql.cnf /etc
|
|
|
|
- if [ ! -d /var/lib/proxysql ]; then mkdir /var/lib/proxysql ; fi
|
|
|
|
-ifeq ($(findstring proxysql,$(USERCHECK)),)
|
|
|
|
- @echo "Creating proxysql user and group"
|
|
|
|
- useradd -r -U -s /bin/false proxysql
|
|
|
|
-endif
|
|
|
|
+ install -m 0755 src/proxysql $(out)/bin
|
|
|
|
+ install -m 0600 etc/proxysql.cnf $(out)/etc
|
|
|
|
ifeq ($(SYSTEMD), 1)
|
|
|
|
- install -m 0644 systemd/system/proxysql.service /usr/lib/systemd/system/
|
|
|
|
- systemctl enable proxysql.service
|
|
|
|
+ install -m 0644 systemd/system/proxysql.service $(out)/lib/systemd/system/
|
|
|
|
else
|
|
|
|
install -m 0755 etc/init.d/proxysql /etc/init.d
|
|
|
|
ifeq ($(DISTRO),"CentOS Linux")
|
2022-08-21 13:32:41 +00:00
|
|
|
diff --git a/deps/Makefile b/deps/Makefile
|
2023-02-09 11:40:11 +00:00
|
|
|
index 23ef204c..3fbcc4a7 100644
|
2021-12-06 16:07:01 +00:00
|
|
|
--- a/deps/Makefile
|
|
|
|
+++ b/deps/Makefile
|
2023-02-09 11:40:11 +00:00
|
|
|
@@ -65,10 +65,7 @@ endif
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
libinjection/libinjection/src/libinjection.a:
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd libinjection && rm -rf libinjection-*/ || true
|
2021-12-06 16:07:01 +00:00
|
|
|
- cd libinjection && tar -zxf libinjection-3.10.0.tar.gz
|
2023-02-09 11:40:11 +00:00
|
|
|
ifneq ($(CENTOSVER),6)
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd libinjection/libinjection && patch -p1 < ../update-build-py3.diff
|
2023-02-09 11:40:11 +00:00
|
|
|
cd libinjection/libinjection && patch -p1 < ../libinjection_sqli.c.patch
|
|
|
|
endif
|
|
|
|
ifeq ($(UNAME_S),Darwin)
|
|
|
|
@@ -80,8 +77,6 @@ endif
|
2021-12-06 16:07:01 +00:00
|
|
|
libinjection: libinjection/libinjection/src/libinjection.a
|
|
|
|
|
|
|
|
libssl/openssl/libssl.a:
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd libssl && rm -rf openssl-openssl-*/ openssl-3*/ || true
|
|
|
|
- cd libssl && tar -zxf openssl-*.tar.gz
|
|
|
|
cd libssl/openssl && patch crypto/ec/curve448/curve448.c < ../curve448.c-multiplication-overflow.patch
|
|
|
|
cd libssl/openssl && patch crypto/asn1/a_time.c < ../a_time.c-multiplication-overflow.patch
|
|
|
|
cd libssl/openssl && ./config no-ssl3 no-tests
|
2023-02-09 11:40:11 +00:00
|
|
|
@@ -99,9 +94,6 @@ ifeq ($(MIN_VERSION),$(lastword $(SORTED_VERSIONS)))
|
2021-12-06 16:07:01 +00:00
|
|
|
endif
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
libhttpserver/libhttpserver/build/src/.libs/libhttpserver.a: libmicrohttpd/libmicrohttpd/src/microhttpd/.libs/libmicrohttpd.a re2/re2/obj/libre2.a
|
|
|
|
- cd libhttpserver && rm -rf libhttpserver-*/ || true
|
2021-12-06 16:07:01 +00:00
|
|
|
- cd libhttpserver && tar -zxf libhttpserver-0.18.1.tar.gz
|
2023-02-09 11:40:11 +00:00
|
|
|
-#ifeq ($(REQUIRE_PATCH), true)
|
2021-12-06 16:07:01 +00:00
|
|
|
cd libhttpserver/libhttpserver && patch src/httpserver/basic_auth_fail_response.hpp < ../basic_auth_fail_response.hpp.patch
|
|
|
|
cd libhttpserver/libhttpserver && patch src/httpserver/create_webserver.hpp < ../create_webserver.hpp.patch
|
2023-02-09 11:40:11 +00:00
|
|
|
cd libhttpserver/libhttpserver && patch src/httpserver/deferred_response.hpp < ../deferred_response.hpp.patch
|
|
|
|
@@ -112,7 +104,6 @@ libhttpserver/libhttpserver/build/src/.libs/libhttpserver.a: libmicrohttpd/libmi
|
|
|
|
cd libhttpserver/libhttpserver && patch src/httpserver/http_response.hpp < ../http_response.hpp.patch
|
|
|
|
cd libhttpserver/libhttpserver && patch src/httpserver/string_response.hpp < ../string_response.hpp.patch
|
|
|
|
cd libhttpserver/libhttpserver && patch -p0 < ../re2_regex.patch
|
|
|
|
-#endif
|
|
|
|
cd libhttpserver/libhttpserver && patch -p0 < ../final_val_post_process.patch
|
|
|
|
cd libhttpserver/libhttpserver && patch -p0 < ../empty_uri_log_crash.patch
|
|
|
|
ifeq ($(UNAME_S),FreeBSD)
|
|
|
|
@@ -124,35 +115,17 @@ endif
|
2021-12-06 16:07:01 +00:00
|
|
|
libhttpserver: libhttpserver/libhttpserver/build/src/.libs/libhttpserver.a
|
|
|
|
|
|
|
|
libev/libev/.libs/libev.a:
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd libev && rm -rf libev-*/ || true
|
2021-12-06 16:07:01 +00:00
|
|
|
- cd libev && tar -zxf libev-4.24.tar.gz
|
2022-08-21 13:32:41 +00:00
|
|
|
cd libev/libev && patch ev.c < ../ev.c-multiplication-overflow.patch
|
2021-12-06 16:07:01 +00:00
|
|
|
cd libev/libev && ./configure
|
|
|
|
cd libev/libev && CC=${CC} CXX=${CXX} ${MAKE}
|
|
|
|
ev: libev/libev/.libs/libev.a
|
|
|
|
|
|
|
|
curl/curl/lib/.libs/libcurl.a: libssl/openssl/libssl.a
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd curl && rm -rf curl-*/ || true
|
|
|
|
- cd curl && tar -zxf curl-*.tar.gz
|
2021-12-06 16:07:01 +00:00
|
|
|
- #cd curl/curl && ./configure --disable-debug --disable-ftp --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --disable-manual --disable-ipv6 --disable-sspi --disable-crypto-auth --disable-ntlm-wb --disable-tls-srp --without-nghttp2 --without-libidn2 --without-libssh2 --without-brotli --with-ssl=$(shell pwd)/../../libssl/openssl/ && CC=${CC} CXX=${CXX} ${MAKE}
|
2023-02-09 11:40:11 +00:00
|
|
|
cd curl/curl && patch configure < ../configure.patch
|
2022-08-21 13:32:41 +00:00
|
|
|
cd curl/curl && CFLAGS=-fPIC ./configure --disable-debug --disable-ftp --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --disable-manual --disable-ipv6 --disable-sspi --disable-ntlm-wb --disable-tls-srp --without-nghttp2 --without-libidn2 --without-libssh2 --without-brotli --without-librtmp --without-libpsl --without-zstd --with-ssl=$(shell pwd)/libssl/openssl/ --enable-shared=no && CC=${CC} CXX=${CXX} ${MAKE}
|
2021-12-06 16:07:01 +00:00
|
|
|
curl: curl/curl/lib/.libs/libcurl.a
|
|
|
|
|
|
|
|
libmicrohttpd/libmicrohttpd/src/microhttpd/.libs/libmicrohttpd.a:
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd libmicrohttpd && rm -rf libmicrohttpd-*/ || true
|
2021-12-06 16:07:01 +00:00
|
|
|
- cd libmicrohttpd && rm -f libmicrohttpd || true
|
|
|
|
-ifeq ($(CENTOSVER),6)
|
|
|
|
- cd libmicrohttpd && ln -s libmicrohttpd-0.9.55 libmicrohttpd
|
|
|
|
- cd libmicrohttpd && tar -zxf libmicrohttpd-0.9.55.tar.gz
|
|
|
|
-else
|
|
|
|
- cd libmicrohttpd && ln -s libmicrohttpd-0.9.68 libmicrohttpd
|
|
|
|
- cd libmicrohttpd && tar -zxf libmicrohttpd-0.9.68.tar.gz
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd libmicrohttpd/libmicrohttpd && patch src/microhttpd/connection.c < ../connection.c-snprintf-overflow.patch
|
2021-12-06 16:07:01 +00:00
|
|
|
-endif
|
2023-02-09 11:40:11 +00:00
|
|
|
-ifeq ($(UNAME_S),Darwin)
|
2021-12-06 16:07:01 +00:00
|
|
|
- cd libmicrohttpd/libmicrohttpd && patch src/microhttpd/mhd_sockets.c < ../mhd_sockets.c-issue-5977.patch
|
|
|
|
-endif
|
|
|
|
cd libmicrohttpd/libmicrohttpd && ./configure --enable-https && CC=${CC} CXX=${CXX} ${MAKE}
|
|
|
|
microhttpd: libmicrohttpd/libmicrohttpd/src/microhttpd/.libs/libmicrohttpd.a
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
@@ -163,8 +136,6 @@ cityhash/cityhash/src/.libs/libcityhash.a:
|
2021-12-06 16:07:01 +00:00
|
|
|
cityhash: cityhash/cityhash/src/.libs/libcityhash.a
|
|
|
|
|
|
|
|
lz4/lz4/liblz4.a:
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd lz4 && rm -rf lz4-*/ || true
|
2021-12-06 16:07:01 +00:00
|
|
|
- cd lz4 && tar -zxf lz4-1.7.5.tar.gz
|
|
|
|
cd lz4/lz4 && CC=${CC} CXX=${CXX} ${MAKE}
|
|
|
|
lz4: lz4/lz4/liblz4.a
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
@@ -189,8 +160,6 @@ clickhouse-cpp: clickhouse-cpp/clickhouse-cpp/clickhouse/libclickhouse-cpp-lib-s
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
libdaemon/libdaemon/libdaemon/.libs/libdaemon.a:
|
|
|
|
- cd libdaemon && rm -rf libdaemon-*/ || true
|
2021-12-06 16:07:01 +00:00
|
|
|
- cd libdaemon && tar -zxf libdaemon-0.14.tar.gz
|
2023-02-09 11:40:11 +00:00
|
|
|
cd libdaemon/libdaemon && cp ../config.guess . && chmod +x config.guess && cp ../config.sub . && chmod +x config.sub && ./configure --disable-examples
|
2021-12-06 16:07:01 +00:00
|
|
|
cd libdaemon/libdaemon && CC=${CC} CXX=${CXX} ${MAKE}
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
@@ -264,17 +233,12 @@ sqlite3/sqlite3/sqlite3.o:
|
2021-12-06 16:07:01 +00:00
|
|
|
sqlite3: sqlite3/sqlite3/sqlite3.o
|
|
|
|
|
|
|
|
libconfig/libconfig/lib/.libs/libconfig++.a:
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd libconfig && rm -rf libconfig-*/ || true
|
2021-12-06 16:07:01 +00:00
|
|
|
- cd libconfig && tar -zxf libconfig-1.7.2.tar.gz
|
|
|
|
cd libconfig/libconfig && ./configure --disable-examples
|
|
|
|
cd libconfig/libconfig && CC=${CC} CXX=${CXX} ${MAKE}
|
|
|
|
|
|
|
|
libconfig: libconfig/libconfig/lib/.libs/libconfig++.a
|
|
|
|
|
|
|
|
prometheus-cpp/prometheus-cpp/lib/libprometheus-cpp-core.a:
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd prometheus-cpp && rm -rf prometheus-cpp-*/ || true
|
2021-12-06 16:07:01 +00:00
|
|
|
- cd prometheus-cpp && tar -zxf v0.9.0.tar.gz
|
|
|
|
- cd prometheus-cpp && tar --strip-components=1 -zxf civetweb-v1.11.tar.gz -C prometheus-cpp/3rdparty/civetweb
|
|
|
|
cd prometheus-cpp/prometheus-cpp && patch -p1 < ../serial_exposer.patch
|
|
|
|
cd prometheus-cpp/prometheus-cpp && patch -p0 < ../registry_counters_reset.patch
|
2022-08-21 13:32:41 +00:00
|
|
|
cd prometheus-cpp/prometheus-cpp && patch -p0 < ../include_limits.patch
|
2023-02-09 11:40:11 +00:00
|
|
|
@@ -284,10 +248,6 @@ prometheus-cpp/prometheus-cpp/lib/libprometheus-cpp-core.a:
|
2021-12-06 16:07:01 +00:00
|
|
|
prometheus-cpp: prometheus-cpp/prometheus-cpp/lib/libprometheus-cpp-core.a
|
|
|
|
|
|
|
|
re2/re2/obj/libre2.a:
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd re2 && rm -rf re2-*/ || true
|
2021-12-06 16:07:01 +00:00
|
|
|
- cd re2 && tar -zxf re2.tar.gz
|
|
|
|
-# cd re2/re2 && sed -i -e 's/-O3 -g /-O3 -fPIC /' Makefile
|
2022-08-21 13:32:41 +00:00
|
|
|
-# cd re2/re2 && patch util/mutex.h < ../mutex.h.patch
|
|
|
|
cd re2/re2 && patch re2/onepass.cc < ../onepass.cc-multiplication-overflow.patch
|
2023-02-09 11:40:11 +00:00
|
|
|
ifeq ($(UNAME_S),Darwin)
|
|
|
|
cd re2/re2 && sed -i '' -e 's/-O3 /-O3 -fPIC -DMEMORY_SANITIZER -DRE2_ON_VALGRIND /' Makefile
|
|
|
|
@@ -301,8 +261,6 @@ endif
|
2021-12-06 16:07:01 +00:00
|
|
|
re2: re2/re2/obj/libre2.a
|
|
|
|
|
|
|
|
pcre/pcre/.libs/libpcre.a:
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd pcre && rm -rf pcre-*/ || true
|
2021-12-06 16:07:01 +00:00
|
|
|
- cd pcre && tar -zxf pcre-8.44.tar.gz
|
2022-08-21 13:32:41 +00:00
|
|
|
cd pcre/pcre && patch pcretest.c < ../pcretest.c-multiplication-overflow.patch
|
2021-12-06 16:07:01 +00:00
|
|
|
cd pcre/pcre && ./configure
|
|
|
|
cd pcre/pcre && CC=${CC} CXX=${CXX} ${MAKE}
|