-
Notifications
You must be signed in to change notification settings - Fork 160
build-sys: Many changes #1864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
build-sys: Many changes #1864
Conversation
There was a problem hiding this 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 significant and beneficial refactoring of the build system. Key changes include moving to a 'from scratch' base image build, consolidating the integration test image into the main build flow, and streamlining the process by building packages separately before injecting them into the final image. These changes greatly improve the structure and maintainability of the build process. My review includes a couple of suggestions for further cleanup, such as removing a now-redundant Containerfile and fixing a minor style issue in a shell script.
|
I won't have time to test this but the eyeball test looks sane, especially grateful for breaking it up into individual commits so I can more easily follow your train of thought 👏 |
8728ac5 to
3b73cf1
Compare
|
Our bot updated bcvk version in PR #1867. |
ae9169f to
f95e7fc
Compare
f95e7fc to
c578dc0
Compare
c578dc0 to
f555e2b
Compare
|
OK, fixed some more things; ended up adding an env var to shortcut things and skip package builds, it was just too fragile without that. The main thing I overlooked is that the unit/integration test depchains ended up pulling in package builds too. |
|
Hum, not sure yet why most but not all of the cfs tests failed. And now I see this blocks on #1225 Details# PR #1864 CI Failure Investigation - Composefs Boot FailuresSummaryPR #1864 ("build-sys: Many changes") introduces a "from scratch" image build approach Test Results Pattern
Key observation: Fedora 42 composefs works, but Fedora 43/44 and CentOS 10 don't. Main Branch StatusOn main branch (run 20343724695), ALL composefs and ostree tests PASS. Key Changes in PR #1864
Composefs Sealed UKI Build ProcessThe sealed composefs image is built via
Note: The cmdline is hardcoded and does NOT read from Failure DetailsFor failing distros (Fedora 43/44, CentOS 10):
Potential Causes to Investigate
Cloud-init Version Differences
The service rename in cloud-init 25 (Fedora 43) may cause issues if something Files to Examine
Next Steps
|
f555e2b to
1505a01
Compare
|
OK and then the next problem is the "from scratch" is really painful for composefs installs due to containers/composefs-rs#62 |
We were previously trying to support a direct `podman/docker build` *and* injecting externally built packages (for CI). Looking to rework for sealed images it was too hacky; let's just accept that a raw `podman build` no longer works, the canonical entry for local build is `just build` which builds both a package and a container. This way CI and local work exactly the same. Signed-off-by: Colin Walters <walters@verbum.org>
Oops. Signed-off-by: Colin Walters <walters@verbum.org>
Signed-off-by: Colin Walters <walters@verbum.org>
This changes things so we always run through https://docs.fedoraproject.org/en-US/bootc/building-from-scratch/ in our default builds, which helps work around containers/composefs-rs#132 But it will also help clean up our image building in general a bit. Signed-off-by: Colin Walters <walters@verbum.org>
Move all content from the derived test image (hack/Containerfile) into the main Dockerfile base image. This includes nushell, cloud-init, and the other testing packages from packages.txt. This simplifies the build by avoiding the need to juggle multiple images during testing workflows - the base image now contains everything needed. Assisted-by: OpenCode (Claude Sonnet 4) Signed-off-by: Colin Walters <walters@verbum.org>
The previous commit consolidated test content (nushell, cloud-init, etc.) into the base image. This completes that work by removing the separate `build-integration-test-image` target and updating all references. Now `just build` produces the complete test-ready image directly, simplifying the build pipeline and eliminating the intermediate `localhost/bootc-integration` image. Signed-off-by: Colin Walters <walters@verbum.org>
Removing localhost/bootc-pkg at the end of the package target also deletes the build stage layers, causing subsequent builds to miss the cache and rebuild the RPMs from scratch. Keep the image around; use `just clean-local-images` to reclaim space. Signed-off-by: Colin Walters <walters@verbum.org>
Ensure all RUN instructions after the "external dependency cutoff point" marker include `--network=none` right after `RUN`. This enforces that external dependencies are clearly delineated in the early stages of the Dockerfile. The check is part of `cargo xtask check-buildsys` and includes unit tests. Assisted-by: OpenCode (Sonnet 4) Signed-off-by: Colin Walters <walters@verbum.org>
Now that we're building a from-scratch image it won't have `/ostree` in it; this line was always pruning the wrong repo. Signed-off-by: Colin Walters <walters@verbum.org>
Remove the separate build-from-packages and _build-from-package helper recipes. The build logic is now inlined directly in the build recipe. Add BOOTC_SKIP_PACKAGE=1 environment variable support to skip the package build step when packages are provided externally (e.g. from CI artifacts). This is used in ci.yml for the test-integration job. Assisted-by: OpenCode (Sonnet 4) Signed-off-by: Colin Walters <walters@verbum.org>
1505a01 to
104799c
Compare
|
OK, I think now we're just down to the failures in those selinux-policy tests. Not sure what's up with that. |
See individual commits.
This is mainly with an eye to reworking our sealing, for which we needed to do a "scratch" build and as soon as we do that we might as well just take the step of consolidating our integration test and base image etc.
This was developed iteratively, and I did at least do a build test of each individual stage.