update.sh: replace the shared serial and UUID automatically

Older setups shipped serial C02ZL0GVMD6N and UUID
6F3B2A1E-8C4D-4E5F-9A7B-1D2C3E4F5A6B to every install. After installing,
update.sh now runs configure-darling-platform.py --replace-known-defaults,
which provisions the prefix only when its saved identity still has one of
those values. Other custom values (imported serials/UUIDs, model, board,
manufacturer, ROM, MLB) are kept; prefixes with no saved identity or only
custom values are not touched.

provision() also drops a standalone system-id or provisioning_UDID derived
from the shared UUID instead of keeping it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
lucannez64andClaude Opus 5.5 committed 2026-10-19 00:17:22 +02:00
1 parent 003daa7fc3
commit d443e631c2
4 files changed
+84 -5

No files matched your search

+9
View File
@@ -7,6 +7,13 @@
set -eu
repo=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
cd "$repo"
# Older setups shipped one serial and UUID shared by every install. Give a prefix that still
# has them its own identity; any other saved values, and prefixes without them, are left alone.
replace_shared_identity() {
python3 build/runtime/tools/stop-darling-runtime.py
python3 tools/configure-darling-platform.py --replace-known-defaults --write || \
echo 'Could not replace the shared platform identity; run tools/configure-darling-platform.py --provision --write' >&2
}
if [ -n "${DARLING_WORKSPACE:-}" ]; then
python3 scripts/nix-idle.py
# Initial setup and upgrades use the same supported user-owned install path.
@@ -21,6 +28,7 @@ if [ -n "${DARLING_WORKSPACE:-}" ]; then
cmake --install build/darling-src/build
python3 scripts/nix-state.py stamp-base
./scripts/install-runtime.sh
replace_shared_identity
echo 'Rootless update installed. In this shell use scripts/run.sh; otherwise exit this shell and start darling-lol.'
exit 0
fi
@@ -45,4 +53,5 @@ PY
python3 build/runtime/tools/stop-darling-runtime.py
sudo cmake --install build/darling-src/build
./scripts/install-runtime.sh
replace_shared_identity
echo 'Update installed. Start Darling with: sh scripts/run.sh'