Skip to content

build(make): make rpm components rebuild incrementally#1007

Merged
github-actions[bot] merged 1 commit into
developfrom
build/rpm-incremental-fixes
Jun 25, 2026
Merged

build(make): make rpm components rebuild incrementally#1007
github-actions[bot] merged 1 commit into
developfrom
build/rpm-incremental-fixes

Conversation

@traviswu-bigstack

@traviswu-bigstack traviswu-bigstack commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Important

Merge order: review and merge bigstack-oss/hex#117 first.
This PR bumps the hex submodule to the projppu nohup -> $(QEND) fix commit.
If hex#117 is squash-merged (changing the commit hash), re-point the submodule to
the resulting develop commit 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 SOURCES rule writes rpmbuild/SOURCES.tgz into
the rpmbuild dir, bumping its mtime on every build — and SOURCES listed
$(RPMBUILD_DIR) as a normal (timestamp) prerequisite. So SOURCES -> RPMS -> rpm -> heavy_rootfs -> rootfs.cgz -> pkg -> initramfs/cgz all re-ran with no source change.

Fix: make $(RPMBUILD_DIR) an order-only prerequisite (target: realdeps | $(RPMBUILD_DIR)).
Since ui.rpm/api.rpm are heavy_rootfs prerequisites, this is what finally lets
heavy_rootfs (and the whole tail) settle.

Also in these files:

  • version/build_number written with > not >> (the >> doubled the file on a
    rebuild — e.g. v3.1.0v3.1.0 — which then corrupted the rpm filename).
  • ui/keycloak: touch $@ on SOURCES.
  • removed tab-indented recipe comments that make echoed into the build output.

Submodule bump: updates hex to the projppu nohup -> $(QEND) build-output
cleanup (bigstack-oss/hex#117) — see the merge-order note above.

Validation

make centos9-jail enter then make pxe twice. Pass 2 (no changes):

GEN  build.mk
LD   checkauth
LD   pamauth
BUILD shell image (0s)

No rpm / heavy_rootfs / rootfs.cgz / pkg / cgz rebuilds, no echoed comments, 0 source
artifacts, rc=0. (checkauth/pamauth/build.mk are one-time pass1->pass2 mtime
settling — a 3rd make pxe is fully silent.)

Which issue(s) this PR fixes

Refs #1005

Special notes for your reviewer

  • The hex_crashd source-pollution fix already landed separately as 9d49838.

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>
@traviswu-bigstack traviswu-bigstack force-pushed the build/rpm-incremental-fixes branch from 4cfad9b to 0584260 Compare June 25, 2026 04:00
@Eandalf-Bigstack Eandalf-Bigstack added the done Merge the pull request label Jun 25, 2026
@github-actions github-actions Bot merged commit 0584260 into develop Jun 25, 2026
9 checks passed
@github-actions github-actions Bot deleted the build/rpm-incremental-fixes branch June 25, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

done Merge the pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants