fix(guanghu-os): mount volatile cross-root receipt plane

This commit is contained in:
冰朔 2026-08-16 00:49:08 +08:00
commit b7925420ff
2 changed files with 3 additions and 1 deletions

View file

@ -35,7 +35,7 @@ mkdir -p "${staging}/bin" "${staging}/sbin" "${staging}/usr/lib/guanghu" \
"${staging}/usr/share/guanghu/repository-service-equivalence" \ "${staging}/usr/share/guanghu/repository-service-equivalence" \
"$(dirname "${output}")" "$(dirname "${output}")"
install -m 0755 /bin/busybox "${staging}/bin/busybox" install -m 0755 /bin/busybox "${staging}/bin/busybox"
for applet in sh sleep cat grep tr stat mkdir mv chmod readlink kill sync poweroff sed id httpd wget rm ip timeout; do for applet in sh sleep cat grep tr stat mkdir mv chmod readlink kill sync poweroff sed id httpd wget rm ip timeout mount; do
ln -s busybox "${staging}/bin/${applet}" ln -s busybox "${staging}/bin/${applet}"
done done
install -m 0755 "${supervisor}" "${staging}/usr/lib/guanghu/guanghu-root-supervisor" install -m 0755 "${supervisor}" "${staging}/usr/lib/guanghu/guanghu-root-supervisor"
@ -65,6 +65,7 @@ grep -Fq '"stage":"ROOT_SUPERVISOR_ACTIVE"' /run/guanghu/root-supervisor/state.j
echo "GUANGHU_CROSS_ROOT_PERSISTENCE_VERIFIED pid=${supervisor_pid}" echo "GUANGHU_CROSS_ROOT_PERSISTENCE_VERIFIED pid=${supervisor_pid}"
if [ -x /usr/lib/guanghu/guanghu-repository-bridge-lifecycle ]; then if [ -x /usr/lib/guanghu/guanghu-repository-bridge-lifecycle ]; then
ip link set lo up ip link set lo up
mount -t tmpfs -o mode=0700,size=1m tmpfs /guanghu/receipts
/usr/lib/guanghu/guanghu-repository-bridge-lifecycle run REQ-QEMU-CROSS-ROOT-001 /usr/lib/guanghu/guanghu-repository-bridge-lifecycle run REQ-QEMU-CROSS-ROOT-001
grep -Fq '"result":"PASS_100"' /guanghu/receipts/repository-bridge-lifecycle/REQ-QEMU-CROSS-ROOT-001.json grep -Fq '"result":"PASS_100"' /guanghu/receipts/repository-bridge-lifecycle/REQ-QEMU-CROSS-ROOT-001.json
grep -Fq '"final_state":"DORMANT"' /guanghu/receipts/repository-bridge-lifecycle/REQ-QEMU-CROSS-ROOT-001.json grep -Fq '"final_state":"DORMANT"' /guanghu/receipts/repository-bridge-lifecycle/REQ-QEMU-CROSS-ROOT-001.json

View file

@ -16,6 +16,7 @@ if grep -Fq 'wget -q -T' "${backend}" "${builder}"; then
exit 1 exit 1
fi fi
grep -Fq 'ip link set lo up' "${builder}" grep -Fq 'ip link set lo up' "${builder}"
grep -Fq 'mount -t tmpfs -o mode=0700,size=1m tmpfs /guanghu/receipts' "${builder}"
grep -Fq 'GUANGHU_CROSS_ROOT_REPOSITORY_SERVICE_EQUIVALENCE_VERIFIED' "${builder}" grep -Fq 'GUANGHU_CROSS_ROOT_REPOSITORY_SERVICE_EQUIVALENCE_VERIFIED' "${builder}"
grep -Fq 'REQ-QEMU-CROSS-ROOT-001' "${builder}" grep -Fq 'REQ-QEMU-CROSS-ROOT-001' "${builder}"
grep -Fq 'final_state":"DORMANT' "${builder}" grep -Fq 'final_state":"DORMANT' "${builder}"