run_amd64_release_matrix.sh 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. #!/usr/bin/env bash
  2. # Run the four required installer scenarios in one disposable Debian systemd container.
  3. set -euo pipefail
  4. if [[ $# -ne 3 ]]; then
  5. echo "Usage: $0 NEW_ARCHIVE PREVIOUS_V0.1.1_ARCHIVE OUTPUT_DIR" >&2
  6. exit 2
  7. fi
  8. NEW_ARCHIVE="$(realpath -e -- "$1")"
  9. OLD_ARCHIVE="$(realpath -e -- "$2")"
  10. OUTPUT_DIR="$(realpath -m -- "$3")"
  11. SYSTEMD_IMAGE="${HTH_SYSTEMD_TEST_IMAGE:-localhost/hth-systemd-test:debian13}"
  12. RUN_ID="hth-install-matrix-$(date -u +%Y%m%dT%H%M%SZ)-$$"
  13. CONTAINER="$RUN_ID"
  14. LOG="$OUTPUT_DIR/matrix.log"
  15. RECEIPT="$OUTPUT_DIR/matrix-receipt.txt"
  16. command -v podman >/dev/null 2>&1 || { echo "podman is required" >&2; exit 2; }
  17. podman image exists "$SYSTEMD_IMAGE" || {
  18. echo "missing disposable systemd test image: $SYSTEMD_IMAGE" >&2
  19. exit 2
  20. }
  21. mkdir -p "$OUTPUT_DIR"
  22. : >"$LOG"
  23. cleanup() { podman rm -f "$CONTAINER" >/dev/null 2>&1 || true; }
  24. trap cleanup EXIT
  25. NEW_SHA="$(sha256sum "$NEW_ARCHIVE" | awk '{print $1}')"
  26. OLD_SHA="$(sha256sum "$OLD_ARCHIVE" | awk '{print $1}')"
  27. IMAGE_ID="$(podman image inspect --format '{{.Id}}' "$SYSTEMD_IMAGE")"
  28. podman run -d --name "$CONTAINER" --privileged --systemd=always --tmpfs /run --tmpfs /run/lock -v "$NEW_ARCHIVE:/packages/new.tar.gz:ro" -v "$OLD_ARCHIVE:/packages/old.tar.gz:ro" "$SYSTEMD_IMAGE" /sbin/init >/dev/null
  29. for _ in $(seq 1 100); do
  30. if podman exec "$CONTAINER" systemctl is-system-running >/dev/null 2>&1; then break; fi
  31. sleep 0.1
  32. done
  33. podman exec "$CONTAINER" bash -lc "
  34. set -e
  35. mkdir -p /opt/matrix/new /opt/matrix/old
  36. tar -xzf /packages/new.tar.gz -C /opt/matrix/new
  37. tar -xzf /packages/old.tar.gz -C /opt/matrix/old
  38. chmod +x /opt/matrix/new/*/*.sh /opt/matrix/old/*/*.sh
  39. " 2>&1 | tee -a "$LOG"
  40. run_guest() {
  41. local label="$1" command_text="$2"
  42. echo "${label}_BEGIN" | tee -a "$LOG"
  43. podman exec "$CONTAINER" bash -lc "$command_text" 2>&1 | tee -a "$LOG"
  44. echo "${label}_PASS" | tee -a "$LOG"
  45. }
  46. run_guest SCENARIO_SYMLINK_PATH_REJECTION '
  47. set -e
  48. cd /opt/matrix/new/*
  49. assert_symlink_rejected() {
  50. link_path="$1"
  51. outside_path="$2"
  52. mkdir -p "$(dirname "$link_path")" "$outside_path"
  53. printf "do-not-touch\n" >"$outside_path/sentinel"
  54. ln -s "$outside_path" "$link_path"
  55. if ./install.sh --no-start >/tmp/symlink-install.log 2>&1; then
  56. echo "install unexpectedly accepted symlink path: $link_path" >&2
  57. exit 1
  58. fi
  59. grep -Eq "symlink parent rejected|install path is a symlink" /tmp/symlink-install.log
  60. grep -Fxq "do-not-touch" "$outside_path/sentinel"
  61. [ "$(find "$outside_path" -mindepth 1 -maxdepth 1 -type f | wc -l)" -eq 1 ]
  62. unlink "$link_path"
  63. rm -f "$outside_path/sentinel"
  64. rmdir "$outside_path"
  65. }
  66. assert_symlink_rejected /usr/local/share/hth/sdk /opt/hth-outside-sdk
  67. assert_symlink_rejected /etc/hth/profiles /opt/hth-outside-profiles
  68. mkdir -p /var/lib/hth
  69. assert_symlink_rejected /var/lib/hth/captures /opt/hth-outside-captures
  70. rmdir /usr/local/share/hth /etc/hth /var/lib/hth 2>/dev/null || true
  71. '
  72. run_guest SCENARIO_FAKE_MANIFEST_REJECTION '
  73. set -e
  74. cd /opt/matrix/new/*
  75. mkdir -p /etc/hth /etc/systemd/system /usr/local/bin
  76. printf "unknown-binary\n" >/usr/local/bin/hthd
  77. cat >/etc/systemd/system/hthd.service <<"EOF"
  78. [Service]
  79. ExecStart=/usr/local/bin/hthd --config /etc/hth/hthd.yaml
  80. EOF
  81. printf "api_version: fake\n" >/etc/hth/hthd.yaml
  82. cat >/etc/hth/release-metadata.json <<"EOF"
  83. {
  84. "version": "v9.9.9",
  85. "source_commit": "0000000000000000000000000000000000000000"
  86. }
  87. EOF
  88. cat >/etc/hth/install-manifest.txt <<"EOF"
  89. file /usr/local/bin/hthd
  90. unknown /etc/hth/not-owned
  91. EOF
  92. before_binary="$(sha256sum /usr/local/bin/hthd | awk "{print \$1}")"
  93. before_unit="$(sha256sum /etc/systemd/system/hthd.service | awk "{print \$1}")"
  94. if ./install.sh --upgrade --no-start >/tmp/fake-manifest-upgrade.log 2>&1; then
  95. echo "upgrade unexpectedly accepted a fake manifest" >&2
  96. exit 1
  97. fi
  98. grep -Eq "unknown old manifest kind|old manifest is incomplete" /tmp/fake-manifest-upgrade.log
  99. [ "$before_binary" = "$(sha256sum /usr/local/bin/hthd | awk "{print \$1}")" ]
  100. [ "$before_unit" = "$(sha256sum /etc/systemd/system/hthd.service | awk "{print \$1}")" ]
  101. rm -f /usr/local/bin/hthd /etc/systemd/system/hthd.service \
  102. /etc/hth/hthd.yaml /etc/hth/release-metadata.json /etc/hth/install-manifest.txt
  103. rmdir /etc/hth 2>/dev/null || true
  104. '
  105. run_guest SCENARIO_CURRENT_PROFILE_SENTINEL_REJECTION '
  106. set -e
  107. cd /opt/matrix/new/*
  108. mkdir -p /etc/hth/profiles/6400-control
  109. printf "unknown-current-profile\n" >/etc/hth/profiles/6400-control/profile.json
  110. before_profile="$(sha256sum /etc/hth/profiles/6400-control/profile.json | awk "{print \$1}")"
  111. if ./install.sh --no-start >/tmp/current-profile-install.log 2>&1; then
  112. echo "fresh install unexpectedly overwrote an unknown current profile" >&2
  113. exit 1
  114. fi
  115. grep -Fq "an existing installation was found" /tmp/current-profile-install.log
  116. [ "$before_profile" = "$(sha256sum /etc/hth/profiles/6400-control/profile.json | awk "{print \$1}")" ]
  117. rm -f /etc/hth/profiles/6400-control/profile.json
  118. rmdir /etc/hth/profiles/6400-control /etc/hth/profiles /etc/hth
  119. '
  120. run_guest SCENARIO_MANAGED_TREE_SENTINEL_REJECTION '
  121. set -e
  122. cd /opt/matrix/new/*
  123. assert_managed_tree_rejected() {
  124. managed_path="$1"
  125. mkdir -p "$managed_path"
  126. printf "unknown-managed-state\n" >"$managed_path/unknown-sentinel"
  127. before_sentinel="$(sha256sum "$managed_path/unknown-sentinel" | awk "{print \$1}")"
  128. if ./install.sh --no-start >/tmp/managed-tree-install.log 2>&1; then
  129. echo "fresh install unexpectedly claimed an unknown managed tree: $managed_path" >&2
  130. exit 1
  131. fi
  132. grep -Fq "an existing installation was found" /tmp/managed-tree-install.log
  133. [ "$before_sentinel" = "$(sha256sum "$managed_path/unknown-sentinel" | awk "{print \$1}")" ]
  134. rm -f "$managed_path/unknown-sentinel"
  135. rmdir "$managed_path"
  136. }
  137. assert_managed_tree_rejected /run/hth
  138. assert_managed_tree_rejected /var/lib/hth/captures
  139. assert_managed_tree_rejected /var/lib/hth/replay
  140. assert_managed_tree_rejected /var/lib/hth/receipts
  141. rmdir /var/lib/hth 2>/dev/null || true
  142. '
  143. run_guest SCENARIO_UNKNOWN_LEGACY_PROFILE_PRESERVED '
  144. set -e
  145. cd /opt/matrix/new/*
  146. mkdir -p /etc/hth/profiles/prod2u-door-temp
  147. printf "unknown-user-profile\n" >/etc/hth/profiles/prod2u-door-temp/profile.json
  148. before_profile="$(sha256sum /etc/hth/profiles/prod2u-door-temp/profile.json | awk "{print \$1}")"
  149. ./install.sh
  150. if grep -Fq "/etc/hth/profiles/prod2u-door-temp" /etc/hth/install-manifest.txt; then
  151. echo "fresh install incorrectly claimed an unknown legacy profile" >&2
  152. exit 1
  153. fi
  154. ./uninstall.sh --purge --yes
  155. [ "$before_profile" = "$(sha256sum /etc/hth/profiles/prod2u-door-temp/profile.json | awk "{print \$1}")" ]
  156. rm -f /etc/hth/profiles/prod2u-door-temp/profile.json
  157. rmdir /etc/hth/profiles/prod2u-door-temp /etc/hth/profiles /etc/hth
  158. '
  159. run_guest SCENARIO_FAKE_MANIFEST_UNINSTALL_REJECTION '
  160. set -e
  161. cd /opt/matrix/new/*
  162. mkdir -p /etc/hth /usr/local/bin
  163. if ! getent group hth >/dev/null 2>&1; then groupadd --system hth; fi
  164. if ! getent passwd hth >/dev/null 2>&1; then
  165. useradd --system --gid hth --home-dir /var/lib/hth --shell /usr/sbin/nologin --no-create-home hth
  166. fi
  167. cp RELEASE-METADATA.json /etc/hth/release-metadata.json
  168. package_version="$(sed -n "s/^[[:space:]]*\"version\"[[:space:]]*:[[:space:]]*\"\([^\"]*\)\".*/\1/p" RELEASE-METADATA.json | head -n 1)"
  169. package_commit="$(sed -n "s/^[[:space:]]*\"source_commit\"[[:space:]]*:[[:space:]]*\"\([^\"]*\)\".*/\1/p" RELEASE-METADATA.json | head -n 1)"
  170. printf "unknown-binary\n" >/usr/local/bin/hthd
  171. cat >/etc/hth/install-manifest.txt <<EOF
  172. # HTH owned paths; generated by ${package_version} (${package_commit})
  173. file /usr/local/bin/hthd
  174. created_account hth
  175. created_group hth
  176. EOF
  177. before_binary="$(sha256sum /usr/local/bin/hthd | awk "{print \$1}")"
  178. before_identity="$(id -u hth):$(getent group hth | cut -d: -f3)"
  179. if ./uninstall.sh --purge --yes >/tmp/fake-manifest-uninstall.log 2>&1; then
  180. echo "uninstall unexpectedly accepted a partial fake manifest" >&2
  181. exit 1
  182. fi
  183. grep -Fq "immutable installed file does not match uninstall package" /tmp/fake-manifest-uninstall.log
  184. [ "$before_binary" = "$(sha256sum /usr/local/bin/hthd | awk "{print \$1}")" ]
  185. [ "$before_identity" = "$(id -u hth):$(getent group hth | cut -d: -f3)" ]
  186. cp bin/hthd /usr/local/bin/hthd
  187. mkdir -p /etc/hth/profiles/6400-control /usr/local/share/hth/sdk \
  188. /usr/lib/sysusers.d /usr/lib/tmpfiles.d
  189. package_wheel="$(find sdk -maxdepth 1 -type f -name "*.whl" -printf "%f\n")"
  190. cp bin/hthctl /usr/local/bin/hthctl
  191. cp bin/hth-capture /usr/local/bin/hth-capture
  192. cp service/hthd.service /etc/systemd/system/hthd.service
  193. cp service/hth.conf /usr/lib/sysusers.d/hth.conf
  194. cp service/hthd-tmpfiles.conf /usr/lib/tmpfiles.d/hth.conf
  195. cp profiles/6400-control/profile.json /etc/hth/profiles/6400-control/profile.json
  196. cp "sdk/$package_wheel" "/usr/local/share/hth/sdk/$package_wheel"
  197. if ./uninstall.sh --purge --yes >/tmp/identity-manifest-uninstall.log 2>&1; then
  198. echo "uninstall unexpectedly accepted a manifest-owned service identity" >&2
  199. exit 1
  200. fi
  201. grep -Fq "current manifest cannot claim service identity ownership" /tmp/identity-manifest-uninstall.log
  202. [ "$before_identity" = "$(id -u hth):$(getent group hth | cut -d: -f3)" ]
  203. sed -i "/^created_/d" /etc/hth/install-manifest.txt
  204. if ./uninstall.sh --purge --yes >/tmp/partial-manifest-uninstall.log 2>&1; then
  205. echo "uninstall unexpectedly accepted an incomplete current manifest" >&2
  206. exit 1
  207. fi
  208. grep -Fq "current manifest is incomplete" /tmp/partial-manifest-uninstall.log
  209. rm -f /usr/local/bin/hthd /usr/local/bin/hthctl /usr/local/bin/hth-capture \
  210. /etc/systemd/system/hthd.service /usr/lib/sysusers.d/hth.conf /usr/lib/tmpfiles.d/hth.conf \
  211. /etc/hth/profiles/6400-control/profile.json /etc/hth/install-manifest.txt \
  212. /etc/hth/release-metadata.json "/usr/local/share/hth/sdk/$package_wheel"
  213. rmdir /usr/local/share/hth/sdk /usr/local/share/hth \
  214. /etc/hth/profiles/6400-control /etc/hth/profiles /etc/hth
  215. userdel hth
  216. groupdel hth
  217. '
  218. run_guest SCENARIO_FULL_MANIFEST_PARTIAL_CLOSURE_REJECTION '
  219. set -e
  220. cd /opt/matrix/new/*
  221. package_version="$(sed -n "s/^[[:space:]]*\"version\"[[:space:]]*:[[:space:]]*\"\([^\"]*\)\".*/\1/p" RELEASE-METADATA.json | head -n 1)"
  222. package_commit="$(sed -n "s/^[[:space:]]*\"source_commit\"[[:space:]]*:[[:space:]]*\"\([^\"]*\)\".*/\1/p" RELEASE-METADATA.json | head -n 1)"
  223. package_wheel="$(find sdk -maxdepth 1 -type f -name "*.whl" -printf "%f\n")"
  224. mkdir -p /etc/hth/profiles/6400-control /etc/systemd/system /usr/local/bin \
  225. /usr/local/share/hth/sdk /usr/lib/sysusers.d /usr/lib/tmpfiles.d \
  226. /var/lib/hth/captures
  227. cp RELEASE-METADATA.json /etc/hth/release-metadata.json
  228. cp bin/hthd /usr/local/bin/hthd
  229. cp bin/hth-capture /usr/local/bin/hth-capture
  230. cp service/hthd.service /etc/systemd/system/hthd.service
  231. cp service/hth.conf /usr/lib/sysusers.d/hth.conf
  232. cp service/hthd-tmpfiles.conf /usr/lib/tmpfiles.d/hth.conf
  233. cp profiles/6400-control/profile.json /etc/hth/profiles/6400-control/profile.json
  234. cp "sdk/$package_wheel" "/usr/local/share/hth/sdk/$package_wheel"
  235. printf "unknown-managed-state\n" >/var/lib/hth/captures/unknown-sentinel
  236. before_sentinel="$(sha256sum /var/lib/hth/captures/unknown-sentinel | awk "{print \$1}")"
  237. cat >/etc/hth/install-manifest.txt <<EOF
  238. # HTH owned paths; generated by ${package_version} (${package_commit})
  239. file /usr/local/bin/hthd
  240. file /usr/local/bin/hthctl
  241. file /usr/local/bin/hth-capture
  242. file /etc/systemd/system/hthd.service
  243. file /usr/lib/sysusers.d/hth.conf
  244. file /usr/lib/tmpfiles.d/hth.conf
  245. file /usr/local/share/hth/sdk/${package_wheel}
  246. config /etc/hth/hthd.yaml
  247. config /etc/hth/release-metadata.json
  248. config /etc/hth/install-manifest.txt
  249. config /etc/hth/profiles/6400-control/profile.json
  250. managed_tree /run/hth
  251. managed_tree /var/lib/hth/captures
  252. managed_tree /var/lib/hth/replay
  253. managed_tree /var/lib/hth/receipts
  254. owned_dir /usr/local/share/hth/sdk
  255. owned_dir /usr/local/share/hth
  256. owned_dir /etc/hth/profiles/6400-control
  257. owned_dir /etc/hth/profiles
  258. owned_dir /etc/hth
  259. owned_dir /var/lib/hth
  260. EOF
  261. if ./uninstall.sh --purge --yes >/tmp/partial-installed-closure.log 2>&1; then
  262. echo "uninstall unexpectedly accepted a full manifest with a partial installed closure" >&2
  263. exit 1
  264. fi
  265. grep -Fq "required immutable installed file is missing or not regular: /usr/local/bin/hthctl" \
  266. /tmp/partial-installed-closure.log
  267. [ "$before_sentinel" = "$(sha256sum /var/lib/hth/captures/unknown-sentinel | awk "{print \$1}")" ]
  268. rm -f /usr/local/bin/hthd /usr/local/bin/hth-capture \
  269. /etc/systemd/system/hthd.service /usr/lib/sysusers.d/hth.conf /usr/lib/tmpfiles.d/hth.conf \
  270. /etc/hth/profiles/6400-control/profile.json /etc/hth/release-metadata.json \
  271. /etc/hth/install-manifest.txt "/usr/local/share/hth/sdk/$package_wheel" \
  272. /var/lib/hth/captures/unknown-sentinel
  273. rmdir /usr/local/share/hth/sdk /usr/local/share/hth \
  274. /etc/hth/profiles/6400-control /etc/hth/profiles /etc/hth \
  275. /var/lib/hth/captures /var/lib/hth
  276. '
  277. run_guest SCENARIO_FRESH '
  278. set -e
  279. cd /opt/matrix/new/*
  280. ./install.sh
  281. ./verify-install.sh --no-escalate
  282. '
  283. run_guest SCENARIO_REINSTALL '
  284. set -e
  285. cd /opt/matrix/new/*
  286. ./install.sh
  287. ./verify-install.sh --no-escalate
  288. '
  289. run_guest SCENARIO_PURGE_REINSTALL '
  290. set -e
  291. cd /opt/matrix/new/*
  292. ./uninstall.sh --purge --yes
  293. ./install.sh
  294. ./verify-install.sh --no-escalate
  295. '
  296. run_guest SCENARIO_PREEXISTING_IDENTITIES '
  297. set -e
  298. cd /opt/matrix/new/*
  299. ./uninstall.sh --purge --yes
  300. for identity_name in hth hth-observe hth-control; do
  301. if ! getent group "$identity_name" >/dev/null 2>&1; then groupadd --system "$identity_name"; fi
  302. if ! getent passwd "$identity_name" >/dev/null 2>&1; then
  303. if [ "$identity_name" = hth ]; then identity_home=/var/lib/hth; else identity_home=/nonexistent; fi
  304. useradd --system --gid "$identity_name" --home-dir "$identity_home" \
  305. --shell /usr/sbin/nologin --no-create-home "$identity_name"
  306. fi
  307. done
  308. identity_snapshot() {
  309. for identity_name in hth hth-observe hth-control; do
  310. printf "%s:%s:%s\n" "$identity_name" "$(id -u "$identity_name")" \
  311. "$(getent group "$identity_name" | cut -d: -f3)"
  312. done
  313. }
  314. identities_before="$(identity_snapshot)"
  315. ./install.sh
  316. if grep -Eq "^(created_account|created_group|account|group) " /etc/hth/install-manifest.txt; then
  317. echo "service identity was incorrectly claimed by HTH" >&2
  318. exit 1
  319. fi
  320. ./uninstall.sh --purge --yes
  321. identities_after="$(identity_snapshot)"
  322. [ "$identities_before" = "$identities_after" ]
  323. for identity_name in hth hth-observe hth-control; do userdel "$identity_name"; done
  324. for identity_name in hth-control hth-observe hth; do groupdel "$identity_name"; done
  325. '
  326. run_guest SCENARIO_UPGRADE '
  327. set -e
  328. cd /opt/matrix/new/*
  329. ./uninstall.sh --purge --yes
  330. cd /opt/matrix/old/*
  331. if ./install.sh --backend mock >/tmp/previous-install.log 2>&1; then
  332. previous_direct=PASS
  333. else
  334. previous_direct=KNOWN_PROFILE_PERMISSION_FAILURE
  335. systemctl stop hthd.service >/dev/null 2>&1 || true
  336. chgrp hth /etc/hth/profiles/prod2u-door-temp/profile.json
  337. chmod 0640 /etc/hth/profiles/prod2u-door-temp/profile.json
  338. systemctl start hthd.service
  339. fi
  340. systemctl is-active --quiet hthd.service
  341. /usr/local/bin/hthctl --observe-sock /run/hth/observe/observe.sock --timeout 5s devices >/dev/null
  342. echo "PREVIOUS_RELEASE_RUNNING tag=v0.1.1 commit=7128a205a5cf70256bf6bb3cc87068b1d03e7fd4 direct_install=$previous_direct"
  343. cd /opt/matrix/new/*
  344. ./install.sh --upgrade
  345. ./verify-install.sh --no-escalate
  346. '
  347. run_guest SCENARIO_UPGRADE_FROM_FAILED_OLD '
  348. set -e
  349. cd /opt/matrix/new/*
  350. ./uninstall.sh --purge --yes
  351. cd /opt/matrix/old/*
  352. if ./install.sh --backend mock >/tmp/previous-failed-install.log 2>&1; then
  353. echo "expected v0.1.1 permission failure was not reproduced" >&2
  354. exit 1
  355. fi
  356. grep -q "Job for hthd.service failed" /tmp/previous-failed-install.log
  357. cd /opt/matrix/new/*
  358. ./install.sh --upgrade
  359. ./verify-install.sh --no-escalate
  360. '
  361. {
  362. echo "schema=hth-install-matrix-receipt-v1"
  363. echo "status=PASS"
  364. echo "run_id=$RUN_ID"
  365. echo "systemd_image=$SYSTEMD_IMAGE"
  366. echo "systemd_image_id=$IMAGE_ID"
  367. echo "new_archive=$NEW_ARCHIVE"
  368. echo "new_archive_sha256=$NEW_SHA"
  369. echo "previous_release_tag=v0.1.1"
  370. echo "previous_release_commit=7128a205a5cf70256bf6bb3cc87068b1d03e7fd4"
  371. echo "previous_archive=$OLD_ARCHIVE"
  372. echo "previous_archive_sha256=$OLD_SHA"
  373. echo "symlink_path_rejection=PASS"
  374. echo "fake_manifest_rejection=PASS"
  375. echo "fake_manifest_uninstall_rejection=PASS"
  376. echo "full_manifest_partial_closure_rejection=PASS"
  377. echo "current_profile_sentinel_rejection=PASS"
  378. echo "managed_tree_sentinel_rejection=PASS"
  379. echo "unknown_legacy_profile_preserved=PASS"
  380. echo "fresh_install=PASS"
  381. echo "same_version_reinstall=PASS"
  382. echo "purge_reinstall=PASS"
  383. echo "preexisting_identity_preservation=PASS"
  384. echo "previous_release_upgrade=PASS"
  385. echo "upgrade_from_failed_previous_install=PASS"
  386. echo "hardware_validation=NOT RUN"
  387. echo "com_validation=NOT RUN"
  388. echo "jtag_validation=NOT RUN"
  389. echo "real_thermal_performance=NOT RUN"
  390. echo "generated_at_utc=$(date -u +%Y-%m-%dT%H:%M:%SZ)"
  391. echo "log_sha256=$(sha256sum "$LOG" | awk '{print $1}')"
  392. } >"$RECEIPT"
  393. cat "$RECEIPT"
  394. echo "HTH_INSTALL_MATRIX_PASS"