feat(chv-guest): 轻量镜像 + Gitea 双向同步(停全量版,改 Ubuntu Minimal)
- build.sh 改轻量:Ubuntu Minimal 底座、apt 精简(git/ssh/cloud-init/
python3/pip/curl/ca-certificates/xz-utils/fonts-wqy-microhei)、
Playwright + chromium-headless-shell、去 B-16 +12G 扩盘;
加 git + gt 1.0.0(官方 install.sh + SHA256 校验,GITEA_CLI_VERSION
钉 1.0.0)与 chv-sync 启动钩子(cloud-init runcmd)
- B-19(新发现):dpkg freeze 的 ${Package} 会被客机 shell 展开
成空,284 行全空白;加反斜杠转义,探针实测已出真实版本
- buildinfo.py:轻量 contents、chromium-headless-shell、gt_version
- generate/check_lockfile.py:gt/chv-sync 声明来源、headless-shell 映射
- chv-sync.sh(新):boot/pull/push/status,分叉/脏树失败关闭,
凭证走 seed 盘 guest-env,不进镜像
- README §1/§2/§3/§4 改轻量口径,新增 §7 Gitea 双向同步
- tests:ChvSyncTest 6 项(本地 bare 仓当远端);针对性测试 144 项全过
This commit is contained in:
1 parent
9e60d5dfaa
commit
4d09518338
7 files changed
+452
-73
No files matched your search
@@ -20,7 +20,8 @@ Playwright=1 时另有 chromium 标识)为唯一版本来源,
|
||||
- codex / codex-code-mode-host / codex-resources/bwrap
|
||||
→ BUILDINFO.codex_version(随 codex 一起发布)
|
||||
- /app/host.py → BUILDINFO.repo_commit
|
||||
- chromium → versions.chromium(ms-playwright 缓存目录名)
|
||||
- chromium / chromium-headless-shell → versions.chromium
|
||||
(ms-playwright 缓存目录名)
|
||||
|
||||
注意:旧版逐项查构建宿主的 dpkg/pip,方法不成立——宿主
|
||||
版本与客机版本没有必然关系,且 /app/host.py、codex 三件
|
||||
@@ -43,6 +44,8 @@ DECLARED_SOURCES = {
|
||||
"codex-code-mode-host": "codex_version",
|
||||
"codex-resources/bwrap": "codex_version",
|
||||
"/app/host.py": "repo_commit",
|
||||
"gt": "gt_version",
|
||||
"chv-sync": "repo_commit",
|
||||
}
|
||||
|
||||
|
||||
@@ -67,11 +70,16 @@ def _index_pip(lines):
|
||||
|
||||
|
||||
def _index_chromium(lines):
|
||||
"""chromium 标识行(如 chromium-1200)→ {"chromium": 行}。"""
|
||||
"""chromium 标识行 → 键。完整 Chromium 的目录名是
|
||||
chromium-<rev>,headless-shell 的是 chromium_headless_shell-<rev>,
|
||||
各自映射到同名 contents 项。"""
|
||||
index = {}
|
||||
for line in lines or []:
|
||||
text = str(line).strip()
|
||||
if text:
|
||||
if text.startswith("chromium_headless_shell"):
|
||||
index["chromium-headless-shell"] = \
|
||||
"chromium-headless-shell %s" % text
|
||||
elif text:
|
||||
index["chromium"] = "chromium %s" % text
|
||||
return index
|
||||
|
||||
@@ -97,12 +105,8 @@ def generate(buildinfo_path, output_path):
|
||||
else:
|
||||
unresolved.append(name)
|
||||
continue
|
||||
if key == "chromium":
|
||||
entry = chromium_index.get("chromium")
|
||||
if entry:
|
||||
declared.append(entry)
|
||||
else:
|
||||
unresolved.append(name)
|
||||
if key in chromium_index:
|
||||
declared.append(chromium_index[key])
|
||||
continue
|
||||
if key in dpkg_index:
|
||||
dpkg.append(dpkg_index[key])
|
||||
|
||||
Reference in new issue
Block a user