[Rpm-maint] [rpm-software-management/rpm] Replace fakechroot with proper container technology (PR #2559)

Michal Domonkos notifications at github.com
Wed Jul 12 11:36:11 UTC 2023


Bubblewrap (bwrap) is used here to create fast, ephemeral per-test containers (*snapshots*) of the root filesystem. This replaces the former use of fakechroot. The whole test suite (the `rpmtests` script) assumes that the RPM build to be tested is installed into the root filesystem.

That means, in most scenarios, you'd want the test suite to run in a container with RPM installed and ready to use. That's what the `mktree` script does - it creates such an OS tree (i.e. image) and runs a container on top with `rpmtests`.

Now, the `mktree` script can have multiple implementations (*backends*). For example, one can use the host package manager to build the OS tree (e.g. DNF on Fedora) while another one can utilize `podman`. Both examples have their pros and cons (which is why backends are supported) but I won't go into the details now.

So to run the test suite, your platform needs to have bwrap ported and a suitable mktree backend to build the image.

The latter can be easily accomplished almost anywhere since in the worst case, the backend can always download a prebuilt OS tree tarball, or even copy (reflink) the necessary libraries and binaries from the host system into place (much like what we did with fakechroot).

The former (bwrap), however, is currently a strict requirement. That said, I was actually thinking of moving the bwrap logic into the mktree backends and have them define the per-test isolation method, instead of it being hardwired into the test suite. That way, one could write a "legacy" backend that basically does exactly what fakechroot did.

BTW, is fakechroot ported to MacOS? Or does Darwin have any containerization support?

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

Message ID: <rpm-software-management/rpm/pull/2559/c1632369824 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230712/3bfc28b7/attachment.html>


More information about the Rpm-maint mailing list