aurupdater

Cross-package tooling notes

2026-09-11: remote-board build times now label MAKEFLAGS/serial, not a bare “remote”

repo_record_build_time.sh’s “Build times” block in each package’s memory note already labeled local chroot builds with their actual parallelism (MAKEFLAGS=-jN or serial, derived from repo_build.sh’s own MAKEFLAGS env var), but remote ARM-board builds (eurobuild4/5/14) just got a fixed remote – no indication of whether that board built serially or with some -jN. User asked for parity with the local labels.

Fix: scripts/remote_build.sh (the agent script deployed to and run on the board) now resolves its own effective parallelism the same way makepkg itself would – MAKEFLAGS from the environment if exported (it currently isn’t, in the non-interactive ssh session this runs under), else parsed out of the board’s own /etc/makepkg.conf (last uncommented MAKEFLAGS= line, quotes stripped) – and echoes it as REMOTE_BUILD_PARALLELISM: MAKEFLAGS=-jN (or ...: serial) to stdout before starting the build. That line lands in the ssh output repo_build_remote.sh returns, which repo_build.sh already captures per-arch into ${_remote_tmpdir}/${arch}.log; on a successful build, repo_build.sh now greps that line back out and passes "remote, ${label}" (e.g. remote, MAKEFLAGS=-j2, remote, serial) to repo_record_build_time.sh instead of the bare remote. Falls back to plain remote if the line isn’t found (e.g. an older/unpatched remote_build.sh still cached on some board before its next self-deploy refresh).

No pkgdir files involved – the label rides through stdout/the existing log capture, not a synced-back sidecar file, so no new stray-file cleanup concern (cf. feedback_check_stale_artifacts_before_build.md).

2026-09-11: use MAKEFLAGS=-j6 for local euronuc builds going forward

Local chroot builds (x86_64/i686/pentium4/i486 on euronuc) have always been single-threaded by default (/etc/makepkg.conf’s MAKEFLAGS="-j1"), since repo_build.sh’s MAKEFLAGS passthrough (added 2026-09-04) is an opt-in the caller has to set, not a default. Came up when asked whether local archs could build in parallel with each other – they can’t, safely, as-is: every local arch’s chroot binds the same host pkgdir as both /startdir and /srcdest (no per-arch isolation the way the remote-board path already has, where each board gets its own rsynced copy), so two local archs building at once would race on the same src/ extraction. Cross-arch parallelism would need real staging work (isolate each local arch into its own copy, mirroring the remote pattern) – not done.

The safe, immediate win instead: set MAKEFLAGS=-j6 when invoking repo_release.sh/repo_build_staged.sh for local builds, so each (still-sequential) arch build at least uses multiple cores to compile. -j6 (not -j8, euronuc’s full core count) leaves headroom for the separate Archlinux32 builder daemon that also runs on this same host – same reasoning repo_build.sh’s own MAKEFLAGS mechanism was built around in the first place (never touches the real /etc/makepkg.conf, see the 2026-09-04 entry above). Adopted as a standing convention going forward, not a one-off.

2026-09-11 (same day, follow-up): MAKEFLAGS=-j6 baked in as an actual script default

Per direct follow-up request, the convention above is no longer just a “remember to pass it” habit – scripts/repo_build.sh now has : "${MAKEFLAGS:=-j6}" + export MAKEFLAGS right after its REPO_BUILD_ONLY_ARCH default. Still fully overridable by an explicit caller-set MAKEFLAGS (e.g. MAKEFLAGS="-j1" for the old serial behavior). The explicit export matters: if a caller never sets MAKEFLAGS at all (now the common case), := alone would only create a local shell variable that sudo --preserve-env=MAKEFLAGS further down couldn’t see.

Verified end-to-end against a real chroot build, not just an env-passthrough test (see this file’s 2026-09-04 MAKEFLAGS entry for why that alone isn’t trustworthy): ran scripts/repo_build_staged.sh adapted/gconf with no MAKEFLAGS set, confirmed MAKEFLAGS=-j6 + the scratch MAKEPKG_CONF in the actual running makechrootpkg/sudo processes’ environment via /proc/<pid>/environ, and confirmed the auto-recorded build time picked up the new label (memory/gconf.md: x86_64 41s, MAKEFLAGS=-j6, down from a prior serial run’s 55s).

Gotcha hit while verifying: repo_build_staged.sh copies built .pkg.tar.* back into the git-tracked arch/<category>/<pkg>/ dir by design (so repo_release.sh can find them to sign/publish) – calling it directly for a build-only test, with no follow-up repo_release.sh, leaves those files sitting in the git tree; cleaned them up manually afterward. Not a bug, just something to remember when testing the build step in isolation.