2022-08-21 13:32:41 +00:00
|
|
|
diff --git a/Makefile b/Makefile
|
2023-08-22 20:05:09 +00:00
|
|
|
index f8902b4f..57844bd7 100644
|
2021-12-06 16:07:01 +00:00
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
2023-07-15 17:15:38 +00:00
|
|
|
@@ -59,11 +59,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-08-22 20:05:09 +00:00
|
|
|
@@ -303,16 +299,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-08-22 20:05:09 +00:00
|
|
|
index 710e070b..fd1352f6 100644
|
2021-12-06 16:07:01 +00:00
|
|
|
--- a/deps/Makefile
|
|
|
|
+++ b/deps/Makefile
|
2023-07-15 17:15:38 +00:00
|
|
|
@@ -69,10 +69,7 @@ default: $(tmpdefault)
|
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)
|
2023-08-22 20:05:09 +00:00
|
|
|
@@ -86,11 +83,7 @@ libinjection: libinjection/libinjection/src/libinjection.a
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
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
|
2023-08-22 20:05:09 +00:00
|
|
|
cd libssl && ./verify-bio_st-match.sh
|
|
|
|
-# 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
|
2022-08-21 13:32:41 +00:00
|
|
|
cd libssl/openssl && ./config no-ssl3 no-tests
|
2023-08-22 20:05:09 +00:00
|
|
|
cd libssl/openssl && CC=${CC} CXX=${CXX} ${MAKE}
|
|
|
|
cd libssl/openssl && ln -s . lib # curl wants this path
|
|
|
|
@@ -108,8 +101,6 @@ ifeq ($(MIN_VERSION),$(lastword $(SORTED_VERSIONS)))
|
2023-05-24 13:37:59 +00:00
|
|
|
endif
|
2021-12-06 16:07:01 +00:00
|
|
|
|
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
|
2023-03-24 00:07:29 +00:00
|
|
|
- cd libhttpserver && tar -zxf libhttpserver-*.tar.gz
|
2023-05-24 13:37:59 +00:00
|
|
|
#ifeq ($(REQUIRE_PATCH), true)
|
2023-03-24 00:07:29 +00:00
|
|
|
cd libhttpserver/libhttpserver && patch -p1 < ../noexcept.patch
|
|
|
|
cd libhttpserver/libhttpserver && patch -p1 < ../re2_regex.patch
|
2023-08-22 20:05:09 +00:00
|
|
|
@@ -127,8 +118,6 @@ libhttpserver: libhttpserver/libhttpserver/build/src/.libs/libhttpserver.a
|
2023-03-24 00:07:29 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
libev/libev/.libs/libev.a:
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd libev && rm -rf libev-*/ || true
|
2023-03-24 00:07:29 +00:00
|
|
|
- cd libev && tar -zxf libev-*.tar.gz
|
2023-05-24 13:37:59 +00:00
|
|
|
cd libev/libev && patch ev.c < ../ev.c-multiplication-overflow.patch
|
2023-03-24 00:07:29 +00:00
|
|
|
cd libev/libev && ./configure
|
2021-12-06 16:07:01 +00:00
|
|
|
cd libev/libev && CC=${CC} CXX=${CXX} ${MAKE}
|
2023-08-22 20:05:09 +00:00
|
|
|
@@ -144,8 +133,6 @@ coredumper/coredumper/src/libcoredumper.a:
|
2023-07-15 17:15:38 +00:00
|
|
|
coredumper: coredumper/coredumper/src/libcoredumper.a
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
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
|
2023-03-24 00:07:29 +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}
|
|
|
|
cd curl/curl && autoreconf -fi
|
2023-07-15 17:15:38 +00:00
|
|
|
ifeq ($(UNAME_S),Darwin)
|
2023-08-22 20:05:09 +00:00
|
|
|
@@ -157,16 +144,6 @@ curl: curl/curl/lib/.libs/libcurl.a
|
2023-03-24 00:07:29 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
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
|
2023-03-24 00:07:29 +00:00
|
|
|
- cd libmicrohttpd && ln -s libmicrohttpd-0.9.75 libmicrohttpd
|
|
|
|
- cd libmicrohttpd && tar -zxf libmicrohttpd-0.9.75.tar.gz
|
|
|
|
-# cd libmicrohttpd/libmicrohttpd && patch src/microhttpd/connection.c < ../connection.c-snprintf-overflow.patch
|
2021-12-06 16:07:01 +00:00
|
|
|
-endif
|
2023-07-15 17:15:38 +00:00
|
|
|
cd libmicrohttpd/libmicrohttpd && ./configure --enable-https && CC=${CC} CXX=${CXX} ${MAKE}
|
|
|
|
|
|
|
|
microhttpd: libmicrohttpd/libmicrohttpd/src/microhttpd/.libs/libmicrohttpd.a
|
2023-08-22 20:05:09 +00:00
|
|
|
@@ -182,8 +159,6 @@ cityhash: cityhash/cityhash/src/.libs/libcityhash.a
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
lz4/lz4/lib/liblz4.a:
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd lz4 && rm -rf lz4-*/ || true
|
2023-03-24 00:07:29 +00:00
|
|
|
- cd lz4 && tar -zxf lz4-*.tar.gz
|
2021-12-06 16:07:01 +00:00
|
|
|
cd lz4/lz4 && CC=${CC} CXX=${CXX} ${MAKE}
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
lz4: lz4/lz4/lib/liblz4.a
|
2023-08-22 20:05:09 +00:00
|
|
|
@@ -209,8 +184,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-08-22 20:05:09 +00:00
|
|
|
cd libdaemon/libdaemon && patch -p0 < ../daemon_fork_umask.patch
|
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-08-22 20:05:09 +00:00
|
|
|
@@ -299,8 +272,6 @@ sqlite3: sqlite3/sqlite3/sqlite3.o
|
2023-03-24 00:07:29 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
libconfig/libconfig/lib/.libs/libconfig++.a:
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd libconfig && rm -rf libconfig-*/ || true
|
2023-03-24 00:07:29 +00:00
|
|
|
- cd libconfig && tar -zxf libconfig-*.tar.gz
|
2021-12-06 16:07:01 +00:00
|
|
|
cd libconfig/libconfig && ./configure --disable-examples
|
|
|
|
cd libconfig/libconfig && CC=${CC} CXX=${CXX} ${MAKE}
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
@@ -308,9 +279,6 @@ libconfig: libconfig/libconfig/lib/.libs/libconfig++.a
|
2023-03-24 00:07:29 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
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
|
2023-03-24 00:07:29 +00:00
|
|
|
- cd prometheus-cpp && tar -zxf prometheus-cpp-*.tar.gz
|
|
|
|
- cd prometheus-cpp && tar --strip-components=1 -zxf civetweb-*.tar.gz -C prometheus-cpp/3rdparty/civetweb
|
2021-12-06 16:07:01 +00:00
|
|
|
cd prometheus-cpp/prometheus-cpp && patch -p1 < ../serial_exposer.patch
|
2023-03-24 00:07:29 +00:00
|
|
|
cd prometheus-cpp/prometheus-cpp && patch -p1 < ../registry_counters_reset.patch
|
|
|
|
cd prometheus-cpp/prometheus-cpp && patch -p1 < ../fix_old_distros.patch
|
2023-08-22 20:05:09 +00:00
|
|
|
@@ -321,10 +289,6 @@ prometheus-cpp: prometheus-cpp/prometheus-cpp/lib/libprometheus-cpp-core.a
|
2023-03-24 00:07:29 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
re2/re2/obj/libre2.a:
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd re2 && rm -rf re2-*/ || true
|
2023-03-24 00:07:29 +00:00
|
|
|
- cd re2 && tar -zxf re2-*.tar.gz
|
2021-12-06 16:07:01 +00:00
|
|
|
-# 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
|
2023-05-24 13:37:59 +00:00
|
|
|
cd re2/re2 && patch re2/onepass.cc < ../onepass.cc-multiplication-overflow.patch
|
2023-02-09 11:40:11 +00:00
|
|
|
ifeq ($(UNAME_S),Darwin)
|
2023-03-24 00:07:29 +00:00
|
|
|
cd re2/re2 && sed -i '' -e 's/-O3 -g/-O3 -g -std=c++11 -fPIC -DMEMORY_SANITIZER -DRE2_ON_VALGRIND /' Makefile
|
2023-08-22 20:05:09 +00:00
|
|
|
@@ -339,8 +303,6 @@ re2: re2/re2/obj/libre2.a
|
2023-03-24 00:07:29 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
pcre/pcre/.libs/libpcre.a:
|
2022-08-21 13:32:41 +00:00
|
|
|
- cd pcre && rm -rf pcre-*/ || true
|
2023-03-24 00:07:29 +00:00
|
|
|
- cd pcre && tar -zxf pcre-*.tar.gz
|
2023-05-24 13:37:59 +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}
|