build(make): make rpm components rebuild incrementally#1007
Merged
Conversation
This was referenced Jun 25, 2026
The api/ui/keycloak/appctl SOURCES rule listed $(RPMBUILD_DIR) as a normal prerequisite, but the rule writes rpmbuild/SOURCES.tgz into that directory, bumping its mtime on every build -> SOURCES is remade each run -> RPMS -> rpm -> heavy_rootfs -> rootfs.cgz -> pkg -> initramfs/cgz, so a no-change rebuild redid the whole tail. Make RPMBUILD_DIR an order-only prerequisite so its mtime no longer triggers a rebuild. Also in these files: - write version/build_number with `>` not `>>` (>> doubled the file on a rebuild, e.g. v3.1.0v3.1.0, corrupting the rpm filename). - ui/keycloak: touch $@ on SOURCES. - drop tab-indented recipe comments that make echoes into the build output. Bumps the hex submodule to the projppu nohup -> $(QEND) build-output cleanup (bigstack-oss/hex#117). hex#117 must be reviewed and merged first. Validated via remake jail + make pxe twice: pass 2 has no rpm/heavy_rootfs/cgz rebuilds and no echoed comments. Refs #1005 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Travis Wu <travis.wu@bigstack.co>
4cfad9b to
0584260
Compare
Eandalf-Bigstack
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Important
Merge order: review and merge bigstack-oss/hex#117 first.
This PR bumps the
hexsubmodule to theprojppunohup ->$(QEND)fix commit.If hex#117 is squash-merged (changing the commit hash), re-point the submodule to
the resulting
developcommit before merging this PR.What type of PR is this?
/kind bug
What this PR does / why we need it
Follow-up to #1006 — finishes making the build incremental. The "cgz / heavy_rootfs
rebuild every pass" had a deeper driver: the RPM components (api/ui/keycloak/appctl)
always rebuilt because their
SOURCESrule writesrpmbuild/SOURCES.tgzintothe
rpmbuilddir, bumping its mtime on every build — andSOURCESlisted$(RPMBUILD_DIR)as a normal (timestamp) prerequisite. SoSOURCES -> RPMS -> rpm -> heavy_rootfs -> rootfs.cgz -> pkg -> initramfs/cgzall re-ran with no source change.Fix: make
$(RPMBUILD_DIR)an order-only prerequisite (target: realdeps | $(RPMBUILD_DIR)).Since
ui.rpm/api.rpmareheavy_rootfsprerequisites, this is what finally letsheavy_rootfs(and the whole tail) settle.Also in these files:
version/build_numberwritten with>not>>(the>>doubled the file on arebuild — e.g.
v3.1.0v3.1.0— which then corrupted the rpm filename).touch $@onSOURCES.makeechoed into the build output.Submodule bump: updates
hexto theprojppunohup ->$(QEND)build-outputcleanup (bigstack-oss/hex#117) — see the merge-order note above.
Validation
make centos9-jail enterthenmake pxetwice. Pass 2 (no changes):No rpm / heavy_rootfs / rootfs.cgz / pkg / cgz rebuilds, no echoed comments, 0 source
artifacts, rc=0. (
checkauth/pamauth/build.mkare one-time pass1->pass2 mtimesettling — a 3rd
make pxeis fully silent.)Which issue(s) this PR fixes
Refs #1005
Special notes for your reviewer
hex_crashdsource-pollution fix already landed separately as9d49838.