docker_*.sh: add kvm support, X11 authentication, update README.md instructions. Bump docker image to v.0.2.7 with pinned hash under CircleCI#2036
Merged
Conversation
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.
TODO after merge:
Docker Workflows and Reproducibility Tooling Refactor
Overview
This changeset introduces comprehensive improvements to Heads' Docker-based build system, focusing on reproducibility, maintainability, and user experience.
Files Changed
Modified Files
.circleci/config.yml
v0.2.5to digest-pinnedv0.2.7tlaurion/heads-dev-env:v0.2.5tlaurion/heads-dev-env@sha256:5f890f3d1b6b57f9e567191695df003a2ee880f084f5dfe7a5633e3e8f937479README.md
Major documentation expansion including:
docker_repro.sh,docker_local_dev.sh,docker_latest.sh)HEADS_*variables)qemu-imgsnapshot workflowdocker_latest.sh
docker/common.shfor shared logicusage()functionresolve_docker_imagefor digest resolutionrequire_dockercheckDOCKER_LATEST_DIGESToverridedocker_local_dev.sh
docker/common.shusage()functionmaybe_rebuild_local_imagefor conditional rebuildsHEADS_CHECK_REPRODUCIBILITY=1)ensure_nix_and_flakesinfrastructureHEADS_SKIP_DOCKER_REBUILD=1docker_repro.sh
docker/common.shusage()functionDOCKER_REPRO_DIGESTfile/env varresolve_docker_imagewith digest supportflake.nix
initrd/bin/kexec-seal-key
[ \t]to[[:space:]]for better portabilitytargets/qemu.md
New Files
docker/DOCKER_REPRO_DIGEST
./docker_repro.shsha256:5f890f3d1b6b57f9e567191695df003a2ee880f084f5dfe7a5633e3e8f937479v0.2.7docker/check_reproducibility.sh
./docker/check_reproducibility.sh [local_image] [remote_image]compare_image_reproducibilityin common.shHEADS_MAINTAINER_DOCKER_IMAGEoverridedocker/common.sh
Shared helper library providing:
ensure_nix_and_flakes()— Nix installation and flakes setup with interactive promptsresolve_docker_image()— Image reference resolution with digest pinning supportmaybe_rebuild_local_image()— Conditional Docker image rebuild when flake files are dirtykill_usb_processes()— Automatic USB device cleanup (scdaemon/pcscd)build_docker_opts()— Docker runtime options construction (volumes, X11, USB, etc.)run_docker()— Container execution wrapper with cleanupget_remote_config_digest()— Fetch remote image config digest via skopeo/APIget_local_image_id()— Extract local image ID (config digest)compare_image_reproducibility()— Compare local vs remote image digestsresolve_repro_remote_image()— Default reproducibility remote image resolutionrequire_docker()— Docker availability checkdocker/fetch_nix_installer.sh
--version nix-X.Y.Zor--url <custom-url>.sha256from releases.nixos.org when available./docker/fetch_nix_installer.sh --version nix-2.33.2docker/get_digest.sh
-y/--yesfor auto-pullrepo@digestand rawsha256:...for easy scripting./docker/get_digest.sh [-y] <image:tag>./docker/get_digest.sh tlaurion/heads-dev-env:v0.2.7docker/pin-and-run.sh
get_digest.shand exportsDOCKER_LATEST_DIGEST./docker/pin-and-run.sh [-y] [-w wrapper] <image:tag> -- <command>./docker/pin-and-run.sh tlaurion/heads-dev-env:v0.2.7 -- make BOARD=x230./docker_latest.shif no wrapper specified-yfor non-interactive auto-pullKey Features
1. Reproducibility Infrastructure
docker_repro.shnow use immutable@sha256:...referencesHEADS_CHECK_REPRODUCIBILITY=1compares local builds vs published images2. Code Consolidation
3. Enhanced Documentation
HEADS_*andDOCKER_*variables4. Developer Tools
HEADS_MAINTAINER_DOCKER_IMAGE5. Improved Help System
--help)docker/common.shdirectly for complete environment documentationOlder notes
My bad: I always only tested qemu boards under QubesOS (which as of now still doesn't permit nested xen->kvm virtualization)
This change permits to run things under qemu+kvm
Tested
Note: TPM DUK is mitigation for any OSes not providing efifb in their initramfs, prior of specialized drm+gpu drivers being loaded (at LUKS passphrase prompt early in init/systemd).
ISO tested:
Also:
TODO:
404f56fdf6a63226fddc97e0059703f696ad47bfad2881838845647e8b04799a /root/heads/build/x86/EOL_t480-hotp-maximized/heads-EOL_t480-hotp-maximized-v0.2.1-2921-ge931ff1.rom