Repository navigation
fix(pkgbuild): pin makepkg git sources to #commit (detached-HEAD-proof) - #2
Conversation
makepkg's working-copy step (git checkout -B makepkg origin/HEAD) failed with "fatal: invalid reference: origin/HEAD" when the cloned sdk submodule was on a detached HEAD (every submodule update detaches it) — the deterministic standalone/in-guest localpkg build failure the bed roster surfaced. Pin each git+file source to its working-tree HEAD via #commit=$(git rev-parse HEAD): makepkg checks out the exact commit, never origin/HEAD, and the build is reproducible. Verified: pinned checkout succeeds on a detached sdk clone where origin/HEAD fails; task build:charly installs end-to-end. Assisted-by: Claude (fully tested and validated)
pr-validator — APPROVED ✅Change class: config (packaging — Security & anti-tampering (T1–T4): PASS
Checklist
Independent verification (live): Confirmed against the installed makepkg handler Decision: APPROVED. The pin is the correct, minimal, makepkg-native fix; it is applied to both Assisted-by: Claude (analysed on a live system) |
Assisted-by: Claude (documentation reviewed) Claude-Session: https://claude.ai/code/session_01LjLm6DGQasmXaXw2ZorwhE
…in pointer bump Renames the placeholder changelog to the merge-time CalVer 2026.189.0144 and restamps its header. Mechanical version-stamp for PR #7 (pkg/arch 8521ffd -> c6fedea, the #commit-pinned PKGBUILD adopted from opencharly/pkg-arch#2). Claude-Session: https://claude.ai/code/session_01LjLm6DGQasmXaXw2ZorwhE Assisted-by: Claude (fully tested and validated)
…in pointer bump Renames the placeholder changelog to the merge-time CalVer 2026.189.0144 and restamps its header. Mechanical version-stamp for PR #7 (pkg/arch 8521ffd -> c6fedea, the #commit-pinned PKGBUILD adopted from opencharly/pkg-arch#2). Claude-Session: https://claude.ai/code/session_01LjLm6DGQasmXaXw2ZorwhE Assisted-by: Claude (fully tested and validated)
Summary
The two
git+file://sources (superproject + sdk submodule) relied on the clone'sorigin/HEADsymref — makepkg's working-copy step runsgit checkout -B makepkg origin/HEAD, which fails withfatal: invalid reference: origin/HEADwhenever the cloned repo is on a detached HEAD. The sdk submodule detaches on everygit submodule update/ gitlink-driven checkout, so the standalone/in-guest localpkg build broke deterministically — thecheck-charly-vm/check-cachyos-vm"Creating working copy of opencharly-sdk … invalid reference: origin/HEAD" failures the concurrent bed roster surfaced (pre-existing, independent of P1). Pinned each source to its working-tree HEAD via#commit=$(git -C … rev-parse HEAD): makepkg checks out the exact commit, neverorigin/HEAD, and the build is reproducible against the precise superproject + sdk commits.Change class + gate
Config (packaging).
bash -n PKGBUILDclean. Surgically proven on the actual failing condition (sdk currently detached at 0561805):And end-to-end:
task build:charly(which invokes makepkg with the pinnedsource=) installs successfully.Tier: fully tested and validated.
Assisted-by: Claude (fully tested and validated)