-
Notifications
You must be signed in to change notification settings - Fork 144
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
rpm-ostree: use prefetched RPMs, add hermetic option #928
rpm-ostree: use prefetched RPMs, add hermetic option #928
Conversation
42bd22c
to
323fbfc
Compare
ref konflux-ci/build-definitions#928 Signed-off-by: Adam Cmiel <[email protected]>
ref konflux-ci/build-definitions#928 Signed-off-by: Adam Cmiel <[email protected]>
322c237
to
5d7b80c
Compare
Tested in chmeliik/centos-bootc-tmp#7, chmeliik/centos-bootc-tmp#8 and chmeliik/centos-bootc-tmp#9 Prefetch + hermetic works, hermetic without prefetch fails as expected, non-hermetic without prefetch still works. Some notes.
|
Also tested how this works with the source build task (see final pipeline in https://github.com/chmeliik/centos-bootc-tmp/blob/hermetically/.tekton/ostree-build.yaml). There is a bug in the source build task which causes the source container to not include any SRPMs. Will fix. |
5d7b80c
to
ccb00e3
Compare
Also, if I'm not wrong, 2.4 Gi of that are duplicates $ fdupes -r cachi2-output > dupes.txt
$ cat dupes.txt | xargs du -b | awk '{ s += $1 } END { print s }' | numfmt --to=iec-i
4.8Gi Of those, roughly 400Mi are noarch duplicates (these are needed - each noarch RPM has to be in every arch-specific subdirectory, otherwise only one arch will have access to them). The remaining 2 Gi are duplicate SRPMs (these are not needed). $ grep 'noarch.rpm$' dupes.txt | xargs du -b | awk '{ s += $1 } END { print s }' | numfmt --to=iec-i
792Mi
$ grep 'src.rpm$' dupes.txt | xargs du -b | awk '{ s += $1 } END { print s }' | numfmt --to=iec-i
4.0Gi TLDR, the lockfile generation needs a lot of work. |
|
/retest |
ccb00e3
to
375ca7d
Compare
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.
LGTM
375ca7d
to
62e9b36
Compare
/retest e2e-tests failed with
first time seeing that |
/retest |
Another EC pipeline timeout
|
STONEBLD-2280 STONEBLD-2281 The experimental RPM support that's being added to cachi2 will stay gated behind the --dev-package-managers flag. Give users a way to enable dev package managers. Document the option as discouraged. Signed-off-by: Adam Cmiel <[email protected]>
STONEBLD-2281 When the prefetch-dependencies task prefetches RPMs, make the rpm-ostree task use them. Do this by removing all the original repo files from the source directory and replacing them with the generated cachi2.repo. --- Note that the rpm-ostree task determines whether there are prefetched RPMs by checking the existence of the platform-specific RPMs directory. This means that if RPMs are prefetched for platform A but not for platform B, the build for platform B will still work (and download the RPMs at build time). One may argue that this is undesirable, as it can lead to a situation where one platform prefetches RPMs and another one does not. But this is best addressed by enabling the 'hermetic' option to cut off network access altogether (to be added in a follow-up commit). Signed-off-by: Adam Cmiel <[email protected]>
Signed-off-by: Adam Cmiel <[email protected]>
STONEBLD-2281 With HERMETIC=true, the rpm-ostree build will have its network access disabled. This is done by setting --network=none for the podman container executed on the remote VM (which runs the rpm-ostree command). Note that rpm-ostree has an --offline option, but it doesn't do anything useful for hermetic builds. Just prints a warning when RPMs have to be downloaded. Signed-off-by: Adam Cmiel <[email protected]>
62e9b36
to
eab672a
Compare
Quality Gate passedIssues Measures |
interesting /retest |
While pushing bundles. Thanks Quay. |
See individual commits for more details
STONEBLD-2281
If the prefetch-dependencies task has prefetched RPMs, make the
rpm-ostree build use them. Do this by removing all the original repo
files from the source directory and replacing them with the generated
cachi2.repo.
Also expose the
--dev-package-managers
flag for the prefetch task (therefore this also relates to STONEBLD-2280)And add a hermetic option to the rpm-ostree task