forked from xtianbetz/nlboot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (66 loc) · 2.64 KB
/
Makefile
File metadata and controls
76 lines (66 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.PHONY: validate test validate-lifecycle-contracts rust-check rust-test rust-run-fixture rust-fetch-fixture rust-execute-dry-run-fixture rust-exec-dry-run-fixture rust-apple-m2-dry-run-fixture
validate: test validate-lifecycle-contracts
@echo "OK: validate"
test:
python3 -m pip install --user pytest cryptography >/dev/null
PYTHONPATH=src python3 -m pytest -q
validate-lifecycle-contracts:
python3 tools/validate_lifecycle_contracts.py
rust-check:
cd rust/nlboot-client && cargo check
rust-test:
cd rust/nlboot-client && cargo test
rust-run-fixture:
cd rust/nlboot-client && cargo run -- plan \
--manifest ../../examples/signed_boot_manifest.recovery.json \
--token ../../examples/enrollment_token.recovery.json \
--trusted-keys ../../examples/trusted_keys.recovery.json \
--require-fips \
--now 2026-04-26T14:35:00Z
rust-fetch-fixture:
rm -rf /tmp/nlboot-fixture-plan.json /tmp/nlboot-cache /tmp/nlboot-evidence
cd rust/nlboot-client && cargo run -- plan \
--manifest ../../examples/signed_boot_manifest.recovery.json \
--token ../../examples/enrollment_token.recovery.json \
--trusted-keys ../../examples/trusted_keys.recovery.json \
--require-fips \
--now 2026-04-26T14:35:00Z \
--out /tmp/nlboot-fixture-plan.json
cd rust/nlboot-client && cargo run -- fetch \
--plan /tmp/nlboot-fixture-plan.json \
--artifact-map ../../examples/artifact_map.recovery.json \
--cache /tmp/nlboot-cache \
--evidence /tmp/nlboot-evidence
test -f /tmp/nlboot-evidence/artifact-cache-record.json
rust-execute-dry-run-fixture: rust-fetch-fixture
cd rust/nlboot-client && cargo run -- execute \
--plan /tmp/nlboot-fixture-plan.json \
--cache /tmp/nlboot-cache \
--adapter linux-kexec \
--load-only \
--dry-run \
--evidence /tmp/nlboot-evidence \
--i-understand-this-mutates-host
test -f /tmp/nlboot-evidence/pre-exec-proof.json
rust-exec-dry-run-fixture: rust-execute-dry-run-fixture
cd rust/nlboot-client && cargo run -- execute \
--plan /tmp/nlboot-fixture-plan.json \
--cache /tmp/nlboot-cache \
--adapter linux-kexec \
--exec \
--dry-run \
--evidence /tmp/nlboot-evidence \
--i-understand-this-mutates-host \
--i-understand-this-reboots-host
test -f /tmp/nlboot-evidence/exec-proof.json
rust-apple-m2-dry-run-fixture: rust-fetch-fixture
cd rust/nlboot-client && cargo run -- execute \
--plan /tmp/nlboot-fixture-plan.json \
--cache /tmp/nlboot-cache \
--adapter apple-silicon-m2 \
--load-only \
--dry-run \
--evidence /tmp/nlboot-evidence \
--i-understand-this-mutates-host
test -f /tmp/nlboot-evidence/adapter-plan-record.json
test -f /tmp/nlboot-evidence/boot-entry-record.json