From 083474f67a6f38f0165ff2d6791d35fb778c843e Mon Sep 17 00:00:00 2001 From: John Coffey Date: Fri, 18 Sep 2026 10:52:56 -0700 Subject: [PATCH] Re-import upstream v0.16.22, stripped (strip tool update) The strip tool now also removes enterprise from build scripts' --features lists (Dockerfiles, CI), so the container and release builds work. Upstream commit: 474dd0229cb20cf513036619781ed97bd8073c3f Enterprise-only files removed or emptied: 63 Enterprise-only snippets removed: 117 in 50 files Dangling module declarations removed: 5 Edits turning enterprise off: 25 (11 in build scripts) Verification: clean --- .github/workflows/ci.yml | 8 ++++---- Dockerfile | 4 ++-- Dockerfile.build | 8 ++++---- Dockerfile.fdb | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab2691f..0695248 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -338,7 +338,7 @@ jobs: - name: Build run: | rustup target add ${{matrix.target}} - cargo build --release --target ${{matrix.target}} -p stalwart --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats enterprise" + cargo build --release --target ${{matrix.target}} -p stalwart --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats" mkdir -p artifacts mv ./target/${{matrix.target}}/release/stalwart.exe ./artifacts/stalwart.exe @@ -376,14 +376,14 @@ jobs: # echo "=== Package contents ===" # pkgutil --payload-files foundationdb.pkg || true # sudo installer -allowUntrusted -verbose -dumplog -pkg foundationdb.pkg -target / - # cargo build --release --target ${{matrix.target}} -p stalwart --no-default-features --features "foundationdb s3 redis nats enterprise" + # cargo build --release --target ${{matrix.target}} -p stalwart --no-default-features --features "foundationdb s3 redis nats" # mkdir -p artifacts # mv ./target/${{matrix.target}}/release/stalwart ./artifacts/stalwart-foundationdb - name: Build run: | rustup target add ${{matrix.target}} - cargo build --release --target ${{matrix.target}} -p stalwart --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats enterprise" + cargo build --release --target ${{matrix.target}} -p stalwart --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats" mkdir -p artifacts mv ./target/${{matrix.target}}/release/stalwart ./artifacts/stalwart @@ -439,7 +439,7 @@ jobs: export CARGO_TARGET_DIR=/tmp/target export CARGO_TERM_COLOR=always export CARGO_NET_RETRY=10 - cargo build --release -p stalwart --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats enterprise" + cargo build --release -p stalwart --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats" mkdir -p artifacts cp /tmp/target/release/stalwart artifacts/stalwart diff --git a/Dockerfile b/Dockerfile index c1f5475..11ead51 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,9 +19,9 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ g++-x86-64-linux-gnu binutils-x86-64-linux-gnu RUN rustup target add "$(cat /target.txt)" COPY --from=planner /recipe.json /recipe.json -RUN RUSTFLAGS="$(cat /flags.txt)" cargo chef cook --target "$(cat /target.txt)" --release --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats enterprise" --recipe-path /recipe.json +RUN RUSTFLAGS="$(cat /flags.txt)" cargo chef cook --target "$(cat /target.txt)" --release --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats" --recipe-path /recipe.json COPY . . -RUN RUSTFLAGS="$(cat /flags.txt)" cargo build --target "$(cat /target.txt)" --release -p stalwart --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats enterprise" +RUN RUSTFLAGS="$(cat /flags.txt)" cargo build --target "$(cat /target.txt)" --release -p stalwart --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats" RUN mv "/build/target/$(cat /target.txt)/release" "/output" FROM docker.io/debian:trixie-slim diff --git a/Dockerfile.build b/Dockerfile.build index 925a372..db6686d 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -108,7 +108,7 @@ RUN \ --mount=type=cache,target=/usr/local/cargo/git \ source /env-cargo && \ if [ ! -z "${FDB_ARCH}" ]; then \ - RUSTFLAGS="-L /usr/lib" cargo chef cook --recipe-path recipe.json --zigbuild --release --target ${TARGET} -p stalwart --no-default-features --features "foundationdb s3 redis nats enterprise"; \ + RUSTFLAGS="-L /usr/lib" cargo chef cook --recipe-path recipe.json --zigbuild --release --target ${TARGET} -p stalwart --no-default-features --features "foundationdb s3 redis nats"; \ fi RUN \ --mount=type=secret,id=ACTIONS_RESULTS_URL,env=ACTIONS_RESULTS_URL \ @@ -116,7 +116,7 @@ RUN \ --mount=type=cache,target=/usr/local/cargo/registry \ --mount=type=cache,target=/usr/local/cargo/git \ source /env-cargo && \ - cargo chef cook --recipe-path recipe.json --zigbuild --release --target ${TARGET} -p stalwart --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats enterprise" + cargo chef cook --recipe-path recipe.json --zigbuild --release --target ${TARGET} -p stalwart --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats" # Copy the source code COPY . . ENV RUSTC_WRAPPER="sccache" \ @@ -129,7 +129,7 @@ RUN \ --mount=type=cache,target=/usr/local/cargo/git \ source /env-cargo && \ if [ ! -z "${FDB_ARCH}" ]; then \ - RUSTFLAGS="-L /usr/lib" cargo zigbuild --release --target ${TARGET} -p stalwart --no-default-features --features "foundationdb s3 redis nats enterprise" && \ + RUSTFLAGS="-L /usr/lib" cargo zigbuild --release --target ${TARGET} -p stalwart --no-default-features --features "foundationdb s3 redis nats" && \ mv /app/target/${TARGET}/release/stalwart /app/artifact/stalwart-foundationdb; \ fi # Build generic version @@ -139,7 +139,7 @@ RUN \ --mount=type=cache,target=/usr/local/cargo/registry \ --mount=type=cache,target=/usr/local/cargo/git \ source /env-cargo && \ - cargo zigbuild --release --target ${TARGET} -p stalwart --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats enterprise" && \ + cargo zigbuild --release --target ${TARGET} -p stalwart --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats" && \ mv /app/target/${TARGET}/release/stalwart /app/artifact/stalwart # ***************** diff --git a/Dockerfile.fdb b/Dockerfile.fdb index fd732f8..a78fc93 100644 --- a/Dockerfile.fdb +++ b/Dockerfile.fdb @@ -53,7 +53,7 @@ COPY Cargo.lock . COPY crates/ crates/ COPY resources/ resources/ COPY tests/ tests/ -RUN cargo build -p stalwart --no-default-features --features "foundationdb s3 redis azure nats enterprise" --release +RUN cargo build -p stalwart --no-default-features --features "foundationdb s3 redis azure nats" --release FROM debian:trixie-slim AS runtime