Skip to content

Commit 6c3dd4c

Browse files
QATAPP-31942: Rebase Async Nginx to Nginx 1.26.2 LTS
- Mainline code rebase and nginx-tests rebase to 1.26.2 Signed-off-by: Hardik Patel <[email protected]> Co-authored-by: Yogaraj Alamenda <[email protected]>
1 parent c851263 commit 6c3dd4c

File tree

389 files changed

+41664
-13677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

389 files changed

+41664
-13677
lines changed

auto/cc/conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ else
117117
. auto/cc/acc
118118
;;
119119

120-
msvc*)
120+
msvc)
121121
# MSVC++ 6.0 SP2, MSVC++ Toolkit 2003
122122

123123
. auto/cc/msvc

auto/cc/msvc

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
# MSVC 2015 (14.0) cl 19.00
1212

1313

14-
NGX_MSVC_VER=`$NGX_WINE $CC 2>&1 | grep 'Compiler Version' 2>&1 \
15-
| sed -e 's/^.* Version \(.*\)/\1/'`
14+
NGX_MSVC_VER=`$NGX_WINE $CC 2>&1 | grep 'C/C++.* [0-9][0-9]*\.[0-9]' 2>&1 \
15+
| sed -e 's/^.* \([0-9][0-9]*\.[0-9].*\)/\1/'`
1616

1717
echo " + cl version: $NGX_MSVC_VER"
1818

@@ -22,6 +22,21 @@ have=NGX_COMPILER value="\"cl $NGX_MSVC_VER\"" . auto/define
2222
ngx_msvc_ver=`echo $NGX_MSVC_VER | sed -e 's/^\([0-9]*\).*/\1/'`
2323

2424

25+
# detect x64 builds
26+
27+
case "$NGX_MSVC_VER" in
28+
29+
*x64)
30+
NGX_MACHINE=amd64
31+
;;
32+
33+
*)
34+
NGX_MACHINE=i386
35+
;;
36+
37+
esac
38+
39+
2540
# optimizations
2641

2742
# maximize speed, equivalent to -Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy

auto/configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ if test -z "$NGX_PLATFORM"; then
4444
else
4545
echo "building for $NGX_PLATFORM"
4646
NGX_SYSTEM=$NGX_PLATFORM
47+
NGX_MACHINE=i386
4748
fi
4849

4950
. auto/cc/conf

auto/install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ install: build $NGX_INSTALL_PERL_MODULES
112112
test ! -f '\$(DESTDIR)$NGX_SBIN_PATH' \\
113113
|| mv '\$(DESTDIR)$NGX_SBIN_PATH' \\
114114
'\$(DESTDIR)$NGX_SBIN_PATH.old'
115-
cp $NGX_OBJS/nginx '\$(DESTDIR)$NGX_SBIN_PATH'
115+
cp $NGX_OBJS/nginx$ngx_binext '\$(DESTDIR)$NGX_SBIN_PATH'
116116

117117
test -d '\$(DESTDIR)$NGX_CONF_PREFIX' \\
118118
|| mkdir -p '\$(DESTDIR)$NGX_CONF_PREFIX'

auto/lib/geoip/conf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,23 @@ if [ $ngx_found = no ]; then
6464
fi
6565

6666

67+
if [ $ngx_found = no ]; then
68+
69+
# Homebrew on Apple Silicon
70+
71+
ngx_feature="GeoIP library in /opt/homebrew/"
72+
ngx_feature_path="/opt/homebrew/include"
73+
74+
if [ $NGX_RPATH = YES ]; then
75+
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lGeoIP"
76+
else
77+
ngx_feature_libs="-L/opt/homebrew/lib -lGeoIP"
78+
fi
79+
80+
. auto/feature
81+
fi
82+
83+
6784
if [ $ngx_found = yes ]; then
6885

6986
CORE_INCS="$CORE_INCS $ngx_feature_path"

auto/lib/google-perftools/conf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,22 @@ if [ $ngx_found = no ]; then
4646
fi
4747

4848

49+
if [ $ngx_found = no ]; then
50+
51+
# Homebrew on Apple Silicon
52+
53+
ngx_feature="Google perftools in /opt/homebrew/"
54+
55+
if [ $NGX_RPATH = YES ]; then
56+
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lprofiler"
57+
else
58+
ngx_feature_libs="-L/opt/homebrew/lib -lprofiler"
59+
fi
60+
61+
. auto/feature
62+
fi
63+
64+
4965
if [ $ngx_found = yes ]; then
5066
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
5167

auto/lib/libatomic/conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ else
1919
#include <atomic_ops.h>"
2020
ngx_feature_path=
2121
ngx_feature_libs="-latomic_ops"
22-
ngx_feature_test="long n = 0;
22+
ngx_feature_test="AO_t n = 0;
2323
if (!AO_compare_and_swap(&n, 0, 1))
2424
return 1;
2525
if (AO_fetch_and_add(&n, 1) != 1)

auto/lib/libgd/conf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,23 @@ if [ $ngx_found = no ]; then
6565
fi
6666

6767

68+
if [ $ngx_found = no ]; then
69+
70+
# Homebrew on Apple Silicon
71+
72+
ngx_feature="GD library in /opt/homebrew/"
73+
ngx_feature_path="/opt/homebrew/include"
74+
75+
if [ $NGX_RPATH = YES ]; then
76+
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lgd"
77+
else
78+
ngx_feature_libs="-L/opt/homebrew/lib -lgd"
79+
fi
80+
81+
. auto/feature
82+
fi
83+
84+
6885
if [ $ngx_found = yes ]; then
6986

7087
CORE_INCS="$CORE_INCS $ngx_feature_path"

auto/lib/openssl/conf

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,19 @@
55

66
if [ $OPENSSL != NONE ]; then
77

8+
have=NGX_OPENSSL . auto/have
9+
have=NGX_SSL . auto/have
10+
11+
have=NGX_OPENSSL_NO_CONFIG . auto/have
12+
13+
if [ $USE_OPENSSL_QUIC = YES ]; then
14+
have=NGX_QUIC . auto/have
15+
have=NGX_QUIC_OPENSSL_COMPAT . auto/have
16+
fi
17+
818
case "$CC" in
919

1020
cl | bcc32)
11-
have=NGX_OPENSSL . auto/have
12-
have=NGX_SSL . auto/have
13-
1421
CFLAGS="$CFLAGS -DNO_SYS_TYPES_H"
1522

1623
CORE_INCS="$CORE_INCS $OPENSSL/openssl/include"
@@ -33,9 +40,6 @@ if [ $OPENSSL != NONE ]; then
3340
;;
3441

3542
*)
36-
have=NGX_OPENSSL . auto/have
37-
have=NGX_SSL . auto/have
38-
3943
CORE_INCS="$CORE_INCS $OPENSSL/.openssl/include"
4044
CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h"
4145
CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"
@@ -118,11 +122,58 @@ else
118122
. auto/feature
119123
fi
120124

125+
if [ $ngx_found = no ]; then
126+
127+
# Homebrew on Apple Silicon
128+
129+
ngx_feature="OpenSSL library in /opt/homebrew/"
130+
ngx_feature_path="/opt/homebrew/include"
131+
132+
if [ $NGX_RPATH = YES ]; then
133+
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lssl -lcrypto"
134+
else
135+
ngx_feature_libs="-L/opt/homebrew/lib -lssl -lcrypto"
136+
fi
137+
138+
ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
139+
140+
. auto/feature
141+
fi
142+
121143
if [ $ngx_found = yes ]; then
122144
have=NGX_SSL . auto/have
123145
CORE_INCS="$CORE_INCS $ngx_feature_path"
124146
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
125147
OPENSSL=YES
148+
149+
if [ $USE_OPENSSL_QUIC = YES ]; then
150+
151+
ngx_feature="OpenSSL QUIC support"
152+
ngx_feature_name="NGX_QUIC"
153+
ngx_feature_test="SSL_set_quic_method(NULL, NULL)"
154+
. auto/feature
155+
156+
if [ $ngx_found = no ]; then
157+
have=NGX_QUIC_OPENSSL_COMPAT . auto/have
158+
159+
ngx_feature="OpenSSL QUIC compatibility"
160+
ngx_feature_test="SSL_CTX_add_custom_ext(NULL, 0, 0,
161+
NULL, NULL, NULL, NULL, NULL)"
162+
. auto/feature
163+
fi
164+
165+
if [ $ngx_found = no ]; then
166+
cat << END
167+
168+
$0: error: certain modules require OpenSSL QUIC support.
169+
You can either do not enable the modules, or install the OpenSSL library with
170+
QUIC support into the system, or build the OpenSSL library with QUIC support
171+
statically from the source with nginx by using --with-openssl=<path> option.
172+
173+
END
174+
exit 1
175+
fi
176+
fi
126177
fi
127178
fi
128179

auto/lib/openssl/make

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,24 @@ case "$CC" in
77

88
cl)
99

10+
case "$NGX_MACHINE" in
11+
12+
amd64)
13+
OPENSSL_TARGET=VC-WIN64A
14+
;;
15+
16+
*)
17+
OPENSSL_TARGET=VC-WIN32
18+
;;
19+
20+
esac
21+
1022
cat << END >> $NGX_MAKEFILE
1123

1224
$OPENSSL/openssl/include/openssl/ssl.h: $NGX_MAKEFILE
1325
\$(MAKE) -f auto/lib/openssl/makefile.msvc \
14-
OPENSSL="$OPENSSL" OPENSSL_OPT="$OPENSSL_OPT"
26+
OPENSSL="$OPENSSL" OPENSSL_OPT="$OPENSSL_OPT" \
27+
OPENSSL_TARGET="$OPENSSL_TARGET"
1528

1629
END
1730

auto/lib/openssl/makefile.msvc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
all:
77
cd $(OPENSSL)
88

9-
perl Configure VC-WIN32 no-shared \
9+
perl Configure $(OPENSSL_TARGET) no-shared no-threads \
1010
--prefix="%cd%/openssl" \
1111
--openssldir="%cd%/openssl/ssl" \
1212
$(OPENSSL_OPT)

auto/lib/pcre/conf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,22 @@ else
182182
. auto/feature
183183
fi
184184

185+
if [ $ngx_found = no ]; then
186+
187+
# Homebrew on Apple Silicon
188+
189+
ngx_feature="PCRE library in /opt/homebrew/"
190+
ngx_feature_path="/opt/homebrew/include"
191+
192+
if [ $NGX_RPATH = YES ]; then
193+
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lpcre"
194+
else
195+
ngx_feature_libs="-L/opt/homebrew/lib -lpcre"
196+
fi
197+
198+
. auto/feature
199+
fi
200+
185201
if [ $ngx_found = yes ]; then
186202
CORE_INCS="$CORE_INCS $ngx_feature_path"
187203
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"

auto/make

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
echo "creating $NGX_MAKEFILE"
88

99
mkdir -p $NGX_OBJS/src/core $NGX_OBJS/src/event $NGX_OBJS/src/event/modules \
10+
$NGX_OBJS/src/event/quic \
1011
$NGX_OBJS/src/engine $NGX_OBJS/src/engine/modules \
1112
$NGX_OBJS/src/os/unix $NGX_OBJS/src/os/win32 \
12-
$NGX_OBJS/src/http $NGX_OBJS/src/http/v2 $NGX_OBJS/src/http/modules \
13-
$NGX_OBJS/src/http/modules/perl \
13+
$NGX_OBJS/src/http $NGX_OBJS/src/http/v2 $NGX_OBJS/src/http/v3 \
14+
$NGX_OBJS/src/http/modules $NGX_OBJS/src/http/modules/perl \
1415
$NGX_OBJS/src/mail \
1516
$NGX_OBJS/src/stream \
1617
$NGX_OBJS/src/misc

0 commit comments

Comments
 (0)