Skip to content
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

RFE: download build artifacts after %install and before %check phase #1352

Open
xsuchy opened this issue Mar 30, 2024 · 2 comments
Open

RFE: download build artifacts after %install and before %check phase #1352

xsuchy opened this issue Mar 30, 2024 · 2 comments
Labels
enhancement feature request, rfe

Comments

@xsuchy
Copy link
Member

xsuchy commented Mar 30, 2024

The apocalypXZe just started, but we can learn a thing from that: trust of whole upstream tarball is not granted. We can minimize such attacks in future when we run tests in isolation without ability to affect final artifacts.

Now we run all phases of rpmbuild. Including %check and then offers the artifacts for next use. And I am looking at Koji, Copr and other build system, not just cli-user.

What we can change is that we can run %build, %install - pause build system can fetch artifacts - and run %check and report status.

@xsuchy
Copy link
Member Author

xsuchy commented Apr 1, 2024

Comment by Zbigniew from devel ML:
If we wanted to pursue that, I'd suggest the following:
remount $RPM_BUILD_ROOT read-only for the %check phase
(or maybe overmount it with a writable overlayfs that is thrown
away after %check finishes, and warn if any modifications were made.)
%check is executed after %install, so everything should be in place
before %check, and %check may be skipped, so no modifications to
installed files should be done in %check.

Considering possible implemention details, machinectl has 'bind' and
'bind --read-only' that might be useful here. But mock uses
systemd-nspawn in a way that does register the container with machined.
So maybe it'd be more reasonable to just execute a mount command directly
from mock.

@xsuchy
Copy link
Member Author

xsuchy commented Apr 3, 2024

@praiskup praiskup added the enhancement feature request, rfe label Apr 3, 2024
@xsuchy xsuchy changed the title RFE: make easier to build systems to download artifacts after %install and before %check phase RFE: download build artifacts after %install and before %check phase Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature request, rfe
Projects
None yet
Development

No branches or pull requests

2 participants