feat(gmp): 加 CN 镜像 - #201
Merged
Merged
Conversation
compat.gmp 此前只有 ftp.gnu.org 一个源,CN 用户拉这 3.3MB 的 tarball 只能 走国际线路。现在 url 写成 GLOBAL/CN 表:GLOBAL 仍是 ftp.gnu.org 的权威 release,CN 指向 gitcode 上的 mcpp-res/gmp。 两边是同一份字节。上游下载后 sha256 = e56fd59d...ab24c,与描述符里原本 就写着的值一致;上传到 gitcode 的 6.3.0 release 后再从公开 url 下回来, 3332377 字节、sha256 相同。所以表里那一个 sha256 同时认证两条臂,不需要 按源各写一份。 描述符是 tools/gmp/generate_descriptor.py 生成的,模板一起改了 —— `generate_descriptor.py check` 报 in sync,重新生成是空 diff。 tests/check_mirror_urls.lua 与 mcpp xpkg parse 本地均通过。
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
compat.gmp此前只有ftp.gnu.org一个源,CN 用户拉这 3.3MB 的 tarball 只能走国际线路。本 PR 把三个平台的url都改成 GLOBAL/CN 表:GLOBAL保持https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.gz(权威 GNU release,默认解析优先级不变)CN=https://gitcode.com/mcpp-res/gmp/releases/download/6.3.0/gmp-6.3.0.tar.gz镜像资产
新建 gitcode 仓库
mcpp-res/gmp,release tag6.3.0,资产gmp-6.3.0.tar.gz。字节一致性是实测的,不是假设:上游下载 →
sha256 = e56fd59d76810932a0555aa15a14b61c16bed66110d3c75cc2ac49ddaa9ab24c(与描述符里原本写着的值一致)→ 上传 → 再从公开 CN url 下回来 → 3332377 字节、同一个 sha256。所以表里那一个sha256同时认证两条臂。生成器同步
pkgs/c/compat.gmp.lua是tools/gmp/generate_descriptor.py生成的,模板 (PKG_TMPL) 一起改了,否则下次write会把镜像表抹掉。python3 tools/gmp/generate_descriptor.py check报compat.gmp.lua is in sync with this generator。本地验证
tests/check_mirror_urls.lua/check_package_name.lua/check_platform_version_parity.lua/check_cross_package_refs.lua全过tests/list_cn_urls.lua正确抽出那一条 CN urlmcpp xpkg parse pkgs/c/compat.gmp.lua通过(本地 mcpp 2026.8.8.4)curl实拉 200