Skip to content

Conversation

@cgwalters
Copy link
Member

This introduces a Justfile and Dockerfile to enable building rpm-ostree
from source in a container, following the pattern established in the
bootc project.

See the Justfile for key entrypoints. Those are now used
in a new GHA flow, which we'll try to move things over to.

A key difference though vs bootc is because rpm-ostree has a lot
of C++ too we use sccache which greatly speeds things up across
incremental rebuilds.

Just one side cleanup of this is before it was terribly
painful and manual to hack on test-container.sh, and now it's easy,
fast and optimized.

Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: Colin Walters walters@verbum.org

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new build and test infrastructure using Docker and Justfile, mirroring the setup from the bootc project. This is a significant improvement, making it easier to build and test rpm-ostree in a containerized environment. The changes are well-structured, using multi-stage Docker builds and providing clear entrypoints in the Justfile. I have one minor suggestion to fix a command in the Dockerfile.

The split_whitespace_unless_quoted function was using chars().enumerate()
which returns character indices, but then using those indices to slice
the string which requires byte indices. This triggers the
char_indices_as_byte_indices clippy lint.

Fixed by using char_indices() instead, which provides byte indices
directly. Also refactored the end-of-string handling to occur after
the loop completes, which is clearer and handles the remaining text
properly regardless of multi-byte characters.

Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
Update the shared bootc-ubuntu-setup GitHub Action to match the latest
version from bootc-dev/bootc, incorporating several improvements:

- Add libvirt input parameter: Allows workflows to optionally install
  virtualization stack for tests that need VM support
- Improve disk cleanup: Use systemd-run for parallel background cleanup
  operations, freeing disk space more efficiently
- Add timing instrumentation: Use /bin/time to track duration of
  expensive operations (apt update, apt install)
- Add Rust caching: Use Swatinem/rust-cache@v2 for faster builds with
  intelligent cache management (only save on main, lookup-only on main
  to avoid incremental bugs)
- Add libvirt support: Install bcvk, qemu, and related virtualization
  tools when libvirt input is true
- Add cleanup status: Display systemd cleanup units and final disk
  usage for better observability

These changes bring rpm-ostree's CI infrastructure more in line with
bootc's battle-tested setup, enabling future enhancements like VM-based
integration tests.

Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
Fix static library linking order in libdnf-sys build script.
The C++ wrapper (libdnfcxx.a) depends on both libdnf and glib,
but cargo's link order requires dependencies to come after
dependents. Re-emit link directives after compiling the wrapper
to ensure symbols are available.

This was causing undefined reference errors for g_strndup, g_free,
and hy_split_nevra when building tests.

Also add workspace-level lints to Cargo.toml and minor Rust cleanups.

Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters force-pushed the revamp-buildsys branch 3 times, most recently from 1080811 to b203721 Compare November 1, 2025 17:54
@cgwalters
Copy link
Member Author

OK I'm really tempted to drop Prow. I added it long ago because we were having reliability issues with the Jenkins, but those two have always been duplicative.

That said this failure is rooted in one path building an RPM and the new path isn't. We are probably going to have to bite the bullet here and switch even the default just to build an RPM and not just direct binaries (also in bootc).

@jmarrero
Copy link
Member

jmarrero commented Nov 3, 2025

I am OK dropping prow if that is the only difference. As long as the tests are running, having both systems running the same tests is just wasting time and compute.

@cgwalters
Copy link
Member Author

The conflict is basically that we've added .git to .dockerignore and the jenkins/coreos-CI doesn't use that but Prow does.

This introduces a Justfile and Dockerfile to enable building rpm-ostree
from source in a container, following the pattern established in the
bootc project.

See the `Justfile` for key entrypoints. Those are now used
in a new GHA flow, which we'll try to move things over to.

A key difference though vs bootc is because rpm-ostree has a lot
of C++ too we use sccache which greatly speeds things up across
incremental rebuilds.

Just one side cleanup of this is before it was *terribly*
painful and manual to hack on `test-container.sh`, and now it's easy,
fast and optimized.

Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
@openshift-ci
Copy link

openshift-ci bot commented Nov 3, 2025

@cgwalters: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/fcos-e2e 29222a1 link true /test fcos-e2e
ci/prow/images 29222a1 link true /test images

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@cgwalters cgwalters merged commit 9f20572 into coreos:main Nov 6, 2025
19 of 21 checks passed
@cgwalters
Copy link
Member Author

I'm going to look at dropping Prow here.

@cgwalters
Copy link
Member Author

openshift/release#71131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants