feat(chv-muse-round11): 移植 V-9 真机修复(9f929b1/912edef/9fb0f4b)

- lockfile 两脚本 DECLARED_SOURCES 加 P2 三件套 chv-cell/broker/
  browser -> repo_commit(9f929b1)。
- build.sh 99-chv-sync.cfg runcmd 在 chv-sync boot 之前加 chown
  行:guest-env 由 write_files 以 root:root 写(建用户之前),
  须在 final 阶段改归 chv(912edef;本分支 runcmd 多一行
  start chv-authd,chown 插在它之后、boot 之前)。
- executor._wait_guest_env_usable:密钥已投递时等客内 guest-env
  对 SSH 用户可读再报 ready,超时关 VM 抛 guest_env_not_ready
  (9fb0f4b;runcmd chown 比 SSH 就绪晚约 30 秒)。
- hostkeys.py:本分支 _guest_env_entry 本来就写死 owner
  root:root(P3 重构时已无 ssh_user 分支),912edef 的
  hostkeys 改动无内容可移,只补 V-9 根因注释防回退。
- 测试(5 个新测试,8 个运行):owner 恒 root:root、build.sh
  chown 位置、chv 用户下 wake 后 owner 仍 root、等到可读、
  永不可读抛 guest_env_not_ready。

全量 cloud 套件 2019 OK(skipped=8)。
This commit is contained in:
host committed 2026-11-07 00:48:25 +00:00
1 parent 29d3a5a474
commit 717efc4688
6 files changed
+165 -6

No files matched your search

+1 -1
View File
@@ -304,7 +304,7 @@ VC_ARGS=(-a "$OUT/disk.raw"
--copy-in "$SCRIPT_DIR/chv-authd.service:/etc/systemd/system/"
--run-command 'mv /usr/local/bin/authd.py /usr/local/bin/chv-authd && chmod +x /usr/local/bin/chv-authd /usr/local/bin/git-credential-chv-authd'
--run-command 'systemctl enable chv-authd || true'
--run-command 'printf "runcmd:\n - systemctl restart ssh || service ssh restart || true\n - systemctl start chv-authd || true\n - /usr/local/bin/chv-sync boot >>/var/log/chv-sync.log 2>&1 || true\n" > /etc/cloud/cloud.cfg.d/99-chv-sync.cfg'
--run-command 'printf "runcmd:\n - systemctl restart ssh || service ssh restart || true\n - systemctl start chv-authd || true\n - test -f /etc/chv/guest-env && chown chv:chv /etc/chv/guest-env || true\n - /usr/local/bin/chv-sync boot >>/var/log/chv-sync.log 2>&1 || true\n" > /etc/cloud/cloud.cfg.d/99-chv-sync.cfg'
--run-command 'git config --system user.name chv && git config --system user.email chv@localhost && git config --system credential.helper store && git config --system init.defaultBranch main'
--run-command "$GT_INSTALL_CMD"
--run-command '/usr/local/bin/gt version > /app/guest-versions-gt.txt'