Skip to content

Commit 03d453c

Browse files
authored
Merge branch 'nginx:master' into master
2 parents 6d50d9f + 45da9d1 commit 03d453c

File tree

190 files changed

+10818
-2679
lines changed

Some content is hidden

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

190 files changed

+10818
-2679
lines changed

.editorconfig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
root = true
2+
3+
[{configure,{*.{c,cpp,h,go,java,js,py,rs}}}]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
indent_style = space
9+
indent_size = 4
10+
11+
[Makefile]
12+
charset = utf-8
13+
end_of_line = lf
14+
insert_final_newline = true
15+
trim_trailing_whitespace = true
16+
indent_style = tab
17+
indent_size = 8
18+
19+
[{auto/**,*.toml}]
20+
charset = utf-8
21+
end_of_line = lf
22+
insert_final_newline = true
23+
trim_trailing_whitespace = true
24+
25+
[*.yaml]
26+
charset = utf-8
27+
end_of_line = lf
28+
insert_final_newline = true
29+
trim_trailing_whitespace = true
30+
indent_style = space
31+
indent_size = 2

.github/workflows/ci-dev-distro-compiler.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ jobs:
3737
dnf -y update
3838
dnf -y install --setopt=install_weak_deps=False \
3939
which wget git gcc make pcre2-devel openssl-devel \
40+
zlib-ng-compat-devel libzstd-devel brotli-devel \
4041
python-unversioned-command python3 python3-devel \
4142
php-devel php-embedded perl-devel perl-ExtUtils-Embed \
42-
ruby-devel java-devel nodejs-devel nodejs-npm golang
43+
ruby-devel java-devel nodejs-devel nodejs-npm golang \
44+
cargo rust
4345
if [ "${{ matrix.compiler }}" = "clang" ]; then
4446
dnf -y install --setopt=install_weak_deps=False clang
4547
fi
@@ -50,9 +52,9 @@ jobs:
5052
- name: configure unit CC=${{ matrix.compiler }}
5153
run: |
5254
if [ "${{ matrix.compiler }}" = "clang" ]; then
53-
./configure --openssl --cc=clang
55+
./configure --openssl --otel --zlib --zstd --brotli --cc=clang
5456
else
55-
./configure --openssl
57+
./configure --openssl --otel --zlib --zstd --brotli
5658
fi
5759
5860
- name: make unit
@@ -128,7 +130,9 @@ jobs:
128130
run: |
129131
apk update && apk upgrade
130132
apk add gcc make musl-dev openssl-dev pcre2-dev curl \
131-
php83-dev php83-embed python3-dev perl-dev ruby-dev openjdk21-jdk
133+
zlib-dev zstd-dev brotli-dev \
134+
php83-dev php83-embed python3-dev perl-dev ruby-dev \
135+
openjdk21-jdk cargo rust
132136
if [ "${{ matrix.compiler }}" = "clang" ]; then
133137
apk add clang
134138
fi
@@ -138,9 +142,9 @@ jobs:
138142
- name: configure unit CC=${{ matrix.compiler }}
139143
run: |
140144
if [ "${{ matrix.compiler }}" = "clang" ]; then
141-
./configure --openssl --cc=clang
145+
./configure --openssl --otel --zlib --zstd --brotli --cc=clang
142146
else
143-
./configure --openssl
147+
./configure --openssl --otel --zlib --zstd --brotli
144148
fi
145149
146150
- name: make unit

.github/workflows/ci.yml

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- 'go/**'
99
- 'src/**'
1010
- 'test/**'
11+
- 'pkg/contrib/**'
1112
- '.github/workflows/ci.yml'
1213
push:
1314
branches: master
@@ -17,6 +18,7 @@ on:
1718
- 'go/**'
1819
- 'src/**'
1920
- 'test/**'
21+
- 'pkg/contrib/**'
2022
- '.github/workflows/ci.yml'
2123

2224
jobs:
@@ -46,8 +48,6 @@ jobs:
4648
os: ubuntu-latest
4749
- build: perl
4850
os: ubuntu-latest
49-
- build: php-8.1
50-
os: ubuntu-latest
5151
- build: php-8.2
5252
os: ubuntu-latest
5353
- build: php-8.3
@@ -99,12 +99,21 @@ jobs:
9999
# https://github.com/actions/runner-images/issues/2821
100100
- name: Kill mono process
101101
run: |
102-
sudo systemctl stop mono-xsp4.service
103-
sudo systemctl mask mono-xsp4.service
104-
sudo systemctl status mono-xsp4.service || true
105-
PID=$(sudo lsof -t -i :8084)
106-
echo "Killing PID $PID"
107-
sudo kill -9 $PID
102+
set +e
103+
sudo systemctl status mono-xsp4.service
104+
if [ $? -ne 0 ]; then
105+
true
106+
else
107+
sudo systemctl stop mono-xsp4.service
108+
sudo systemctl mask mono-xsp4.service
109+
sudo systemctl status mono-xsp4.service
110+
PID=$(sudo lsof -t -i :8084)
111+
echo "Killing PID $PID"
112+
sudo kill -9 $PID
113+
fi
114+
115+
- name: Install packages
116+
run: sudo apt-get -y install libbrotli-dev
108117

109118
##
110119
## njs
@@ -133,6 +142,9 @@ jobs:
133142
--tests \
134143
--openssl \
135144
--njs \
145+
--zlib \
146+
--zstd \
147+
--brotli \
136148
--cc-opt="-I njs/src/ -I njs/build" \
137149
--ld-opt="-L njs/build"
138150
@@ -303,7 +315,7 @@ jobs:
303315

304316
- name: Configure wasm
305317
run: |
306-
./configure wasm --include-path=pkg/contrib/wasmtime/crates/c-api/include --lib-path=pkg/contrib/wasmtime/target/release
318+
./configure wasm --include-path=pkg/contrib/wasmtime/artifacts/include --lib-path=pkg/contrib/wasmtime/artifacts/lib
307319
if: steps.metadata.outputs.module == 'wasm'
308320

309321
- name: Make wasm
@@ -318,6 +330,7 @@ jobs:
318330
- name: Setup rust
319331
run: |
320332
curl https://sh.rustup.rs | sh -s -- -y
333+
cargo install cargo-component
321334
if: steps.metadata.outputs.module == 'wasm-wasi-component'
322335

323336
- name: Configure wasm-wasi-component
@@ -347,18 +360,19 @@ jobs:
347360
- uses: actions/setup-python@v5
348361
with:
349362
python-version: '3'
350-
if: steps.metadata.outputs.module != 'wasm' &&
351-
steps.metadata.outputs.module != 'wasm-wasi-component'
363+
if: steps.metadata.outputs.module != 'wasm'
352364

353365
- name: Install pytest
354366
run: |
355-
sudo -H pip install pytest
356-
if: steps.metadata.outputs.module != 'wasm' &&
357-
steps.metadata.outputs.module != 'wasm-wasi-component'
367+
sudo apt install -y python3-pytest
368+
369+
if: steps.metadata.outputs.module != 'wasm'
358370

359371
- name: Run ${{ steps.metadata.outputs.module }} tests
360372
run: |
361-
sudo -E pytest --print-log ${{ steps.metadata.outputs.testpath }}
362-
# Skip pytest if wasm build, as there are no tests yet
363-
if: steps.metadata.outputs.module != 'wasm' &&
364-
steps.metadata.outputs.module != 'wasm-wasi-component'
373+
if [ "${{ matrix.build }}" == "wasm-wasi-component" ]; then
374+
pytest-3 --print-log ${{ steps.metadata.outputs.testpath }}
375+
else
376+
sudo -E pytest-3 --print-log ${{ steps.metadata.outputs.testpath }}
377+
fi
378+
if: steps.metadata.outputs.module != 'wasm'

.github/workflows/cifuzz.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fuzz-seconds: 300
2828
output-sarif: true
2929
- name: Upload Crash
30-
uses: actions/upload-artifact@v3
30+
uses: actions/upload-artifact@v4
3131
if: failure() && steps.build.outcome == 'success'
3232
with:
3333
name: artifacts

.github/workflows/clang-ast.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: "Clang AST"
2+
3+
on:
4+
push:
5+
branches: master
6+
paths:
7+
- configure
8+
- 'auto/**'
9+
- 'src/**'
10+
- 'test/**'
11+
- '.github/workflows/clang-ast.yaml'
12+
pull_request:
13+
branches: master
14+
paths:
15+
- configure
16+
- 'auto/**'
17+
- 'src/**'
18+
- 'test/**'
19+
- '.github/workflows/clang-ast.yaml'
20+
21+
jobs:
22+
clang-ast:
23+
runs-on: ubuntu-latest
24+
25+
container:
26+
image: debian:testing
27+
28+
steps:
29+
- name: Install tools/deps
30+
run: |
31+
apt-get -y update
32+
apt-get -y install git wget curl llvm-dev libclang-dev clang make \
33+
libssl-dev libpcre2-dev libperl-dev \
34+
libphp-embed php-dev python3-dev libpython3-dev \
35+
ruby-dev openjdk-21-jdk npm
36+
npm install -g node-gyp
37+
38+
- uses: actions/checkout@v4
39+
40+
- name: Checkout and build clang-ast
41+
run: |
42+
git clone https://github.com/nginx/clang-ast.git -b unit
43+
cd clang-ast
44+
make
45+
46+
- name: Configure Unit
47+
run: ./configure --cc=clang --cc-opt="-Xclang -load -Xclang clang-ast/ngx-ast.so -Xclang -add-plugin -Xclang ngx-ast" --openssl --debug --tests
48+
49+
- name: Build Unit
50+
run: make -j4 unitd
51+
52+
- name: Build C tests
53+
run: make -j4 tests
54+
55+
- name: Build Perl language module
56+
run: ./configure perl && make -j4 perl
57+
58+
- name: Build PHP language module
59+
run: ./configure php && make -j4 php
60+
61+
- name: Build Python language module
62+
run: ./configure python --config=python3-config && make -j4 python3
63+
64+
- name: Build Ruby language module
65+
run: ./configure ruby && make -j4 ruby
66+
67+
- name: Build Java support
68+
run: ./configure java && make -j4 java
69+
70+
- name: Build Nodejs support
71+
run: ./configure nodejs && make node-local-install DESTDIR=node
72+
73+
- name: Build wasm language module
74+
run: |
75+
wget -q -O- https://github.com/bytecodealliance/wasmtime/releases/download/v26.0.0/wasmtime-v26.0.0-x86_64-linux-c-api.tar.xz | tar -xJf -
76+
./configure wasm --include-path=wasmtime-v26.0.0-x86_64-linux-c-api/include --lib-path=wasmtime-v26.0.0-x86_64-linux-c-api/lib --rpath && make wasm

.github/workflows/unitctl.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
pull_request:
66
paths:
77
- tools/unitctl/**
8+
- docs/unit-openapi.yaml
89
push:
910
branches:
1011
- master
@@ -185,10 +186,8 @@ jobs:
185186
uses: ncipollo/release-action@v1
186187
with:
187188
artifacts: "unitctl-*"
188-
# false if triggered by a tag
189-
prerelease: ${{github.event_name == 'workflow_dispatch' && true}}
190-
tag: ${{(github.event_name == 'workflow_dispatch' && inputs.version) || github.ref_name}}
191-
name: unitctl/${{(github.event_name=='workflow_dispatch' && inputs.version) || github.ref_name}}
189+
prerelease: ${{ github.event_name == 'workflow_dispatch' }}
190+
tag: ${{ inputs.version && format('unitctl/{0}', inputs.version) || github.ref_name }}
192191
body: >
193192
## Unitctl
194193

.hgignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.hgtags

Lines changed: 0 additions & 43 deletions
This file was deleted.

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Dan Callahan <d.callahan@f5.com> <dan.callahan@gmail.com>
1111
Danielle De Leo <d.deleo@f5.com> <danielle@fastmail.net>
1212
Dylan Arbour <d.arbour@f5.com> <arbourd@users.noreply.github.com>
1313
Dylan Arbour <d.arbour@f5.com> <7211830+arbourd@users.noreply.github.com>
14+
Igor Ippolitov <i.ippolitov@f5.com> <iippolitov@gmail.com>
1415
Konstantin Pavlov <thresh@nginx.com> <thresh@videolan.org>
1516
Konstantin Pavlov <thresh@nginx.com> <pavlov.konstantin@gmail.com>
1617
Max Romanov <max.romanov@gmail.com> <max.romanov@nginx.com>

0 commit comments

Comments
 (0)