Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 1.34.1 to packaging branch #1540

Merged
merged 15 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@

Changes with Unit 1.34.1 10 Jan 2025

*) Bugfix: fix instability issues due to OpenTelemetry (OTEL) support.

*) Bugfix: fix issues with building OpenTelemetry (OTEL) support on
various platforms, including macOS.


Changes with Unit 1.34.0 19 Dec 2024

*) Feature: initial OpenTelemetry (OTEL) support. (Disabled by default).
Expand Down
74 changes: 41 additions & 33 deletions auto/make
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,20 @@ PP_AR := @echo ' AR '
PP_LD := @echo ' LD '
PP_VER := @echo ' VER '
PP_SED := @echo ' SED '
PP_CR := @echo ' CR '

CC = $CC
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
NXT_MODULE_LINK = $NXT_MODULE_LINK

NXT_OTEL_LIB_STATIC =

all: $NXT_DAEMON manpage

.PHONY: $NXT_DAEMON manpage
Expand All @@ -37,6 +38,18 @@ manpage: $NXT_BUILD_DIR/share/man/man8/unitd.8
END


if [ $NXT_OTEL = YES ]; then

cat << END >> $NXT_MAKEFILE

RUST_FLAGS = --release
NXT_OTEL_LIB_STATIC = $NXT_BUILD_DIR/lib/libotel.a

END

fi


NXT_OS=$(uname -s)
NXT_GNU_MAKE=$(make --version | grep GNU || true)

Expand All @@ -63,9 +76,7 @@ D := 0

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

# Optionally disable -Werror with
Expand All @@ -80,18 +91,6 @@ 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 @@ -154,14 +153,15 @@ 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_OTEL_LIB_LOC)
$NXT_BUILD_DIR/lib/$NXT_LIB_SHARED: \$(NXT_LIB_OBJS) \$(NXT_OTEL_LIB_STATIC)
\$(PP_LD) \$@
\$(v)\$(NXT_SHARED_LOCAL_LINK) -o \$@ \$(NXT_LIB_OBJS) \\
$NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS \$(NXT_OTEL_LIB_LOC)
\$(NXT_OTEL_LIB_STATIC) \\
$NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS

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

$NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC: \$(NXT_LIB_UNIT_OBJS) \\
$NXT_BUILD_DIR/share/pkgconfig/unit.pc \\
Expand Down Expand Up @@ -264,36 +264,40 @@ tests: $NXT_BUILD_DIR/tests $NXT_BUILD_DIR/utf8_file_name_test \\
$NXT_BUILD_DIR/unit_websocket_echo

$NXT_BUILD_DIR/tests: \$(NXT_TEST_OBJS) \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
\$(NXT_OTEL_LIB_STATIC)
\$(PP_LD) \$@
\$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/tests \\
\$(CFLAGS) \$(NXT_TEST_OBJS) \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \$(NXT_OTEL_LIB_STATIC) \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS

$NXT_BUILD_DIR/utf8_file_name_test: $NXT_LIB_UTF8_FILE_NAME_TEST_SRCS \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
\$(NXT_OTEL_LIB_STATIC)
\$(PP_LD) \$@
\$(v)\$(CC) \$(CFLAGS) \$(NXT_LIB_INCS) $NXT_LIB_AUX_CFLAGS \\
-o $NXT_BUILD_DIR/utf8_file_name_test \\
$NXT_LIB_UTF8_FILE_NAME_TEST_SRCS \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \$(NXT_OTEL_LIB_STATIC) \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS

$NXT_BUILD_DIR/ncq_test: $NXT_BUILD_DIR/src/test/nxt_ncq_test.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
\$(NXT_OTEL_LIB_STATIC)
\$(PP_LD) \$@
\$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/ncq_test \\
\$(CFLAGS) $NXT_BUILD_DIR/src/test/nxt_ncq_test.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \$(NXT_OTEL_LIB_STATIC) \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS

$NXT_BUILD_DIR/vbcq_test: $NXT_BUILD_DIR/src/test/nxt_vbcq_test.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
\$(NXT_OTEL_LIB_STATIC)
\$(PP_LD) \$@
\$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/vbcq_test \\
\$(CFLAGS) $NXT_BUILD_DIR/src/test/nxt_vbcq_test.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \$(NXT_OTEL_LIB_STATIC) \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS

$NXT_BUILD_DIR/unit_app_test: $NXT_BUILD_DIR/src/test/nxt_unit_app_test.o \\
Expand Down Expand Up @@ -375,11 +379,12 @@ $echo >> $NXT_MAKEFILE
cat << END >> $NXT_MAKEFILE

$NXT_BUILD_DIR/sbin/$NXT_DAEMON: $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
\$(NXT_OBJS) \$(NXT_OTEL_LIB_LOC)
\$(NXT_OBJS) \$(NXT_OTEL_LIB_STATIC)
\$(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_OTEL_LIB_LOC)
\$(NXT_OTEL_LIB_STATIC) \\
$NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS

END

Expand Down Expand Up @@ -580,7 +585,10 @@ NXT_OTEL_DEPS=" \

cat << END >> $NXT_MAKEFILE

\$(NXT_OTEL_LIB_LOC): $NXT_OTEL_DEPS
cargo build \$(RUST_FLAGS) --manifest-path $NXT_OTEL_LIB_DIR/Cargo.toml
\$(NXT_OTEL_LIB_STATIC): $NXT_OTEL_DEPS
\$(PP_CR) \$@
\$(v)cargo rustc \$(RUST_FLAGS) \\
--manifest-path $NXT_OTEL_LIB_DIR/Cargo.toml \\
-- --emit link=../../$NXT_BUILD_DIR/lib/libotel.a
END
fi
56 changes: 33 additions & 23 deletions auto/otel
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,44 @@ if [ $NXT_OTEL = YES ]; then
fi
$echo "found"

$echo -n " - "

nxt_feature="OpenSSL library"
nxt_feature_run=yes
nxt_feature_incs=
nxt_feature_libs="-lssl -lcrypto"
nxt_feature_test="#include <openssl/ssl.h>

int main(void) {
SSL_library_init();
return 0;
}"
. auto/feature

if [ ! $nxt_found = yes ]; then
$echo
$echo $0: error: OpenTelemetry support requires OpenSSL.
$echo
exit 1;
fi
case "$NXT_SYSTEM" in
Darwin)
NXT_OTEL_LIBS="-framework CoreFoundation -framework Security -framework SystemConfiguration"

NXT_OTEL_LIBS="-lssl -lcrypto"

cat << END >> $NXT_AUTO_CONFIG_H
cat << END >> $NXT_AUTO_CONFIG_H

#ifndef NXT_HAVE_OTEL
#define NXT_HAVE_OTEL 1
#endif

END
;;
*)

$echo -n " - "

nxt_feature="OpenSSL library"
nxt_feature_name=NXT_HAVE_OTEL
nxt_feature_run=yes
nxt_feature_incs=
nxt_feature_libs="-lssl -lcrypto"
nxt_feature_test="#include <openssl/ssl.h>

int main(void) {
SSL_library_init();
return 0;
}"
. auto/feature

if [ ! $nxt_found = yes ]; then
$echo
$echo $0: error: OpenTelemetry support requires OpenSSL.
$echo
exit 1;
fi

NXT_OTEL_LIBS="-lssl -lcrypto"
;;
esac

fi
45 changes: 45 additions & 0 deletions docs/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,51 @@
<change_log title="unit">


<changes apply="unit-php
unit-python unit-python2.7
unit-python3.4 unit-python3.5 unit-python3.6 unit-python3.7
unit-python3.8 unit-python3.9 unit-python3.10 unit-python3.11
unit-python3.12 unit-python3.13
unit-go
unit-perl
unit-ruby
unit-jsc-common unit-jsc8 unit-jsc10 unit-jsc11 unit-jsc13
unit-jsc14 unit-jsc15 unit-jsc16 unit-jsc17 unit-jsc18
unit-jsc19 unit-jsc20 unit-jsc21
unit-wasm"
ver="1.34.1" rev="1"
date="2025-01-10" time="18:00:00 +0000"
packager="Nginx Packaging &lt;[email protected]&gt;">

<change>
<para>
NGINX Unit updated to 1.34.1.
</para>
</change>

</changes>


<changes apply="unit" ver="1.34.1" rev="1"
date="2025-01-10" time="18:00:00 +0000"
packager="Nginx Packaging &lt;[email protected]&gt;">

<change type="bugfix">
<para>
fix instability issues due to OpenTelemetry (OTEL) support.
</para>
</change>

<change type="bugfix">
<para>
fix issues with building OpenTelemetry (OTEL) support on various platforms,
including macOS.
</para>
</change>

</changes>


<changes apply="unit-php
unit-python unit-python2.7
unit-python3.4 unit-python3.5 unit-python3.6 unit-python3.7
Expand Down
2 changes: 1 addition & 1 deletion docs/unit-openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.0
info:
title: "NGINX Unit 1.34.0"
title: "NGINX Unit 1.34.1"
description: "NGINX Unit is a lightweight and versatile application runtime
that provides the essential components for your web application as a
single open-source server: running application code, serving static assets,
Expand Down
4 changes: 2 additions & 2 deletions pkg/docker/Dockerfile.go1.22
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org"
LABEL org.opencontainers.image.source="https://github.com/nginx/unit"
LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images"
LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <[email protected]>"
LABEL org.opencontainers.image.version="1.34.0"
LABEL org.opencontainers.image.version="1.34.1"

RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \
Expand Down Expand Up @@ -35,7 +35,7 @@ RUN set -ex \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
&& mkdir -p /usr/src/unit \
&& cd /usr/src/unit \
&& git clone --depth 1 -b 1.34.0-1 https://github.com/nginx/unit \
&& git clone --depth 1 -b 1.34.1-1 https://github.com/nginx/unit \
&& cd unit \
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
Expand Down
4 changes: 2 additions & 2 deletions pkg/docker/Dockerfile.go1.23
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org"
LABEL org.opencontainers.image.source="https://github.com/nginx/unit"
LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images"
LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <[email protected]>"
LABEL org.opencontainers.image.version="1.34.0"
LABEL org.opencontainers.image.version="1.34.1"

RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \
Expand Down Expand Up @@ -35,7 +35,7 @@ RUN set -ex \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
&& mkdir -p /usr/src/unit \
&& cd /usr/src/unit \
&& git clone --depth 1 -b 1.34.0-1 https://github.com/nginx/unit \
&& git clone --depth 1 -b 1.34.1-1 https://github.com/nginx/unit \
&& cd unit \
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
Expand Down
4 changes: 2 additions & 2 deletions pkg/docker/Dockerfile.jsc11
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org"
LABEL org.opencontainers.image.source="https://github.com/nginx/unit"
LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images"
LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <[email protected]>"
LABEL org.opencontainers.image.version="1.34.0"
LABEL org.opencontainers.image.version="1.34.1"

RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \
Expand Down Expand Up @@ -35,7 +35,7 @@ RUN set -ex \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
&& mkdir -p /usr/src/unit \
&& cd /usr/src/unit \
&& git clone --depth 1 -b 1.34.0-1 https://github.com/nginx/unit \
&& git clone --depth 1 -b 1.34.1-1 https://github.com/nginx/unit \
&& cd unit \
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
Expand Down
4 changes: 2 additions & 2 deletions pkg/docker/Dockerfile.minimal
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org"
LABEL org.opencontainers.image.source="https://github.com/nginx/unit"
LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images"
LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <[email protected]>"
LABEL org.opencontainers.image.version="1.34.0"
LABEL org.opencontainers.image.version="1.34.1"

RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \
Expand Down Expand Up @@ -35,7 +35,7 @@ RUN set -ex \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
&& mkdir -p /usr/src/unit \
&& cd /usr/src/unit \
&& git clone --depth 1 -b 1.34.0-1 https://github.com/nginx/unit \
&& git clone --depth 1 -b 1.34.1-1 https://github.com/nginx/unit \
&& cd unit \
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
Expand Down
4 changes: 2 additions & 2 deletions pkg/docker/Dockerfile.node20
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org"
LABEL org.opencontainers.image.source="https://github.com/nginx/unit"
LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images"
LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <[email protected]>"
LABEL org.opencontainers.image.version="1.34.0"
LABEL org.opencontainers.image.version="1.34.1"

RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \
Expand Down Expand Up @@ -35,7 +35,7 @@ RUN set -ex \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
&& mkdir -p /usr/src/unit \
&& cd /usr/src/unit \
&& git clone --depth 1 -b 1.34.0-1 https://github.com/nginx/unit \
&& git clone --depth 1 -b 1.34.1-1 https://github.com/nginx/unit \
&& cd unit \
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
Expand Down
Loading
Loading