Skip to content

Commit 516686f

Browse files
committed
Add deterministic C++ release artifacts
1 parent 16e4be0 commit 516686f

7 files changed

Lines changed: 480 additions & 1 deletion

File tree

Makefile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ endif
5858
.PHONY: test-integration-adapters test-syslog-adapters
5959
.PHONY: test-conformance test-cli test-integration test-syslog test-deadline
6060
.PHONY: test-openssh test-live test-sanitize test-fuzz-smoke fuzz _fuzz-smoke test-readme check
61+
.PHONY: test-release release-metadata release-package
6162
.PHONY: dependencies-check crypto-check fuzz-check diagnostics verify-binary clean _not-implemented FORCE
6263

6364
build: $(BINARY)
@@ -195,12 +196,26 @@ diagnostics: dependencies-check crypto-check
195196
@echo "libcrypto=$$($(PKG_CONFIG) --modversion libcrypto)"
196197
@$(PYTHON) -c 'import json; value=json.load(open("third_party/dependencies.json")); print(" ".join(item["name"]+"="+item["version"] for item in value["dependencies"]))'
197198

198-
check: dependencies-check test build verify-binary
199+
check: dependencies-check test build verify-binary test-release
199200

200201
verify-binary: build
201202
@test "$(TARGET)" = "$(HOST_SYSTEM)-$(HOST_ARCH)" || { echo "verify-binary requires the host target" >&2; exit 1; }
202203
$(PYTHON) scripts/verify_binary.py --binary "$(BINARY)" --target "$(TARGET)" --version "$(VERSION)" --revision "$(REVISION)" --source-date-epoch "$(SOURCE_DATE_EPOCH)"
203204

205+
release-metadata: verify-binary
206+
$(PYTHON) scripts/package_release.py --cxx "$(CXX)" --pkg-config "$(PKG_CONFIG)" \
207+
--dist "$(DIST_DIR)" --version "$(VERSION)" --revision "$(REVISION)" \
208+
--source-date-epoch "$(SOURCE_DATE_EPOCH)" --target "$(TARGET)"
209+
210+
test-release: release-metadata
211+
$(PYTHON) scripts/release_package_test.py "$(CXX)" "$(PKG_CONFIG)" "$(DIST_DIR)" \
212+
"$(VERSION)" "$(REVISION)" "$(SOURCE_DATE_EPOCH)" "$(TARGET)" "$(PYTHON)"
213+
214+
release-package: check
215+
$(PYTHON) scripts/package_release.py --cxx "$(CXX)" --pkg-config "$(PKG_CONFIG)" \
216+
--dist "$(DIST_DIR)" --version "$(VERSION)" --revision "$(REVISION)" \
217+
--source-date-epoch "$(SOURCE_DATE_EPOCH)" --target "$(TARGET)" --archive
218+
204219
test-openssh: build
205220
$(PYTHON) tests/integration/openssh_authorized_keys_test.py \
206221
"$(OPENSSH_TEST_BINARY)" "$(CREDBIND_GO_ROOT)"

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ make build
2020
make test-unit
2121
make dependencies-check
2222
make verify-binary
23+
make test-release
2324
```
2425

2526
The command now also contains the bounded configuration, CLI and local-syslog
@@ -40,6 +41,18 @@ requires that command to be root-owned and not group/world writable. A local
4041
checkout binary therefore fails closed; provide an explicitly installed test
4142
copy with `OPENSSH_TEST_BINARY=/absolute/path` rather than using a wrapper.
4243

44+
`make release-metadata` deterministically writes the verifier checksum, exact
45+
vendored/system dependency license inventory and redistributed license texts,
46+
an SPDX 2.3 SBOM and an in-toto/SLSA v1 provenance statement below the selected
47+
target directory. `make release-package VERSION=vMAJOR.MINOR.PATCH` also
48+
requires an exact clean `HEAD` and matching source epoch, then creates a
49+
normalized timestamp/owner/mode archive and archive checksum. These outputs
50+
also pin the immutable conformance artifact, manifest and specification
51+
revision as provenance materials. They are deliberately unsigned; platform
52+
signing and publication remain separate
53+
owner-controlled release operations and are never a side effect of
54+
`make check`.
55+
4356
`make test-live` extends that same joint harness only for the four accepted
4457
Google/Auth0 workload cells. It consumes an owner-provided protected Go
4558
initialization request and existing ADC/native-store credentials, requires the

scripts/check_dependencies.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def main() -> None:
3333
dependency.get("name") != "OpenSSL libcrypto"
3434
or dependency.get("minimum_version") != "3.0.0"
3535
or dependency.get("api_baseline") != "OpenSSL 3.0"
36+
or dependency.get("license") != "Apache-2.0"
3637
or dependency.get("linkage") != "dynamic system libcrypto only"
3738
or dependency.get("pkg_config") != "libcrypto"
3839
or dependency.get("prohibited_linkage")

0 commit comments

Comments
 (0)