Fully revert USB and Thunderbolt device approval (#15091)

* Revert "Merge pull request #11874 from acrogenesis/feature/usb-device-authorization"

This reverts commit 5cb31317b4, reversing
changes made to 9d48fc402e.

* Undo USB and Thunderbolt device approval on machines that ran it

* Verify boot rebuilds, recover Thunderbolt journals and prove USBGuard ownership in the removal migration

* Read the boot partition from ESP_PATH and stop on failed Bolt reads in the removal migration

* Recover Bolt's original mode from the setup journal in the removal migration
This commit is contained in:
Ryan Hughes authored and GitHub committed 2026-10-12 01:20:01 -04:00
1 parent 9480d1b6a9
commit defbf90e89
60 files changed
+557 -5986

No files matched your search

+2 -9
View File
@@ -93,7 +93,7 @@ sed -n '/^rekey_luks() {/,/^}/p; /^run_provisioning() {/,/^}/p; /^cleanup_oem_st
/^platform_ready() {/,/^}/p; /^run_setup() {/,/^}/p
/^rekey_accepts_password() {/,/^}/p' \
"$ROOT/bin/omarchy-provision-owner" |
sed -e "s|/etc/|$tmp/etc/|g" -e "s|/usr/bin/omarchy-thunderbolt-authorization-admin|omarchy-thunderbolt-authorization-admin|" >"$tmp/provision.sh"
sed "s|/etc/|$tmp/etc/|g" >"$tmp/provision.sh"
grep -q '^run_provisioning() {' "$tmp/provision.sh" && grep -q '^run_setup() {' "$tmp/provision.sh" ||
fail "omarchy-provision-owner defines its setup and provisioning worker"
@@ -241,11 +241,6 @@ setup_functions() {
configure_hostname() { :; }
configure_timezone() { :; }
finalize_user() { :; }
# Accessory enrollment, recorded with whether the staged unlock was gone.
omarchy-pkg-present() { return 1; }
omarchy-thunderbolt-authorization-admin() {
if luks_staged_unlock_remains; then echo "$* early" >>"$TMP/accessories"; else echo "$*" >>"$TMP/accessories"; fi
}
limine_entries_stale() {
crash_point "re-key returned"
[[ -e $TMP/stale ]]
@@ -335,7 +330,7 @@ slot_count() {
fixture() {
local format=${1:-luks2}
rm -rf "$tmp/provisioning" "$tmp/etc" "$tmp/boot" "$tmp/log" "$tmp/output" "$tmp/trace" "$tmp/rebuilds" "$tmp/adds" "$tmp/rebuild-fail" "$tmp/kill-noop" \
"$tmp/prepare-fail" "$tmp/screen" "$tmp/stale" "$tmp/token-slot" "$tmp/slot-record" "$tmp/record-fail" "$tmp/accessories"
"$tmp/prepare-fail" "$tmp/screen" "$tmp/stale" "$tmp/token-slot" "$tmp/slot-record" "$tmp/record-fail"
mkdir -p "$tmp/provisioning"
chmod 755 "$tmp/provisioning"
touch "$tmp/provisioning/pending"
@@ -474,8 +469,6 @@ for run_spec in "${matrix[@]}"; do
fixture "$format"
run attempt "$owner_password" || fail "$backend: uninterrupted setup completes" "$(cat "$tmp/log" "$tmp/output")"
assert_provisioned "uninterrupted" "$owner_password"
[[ $(cat "$tmp/accessories" 2>/dev/null) == "owner" ]] ||
fail "$backend: accessories are enrolled once, after the staged unlock is gone" "$(cat "$tmp/accessories" 2>/dev/null)"
total_steps=$(cat "$tmp/steps")
(( total_steps >= 11 )) || fail "$backend: every durable step is a crash point" "$(cat "$tmp/trace")"
if [[ $platform == "apple" ]]; then