Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / sql / proxysql / makefiles.patch
blob6a6d003a60883b0a705381382755b54d2c8fe814
1 diff --git a/Makefile b/Makefile
2 index f8902b4f..57844bd7 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -59,11 +59,7 @@ endif
7 export MAKEOPT=-j ${NPROCS}
9 -ifeq ($(wildcard /usr/lib/systemd/system), /usr/lib/systemd/system)
10 - SYSTEMD=1
11 -else
12 - SYSTEMD=0
13 -endif
14 +SYSTEMD=1
15 USERCHECK := $(shell getent passwd proxysql)
16 GROUPCHECK := $(shell getent group proxysql)
18 @@ -303,16 +299,10 @@ cleanbuild:
20 .PHONY: install
21 install: src/proxysql
22 - install -m 0755 src/proxysql /usr/bin
23 - install -m 0600 etc/proxysql.cnf /etc
24 - if [ ! -d /var/lib/proxysql ]; then mkdir /var/lib/proxysql ; fi
25 -ifeq ($(findstring proxysql,$(USERCHECK)),)
26 - @echo "Creating proxysql user and group"
27 - useradd -r -U -s /bin/false proxysql
28 -endif
29 + install -m 0755 src/proxysql $(out)/bin
30 + install -m 0600 etc/proxysql.cnf $(out)/etc
31 ifeq ($(SYSTEMD), 1)
32 - install -m 0644 systemd/system/proxysql.service /usr/lib/systemd/system/
33 - systemctl enable proxysql.service
34 + install -m 0644 systemd/system/proxysql.service $(out)/lib/systemd/system/
35 else
36 install -m 0755 etc/init.d/proxysql /etc/init.d
37 ifeq ($(DISTRO),"CentOS Linux")
38 diff --git a/deps/Makefile b/deps/Makefile
39 index 710e070b..fd1352f6 100644
40 --- a/deps/Makefile
41 +++ b/deps/Makefile
42 @@ -69,10 +69,7 @@ default: $(tmpdefault)
45 libinjection/libinjection/src/libinjection.a:
46 - cd libinjection && rm -rf libinjection-*/ || true
47 - cd libinjection && tar -zxf libinjection-3.10.0.tar.gz
48 ifneq ($(CENTOSVER),6)
49 - cd libinjection/libinjection && patch -p1 < ../update-build-py3.diff
50 cd libinjection/libinjection && patch -p1 < ../libinjection_sqli.c.patch
51 endif
52 ifeq ($(UNAME_S),Darwin)
53 @@ -86,11 +83,7 @@ libinjection: libinjection/libinjection/src/libinjection.a
56 libssl/openssl/libssl.a:
57 - cd libssl && rm -rf openssl-openssl-*/ openssl-3*/ || true
58 - cd libssl && tar -zxf openssl-*.tar.gz
59 cd libssl && ./verify-bio_st-match.sh
60 -# cd libssl/openssl && patch crypto/ec/curve448/curve448.c < ../curve448.c-multiplication-overflow.patch
61 -# cd libssl/openssl && patch crypto/asn1/a_time.c < ../a_time.c-multiplication-overflow.patch
62 cd libssl/openssl && ./config no-ssl3 no-tests
63 cd libssl/openssl && CC=${CC} CXX=${CXX} ${MAKE}
64 cd libssl/openssl && ln -s . lib # curl wants this path
65 @@ -108,8 +101,6 @@ ifeq ($(MIN_VERSION),$(lastword $(SORTED_VERSIONS)))
66 endif
68 libhttpserver/libhttpserver/build/src/.libs/libhttpserver.a: libmicrohttpd/libmicrohttpd/src/microhttpd/.libs/libmicrohttpd.a re2/re2/obj/libre2.a
69 - cd libhttpserver && rm -rf libhttpserver-*/ || true
70 - cd libhttpserver && tar -zxf libhttpserver-*.tar.gz
71 #ifeq ($(REQUIRE_PATCH), true)
72 cd libhttpserver/libhttpserver && patch -p1 < ../noexcept.patch
73 cd libhttpserver/libhttpserver && patch -p1 < ../re2_regex.patch
74 @@ -127,8 +118,6 @@ libhttpserver: libhttpserver/libhttpserver/build/src/.libs/libhttpserver.a
77 libev/libev/.libs/libev.a:
78 - cd libev && rm -rf libev-*/ || true
79 - cd libev && tar -zxf libev-*.tar.gz
80 cd libev/libev && patch ev.c < ../ev.c-multiplication-overflow.patch
81 cd libev/libev && ./configure
82 cd libev/libev && CC=${CC} CXX=${CXX} ${MAKE}
83 @@ -144,8 +133,6 @@ coredumper/coredumper/src/libcoredumper.a:
84 coredumper: coredumper/coredumper/src/libcoredumper.a
86 curl/curl/lib/.libs/libcurl.a: libssl/openssl/libssl.a
87 - cd curl && rm -rf curl-*/ || true
88 - cd curl && tar -zxf curl-*.tar.gz
89 # 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}
90 cd curl/curl && autoreconf -fi
91 ifeq ($(UNAME_S),Darwin)
92 @@ -157,16 +144,6 @@ curl: curl/curl/lib/.libs/libcurl.a
95 libmicrohttpd/libmicrohttpd/src/microhttpd/.libs/libmicrohttpd.a:
96 - cd libmicrohttpd && rm -rf libmicrohttpd-*/ || true
97 - cd libmicrohttpd && rm -f libmicrohttpd || true
98 -ifeq ($(CENTOSVER),6)
99 - cd libmicrohttpd && ln -s libmicrohttpd-0.9.55 libmicrohttpd
100 - cd libmicrohttpd && tar -zxf libmicrohttpd-0.9.55.tar.gz
101 -else
102 - cd libmicrohttpd && ln -s libmicrohttpd-0.9.75 libmicrohttpd
103 - cd libmicrohttpd && tar -zxf libmicrohttpd-0.9.75.tar.gz
104 -# cd libmicrohttpd/libmicrohttpd && patch src/microhttpd/connection.c < ../connection.c-snprintf-overflow.patch
105 -endif
106 cd libmicrohttpd/libmicrohttpd && ./configure --enable-https && CC=${CC} CXX=${CXX} ${MAKE}
108 microhttpd: libmicrohttpd/libmicrohttpd/src/microhttpd/.libs/libmicrohttpd.a
109 @@ -182,8 +159,6 @@ cityhash: cityhash/cityhash/src/.libs/libcityhash.a
112 lz4/lz4/lib/liblz4.a:
113 - cd lz4 && rm -rf lz4-*/ || true
114 - cd lz4 && tar -zxf lz4-*.tar.gz
115 cd lz4/lz4 && CC=${CC} CXX=${CXX} ${MAKE}
117 lz4: lz4/lz4/lib/liblz4.a
118 @@ -209,8 +184,6 @@ clickhouse-cpp: clickhouse-cpp/clickhouse-cpp/clickhouse/libclickhouse-cpp-lib-s
121 libdaemon/libdaemon/libdaemon/.libs/libdaemon.a:
122 - cd libdaemon && rm -rf libdaemon-*/ || true
123 - cd libdaemon && tar -zxf libdaemon-0.14.tar.gz
124 cd libdaemon/libdaemon && patch -p0 < ../daemon_fork_umask.patch
125 cd libdaemon/libdaemon && cp ../config.guess . && chmod +x config.guess && cp ../config.sub . && chmod +x config.sub && ./configure --disable-examples
126 cd libdaemon/libdaemon && CC=${CC} CXX=${CXX} ${MAKE}
127 @@ -299,8 +272,6 @@ sqlite3: sqlite3/sqlite3/sqlite3.o
130 libconfig/libconfig/lib/.libs/libconfig++.a:
131 - cd libconfig && rm -rf libconfig-*/ || true
132 - cd libconfig && tar -zxf libconfig-*.tar.gz
133 cd libconfig/libconfig && ./configure --disable-examples
134 cd libconfig/libconfig && CC=${CC} CXX=${CXX} ${MAKE}
136 @@ -308,9 +279,6 @@ libconfig: libconfig/libconfig/lib/.libs/libconfig++.a
139 prometheus-cpp/prometheus-cpp/lib/libprometheus-cpp-core.a:
140 - cd prometheus-cpp && rm -rf prometheus-cpp-*/ || true
141 - cd prometheus-cpp && tar -zxf prometheus-cpp-*.tar.gz
142 - cd prometheus-cpp && tar --strip-components=1 -zxf civetweb-*.tar.gz -C prometheus-cpp/3rdparty/civetweb
143 cd prometheus-cpp/prometheus-cpp && patch -p1 < ../serial_exposer.patch
144 cd prometheus-cpp/prometheus-cpp && patch -p1 < ../registry_counters_reset.patch
145 cd prometheus-cpp/prometheus-cpp && patch -p1 < ../fix_old_distros.patch
146 @@ -339,8 +303,6 @@ re2: re2/re2/obj/libre2.a
149 pcre/pcre/.libs/libpcre.a:
150 - cd pcre && rm -rf pcre-*/ || true
151 - cd pcre && tar -zxf pcre-*.tar.gz
152 cd pcre/pcre && patch pcretest.c < ../pcretest.c-multiplication-overflow.patch
153 cd pcre/pcre && ./configure
154 cd pcre/pcre && CC=${CC} CXX=${CXX} ${MAKE}