diff --git a/Makefile b/Makefile index 5f39a7ba50..094d7008f9 100644 --- a/Makefile +++ b/Makefile @@ -308,22 +308,22 @@ pkglist: $(REL_ARCH)-pkglist amd64-%: SYS_ARCH := x86_64 amd64-packages: amd64-centos amd64-ubuntu amd64-debian amd64-fedora amd64-opensuse amd64-almalinux amd64-almalinux: almalinux8 almalinux8-clang almalinux8-dbg almalinux9 almalinux9-clang almalinux9-dbg -amd64-centos: centos8 centos8-clang centos8-dbg centos9 centos9-clang centos9-dbg -amd64-debian: debian10 debian10-dbg debian11 debian11-clang debian11-dbg debian12 debian12-clang debian12-dbg -amd64-fedora: fedora38 fedora38-clang fedora38-dbg fedora39 fedora39-clang fedora39-dbg fedora40 fedora40-clang fedora40-dbg fedora41 fedora41-clang fedora41-dbg +amd64-centos: centos9 centos9-clang centos9-dbg +amd64-debian: debian12 debian12-clang debian12-dbg +amd64-fedora: fedora40 fedora40-clang fedora40-dbg fedora41 fedora41-clang fedora41-dbg amd64-opensuse: opensuse15 opensuse15-clang opensuse15-dbg -amd64-ubuntu: ubuntu18 ubuntu18-dbg ubuntu20 ubuntu20-clang ubuntu20-dbg ubuntu22 ubuntu22-clang ubuntu22-dbg ubuntu24 ubuntu24-clang ubuntu24-dbg +amd64-ubuntu: ubuntu22 ubuntu22-clang ubuntu22-dbg ubuntu24 ubuntu24-clang ubuntu24-dbg amd64-pkglist: @make -nk amd64-packages 2>/dev/null | grep -Po '(?<=binaries/)proxysql\S+$$' arm64-%: SYS_ARCH := aarch64 arm64-packages: arm64-centos arm64-debian arm64-ubuntu arm64-fedora arm64-opensuse arm64-almalinux arm64-almalinux: almalinux8 almalinux9 -arm64-centos: centos8 centos9 -arm64-debian: debian10 debian11 debian12 -arm64-fedora: fedora38 fedora39 fedora40 fedora41 +arm64-centos: centos9 +arm64-debian: debian12 +arm64-fedora: fedora40 fedora41 arm64-opensuse: opensuse15 -arm64-ubuntu: ubuntu18 ubuntu20 ubuntu22 ubuntu24 +arm64-ubuntu: ubuntu22 ubuntu24 arm64-pkglist: @make -nk arm64-packages 2>/dev/null | grep -Po '(?<=binaries/)proxysql\S+$$' diff --git a/deps/Makefile b/deps/Makefile index 7c6ca22474..2823e66dba 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -38,7 +38,7 @@ endif STDCPP := -std=c++$(shell echo $(CPLUSPLUS) | cut -c3-4) -DCXX$(shell echo $(CPLUSPLUS) | cut -c3-4) -targets := libconfig libdaemon jemalloc mariadb_client re2 sqlite3 pcre lz4 cityhash microhttpd curl ev libssl libhttpserver libinjection prometheus-cpp postgresql libusual libscram +targets := check_openssl_version libconfig libdaemon jemalloc mariadb_client re2 sqlite3 pcre lz4 cityhash microhttpd curl ev libhttpserver libinjection prometheus-cpp postgresql libusual libscram ifeq ($(SYS_KERN),Linux) targets += coredumper endif @@ -69,19 +69,42 @@ endif libinjection: libinjection/libinjection/src/libinjection.a +DISTRO := $(shell lsb_release -si 2>/dev/null || grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '"') +OPENSSL_VERSION_3 := 3.0.0 -libssl/openssl/libssl.a: - cd libssl && rm -rf openssl-openssl-*/ openssl-3*/ || true - cd libssl && tar -zxf openssl-*.tar.gz - 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 - cd libssl/openssl && ./config no-ssl3 no-tests - cd libssl/openssl && CC=${CC} CXX=${CXX} ${MAKE} - cd libssl/openssl && ln -fs ./ lib # curl wants this path +ifeq ($(DISTRO), almalinux) + ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl3/*" 2>/dev/null | head -n 1) + LIB_SSL_PATH := $(shell find /usr /usr/local /opt -name "libssl.so.3" 2>/dev/null | head -n 1) + LIB_CRYPTO_PATH := $(shell find /usr /usr/local /opt -name "libcrypto.so.3" 2>/dev/null | head -n 1) + SSL_LDIR := $(dir $(LIB_SSL_PATH)) +else + ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl/*" 2>/dev/null | head -n 1) + LIB_SSL_PATH := $(shell find /usr /usr/local /opt -name "libssl.so" 2>/dev/null | head -n 1) + LIB_CRYPTO_PATH := $(shell find /usr /usr/local /opt -name "libcrypto.so" 2>/dev/null | head -n 1) + SSL_LDIR := $(dir $(LIB_SSL_PATH)) +endif -libssl: libssl/openssl/libssl.a +ifneq ($(ssl_header_path),) + SSL_IDIR := $(shell dirname $(shell dirname $(ssl_header_path))) + $(info Found OpenSSL headers at $(SSL_IDIR)) + $(info OpenSSL lib full path is $(LIB_SSL_PATH)) + $(info OpenSSL libs directory is $(SSL_LDIR)) +else + $(error Warning: OpenSSL headers not found. exiting, please install openssl.) +endif +check_openssl_version: + @if [ "$(DISTRO)" = "almalinux" ]; then \ + @current_version=$$(openssl3 version | awk '{print $$2}'); \ + else \ + @current_version=$$(openssl version | awk '{print $$2}'); \ + fi; \ + echo "Installed OpenSSL version: $$current_version"; \ + compare_result=`printf "%s\n%s" "$(OPENSSL_VERSION_3)" "$$current_version" | sort -V | head -n 1`; \ + if [ "$$compare_result" != "$(OPENSSL_VERSION_3)" ]; then \ + echo "Error: Installed OpenSSL version must be $(OPENSSL_VERSION_3) or higher, Please upgrade OpenSSL."; \ + exit 1; \ + fi 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 @@ -120,7 +143,7 @@ coredumper/coredumper/src/libcoredumper.a: cd coredumper/coredumper && CC=${CC} CXX=${CXX} ${MAKE} coredumper: coredumper/coredumper/src/libcoredumper.a -curl/curl/lib/.libs/libcurl.a: libssl/openssl/libssl.a +curl/curl/lib/.libs/libcurl.a: cd curl && rm -rf curl-*/ || true cd curl && tar -zxf curl-*.tar.gz # 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} @@ -128,8 +151,8 @@ curl/curl/lib/.libs/libcurl.a: libssl/openssl/libssl.a ifeq ($(SYS_KERN),Darwin) cd curl/curl && patch configure < ../configure.patch endif - 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-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=yes - cd curl/curl && LD_LIBRARY_PATH=$(shell pwd)/libssl/openssl CFLAGS=-fPIC CC=${CC} CXX=${CXX} ${MAKE} + 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 + cd curl/curl && CFLAGS=-fPIC CC=${CC} CXX=${CXX} ${MAKE} curl: curl/curl/lib/.libs/libcurl.a @@ -145,7 +168,7 @@ microhttpd: libmicrohttpd/libmicrohttpd/src/microhttpd/.libs/libmicrohttpd.a cityhash/cityhash/src/.libs/libcityhash.a: cd cityhash && rm -rf cityhash-*/ || true - cd cityhash && tar -zxf cityhash-*.tar.gz && sync + cd cityhash && tar -zxf cityhash-*.tar.gz cd cityhash/cityhash && cp ../config.guess . && chmod +x config.guess && cp ../config.sub . && chmod +x config.sub cd cityhash/cityhash && ./configure && CC=${CC} CXX=${CXX} ${MAKE} @@ -162,7 +185,7 @@ lz4: lz4/lz4/lib/liblz4.a clickhouse-cpp/clickhouse-cpp/clickhouse/libclickhouse-cpp-lib-static.a: cd clickhouse-cpp && rm -rf clickhouse-cpp-*/ || true - cd clickhouse-cpp && tar -zxf v2.3.0.tar.gz && sync + cd clickhouse-cpp && tar -zxf v2.3.0.tar.gz cd clickhouse-cpp && ln -fs clickhouse-cpp-*/ clickhouse-cpp cd clickhouse-cpp/clickhouse-cpp && patch clickhouse/base/wire_format.h < ../wire_format.patch cd clickhouse-cpp/clickhouse-cpp && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo . @@ -194,11 +217,11 @@ jemalloc/jemalloc/lib/libjemalloc.a: jemalloc: jemalloc/jemalloc/lib/libjemalloc.a -mariadb-client-library/mariadb_client/libmariadb/libmariadbclient.a: libssl/openssl/libssl.a +mariadb-client-library/mariadb_client/libmariadb/libmariadbclient.a: cd mariadb-client-library && rm -rf mariadb-connector-c-*/ || true cd mariadb-client-library && tar -zxf mariadb-connector-c-3.3.8-src.tar.gz cd mariadb-client-library/mariadb_client && patch -p0 < ../plugin_auth_CMakeLists.txt.patch - cd mariadb-client-library/mariadb_client && cmake . -Wno-dev -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENSSL_ROOT_DIR=$(shell pwd)/libssl/openssl/ -DOPENSSL_LIBRARIES=$(shell pwd)/libssl/openssl/ -DICONV_LIBRARIES=$(brew --prefix libiconv)/lib -DICONV_INCLUDE=$(brew --prefix libiconv)/include . + cd mariadb-client-library/mariadb_client && cmake . -Wno-dev -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENSSL_ROOT_DIR=$(SSL_IDIR) -DOPENSSL_LIBRARIES=$(SSL_LDIR) -DICONV_LIBRARIES=$(brew --prefix libiconv)/lib -DICONV_INCLUDE=$(brew --prefix libiconv)/include . ifeq ($(PROXYDEBUG),1) cd mariadb-client-library/mariadb_client && patch -p0 < ../ma_context.h.patch else ifeq ($(USEVALGRIND),1) @@ -305,30 +328,30 @@ pcre/pcre/.libs/libpcre.a: pcre: pcre/pcre/.libs/libpcre.a -postgresql/postgresql/src/interfaces/libpq/libpq.a : libssl/openssl/libssl.a +postgresql/postgresql/src/interfaces/libpq/libpq.a : cd postgresql && rm -rf postgresql-*/ || true cd postgresql && tar -zxf postgresql-*.tar.gz cd postgresql/postgresql && patch -p0 < ../get_result_from_pgconn.patch cd postgresql/postgresql && patch -p0 < ../handle_row_data.patch #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" - 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 + cd postgresql/postgresql && LD_LIBRARY_PATH="$(SSL_LDIR)" ./configure --with-ssl=openssl --with-includes="$(SSL_IDIR)" --with-libraries="$(SSL_LDIR)" --without-readline cd postgresql/postgresql/src/interfaces/libpq && CC=${CC} CXX=${CXX} ${MAKE} MAKELEVEL=0 #cd postgresql/postgresql && CC=${CC} CXX=${CXX} ${MAKE} -f src/interfaces/libpq/Makefile all postgresql: postgresql/postgresql/src/interfaces/libpq/libpq.a -libusual/libusual/.libs/libusual.a: libssl/openssl/libssl.a +libusual/libusual/.libs/libusual.a: cd libusual && rm -rf libusual-*/ || true cd libusual && tar -zxf libusual-*.tar.gz cd libusual/libusual && ./autogen.sh - cd libusual/libusual && ./configure --with-openssl="$(shell pwd)/libssl/openssl/" --disable-shared + cd libusual/libusual && CPPFLAGS="-I$(SSL_IDIR)" LDFLAGS="$(LIB_SSL_PATH) $(LIB_CRYPTO_PATH)" ./configure --with-openssl="$(SSL_LDIR)" --disable-shared cd libusual/libusual && CC=${CC} CXX=${CXX} ${MAKE} libusual: libusual/libusual/.libs/libusual.a -libscram/lib/libscram.a: libssl/openssl/libssl.a postgresql/postgresql/src/interfaces/libpq/libpq.a +libscram/lib/libscram.a:postgresql/postgresql/src/interfaces/libpq/libpq.a cd libscram && rm -rf lib/* || true - cd libscram && CC=${CC} CXX=${CXX} ${MAKE} LIBOPENSSL_DIR="$(shell pwd)/libssl/openssl" POSTGRESQL_DIR="$(shell pwd)/postgresql/postgresql/" + cd libscram && CC=${CC} CXX=${CXX} ${MAKE} LIBOPENSSL_DIR="$(SSL_IDIR)" POSTGRESQL_DIR="$(shell pwd)/postgresql/postgresql/" libscram: libscram/lib/libscram.a @@ -356,7 +379,6 @@ cleanall: cd libmicrohttpd && rm -rf libmicrohttpd-*/ || true cd curl && rm -rf curl-*/ || true cd libev && rm -rf libev-*/ || true - cd libssl && rm -rf openssl-openssl-*/ openssl-3*/ || true cd libconfig && rm -rf libconfig-*/ || true cd prometheus-cpp && rm -rf prometheus-cpp-*/ || true cd cityhash && rm -rf cityhash-*/ || true diff --git a/deps/libssl/README.md b/deps/libssl/README.md index eab127418f..5443316e1f 100644 --- a/deps/libssl/README.md +++ b/deps/libssl/README.md @@ -16,3 +16,5 @@ Do not upgrade without extensive testing. See note about `struct bio_st` in MySQL_Data_Stream.cpp . Run `verify-bio_st-match.sh` to confirm compatibility. + +In ProxySQL 3.0.1, OpenSSL was changed from being statically linked to dynamically linked. \ No newline at end of file diff --git a/deps/libssl/a_time.c-multiplication-overflow.patch b/deps/libssl/a_time.c-multiplication-overflow.patch deleted file mode 100644 index 9dbae8092e..0000000000 --- a/deps/libssl/a_time.c-multiplication-overflow.patch +++ /dev/null @@ -1,9 +0,0 @@ -@@ -248,7 +248,7 @@ - } - o++; - } -- if (offset && !OPENSSL_gmtime_adj(&tmp, 0, offset * offsign)) -+ if (offset && !OPENSSL_gmtime_adj(&tmp, 0, (long) offset * offsign)) - goto err; - } else { - /* not Z, or not +/- in non-strict mode */ diff --git a/deps/libssl/curve448.c-multiplication-overflow.patch b/deps/libssl/curve448.c-multiplication-overflow.patch deleted file mode 100644 index 732b8e1b54..0000000000 --- a/deps/libssl/curve448.c-multiplication-overflow.patch +++ /dev/null @@ -1,9 +0,0 @@ -@@ -588,7 +588,7 @@ - assert(position >= 0); - if (odd & (1 << (table_bits + 1))) - delta -= (1 << (table_bits + 1)); -- current -= delta * (1 << pos); -+ current -= (long) delta * (1 << pos); - control[position].power = pos + 16 * (w - 1); - control[position].addend = delta; - position--; diff --git a/deps/libssl/openssl b/deps/libssl/openssl deleted file mode 120000 index 4ca124e1d3..0000000000 --- a/deps/libssl/openssl +++ /dev/null @@ -1 +0,0 @@ -openssl-3.3.1 \ No newline at end of file diff --git a/deps/libssl/openssl-3.3.1.tar.gz b/deps/libssl/openssl-3.3.1.tar.gz deleted file mode 100644 index 832a702242..0000000000 Binary files a/deps/libssl/openssl-3.3.1.tar.gz and /dev/null differ diff --git a/deps/libssl/verify-bio_st-match.sh b/deps/libssl/verify-bio_st-match.sh deleted file mode 100755 index 137f6cfee0..0000000000 --- a/deps/libssl/verify-bio_st-match.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -# make sure we have correct cwd -pushd $(dirname $0) &>/dev/null -trap 'popd &>/dev/null' EXIT - -echo "checking for 'deps/libssl/openssl/crypto/bio/bio_local.h'" -if [[ ! -e './openssl/crypto/bio/bio_local.h' ]]; then - echo "extracting 'openssl-*.tar.gz'" - tar -zxf openssl-*.tar.gz -fi - -echo "extracting 'struct bio_st' from 'deps/libssl/openssl/crypto/bio/bio_local.h'" -DEPBIOST=$(cd ../../; cat ./deps/libssl/openssl/crypto/bio/bio_local.h | sed -n '/^struct bio_st {/,/}/p') - -echo "extracting 'struct bio_st' from 'lib/mysql_data_stream.cpp'" -LIBBIOST=$(cd ../../; cat ./lib/mysql_data_stream.cpp | sed '/^\/\*/,/*\//d' | sed -n '/^struct bio_st {/,/}/p') - -echo -n "Comparing ... " -if [[ "$LIBBIOST" =~ "$DEPBIOST" ]]; then - echo "PASS - bio_st is a match!" -else - echo "FAIL - bio_st does not match!" - echo - echo ">>> lib/mysql_data_stream.cpp" - echo "$LIBBIOST" - echo "===" - echo "$DEPBIOST" - echo "<<< deps/libssl/openssl/crypto/bio/bio_local.h" - exit 1 -fi diff --git a/docker-compose.yml b/docker-compose.yml index bc5b15f916..70b712698b 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -#version: "3.0" services: #################################################################################################### @@ -16,35 +15,6 @@ services: command: bash -l -c /opt/entrypoint/entrypoint.bash #################################################################################################### -#################################################################################################### - centos8_build: - extends: - service: _build - image: proxysql/packaging:build-centos8-v3.0.0 - volumes: - - ./docker/images/proxysql/rhel-compliant/rpmmacros/rpmbuild/:/root/rpmbuild/ - - ./docker/images/proxysql/rhel-compliant/rpmmacros/.rpmmacros:/root/.rpmmacros - - ./docker/images/proxysql/rhel-compliant/entrypoint/:/opt/entrypoint/ - - ./:/opt/proxysql/ - environment: - - PKG_RELEASE=centos8 - - PROXYSQL_BUILD_TYPE=clickhouse - - centos8_clang_build: - extends: - service: centos8_build - image: proxysql/packaging:build-clang-centos8-v3.0.0 - environment: - - PKG_RELEASE=centos8-clang - - centos8_dbg_build: - extends: - service: centos8_build - environment: - - PKG_RELEASE=dbg-centos8 - - PROXYSQL_BUILD_TYPE=debug - - #################################################################################################### centos9_build: extends: @@ -74,62 +44,6 @@ services: - PROXYSQL_BUILD_TYPE=debug #################################################################################################### -#################################################################################################### - fedora38_build: - extends: - service: _build - image: proxysql/packaging:build-fedora38-v3.0.0 - volumes: - - ./docker/images/proxysql/rhel-compliant/rpmmacros/rpmbuild/:/root/rpmbuild/ - - ./docker/images/proxysql/rhel-compliant/rpmmacros/.rpmmacros:/root/.rpmmacros - - ./docker/images/proxysql/rhel-compliant/entrypoint/:/opt/entrypoint/ - - ./:/opt/proxysql/ - environment: - - PKG_RELEASE=fedora38 - - PROXYSQL_BUILD_TYPE=clickhouse - - fedora38_clang_build: - extends: - service: fedora38_build - image: proxysql/packaging:build-clang-fedora38-v3.0.0 - environment: - - PKG_RELEASE=fedora38-clang - - fedora38_dbg_build: - extends: - service: fedora38_build - environment: - - PKG_RELEASE=dbg-fedora38 - - PROXYSQL_BUILD_TYPE=debug - -#################################################################################################### - fedora39_build: - extends: - service: _build - image: proxysql/packaging:build-fedora39-v3.0.0 - volumes: - - ./docker/images/proxysql/rhel-compliant/rpmmacros/rpmbuild/:/root/rpmbuild/ - - ./docker/images/proxysql/rhel-compliant/rpmmacros/.rpmmacros:/root/.rpmmacros - - ./docker/images/proxysql/rhel-compliant/entrypoint/:/opt/entrypoint/ - - ./:/opt/proxysql/ - environment: - - PKG_RELEASE=fedora39 - - PROXYSQL_BUILD_TYPE=clickhouse - - fedora39_clang_build: - extends: - service: fedora39_build - image: proxysql/packaging:build-clang-fedora39-v3.0.0 - environment: - - PKG_RELEASE=fedora39-clang - - fedora39_dbg_build: - extends: - service: fedora39_build - environment: - - PKG_RELEASE=dbg-fedora39 - - PROXYSQL_BUILD_TYPE=debug - #################################################################################################### fedora40_build: extends: @@ -162,7 +76,7 @@ services: fedora41_build: extends: service: _build - image: proxysql/packaging:build-fedora41-v2.7.1 + image: proxysql/packaging:build-fedora41-v3.0.0 volumes: - ./docker/images/proxysql/rhel-compliant/rpmmacros/rpmbuild/:/root/rpmbuild/ - ./docker/images/proxysql/rhel-compliant/rpmmacros/.rpmmacros:/root/.rpmmacros @@ -175,7 +89,7 @@ services: fedora41_clang_build: extends: service: fedora41_build - image: proxysql/packaging:build-clang-fedora41-v2.7.1 + image: proxysql/packaging:build-clang-fedora41-v3.0.0 environment: - PKG_RELEASE=fedora41-clang @@ -187,60 +101,13 @@ services: - PROXYSQL_BUILD_TYPE=debug #################################################################################################### -#################################################################################################### - debian10_build: - extends: - service: _build - image: proxysql/packaging:build-debian10-v3.0.0 - volumes: - - ./docker/images/proxysql/deb-compliant/latest-package/ctl/:/root/ctl/ - - ./docker/images/proxysql/deb-compliant/entrypoint/:/opt/entrypoint/ - - ./:/opt/proxysql/ - environment: - - PKG_RELEASE=debian10 - - PROXYSQL_BUILD_TYPE=clickhouse - - debian10_dbg_build: - extends: - service: debian10_build - environment: - - PKG_RELEASE=dbg-debian10 - - PROXYSQL_BUILD_TYPE=debug - -#################################################################################################### - debian11_build: - extends: - service: _build - image: proxysql/packaging:build-debian11-v3.0.0 - volumes: - - ./docker/images/proxysql/deb-compliant/latest-package/ctl/:/root/ctl/ - - ./docker/images/proxysql/deb-compliant/entrypoint/:/opt/entrypoint/ - - ./:/opt/proxysql/ - environment: - - PKG_RELEASE=debian11 - - PROXYSQL_BUILD_TYPE=clickhouse - - debian11_clang_build: - extends: - service: debian11_build - image: proxysql/packaging:build-clang-debian11-v3.0.0 - environment: - - PKG_RELEASE=debian11-clang - - debian11_dbg_build: - extends: - service: debian11_build - environment: - - PKG_RELEASE=dbg-debian11 - - PROXYSQL_BUILD_TYPE=debug - #################################################################################################### debian12_build: extends: service: _build image: proxysql/packaging:build-debian12-v3.0.0 volumes: - - ./docker/images/proxysql/deb-compliant/latest-package/ctl/:/root/ctl/ + - ./docker/images/proxysql/deb-compliant/ctl/:/root/ctl/ - ./docker/images/proxysql/deb-compliant/entrypoint/:/opt/entrypoint/ - ./:/opt/proxysql/ environment: @@ -262,60 +129,13 @@ services: - PROXYSQL_BUILD_TYPE=debug #################################################################################################### -#################################################################################################### - ubuntu18_build: - extends: - service: _build - image: proxysql/packaging:build-ubuntu18-v3.0.0 - volumes: - - ./docker/images/proxysql/deb-compliant/latest-package/ctl/:/root/ctl/ - - ./docker/images/proxysql/deb-compliant/entrypoint/:/opt/entrypoint/ - - ./:/opt/proxysql/ - environment: - - PKG_RELEASE=ubuntu18 - - PROXYSQL_BUILD_TYPE=clickhouse - - ubuntu18_dbg_build: - extends: - service: ubuntu18_build - environment: - - PKG_RELEASE=dbg-ubuntu18 - - PROXYSQL_BUILD_TYPE=debug - -#################################################################################################### - ubuntu20_build: - extends: - service: _build - image: proxysql/packaging:build-ubuntu20-v3.0.0 - volumes: - - ./docker/images/proxysql/deb-compliant/latest-package/ctl/:/root/ctl/ - - ./docker/images/proxysql/deb-compliant/entrypoint/:/opt/entrypoint/ - - ./:/opt/proxysql/ - environment: - - PKG_RELEASE=ubuntu20 - - PROXYSQL_BUILD_TYPE=clickhouse - - ubuntu20_clang_build: - extends: - service: ubuntu20_build - image: proxysql/packaging:build-clang-ubuntu20-v3.0.0 - environment: - - PKG_RELEASE=ubuntu20-clang - - ubuntu20_dbg_build: - extends: - service: ubuntu20_build - environment: - - PKG_RELEASE=dbg-ubuntu20 - - PROXYSQL_BUILD_TYPE=debug - #################################################################################################### ubuntu22_build: extends: service: _build image: proxysql/packaging:build-ubuntu22-v3.0.0 volumes: - - ./docker/images/proxysql/deb-compliant/latest-package/ctl/:/root/ctl/ + - ./docker/images/proxysql/deb-compliant/ctl/:/root/ctl/ - ./docker/images/proxysql/deb-compliant/entrypoint/:/opt/entrypoint/ - ./:/opt/proxysql/ environment: @@ -342,7 +162,7 @@ services: service: _build image: proxysql/packaging:build-ubuntu24-v3.0.0 volumes: - - ./docker/images/proxysql/deb-compliant/latest-package/ctl/:/root/ctl/ + - ./docker/images/proxysql/deb-compliant/ctl/:/root/ctl/ - ./docker/images/proxysql/deb-compliant/entrypoint/:/opt/entrypoint/ - ./:/opt/proxysql/ environment: diff --git a/docker/images/proxysql/deb-compliant/ctl/proxysql.ctl b/docker/images/proxysql/deb-compliant/ctl/proxysql.ctl index ecae3af231..ace1316dfc 100644 --- a/docker/images/proxysql/deb-compliant/ctl/proxysql.ctl +++ b/docker/images/proxysql/deb-compliant/ctl/proxysql.ctl @@ -8,20 +8,20 @@ Version: PKG_VERSION_CURVER Maintainer: ProxySQL LLC Copyright: copyright Architecture: PKG_ARCH -Depends: libgnutls28 | libgnutls-deb0-28 | libgnutls30 +Depends: libgnutls28 | libgnutls30, libssl (>= 3.0.0) | libssl3 (>= 3.0.0) # Changelog: CHANGELOG.md # Readme: README.md Files: proxysql /usr/bin/ - etc/proxysql.cnf / + etc/proxysql.cnf /etc/ etc/logrotate.d/proxysql /etc/logrotate.d/ - systemd/system/proxysql-initial.service /lib/ - systemd/system/proxysql.service /lib/ - tools/proxysql_galera_checker.sh /usr/share/proxysql/ - tools/proxysql_galera_writer.pl /usr/share/proxysql/ -Description: High performance MySQL proxy - ProxySQL is a fast, reliable MySQL proxy with advanced runtime configuration management (virtually no configuration change requires a restart). + systemd/system/proxysql-initial.service /lib/systemd/system/ + systemd/system/proxysql.service /lib/systemd/system/ + tools/proxysql_galera_checker.sh /usr/share/proxysql/tools/ + tools/proxysql_galera_writer.pl /usr/share/proxysql/tools/ +Description: High performance MySQL and PostgreSQL proxy + ProxySQL is a fast, reliable MySQL and PostgreSQL proxy with advanced runtime configuration management (virtually no configuration change requires a restart). . - It features query routing, query caching, query rewriting (for queries generated by ORMs, for example) and is most of the time a drop-in replacement for mysqld from the point of view of the application. It can be configured and remote controlled through an SQL-compatible admin interface. + It features query routing, query caching, query rewriting (for queries generated by ORMs, for example) and is most of the time a drop-in replacement for mysqld and postgres from the point of view of the application. It can be configured and remote controlled through an SQL-compatible admin interface. File: postinst #!/bin/sh -e if [ ! -d /var/lib/proxysql ]; then mkdir /var/lib/proxysql ; fi diff --git a/docker/images/proxysql/deb-compliant/latest-package/ctl/copyright b/docker/images/proxysql/deb-compliant/latest-package/ctl/copyright deleted file mode 100644 index f2b0876634..0000000000 --- a/docker/images/proxysql/deb-compliant/latest-package/ctl/copyright +++ /dev/null @@ -1,6 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: proxysql -Upstream-Contact: ProxySQL LLC -Source: https://github.com/sysown/proxysql -Copyright: 2013-PKG_YEAR ProxySQL LLC -License: GPL-3 diff --git a/docker/images/proxysql/deb-compliant/latest-package/ctl/proxysql.ctl b/docker/images/proxysql/deb-compliant/latest-package/ctl/proxysql.ctl deleted file mode 100644 index c270fa14d7..0000000000 --- a/docker/images/proxysql/deb-compliant/latest-package/ctl/proxysql.ctl +++ /dev/null @@ -1,35 +0,0 @@ -Section: database -Priority: optional -Homepage: https://proxysql.com -Standards-Version: 3.9.2 - -Package: proxysql -Version: PKG_VERSION_CURVER -Maintainer: ProxySQL LLC -Copyright: copyright -Architecture: PKG_ARCH -Depends: libgnutls28 | libgnutls30 -# Changelog: CHANGELOG.md -# Readme: README.md -Files: proxysql /usr/bin/ - etc/proxysql.cnf /etc/ - etc/logrotate.d/proxysql /etc/logrotate.d/ - systemd/system/proxysql-initial.service /lib/systemd/system/ - systemd/system/proxysql.service /lib/systemd/system/ - tools/proxysql_galera_checker.sh /usr/share/proxysql/tools/ - tools/proxysql_galera_writer.pl /usr/share/proxysql/tools/ -Description: High performance MySQL proxy - ProxySQL is a fast, reliable MySQL proxy with advanced runtime configuration management (virtually no configuration change requires a restart). - . - It features query routing, query caching, query rewriting (for queries generated by ORMs, for example) and is most of the time a drop-in replacement for mysqld from the point of view of the application. It can be configured and remote controlled through an SQL-compatible admin interface. -File: postinst - #!/bin/sh -e - if [ ! -d /var/lib/proxysql ]; then mkdir /var/lib/proxysql ; fi - if ! id -u proxysql > /dev/null 2>&1; then useradd -r -U -s /bin/false -d /var/lib/proxysql -c "ProxySQL Server" proxysql; fi - chown -R proxysql: /var/lib/proxysql - chown root:proxysql /etc/proxysql.cnf - chmod 640 /etc/proxysql.cnf - if [ -d /run/systemd/system ]; then - systemctl enable proxysql.service > /dev/null || true - systemctl --system daemon-reload > /dev/null || true - fi diff --git a/docker/images/proxysql/deb-compliant/pre-systemd/ctl/copyright b/docker/images/proxysql/deb-compliant/pre-systemd/ctl/copyright deleted file mode 100644 index f2b0876634..0000000000 --- a/docker/images/proxysql/deb-compliant/pre-systemd/ctl/copyright +++ /dev/null @@ -1,6 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: proxysql -Upstream-Contact: ProxySQL LLC -Source: https://github.com/sysown/proxysql -Copyright: 2013-PKG_YEAR ProxySQL LLC -License: GPL-3 diff --git a/docker/images/proxysql/deb-compliant/pre-systemd/ctl/proxysql.ctl b/docker/images/proxysql/deb-compliant/pre-systemd/ctl/proxysql.ctl deleted file mode 100644 index 0d4e7e88e5..0000000000 --- a/docker/images/proxysql/deb-compliant/pre-systemd/ctl/proxysql.ctl +++ /dev/null @@ -1,31 +0,0 @@ -Section: database -Priority: optional -Homepage: https://proxysql.com -Standards-Version: 3.9.2 - -Package: proxysql -Version: PKG_VERSION_CURVER -Maintainer: ProxySQL LLC -Copyright: copyright -Architecture: PKG_ARCH -Depends: libgnutls28 | libgnutls30 | libgnutls-deb0-28 -# Changelog: CHANGELOG.md -# Readme: README.md -Files: proxysql /usr/bin/ - etc/proxysql.cnf / - etc/logrotate.d/proxysql / - etc/init.d/proxysql / - tools/proxysql_galera_checker.sh /usr/share/proxysql/ - tools/proxysql_galera_writer.pl /usr/share/proxysql/ -Description: High performance MySQL proxy - ProxySQL is a fast, reliable MySQL proxy with advanced runtime configuration management (virtually no configuration change requires a restart). - . - It features query routing, query caching, query rewriting (for queries generated by ORMs, for example) and is most of the time a drop-in replacement for mysqld from the point of view of the application. It can be configured and remote controlled through an SQL-compatible admin interface. -File: postinst - #!/bin/sh -e - if [ ! -d /var/lib/proxysql ]; then mkdir /var/lib/proxysql ; fi - if ! id -u proxysql > /dev/null 2>&1; then useradd -r -U -s /bin/false -d /var/lib/proxysql -c "ProxySQL Server" proxysql; fi - chown -R proxysql: /var/lib/proxysql - chown root:proxysql /etc/proxysql.cnf - update-rc.d proxysql defaults - chmod 640 /etc/proxysql.cnf diff --git a/docker/images/proxysql/legacy/Makefile.legacy b/docker/images/proxysql/legacy/Makefile.legacy deleted file mode 100644 index c20c5d214f..0000000000 --- a/docker/images/proxysql/legacy/Makefile.legacy +++ /dev/null @@ -1,863 +0,0 @@ -O0=-O0 -O2=-O2 -O1=-O1 -O3=-O3 -mtune=native -#OPTZ=$(O2) -EXTRALINK=#-pg -ALL_DEBUG=-ggdb -DDEBUG -NO_DEBUG= -DEBUG=${ALL_DEBUG} -#export DEBUG -#export OPTZ -#export EXTRALINK -CURVER?=2.0.0 -MAKEOPT=-j 4 -DISTRO := $(shell gawk -F= '/^NAME/{print $$2}' /etc/os-release) -ifeq ($(wildcard /usr/lib/systemd/system), /usr/lib/systemd/system) - SYSTEMD=1 -else - SYSTEMD=0 -endif - -.PHONY: default -default: build_deps build_lib build_src - -.PHONY: debug -debug: build_deps_debug build_lib_debug build_src_debug - -.PHONY: clickhouse -clickhouse: build_deps_clickhouse build_lib_clickhouse build_src_clickhouse - -.PHONY: debug_clickhouse -debug_clickhouse: build_deps_debug_clickhouse build_lib_debug_clickhouse build_src_debug_clickhouse - - -.PHONY: build_deps -build_deps: - cd deps && OPTZ="${O2} -ggdb" CC=${CC} CXX=${CXX} ${MAKE} - -.PHONY: build_lib -build_lib: build_deps - cd lib && OPTZ="${O2} -ggdb" CC=${CC} CXX=${CXX} ${MAKE} - -.PHONY: build_src -build_src: build_deps build_lib - cd src && OPTZ="${O2} -ggdb" CC=${CC} CXX=${CXX} ${MAKE} - -.PHONY: build_deps_debug -build_deps_debug: - cd deps && OPTZ="${O0} -ggdb -DDEBUG" PROXYDEBUG=1 CC=${CC} CXX=${CXX} ${MAKE} - -.PHONY: build_lib_debug -build_lib_debug: build_deps_debug - cd lib && OPTZ="${O0} -ggdb -DDEBUG" CC=${CC} CXX=${CXX} ${MAKE} - -.PHONY: build_src_debug -build_src_debug: build_deps build_lib_debug - cd src && OPTZ="${O0} -ggdb -DDEBUG" CC=${CC} CXX=${CXX} ${MAKE} - -.PHONY: build_deps_clickhouse -build_deps_clickhouse: - cd deps && OPTZ="${O2} -ggdb" PROXYSQLCLICKHOUSE=1 CC=${CC} CXX=${CXX} ${MAKE} - -.PHONY: build_deps_debug_clickhouse -build_deps_debug_clickhouse: - cd deps && OPTZ="${O0} -ggdb -DDEBUG" PROXYSQLCLICKHOUSE=1 PROXYDEBUG=1 CC=${CC} CXX=${CXX} ${MAKE} - -.PHONY: build_lib_clickhouse -build_lib_clickhouse: build_deps_clickhouse - cd lib && OPTZ="${O2} -ggdb" PROXYSQLCLICKHOUSE=1 CC=${CC} CXX=${CXX} ${MAKE} - -.PHONY: build_lib_debug_clickhouse -build_lib_debug_clickhouse: build_deps_debug_clickhouse - cd lib && OPTZ="${O0} -ggdb -DDEBUG" PROXYSQLCLICKHOUSE=1 CC=${CC} CXX=${CXX} ${MAKE} - -.PHONY: build_src_clickhouse -build_src_clickhouse: build_deps_clickhouse build_lib_clickhouse - cd src && OPTZ="${O2} -ggdb" PROXYSQLCLICKHOUSE=1 CC=${CC} CXX=${CXX} ${MAKE} - -.PHONY: build_src_debug_clickhouse -build_src_debug_clickhouse: build_deps build_lib_debug_clickhouse - cd src && OPTZ="${O0} -ggdb -DDEBUG" PROXYSQLCLICKHOUSE=1 CC=${CC} CXX=${CXX} ${MAKE} - - -.PHONY: clean -clean: - cd lib && ${MAKE} clean - cd src && ${MAKE} clean - -packages: centos6.7 centos7 centos6.7-dbg centos7-dbg centos5 centos5-dbg ubuntu12 ubuntu14 debian7 debian8 ubuntu14-dbg debian7-dbg debian8-dbg ubuntu16 ubuntu16-dbg fedora24 fedora24-dbg debian9 debian9-dbg ubuntu16-clickhouse debian9-clickhouse centos7-clickhouse fedora24-clickhouse fedora27 fedora27-dbg fedora27-clickhouse debian9.4 debian9.4-dbg debian9.4-clickhouse -.PHONY: packages - -centos5: binaries/proxysql-${CURVER}-1-centos5.x86_64.rpm -.PHONY: centos5 - -centos5-dbg: binaries/proxysql-${CURVER}-1-dbg-centos5.x86_64.rpm -.PHONY: centos5-dbg - -centos6.7: binaries/proxysql-${CURVER}-1-centos67.x86_64.rpm -.PHONY: centos6.7 - -centos7: binaries/proxysql-${CURVER}-1-centos7.x86_64.rpm -.PHONY: centos7 - -centos6.7-dbg: binaries/proxysql-${CURVER}-1-dbg-centos67.x86_64.rpm -.PHONY: centos6.7-dbg - -centos7-dbg: binaries/proxysql-${CURVER}-1-dbg-centos7.x86_64.rpm -.PHONY: centos7-dbg - -fedora24: binaries/proxysql-${CURVER}-1-fedora24.x86_64.rpm -.PHONY: fedora24 - -fedora24-dbg: binaries/proxysql-${CURVER}-1-dbg-fedora24.x86_64.rpm -.PHONY: fedora24-dbg - -fedora27: binaries/proxysql-${CURVER}-1-fedora27.x86_64.rpm -.PHONY: fedora27 - -fedora27-dbg: binaries/proxysql-${CURVER}-1-dbg-fedora27.x86_64.rpm -.PHONY: fedora27-dbg - -ubuntu12: binaries/proxysql_${CURVER}-ubuntu12_amd64.deb -.PHONY: ubuntu12 - -ubuntu14: binaries/proxysql_${CURVER}-ubuntu14_amd64.deb -.PHONY: ubuntu14 - -ubuntu16: binaries/proxysql_${CURVER}-ubuntu16_amd64.deb -.PHONY: ubuntu16 - -debian7: binaries/proxysql_${CURVER}-debian7_amd64.deb -.PHONY: debian7 - -debian8: binaries/proxysql_${CURVER}-debian8_amd64.deb -.PHONY: debian8 - -debian9: binaries/proxysql_${CURVER}-debian9_amd64.deb -.PHONY: debian9 - -ubuntu14-dbg: binaries/proxysql_${CURVER}-dbg-ubuntu14_amd64.deb -.PHONY: ubuntu14-dbg - -ubuntu16-dbg: binaries/proxysql_${CURVER}-dbg-ubuntu16_amd64.deb -.PHONY: ubuntu16-dbg - -ubuntu16-clickhouse: binaries/proxysql_${CURVER}-clickhouse-ubuntu16_amd64.deb -.PHONY: ubuntu16-clickhouse - -debian7-dbg: binaries/proxysql_${CURVER}-dbg-debian7_amd64.deb -.PHONY: debian7-dbg - -debian8-dbg: binaries/proxysql_${CURVER}-dbg-debian8_amd64.deb -.PHONY: debian8-dbg - -debian9-dbg: binaries/proxysql_${CURVER}-dbg-debian9_amd64.deb -.PHONY: debian9-dbg - -debian9-clickhouse: binaries/proxysql_${CURVER}-clickhouse-debian9_amd64.deb -.PHONY: debian9-clickhouse - -debian9.4: binaries/proxysql_${CURVER}-debian9.4_amd64.deb -.PHONY: debian9.4 - -debian9.4-dbg: binaries/proxysql_${CURVER}-dbg-debian9.4_amd64.deb -.PHONY: debian9.4-dbg - -debian9.4-clickhouse: binaries/proxysql_${CURVER}-clickhouse-debian9.4_amd64.deb -.PHONY: debian9.4-clickhouse - -centos7-clickhouse: binaries/proxysql-${CURVER}-clickhouse-1-centos7.x86_64.rpm -.PHONY: centos7-clickhouse - -fedora24-clickhouse: binaries/proxysql-${CURVER}-clickhouse-1-fedora24.x86_64.rpm -.PHONY: fedora24-clickhouse - -fedora27-clickhouse: binaries/proxysql-${CURVER}-clickhouse-1-fedora27.x86_64.rpm -.PHONY: fedora27-clickhouse - -binaries/proxysql-${CURVER}-1-centos5.x86_64.rpm: - docker stop centos5_build || true - docker rm centos5_build || true - docker create --name centos5_build renecannao/proxysql:build-centos5 bash -c "while : ; do sleep 10 ; done" - docker start centos5_build - docker exec centos5_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - docker exec centos5_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT}" - docker exec -it centos5_build bash -c "cd /opt/proxysql ; mkdir -p proxysql/usr/bin; mkdir -p proxysql/etc; cp src/proxysql proxysql/usr/bin/; cp -a etc proxysql ; mkdir -p proxysql/usr/share/proxysql/tools ; cp -a tools/proxysql_galera_checker.sh tools/proxysql_galera_writer.pl proxysql/usr/share/proxysql/tools ; mv proxysql proxysql-${CURVER} ; tar czvf proxysql-${CURVER}.tar.gz proxysql-${CURVER}" - docker exec -it centos5_build bash -c "mkdir -p /root/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}" - sleep 2 - docker cp docker/images/proxysql/centos5-build/rpmmacros centos5_build:/root/.rpmmacros - sleep 2 - docker cp docker/images/proxysql/centos5-build/proxysql.spec centos5_build:/root/rpmbuild/SPECS/proxysql.spec - sleep 10 - docker exec -it centos5_build bash -c "cp /opt/proxysql/proxysql-${CURVER}.tar.gz /root/rpmbuild/SOURCES" - sleep 2 - docker exec -it centos5_build bash -c "cd /root/rpmbuild; rpmbuild -ba SPECS/proxysql.spec --define \"version ${CURVER}\"" - sleep 10 - docker exec -it centos5_build bash -c "cp /root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm /root/rpm" - sleep 2 - docker cp centos5_build:/root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm ./binaries/proxysql-${CURVER}-1-centos5.x86_64.rpm - docker stop centos5_build - docker rm centos5_build - -binaries/proxysql-${CURVER}-1-dbg-centos5.x86_64.rpm: - docker stop centos5_build || true - docker rm centos5_build || true - docker create --name centos5_build renecannao/proxysql:build-centos5 bash -c "while : ; do sleep 10 ; done" - docker start centos5_build - docker exec centos5_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec centos5_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT} debug" - sleep 2 - docker exec -it centos5_build bash -c "cd /opt/proxysql ; mkdir -p proxysql/usr/bin; mkdir -p proxysql/etc; cp src/proxysql proxysql/usr/bin/; cp -a etc proxysql ; mkdir -p proxysql/usr/share/proxysql/tools ; cp -a tools/proxysql_galera_checker.sh tools/proxysql_galera_writer.pl proxysql/usr/share/proxysql/tools ; mv proxysql proxysql-${CURVER} ; tar czvf proxysql-${CURVER}.tar.gz proxysql-${CURVER}" - sleep 2 - docker exec -it centos5_build bash -c "mkdir -p /root/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}" - sleep 2 - docker cp docker/images/proxysql/centos5-build/rpmmacros centos5_build:/root/.rpmmacros - sleep 2 - docker cp docker/images/proxysql/centos5-build/proxysql.spec centos5_build:/root/rpmbuild/SPECS/proxysql.spec - sleep 10 - docker exec -it centos5_build bash -c "cp /opt/proxysql/proxysql-${CURVER}.tar.gz /root/rpmbuild/SOURCES" - sleep 2 - docker exec -it centos5_build bash -c "cd /root/rpmbuild; rpmbuild -ba SPECS/proxysql.spec --define \"version ${CURVER}\"" - sleep 10 - docker exec -it centos5_build bash -c "cp /root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm /root/rpm" - sleep 2 - docker cp centos5_build:/root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm ./binaries/proxysql-${CURVER}-1-dbg-centos5.x86_64.rpm - docker stop centos5_build - docker rm centos5_build - -binaries/proxysql-${CURVER}-1-centos67.x86_64.rpm: - docker stop centos67_build || true - docker rm centos67_build || true - docker create --name centos67_build renecannao/proxysql:build-centos6.7 bash -c "while : ; do sleep 10 ; done" - docker start centos67_build - docker exec centos67_build bash -c "yum update -y nss curl libcurl" - docker exec centos67_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - docker exec centos67_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT}" - docker exec -it centos67_build bash -c "cd /opt/proxysql ; mkdir -p proxysql/usr/bin; mkdir -p proxysql/etc; cp src/proxysql proxysql/usr/bin/; cp -a etc proxysql ; mkdir -p proxysql/usr/share/proxysql/tools ; cp -a tools/proxysql_galera_checker.sh tools/proxysql_galera_writer.pl proxysql/usr/share/proxysql/tools ; mv proxysql proxysql-${CURVER} ; tar czvf proxysql-${CURVER}.tar.gz proxysql-${CURVER}" - docker exec -it centos67_build bash -c "mkdir -p /root/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}" - docker cp docker/images/proxysql/centos67-build/rpmmacros centos67_build:/root/.rpmmacros - docker cp docker/images/proxysql/centos67-build/proxysql.spec centos67_build:/root/rpmbuild/SPECS/proxysql.spec - sleep 10 - docker exec -it centos67_build bash -c "cp /opt/proxysql/proxysql-${CURVER}.tar.gz /root/rpmbuild/SOURCES" - sleep 2 - docker exec -it centos67_build bash -c "cd /root/rpmbuild; rpmbuild -ba SPECS/proxysql.spec --define \"version ${CURVER}\"" - sleep 10 - docker exec -it centos67_build bash -c "cp /root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm /root/rpm" - sleep 2 - docker cp centos67_build:/root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm ./binaries/proxysql-${CURVER}-1-centos67.x86_64.rpm - docker stop centos67_build - docker rm centos67_build - -binaries/proxysql-${CURVER}-1-dbg-centos67.x86_64.rpm: - docker stop centos67_build || true - docker rm centos67_build || true - docker create --name centos67_build renecannao/proxysql:build-centos6.7 bash -c "while : ; do sleep 10 ; done" - docker start centos67_build - docker exec centos67_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec centos67_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT} debug" - sleep 2 - docker exec -it centos67_build bash -c "cd /opt/proxysql ; mkdir -p proxysql/usr/bin; mkdir -p proxysql/etc; cp src/proxysql proxysql/usr/bin/; cp -a etc proxysql ; mkdir -p proxysql/usr/share/proxysql/tools ; cp -a tools/proxysql_galera_checker.sh tools/proxysql_galera_writer.pl proxysql/usr/share/proxysql/tools ; mv proxysql proxysql-${CURVER} ; tar czvf proxysql-${CURVER}.tar.gz proxysql-${CURVER}" - sleep 2 - docker exec -it centos67_build bash -c "mkdir -p /root/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}" - sleep 2 - docker cp docker/images/proxysql/centos67-build/rpmmacros centos67_build:/root/.rpmmacros - sleep 2 - docker cp docker/images/proxysql/centos67-build/proxysql.spec centos67_build:/root/rpmbuild/SPECS/proxysql.spec - sleep 10 - docker exec -it centos67_build bash -c "cp /opt/proxysql/proxysql-${CURVER}.tar.gz /root/rpmbuild/SOURCES" - sleep 2 - docker exec -it centos67_build bash -c "cd /root/rpmbuild; rpmbuild -ba SPECS/proxysql.spec --define \"version ${CURVER}\"" - sleep 10 - docker exec -it centos67_build bash -c "cp /root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm /root/rpm" - sleep 2 - docker cp centos67_build:/root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm ./binaries/proxysql-${CURVER}-1-dbg-centos67.x86_64.rpm - docker stop centos67_build - docker rm centos67_build - -binaries/proxysql-${CURVER}-1-centos7.x86_64.rpm: - docker stop centos7_build || true - docker rm centos7_build || true - docker create --name centos7_build renecannao/proxysql:build-centos7 bash -c "while : ; do sleep 10 ; done" - docker start centos7_build - docker exec centos7_build bash -c "yum update -y nss curl libcurl" - docker exec centos7_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec centos7_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT}" - sleep 2 - docker exec -it centos7_build bash -c "cd /opt/proxysql ; mkdir -p proxysql/usr/bin; mkdir -p proxysql/etc; cp src/proxysql proxysql/usr/bin/; cp -a etc proxysql ; mkdir -p proxysql/usr/share/proxysql/tools ; cp -a tools/proxysql_galera_checker.sh tools/proxysql_galera_writer.pl proxysql/usr/share/proxysql/tools ; mv proxysql proxysql-${CURVER} ; tar czvf proxysql-${CURVER}.tar.gz proxysql-${CURVER}" - sleep 2 - docker exec -it centos7_build bash -c "mkdir -p /root/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}" - sleep 2 - docker cp docker/images/proxysql/centos7-build/rpmmacros centos7_build:/root/.rpmmacros - sleep 2 - docker cp docker/images/proxysql/centos7-build/proxysql.spec centos7_build:/root/rpmbuild/SPECS/proxysql.spec - sleep 10 - docker exec -it centos7_build bash -c "cp /opt/proxysql/proxysql-${CURVER}.tar.gz /root/rpmbuild/SOURCES" - sleep 2 - docker exec -it centos7_build bash -c "cd /root/rpmbuild; rpmbuild -ba SPECS/proxysql.spec --define \"version ${CURVER}\"" - sleep 10 - docker exec -it centos7_build bash -c "cp /root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm /root/rpm" - sleep 2 - docker cp centos7_build:/root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm ./binaries/proxysql-${CURVER}-1-centos7.x86_64.rpm - docker stop centos7_build - docker rm centos7_build - -binaries/proxysql-${CURVER}-clickhouse-1-centos7.x86_64.rpm: - docker stop centos7_build || true - docker rm centos7_build || true - docker create --name centos7_build renecannao/proxysql:build-centos7 bash -c "while : ; do sleep 10 ; done" - docker start centos7_build - docker exec centos7_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec centos7_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps_clickhouse && ${MAKE} clickhouse ${MAKEOPT}" - sleep 2 - docker exec -it centos7_build bash -c "cd /opt/proxysql ; mkdir -p proxysql/usr/bin; mkdir -p proxysql/etc; cp src/proxysql proxysql/usr/bin/; cp -a etc proxysql ; mkdir -p proxysql/usr/share/proxysql/tools ; cp -a tools/proxysql_galera_checker.sh tools/proxysql_galera_writer.pl proxysql/usr/share/proxysql/tools ; mv proxysql proxysql-${CURVER} ; tar czvf proxysql-${CURVER}.tar.gz proxysql-${CURVER}" - sleep 2 - docker exec -it centos7_build bash -c "mkdir -p /root/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}" - sleep 2 - docker cp docker/images/proxysql/centos7-build/rpmmacros centos7_build:/root/.rpmmacros - sleep 2 - docker cp docker/images/proxysql/centos7-build/proxysql.spec centos7_build:/root/rpmbuild/SPECS/proxysql.spec - sleep 10 - docker exec -it centos7_build bash -c "cp /opt/proxysql/proxysql-${CURVER}.tar.gz /root/rpmbuild/SOURCES" - sleep 2 - docker exec -it centos7_build bash -c "cd /root/rpmbuild; rpmbuild -ba SPECS/proxysql.spec --define \"version ${CURVER}\"" - sleep 10 - docker exec -it centos7_build bash -c "cp /root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm /root/rpm" - sleep 2 - docker cp centos7_build:/root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm ./binaries/proxysql-${CURVER}-clickhouse-1-centos7.x86_64.rpm - docker stop centos7_build - docker rm centos7_build - -binaries/proxysql-${CURVER}-1-dbg-centos7.x86_64.rpm: - docker stop centos7_build || true - docker rm centos7_build || true - docker create --name centos7_build renecannao/proxysql:build-centos7 bash -c "while : ; do sleep 10 ; done" - docker start centos7_build - docker exec centos7_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec centos7_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT} debug" - sleep 2 - docker exec -it centos7_build bash -c "cd /opt/proxysql ; mkdir -p proxysql/usr/bin; mkdir -p proxysql/etc; cp src/proxysql proxysql/usr/bin/; cp -a etc proxysql ; mkdir -p proxysql/usr/share/proxysql/tools ; cp -a tools/proxysql_galera_checker.sh tools/proxysql_galera_writer.pl proxysql/usr/share/proxysql/tools ; mv proxysql proxysql-${CURVER} ; tar czvf proxysql-${CURVER}.tar.gz proxysql-${CURVER}" - sleep 2 - docker exec -it centos7_build bash -c "mkdir -p /root/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}" - sleep 2 - docker cp docker/images/proxysql/centos7-build/rpmmacros centos7_build:/root/.rpmmacros - sleep 2 - docker cp docker/images/proxysql/centos7-build/proxysql.spec centos7_build:/root/rpmbuild/SPECS/proxysql.spec - sleep 10 - docker exec -it centos7_build bash -c "cp /opt/proxysql/proxysql-${CURVER}.tar.gz /root/rpmbuild/SOURCES" - sleep 2 - docker exec -it centos7_build bash -c "cd /root/rpmbuild; rpmbuild -ba SPECS/proxysql.spec --define \"version ${CURVER}\"" - sleep 10 - docker exec -it centos7_build bash -c "cp /root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm /root/rpm" - sleep 2 - docker cp centos7_build:/root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm ./binaries/proxysql-${CURVER}-1-dbg-centos7.x86_64.rpm - docker stop centos7_build - docker rm centos7_build - - -binaries/proxysql-${CURVER}-1-fedora27.x86_64.rpm: - docker stop fedora27_build || true - docker rm fedora27_build || true - docker create --name fedora27_build renecannao/proxysql:build-fedora27 bash -c "while : ; do sleep 10 ; done" - docker start fedora27_build - docker exec fedora27_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec fedora27_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT}" - sleep 2 - docker exec -it fedora27_build bash -c "cd /opt/proxysql ; mkdir -p proxysql/usr/bin; mkdir -p proxysql/etc; cp src/proxysql proxysql/usr/bin/; cp -a etc proxysql ; mkdir -p proxysql/usr/share/proxysql/tools ; cp -a tools/proxysql_galera_checker.sh tools/proxysql_galera_writer.pl proxysql/usr/share/proxysql/tools ; mv proxysql proxysql-${CURVER} ; tar czvf proxysql-${CURVER}.tar.gz proxysql-${CURVER}" - sleep 2 - docker exec -it fedora27_build bash -c "mkdir -p /root/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}" - sleep 2 - docker cp docker/images/proxysql/fedora27-build/rpmmacros fedora27_build:/root/.rpmmacros - sleep 2 - docker cp docker/images/proxysql/fedora27-build/proxysql.spec fedora27_build:/root/rpmbuild/SPECS/proxysql.spec - sleep 10 - docker exec -it fedora27_build bash -c "cp /opt/proxysql/proxysql-${CURVER}.tar.gz /root/rpmbuild/SOURCES" - sleep 2 - docker exec -it fedora27_build bash -c "cd /root/rpmbuild; rpmbuild -ba SPECS/proxysql.spec --define \"version ${CURVER}\"" - sleep 10 - docker exec -it fedora27_build bash -c "cp /root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm /root/rpm" - sleep 2 - docker cp fedora27_build:/root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm ./binaries/proxysql-${CURVER}-1-fedora27.x86_64.rpm - docker stop fedora27_build - docker rm fedora27_build - -binaries/proxysql-${CURVER}-clickhouse-1-fedora27.x86_64.rpm: - docker stop fedora27_build || true - docker rm fedora27_build || true - docker create --name fedora27_build renecannao/proxysql:build-fedora27 bash -c "while : ; do sleep 10 ; done" - docker start fedora27_build - docker exec fedora27_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec fedora27_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps_clickhouse && ${MAKE} clickhouse ${MAKEOPT}" - sleep 2 - docker exec -it fedora27_build bash -c "cd /opt/proxysql ; mkdir -p proxysql/usr/bin; mkdir -p proxysql/etc; cp src/proxysql proxysql/usr/bin/; cp -a etc proxysql ; mkdir -p proxysql/usr/share/proxysql/tools ; cp -a tools/proxysql_galera_checker.sh tools/proxysql_galera_writer.pl proxysql/usr/share/proxysql/tools ; mv proxysql proxysql-${CURVER} ; tar czvf proxysql-${CURVER}.tar.gz proxysql-${CURVER}" - sleep 2 - docker exec -it fedora27_build bash -c "mkdir -p /root/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}" - sleep 2 - docker cp docker/images/proxysql/fedora27-build/rpmmacros fedora27_build:/root/.rpmmacros - sleep 2 - docker cp docker/images/proxysql/fedora27-build/proxysql.spec fedora27_build:/root/rpmbuild/SPECS/proxysql.spec - sleep 10 - docker exec -it fedora27_build bash -c "cp /opt/proxysql/proxysql-${CURVER}.tar.gz /root/rpmbuild/SOURCES" - sleep 2 - docker exec -it fedora27_build bash -c "cd /root/rpmbuild; rpmbuild -ba SPECS/proxysql.spec --define \"version ${CURVER}\"" - sleep 10 - docker exec -it fedora27_build bash -c "cp /root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm /root/rpm" - sleep 2 - docker cp fedora27_build:/root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm ./binaries/proxysql-${CURVER}-clickhouse-1-fedora27.x86_64.rpm - docker stop fedora27_build - docker rm fedora27_build - -binaries/proxysql-${CURVER}-1-dbg-fedora27.x86_64.rpm: - docker stop fedora27_build || true - docker rm fedora27_build || true - docker create --name fedora27_build renecannao/proxysql:build-fedora27 bash -c "while : ; do sleep 10 ; done" - docker start fedora27_build - docker exec fedora27_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec fedora27_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT} debug" - sleep 2 - docker exec -it fedora27_build bash -c "cd /opt/proxysql ; mkdir -p proxysql/usr/bin; mkdir -p proxysql/etc; cp src/proxysql proxysql/usr/bin/; cp -a etc proxysql ; mkdir -p proxysql/usr/share/proxysql/tools ; cp -a tools/proxysql_galera_checker.sh tools/proxysql_galera_writer.pl proxysql/usr/share/proxysql/tools ; mv proxysql proxysql-${CURVER} ; tar czvf proxysql-${CURVER}.tar.gz proxysql-${CURVER}" - sleep 2 - docker exec -it fedora27_build bash -c "mkdir -p /root/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}" - sleep 2 - docker cp docker/images/proxysql/fedora27-build/rpmmacros fedora27_build:/root/.rpmmacros - sleep 2 - docker cp docker/images/proxysql/fedora27-build/proxysql.spec fedora27_build:/root/rpmbuild/SPECS/proxysql.spec - sleep 10 - docker exec -it fedora27_build bash -c "cp /opt/proxysql/proxysql-${CURVER}.tar.gz /root/rpmbuild/SOURCES" - sleep 2 - docker exec -it fedora27_build bash -c "cd /root/rpmbuild; rpmbuild -ba SPECS/proxysql.spec --define \"version ${CURVER}\"" - sleep 10 - docker exec -it fedora27_build bash -c "cp /root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm /root/rpm" - sleep 2 - docker cp fedora27_build:/root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm ./binaries/proxysql-${CURVER}-1-dbg-fedora27.x86_64.rpm - docker stop fedora27_build - docker rm fedora27_build - -binaries/proxysql-${CURVER}-1-fedora24.x86_64.rpm: - docker stop fedora24_build || true - docker rm fedora24_build || true - docker create --name fedora24_build renecannao/proxysql:build-fedora24 bash -c "while : ; do sleep 10 ; done" - docker start fedora24_build - docker exec fedora24_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec fedora24_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT}" - sleep 2 - docker exec -it fedora24_build bash -c "cd /opt/proxysql ; mkdir -p proxysql/usr/bin; mkdir -p proxysql/etc; cp src/proxysql proxysql/usr/bin/; cp -a etc proxysql ; mkdir -p proxysql/usr/share/proxysql/tools ; cp -a tools/proxysql_galera_checker.sh tools/proxysql_galera_writer.pl proxysql/usr/share/proxysql/tools ; mv proxysql proxysql-${CURVER} ; tar czvf proxysql-${CURVER}.tar.gz proxysql-${CURVER}" - sleep 2 - docker exec -it fedora24_build bash -c "mkdir -p /root/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}" - sleep 2 - docker cp docker/images/proxysql/fedora24-build/rpmmacros fedora24_build:/root/.rpmmacros - sleep 2 - docker cp docker/images/proxysql/fedora24-build/proxysql.spec fedora24_build:/root/rpmbuild/SPECS/proxysql.spec - sleep 10 - docker exec -it fedora24_build bash -c "cp /opt/proxysql/proxysql-${CURVER}.tar.gz /root/rpmbuild/SOURCES" - sleep 2 - docker exec -it fedora24_build bash -c "cd /root/rpmbuild; rpmbuild -ba SPECS/proxysql.spec --define \"version ${CURVER}\"" - sleep 10 - docker exec -it fedora24_build bash -c "cp /root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm /root/rpm" - sleep 2 - docker cp fedora24_build:/root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm ./binaries/proxysql-${CURVER}-1-fedora24.x86_64.rpm - docker stop fedora24_build - docker rm fedora24_build - -binaries/proxysql-${CURVER}-clickhouse-1-fedora24.x86_64.rpm: - docker stop fedora24_build || true - docker rm fedora24_build || true - docker create --name fedora24_build renecannao/proxysql:build-fedora24 bash -c "while : ; do sleep 10 ; done" - docker start fedora24_build - docker exec fedora24_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec fedora24_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps_clickhouse && ${MAKE} clickhouse ${MAKEOPT}" - sleep 2 - docker exec -it fedora24_build bash -c "cd /opt/proxysql ; mkdir -p proxysql/usr/bin; mkdir -p proxysql/etc; cp src/proxysql proxysql/usr/bin/; cp -a etc proxysql ; mkdir -p proxysql/usr/share/proxysql/tools ; cp -a tools/proxysql_galera_checker.sh tools/proxysql_galera_writer.pl proxysql/usr/share/proxysql/tools ; mv proxysql proxysql-${CURVER} ; tar czvf proxysql-${CURVER}.tar.gz proxysql-${CURVER}" - sleep 2 - docker exec -it fedora24_build bash -c "mkdir -p /root/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}" - sleep 2 - docker cp docker/images/proxysql/fedora24-build/rpmmacros fedora24_build:/root/.rpmmacros - sleep 2 - docker cp docker/images/proxysql/fedora24-build/proxysql.spec fedora24_build:/root/rpmbuild/SPECS/proxysql.spec - sleep 10 - docker exec -it fedora24_build bash -c "cp /opt/proxysql/proxysql-${CURVER}.tar.gz /root/rpmbuild/SOURCES" - sleep 2 - docker exec -it fedora24_build bash -c "cd /root/rpmbuild; rpmbuild -ba SPECS/proxysql.spec --define \"version ${CURVER}\"" - sleep 10 - docker exec -it fedora24_build bash -c "cp /root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm /root/rpm" - sleep 2 - docker cp fedora24_build:/root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm ./binaries/proxysql-${CURVER}-clickhouse-1-fedora24.x86_64.rpm - docker stop fedora24_build - docker rm fedora24_build - -binaries/proxysql-${CURVER}-1-dbg-fedora24.x86_64.rpm: - docker stop fedora24_build || true - docker rm fedora24_build || true - docker create --name fedora24_build renecannao/proxysql:build-fedora24 bash -c "while : ; do sleep 10 ; done" - docker start fedora24_build - docker exec fedora24_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec fedora24_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT} debug" - sleep 2 - docker exec -it fedora24_build bash -c "cd /opt/proxysql ; mkdir -p proxysql/usr/bin; mkdir -p proxysql/etc; cp src/proxysql proxysql/usr/bin/; cp -a etc proxysql ; mkdir -p proxysql/usr/share/proxysql/tools ; cp -a tools/proxysql_galera_checker.sh tools/proxysql_galera_writer.pl proxysql/usr/share/proxysql/tools ; mv proxysql proxysql-${CURVER} ; tar czvf proxysql-${CURVER}.tar.gz proxysql-${CURVER}" - sleep 2 - docker exec -it fedora24_build bash -c "mkdir -p /root/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}" - sleep 2 - docker cp docker/images/proxysql/fedora24-build/rpmmacros fedora24_build:/root/.rpmmacros - sleep 2 - docker cp docker/images/proxysql/fedora24-build/proxysql.spec fedora24_build:/root/rpmbuild/SPECS/proxysql.spec - sleep 10 - docker exec -it fedora24_build bash -c "cp /opt/proxysql/proxysql-${CURVER}.tar.gz /root/rpmbuild/SOURCES" - sleep 2 - docker exec -it fedora24_build bash -c "cd /root/rpmbuild; rpmbuild -ba SPECS/proxysql.spec --define \"version ${CURVER}\"" - sleep 10 - docker exec -it fedora24_build bash -c "cp /root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm /root/rpm" - sleep 2 - docker cp fedora24_build:/root/rpmbuild/RPMS/x86_64/proxysql-${CURVER}-1.x86_64.rpm ./binaries/proxysql-${CURVER}-1-dbg-fedora24.x86_64.rpm - docker stop fedora24_build - docker rm fedora24_build - -binaries/proxysql_${CURVER}-ubuntu12_amd64.deb: - docker stop ubuntu12_build || true - docker rm ubuntu12_build || true - docker create --name ubuntu12_build renecannao/proxysql:build-ubuntu12 bash -c "while : ; do sleep 10 ; done" - docker start ubuntu12_build - docker exec ubuntu12_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec ubuntu12_build bash -c "cd /opt/proxysql; sed -i -e 's/c++11/c++0x/' lib/Makefile ; sed -i -e 's/c++11/c++0x/' src/Makefile" - docker exec ubuntu12_build bash -c "cd /opt/proxysql/deps/re2 ; rm re2.tar.gz ; wget -O re2.tar.gz https://github.com/sysown/proxysql/raw/v1.3.9/deps/re2/re2-20140304.tgz" - docker exec ubuntu12_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT}" - sleep 2 - docker cp docker/images/proxysql/ubuntu-12.04-build/proxysql.ctl ubuntu12_build:/opt/proxysql/ - sleep 2 - docker exec ubuntu12_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp ubuntu12_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-ubuntu12_amd64.deb - docker stop ubuntu12_build - docker rm ubuntu12_build - -binaries/proxysql_${CURVER}-ubuntu14_amd64.deb: - docker stop ubuntu14_build || true - docker rm ubuntu14_build || true - docker create --name ubuntu14_build renecannao/proxysql:build-ubuntu14 bash -c "while : ; do sleep 10 ; done" - docker start ubuntu14_build - docker exec ubuntu14_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec ubuntu14_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT}" - sleep 2 - docker cp docker/images/proxysql/ubuntu-14.04-build/proxysql.ctl ubuntu14_build:/opt/proxysql/ - sleep 2 - docker exec ubuntu14_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp ubuntu14_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-ubuntu14_amd64.deb - docker stop ubuntu14_build - docker rm ubuntu14_build - -binaries/proxysql_${CURVER}-ubuntu16_amd64.deb: - docker stop ubuntu16_build || true - docker rm ubuntu16_build || true - docker create --name ubuntu16_build renecannao/proxysql:build-ubuntu16 bash -c "while : ; do sleep 10 ; done" - docker start ubuntu16_build - docker exec ubuntu16_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec ubuntu16_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT}" - sleep 2 - docker cp docker/images/proxysql/ubuntu-16.04-build/proxysql.ctl ubuntu16_build:/opt/proxysql/ - sleep 2 - docker exec ubuntu16_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp ubuntu16_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-ubuntu16_amd64.deb - docker stop ubuntu16_build - docker rm ubuntu16_build - -binaries/proxysql_${CURVER}-debian7_amd64.deb: - docker stop debian7_build || true - docker rm debian7_build || true - docker create --name debian7_build renecannao/proxysql:build-debian7 bash -c "while : ; do sleep 10 ; done" - docker start debian7_build - docker exec debian7_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec debian7_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT}" - sleep 2 - docker cp docker/images/proxysql/debian-7.8-build/proxysql.ctl debian7_build:/opt/proxysql/ - sleep 2 - docker exec debian7_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp debian7_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-debian7_amd64.deb - docker stop debian7_build - docker rm debian7_build - -binaries/proxysql_${CURVER}-debian8_amd64.deb: - docker stop debian8_build || true - docker rm debian8_build || true - docker create --name debian8_build renecannao/proxysql:build-debian8 bash -c "while : ; do sleep 10 ; done" - docker start debian8_build - docker exec debian8_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec debian8_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT}" - sleep 2 - docker cp docker/images/proxysql/debian-8.2-build/proxysql.ctl debian8_build:/opt/proxysql/ - sleep 2 - docker exec debian8_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp debian8_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-debian8_amd64.deb - docker stop debian8_build - docker rm debian8_build - -binaries/proxysql_${CURVER}-debian9_amd64.deb: - docker stop debian9_build || true - docker rm debian9_build || true - docker create --name debian9_build renecannao/proxysql:build-debian9 bash -c "while : ; do sleep 10 ; done" - docker start debian9_build - docker exec debian9_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec debian9_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT}" - sleep 2 - docker cp docker/images/proxysql/debian-9-build/proxysql.ctl debian9_build:/opt/proxysql/ - sleep 2 - docker exec debian9_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp debian9_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-debian9_amd64.deb - docker stop debian9_build - docker rm debian9_build - -binaries/proxysql_${CURVER}-clickhouse-debian9_amd64.deb: - docker stop debian9_build || true - docker rm debian9_build || true - docker create --name debian9_build renecannao/proxysql:build-debian9 bash -c "while : ; do sleep 10 ; done" - docker start debian9_build - docker exec debian9_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec debian9_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps_clickhouse && ${MAKE} clickhouse ${MAKEOPT}" - sleep 2 - docker cp docker/images/proxysql/debian-9-build/proxysql.ctl debian9_build:/opt/proxysql/ - sleep 2 - docker exec debian9_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp debian9_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-clickhouse-debian9_amd64.deb - docker stop debian9_build - docker rm debian9_build - -binaries/proxysql_${CURVER}-dbg-ubuntu14_amd64.deb: - docker stop ubuntu14_build || true - docker rm ubuntu14_build || true - docker create --name ubuntu14_build renecannao/proxysql:build-ubuntu14 bash -c "while : ; do sleep 10 ; done" - docker start ubuntu14_build - docker exec ubuntu14_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec ubuntu14_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT} debug" - sleep 2 - docker cp docker/images/proxysql/ubuntu-14.04-build/proxysql.ctl ubuntu14_build:/opt/proxysql/ - sleep 2 - docker exec ubuntu14_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp ubuntu14_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-dbg-ubuntu14_amd64.deb - docker stop ubuntu14_build - docker rm ubuntu14_build - -binaries/proxysql_${CURVER}-dbg-ubuntu16_amd64.deb: - docker stop ubuntu16_build || true - docker rm ubuntu16_build || true - docker create --name ubuntu16_build renecannao/proxysql:build-ubuntu16 bash -c "while : ; do sleep 10 ; done" - docker start ubuntu16_build - docker exec ubuntu16_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec ubuntu16_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT} debug" - sleep 2 - docker cp docker/images/proxysql/ubuntu-16.04-build/proxysql.ctl ubuntu16_build:/opt/proxysql/ - sleep 2 - docker exec ubuntu16_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp ubuntu16_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-dbg-ubuntu16_amd64.deb - docker stop ubuntu16_build - docker rm ubuntu16_build - -binaries/proxysql_${CURVER}-clickhouse-ubuntu16_amd64.deb: - docker stop ubuntu16_build || true - docker rm ubuntu16_build || true - docker create --name ubuntu16_build renecannao/proxysql:build-ubuntu16 bash -c "while : ; do sleep 10 ; done" - docker start ubuntu16_build - docker exec ubuntu16_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec ubuntu16_build bash --login -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps_clickhouse && ${MAKE} clickhouse ${MAKEOPT}" - sleep 2 - docker cp docker/images/proxysql/ubuntu-16.04-build/proxysql.ctl ubuntu16_build:/opt/proxysql/ - sleep 2 - docker exec ubuntu16_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp ubuntu16_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-clickhouse-ubuntu16_amd64.deb - docker stop ubuntu16_build - docker rm ubuntu16_build - -binaries/proxysql_${CURVER}-dbg-debian7_amd64.deb: - docker stop debian7_build || true - docker rm debian7_build || true - docker create --name debian7_build renecannao/proxysql:build-debian7 bash -c "while : ; do sleep 10 ; done" - docker start debian7_build - docker exec debian7_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec debian7_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT} debug" - sleep 2 - docker cp docker/images/proxysql/debian-7.8-build/proxysql.ctl debian7_build:/opt/proxysql/ - sleep 2 - docker exec debian7_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp debian7_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-dbg-debian7_amd64.deb - docker stop debian7_build - docker rm debian7_build - -binaries/proxysql_${CURVER}-dbg-debian8_amd64.deb: - docker stop debian8_build || true - docker rm debian8_build || true - docker create --name debian8_build renecannao/proxysql:build-debian8 bash -c "while : ; do sleep 10 ; done" - docker start debian8_build - docker exec debian8_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec debian8_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT} debug" - sleep 2 - docker cp docker/images/proxysql/debian-8.2-build/proxysql.ctl debian8_build:/opt/proxysql/ - sleep 2 - docker exec debian8_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp debian8_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-dbg-debian8_amd64.deb - docker stop debian8_build - docker rm debian8_build - -binaries/proxysql_${CURVER}-dbg-debian9_amd64.deb: - docker stop debian9_build || true - docker rm debian9_build || true - docker create --name debian9_build renecannao/proxysql:build-debian9 bash -c "while : ; do sleep 10 ; done" - docker start debian9_build - docker exec debian9_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec debian9_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT} debug" - sleep 2 - docker cp docker/images/proxysql/debian-9-build/proxysql.ctl debian9_build:/opt/proxysql/ - sleep 2 - docker exec debian9_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp debian9_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-dbg-debian9_amd64.deb - docker stop debian9_build - docker rm debian9_build - -binaries/proxysql_${CURVER}-debian9.4_amd64.deb: - docker stop debian9.4_build || true - docker rm debian9.4_build || true - docker create --name debian9.4_build renecannao/proxysql:build-debian9.4 bash -c "while : ; do sleep 10 ; done" - docker start debian9.4_build - docker exec debian9.4_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec debian9.4_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT}" - sleep 2 - docker cp docker/images/proxysql/debian-9.4-build/proxysql.ctl debian9.4_build:/opt/proxysql/ - sleep 2 - docker exec debian9.4_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp debian9.4_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-debian9.4_amd64.deb - docker stop debian9.4_build - docker rm debian9.4_build - -binaries/proxysql_${CURVER}-dbg-debian9.4_amd64.deb: - docker stop debian9.4_build || true - docker rm debian9.4_build || true - docker create --name debian9.4_build renecannao/proxysql:build-debian9.4 bash -c "while : ; do sleep 10 ; done" - docker start debian9.4_build - docker exec debian9.4_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec debian9.4_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps && ${MAKE} ${MAKEOPT} debug" - sleep 2 - docker cp docker/images/proxysql/debian-9.4-build/proxysql.ctl debian9.4_build:/opt/proxysql/ - sleep 2 - docker exec debian9.4_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp debian9.4_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-dbg-debian9.4_amd64.deb - docker stop debian9.4_build - docker rm debian9.4_build - -binaries/proxysql_${CURVER}-clickhouse-debian9.4_amd64.deb: - docker stop debian9.4_build || true - docker rm debian9.4_build || true - docker create --name debian9.4_build renecannao/proxysql:build-debian9.4 bash -c "while : ; do sleep 10 ; done" - docker start debian9.4_build - docker exec debian9.4_build bash -c "cd /opt; git clone -b v${CURVER} https://github.com/sysown/proxysql.git proxysql" - sleep 2 - docker exec debian9.4_build bash -c "cd /opt/proxysql; ${MAKE} clean && ${MAKE} ${MAKEOPT} build_deps_clickhouse && ${MAKE} clickhouse ${MAKEOPT}" - sleep 2 - docker cp docker/images/proxysql/debian-9.4-build/proxysql.ctl debian9.4_build:/opt/proxysql/ - sleep 2 - docker exec debian9.4_build bash -c "cd /opt/proxysql; cp src/proxysql . ; equivs-build proxysql.ctl" - sleep 2 - docker cp debian9.4_build:/opt/proxysql/proxysql_${CURVER}_amd64.deb ./binaries/proxysql_${CURVER}-clickhouse-debian9.4_amd64.deb - docker stop debian9.4_build - docker rm debian9.4_build - - -.PHONY: cleanall -cleanall: - cd deps && ${MAKE} cleanall - cd lib && ${MAKE} clean - cd src && ${MAKE} clean - rm binaries/*deb || true - rm binaries/*rpm || true - -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 ($(SYSTEMD), 1) - install -m 0644 systemd/proxysql.service /usr/lib/systemd/system/ - systemctl enable proxysql.service -else - install -m 0755 etc/init.d/proxysql /etc/init.d -ifeq ($(DISTRO),"CentOS Linux") - chkconfig --level 0123456 proxysql on -else -ifeq ($(DISTRO),"Red Hat Enterprise Linux Server") - chkconfig --level 0123456 proxysql on -else -ifeq ($(DISTRO),"Ubuntu") - update-rc.d proxysql defaults -else -ifeq ($(DISTRO),"Debian GNU/Linux") - update-rc.d proxysql defaults -endif -endif -endif -endif -.PHONY: install - -uninstall: - rm /etc/proxysql.cnf - rm /usr/bin/proxysql - rmdir /var/lib/proxysql 2>/dev/null || true -ifeq ($(SYSTEMD), 1) - systemctl stop proxysql.service - rm /usr/lib/systemd/system/proxysql.service -else -ifeq ($(DISTRO),"CentOS Linux") - chkconfig --level 0123456 proxysql off - rm /etc/init.d/proxysql -else -ifeq ($(DISTRO),"Red Hat Enterprise Linux Server") - chkconfig --level 0123456 proxysql off - rm /etc/init.d/proxysql -else -ifeq ($(DISTRO),"Ubuntu") - rm /etc/init.d/proxysql - update-rc.d proxysql remove -else -ifeq ($(DISTRO),"Debian GNU/Linux") - rm /etc/init.d/proxysql - update-rc.d proxysql remove -endif -endif -endif -endif -endif -endif -.PHONY: uninstall diff --git a/docker/images/proxysql/legacy/centos5-build/proxysql.spec b/docker/images/proxysql/legacy/centos5-build/proxysql.spec deleted file mode 100644 index 16ff2cff50..0000000000 --- a/docker/images/proxysql/legacy/centos5-build/proxysql.spec +++ /dev/null @@ -1,76 +0,0 @@ -# Don't try fancy stuff like debuginfo, which is useless on binary-only -# packages. Don't strip binary too -# Be sure buildpolicy set to do nothing -%define __spec_install_post %{nil} -%define debug_package %{nil} -%define __os_install_post %{_dbpath}/brp-compress - -Summary: A high-performance MySQL proxy -Name: proxysql -Version: %{version} -Release: 1 -License: GPL+ -Group: Development/Tools -SOURCE0 : %{name}-%{version}.tar.gz -URL: http://www.proxysql.com/ - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - -%description -%{summary} - -%prep -%setup -q - -%build -# Empty section. - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot} - -# in builddir -cp -a * %{buildroot} - -%clean -rm -rf %{buildroot} - -%post -mkdir /var/run/%{name} -chkconfig --add %{name} - -%preun -/etc/init.d/%{name} stop -chkconfig --del %{name} - -%postun -rm -rf /var/run/%{name} - -%files -%defattr(-,root,root,-) -%config(noreplace) %{_sysconfdir}/%{name}.cnf -%{_bindir}/* -%{_sysconfdir}/init.d/%{name} -/usr/share/proxysql/tools/proxysql_galera_checker.sh -/usr/share/proxysql/tools/proxysql_galera_writer.pl - -%changelog -* Wed Oct 19 2016 Rene Cannao 1.3.0 -- experimental support for Prepared Statements -- enhanced scalability -* Thu Sep 29 2016 Rene Cannao 1.2.4 -- Forth stable release of 1.2 -* Tue Sep 20 2016 Rene Cannao 1.2.3 -- Third stable release of 1.2 -* Fri Sep 2 2016 Rene Cannao 1.2.2 -- Second stable release of 1.2 -* Tue Aug 2 2016 Rene Cannao 1.2.1 -- First stable release of 1.2 -* Mon Mar 14 2016 Rene Cannao 1.2.0 -- First testing release of 1.2 -* Sat Mar 11 2016 Rene Cannao 1.1.2 -- Upgraded to release 1.1.2 -* Sat Oct 31 2015 Rene Cannao 1.0.1 -- Compiles 1.0.1 -* Wed Sep 9 2015 Andrei Ismail 0.2 -- Added support for automatic packaging on Ubuntu 14.04 and CentOS 7. diff --git a/docker/images/proxysql/legacy/centos5-build/rpmmacros b/docker/images/proxysql/legacy/centos5-build/rpmmacros deleted file mode 100644 index a1d0f32f01..0000000000 --- a/docker/images/proxysql/legacy/centos5-build/rpmmacros +++ /dev/null @@ -1,2 +0,0 @@ -%_topdir %(echo $HOME)/rpmbuild -%_tmppath %{_topdir}/tmp \ No newline at end of file diff --git a/docker/images/proxysql/legacy/centos67-build/proxysql.spec b/docker/images/proxysql/legacy/centos67-build/proxysql.spec deleted file mode 100644 index 16ff2cff50..0000000000 --- a/docker/images/proxysql/legacy/centos67-build/proxysql.spec +++ /dev/null @@ -1,76 +0,0 @@ -# Don't try fancy stuff like debuginfo, which is useless on binary-only -# packages. Don't strip binary too -# Be sure buildpolicy set to do nothing -%define __spec_install_post %{nil} -%define debug_package %{nil} -%define __os_install_post %{_dbpath}/brp-compress - -Summary: A high-performance MySQL proxy -Name: proxysql -Version: %{version} -Release: 1 -License: GPL+ -Group: Development/Tools -SOURCE0 : %{name}-%{version}.tar.gz -URL: http://www.proxysql.com/ - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - -%description -%{summary} - -%prep -%setup -q - -%build -# Empty section. - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot} - -# in builddir -cp -a * %{buildroot} - -%clean -rm -rf %{buildroot} - -%post -mkdir /var/run/%{name} -chkconfig --add %{name} - -%preun -/etc/init.d/%{name} stop -chkconfig --del %{name} - -%postun -rm -rf /var/run/%{name} - -%files -%defattr(-,root,root,-) -%config(noreplace) %{_sysconfdir}/%{name}.cnf -%{_bindir}/* -%{_sysconfdir}/init.d/%{name} -/usr/share/proxysql/tools/proxysql_galera_checker.sh -/usr/share/proxysql/tools/proxysql_galera_writer.pl - -%changelog -* Wed Oct 19 2016 Rene Cannao 1.3.0 -- experimental support for Prepared Statements -- enhanced scalability -* Thu Sep 29 2016 Rene Cannao 1.2.4 -- Forth stable release of 1.2 -* Tue Sep 20 2016 Rene Cannao 1.2.3 -- Third stable release of 1.2 -* Fri Sep 2 2016 Rene Cannao 1.2.2 -- Second stable release of 1.2 -* Tue Aug 2 2016 Rene Cannao 1.2.1 -- First stable release of 1.2 -* Mon Mar 14 2016 Rene Cannao 1.2.0 -- First testing release of 1.2 -* Sat Mar 11 2016 Rene Cannao 1.1.2 -- Upgraded to release 1.1.2 -* Sat Oct 31 2015 Rene Cannao 1.0.1 -- Compiles 1.0.1 -* Wed Sep 9 2015 Andrei Ismail 0.2 -- Added support for automatic packaging on Ubuntu 14.04 and CentOS 7. diff --git a/docker/images/proxysql/legacy/centos67-build/rpmmacros b/docker/images/proxysql/legacy/centos67-build/rpmmacros deleted file mode 100644 index a1d0f32f01..0000000000 --- a/docker/images/proxysql/legacy/centos67-build/rpmmacros +++ /dev/null @@ -1,2 +0,0 @@ -%_topdir %(echo $HOME)/rpmbuild -%_tmppath %{_topdir}/tmp \ No newline at end of file diff --git a/docker/images/proxysql/legacy/centos7-build/proxysql.spec b/docker/images/proxysql/legacy/centos7-build/proxysql.spec deleted file mode 100644 index 16ff2cff50..0000000000 --- a/docker/images/proxysql/legacy/centos7-build/proxysql.spec +++ /dev/null @@ -1,76 +0,0 @@ -# Don't try fancy stuff like debuginfo, which is useless on binary-only -# packages. Don't strip binary too -# Be sure buildpolicy set to do nothing -%define __spec_install_post %{nil} -%define debug_package %{nil} -%define __os_install_post %{_dbpath}/brp-compress - -Summary: A high-performance MySQL proxy -Name: proxysql -Version: %{version} -Release: 1 -License: GPL+ -Group: Development/Tools -SOURCE0 : %{name}-%{version}.tar.gz -URL: http://www.proxysql.com/ - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - -%description -%{summary} - -%prep -%setup -q - -%build -# Empty section. - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot} - -# in builddir -cp -a * %{buildroot} - -%clean -rm -rf %{buildroot} - -%post -mkdir /var/run/%{name} -chkconfig --add %{name} - -%preun -/etc/init.d/%{name} stop -chkconfig --del %{name} - -%postun -rm -rf /var/run/%{name} - -%files -%defattr(-,root,root,-) -%config(noreplace) %{_sysconfdir}/%{name}.cnf -%{_bindir}/* -%{_sysconfdir}/init.d/%{name} -/usr/share/proxysql/tools/proxysql_galera_checker.sh -/usr/share/proxysql/tools/proxysql_galera_writer.pl - -%changelog -* Wed Oct 19 2016 Rene Cannao 1.3.0 -- experimental support for Prepared Statements -- enhanced scalability -* Thu Sep 29 2016 Rene Cannao 1.2.4 -- Forth stable release of 1.2 -* Tue Sep 20 2016 Rene Cannao 1.2.3 -- Third stable release of 1.2 -* Fri Sep 2 2016 Rene Cannao 1.2.2 -- Second stable release of 1.2 -* Tue Aug 2 2016 Rene Cannao 1.2.1 -- First stable release of 1.2 -* Mon Mar 14 2016 Rene Cannao 1.2.0 -- First testing release of 1.2 -* Sat Mar 11 2016 Rene Cannao 1.1.2 -- Upgraded to release 1.1.2 -* Sat Oct 31 2015 Rene Cannao 1.0.1 -- Compiles 1.0.1 -* Wed Sep 9 2015 Andrei Ismail 0.2 -- Added support for automatic packaging on Ubuntu 14.04 and CentOS 7. diff --git a/docker/images/proxysql/legacy/centos7-build/rpmmacros b/docker/images/proxysql/legacy/centos7-build/rpmmacros deleted file mode 100644 index a1d0f32f01..0000000000 --- a/docker/images/proxysql/legacy/centos7-build/rpmmacros +++ /dev/null @@ -1,2 +0,0 @@ -%_topdir %(echo $HOME)/rpmbuild -%_tmppath %{_topdir}/tmp \ No newline at end of file diff --git a/docker/images/proxysql/legacy/debian-7.8-build/proxysql.ctl b/docker/images/proxysql/legacy/debian-7.8-build/proxysql.ctl deleted file mode 100644 index e04fbf2b3f..0000000000 --- a/docker/images/proxysql/legacy/debian-7.8-build/proxysql.ctl +++ /dev/null @@ -1,24 +0,0 @@ -Section: misc -Priority: optional -Homepage: http://www.proxysql.com -Standards-Version: 3.9.2 - -Package: proxysql -Version: 2.0.0 -Maintainer: Rene Cannao -Architecture: amd64 -# Changelog: CHANGELOG.md -# Readme: README.md -Files: proxysql /usr/bin/ - etc/proxysql.cnf / - etc/init.d/proxysql / - tools/proxysql_galera_checker.sh /usr/share/proxysql/ - tools/proxysql_galera_writer.pl /usr/share/proxysql/ -Description: High performance MySQL proxy - ProxySQL is a fast, reliable MySQL proxy with advanced runtime configuration management (virtually no configuration change requires a restart). - . - It features query routing, query caching, query rewriting (for queries generated by ORMs, for example) and is most of the time a drop-in replacement for mysqld from the point of view of the application. It can be configured and remote controlled through an SQL-compatible admin interface. -File: postinst - #!/bin/sh -e - if [ ! -d /var/lib/proxysql ]; then mkdir /var/lib/proxysql ; fi - update-rc.d proxysql defaults diff --git a/docker/images/proxysql/legacy/debian-8.2-build/proxysql.ctl b/docker/images/proxysql/legacy/debian-8.2-build/proxysql.ctl deleted file mode 100644 index e04fbf2b3f..0000000000 --- a/docker/images/proxysql/legacy/debian-8.2-build/proxysql.ctl +++ /dev/null @@ -1,24 +0,0 @@ -Section: misc -Priority: optional -Homepage: http://www.proxysql.com -Standards-Version: 3.9.2 - -Package: proxysql -Version: 2.0.0 -Maintainer: Rene Cannao -Architecture: amd64 -# Changelog: CHANGELOG.md -# Readme: README.md -Files: proxysql /usr/bin/ - etc/proxysql.cnf / - etc/init.d/proxysql / - tools/proxysql_galera_checker.sh /usr/share/proxysql/ - tools/proxysql_galera_writer.pl /usr/share/proxysql/ -Description: High performance MySQL proxy - ProxySQL is a fast, reliable MySQL proxy with advanced runtime configuration management (virtually no configuration change requires a restart). - . - It features query routing, query caching, query rewriting (for queries generated by ORMs, for example) and is most of the time a drop-in replacement for mysqld from the point of view of the application. It can be configured and remote controlled through an SQL-compatible admin interface. -File: postinst - #!/bin/sh -e - if [ ! -d /var/lib/proxysql ]; then mkdir /var/lib/proxysql ; fi - update-rc.d proxysql defaults diff --git a/docker/images/proxysql/legacy/debian-9-build/proxysql.ctl b/docker/images/proxysql/legacy/debian-9-build/proxysql.ctl deleted file mode 100644 index e04fbf2b3f..0000000000 --- a/docker/images/proxysql/legacy/debian-9-build/proxysql.ctl +++ /dev/null @@ -1,24 +0,0 @@ -Section: misc -Priority: optional -Homepage: http://www.proxysql.com -Standards-Version: 3.9.2 - -Package: proxysql -Version: 2.0.0 -Maintainer: Rene Cannao -Architecture: amd64 -# Changelog: CHANGELOG.md -# Readme: README.md -Files: proxysql /usr/bin/ - etc/proxysql.cnf / - etc/init.d/proxysql / - tools/proxysql_galera_checker.sh /usr/share/proxysql/ - tools/proxysql_galera_writer.pl /usr/share/proxysql/ -Description: High performance MySQL proxy - ProxySQL is a fast, reliable MySQL proxy with advanced runtime configuration management (virtually no configuration change requires a restart). - . - It features query routing, query caching, query rewriting (for queries generated by ORMs, for example) and is most of the time a drop-in replacement for mysqld from the point of view of the application. It can be configured and remote controlled through an SQL-compatible admin interface. -File: postinst - #!/bin/sh -e - if [ ! -d /var/lib/proxysql ]; then mkdir /var/lib/proxysql ; fi - update-rc.d proxysql defaults diff --git a/docker/images/proxysql/legacy/debian-9.4-build/proxysql.ctl b/docker/images/proxysql/legacy/debian-9.4-build/proxysql.ctl deleted file mode 100644 index e04fbf2b3f..0000000000 --- a/docker/images/proxysql/legacy/debian-9.4-build/proxysql.ctl +++ /dev/null @@ -1,24 +0,0 @@ -Section: misc -Priority: optional -Homepage: http://www.proxysql.com -Standards-Version: 3.9.2 - -Package: proxysql -Version: 2.0.0 -Maintainer: Rene Cannao -Architecture: amd64 -# Changelog: CHANGELOG.md -# Readme: README.md -Files: proxysql /usr/bin/ - etc/proxysql.cnf / - etc/init.d/proxysql / - tools/proxysql_galera_checker.sh /usr/share/proxysql/ - tools/proxysql_galera_writer.pl /usr/share/proxysql/ -Description: High performance MySQL proxy - ProxySQL is a fast, reliable MySQL proxy with advanced runtime configuration management (virtually no configuration change requires a restart). - . - It features query routing, query caching, query rewriting (for queries generated by ORMs, for example) and is most of the time a drop-in replacement for mysqld from the point of view of the application. It can be configured and remote controlled through an SQL-compatible admin interface. -File: postinst - #!/bin/sh -e - if [ ! -d /var/lib/proxysql ]; then mkdir /var/lib/proxysql ; fi - update-rc.d proxysql defaults diff --git a/docker/images/proxysql/legacy/fedora24-build/proxysql.spec b/docker/images/proxysql/legacy/fedora24-build/proxysql.spec deleted file mode 100644 index 16ff2cff50..0000000000 --- a/docker/images/proxysql/legacy/fedora24-build/proxysql.spec +++ /dev/null @@ -1,76 +0,0 @@ -# Don't try fancy stuff like debuginfo, which is useless on binary-only -# packages. Don't strip binary too -# Be sure buildpolicy set to do nothing -%define __spec_install_post %{nil} -%define debug_package %{nil} -%define __os_install_post %{_dbpath}/brp-compress - -Summary: A high-performance MySQL proxy -Name: proxysql -Version: %{version} -Release: 1 -License: GPL+ -Group: Development/Tools -SOURCE0 : %{name}-%{version}.tar.gz -URL: http://www.proxysql.com/ - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - -%description -%{summary} - -%prep -%setup -q - -%build -# Empty section. - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot} - -# in builddir -cp -a * %{buildroot} - -%clean -rm -rf %{buildroot} - -%post -mkdir /var/run/%{name} -chkconfig --add %{name} - -%preun -/etc/init.d/%{name} stop -chkconfig --del %{name} - -%postun -rm -rf /var/run/%{name} - -%files -%defattr(-,root,root,-) -%config(noreplace) %{_sysconfdir}/%{name}.cnf -%{_bindir}/* -%{_sysconfdir}/init.d/%{name} -/usr/share/proxysql/tools/proxysql_galera_checker.sh -/usr/share/proxysql/tools/proxysql_galera_writer.pl - -%changelog -* Wed Oct 19 2016 Rene Cannao 1.3.0 -- experimental support for Prepared Statements -- enhanced scalability -* Thu Sep 29 2016 Rene Cannao 1.2.4 -- Forth stable release of 1.2 -* Tue Sep 20 2016 Rene Cannao 1.2.3 -- Third stable release of 1.2 -* Fri Sep 2 2016 Rene Cannao 1.2.2 -- Second stable release of 1.2 -* Tue Aug 2 2016 Rene Cannao 1.2.1 -- First stable release of 1.2 -* Mon Mar 14 2016 Rene Cannao 1.2.0 -- First testing release of 1.2 -* Sat Mar 11 2016 Rene Cannao 1.1.2 -- Upgraded to release 1.1.2 -* Sat Oct 31 2015 Rene Cannao 1.0.1 -- Compiles 1.0.1 -* Wed Sep 9 2015 Andrei Ismail 0.2 -- Added support for automatic packaging on Ubuntu 14.04 and CentOS 7. diff --git a/docker/images/proxysql/legacy/fedora24-build/rpmmacros b/docker/images/proxysql/legacy/fedora24-build/rpmmacros deleted file mode 100644 index a1d0f32f01..0000000000 --- a/docker/images/proxysql/legacy/fedora24-build/rpmmacros +++ /dev/null @@ -1,2 +0,0 @@ -%_topdir %(echo $HOME)/rpmbuild -%_tmppath %{_topdir}/tmp \ No newline at end of file diff --git a/docker/images/proxysql/legacy/fedora27-build/proxysql.spec b/docker/images/proxysql/legacy/fedora27-build/proxysql.spec deleted file mode 100644 index 16ff2cff50..0000000000 --- a/docker/images/proxysql/legacy/fedora27-build/proxysql.spec +++ /dev/null @@ -1,76 +0,0 @@ -# Don't try fancy stuff like debuginfo, which is useless on binary-only -# packages. Don't strip binary too -# Be sure buildpolicy set to do nothing -%define __spec_install_post %{nil} -%define debug_package %{nil} -%define __os_install_post %{_dbpath}/brp-compress - -Summary: A high-performance MySQL proxy -Name: proxysql -Version: %{version} -Release: 1 -License: GPL+ -Group: Development/Tools -SOURCE0 : %{name}-%{version}.tar.gz -URL: http://www.proxysql.com/ - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - -%description -%{summary} - -%prep -%setup -q - -%build -# Empty section. - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot} - -# in builddir -cp -a * %{buildroot} - -%clean -rm -rf %{buildroot} - -%post -mkdir /var/run/%{name} -chkconfig --add %{name} - -%preun -/etc/init.d/%{name} stop -chkconfig --del %{name} - -%postun -rm -rf /var/run/%{name} - -%files -%defattr(-,root,root,-) -%config(noreplace) %{_sysconfdir}/%{name}.cnf -%{_bindir}/* -%{_sysconfdir}/init.d/%{name} -/usr/share/proxysql/tools/proxysql_galera_checker.sh -/usr/share/proxysql/tools/proxysql_galera_writer.pl - -%changelog -* Wed Oct 19 2016 Rene Cannao 1.3.0 -- experimental support for Prepared Statements -- enhanced scalability -* Thu Sep 29 2016 Rene Cannao 1.2.4 -- Forth stable release of 1.2 -* Tue Sep 20 2016 Rene Cannao 1.2.3 -- Third stable release of 1.2 -* Fri Sep 2 2016 Rene Cannao 1.2.2 -- Second stable release of 1.2 -* Tue Aug 2 2016 Rene Cannao 1.2.1 -- First stable release of 1.2 -* Mon Mar 14 2016 Rene Cannao 1.2.0 -- First testing release of 1.2 -* Sat Mar 11 2016 Rene Cannao 1.1.2 -- Upgraded to release 1.1.2 -* Sat Oct 31 2015 Rene Cannao 1.0.1 -- Compiles 1.0.1 -* Wed Sep 9 2015 Andrei Ismail 0.2 -- Added support for automatic packaging on Ubuntu 14.04 and CentOS 7. diff --git a/docker/images/proxysql/legacy/fedora27-build/rpmmacros b/docker/images/proxysql/legacy/fedora27-build/rpmmacros deleted file mode 100644 index a1d0f32f01..0000000000 --- a/docker/images/proxysql/legacy/fedora27-build/rpmmacros +++ /dev/null @@ -1,2 +0,0 @@ -%_topdir %(echo $HOME)/rpmbuild -%_tmppath %{_topdir}/tmp \ No newline at end of file diff --git a/docker/images/proxysql/legacy/proxysql/Dockerfile b/docker/images/proxysql/legacy/proxysql/Dockerfile deleted file mode 100644 index d7173e7343..0000000000 --- a/docker/images/proxysql/legacy/proxysql/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -FROM ubuntu:14.04 -MAINTAINER Andrei Ismail - -LABEL vendor=proxysql\ - com.proxysql.type=proxysql\ - com.proxysql.os=ubuntu14\ - com.proxysql.interactive=false\ - com.proxysql.config=simple\ - com.proxysql.purpose=testing - -RUN apt-get update && apt-get install -y \ - automake \ - cmake \ - make \ - g++ \ - gcc \ - gdb \ - gdbserver \ - git \ - libmysqlclient-dev \ - libssl-dev \ - libtool \ - && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/ - -RUN cd /opt; git clone https://github.com/akopytov/sysbench.git -RUN cd /opt/sysbench; ./autogen.sh; ./configure --bindir=/usr/bin; make; make install - -ADD ./proxysql.cnf /etc/ -RUN mkdir -p /var/lib/proxysql -ADD ./compile_and_start_proxysql.sh /tmp/ -RUN chmod +x /tmp/compile_and_start_proxysql.sh - -CMD ["/tmp/compile_and_start_proxysql.sh"] diff --git a/docker/images/proxysql/legacy/proxysql/compile_and_start_proxysql.sh b/docker/images/proxysql/legacy/proxysql/compile_and_start_proxysql.sh deleted file mode 100755 index 2775ef6a75..0000000000 --- a/docker/images/proxysql/legacy/proxysql/compile_and_start_proxysql.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -if [ ! -d /opt/proxysql ]; then - mkdir -p /opt/proxysql - cp -R /tmp/proxysql-src/* /opt/proxysql - cd /opt/proxysql - make clean && make > /tmp/proxysql_compile.log -fi - -cd /opt/proxysql/src -# TODO(andrei): re-enable the commented line when figuring out interactive mode -# gdbserver 0.0.0.0:2345 ./proxysql --initial -f -c /etc/proxysql.cnf -./proxysql --initial -f -c /etc/proxysql.cnf \ No newline at end of file diff --git a/docker/images/proxysql/legacy/ubuntu-12.04-build/proxysql.ctl b/docker/images/proxysql/legacy/ubuntu-12.04-build/proxysql.ctl deleted file mode 100644 index e04fbf2b3f..0000000000 --- a/docker/images/proxysql/legacy/ubuntu-12.04-build/proxysql.ctl +++ /dev/null @@ -1,24 +0,0 @@ -Section: misc -Priority: optional -Homepage: http://www.proxysql.com -Standards-Version: 3.9.2 - -Package: proxysql -Version: 2.0.0 -Maintainer: Rene Cannao -Architecture: amd64 -# Changelog: CHANGELOG.md -# Readme: README.md -Files: proxysql /usr/bin/ - etc/proxysql.cnf / - etc/init.d/proxysql / - tools/proxysql_galera_checker.sh /usr/share/proxysql/ - tools/proxysql_galera_writer.pl /usr/share/proxysql/ -Description: High performance MySQL proxy - ProxySQL is a fast, reliable MySQL proxy with advanced runtime configuration management (virtually no configuration change requires a restart). - . - It features query routing, query caching, query rewriting (for queries generated by ORMs, for example) and is most of the time a drop-in replacement for mysqld from the point of view of the application. It can be configured and remote controlled through an SQL-compatible admin interface. -File: postinst - #!/bin/sh -e - if [ ! -d /var/lib/proxysql ]; then mkdir /var/lib/proxysql ; fi - update-rc.d proxysql defaults diff --git a/docker/images/proxysql/legacy/ubuntu-14.04-build/proxysql.ctl b/docker/images/proxysql/legacy/ubuntu-14.04-build/proxysql.ctl deleted file mode 100644 index e04fbf2b3f..0000000000 --- a/docker/images/proxysql/legacy/ubuntu-14.04-build/proxysql.ctl +++ /dev/null @@ -1,24 +0,0 @@ -Section: misc -Priority: optional -Homepage: http://www.proxysql.com -Standards-Version: 3.9.2 - -Package: proxysql -Version: 2.0.0 -Maintainer: Rene Cannao -Architecture: amd64 -# Changelog: CHANGELOG.md -# Readme: README.md -Files: proxysql /usr/bin/ - etc/proxysql.cnf / - etc/init.d/proxysql / - tools/proxysql_galera_checker.sh /usr/share/proxysql/ - tools/proxysql_galera_writer.pl /usr/share/proxysql/ -Description: High performance MySQL proxy - ProxySQL is a fast, reliable MySQL proxy with advanced runtime configuration management (virtually no configuration change requires a restart). - . - It features query routing, query caching, query rewriting (for queries generated by ORMs, for example) and is most of the time a drop-in replacement for mysqld from the point of view of the application. It can be configured and remote controlled through an SQL-compatible admin interface. -File: postinst - #!/bin/sh -e - if [ ! -d /var/lib/proxysql ]; then mkdir /var/lib/proxysql ; fi - update-rc.d proxysql defaults diff --git a/docker/images/proxysql/legacy/ubuntu-15.10-build/proxysql.ctl b/docker/images/proxysql/legacy/ubuntu-15.10-build/proxysql.ctl deleted file mode 100644 index 2b2fd33577..0000000000 --- a/docker/images/proxysql/legacy/ubuntu-15.10-build/proxysql.ctl +++ /dev/null @@ -1,24 +0,0 @@ -Section: misc -Priority: optional -Homepage: http://www.proxysql.com -Standards-Version: 3.9.2 - -Package: proxysql -Version: 1.2.4 -Maintainer: Rene Cannao -Architecture: amd64 -# Changelog: CHANGELOG.md -# Readme: README.md -Files: proxysql /usr/bin/ - etc/proxysql.cnf / - etc/init.d/proxysql / - tools/proxysql_galera_checker.sh /usr/share/proxysql/ - tools/proxysql_galera_writer.pl /usr/share/proxysql/ -Description: High performance MySQL proxy - ProxySQL is a fast, reliable MySQL proxy with advanced runtime configuration management (virtually no configuration change requires a restart). - . - It features query routing, query caching, query rewriting (for queries generated by ORMs, for example) and is most of the time a drop-in replacement for mysqld from the point of view of the application. It can be configured and remote controlled through an SQL-compatible admin interface. -File: postinst - #!/bin/sh -e - if [ ! -d /var/lib/proxysql ]; then mkdir /var/lib/proxysql ; fi - update-rc.d proxysql defaults diff --git a/docker/images/proxysql/legacy/ubuntu-16.04-build/proxysql.ctl b/docker/images/proxysql/legacy/ubuntu-16.04-build/proxysql.ctl deleted file mode 100644 index e04fbf2b3f..0000000000 --- a/docker/images/proxysql/legacy/ubuntu-16.04-build/proxysql.ctl +++ /dev/null @@ -1,24 +0,0 @@ -Section: misc -Priority: optional -Homepage: http://www.proxysql.com -Standards-Version: 3.9.2 - -Package: proxysql -Version: 2.0.0 -Maintainer: Rene Cannao -Architecture: amd64 -# Changelog: CHANGELOG.md -# Readme: README.md -Files: proxysql /usr/bin/ - etc/proxysql.cnf / - etc/init.d/proxysql / - tools/proxysql_galera_checker.sh /usr/share/proxysql/ - tools/proxysql_galera_writer.pl /usr/share/proxysql/ -Description: High performance MySQL proxy - ProxySQL is a fast, reliable MySQL proxy with advanced runtime configuration management (virtually no configuration change requires a restart). - . - It features query routing, query caching, query rewriting (for queries generated by ORMs, for example) and is most of the time a drop-in replacement for mysqld from the point of view of the application. It can be configured and remote controlled through an SQL-compatible admin interface. -File: postinst - #!/bin/sh -e - if [ ! -d /var/lib/proxysql ]; then mkdir /var/lib/proxysql ; fi - update-rc.d proxysql defaults diff --git a/docker/images/proxysql/proxysql/Dockerfile b/docker/images/proxysql/proxysql/Dockerfile deleted file mode 100644 index d7173e7343..0000000000 --- a/docker/images/proxysql/proxysql/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -FROM ubuntu:14.04 -MAINTAINER Andrei Ismail - -LABEL vendor=proxysql\ - com.proxysql.type=proxysql\ - com.proxysql.os=ubuntu14\ - com.proxysql.interactive=false\ - com.proxysql.config=simple\ - com.proxysql.purpose=testing - -RUN apt-get update && apt-get install -y \ - automake \ - cmake \ - make \ - g++ \ - gcc \ - gdb \ - gdbserver \ - git \ - libmysqlclient-dev \ - libssl-dev \ - libtool \ - && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/ - -RUN cd /opt; git clone https://github.com/akopytov/sysbench.git -RUN cd /opt/sysbench; ./autogen.sh; ./configure --bindir=/usr/bin; make; make install - -ADD ./proxysql.cnf /etc/ -RUN mkdir -p /var/lib/proxysql -ADD ./compile_and_start_proxysql.sh /tmp/ -RUN chmod +x /tmp/compile_and_start_proxysql.sh - -CMD ["/tmp/compile_and_start_proxysql.sh"] diff --git a/docker/images/proxysql/proxysql/compile_and_start_proxysql.sh b/docker/images/proxysql/proxysql/compile_and_start_proxysql.sh deleted file mode 100755 index 2775ef6a75..0000000000 --- a/docker/images/proxysql/proxysql/compile_and_start_proxysql.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -if [ ! -d /opt/proxysql ]; then - mkdir -p /opt/proxysql - cp -R /tmp/proxysql-src/* /opt/proxysql - cd /opt/proxysql - make clean && make > /tmp/proxysql_compile.log -fi - -cd /opt/proxysql/src -# TODO(andrei): re-enable the commented line when figuring out interactive mode -# gdbserver 0.0.0.0:2345 ./proxysql --initial -f -c /etc/proxysql.cnf -./proxysql --initial -f -c /etc/proxysql.cnf \ No newline at end of file diff --git a/docker/images/proxysql/proxysql/proxysql.cnf b/docker/images/proxysql/proxysql/proxysql.cnf deleted file mode 100644 index 75ab202897..0000000000 --- a/docker/images/proxysql/proxysql/proxysql.cnf +++ /dev/null @@ -1,24 +0,0 @@ -datadir="/tmp" - -admin_variables = -{ - admin_credentials="admin:admin" - mysql_ifaces="0.0.0.0:6032" - refresh_interval=2000 - debug=true -} - -mysql_users = -( - { - username = "root" - password = "root" - default_hostgroup = 0 - }, - - { - username = "john" - password = "doe" - default_hostgroup = 0 - } -) \ No newline at end of file diff --git a/docker/images/proxysql/rhel-compliant/rhel6/entrypoint/entrypoint.bash b/docker/images/proxysql/rhel-compliant/rhel6/entrypoint/entrypoint.bash deleted file mode 100755 index aa4babeef2..0000000000 --- a/docker/images/proxysql/rhel-compliant/rhel6/entrypoint/entrypoint.bash +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash -set -eu - -echo "==> Build environment:" -env - -ARCH=$(rpm --eval '%{_arch}') -echo "==> '${ARCH}' architecture detected for package" - -DIST=$(cat /etc/redhat-release| sed 's/ .*//') -echo "==> '${DIST}' distro detected for package" - -echo -e "==> C compiler: ${CC} -> $(readlink -e $(type -p ${CC}))\n$(${CC} --version)" -echo -e "==> C++ compiler: ${CXX} -> $(readlink -e $(type -p ${CXX}))\n$(${CXX} --version)" -#echo -e "==> linker version:\n$ ${LD} -> $(readlink -e $(type -p ${LD}))\n$(${LD} --version)" - -echo "==> Cleaning" -# Delete package if exists -rm -f /opt/proxysql/binaries/proxysql-${CURVER}-1-${PKG_RELEASE}.${ARCH}.rpm || true -# Cleanup relic directories from a previously failed build -rm -fr /root/.pki /root/rpmbuild/{BUILDROOT,RPMS,SRPMS,BUILD,SOURCES,tmp} /opt/proxysql/proxysql /opt/proxysql/proxysql-${CURVER} || true - -# Clean and build dependancies and source -echo "==> Building" -git config --system --add safe.directory '/opt/proxysql' -cd /opt/proxysql -echo "==> ProxySQL '$(git describe --long --abbrev=7)'" -#export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD) -#echo "==> Setting SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}" -#find /opt/proxysql -not -path "/opt/proxysql/binaries/*" -exec touch -h --date=@${SOURCE_DATE_EPOCH} {} \; - -if [[ -z ${PROXYSQL_BUILD_TYPE:-} ]] ; then - deps_target="build_deps" - build_target="" -else - deps_target="build_deps_$PROXYSQL_BUILD_TYPE" - build_target="$PROXYSQL_BUILD_TYPE" -fi -#${MAKE} cleanbuild -${MAKE} ${MAKEOPT} "${deps_target}" - -if [[ -z ${build_target} ]] ; then - ${MAKE} ${MAKEOPT} -else - ${MAKE} ${MAKEOPT} "${build_target}" -fi -touch /opt/proxysql/src/proxysql - -# Prepare package files and build RPM -echo "==> Packaging" -mkdir -p proxysql/usr/bin proxysql/etc -cp src/proxysql proxysql/usr/bin/ -cp -a etc proxysql -mkdir -p proxysql/usr/share/proxysql/tools -cp -a tools/proxysql_galera_checker.sh tools/proxysql_galera_writer.pl proxysql/usr/share/proxysql/tools -mv proxysql "proxysql-${CURVER}" -tar czvf "proxysql-${CURVER}.tar.gz" proxysql-${CURVER} -mkdir -p /root/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp} -chown -R root:root /root/rpmbuild/SPECS -mv "/opt/proxysql/proxysql-${CURVER}.tar.gz" /root/rpmbuild/SOURCES -# build package -cd /root/rpmbuild && rpmbuild -ba SPECS/proxysql.spec --define "version ${CURVER}" -cp "/root/rpmbuild/RPMS/${ARCH}/proxysql-${CURVER}-1.${ARCH}.rpm" "/opt/proxysql/binaries/proxysql-${CURVER}-1-${PKG_RELEASE}.${ARCH}.rpm" -# get SHA1 of the packaged executable -mkdir -p /opt/proxysql/pkgroot/tmp -pushd /opt/proxysql/pkgroot -rpm2cpio /root/rpmbuild/RPMS/${ARCH}/proxysql-${CURVER}-1.${ARCH}.rpm | cpio -iu --to-stdout ./usr/bin/proxysql > tmp/proxysql -sha1sum tmp/proxysql | sed 's|tmp/||' | tee tmp/proxysql.sha1 -cp tmp/proxysql.sha1 ../binaries/proxysql-${CURVER}-1-${PKG_RELEASE}.${ARCH}.id-hash -popd -# cleanup -rm -fr /root/.pki /root/rpmbuild/{BUILDROOT,RPMS,SRPMS,BUILD,SOURCES,tmp} /opt/proxysql/proxysql /opt/proxysql/proxysql-${CURVER} /opt/proxysql/pkgroot diff --git a/docker/images/proxysql/rhel-compliant/rhel6/rpmmacros/.rpmmacros b/docker/images/proxysql/rhel-compliant/rhel6/rpmmacros/.rpmmacros deleted file mode 100644 index a1d0f32f01..0000000000 --- a/docker/images/proxysql/rhel-compliant/rhel6/rpmmacros/.rpmmacros +++ /dev/null @@ -1,2 +0,0 @@ -%_topdir %(echo $HOME)/rpmbuild -%_tmppath %{_topdir}/tmp \ No newline at end of file diff --git a/docker/images/proxysql/rhel-compliant/rhel6/rpmmacros/rpmbuild/SPECS/proxysql.spec b/docker/images/proxysql/rhel-compliant/rhel6/rpmmacros/rpmbuild/SPECS/proxysql.spec deleted file mode 100644 index cc528d7241..0000000000 --- a/docker/images/proxysql/rhel-compliant/rhel6/rpmmacros/rpmbuild/SPECS/proxysql.spec +++ /dev/null @@ -1,63 +0,0 @@ -# Don't try fancy stuff like debuginfo, which is useless on binary-only -# packages. Don't strip binary too -# Be sure buildpolicy set to do nothing -%define __spec_install_post %{nil} -%define debug_package %{nil} -%define __os_install_post %{_dbpath}/brp-compress - -Summary: A high-performance MySQL proxy -Name: proxysql -Version: %{version} -Release: 1 -License: GPL-3.0-only -Source: %{name}-%{version}.tar.gz -URL: https://www.proxysql.com/ -Requires: gnutls -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - -%description -%{summary} - -%prep -%setup -q - -%build -# Empty section. - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot} - -# in builddir -cp -a * %{buildroot} - -%clean -rm -rf %{buildroot} - -%post -if [ ! -d /var/run/%{name} ]; then mkdir /var/run/%{name} ; fi -if [ ! -d /var/lib/%{name} ]; then mkdir /var/lib/%{name} ; fi -if ! id -u %{name} > /dev/null 2>&1; then useradd -r -U -s /bin/false -d /var/lib/%{name} -c "ProxySQL Server" %{name}; fi -chown -R %{name}: /var/lib/%{name} /var/run/%{name} -chown root:%{name} /etc/%{name}.cnf -chmod 640 /etc/%{name}.cnf -chkconfig --add %{name} - -%preun -/etc/init.d/%{name} stop -chkconfig --del %{name} - -%postun -rm -rf /var/run/%{name} - -%files -%defattr(-,root,root,-) -%config(noreplace) %{_sysconfdir}/%{name}.cnf -%attr(640,root,%{name}) %{_sysconfdir}/%{name}.cnf -%config(noreplace) %attr(640,root,%{name}) %{_sysconfdir}/logrotate.d/%{name} -%{_bindir}/* -%{_sysconfdir}/init.d/%{name} -/usr/share/proxysql/tools/proxysql_galera_checker.sh -/usr/share/proxysql/tools/proxysql_galera_writer.pl - -%changelog diff --git a/docker/images/proxysql/rhel-compliant/rpmmacros/rpmbuild/SPECS/proxysql.spec b/docker/images/proxysql/rhel-compliant/rpmmacros/rpmbuild/SPECS/proxysql.spec index 98d5ad5255..7f152a552a 100644 --- a/docker/images/proxysql/rhel-compliant/rpmmacros/rpmbuild/SPECS/proxysql.spec +++ b/docker/images/proxysql/rhel-compliant/rpmmacros/rpmbuild/SPECS/proxysql.spec @@ -2,14 +2,14 @@ %define debug_package %{nil} %define __os_install_post %{_dbpath}/brp-compress -Summary: A high-performance MySQL proxy +Summary: A high-performance MySQL and PostgreSQL proxy Name: proxysql Version: %{version} Release: 1 License: GPL-3.0-only Source: %{name}-%{version}.tar.gz URL: https://proxysql.com/ -Requires: gnutls +Requires: gnutls, (openssl >= 3.0.0 or openssl3 >= 3.0.0) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description diff --git a/docker/images/proxysql/suse-compliant/rpmmacros/rpmbuild/SPECS/proxysql.spec b/docker/images/proxysql/suse-compliant/rpmmacros/rpmbuild/SPECS/proxysql.spec index 51e14fd05e..cf82275ba7 100644 --- a/docker/images/proxysql/suse-compliant/rpmmacros/rpmbuild/SPECS/proxysql.spec +++ b/docker/images/proxysql/suse-compliant/rpmmacros/rpmbuild/SPECS/proxysql.spec @@ -2,14 +2,14 @@ %define debug_package %{nil} %define __os_install_post %{_dbpath}/brp-compress -Summary: A high-performance MySQL proxy +Summary: A high-performance MySQL and PostgreSQL proxy Name: proxysql Version: %{version} Release: 1 License: GPL-3.0-only Source: %{name}-%{version}.tar.gz URL: https://proxysql.com/ -Requires: gnutls +Requires: gnutls, (openssl >= 3.0.0 or openssl3 >= 3.0.0) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description diff --git a/include/ProxySQL_Poll.h b/include/ProxySQL_Poll.h index 78520ac17e..406c0e9938 100644 --- a/include/ProxySQL_Poll.h +++ b/include/ProxySQL_Poll.h @@ -35,7 +35,6 @@ class ProxySQL_Poll { T **myds; unsigned long long *last_recv; unsigned long long *last_sent; - std::atomic bootstrapping_listeners; volatile int pending_listener_add; volatile int pending_listener_del; unsigned int poll_timeout; diff --git a/lib/Makefile b/lib/Makefile index 504b766ee0..0c2d605c3d 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -47,8 +47,20 @@ COREDUMPER_IDIR := $(COREDUMPER_DIR)/include CURL_DIR := $(DEPS_PATH)/curl/curl CURL_IDIR := $(CURL_DIR)/include -SSL_DIR := $(DEPS_PATH)/libssl/openssl/ -SSL_IDIR := $(SSL_DIR)/include +DISTRO := $(shell lsb_release -si 2>/dev/null || grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '"') + +ifeq ($(DISTRO), almalinux) + ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl3/*" 2>/dev/null | head -n 1) +else + ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl/*" 2>/dev/null | head -n 1) +endif + +ifneq ($(ssl_header_path),) + SSL_IDIR := $(shell dirname $(shell dirname $(ssl_header_path))) + $(info Found yash OpenSSL headers at $(SSL_IDIR)) +else + $(error Warning: OpenSSL headers not found. exiting, please install openssl.) +endif EV_DIR := $(DEPS_PATH)/libev/libev/ EV_IDIR := $(EV_DIR) diff --git a/lib/MySQL_Thread.cpp b/lib/MySQL_Thread.cpp index f9e3465c2c..5d8db5b1a1 100644 --- a/lib/MySQL_Thread.cpp +++ b/lib/MySQL_Thread.cpp @@ -1204,7 +1204,11 @@ int MySQL_Threads_Handler::listener_del(const char *iface) { } for (i=0;imypolls.pending_listener_del,0)); + while(__sync_fetch_and_add(&thr->mypolls.pending_listener_del,0)) { + // Since 'listeners_stop' is performed in 'maintenance_loops' by the + // workers this active-wait is likely to take some time. + usleep(std::min(std::max(mysql_thread___poll_timeout/20, 10000), 40000)); + } } MLM->del(idx); #ifdef SO_REUSEPORT @@ -3127,15 +3131,11 @@ void MySQL_Thread::run_BootstrapListener() { if (n) { poll_listener_add(n); assert(__sync_bool_compare_and_swap(&mypolls.pending_listener_add,n,0)); - } else { - if (GloMTH->bootstrapping_listeners == false) { - // we stop looping - mypolls.bootstrapping_listeners = false; - } } -#ifdef DEBUG - usleep(5+rand()%10); -#endif + // The delay for the active-wait is a fraction of 'poll_timeout'. Since other + // threads may be waiting on poll for further operations, checks are meaningless + // until that timeout expires (other workers make progress). + usleep(std::min(std::max(mysql_thread___poll_timeout/20, 10000), 40000) + (rand() % 2000)); } } @@ -3238,9 +3238,7 @@ void MySQL_Thread::run() { #endif // IDLE_THREADS pthread_mutex_unlock(&thread_mutex); - if (unlikely(mypolls.bootstrapping_listeners == true)) { - run_BootstrapListener(); - } + run_BootstrapListener(); // flush mysql log file GloMyLogger->flush(); diff --git a/lib/PgSQL_Data_Stream.cpp b/lib/PgSQL_Data_Stream.cpp index dfe7a86017..1e9cc80373 100644 --- a/lib/PgSQL_Data_Stream.cpp +++ b/lib/PgSQL_Data_Stream.cpp @@ -11,61 +11,6 @@ #include "openssl/x509v3.h" -/* - -in libssl 1.1.0 -struct bio_st { - const BIO_METHOD *method; - long (*callback) (struct bio_st *, int, const char *, int, long, long); - char *cb_arg; - int init; - int shutdown; - int flags; - int retry_reason; - int num; - void *ptr; - struct bio_st *next_bio; - struct bio_st *prev_bio; - int references; - uint64_t num_read; - uint64_t num_write; - CRYPTO_EX_DATA ex_data; - CRYPTO_RWLOCK *lock; -}; -*/ - -typedef int CRYPTO_REF_COUNT; - -/** - * @brief This is the 'bio_st' struct definition from libssl 3.0.0. NOTE: This is an internal struct from - * OpenSSL library, currently it's used for performing checks on the reads/writes performed on the BIO objects. - * It's extremely important to keep this struct up to date with each OpenSSL dependency update. - */ -struct bio_st { - OSSL_LIB_CTX* libctx; - const BIO_METHOD* method; - /* bio, mode, argp, argi, argl, ret */ -#ifndef OPENSSL_NO_DEPRECATED_3_0 - BIO_callback_fn callback; -#endif - BIO_callback_fn_ex callback_ex; - char* cb_arg; /* first argument for the callback */ - int init; - int shutdown; - int flags; /* extra storage */ - int retry_reason; - int num; - void* ptr; - struct bio_st* next_bio; /* used by filter BIOs */ - struct bio_st* prev_bio; /* used by filter BIOs */ - CRYPTO_REF_COUNT references; - uint64_t num_read; - uint64_t num_write; - CRYPTO_EX_DATA ex_data; - CRYPTO_RWLOCK* lock; -}; - - #define RESULTSET_BUFLEN_DS_16K 16000 #define RESULTSET_BUFLEN_DS_1M 1000*1024 @@ -602,8 +547,8 @@ int PgSQL_Data_Stream::read_from_net() { //ssize_t n = read(fd, buf, sizeof(buf)); int n = recv(fd, buf, sizeof(buf), 0); //proxy_info("SSL recv of %d bytes\n", n); - proxy_debug(PROXY_DEBUG_NET, 7, "Session=%p: recv() read %d bytes. num_write: %lu , num_read: %lu\n", sess, n, rbio_ssl->num_write, rbio_ssl->num_read); - if (n > 0 || rbio_ssl->num_write > rbio_ssl->num_read) { + proxy_debug(PROXY_DEBUG_NET, 7, "Session=%p: recv() read %d bytes. num_write: %lu , num_read: %lu\n", sess, n, BIO_number_written(rbio_ssl), BIO_number_read(rbio_ssl)); + if (n > 0 || BIO_number_written(rbio_ssl) > BIO_number_read(rbio_ssl)) { //on_read_cb(buf, (size_t)n); char buf2[MY_SSL_BUFFER]; @@ -728,7 +673,7 @@ int PgSQL_Data_Stream::write_to_net() { if (encrypted == false) { return 0; } - if (ssl_write_len == 0 && wbio_ssl->num_write == wbio_ssl->num_read) { + if (ssl_write_len == 0 && BIO_number_written(wbio_ssl) == BIO_number_read(wbio_ssl)) { return 0; } } @@ -738,7 +683,7 @@ int PgSQL_Data_Stream::write_to_net() { bytes_io = SSL_write(ssl, queue_r_ptr(queueOUT), s); //proxy_info("Used SSL_write to write %d bytes\n", bytes_io); proxy_debug(PROXY_DEBUG_NET, 7, "Session=%p, Datastream=%p: SSL_write() wrote %d bytes . queueOUT before: %u\n", sess, this, bytes_io, queue_data(queueOUT)); - if (ssl_write_len || wbio_ssl->num_write > wbio_ssl->num_read) { + if (ssl_write_len || BIO_number_written(wbio_ssl) > BIO_number_read(wbio_ssl)) { //proxy_info("ssl_write_len = %d , num_write = %d , num_read = %d\n", ssl_write_len , wbio_ssl->num_write , wbio_ssl->num_read); char buf[MY_SSL_BUFFER]; do { @@ -861,7 +806,7 @@ void PgSQL_Data_Stream::set_pollout() { _pollfd->events |= POLLOUT; } if (encrypted) { - if (ssl_write_len || wbio_ssl->num_write > wbio_ssl->num_read) { + if (ssl_write_len || BIO_number_written(wbio_ssl) > BIO_number_read(wbio_ssl)) { _pollfd->events |= POLLOUT; } else { @@ -966,7 +911,7 @@ int PgSQL_Data_Stream::write_to_net_poll() { } if (call_write_to_net == false) { if (encrypted) { - if (ssl_write_len || wbio_ssl->num_write > wbio_ssl->num_read) { + if (ssl_write_len || BIO_number_written(wbio_ssl) > BIO_number_read(wbio_ssl)) { call_write_to_net = true; } } @@ -1255,7 +1200,7 @@ void PgSQL_Data_Stream::destroy_MySQL_Connection_From_Pool(bool sq) { } bool PgSQL_Data_Stream::data_in_rbio() { - if (rbio_ssl->num_write > rbio_ssl->num_read) { + if (BIO_number_written(rbio_ssl) > BIO_number_read(rbio_ssl)) { return true; } return false; diff --git a/lib/PgSQL_Thread.cpp b/lib/PgSQL_Thread.cpp index f6851f9e05..db70ee0216 100644 --- a/lib/PgSQL_Thread.cpp +++ b/lib/PgSQL_Thread.cpp @@ -1158,7 +1158,11 @@ int PgSQL_Threads_Handler::listener_del(const char* iface) { } for (i = 0; i < num_threads; i++) { PgSQL_Thread* thr = (PgSQL_Thread*)pgsql_threads[i].worker; - while (__sync_fetch_and_add(&thr->mypolls.pending_listener_del, 0)); + while (__sync_fetch_and_add(&thr->mypolls.pending_listener_del, 0)) { + // Since 'listeners_stop' is performed in 'maintenance_loops' by the + // workers this active-wait is likely to take some time. + usleep(std::min(std::max(pgsql_thread___poll_timeout/20, 10000), 40000)); + } } MLM->del(idx); #ifdef SO_REUSEPORT @@ -3006,26 +3010,19 @@ void PgSQL_Thread::run() { #endif // IDLE_THREADS pthread_mutex_unlock(&thread_mutex); - if (unlikely(mypolls.bootstrapping_listeners == true)) { - while ( // spin here if ... - (n = __sync_add_and_fetch(&mypolls.pending_listener_add, 0)) // there is a new listener to add - || - (GloPTH->bootstrapping_listeners == true) // PgSQL_Thread_Handlers has more listeners to configure - ) { - if (n) { - poll_listener_add(n); - assert(__sync_bool_compare_and_swap(&mypolls.pending_listener_add, n, 0)); - } - else { - if (GloPTH->bootstrapping_listeners == false) { - // we stop looping - mypolls.bootstrapping_listeners = false; - } - } -#ifdef DEBUG - usleep(5 + rand() % 10); -#endif + while ( // spin here if ... + (n = __sync_add_and_fetch(&mypolls.pending_listener_add, 0)) // there is a new listener to add + || + (GloPTH->bootstrapping_listeners == true) // PgSQL_Thread_Handlers has more listeners to configure + ) { + if (n) { + poll_listener_add(n); + assert(__sync_bool_compare_and_swap(&mypolls.pending_listener_add, n, 0)); } + // The delay for the active-wait is a fraction of 'poll_timeout'. Since other + // threads may be waiting on poll for further operations, checks are meaningless + // until that timeout expires (other workers make progress). + usleep(std::min(std::max(pgsql_thread___poll_timeout/20, 10000), 40000) + (rand() % 2000)); } proxy_debug(PROXY_DEBUG_NET, 7, "poll_timeout=%u\n", mypolls.poll_timeout); diff --git a/lib/ProxySQL_Poll.cpp b/lib/ProxySQL_Poll.cpp index 66135ad673..425bca51d9 100644 --- a/lib/ProxySQL_Poll.cpp +++ b/lib/ProxySQL_Poll.cpp @@ -68,7 +68,6 @@ ProxySQL_Poll::ProxySQL_Poll() { len=0; pending_listener_add=0; pending_listener_del=0; - bootstrapping_listeners = true; size=MIN_POLL_LEN; fds=(struct pollfd *)malloc(size*sizeof(struct pollfd)); myds=(T**)malloc(size*sizeof(T *)); diff --git a/lib/mysql_data_stream.cpp b/lib/mysql_data_stream.cpp index d08791ef3d..d25414e877 100644 --- a/lib/mysql_data_stream.cpp +++ b/lib/mysql_data_stream.cpp @@ -14,93 +14,6 @@ using json = nlohmann::json; #include "openssl/x509v3.h" - -/** - * @brief This is the 'bio_st' struct definition from libssl. NOTE: This is an internal struct from - * OpenSSL library, currently it's used for performing checks on the reads/writes performed on the BIO objects. - * It's extremely important to keep this struct up to date with each OpenSSL dependency update. - */ -typedef int CRYPTO_REF_COUNT; - -#if (OPENSSL_VERSION_NUMBER & 0xFFFF0000) == 0x10100000 -#pragma message "libssl 1.1.x detected" -struct bio_st { - const BIO_METHOD *method; - /* bio, mode, argp, argi, argl, ret */ - BIO_callback_fn callback; - BIO_callback_fn_ex callback_ex; - char *cb_arg; /* first argument for the callback */ - int init; - int shutdown; - int flags; /* extra storage */ - int retry_reason; - int num; - void *ptr; - struct bio_st *next_bio; /* used by filter BIOs */ - struct bio_st *prev_bio; /* used by filter BIOs */ - CRYPTO_REF_COUNT references; - uint64_t num_read; - uint64_t num_write; - CRYPTO_EX_DATA ex_data; - CRYPTO_RWLOCK *lock; -}; - -#elif (OPENSSL_VERSION_NUMBER & 0xFFFF0000) == 0x30000000 || (OPENSSL_VERSION_NUMBER & 0xFFFF0000) == 0x30100000 -#pragma message "libssl 3.0.x / 3.1.x detected" -struct bio_st { - OSSL_LIB_CTX *libctx; - const BIO_METHOD *method; - /* bio, mode, argp, argi, argl, ret */ -#ifndef OPENSSL_NO_DEPRECATED_3_0 - BIO_callback_fn callback; -#endif - BIO_callback_fn_ex callback_ex; - char *cb_arg; /* first argument for the callback */ - int init; - int shutdown; - int flags; /* extra storage */ - int retry_reason; - int num; - void *ptr; - struct bio_st *next_bio; /* used by filter BIOs */ - struct bio_st *prev_bio; /* used by filter BIOs */ - CRYPTO_REF_COUNT references; - uint64_t num_read; - uint64_t num_write; - CRYPTO_EX_DATA ex_data; - CRYPTO_RWLOCK *lock; -}; - -#elif (OPENSSL_VERSION_NUMBER & 0xFFFF0000) == 0x30200000 || (OPENSSL_VERSION_NUMBER & 0xFFFF0000) == 0x30300000 -#pragma message "libssl 3.2.x / 3.3.x detected" -struct bio_st { - OSSL_LIB_CTX *libctx; - const BIO_METHOD *method; - /* bio, mode, argp, argi, argl, ret */ -#ifndef OPENSSL_NO_DEPRECATED_3_0 - BIO_callback_fn callback; -#endif - BIO_callback_fn_ex callback_ex; - char *cb_arg; /* first argument for the callback */ - int init; - int shutdown; - int flags; /* extra storage */ - int retry_reason; - int num; - void *ptr; - struct bio_st *next_bio; /* used by filter BIOs */ - struct bio_st *prev_bio; /* used by filter BIOs */ - CRYPTO_REF_COUNT references; - uint64_t num_read; - uint64_t num_write; - CRYPTO_EX_DATA ex_data; -}; - -#else -#error "libssl version not supported: OPENSSL_VERSION_NUMBER = " ##OPENSSL_VERSION_NUMBER -#endif - - #define RESULTSET_BUFLEN_DS_16K 16000 #define RESULTSET_BUFLEN_DS_1M 1000*1024 @@ -606,9 +519,9 @@ int MySQL_Data_Stream::read_from_net() { } char buf[MY_SSL_BUFFER]; int ssl_recv_bytes = recv(fd, buf, sizeof(buf), 0); - proxy_debug(PROXY_DEBUG_NET, 7, "Session=%p: recv() read %d bytes. num_write: %lu , num_read: %lu\n", sess, ssl_recv_bytes, rbio_ssl->num_write , rbio_ssl->num_read); + proxy_debug(PROXY_DEBUG_NET, 7, "Session=%p: recv() read %d bytes. num_write: %lu , num_read: %lu\n", sess, ssl_recv_bytes, BIO_number_written(rbio_ssl) , BIO_number_read(rbio_ssl)); - if (ssl_recv_bytes > 0 || rbio_ssl->num_write > rbio_ssl->num_read) { + if (ssl_recv_bytes > 0 || BIO_number_written(rbio_ssl) > BIO_number_read(rbio_ssl)) { char buf2[MY_SSL_BUFFER]; int n2; enum sslstatus status; @@ -731,7 +644,7 @@ int MySQL_Data_Stream::write_to_net() { if (encrypted == false) { return 0; } - if (ssl_write_len == 0 && wbio_ssl->num_write == wbio_ssl->num_read) { + if (ssl_write_len == 0 && BIO_number_written(wbio_ssl) == BIO_number_read(wbio_ssl)) { return 0; } } @@ -741,7 +654,7 @@ int MySQL_Data_Stream::write_to_net() { bytes_io = SSL_write (ssl, queue_r_ptr(queueOUT), s); //proxy_info("Used SSL_write to write %d bytes\n", bytes_io); proxy_debug(PROXY_DEBUG_NET, 7, "Session=%p, Datastream=%p: SSL_write() wrote %d bytes . queueOUT before: %u\n", sess, this, bytes_io, queue_data(queueOUT)); - if (ssl_write_len || wbio_ssl->num_write > wbio_ssl->num_read) { + if (ssl_write_len || BIO_number_written(wbio_ssl) > BIO_number_read(wbio_ssl)) { //proxy_info("ssl_write_len = %d , num_write = %d , num_read = %d\n", ssl_write_len , wbio_ssl->num_write , wbio_ssl->num_read); char buf[MY_SSL_BUFFER]; do { @@ -857,7 +770,7 @@ void MySQL_Data_Stream::set_pollout() { _pollfd->events |= POLLOUT; } if (encrypted) { - if (ssl_write_len || wbio_ssl->num_write > wbio_ssl->num_read) { + if (ssl_write_len || BIO_number_written(wbio_ssl) > BIO_number_read(wbio_ssl)) { _pollfd->events |= POLLOUT; } else { if (!SSL_is_init_finished(ssl)) { @@ -955,7 +868,7 @@ int MySQL_Data_Stream::write_to_net_poll() { } if (call_write_to_net == false) { if (encrypted) { - if (ssl_write_len || wbio_ssl->num_write > wbio_ssl->num_read) { + if (ssl_write_len || BIO_number_written(wbio_ssl) > BIO_number_read(wbio_ssl)) { call_write_to_net = true; } } @@ -1629,7 +1542,7 @@ void MySQL_Data_Stream::destroy_MySQL_Connection_From_Pool(bool sq) { } bool MySQL_Data_Stream::data_in_rbio() { - if (rbio_ssl->num_write > rbio_ssl->num_read) { + if (BIO_number_written(rbio_ssl) > BIO_number_read(rbio_ssl)) { return true; } return false; diff --git a/src/Makefile b/src/Makefile index ee7b9f50f3..4da9e31e6c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -81,9 +81,28 @@ CURL_PATH := $(DEPS_PATH)/curl/curl CURL_IDIR := $(CURL_PATH)/include CURL_LDIR := $(CURL_PATH)/lib/.libs -SSL_PATH := $(DEPS_PATH)/libssl/openssl/ -SSL_IDIR := $(SSL_PATH)/include -SSL_LDIR := $(SSL_PATH) +DISTRO := $(shell lsb_release -si 2>/dev/null || grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '"') + +ifeq ($(DISTRO), almalinux) + ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl3/*" 2>/dev/null | head -n 1) + LIB_SSL_PATH := $(shell find /usr /usr/local /opt -name "libssl.so.3" 2>/dev/null | head -n 1) + LIB_CRYPTO_PATH := $(shell find /usr /usr/local /opt -name "libcrypto.so.3" 2>/dev/null | head -n 1) + SSL_LDIR := $(dir $(LIB_SSL_PATH)) +else + ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl/*" 2>/dev/null | head -n 1) + LIB_SSL_PATH := $(shell find /usr /usr/local /opt -name "libssl.so" 2>/dev/null | head -n 1) + LIB_CRYPTO_PATH := $(shell find /usr /usr/local /opt -name "libcrypto.so" 2>/dev/null | head -n 1) + SSL_LDIR := $(dir $(LIB_SSL_PATH)) +endif + +ifneq ($(ssl_header_path),) + SSL_IDIR := $(shell dirname $(shell dirname $(ssl_header_path))) + $(info Found OpenSSL headers at $(SSL_IDIR)) + $(info OpenSSL lib full path is $(LIB_SSL_PATH)) + $(info OpenSSL libs directory is $(SSL_LDIR)) +else + $(error Warning: OpenSSL headers not found. exiting, please install openssl.) +endif EV_PATH := $(DEPS_PATH)/libev/libev/ EV_IDIR := $(EV_PATH) @@ -174,7 +193,7 @@ endif MYCXXFLAGS += $(IDIRS) $(OPTZ) $(DEBUG) $(PSQLCH) -DGITVERSION=\"$(GIT_VERSION)\" $(NOJEM) $(WGCOV) $(WASAN) -STATICMYLIBS := -Wl,-Bstatic -lconfig -lproxysql -ldaemon -lconfig++ -lre2 -lpcrecpp -lpcre -lmariadbclient -lhttpserver -lmicrohttpd -linjection -lcurl -lssl -lcrypto -lev -lscram -lusual -lpq -lpgcommon -lpgport +STATICMYLIBS := -Wl,-Bstatic -lconfig -lproxysql -ldaemon -lconfig++ -lre2 -lpcrecpp -lpcre -lmariadbclient -lhttpserver -lmicrohttpd -linjection -lcurl -lev -lscram -lusual -lpq -lpgcommon -lpgport ifneq ($(NOJEMALLOC),1) STATICMYLIBS += -ljemalloc endif @@ -182,7 +201,12 @@ ifeq ($(UNAME_S),Linux) STATICMYLIBS += -lcoredumper endif -MYLIBS := -Wl,--export-dynamic $(STATICMYLIBS) -Wl,-Bdynamic -lgnutls -lpthread -lm -lz -lrt -lprometheus-cpp-pull -lprometheus-cpp-core -luuid $(EXTRALINK) +ifeq ($(DISTRO), almalinux) + MYLIBS := -Wl,--export-dynamic $(STATICMYLIBS) -Wl,-Bdynamic -lgnutls -lpthread $(LIB_SSL_PATH) $(LIB_CRYPTO_PATH) -lm -lz -lrt -lprometheus-cpp-pull -lprometheus-cpp-core -luuid $(EXTRALINK) +else + MYLIBS := -Wl,--export-dynamic $(STATICMYLIBS) -Wl,-Bdynamic -lgnutls -lpthread -lssl -lcrypto -lm -lz -lrt -lprometheus-cpp-pull -lprometheus-cpp-core -luuid $(EXTRALINK) +endif + ifeq ($(UNAME_S),Darwin) MYLIBS :=-lre2 -lmariadbclient -lpq -lpthread -lm -lz -liconv -lgnutls -lprometheus-cpp-pull -lprometheus-cpp-core -luuid else @@ -215,8 +239,6 @@ ifeq ($(UNAME_S),Darwin) LIBPROXYSQLAR += $(LIBINJECTION_LDIR)/libinjection.a LIBPROXYSQLAR += $(EV_LDIR)/libev.a endif -LIBPROXYSQLAR += $(SSL_LDIR)/libssl.a -LIBPROXYSQLAR += $(SSL_LDIR)/libcrypto.a LIBPROXYSQLAR += $(CITYHASH_LDIR)/libcityhash.a ODIR := obj diff --git a/src/main.cpp b/src/main.cpp index 4a60035fe4..f195bea157 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -338,6 +338,17 @@ static void init_locks(void) { } +static bool check_openssl_version() { + unsigned long version = OpenSSL_version_num(); + const unsigned long OPENSSL_3_0_0 = 0x30000000L; + + proxy_info("Using OpenSSL version: %s\n", OpenSSL_version(OPENSSL_VERSION)); + if (version < OPENSSL_3_0_0) { + proxy_error("%s\n", "ProxySQL server required openssl version 3.0.0 or above"); + return false; + } + return true; +} void ProxySQL_Main_init_SSL_module() { @@ -346,7 +357,6 @@ void ProxySQL_Main_init_SSL_module() { proxy_error("%s\n", SSL_alert_desc_string_long(rc)); } init_locks(); - proxy_info("Using OpenSSL version: %s\n", OpenSSL_version(OPENSSL_VERSION)); SSL_METHOD *ssl_method; OpenSSL_add_all_algorithms(); SSL_load_error_strings(); @@ -2289,6 +2299,9 @@ int main(int argc, const char * argv[]) { if (rc) { exit(EXIT_FAILURE); } } + if (check_openssl_version() == false) { + exit(EXIT_FAILURE); + } #ifdef DEBUG { diff --git a/test/Makefile b/test/Makefile index 9842ffd591..7b1ece3d95 100644 --- a/test/Makefile +++ b/test/Makefile @@ -43,8 +43,14 @@ MICROHTTPD_IDIR := $(MICROHTTPD_PATH)/src/include CURL_PATH := $(DEPS_PATH)/curl/curl CURL_IDIR := -I$(CURL_PATH)/include -SSL_PATH := $(DEPS_PATH)/libssl/openssl/ -SSL_IDIR := $(SSL_PATH)/include +ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl/*" 2>/dev/null | head -n 1) + +ifneq ($(ssl_header_path),) + SSL_IDIR := $(shell dirname $(ssl_header_path)) + $(info Found OpenSSL headers at $(SSL_IDIR)) +else + $(error Warning: OpenSSL headers not found. exiting, please install openssl.) +endif EV_PATH := $(DEPS_PATH)/libev/libev/ EV_IDIR := $(EV_PATH) diff --git a/test/deps/Makefile b/test/deps/Makefile index 90c2bcb348..0eabf53c1a 100644 --- a/test/deps/Makefile +++ b/test/deps/Makefile @@ -20,7 +20,7 @@ mariadb-connector-c/mariadb-connector-c/libmariadb/libmariadbclient.a: cd mariadb-connector-c && tar -zxf mariadb-connector-c-*.tar.gz cd mariadb-connector-c/mariadb-connector-c && patch -p0 < ../CMakeLists.txt.patch cd mariadb-connector-c/mariadb-connector-c && patch -p0 < ../ConnectorName.cmake.patch - cd mariadb-connector-c/mariadb-connector-c && cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENSSL_ROOT_DIR=$(DEPS_PATH)/libssl/openssl/ + cd mariadb-connector-c/mariadb-connector-c && cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo cd mariadb-connector-c/mariadb-connector-c && CC=${CC} CXX=${CXX} ${MAKE} mariadbclient mariadb_client: mariadb-connector-c/mariadb-connector-c/libmariadb/libmariadbclient.a @@ -32,7 +32,7 @@ mysql-connector-c/mysql-connector-c/libmysql/libmysqlclient.a: mysql-connector-c cd mysql-connector-c && rm -rf mysql-*/ || true cd mysql-connector-c && tar -zxf mysql-boost-5.7.*.tar.gz cd mysql-connector-c && ln -fsT $$(ls -1d mysql-5.7.*/) mysql-connector-c - cd mysql-connector-c/mysql-connector-c && cmake . -DWITH_BOOST=./boost -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O0 -ggdb -DNDEBUG -fPIC" -DOPENSSL_ROOT_DIR=$(DEPS_PATH)/libssl/openssl + cd mysql-connector-c/mysql-connector-c && cmake . -DWITH_BOOST=./boost -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O0 -ggdb -DNDEBUG -fPIC" cd mysql-connector-c/mysql-connector-c && CC=${CC} CXX=${CXX} ${MAKE} mysqlclient mysql cd mysql-connector-c/mysql-connector-c && cp archive_output_directory/libmysqlclient.a libmysql/ @@ -47,7 +47,7 @@ mysql-connector-c-8.4.0/mysql-connector-c/libmysql/libmysqlclient.a: mysql-conne cd mysql-connector-c-8.4.0 && ln -fsT $$(ls -1d mysql-8.4.*/) mysql-connector-c cd mysql-connector-c-8.4.0/mysql-connector-c && cmake . -DFORCE_INSOURCE_BUILD=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DWITHOUT_SERVER=ON -DDOWNLOAD_BOOST=1 -DWITH_BOOST=./mysql-server/downloads/ -DWITH_UNIT_TESTS=OFF \ - -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O0 -ggdb -DNDEBUG -fPIC" -DOPENSSL_ROOT_DIR=$(DEPS_PATH)/libssl/openssl + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O0 -ggdb -DNDEBUG -fPIC" cd mysql-connector-c-8.4.0/mysql-connector-c && CC=${CC} CXX=${CXX} ${MAKE} cd mysql-connector-c-8.4.0/mysql-connector-c && cp archive_output_directory/libmysqlclient.a libmysql/ diff --git a/test/tap/tap/Makefile b/test/tap/tap/Makefile index aa7fb3486f..a39395352e 100644 --- a/test/tap/tap/Makefile +++ b/test/tap/tap/Makefile @@ -92,27 +92,26 @@ default: all .PHONY: all all: libtap_mariadb.a libtap_mysql57.a libtap_mysql8.a \ - libtap.so libssl.so.3 libcrypto.so.3 libcpp_dotenv.so libre2.so + libtap.so libcpp_dotenv.so libre2.so debug: OPT := $(STDCPP) -O0 -DDEBUG -ggdb -Wl,--no-as-needed $(WASAN) debug: libtap_mariadb.a libtap_mysql57.a libtap_mysql8.a libtap.so - ### helper targets -command_line.o: command_line.cpp cpp-dotenv/static/cpp-dotenv/libcpp_dotenv.a libcurl.so libssl.so.3 libcrypto.so.3 libcpp_dotenv.so +command_line.o: command_line.cpp cpp-dotenv/static/cpp-dotenv/libcpp_dotenv.a libcurl.so -lssl -lcrypto libcpp_dotenv.so $(CXX) -fPIC -c command_line.cpp $(IDIRS) $(OPT) -utils_mariadb.o: utils.cpp cpp-dotenv/static/cpp-dotenv/libcpp_dotenv.a libcurl.so libssl.so.3 libcrypto.so.3 libcpp_dotenv.so +utils_mariadb.o: utils.cpp cpp-dotenv/static/cpp-dotenv/libcpp_dotenv.a libcurl.so -lssl -lcrypto libcpp_dotenv.so $(CXX) -fPIC -c utils.cpp $(IDIRS) -I$(MARIADB_IDIR) $(OPT) -o $@ -utils_mysql57.o: utils.cpp cpp-dotenv/static/cpp-dotenv/libcpp_dotenv.a libcurl.so libssl.so.3 libcrypto.so.3 libcpp_dotenv.so +utils_mysql57.o: utils.cpp cpp-dotenv/static/cpp-dotenv/libcpp_dotenv.a libcurl.so -lssl -lcrypto libcpp_dotenv.so $(CXX) -DDISABLE_WARNING_COUNT_LOGGING -fPIC -c utils.cpp $(IDIRS) -I$(TEST_MYSQL_IDIR) -I$(TEST_MYSQL_EDIR) $(OPT) -o $@ -utils_mysql8.o: utils.cpp cpp-dotenv/static/cpp-dotenv/libcpp_dotenv.a libcurl.so libssl.so.3 libcrypto.so.3 libcpp_dotenv.so +utils_mysql8.o: utils.cpp cpp-dotenv/static/cpp-dotenv/libcpp_dotenv.a libcurl.so -lssl -lcrypto libcpp_dotenv.so $(CXX) -DDISABLE_WARNING_COUNT_LOGGING -fPIC -c utils.cpp $(IDIRS) -I$(TEST_MYSQL8_IDIR) -I$(TEST_MYSQL_EDIR) $(OPT) -o $@ -tap.o: tap.cpp cpp-dotenv/static/cpp-dotenv/libcpp_dotenv.a libcurl.so libssl.so.3 libcrypto.so.3 libcpp_dotenv.so +tap.o: tap.cpp cpp-dotenv/static/cpp-dotenv/libcpp_dotenv.a libcurl.so -lssl -lcrypto libcpp_dotenv.so $(CXX) -fPIC -c tap.cpp $(IDIRS) $(OPT) libtap_mariadb.a: tap.o command_line.o utils_mariadb.o cpp-dotenv/static/cpp-dotenv/libcpp_dotenv.a @@ -130,12 +129,6 @@ libtap.so: libtap_mariadb.a cpp-dotenv/dynamic/cpp-dotenv/libcpp_dotenv.so libre ### tap deps targets -libssl.so.3: $(DEPS_PATH)/libssl/openssl/libssl.so.3 - cp -a $(DEPS_PATH)/libssl/openssl/libssl.so* . - -libcrypto.so.3: $(DEPS_PATH)/libssl/openssl/libcrypto.so.3 - cp -a $(DEPS_PATH)/libssl/openssl/libcrypto.so* . - libcpp_dotenv.so: cpp-dotenv/dynamic/cpp-dotenv/libcpp_dotenv.so find cpp-dotenv/dynamic/cpp-dotenv/ -name '*.so' -exec cp -a {} . \; diff --git a/test/tap/tests/Makefile b/test/tap/tests/Makefile index 76fb0b23ee..488659cc8f 100644 --- a/test/tap/tests/Makefile +++ b/test/tap/tests/Makefile @@ -62,9 +62,23 @@ LIBINJECTION_DIR := $(DEPS_PATH)/libinjection/libinjection LIBINJECTION_IDIR := $(LIBINJECTION_DIR)/src LIBINJECTION_LDIR := $(LIBINJECTION_DIR)/src -SSL_DIR := $(DEPS_PATH)/libssl/openssl/ -SSL_IDIR := $(SSL_DIR)/include -SSL_LDIR := $(SSL_DIR) +libssl_path := $(shell find /usr /usr/local /opt -name "libssl.so" 2>/dev/null | head -n 1) + +ifneq ($(libssl_path),) + SSL_LDIR := $(dir $(libssl_path)) + $(info Found OpenSSL libs at $(SSL_LDIR)) +else + $(error Warning: OpenSSL library not found. exiting, please install openssl.) +endif + +ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl/*" 2>/dev/null | head -n 1) + +ifneq ($(ssl_header_path),) + SSL_IDIR := $(shell dirname $(ssl_header_path)) + $(info Found OpenSSL headers at $(SSL_IDIR)) +else + $(error Warning: OpenSSL headers not found. exiting, please install openssl.) +endif EV_DIR := $(DEPS_PATH)/libev/libev/ EV_IDIR := $(EV_DIR) diff --git a/test/tap/tests/reg_test_4402-mysql_fields-t.cpp b/test/tap/tests/reg_test_4402-mysql_fields-t.cpp index ff0d3e5869..12dac63f5d 100644 --- a/test/tap/tests/reg_test_4402-mysql_fields-t.cpp +++ b/test/tap/tests/reg_test_4402-mysql_fields-t.cpp @@ -106,7 +106,9 @@ int main(int argc, char** argv) { // to check table alias issue: { - const std::string& query = "SELECT data FROM testdb.dummy_table AS " + generate_random_string(length); + // NOTE: The randomly generated string should be escaped \`\`, otherwise could collide + // with SQL reserved words, causing an invalid test failure. + const std::string& query = "SELECT data FROM testdb.dummy_table AS `" + generate_random_string(length) + "`"; MYSQL_QUERY__(proxysql, query.c_str()); MYSQL_RES* res = mysql_use_result(proxysql); diff --git a/test/tap/tests_with_deps/common_defs.Makefile b/test/tap/tests_with_deps/common_defs.Makefile index 41542d7a4d..0ad21d3d7f 100644 --- a/test/tap/tests_with_deps/common_defs.Makefile +++ b/test/tap/tests_with_deps/common_defs.Makefile @@ -44,9 +44,23 @@ LIBINJECTION_DIR=$(DEPS_PATH)/libinjection/libinjection LIBINJECTION_IDIR=$(LIBINJECTION_DIR)/src LIBINJECTION_LDIR=$(LIBINJECTION_DIR)/src -SSL_DIR=$(DEPS_PATH)/libssl/openssl/ -SSL_IDIR=$(SSL_DIR)/include -SSL_LDIR=$(SSL_DIR) +libssl_path := $(shell find /usr /usr/local /opt -name "libssl.so" 2>/dev/null | head -n 1) + +ifneq ($(libssl_path),) + SSL_LDIR := $(dir $(libssl_path)) + $(info Found OpenSSL libs at $(SSL_LDIR)) +else + $(error Warning: OpenSSL library not found. exiting, please install openssl.) +endif + +ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl/*" 2>/dev/null | head -n 1) + +ifneq ($(ssl_header_path),) + SSL_IDIR := $(shell dirname $(ssl_header_path)) + $(info Found OpenSSL headers at $(SSL_IDIR)) +else + $(error Warning: OpenSSL headers not found. exiting, please install openssl.) +endif EV_DIR=$(DEPS_PATH)/libev/libev/ EV_IDIR=$(EV_DIR) diff --git a/test/tap/tests_with_deps/deprecate_eof_support/Makefile b/test/tap/tests_with_deps/deprecate_eof_support/Makefile index 32db6d7624..f259ebc3dc 100644 --- a/test/tap/tests_with_deps/deprecate_eof_support/Makefile +++ b/test/tap/tests_with_deps/deprecate_eof_support/Makefile @@ -50,9 +50,23 @@ MICROHTTPD_DIR := $(DEPS_PATH)/libmicrohttpd/libmicrohttpd/src MICROHTTPD_IDIR := $(MICROHTTPD_DIR)/include MICROHTTPD_LDIR := $(MICROHTTPD_DIR)/microhttpd/.libs -SSL_DIR := $(DEPS_PATH)/libssl/openssl/ -SSL_IDIR := $(SSL_DIR)/include -SSL_LDIR := $(SSL_DIR) +libssl_path := $(shell find /usr /usr/local /opt -name "libssl.so" 2>/dev/null | head -n 1) + +ifneq ($(libssl_path),) + SSL_LDIR := $(dir $(libssl_path)) + $(info Found OpenSSL libs at $(SSL_LDIR)) +else + $(error Warning: OpenSSL library not found. exiting, please install openssl.) +endif + +ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl/*" 2>/dev/null | head -n 1) + +ifneq ($(ssl_header_path),) + SSL_IDIR := $(shell dirname $(ssl_header_path)) + $(info Found OpenSSL headers at $(SSL_IDIR)) +else + $(error Warning: OpenSSL headers not found. exiting, please install openssl.) +endif EV_DIR := $(DEPS_PATH)/libev/libev/ EV_IDIR := $(EV_DIR)