File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ jobs:
162162 cargo-version : ${{ inputs['cargo-version'] }}
163163 image-tag : ${{ needs.resolve.outputs.image_tag_base }}
164164 checkout-ref : ${{ inputs['checkout-ref'] }}
165- features : openshell-core/dev-settings
165+ features : ${{ inputs.component == 'gateway' && ' openshell-core/dev-settings bundled-z3' || 'openshell-core/dev-settings' }}
166166 artifact-name : ${{ needs.resolve.outputs.artifact_prefix }}-linux-${{ matrix.arch }}
167167 secrets : inherit
168168
Original file line number Diff line number Diff line change @@ -435,7 +435,7 @@ jobs:
435435 run : |
436436 set -euo pipefail
437437 mise x -- rustup target add ${{ matrix.target }}
438- mise x -- cargo zigbuild --release --target ${{ matrix.zig_target }} -p openshell-server --bin openshell-gateway
438+ mise x -- cargo zigbuild --release --target ${{ matrix.zig_target }} -p openshell-server --bin openshell-gateway --features bundled-z3
439439 mkdir -p artifacts/bin
440440 install -m 0755 target/${{ matrix.target }}/release/openshell-gateway artifacts/bin/openshell-gateway
441441
@@ -445,6 +445,11 @@ jobs:
445445 OUTPUT="$(artifacts/bin/openshell-gateway --version)"
446446 echo "$OUTPUT"
447447 grep -q '^openshell-gateway ' <<<"$OUTPUT"
448+ ldd artifacts/bin/openshell-gateway || true
449+ if ldd artifacts/bin/openshell-gateway | grep -q 'libz3'; then
450+ echo "gateway binary must not depend on shared libz3; build with bundled-z3" >&2
451+ exit 1
452+ fi
448453
449454 - name : Verify glibc symbol floor
450455 run : tasks/scripts/verify-glibc-symbols.sh 2.31 artifacts/bin/openshell-gateway
Original file line number Diff line number Diff line change @@ -469,7 +469,7 @@ jobs:
469469 run : |
470470 set -euo pipefail
471471 mise x -- rustup target add ${{ matrix.target }}
472- mise x -- cargo zigbuild --release --target ${{ matrix.zig_target }} -p openshell-server --bin openshell-gateway
472+ mise x -- cargo zigbuild --release --target ${{ matrix.zig_target }} -p openshell-server --bin openshell-gateway --features bundled-z3
473473 mkdir -p artifacts/bin
474474 install -m 0755 target/${{ matrix.target }}/release/openshell-gateway artifacts/bin/openshell-gateway
475475
@@ -479,6 +479,11 @@ jobs:
479479 OUTPUT="$(artifacts/bin/openshell-gateway --version)"
480480 echo "$OUTPUT"
481481 grep -q '^openshell-gateway ' <<<"$OUTPUT"
482+ ldd artifacts/bin/openshell-gateway || true
483+ if ldd artifacts/bin/openshell-gateway | grep -q 'libz3'; then
484+ echo "gateway binary must not depend on shared libz3; build with bundled-z3" >&2
485+ exit 1
486+ fi
482487
483488 - name : Verify glibc symbol floor
484489 run : tasks/scripts/verify-glibc-symbols.sh 2.31 artifacts/bin/openshell-gateway
Original file line number Diff line number Diff line change @@ -245,6 +245,10 @@ jobs:
245245 # Record linkage so image runtime drift is visible in logs.
246246 ldd --version
247247 ldd "$BIN" || true
248+ if [[ "${{ inputs.component }}" == "gateway" ]] && ldd "$BIN" | grep -q 'libz3'; then
249+ echo "gateway binary must not depend on shared libz3; enable bundled-z3 for image artifacts" >&2
250+ exit 1
251+ fi
248252
249253 - name : Verify glibc symbol floor
250254 if : inputs.component == 'gateway'
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ rustix = { workspace = true }
9696x509-parser = " 0.16"
9797
9898[features ]
99+ bundled-z3 = [" openshell-prover/bundled-z3" ]
99100dev-settings = [" openshell-core/dev-settings" ]
100101test-support = []
101102
Original file line number Diff line number Diff line change 7373 set -euo pipefail
7474
7575 cargo build --release --locked -p openshell-cli --features bundled-z3
76- cargo build --release --locked -p openshell-server --bin openshell-gateway
76+ cargo build --release --locked -p openshell-server --bin openshell-gateway --features bundled-z3
7777 cargo build --release --locked -p openshell-sandbox --bin openshell-sandbox
7878
7979 install -D -m 0755 "$CRAFT_PART_BUILD/target/release/openshell" \
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ hide = true
3131description = " Build release Rust binaries consumed by the hand-staged snap"
3232run = [
3333 " cargo build --release -p openshell-cli --features bundled-z3" ,
34- " cargo build --release -p openshell-server" ,
34+ " cargo build --release -p openshell-server --features bundled-z3 " ,
3535 " cargo build --release -p openshell-sandbox" ,
3636]
3737
Original file line number Diff line number Diff line change @@ -149,6 +149,9 @@ build_component_for_arch() {
149149 target=" $( target_triple " $arch " " $target_libc " ) "
150150 stage=" ${ROOT} /deploy/docker/.build/prebuilt-binaries/${arch} "
151151 features=" ${EXTRA_CARGO_FEATURES:- openshell-core/ dev-settings} "
152+ if [[ " $component " == " gateway" && " ${features} " != * " bundled-z3 " * ]]; then
153+ features=" ${features} bundled-z3"
154+ fi
152155 current_host_os=" $( host_os) "
153156 current_host_arch=" $( host_arch) "
154157
You can’t perform that action at this time.
0 commit comments