On Thu, Sep 25, 2025 at 01:43:06PM +0800, Yumei Huang wrote: > Running `make assets` under `test` as root fails with a "Permission denied" > error when `prepare-distro-img.sh` invokes `virt-edit` and `guestfish`. This > is due to a known bug in libvirt. > > Work around the issue by switching to the direct backend. > > Signed-off-by: Yumei Huang Reviewed-by: David Gibson The libvirt & libguestfs people don't particularly like this approach, but I think it's reasonable for our needs. > --- > test/prepare-distro-img.sh | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/test/prepare-distro-img.sh b/test/prepare-distro-img.sh > index 0d967c9..423eea7 100755 > --- a/test/prepare-distro-img.sh > +++ b/test/prepare-distro-img.sh > @@ -3,6 +3,8 @@ > IMG="$1" > PASST_FILES="$(echo ../*.c ../*.h ../*.sh ../*.1 ../Makefile ../README.md)" > > +export LIBGUESTFS_BACKEND=direct > + > virt-edit -a $IMG /lib/systemd/system/serial-getty@.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g' > > guestfish --rw -a $IMG -i < -- > 2.47.0 > -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson