summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2025-02-27Add 1.34.2 CHANGES1.34.21.34Andrew Clayton1-0/+10
This is autogenerated from docs/changes.xml by $ make -C docs/ changes && mv build/CHANGES . Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-02-27docs/changes.xml: Add 1.34.2 changelog entriesAndrew Clayton1-2/+17
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-02-25pkg/docker: Update dockerfiles for 1.34.2Andrew Clayton17-34/+34
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-02-25docs/unit-openapi.yaml: Update version for 1.34.2Andrew Clayton1-1/+1
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-02-25tools/unitctl: Update for version 1.34.2Andrew Clayton6-8/+8
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-02-25java: websocket: Additional payload length validationMark Thomas1-0/+7
<https://bz.apache.org/bugzilla/show_bug.cgi?id=64563> Patch taken from <https://github.com/apache/tomcat/commit/1c1c77b0efb667cea80b532440b44cea1dc427c3.patch> [ Subject / message tweak - Andrew ] Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-02-25java: websocket: Fix calculation of payload length for > 32bit valuesMark Thomas1-1/+1
Patch taken from <https://github.com/apache/tomcat/commit/1cddae8da4ecb4ac04575d3b5fba2daa2e0c8ead.patch> [ Subject / message tweak - Andrew ] Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-02-25Version bumpAndrew Clayton2-2/+34
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-01-10Add 1.34.1 CHANGES1.34.1Andrew Clayton1-0/+8
This is autogenerated from docs/changes.xml by $ make -C docs/ changes && mv build/CHANGES . Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-01-10docs/changes.xml: Add 1.34.1 changelog entriesAndrew Clayton1-2/+15
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-01-10pkg/docker: Update dockerfiles for 1.34.1Andrew Clayton17-34/+34
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-01-10docs/unit-openapi.yaml: Update version for 1.34.1Andrew Clayton1-1/+1
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-01-10tools/unitctl: Update for version 1.34.1Andrew Clayton6-8/+8
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-01-10auto/make: Fix various issues with building OTELAndrew Clayton1-18/+20
There were at least a couple of issues with building OTEL support. It only worked with GNU make due to the use of ifeq, even gmake had some issues. Debug builds were broken due to trying to pass --debug to cargo which is the default and isn't a valid option. This 'fixes' things by doing 'release' builds of OTEL by default. Passing D=1 to make will generate 'debug' builds but this as previously with D= etc, only works with GNU make. We make use of the '--emit link=' rustc option to place the libotel.a static library into build/lib This is good, it consolidates the static libraries into one place and it simplifies the build scripts. While we're at it pretty print the cargo command by default. Fixes: 9d3dcb800 ("otel: add build tooling to include otel code") Link: <https://github.com/nginx/unit/pull/1520#issuecomment-2556265063> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-01-10auto/otel: don't look for OpenSSL on DarwinKonstantin Pavlov1-23/+39
Rust code relies on macOS-provided frameworks for TLS. Fixes: 9d3dcb800 ("otel: add build tooling to include otel code") [ Tweaked subject prefix. Some minor tweaks for current changes. - Andrew ] Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-01-10auto/make: Add missing NXT_OTEL_LIB_STATIC to some C testsRemi Collet1-8/+12
Fixes: 9d3dcb800 ("otel: add build tooling to include otel code") [ Commit subject, s/NXT_OTEL_LIB_LOC/NXT_OTEL_LIB_STATIC/ and placement of NXT_OTEL_LIB_STATIC tweaked as per @thresheek - Andrew ] Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-01-10auto/make, otel: fix linking on macOS and UbuntuKonstantin Pavlov1-4/+6
The static library is supposed to be specified prior to its dependencies. Also, no need to put an otel static library inside libnxt static library, as we explicitely link unit binary with otel static library anyway. This fixes the following build problems: - macOS: Finished `release` profile [optimized] target(s) in 58.07s AR build/lib/libnxt.a LD build/sbin/unitd ld: archive member 'libotel.a' not a mach-o file in '/private/tmp/unit-20241219-8965-yb46xp/build/lib/libnxt.a' clang: error: linker command failed with exit code 1 (use -v to see invocation) - Ubuntu 22 (./configure --otel): LD build/sbin/unitd cc -Wl,-E -o build/sbin/unitd -pipe -fPIC -fvisibility=hidden -fno-strict-overflow -funsigned-char -std=gnu11 -O -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fno-strict-aliasing -Wmissing-prototypes -Werror -g \ build/src/nxt_main.o build/lib/libnxt.a \ -lm -lrt -lpthread \ \ -lpcre2-8 -lssl -lcrypto src/otel/target/release/libotel.a /usr/bin/ld: src/otel/target/release/libotel.a(reqwest-97d1376dfb77d784.reqwest.cb371ce8e1e3945e-cgu.04.rcgu.o): in function `core::ptr::drop_in_place<alloc::vec::Vec<reqwest::tls::Certificate>>': reqwest.cb371ce8e1e3945e-cgu.04:(.text._ZN4core3ptr69drop_in_place$LT$alloc..vec..Vec$LT$reqwest..tls..Certificate$GT$$GT$17h9b62679cc7161be5E+0x30): undefined reference to `X509_free' Fixes: 9d3dcb800 ("otel: add build tooling to include otel code") [ Tweaked subject prefix. s/NXT_OTEL_LIB_LOC/NXT_OTEL_LIB_STATIC/ - Andrew ] Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-01-10auto/make: s/NXT_OTEL_LIB_LOC/NXT_OTEL_LIB_STATIC/Andrew Clayton1-10/+10
This better matches existing naming convention, e.g NXT_LIB_STATIC Fixes: 9d3dcb800 ("otel: add build tooling to include otel code") Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-01-10auto/otel: Make use of nxt_feature_nameAndrew Clayton1-7/+1
When building with --otel on macOS for example I was seeing compile failures with the cpu_set_t stuff which should only be used under Linux. It turned out that despite checking for Linux sched_getaffinity() ... not found we were getting #ifndef NXT_HAVE_LINUX_SCHED_GETAFFINITY #define NXT_HAVE_LINUX_SCHED_GETAFFINITY 1 #endif in build/include/nxt_auto_config.h It seems this was due to the . auto/feature in auto/otel, this check happens right after the above. Without having nxt_feature_name=NXT_HAVE_OTEL set. Instead we were adding the define for that manually. Doing auto/feature without having a nxt_feature_name must have used the last set one and enabled it. Set nxt_feature_name and remove the manual editing of nxt_auto_config.h Fixes: 9d3dcb800 ("otel: add build tooling to include otel code") Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-01-10otel: remove deadcodeAva Hahn1-10/+1
The superfluous else condition in nxt_otel_propagate_header was dead code. This commit removes it. Signed-off-by: Ava Hahn <a.hahn@f5.com>
2025-01-10otel: fix segfaults when otel not configuredAva Hahn1-6/+9
This commit adds NULL checks for the request->otel object that were missed in the Traceparent and Tracestate routines. Closes: https://github.com/nginx/unit/issues/1523 Closes: https://github.com/nginx/unit/issues/1526 Fixes: 9d3dcb800 ("otel: add build tooling to include otel code") Signed-off-by: Ava Hahn <a.hahn@f5.com>
2025-01-10Version bumpAndrew Clayton2-2/+34
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-12-19Add 1.34.0 CHANGES1.34.0Andrew Clayton1-0/+10
This is autogenerated from docs/changes.xml by $ make -C docs/ changes && mv build/CHANGES . Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-12-19docs/changes.xml: Add 1.34.0 changelog entriesAndrew Clayton1-4/+23
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-12-18pkg/docker: Update dockerfiles for 1.34.0Andrew Clayton17-91/+428
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-12-18docs/unit-openapi.yaml: Update version for 1.34.0Andrew Clayton1-1/+1
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-12-18tools/unitctl: Update for version 1.34.0Andrew Clayton6-8/+8
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-12-18.mailmap: Add an entry for IgorAndrew Clayton1-0/+1
You can always see the original names/addresses used by passing --no-mailmap to the various git commands. See gitmailmap(5) Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-12-18Docker: update Rust versionKonstantin Pavlov1-1/+1
2024-12-18Docker: renamed branch to fetch from after successfull hg->git migrationoxpa1-1/+1
(cherry picked from commit 4ca64ff4cd71334c7661e487f7e7953c20e04154) Signed-off-by: Konstantin Pavlov <thresh@nginx.com>
2024-12-18Docker: enable otel and fix build with wasmtime 24+Konstantin Pavlov2-25/+26
2024-12-18Packages: enable otel supportKonstantin Pavlov4-7/+23
2024-12-18contrib: update wasmtime to 27.0.0Konstantin Pavlov2-2/+2
2024-12-18contrib: update njs to 0.8.8Konstantin Pavlov2-2/+2
2024-12-18wasm-wc: Update cratesAndrew Clayton1-417/+564
Run 'cargo update' to get the latest version of the required crates in preparation for the 1.34.0 release. This resolves a dependabot notification regarding 'idna'. Link: <https://github.com/nginx/unit/security/dependabot/13> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-12-18tools/unitctl: Update cratesAndrew Clayton1-588/+767
Run 'cargo update' to get the latest version of the required crates in preparation for the 1.34.0 release. This resolves a dependabot notification regarding 'idna'. Link: <https://github.com/nginx/unit/security/dependabot/14> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-12-18otel: Update cratesAndrew Clayton1-237/+531
Run 'cargo update' to get the latest version of the required crates in preparation for the 1.34.0 release. The rustls update fixes a panic in `rustls::server::Acceptor::accept()`, but Unit does not use this code path and was not affected. Link: <https://rustsec.org/advisories/RUSTSEC-2024-0399.html> Link: <https://github.com/nginx/unit/security/dependabot/11> Closes: <https://github.com/nginx/unit/issues/1503> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-12-18wasm-wc: Update to wasmtime 27.0.0Andrew Clayton2-76/+76
For no real reason other than to be on the latest release for the next release of Unit... Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-12-13auto/otel: Remove pkg-config checkAndrew Clayton1-3/+1
@thresheek reported an issue trying to configure OTEL support on Amazon Linux 2 checking for OTEL requirements: - checking for rust compiler ... found - checking for cargo ... found - checking for OpenSSL library ... found Package openssl was not found in the pkg-config search path. Perhaps you should add the directory containing `openssl.pc' to the PKG_CONFIG_PATH environment variable No package 'openssl' found We successfully built the test program with '-lssl -lcrypto', but then tried to use 'pkg-config openssl --cflags --libs' to override NXT_OTEL_LIBS. On Amazon Linux2 there is no openssl.pc, they have a openssl11.pc. Let's just remove the pkg-config check, if we get here, we have successfully built with '-lssl -lcrypto', so just go with that (it also matches what we do in auto/ssltls). Reported-by: Konstantin Pavlov <thresh@nginx.com> Closes: https://github.com/nginx/unit/issues/1510 Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-12-12Packages: add Fedora 41 supportKonstantin Pavlov7-7/+173
While at it, removed support for Fedora 39 as it's EOL.
2024-12-12Packages: support rpm 4.20+Konstantin Pavlov1-10/+16
In 4.20, rpm changed the way build roots are named. Our packaging relies on the symlinks being created as a part of a rule to make sure targets are being built correctly. This patch implements (a hacky) way to check what the build root should be named on a currently running rpm version and adjusts the symlinks accordingly.
2024-12-12Docker: update Python and PHP versionsKonstantin Pavlov4-8/+8
2024-12-10otel: Disable static_mut_refs warning for nxt_otel_rs_span_tx()Andrew Clayton1-0/+1
When compiling OTEL support with rustc 1.83.0 we started getting the following warning Compiling otel v0.1.0 (/home/andrew/src/unit/src/otel) warning: creating a mutable reference to mutable static is discouraged --> src/lib.rs:42:9 | 42 | SPAN_TX.take(); | ^^^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives = note: `#[warn(static_mut_refs)]` on by default warning: `otel` (lib) generated 1 warning Finished `release` profile [optimized] target(s) in 1m 07s However it *seems* our usage is OK, so we can disable this warning (which it seems will soon turn into a hard error), fortunately we only need to disable it for the nxt_otel_rs_span_tx() function. Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-12-09java: update third-party components to their recent versionsSergey A. Osokin3-13/+13
2024-12-05ci: Build with --otel on dev distrosAndrew Clayton1-6/+8
This just builds the OTEL stuff for the Fedora Rawhide and Alpine Edge distributions. If we ever get test cases covering OTEL we can figure out the best way to do it in the ci.yaml, but right now I don't see the point in building OTEL in every test configuration there... Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-12-05tools/unitctl: bump anstream from 0.6.5 to 0.6.15dependabot[bot]1-2/+9
Bumps [anstream](https://github.com/rust-cli/anstyle) from 0.6.5 to 0.6.15. - [Commits](https://github.com/rust-cli/anstyle/compare/anstream-v0.6.5...anstream-v0.6.15) --- updated-dependencies: - dependency-name: anstream dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-11-26wasm: Fix build with wasmtime 27.0.0Sergey A. Osokin1-0/+6
Wasmtime 27.0.0 adjusted the C API to start flowing through the directory and file permission bits of the underlying rust wasi_config_preopen_dir() implementation. The directory permissions control whether a directory is read-only or whether you can create/modify files within. You always need at least WASMTIME_WASI_DIR_PERMS_READ. The file permissions control whether you can read or read/write files. WASMTIME_WASI_FILE_PERMS_WRITE seems to imply WASMTIME_WASI_FILE_PERMS_READ (but we add both just to make it clear what we want) [ Permissions tweak and commit message - Andrew ] Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-11-19Decast nxt_cpymem()Andrew Clayton1-1/+1
nxt_cpymem() is basically mempcpy(3) Like mempcpy() nxt_cpymem() returns a void *. nxt_cpymem() is implemented as a wrapper around memcpy(3), however before returning the new pointer value we cast the return of memcpy(3) to a u_char *, then add the length parameter to it. I guess this was done to support compilers that do not support arithmetic on void pointers as the C standard forbids it. However since we removed support for compilers other than GCC and Clang (ending in commit 9cd11133 ("Remove support for Sun's Sun Studio/SunPro C compiler")) this is no longer an issue as both GCC and Clang support arithmetic on void pointers (without the -pedantic option) by treating the size of a void as 1. While removing the unnecessary casting in this case doesn't necessarily improve type-safety (as we're dealing with void *'s in and out), it does just make the code that little more readable. Oh and for interest we have actually already been relying on this extension src/nxt_array.c:143:40: warning: arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith] 143 | nxt_memcpy(data, src->elts + (i * size), size); | ~~~~~~~~~ ^ src/nxt_string.h:45:24: note: expanded from macro 'nxt_memcpy' 45 | (void) memcpy(dst, src, length) | ^~~ which was introduced in e2b53e16 ("Added "rootfs" feature.") back in 2020. Link: <https://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html> Link: <https://clang.llvm.org/docs/LanguageExtensions.html#introduction> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-11-14tests: Add tests for JSON format access logZhidao HONG1-0/+24
2024-11-14http: Support JSON format in access logZhidao HONG2-16/+229
Allow format to be an object to generate JSON logs. The object keys become JSON field names, and values support string, variable, and JS. Note that when there is no JS in the format values, the object will be pre-serialized to a JSON template string at configuration phase for better performance. Example config: { "access_log": { "path": "/tmp/access.log", "format": { "remote_addr": "$remote_addr", "time_local": "$time_local", "request_line": "$request_line", "status": "$status", "body_bytes_sent": "$body_bytes_sent", "header_referer": "$header_referer", "header_user_agent": "$header_user_agent" } } }