Skip to content

Commit

Permalink
Merge tag '1.34.0' into packaging
Browse files Browse the repository at this point in the history
Unit 1.34.0 release.
  • Loading branch information
thresheek committed Dec 19, 2024
2 parents 624debc + 27bde18 commit d8acad3
Show file tree
Hide file tree
Showing 95 changed files with 6,530 additions and 1,534 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
root = true

[{configure,{*.{c,cpp,h,go,java,js,py,rs}}]
[{configure,{*.{c,cpp,h,go,java,js,py,rs}}}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/ci-dev-distro-compiler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ jobs:
which wget git gcc make pcre2-devel openssl-devel \
python-unversioned-command python3 python3-devel \
php-devel php-embedded perl-devel perl-ExtUtils-Embed \
ruby-devel java-devel nodejs-devel nodejs-npm golang
ruby-devel java-devel nodejs-devel nodejs-npm golang \
cargo rust
if [ "${{ matrix.compiler }}" = "clang" ]; then
dnf -y install --setopt=install_weak_deps=False clang
fi
Expand All @@ -50,9 +51,9 @@ jobs:
- name: configure unit CC=${{ matrix.compiler }}
run: |
if [ "${{ matrix.compiler }}" = "clang" ]; then
./configure --openssl --cc=clang
./configure --openssl --otel --cc=clang
else
./configure --openssl
./configure --openssl --otel
fi
- name: make unit
Expand Down Expand Up @@ -128,7 +129,8 @@ jobs:
run: |
apk update && apk upgrade
apk add gcc make musl-dev openssl-dev pcre2-dev curl \
php83-dev php83-embed python3-dev perl-dev ruby-dev openjdk21-jdk
php83-dev php83-embed python3-dev perl-dev ruby-dev \
openjdk21-jdk cargo rust
if [ "${{ matrix.compiler }}" = "clang" ]; then
apk add clang
fi
Expand All @@ -138,9 +140,9 @@ jobs:
- name: configure unit CC=${{ matrix.compiler }}
run: |
if [ "${{ matrix.compiler }}" = "clang" ]; then
./configure --openssl --cc=clang
./configure --openssl --otel --cc=clang
else
./configure --openssl
./configure --openssl --otel
fi
- name: make unit
Expand Down
31 changes: 16 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ jobs:
os: ubuntu-latest
- build: perl
os: ubuntu-latest
- build: php-8.1
os: ubuntu-latest
- build: php-8.2
os: ubuntu-latest
- build: php-8.3
Expand Down Expand Up @@ -101,12 +99,18 @@ jobs:
# https://github.com/actions/runner-images/issues/2821
- name: Kill mono process
run: |
sudo systemctl stop mono-xsp4.service
sudo systemctl mask mono-xsp4.service
sudo systemctl status mono-xsp4.service || true
PID=$(sudo lsof -t -i :8084)
echo "Killing PID $PID"
sudo kill -9 $PID
set +e
sudo systemctl status mono-xsp4.service
if [ $? -ne 0 ]; then
true
else
sudo systemctl stop mono-xsp4.service
sudo systemctl mask mono-xsp4.service
sudo systemctl status mono-xsp4.service
PID=$(sudo lsof -t -i :8084)
echo "Killing PID $PID"
sudo kill -9 $PID
fi
##
## njs
Expand Down Expand Up @@ -354,18 +358,15 @@ jobs:

- name: Install pytest
run: |
if [ "${{ matrix.build }}" == "wasm-wasi-component" ]; then
pip install pytest
else
sudo -H pip install pytest
fi
sudo apt install -y python3-pytest
if: steps.metadata.outputs.module != 'wasm'

- name: Run ${{ steps.metadata.outputs.module }} tests
run: |
if [ "${{ matrix.build }}" == "wasm-wasi-component" ]; then
pytest --print-log ${{ steps.metadata.outputs.testpath }}
pytest-3 --print-log ${{ steps.metadata.outputs.testpath }}
else
sudo -E pytest --print-log ${{ steps.metadata.outputs.testpath }}
sudo -E pytest-3 --print-log ${{ steps.metadata.outputs.testpath }}
fi
if: steps.metadata.outputs.module != 'wasm'
76 changes: 76 additions & 0 deletions .github/workflows/clang-ast.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: "Clang AST"

on:
push:
branches: master
paths:
- configure
- 'auto/**'
- 'src/**'
- 'test/**'
- '.github/workflows/clang-ast.yaml'
pull_request:
branches: master
paths:
- configure
- 'auto/**'
- 'src/**'
- 'test/**'
- '.github/workflows/clang-ast.yaml'

jobs:
clang-ast:
runs-on: ubuntu-latest

container:
image: debian:testing

steps:
- name: Install tools/deps
run: |
apt-get -y update
apt-get -y install git wget curl llvm-dev libclang-dev clang make \
libssl-dev libpcre2-dev libperl-dev \
libphp-embed php-dev python3-dev libpython3-dev \
ruby-dev openjdk-17-jdk npm
npm install -g node-gyp
- uses: actions/checkout@v4

- name: Checkout and build clang-ast
run: |
git clone https://github.com/nginx/clang-ast.git -b unit
cd clang-ast
make
- name: Configure Unit
run: ./configure --cc=clang --cc-opt="-Xclang -load -Xclang clang-ast/ngx-ast.so -Xclang -add-plugin -Xclang ngx-ast" --openssl --debug --tests

- name: Build Unit
run: make -j4 unitd

- name: Build C tests
run: make -j4 tests

- name: Build Perl language module
run: ./configure perl && make -j4 perl

- name: Build PHP language module
run: ./configure php && make -j4 php

- name: Build Python language module
run: ./configure python --config=python3-config && make -j4 python3

- name: Build Ruby language module
run: ./configure ruby && make -j4 ruby

- name: Build Java support
run: ./configure java && make -j4 java

- name: Build Nodejs support
run: ./configure nodejs && make node-local-install DESTDIR=node

- name: Build wasm language module
run: |
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 -
./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
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Dan Callahan <[email protected]> <[email protected]>
Danielle De Leo <[email protected]> <[email protected]>
Dylan Arbour <[email protected]> <[email protected]>
Dylan Arbour <[email protected]> <[email protected]>
Igor Ippolitov <[email protected]> <[email protected]>
Konstantin Pavlov <[email protected]> <[email protected]>
Konstantin Pavlov <[email protected]> <[email protected]>
Max Romanov <[email protected]> <[email protected]>
Expand Down
10 changes: 10 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@

Changes with Unit 1.34.0 19 Dec 2024

*) Feature: initial OpenTelemetry (OTEL) support. (Disabled by default).

*) Feature: support for JSON formatted access logs.

*) Bugfix: tweak the Perl language module to avoid breaking scripts in
some circumstances.


Changes with Unit 1.33.0 17 Sep 2024

*) Feature: make the number of router threads configurable.
Expand Down
4 changes: 4 additions & 0 deletions auto/cc/test
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ case $NXT_CC_NAME in

NXT_CFLAGS="$NXT_CFLAGS -fno-strict-overflow"

NXT_CFLAGS="$NXT_CFLAGS -funsigned-char"

NXT_CFLAGS="$NXT_CFLAGS -std=gnu11"

NXT_CFLAGS="$NXT_CFLAGS -O"
Expand Down Expand Up @@ -109,6 +111,8 @@ case $NXT_CC_NAME in

NXT_CFLAGS="$NXT_CFLAGS -fno-strict-overflow"

NXT_CFLAGS="$NXT_CFLAGS -funsigned-char"

NXT_CFLAGS="$NXT_CFLAGS -std=gnu11"

NXT_CFLAGS="$NXT_CFLAGS -O"
Expand Down
2 changes: 2 additions & 0 deletions auto/help
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ cat << END

--njs enable njs library usage

--otel enable otel library usage

--debug enable debug logging

--fuzz=ENGINE enable fuzz testing
Expand Down
54 changes: 43 additions & 11 deletions auto/make
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

$echo "creating $NXT_MAKEFILE"


cat << END > $NXT_MAKEFILE

# Pretty print compiler etc actions...
Expand All @@ -22,6 +21,8 @@ AR = $AR

EXTRA_CFLAGS =
CFLAGS = $NXT_CFLAGS $NXT_CC_OPT $CFLAGS \$(EXTRA_CFLAGS)
RUST_FLAGS =
NXT_OTEL_LIB_LOC =

NXT_EXEC_LINK = $NXT_EXEC_LINK $NXT_LD_OPT
NXT_SHARED_LOCAL_LINK = $NXT_SHARED_LOCAL_LINK $NXT_LD_OPT
Expand Down Expand Up @@ -62,6 +63,9 @@ D := 0

ifeq (\$D,1)
CFLAGS += -O0
RUST_FLAGS += --debug
else
RUST_FLAGS += --release
endif

# Optionally disable -Werror with
Expand All @@ -76,6 +80,18 @@ END

fi

# potentially set otel lib location
if [ $NXT_OTEL = YES ]; then
cat << END >> $NXT_MAKEFILE

ifeq (\$D,1)
NXT_OTEL_LIB_LOC = $NXT_OTEL_LIB_DIR/target/debug/libotel.a
else
NXT_OTEL_LIB_LOC = $NXT_OTEL_LIB_DIR/target/release/libotel.a
endif

END
fi

# The include paths list.

Expand Down Expand Up @@ -138,14 +154,14 @@ cat << END >> $NXT_MAKEFILE

libnxt: $NXT_BUILD_DIR/lib/$NXT_LIB_SHARED $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC

$NXT_BUILD_DIR/lib/$NXT_LIB_SHARED: \$(NXT_LIB_OBJS)
$NXT_BUILD_DIR/lib/$NXT_LIB_SHARED: \$(NXT_LIB_OBJS) \$(NXT_OTEL_LIB_LOC)
\$(PP_LD) \$@
\$(v)\$(NXT_SHARED_LOCAL_LINK) -o \$@ \$(NXT_LIB_OBJS) \\
$NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
$NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS \$(NXT_OTEL_LIB_LOC)

$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC: \$(NXT_LIB_OBJS)
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC: \$(NXT_LIB_OBJS) \$(NXT_OTEL_LIB_LOC)
\$(PP_AR) \$@
\$(v)$NXT_STATIC_LINK \$@ \$(NXT_LIB_OBJS)
\$(v)$NXT_STATIC_LINK \$@ \$(NXT_LIB_OBJS) \$(NXT_OTEL_LIB_LOC)

$NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC: \$(NXT_LIB_UNIT_OBJS) \\
$NXT_BUILD_DIR/share/pkgconfig/unit.pc \\
Expand Down Expand Up @@ -359,11 +375,11 @@ $echo >> $NXT_MAKEFILE
cat << END >> $NXT_MAKEFILE

$NXT_BUILD_DIR/sbin/$NXT_DAEMON: $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
\$(NXT_OBJS)
\$(NXT_OBJS) \$(NXT_OTEL_LIB_LOC)
\$(PP_LD) \$@
\$(v)\$(NXT_EXEC_LINK) -o \$@ \$(CFLAGS) \\
\$(NXT_OBJS) $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
$NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
$NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS \$(NXT_OTEL_LIB_LOC)

END

Expand Down Expand Up @@ -535,10 +551,6 @@ cat << END > Makefile

include $NXT_MAKEFILE

.PHONY: clean
clean:
rm -rf $NXT_BUILD_DIR *.dSYM Makefile

.PHONY: help
help:
@echo "Variables to control make/build behaviour:"
Expand All @@ -551,4 +563,24 @@ help:
@echo
@echo " Variables can be combined."

.PHONY: clean
clean:
rm -rf $NXT_BUILD_DIR *.dSYM Makefile
END

if [ $NXT_OTEL = YES ]; then
cat << END >> Makefile
cd "$NXT_OTEL_LIB_DIR" && cargo clean
END

NXT_OTEL_DEPS=" \
build/src/nxt_otel.o \
src/otel/src/lib.rs \
"

cat << END >> $NXT_MAKEFILE

\$(NXT_OTEL_LIB_LOC): $NXT_OTEL_DEPS
cargo build \$(RUST_FLAGS) --manifest-path $NXT_OTEL_LIB_DIR/Cargo.toml
END
fi
4 changes: 2 additions & 2 deletions auto/modules/java
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ cat << END > $NXT_JAVA_JARS
static const char *nxt_java_system_jars[] = {
END

NXT_TOMCAT_VERSION=9.0.93
NXT_TOMCAT_VERSION=9.0.98

NXT_JAR_VERSION=$NXT_TOMCAT_VERSION

Expand Down Expand Up @@ -297,7 +297,7 @@ NXT_JAR_NAME=jetty-http
. auto/modules/java_get_jar

NXT_JAR_NAME=classgraph
NXT_JAR_VERSION=4.8.175
NXT_JAR_VERSION=4.8.179
NXT_JAR_NAMESPACE=io/github/classgraph/
. auto/modules/java_get_jar

Expand Down
20 changes: 10 additions & 10 deletions auto/modules/java_jar.sha512
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
75eb34c016ce4eb4c7a8413ed06570b491f9f2fb852b19097d0e7692c746052da466d6e86810a9c899890a87f49d5c94cffd724b15d47b006e34e7c334437efc classgraph-4.8.175.jar
8ae750523f086c667f1ecb22cdd02037f217b67841757c2545100ec314145268a60cc6f381bde86659fa090f1a05de8f7cf3ebaf13fb4e737fda749a1ce77078 classgraph-4.8.179.jar
ab441acf5551a7dc81c353eaccb3b3df9e89a48987294d19e39acdb83a5b640fcdff7414cee29f5b96eaa8826647f1d5323e185018fe33a64c402d69c73c9158 ecj-3.26.0.jar
48d5512d378d58c3df93bbe1c68d5a4b097e2dc7466992393e0731414dc0fe449312e067d0874e503dd27cb9b6a1f2da0d1f1569a7b484c1f12bd533afbe2723 jetty-http-9.4.56.v20240826.jar
dc0d1f05a7f8477e1f7f57adb307224aadcb1e1fed6f7e5df72d9b84437bf75276c3b0f13da9d079c541ad94601bdbd7314c61477b224dbbdc93a6d5b9f98478 jetty-server-9.4.56.v20240826.jar
025751c45cd8a23f1b436eaa1849af2421f78a2a82bc07c4175df8b4ec5dfc15247036194156897aafb8b0ec83406bbaa25e4092fea5ddd3b900da0ffdfaae19 jetty-util-9.4.56.v20240826.jar
9ea72285b395592dbee58339e3a2a9a8e9d9b623f9c37eace3cb45842107469880d3556a18023f870ef4fcad007705652ff300c12f57fa13af9a8cd666f545de tomcat-api-9.0.93.jar
3a91b9dda9d015aaf0c931847ba40a17bd77102ec0b596a1406142dfac556ab95fa5e0fe554743757d80f28436bcd05f28d2716ca62204bded81f0ed98ac2bf8 tomcat-el-api-9.0.93.jar
d50a0d26c6b8ee2b855df54e7a2647f423181f7fa45fe67daf33b8828122b891cacc7bd8312ae72c05a20708f2b405053045d71939427e1526796b02432db72d tomcat-jasper-9.0.93.jar
4886719cbe70ec7bd9190f691d0a85bc84a343ecdb969eb946b0718f0a8bd670f9bc771a309d2d90b23dae06be1f51d3049df7ed157c90b8f4d724a1064eb21b tomcat-jasper-el-9.0.93.jar
17696c91cb90c71dbebac36cebd5205c001a4ebd4df22eeef0762d818dde16f8b6e8ccfa28301ea2fa6efb001ea2f428a813a2aea1b593f08c7c62d31884571c tomcat-jsp-api-9.0.93.jar
cf9582e6fbc3dae8bdc55e4e687fd2dbc6f44d1bfce77e2117f8673b011d69c07ade7f715493e1d14e205d122284114edc2fe9f19888933645931a093dd26a01 tomcat-juli-9.0.93.jar
280c000ec81893a87feaf7db46702d0b13599e82aedf1540597f69c609bd20a48d04f887131bc464c7f715911aa8c3b44a3502e1c736e5c7575765c419fdb064 tomcat-servlet-api-9.0.93.jar
55a47b7bc9cc3dc47d93f7850d60375d900f7aac3a7b16bdd06e01e4523672ea93cdac8660825307c6699bda8bb5e4f668b2d1d42967194dddceeb56b1acc004 tomcat-util-9.0.93.jar
db933442c1cbbc1e277cce2a374b17b37aea14b3a7f1a42f1bf7152af8edc0d876ee25ae5087f31e0b06474d1e2a134de36f3e3eaca0f04dac734deeecfd773e tomcat-util-scan-9.0.93.jar
356c0668e2c03201c74e82491a1daf5194368dbb3a08c42c49abb9e544e814b5a1aa85465137e8da785120733ed279a297942bebf6ee8453d935648fb02a3893 tomcat-api-9.0.98.jar
43c106be1a497b4641eed28bc5c2c60192a7240f6dd3e55850197969a275d38c9d853646dd3f313af530010b36095f8893289c8ddfed018f2537cd7ddc84be98 tomcat-el-api-9.0.98.jar
570e6e9f4a762cad5b3190886915d93618f7292bfa3ee39abb7b9f0993704a19fbb0fd4a7727995fd7f50edf62f4b6df50d2854a6fa70ac1e8a6650a02445fd2 tomcat-jasper-9.0.98.jar
77f3c0da8ee1af315c59cc1e6566dab7cfbdd928045aa7c921299e72b88004bd6b710f0b62b39c4a3aaa872b965b50d5f4ba43bf98a0cd39d585c6b82edeaf06 tomcat-jasper-el-9.0.98.jar
8d825b69acb8227709cbdea1349faa6115243c5824ff751af3d5c45822dfe371506077669565e7531f278b6752be819e5e54e73284a75208d4f8784706ee6fb7 tomcat-jsp-api-9.0.98.jar
353c858821644f7284bc272d8f23c031199439fea74b8c104bb2d054716f6a87523d4d9d38f86dca5e353b4ddff307d1cdc0d221ddda10e0626b1cf3cbda482b tomcat-juli-9.0.98.jar
5b1a8ca4c4b3782531e154d0519f2e3fa8cdb647848e455d4af446f7fac6555ad0fa76750e0d76b02f4e7bceae147ebc96c9d3f786542defcab2d69e7b419175 tomcat-servlet-api-9.0.98.jar
6a1729a0f251a3cb80cab476686a2c307b5e1d2827d991327f4ce6f69183a6d876cf9a886ab074eddec693fca418158407dac8844781c4667aca5575378574c6 tomcat-util-9.0.98.jar
37dc24785e3c18d527038242056d7481635505c2609ff77ee3b249e88a7c48323f6c99a562391fef2474e6cb896f9445855eed48fc8a8ab89b8704c8ecb4193a tomcat-util-scan-9.0.98.jar
Loading

0 comments on commit d8acad3

Please sign in to comment.