Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
678c056
Fixes: 64934e59f ("HTTP: Introduce quoted target marker in HTTP parsi…
hongzhidao Apr 16, 2024
a48fbc0
Add additional information to the README
avahahn Apr 16, 2024
d7ce356
Elaborate on docker image differences
avahahn Apr 18, 2024
237a26a
wasm-wc: Bump the rustls crate from 0.21.10 to 0.21.11
dependabot[bot] Apr 19, 2024
3fbca6c
Fix some trailing whitespace and long lines in the README
ac000 Apr 22, 2024
e5bc299
configuration: Constify numerous pointers
ac000 Apr 16, 2024
8f861cf
Constify a bunch of static local variables
ac000 Apr 16, 2024
33c978c
php: Constify some local static variables
ac000 Apr 16, 2024
31cec90
configuration: Constify more pointers
ac000 Apr 17, 2024
b26c119
Tighten up some string arrays
ac000 Apr 22, 2024
db3cf3e
tools: Add unitctl CLI
avahahn Apr 22, 2024
2c4502f
tools: Add unitctl section to the README
tarynmusgrave Apr 26, 2024
ff2e0f4
Add a GitHub workflow to check for whitespace issues
ac000 Apr 22, 2024
5b01bd6
auto/wasm: No need to explicitly set -fno-strict-aliasing now
ac000 Apr 29, 2024
e2a09c7
Convert 0-sized arrays to true flexible array members
ac000 Apr 13, 2023
5d1ce5c
auto, perl: Fix building the Perl language module with clang
ac000 Apr 22, 2024
6e8f7bb
tools/unitctl: Initial Docker Procedures
avahahn Apr 26, 2024
818d4ad
tools/unitctl: API Plumbing for docker deployments
avahahn May 1, 2024
f6989dd
tools/unitctl: Add Docker deployment functionality
avahahn May 2, 2024
1d23799
tools/unitctl: Add new functionality to README.md and fmt code
avahahn May 2, 2024
4e4d1dd
tools/unitctl: temporarily ignore issues with autogenerated readme
avahahn May 3, 2024
e61d9e7
tools/unitctl: Readme fixes
avahahn May 3, 2024
787980d
tools/unitctl: Improve quality of life on osx
avahahn May 3, 2024
cb03d31
tools/unitctl: Update host_path() to account for OSX special behaviour
avahahn May 4, 2024
6ad1fa3
tools/unitctl: clean up control socket impls
avahahn May 6, 2024
cc9eb8e
tools/unitctl: enable passing IP addresses to the 'instances new' com…
avahahn May 6, 2024
da43f44
java: Update third-party components
osokin May 8, 2024
05a8229
http: Use consistent target in nxt_h1p_peer_header_send()
hongzhidao Apr 30, 2024
87077ec
http: Ensure REQUEST_URI immutability
hongzhidao Apr 30, 2024
eed2178
tests: Change request_uri tests for changed behaviour
javorszky Apr 30, 2024
0000976
tests: REQUEST_URI variable test with rewrite
andrey-zelenkov Apr 30, 2024
3bbc011
Add unitctl build and release CI
arbourd May 7, 2024
370fae1
trigger unitctl CI on version tags of existing format
avahahn May 9, 2024
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
48 changes: 48 additions & 0 deletions .github/workflows/check-whitespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Check Whitespace

# Get the repo with the commits(+1) in the series.
# Process `git log --check` output to extract just the check errors.

on:
pull_request:
types: [ opened, synchronize ]

jobs:
check-whitespace:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: git log --check
id: check_out
run: |
log=
commit=
while read dash etc
do
case "${dash}" in
"---")
commit="${etc}"
;;
"")
;;
*)
if test -n "${commit}"
then
log="${log}\n${commit}"
echo ""
echo "--- ${commit}"
fi
commit=
log="${log}\n${dash} ${etc}"
echo "${dash} ${etc}"
;;
esac
done <<< $(git log --check --pretty=format:"--- %h %s" ${{github.event.pull_request.base.sha}}..)

if test -n "${log}"
then
exit 2
fi
132 changes: 132 additions & 0 deletions .github/workflows/unitctl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@

name: unitctl

on:
pull_request:
paths:
- tools/unitctl/**
push:
branches:
- master
tags:
- ([0-9]+\.[0-9]+\.[0-9]+)(-[0-9]+)?

permissions:
contents: write

jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: tools/unitctl
env:
MAKE: make
CARGO: cargo
VERSION:
SHORT_VERSION:
strategy:
fail-fast: false
matrix:
include:
- build: linux-aarch64
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
- build: linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- build: macos-aarch64
os: macos-latest
target: aarch64-apple-darwin
- build: macos-x86_64
os: macos-latest
target: x86_64-apple-darwin

steps:
- uses: actions/checkout@v4

- run: rustup update stable
- run: rustup target add ${{ matrix.target }}

- name: Install cross
if: matrix.target == 'aarch64-unknown-linux-gnu'
uses: taiki-e/install-action@v2
with:
tool: cross

- uses: Swatinem/rust-cache@v2
with:
prefix-key: rust-${{ matrix.build }}
workspaces: ./tools/unitctl -> target
save-if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') }}

- name: Configure linux arm depedencies
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
cat <<EOF > Cross.toml
[target.aarch64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture \$CROSS_DEB_ARCH",
"apt-get update && apt-get install --assume-yes libssl-dev:\$CROSS_DEB_ARCH"
]
EOF

cat Cross.toml
echo "CARGO=cross" >> $GITHUB_ENV

- name: Install macOS depedencies
if: startsWith(matrix.os, 'macos')
run: |
brew install make gnu-sed grep gawk
echo "MAKE=gmake" >> $GITHUB_ENV

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21

- run: ${{ env.MAKE }} list-targets

- name: Make unitctl (${{ env.MAKE }}, ${{ matrix.target }})
run: ${{ env.MAKE }} ${{ matrix.target }}

- name: Get the version from the tag
run: |
version=${{ github.ref_name }}
short="${version#*/}"
echo $version; echo $short
echo "VERSION=$version" >> $GITHUB_ENV
echo "SHORT_VERSION=$short" >> $GITHUB_ENV

- name: Generate sha256 sum
run: |
shasum -a 256 ./target/${{ matrix.target }}/release/unitctl > unitctl-${{ env.SHORT_VERSION }}-${{ matrix.target }}.sha256
mv ./target/${{ matrix.target }}/release/unitctl unitctl-${{ env.SHORT_VERSION }}-${{ matrix.target }}

- name: Upload sha256 sum
uses: actions/upload-artifact@v4
with:
name: unitctl-${{ env.SHORT_VERSION }}-${{ matrix.target }}.sha256
path: tools/unitctl/unitctl-${{ env.SHORT_VERSION }}-${{ matrix.target }}.sha256

- name: Upload unitctl
uses: actions/upload-artifact@v4
with:
name: unitctl-${{ env.SHORT_VERSION }}-${{ matrix.target }}
path: tools/unitctl/unitctl-${{ env.SHORT_VERSION }}-${{ matrix.target }}

release:
# Create a draft release if a tag
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true

- name: Create GitHub release
uses: ncipollo/release-action@v1
with:
artifacts: "unitctl-*"
allowUpdates: true
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,25 @@ For details and available language packages, see the
### Docker

``` console
$ docker pull unit
$ docker pull unit:<TAG>
$ mkdir /tmp/unit-control # customize as needed.
$ docker run -d \
--mount type=bind,src=/tmp/unit-control,dst=/var/run \
--mount type=bind,src=.,dst=/www \
--network host \
unit
```

For a description of image tags, see the
[docs](https://unit.nginx.org/installation/#docker-images).

WARNING: latest image tag may not provide support for specific language
modules, *do* check the available image tags from the link above before
pulling your image.

Your current working directory will now be mounted to the Unit image at `/www`.
You can reach its socket at `/tmp/unit-control/control.unit.sock` assuming no
further customizations have been made.

### Amazon Linux, Fedora, Red Hat

Expand All @@ -71,6 +84,15 @@ $ wget https://github.com/nginx/unit/master/tools/setup-unit && c
For details and available language packages, see the
[docs](https://unit.nginx.org/installation/#official-packages).

## Configuration

NGINX Unit provides a RESTful API for dynamic configuration.
See the [control API documentation](https://unit.nginx.org/controlapi/)
for more information on what endpoints are available and how to use them.


For full details of configuration management, see the
[docs](https://unit.nginx.org/configuration/#configuration-management).

## Running a Hello World App

Expand Down Expand Up @@ -161,8 +183,10 @@ Unit's output should contain both snippets, neatly organized:
}
```

For full details of configuration management, see the
[docs](https://unit.nginx.org/configuration/#configuration-management).
## WebAssembly
Unit supports running WebAssembly Components (WASI 0.2).
For more information see the
[Unit Configuration Docs](https://unit.nginx.org/configuration/#configuration-wasm).

## OpenAPI Specification

Expand Down Expand Up @@ -198,4 +222,3 @@ usability.
- For security issues, [email us](mailto:security-alert@nginx.org),
mentioning NGINX Unit in the subject and following the [CVSS
v3.1](https://www.first.org/cvss/v3.1/specification-document) spec.

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.86
NXT_TOMCAT_VERSION=9.0.89

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.165
NXT_JAR_VERSION=4.8.172
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 @@
d0c17607eee55e181baa03f1abb2cf77f50e5114c471c2031607206768d8549c74ebb0a276d87dd3f8ea44db5e54e56087311c229ba18ad6013c388fc861beed classgraph-4.8.165.jar
e9902308f706e94989132825ceecb5401e8440ab3c092270e248f24a604ec9aa964f32b87a249e0cf98a303cd12b895ba57793efc55d782c575f2086dd04695e classgraph-4.8.172.jar
ab441acf5551a7dc81c353eaccb3b3df9e89a48987294d19e39acdb83a5b640fcdff7414cee29f5b96eaa8826647f1d5323e185018fe33a64c402d69c73c9158 ecj-3.26.0.jar
6e1d6fdffcb2acf8daa9ce5b3ad973526a30b3556dc8e950254c68c64cd70e101b28a8acac41b3bd74de6b9c8eac10676afdc3c58ccb1f61a74323721592e0b5 jetty-http-9.4.54.v20240208.jar
780ee47a8722bdfb4b159f440acbfb69afdb73cc329906392b10eba8d30c564aa6377fab129e61b85a56945f01c4403913c80b6ce3158d108d88a3ad64527f06 jetty-server-9.4.54.v20240208.jar
fbe9cf7efeba9f29297f75de3f1c2d98f0e02816a1dc9e6eaddcabb84c3a699a9332218c532017a3707ec57f4f99066bc671708bde4ec84dd873b8403422d7e9 jetty-util-9.4.54.v20240208.jar
1aa9024f49f74b44252f7c90d00bbfdd6aae4e96866708a0c2325def0314c8b7e5ad2fd17bb6b4b135eb2c513fe74b5b591d4b0fe3d1921192cfecadf140b7fa tomcat-api-9.0.86.jar
60a9991ff7b95ef4edfac57cd7c18b6c5177d9aee4f775b5794b5833246b928e1a685b80785babd2f450e3cd18383c58b843b0b5e742252a37044494bc90d608 tomcat-el-api-9.0.86.jar
b09cbfb834564cc7025ffad7bf069569989d3efa3bd176696045aea08bfb53622aa1aece5c84ea4371f0193d4fd477b9179999399e75d04205b219a3ab19bb66 tomcat-jasper-9.0.86.jar
1431469e91debc0ffcf820df2973782221be955dac0739a77d9030ac619cde96320970cb27eb2ff9de1e6bde3227a70b1645d1934da8e10fe2b32c069d33afec tomcat-jasper-el-9.0.86.jar
1ad9ebc1c49beb243c18ab2c459dbd54cab9514223c44b5c7e05d53d290c64c49990fc0fe276c66b1f6f6625acca651fdcb4b7df9e23fb0cc43bc05ad3900798 tomcat-jsp-api-9.0.86.jar
d30055aabf5d45ad350e01702ed0ff4bfbcdd14bee40e1e8a9a7690719816aff019ca961b7970234eaba673c3c13f5cea5dbf1bc0612ce4e8f7de795af2f170d tomcat-juli-9.0.86.jar
d7fa7d7bf35b35b7bb925cce6284e2f750e8e94ee54057daff4e369a32b361e6044e9011048a9dff54b12371ee785d34e82306b60ffae8add76602071e5fc9c5 tomcat-servlet-api-9.0.86.jar
b4a268b79fbfcd610ea5d14446ef71ad5f2ad3da247ae148669e3082ff5fd7f7256a2ecdf2529e4280ed393f53c3a7f6d09a5c38d5653b30b25ab3c4b74ed732 tomcat-util-9.0.86.jar
f2086356c8eca5cfe890232056ce30378422d3994c499845f52ec8641453af02041ae31ffdcb567bb998f0f24465d1ab65456b23e8f781058efdc01658c7252d tomcat-util-scan-9.0.86.jar
f52247c8ede15330b83de6947852ccad85b00e58a877693a7a6b1240e5965a7576227dc02a9bd0e499fb84b2d6c9ed8f3e893fc777843bcc9fca07eb1e89673e tomcat-api-9.0.89.jar
1de5e968568355f5bcd8efe1cf7fad5c427436d9307f2822636ce82d888033d01247e63a7b45941d7823c9eaa7204663281fe3a0d4ed765305ba3071d3525fb6 tomcat-el-api-9.0.89.jar
aa9af50b2198a2fa772691f867ecadaeb582381fce8324523e73f4a766b526866447450a5c62184fcfe8ed0b9def7f6268a7296aad628fcd5442b426f62e3cbb tomcat-jasper-9.0.89.jar
40448f3fe8cdd920d0f81c2b8bd1322f3f308a1ba3598050d4623941056061485c26fb9aad53caffe433de8fd98a92d4c101d63ad876eb2700b052f6c50e9e84 tomcat-jasper-el-9.0.89.jar
0b174cf2b3dde3bb768ec9af60429572bd1e1c1a009173406f60113c3ca0165216f1d235d505b295fad95b8298bac759c0e36715a111a91c4ec759a738a27a29 tomcat-jsp-api-9.0.89.jar
f4ebbb1a57b3f797c272d99e67474dad5f7eba7649a2d33a18c4ca8fb4b03f7f83dfe37363b6e6029eefbda3615982d23383f9dee35bfb45b2e882f3f3216839 tomcat-juli-9.0.89.jar
ff646b3afce76efd7385434866ee9b9b55fe24c561c0eb1666656b87acd4bb3efb822e81b578bee5b1e4a1dbe5f5ddf39e7f3ccf009ec95982874b24e72cd00e tomcat-servlet-api-9.0.89.jar
ee1d45adf8be50a941c553dcf2edfb479f0bae9bc07223578ae490f7ffd362db8d1ad0b0e6d08dc839737c3b25995a99e66df909b4501898388b09df42a38d6c tomcat-util-9.0.89.jar
8364c2fa7beb5a4bf0d5766e9081eb80a7b7160f89944af3889a14daffb9566b25ce9d91cc193b62b6def357a19f6ab18d75f856c7cb6f4190faf5ff66808eaf tomcat-util-scan-9.0.89.jar
6 changes: 6 additions & 0 deletions auto/modules/perl
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ if /bin/sh -c "$NXT_PERL -MConfig -e 'print \"Perl version: \",
| sed -e 's/-arch i386//' -e 's/-arch x86_64//'`
fi

if [ "$NXT_CC_NAME" = "clang" ]; then
# Perl's CFLAGS has -fwrapv which under clang discards our
# -fno-strict-overflow resulting in an unused argument error
NXT_PERL_CFLAGS="$NXT_PERL_CFLAGS -Qunused-arguments"
fi

nxt_feature="Perl"
nxt_feature_name=""
nxt_feature_run=no
Expand Down
3 changes: 1 addition & 2 deletions auto/modules/wasm
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ NXT_WASM_LDFLAGS=
if [ "$NXT_WASM_RUNTIME" = "wasmtime" ]; then
NXT_WASM_LDFLAGS=-lwasmtime
fi
NXT_WASM_ADDITIONAL_FLAGS="-fno-strict-aliasing \
-Wno-missing-field-initializers \
NXT_WASM_ADDITIONAL_FLAGS="-Wno-missing-field-initializers \
-DNXT_HAVE_WASM_$(echo ${NXT_WASM_RUNTIME} | tr 'a-z' 'A-Z') \
"

Expand Down
Loading