Repository navigation
fix(godot-cpp): repack.sh for 10.0.0-stable's multi-API layout (+2 reproducibility bugs) - #537
Open
FarnaHerry wants to merge 1 commit into
Open
FarnaHerry wants to merge 1 commit into
FarnaHerry wants to merge 1 commit into
Conversation
…reproducibility bugs) 10.0.0-stable no longer ships a single gdextension/extension_api.json: one tag carries extension_api-4-3..4-7.json and the build picks one (scons api_version=, cmake GODOTCPP_DEFAULT_API_VERSION -- both say 4.7 for this release). The script hardcoded the single-API path and cannot build the tag. - resolve the API json the way the tag itself declares: explicit ENGINE_API > CMakeLists' GODOTCPP_DEFAULT_API_VERSION > highest present; single-API tags short-circuit on the file existing, so 4.5.0 / 10.0.0-rc1 stay byte-identical - LC_ALL=C on the "upstream tree untouched" check: it matches diff's "Only in <dir>: gen" line, which is localized -- on a zh_CN host it reads "只在 <dir> 中存在:gen", matches nothing, and every archive is refused - umask 002 + tar -xzpf: gen/ is created at repack time, so its mode bits come from the packer's umask and ride into the archive (002 -> 775/664, 022 -> 755/644). Same content, different sha256 per host; the two published archives are the 002 spelling. Verified (both published sha256s reproduce exactly; 4.7 is new + deterministic): 4.5.0 b0c36e77... = the index entry 10.0.0-rc1 aaafbf50... = the index entry 10.0.0-stable 66aaafb6... (x2), gen version.hpp = 4.7.0 stable The 10.0.0-stable version entry / example member / README rows are deliberately NOT here: they need the repacked archive published to xlings-res/godot-cpp (and the gitcode mirror) plus a v10.0.0-stable tag in mcpplibs/godot-cpp-m, neither of which an outside contributor can do. Hashes + follow-up checklist: .agents/docs/2026-10-17-add-godot-cpp-10.0.0-stable-plan.md
Collaborator
Author
This branch has not been deployed
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.
What
tools/godot-cpp/repack.shcannot build godot-cpp 10.0.0-stable at all, and two of its steps are not reproducible off the machine that produced the current archives. Three fixes, one script.1. The tag is multi-API now
10.0.0-stable(2026-09-15) dropped the singlegdextension/extension_api.jsonand ships one per engine minor —extension_api-4-3.json…extension_api-4-7.json— and the build picks one. Upstream's own three entry points all say 4.7 for this release: sconsapi_version=(Makefile,test/SConstruct), cmakeGODOTCPP_DEFAULT_API_VERSION(CMakeLists.txt),tools/godotcpp.py::supported_api_versions(4.3 … 4.7). The script hardcoded the single-API path, so it dies withFileNotFoundErroron this tag.It now resolves the file the way the tag itself declares: explicit
ENGINE_APIargument > the tag'sGODOTCPP_DEFAULT_API_VERSION> highest present. Single-API tags short-circuit on the file existing, so nothing changes for them. The generator entry point is unchanged (generate_bindings; with no build profile it is upstream's scons path —generate_trimmed_api("")returns the api as-is andgenerate_template_get_nodedefaults to True).4.5.0godot-4.5-stable10.0.0-rc110.0.0-rc110.0.0-stable10.0.0-stable2. The "upstream untouched" check was locale-dependent
It filters
diff'sOnly in <dir>: genline. On a zh_CN host that line is只在 <dir> 中存在:gen, so nothing matches and every archive is refused as "upstream files were modified", regardless of content. NowLC_ALL=C diff— pin the message language instead of matching a translation.3. The archive sha256 depended on the packer's umask
gen/is created during the repack, so its mode bits (dirs0o777&~umask, files0o666&~umask) ride into the archive: umask 002 → 775/664, umask 022 → 755/644. Identical content, different sha256. Non-root extraction of the upstream tarball has the same issue (GitHub's tarballs carry 775/664, extraction under umask 022 yields 755/644), sotar -xzpftakes upstream's modes andumask 002is pinned for the generated tree. No published byte changes — the two existing archives are the 002 spelling.Verification (both published hashes reproduce exactly)
tools/godot-cpp/repack.sh godot-4.5-stable 4.5.0 /tmp/out tools/godot-cpp/repack.sh 10.0.0-rc1 10.0.0-rc1 /tmp/out tools/godot-cpp/repack.sh 10.0.0-stable 10.0.0-stable /tmp/out tools/godot-cpp/repack.sh 10.0.0-stable 10.0.0-stable /tmp/out2 # determinismgodot-4.5-stableb0c36e77f02c4181352cdd7547b209b93a833be1ad6197f8c650d92987221a0010.0.0-rc1aaafbf50d4b8469d610fdb2eb76c6f58d758dbabbc6b013f60464d99b20ceb6e10.0.0-stable66aaafb642e7a390482dc381818640b1d0e583da2ef0cc9709214bcd13b68264The new archive was checked from the inside:
gen/include/godot_cpp/core/version.hpp=4.7.0 stable,gdextension/extension_api-4-7.jsonheader =Godot Engine v4.7.stable.official, 1052 generated class headers (vs ~1022 TUs for rc1), and every upstream file byte-identical (gen/the only addition).Design notes:
.agents/docs/2026-10-17-add-godot-cpp-10.0.0-stable-plan.md.Deliberately not in this PR (needs org write access)
The
10.0.0-stableversion entries can only land once the artifact is downloadable, because CI installs it:godot-cpp-10.0.0-stable.tar.gz(sha25666aaafb6…) toxlings-res/godot-cppand the gitcodemcpp-resmirror under tag10.0.0-stable;v10.0.0-stabletag inmcpplibs/godot-cpp-m(version +compat.godot-cppdependency bump,hashfuncs.hppshim re-checked against the 4.7 headers);pkgs/*.luaentries, thetests/examples/member and the README rows.I have no write access to either artifact repo, so 3 is a small mechanical change I'm happy to push the moment 1 and 2 are up (URLs + sha256 are known) — or leave it to you if you'd rather do the whole registration yourself, the way
10.0.0-rc1was done.