fix(os): #1931 the debug variant pins the test registry into /etc/environment too - #1933
Closed
VijitSingh97 wants to merge 1 commit into
Closed
fix(os): #1931 the debug variant pins the test registry into /etc/environment too#1933VijitSingh97 wants to merge 1 commit into
VijitSingh97 wants to merge 1 commit into
Conversation
…ironment too A pithead verb run by hand over SSH reads /etc/environment through PAM, never a unit's drop-in, so on the RC1 image `./pithead backup` restarted the stack from the org's registry (no 2.0.0 there) and left it down. The tar-append copies the rootfs's own /etc/environment out (it carries PITHEAD_ENGINE), appends the pin, and appends the file back as a leaf so mkimage's tar -xf lands it whole. verify-image --test asserts the pin beside the engine line; release mode refuses any PITHEAD_REGISTRY= line there. Measured: synthetic tar, both lines extracted; the new assertion on the RC1 image (built before this fix) fails exactly one row, 119/1 against the chain's 119/0. Positive control (an image built with the fix) waits for the bench. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NeSaJPWy7AkhYcYpGVkxBJ
Collaborator
Author
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.
Closes #1931. Stacked on #1915 (
feat/lan-registry-debug-variant, MERGE-READY at its head): the base is that branch so the diff is the fix alone; retarget todeveloponce #1915 merges.What changes
os/build-image.sh: the debug-variant tar-append (feat(os): #1892 a debug build against a non-default registry pins it into the boot units and trusts its CA #1915's block) also writes/etc/environment. The file is copied out of the exported rootfs (it carriesPITHEAD_ENGINE=podmanfrom the Dockerfile), thePITHEAD_REGISTRY=…line is appended, and the result goes into the tar as a leaf file. GNU tar extracts in order, somkimage.sh'star -xflands the later copy, whole. A rootfs without the file is a loud refusal, not a silent skip.tests/os/verify-image-variant.sh:--testwith a non-defaultPITHEAD_REGISTRYasserts the pin line AND the engine line in/etc/environment(the second proves the file was appended to, not replaced); release mode refuses anyPITHEAD_REGISTRY=line there, in the same check that refuses the drop-ins.docs/dev/appliance-release.md: the debug-variant sentence names the file (shareddocs/, disclosed per COMMON).Why the image and not the harness: the harness runs
./pithead backupover SSH exactly as a developer on the--sshvariant does, which is what the variant is for, and the RC1 image fails that path for both. The release rootfs is untouched: the append runs only under a non-default registry with the test key.What was RUN
etc/environmentwith the engine line; the block's own commands appended the pin;tar -xfextracted BOTH lines in one file and the sibling file survived. That is the overridemkimage.sh:86relies on.d7602bcc, built without this fix):verify-image.sh --testgives 119 passed, 1 failed, the one failure being the new/etc/environmentrow. The same image was 119/0 under the pre-fix verifier in the RC1 chain, so the delta is exactly the new row.bash -n,shfmt -i 4 -d,shellcheck -x -S warningon both scripts: clean.make lint-docs-voiceandscripts/lint-file-budget.sh: OK.What was NOT done
./pithead backupover SSH on it that brings the stack back from the private registry. The bench is under the RC1 battery; this runs on the first free slot and the verdict lands here with its BUILD_COMMIT. Draft until then.Over-engineering pass (by hand; the PR-gate hook keys off the wrong branch from this lane's cwd)
/etc/environmentover/etc/profile.d/: a non-interactivessh host './pithead …'never sources profile.d; PAM applies/etc/environmentto every session, and the rootfs already uses it for the engine pin (Dockerfile:244).RUN: keeps feat(os): #1892 a debug build against a non-default registry pins it into the boot units and trusts its CA #1915's invariant that the release rootfs is byte-identical to a build that never heard of a test registry.pithead-side reader of a pinned file: a code path in the release script for a debug-only concern.🤖 Generated with Claude Code
https://claude.ai/code/session_01NeSaJPWy7AkhYcYpGVkxBJ