Skip to content

ostree-ext: Point ostree container commit users at bootc container lint - #2504

Merged
cgwalters merged 1 commit into
bootc-dev:mainfrom
cgwalters-forge:bot/ostree-container-commit-noop
Sep 28, 2026
Merged

cgwalters merged 1 commit into
bootc-dev:mainfrom
cgwalters-forge:bot/ostree-container-commit-noop

Conversation

@cgwalters-bot

Copy link
Copy Markdown
Contributor

People keep putting RUN ... && ostree container commit in their Containerfiles because older docs told them to, while bootc container lint is now the supported way to check a bootc image. Making the command a no-op would silently change what ends up in existing images (it empties /run, /tmp, /var/tmp and /var/cache), so this keeps its behavior as is. It now prints a prominent deprecation note on stderr pointing at bootc container lint, then pauses 5 seconds so the note stands out in build logs.

Related: #2396

Testing

On a 16-core RHEL 10 devspace, branch head 7cb98ec (on main 41049cc):

  • just validate passed.
  • just unit-tests passed: 444 tests, including the new commit::tests::container_commit_notice, which checks the note's text (the sleep lives outside the tested function, so the suite doesn't wait).
  • just build built the image (bootc-202609252226.g7cb98ecb5d). I copied its /usr/bin/bootc onto quay.io/centos-bootc/centos-bootc:stream10 and ran ostree container commit in a RUN step that first writes files to /var/cache, /var/tmp and /tmp. The note was printed, the command took 5s, and the files were removed as before. The same step on the stock image took 0s, printed nothing and removed the files too.

The Signed-off-by: Colin Walters <[email protected]> on these commits was added on cgwalters's approval of the review draft: cgwalters-forge#8 (review)

Generated-by: https://github.com/cgwalters/#llms

@cgwalters-bot

Copy link
Copy Markdown
Contributor Author

Rebased onto main; 1 commit, no content change.

Generated-by: https://github.com/cgwalters/#llms

@cgwalters-bot
cgwalters-bot force-pushed the bot/ostree-container-commit-noop branch from 42dfeb6 to e30d05e Compare September 26, 2026 21:11
Comment thread crates/ostree-ext/src/commit.rs Resolved
… lint`

People keep carrying `RUN ... && ostree container commit` in their
Containerfiles because older docs told them to, while `bootc container
lint` is now the supported way to check a bootc image. We can't just
drop or neuter the command: existing builds rely on it emptying /run,
/tmp, /var/tmp and /var/cache, and changing that would silently grow
images or leak build-time files into layers.

So keep its behavior, but print a one-line notice on stderr that it is
deprecated in favor of `bootc container lint`, and pause for 5 seconds
so the notice stands out in build logs rather than scrolling by.

Related: bootc-dev#2396
Generated-by: AI
Signed-off-by: Colin Walters <[email protected]>
@cgwalters-bot
cgwalters-bot force-pushed the bot/ostree-container-commit-noop branch from e30d05e to 24529c1 Compare September 28, 2026 14:59
@cgwalters
cgwalters enabled auto-merge (rebase) September 28, 2026 20:27
@cgwalters
cgwalters merged commit 683bb05 into bootc-dev:main Sep 28, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ostree Issues related to ostree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants