proxysql: 2.7.1 -> 3.0.1

changelog: https://github.com/sysown/proxysql/releases/tag/v3.0.1

+74 -50
+59 -41
pkgs/by-name/pr/proxysql/makefiles.patch
··· 1 1 diff --git a/Makefile b/Makefile 2 - index dd6b8c44..7a703858 100644 2 + index b9ad6f71..60e71a86 100644 3 3 --- a/Makefile 4 4 +++ b/Makefile 5 - @@ -73,10 +73,7 @@ endif 5 + @@ -81,10 +81,7 @@ endif 6 6 export MAKEOPT := -j${NPROCS} 7 7 8 8 ### systemd ··· 14 14 15 15 ### check user/group 16 16 USERCHECK := $(shell getent passwd proxysql) 17 - @@ -238,7 +235,7 @@ build_tap_test_debug: build_tap_tests_debug 18 - build_tap_tests_debug: build_src_debug 19 - cd test/tap && OPTZ="${O0} -ggdb -DDEBUG" CC=${CC} CXX=${CXX} ${MAKE} debug 20 - 21 - -# ClickHouse build targets are now default build targets. 22 - +# ClickHouse build targets are now default build targets. 23 - # To maintain backward compatibility, ClickHouse targets are still available. 24 - .PHONY: build_deps_clickhouse 25 - build_deps_clickhouse: build_deps_default 26 - @@ -382,16 +379,10 @@ cleanbuild: 17 + @@ -415,16 +412,10 @@ cleanbuild: 27 18 28 19 .PHONY: install 29 20 install: src/proxysql ··· 44 35 install -m 0755 etc/init.d/proxysql /etc/init.d 45 36 ifeq ($(DISTRO),"CentOS Linux") 46 37 diff --git a/deps/Makefile b/deps/Makefile 47 - index 25bcc603..8fafc224 100644 38 + index 7c8fcc85..4ae0aba1 100644 48 39 --- a/deps/Makefile 49 40 +++ b/deps/Makefile 50 - @@ -54,10 +54,7 @@ default: $(targets) 41 + @@ -61,27 +61,22 @@ default: $(targets) 51 42 ### deps targets 52 43 53 44 libinjection/libinjection/src/libinjection.a: ··· 57 48 - cd libinjection/libinjection && patch -p1 < ../update-build-py3.diff 58 49 cd libinjection/libinjection && patch -p1 < ../libinjection_sqli.c.patch 59 50 endif 60 - ifeq ($(SYS_KERN),Darwin) 61 - @@ -71,11 +68,7 @@ libinjection: libinjection/libinjection/src/libinjection.a 62 - 51 + ifeq ($(UNAME_S),Darwin) 52 + sed -i '' 's/CC=/CC?=/' libinjection/libinjection/src/Makefile 53 + else 54 + sed -i -e 's/CC=/CC?=/' libinjection/libinjection/src/Makefile 55 + endif 56 + cd libinjection/libinjection && CC=${CC} CXX=${CXX} ${MAKE} 63 57 64 - libssl/openssl/libssl.a: 65 - - cd libssl && rm -rf openssl-openssl-*/ openssl-3*/ || true 66 - - cd libssl && tar -zxf openssl-*.tar.gz 67 - cd libssl && ./verify-bio_st-match.sh 68 - -# cd libssl/openssl && patch crypto/ec/curve448/curve448.c < ../curve448.c-multiplication-overflow.patch 69 - -# cd libssl/openssl && patch crypto/asn1/a_time.c < ../a_time.c-multiplication-overflow.patch 70 - cd libssl/openssl && ./config no-ssl3 no-tests 71 - cd libssl/openssl && CC=${CC} CXX=${CXX} ${MAKE} 72 - cd libssl/openssl && ln -fs ./ lib # curl wants this path 73 - @@ -84,8 +77,6 @@ libssl: libssl/openssl/libssl.a 58 + libinjection: libinjection/libinjection/src/libinjection.a 74 59 60 + include ../common_mk/openssl_flags.mk 61 + include ../common_mk/openssl_version_check.mk 75 62 76 63 libhttpserver/libhttpserver/build/src/.libs/libhttpserver.a: libmicrohttpd/libmicrohttpd/src/microhttpd/.libs/libmicrohttpd.a re2/re2/obj/libre2.a 77 64 - cd libhttpserver && rm -rf libhttpserver-*/ || true ··· 79 66 cd libhttpserver/libhttpserver && patch -p1 < ../noexcept.patch 80 67 cd libhttpserver/libhttpserver && patch -p1 < ../re2_regex.patch 81 68 cd libhttpserver/libhttpserver && patch -p1 < ../final_val_post_process.patch 82 - @@ -103,8 +94,6 @@ libhttpserver: libhttpserver/libhttpserver/build/src/.libs/libhttpserver.a 69 + @@ -99,58 +94,49 @@ libhttpserver: libhttpserver/libhttpserver/build/src/.libs/libhttpserver.a 83 70 84 71 85 72 libev/libev/.libs/libev.a: ··· 88 75 cd libev/libev && patch ev.c < ../ev.c-multiplication-overflow.patch 89 76 cd libev/libev && ./configure 90 77 cd libev/libev && CC=${CC} CXX=${CXX} ${MAKE} 91 - @@ -121,8 +110,6 @@ coredumper/coredumper/src/libcoredumper.a: 78 + 79 + ev: libev/libev/.libs/libev.a 80 + 81 + 82 + coredumper/coredumper/src/libcoredumper.a: 83 + cd coredumper && rm -rf coredumper-*/ || true 84 + cd coredumper && tar -zxf coredumper-*.tar.gz 85 + cd coredumper/coredumper && patch -p1 < ../includes.patch 86 + cd coredumper/coredumper && cmake . -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Debug 87 + cd coredumper/coredumper && CC=${CC} CXX=${CXX} ${MAKE} 92 88 coredumper: coredumper/coredumper/src/libcoredumper.a 93 89 94 - curl/curl/lib/.libs/libcurl.a: libssl/openssl/libssl.a 90 + curl/curl/lib/.libs/libcurl.a: 95 91 - cd curl && rm -rf curl-*/ || true 96 92 - cd curl && tar -zxf curl-*.tar.gz 97 93 # 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} 98 94 cd curl/curl && autoreconf -fi 99 - ifeq ($(SYS_KERN),Darwin) 100 - @@ -134,9 +121,6 @@ curl: curl/curl/lib/.libs/libcurl.a 95 + ifeq ($(UNAME_S),Darwin) 96 + cd curl/curl && patch configure < ../configure.patch 97 + endif 98 + cd curl/curl && CPPFLAGS="-I$(SSL_IDIR)" LDFLAGS="$(LIB_SSL_PATH) $(LIB_CRYPTO_PATH)" ./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 --enable-shared=yes 99 + cd curl/curl && CFLAGS=-fPIC CC=${CC} CXX=${CXX} ${MAKE} 100 + 101 + curl: curl/curl/lib/.libs/libcurl.a 101 102 102 103 103 104 libmicrohttpd/libmicrohttpd/src/microhttpd/.libs/libmicrohttpd.a: ··· 107 108 cd libmicrohttpd/libmicrohttpd && ./configure --enable-https && CC=${CC} CXX=${CXX} ${MAKE} 108 109 109 110 microhttpd: libmicrohttpd/libmicrohttpd/src/microhttpd/.libs/libmicrohttpd.a 110 - @@ -152,8 +136,6 @@ cityhash: cityhash/cityhash/src/.libs/libcityhash.a 111 + 112 + 113 + cityhash/cityhash/src/.libs/libcityhash.a: 114 + cd cityhash && rm -rf cityhash-*/ || true 115 + cd cityhash && tar -zxf cityhash-*.tar.gz 116 + cd cityhash/cityhash && cp ../config.guess . && chmod +x config.guess && cp ../config.sub . && chmod +x config.sub 117 + cd cityhash/cityhash && ./configure && CC=${CC} CXX=${CXX} ${MAKE} 118 + 119 + cityhash: cityhash/cityhash/src/.libs/libcityhash.a 111 120 112 121 113 122 lz4/lz4/lib/liblz4.a: ··· 116 125 cd lz4/lz4 && CC=${CC} CXX=${CXX} ${MAKE} 117 126 118 127 lz4: lz4/lz4/lib/liblz4.a 119 - @@ -171,8 +153,6 @@ clickhouse-cpp: clickhouse-cpp/clickhouse-cpp/clickhouse/libclickhouse-cpp-lib-s 128 + @@ -168,8 +154,6 @@ clickhouse-cpp: clickhouse-cpp/clickhouse-cpp/clickhouse/libclickhouse-cpp-lib-s 120 129 121 130 122 131 libdaemon/libdaemon/libdaemon/.libs/libdaemon.a: ··· 125 134 cd libdaemon/libdaemon && patch -p0 < ../daemon_fork_umask.patch 126 135 cd libdaemon/libdaemon && cp ../config.guess . && chmod +x config.guess && cp ../config.sub . && chmod +x config.sub && ./configure --disable-examples 127 136 cd libdaemon/libdaemon && CC=${CC} CXX=${CXX} ${MAKE} 128 - @@ -256,8 +236,6 @@ sqlite3: sqlite3/sqlite3/sqlite3.o 129 - 137 + @@ -253,18 +237,13 @@ sqlite3/sqlite3/sqlite3.o: 138 + sqlite3: sqlite3/sqlite3/sqlite3.o 130 139 131 140 libconfig/libconfig/lib/.libs/libconfig++.a: 132 141 - cd libconfig && rm -rf libconfig-*/ || true ··· 134 143 cd libconfig/libconfig && ./configure --disable-examples 135 144 cd libconfig/libconfig && CC=${CC} CXX=${CXX} ${MAKE} 136 145 137 - @@ -265,9 +243,6 @@ libconfig: libconfig/libconfig/lib/.libs/libconfig++.a 146 + libconfig: libconfig/libconfig/lib/.libs/libconfig++.a 138 147 139 148 140 149 prometheus-cpp/prometheus-cpp/lib/libprometheus-cpp-core.a: ··· 144 153 cd prometheus-cpp/prometheus-cpp && patch -p1 < ../serial_exposer.patch 145 154 cd prometheus-cpp/prometheus-cpp && patch -p1 < ../registry_counters_reset.patch 146 155 cd prometheus-cpp/prometheus-cpp && patch -p1 < ../fix_old_distros.patch 147 - @@ -296,8 +271,6 @@ re2: re2/re2/obj/libre2.a 156 + @@ -293,17 +272,13 @@ re2: re2/re2/obj/libre2.a 148 157 149 158 150 159 pcre/pcre/.libs/libpcre.a: ··· 153 162 cd pcre/pcre && patch pcretest.c < ../pcretest.c-multiplication-overflow.patch 154 163 cd pcre/pcre && ./configure 155 164 cd pcre/pcre && CC=${CC} CXX=${CXX} ${MAKE} 156 - @@ -334,4 +307,3 @@ cleanall: 157 - cd cityhash && rm -rf cityhash-*/ || true 158 - cd coredumper && rm -rf coredumper-*/ || true 165 + 166 + pcre: pcre/pcre/.libs/libpcre.a 167 + 168 + postgresql/postgresql/src/interfaces/libpq/libpq.a: 169 + - cd postgresql && rm -rf postgresql-*/ || true 170 + - cd postgresql && tar -zxf postgresql-*.tar.gz 171 + cd postgresql/postgresql && patch -p0 < ../get_result_from_pgconn.patch 172 + cd postgresql/postgresql && patch -p0 < ../handle_row_data.patch 173 + #cd postgresql/postgresql && LD_LIBRARY_PATH="$(shell pwd)/libssl/openssl" ./configure --with-ssl=openssl --with-includes="$(shell pwd)/libssl/openssl/include/" --with-libraries="$(shell pwd)/libssl/openssl/" --without-readline --enable-debug CFLAGS="-ggdb -O0 -fno-omit-frame-pointer" CPPFLAGS="-g -O0" 174 + @@ -360,4 +335,3 @@ cleanall: 175 + cd libusual && rm -rf libusual-*/ || true 176 + cd libscram && rm -rf lib/* obj/* || true 159 177 .PHONY: cleanall 160 178 -
+15 -9
pkgs/by-name/pr/proxysql/package.nix
··· 7 7 automake, 8 8 bison, 9 9 cmake, 10 + pkg-config, 10 11 libtool, 11 12 civetweb, 12 13 coreutils, ··· 29 30 prometheus-cpp, 30 31 zlib, 31 32 texinfo, 33 + postgresql_16, 34 + icu, 35 + libevent, 32 36 }: 33 37 34 38 stdenv.mkDerivation (finalAttrs: { 35 39 pname = "proxysql"; 36 - version = "2.7.1"; 40 + version = "3.0.1"; 37 41 38 42 src = fetchFromGitHub { 39 43 owner = "sysown"; 40 44 repo = "proxysql"; 41 - rev = finalAttrs.version; 42 - hash = "sha256-Ouz1SSc35gQaJcVQO95azkxNgLxuY712ELAwM5buEtY="; 45 + tag = "v${finalAttrs.version}"; 46 + hash = "sha256-yGxn46Vm8YdtIvvoTlOHQ1aAP2J/h/kFqr4ehruDsTw="; 43 47 }; 44 48 45 49 patches = [ ··· 53 57 cmake 54 58 libtool 55 59 perl 60 + pkg-config 56 61 python3 57 62 texinfo # for makeinfo 58 63 ]; ··· 62 67 curl 63 68 flex 64 69 gnutls 70 + icu 71 + libevent 65 72 libgcrypt 66 73 libuuid 74 + openssl 67 75 zlib 68 76 ]; 69 77 ··· 141 149 p = libmicrohttpd; 142 150 } 143 151 { 144 - f = "libssl"; 145 - p = openssl; 146 - } 147 - { 148 152 f = "lz4"; 149 153 p = lz4; 150 154 } ··· 167 171 } 168 172 ); 169 173 } 174 + { 175 + f = "postgresql"; 176 + p = postgresql_16; 177 + } 170 178 ] 171 179 ) 172 180 } ··· 184 192 pushd prometheus-cpp/prometheus-cpp/3rdparty 185 193 replace_dep . "${civetweb.src}" civetweb 186 194 popd 187 - 188 - sed -i s_/usr/bin/env_${coreutils}/bin/env_g libssl/openssl/config 189 195 190 196 pushd libmicrohttpd/libmicrohttpd 191 197 autoreconf