Cut ~60 minutes of emulated work out of the build
Some checks failed
build image / build (push) Failing after 44m21s

The first real run took 100 minutes. Roughly 60 of those were spent doing
things that either did not need doing or did not need doing under emulation.

dracut ran three times. The kernel's %posttrans runs kernel-install, which
builds an initramfs, and dracut-config-rescue makes it build a second, rescue
one — both before this build has written /etc/dracut.conf.d/10-c630.conf and
before /proc is bind-mounted, so both are wrong as well as expensive. stage2
then builds the real one. Setting initrd_generator=none in the install root for
the duration of the transaction suppresses both: 50-dracut.install and
51-dracut-rescue.install each bail when KERNEL_INSTALL_INITRD_GENERATOR is not
"dracut". Excluding dracut-config-rescue also spares the laptop a rescue
initramfs on every future kernel update, which on this hardware is not cheap.

That file must not ship. With it in place the machine would boot fine and then
fail to come back after its next kernel update — a bug that surfaces weeks
later looking nothing like an image problem. It is removed from the working
copy, and asserted absent again immediately before the root filesystem is
built.

Compression was running as an aarch64 binary under qemu-user for no reason;
zstd does not care what architecture it runs on. It now runs on the host when
the host has zstd, falling back to in-container otherwise so the build never
depends on it. Measured ~20 minutes against ~2.

Add BASE_RECIPE to the staged-base stamp. Excluding a weak dependency changes
what the base contains without changing the package list it hashes, so without
this the next build would happily reuse a stale base.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XWRjNJMistCy6ngXH5aJLS
This commit is contained in:
2026-07-27 14:12:19 +03:00
parent 3762f13d8b
commit a9f18c9951
3 changed files with 96 additions and 7 deletions

View File

@@ -54,8 +54,19 @@ harmless. Delete `/var/tmp/c630-build` to reclaim the space.
## Runtime
Every aarch64 binary runs under qemu-user emulation, and rpm scriptlets are the
worst case. A cold build is roughly 4590 minutes for `minimal` and several
hours for `workstation`; `timeout-minutes` is set to 600 accordingly.
worst case. A cold `minimal` build is roughly 40 minutes; `workstation` is
several hours. `timeout-minutes` is set to 600 accordingly.
The first measured run took 100 minutes, and about 60 of those were avoidable:
| Cost | Cause | Fix |
|---|---|---|
| ~40 min | The kernel's `%posttrans` ran dracut twice (normal + rescue) before the C630 dracut config existed, producing an initramfs immediately thrown away | `initrd_generator=none` in the install root during the transaction; `dracut-config-rescue` excluded |
| ~20 min | `zstd` running under emulation | Compression moved to the host |
Both are worth remembering if either ever regresses: the symptom is a build
that appears to hang with no output, because rpm scriptlet output is buffered
until the transaction ends.
A warm build — one where the package set has not changed since that runner last
built — skips the dnf transaction entirely and finishes in minutes. Because the