[Rpm-maint] [rpm-software-management/rpm] RFE: ensure unwritable buildroot during %check (Issue #3010)

Zbigniew Jędrzejewski-Szmek notifications at github.com
Tue Apr 2 09:03:11 UTC 2024


An idea was floated on fedora-devel to remove tests from packages altogether. I empathetically disagree with that, but maybe it'd be useful to "sandbox" the tests a bit. The test code is often of lesser quality and less reviewed.

The basic idea is to make sure that the `%check` section shouldn't affect the packaged payload. If any work affecting the installed filed is done in %check, this is most likely an error. In particular, the `%check` section can be skipped, and this shouldn't cause the results to be different.

Either $RPM_BUILD_ROOT could be remounted read-only for the duration of %check, or overlayfs with a throw-away upper layer could be overmounted.

In the fedora-devel thread I suggested that `mock` should do this, because I wasn't aware of rpm using mount namespaces at all.

All that said, I'm not really sure if it's such a great idea… It might help in some cases, so if it's easy to implement, maybe it'd be worth trying. But if you think it's just not worth the effort and close the issue, I'm fine with that too.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3010#issuecomment-2031455276
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/3010/2031455276 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240402/b0ee2b9b/attachment.html>


More information about the Rpm-maint mailing list