build: misc cleanup — DEBUG-gated mmdebstrap verbosity, DOCKER_PRUNE opt-in, disable broken drm/xe patches#9704
build: misc cleanup — DEBUG-gated mmdebstrap verbosity, DOCKER_PRUNE opt-in, disable broken drm/xe patches#9704igorpecovnik wants to merge 3 commits intomainfrom
Conversation
📝 WalkthroughWalkthroughDocker image cleanup in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
mmdebstrap setup failures land in build logs as a one-line 'E: setup failed' with no context about which dep resolution actually blew up (recent example: sid/loong64 gnupg2 >= 2.4.9-4 vs dirmngr 2.4.8-4 port-sync skew). Pass --verbose to mmdebstrap when the user has already opted into DEBUG=yes. That surfaces apt's per-package solver + download work so the failing line is visible in the build log without a dedicated DEBUG rebuild. Default builds (DEBUG unset) keep the terse log as before — no mmdebstrap output change for anyone who hasn't asked for it.
docker_cli_prepare() called docker_cleanup_old_images
unconditionally, which enumerates 'docker images' and rmi's old
armbian tags. Fine on a single-daemon workstation; broken on
hosts where several build framework invocations share one
dockerd — the usual setup when multiple self-hosted GH Actions
runners live on the same machine.
Two concurrent invocations race: runner A's cleanup fires
'docker rmi <id>' on a tag runner B just committed between
'Successfully built <sha>' and dockerd writing the imagedb
digest file. B's build then aborts with:
Successfully built ed6bcbe445e6
failed to get digest sha256:ed6bcbe445e6…:
open /var/lib/docker/image/overlay2/imagedb/content/sha256/…:
no such file or directory
Make the cleanup opt-in via DOCKER_PRUNE=yes. Default-off keeps
shared-daemon setups safe out of the box; single-host users who
want automatic disk reclaim flip the flag and either accept the
race risk or serialise their builds.
No behaviour change for users who add DOCKER_PRUNE=yes — same
codepath runs. Only the default changes.
…EDS FIXING) Rename two .patch files to .patch.NEED_FIX so the patch driver skips them on apply. Both are drm/xe kernel patches that stopped applying cleanly after an upstream rebase and haven't been refreshed yet: - 0002-drm-xe-guc-use-GUC_SIZE-SZ_4K-for-alignment.patch - 0005-drm-xe-query-use-PAGE_SIZE-as-the-minimum-page-align.patch Kernels that were picking these up need them re-based against current upstream drm/xe before re-enabling. Not a behaviour change on its own — the patches were already failing the apply step — but stops the noise in build logs and makes it obvious at a glance which patches need maintainer attention.
72e6f1c to
25553c5
Compare
Summary
Three small, independent build-framework fixes that were originally riding on top of the larger desktops → armbian-config module_desktops migration (#9683) but have nothing to do with desktop. Split out here for cleaner review and to let them land on their own schedule.
Commits
rootfs-create: add --verbose to mmdebstrap when DEBUG=yesmmdebstrap setup failures land in build logs as a one-line
E: setup failedwith no context about which dep resolution actually blew up (recent example: sid/loong64gnupg2 >= 2.4.9-4vsdirmngr 2.4.8-4port-sync skew). Pass--verboseto mmdebstrap when the user has already opted intoDEBUG=yes, so the solver + per-package download lines become visible in the build log. Default builds (DEBUG unset) keep the terse log — no behaviour change for anyone who hasn't asked for it.docker: gate image cleanup behind DOCKER_PRUNE=yes (default off)docker_cli_prepare()calleddocker_cleanup_old_imagesunconditionally, which enumeratesdocker imagesandrmi's old armbian tags. Broken on hosts where several build framework invocations share one dockerd — the usual setup when multiple self-hosted GH Actions runners live on the same machine. Two concurrent invocations race: runner A's cleanup firesdocker rmi <id>on a tag runner B just committed betweenSuccessfully built <sha>and dockerd writing the imagedb digest file. B aborts withfailed to get digest sha256:…: no such file or directory. Default-off makes shared-daemon setups safe out of the box; users flipDOCKER_PRUNE=yesfor the old behaviour.patch: disable drm/xe patches that don't apply to current kernels (@amazingfate )Rename two
drm/xekernel patches underpatch/kernel/archive/uefi-loong64-7.0/to.patch.NEED_FIXso the patch driver skips them. Both broke on a recent upstream rebase and need maintainer attention. Not a behaviour change — patches were already failing apply — but stops the noise in build logs and makes it obvious at a glance which patches need refreshing.Relationship to #9683
#9683 was originally 10 commits spanning the desktop migration plus these three miscellaneous fixes. Splitting these out leaves #9683 focused on the single storyline of replacing
config/desktop/with armbian-config'smodule_desktops. This PR (3 commits) can land on its own schedule — none of the three is a prerequisite for #9683 and vice-versa.Test plan
./compile.sh …) has no mmdebstrap output change vs main — terse log as before.DEBUG=yes ./compile.sh …shows mmdebstrap's per-package solver + download progress (visible failure context for bootstrap issues)../compile.shjobs with the defaultDOCKER_PRUNEunset: nofailed to get digesterrors.DOCKER_PRUNE=yes ./compile.shbehaves as before (cleanup runs).uefi-loong64-7.0skips the.NEED_FIXpatches without erroring.Summary by CodeRabbit