Pass MY_PI_PASSWORD_HASH through to the image build #149
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "pi-password-hash"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this PR does
Makes a custom
pipassword hash given at build time actually reach the image. The documented way, theMY_PI_PASSWORD_HASHenvironment variable, never got pastsudo env ... packer buildand the ansible-local command, so every build used the documented default.Makefile:MY_PI_PASSWORD_HASHwith$(value ...)intoKESTREL_PI_HASH, so make doesn't take$6,$salt... for its own variables. It works from the command line or the environment.$KESTREL_PI_HASH, never the hash.$id$followed by./0-9A-Za-z$=, no newline), or the build stops with "MY_PI_PASSWORD_HASH is not a crypt hash" before Packer starts.-var "my_pi_password_hash=$KESTREL_PI_HASH".builder/config.json: declaresmy_hostname,my_versionandmy_pi_password_hashundervariables, lists the hash insensitive-variables(Packer masks it in its output), and addsMY_PI_PASSWORD_HASH='...'to the ansible-local command besideMY_VERSION/MY_HOSTNAME. The value checked by the Makefile can't contain a quote.builder/config.yml: thesystem.account.pilookup is unchanged. Two early tasks are added:sudo make image MY_PI_PASSWORD_HASH='$6$...'.Checklist
make lint(ansible--syntax-check,yamllint,shellcheck --severity=error, and the real-data check). The Lint workflow runs this on the PR.make test(thekestrel_pipytest suite and the real-data check's tests). The Test workflow runs this on the PR..envfiles, real names, personal emails, device serials, and no real captured or device data: SSIDs, MAC addresses, GPS coordinates, capture files, diagnostics bundles, logs, or screenshots of a real device — placeholders only. The real-data check catches MACs, emails, keys and capture files; real SSIDs, coordinates and screenshots are on you.docs/, and the on-device operator guide (GUIDE_MDinkestrel_pi/userguide.py) where it applies.Release impact
kestrel_pipackage,plugins/*.py, systemd units, the journald drop-in, a lib script already in the engine'sLIB_SCRIPTS, or the CLI.config.txt/cmdline, kernel modules, the base image or partition size,builder/config.json,builder/config.yml, theMakefile, the Release workflow (.forgejo/workflows/main.yml), a shipped config default (config.toml/default.conf), or a brand-new lib script.Notes for review
autowill call 1.0.13 reflash. Nothing an image contains changes, though: the official build sets no hash and still gets the documented default, and the new playbook tasks only check and log. Every hunk is build-host plumbing. So 1.0.13 should be released withupdate_kind=app-layer.-var, then the ansible command's environment.sudodoesn't matter now, because the value goes as an argument, not as inherited environment.packer validate -syntax-onlypasses, and fullpacker validatepasses with a sample hash.make -n image MY_PI_PASSWORD_HASH='$6$...'shows$KESTREL_PI_HASHin the echoed Packer line, not the hash.$6$hash, a$y$hash and arounds=hash, from the command line and the environment. It stops a quote-and-command value, plain text, and values with a newline.pi:line of/etc/shadowin the mounted image after the next local build.🤖 Generated with Claude Code