On 2023-06-26 21:20, Johannes Schauer Marin Rodrigues wrote: > this is not a daydream and I think we have nearly all building blocks in place > to make all of this happen very soon! Here is a summary: > > 1. You use `debvm-create --arch $foo` to create a filesystem image for any > architecture supported by QEMU without superuser privileges. The > debvm-create utility is a thin wrapper around mmdebstrap and passes all > the > right arguments to create this filesystem image. > > 2. You use either autopkgtest-virt-qemu or autopkgtest-virt-ssh (depending on > whether Simon prefers merge request !236 or !237) to run your autopkgtest > through qemu with that disk image > > 3. ??? > > 4. Profit!
As somebody who uses QEMU images for a lot of things, I'm really glad to hear this. Finally! Getting rid of root is a such a big win, in many ways. > If you want to upgrade the disk image you can do so by using `debvm-run` which > gives you a root shell for that disk image where you can just run "apt > upgrade". > > Now lets get to your "bonus". Once either MR !236 or !237 is accepted I will > rewrite sbuild-qemu-create to not call autopkgtest-build-qemu (which uses > vmdb2 > which requires root) but debvm-create instead. Similarly, the sbuild-qemu > script will be adapted to call sbuild with the autopkgtest backend and the > right option (again depending on whether MR !236 or !237 get merged). And the > sbuild-qemu-update tool will automate the updating so that you don't have to > run debvm-run yourself. > > Of course once either MR !236 or !237 get merged, you do not have to wait for > me to change sbuild-qemu. Even before I have done this work you can always > manually call sbuild with the autopkgtest backend and do your package builds > in > the QEMU image created by debvm-create without superuser privileges. For FWIW, as stated earlier I fully support this -- in the sense that whatever changes are necessary or convenient, just go for it. e.g.: I chose Python for those scripts, but if Perl is more convenient, just drop the old stuff. Or if I can help, let me know. I just have one question about debvm though (hence Helmut in CC), which is beyond my depth: is that kernel direct boot something akin to EFI, or BIOS, or of its own kind? As I've managed to land on a use case where EFI boot seems to be needed (PCI device passthrough), at least according to the various docs I found. Best, Christia

