public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH v2] test: fix 'make assets' failure as root
@ 2025-09-26  1:17 Yumei Huang
  2025-09-26  9:12 ` Richard W.M. Jones
  2025-09-26 12:37 ` Stefano Brivio
  0 siblings, 2 replies; 3+ messages in thread
From: Yumei Huang @ 2025-09-26  1:17 UTC (permalink / raw)
  To: passt-dev, sbrivio; +Cc: david, yuhuang, rjones, berrange

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 <yuhuang@redhat.com>
---
 test/prepare-distro-img.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test/prepare-distro-img.sh b/test/prepare-distro-img.sh
index 0d967c9..be2386e 100755
--- a/test/prepare-distro-img.sh
+++ b/test/prepare-distro-img.sh
@@ -3,6 +3,10 @@
 IMG="$1"
 PASST_FILES="$(echo ../*.c ../*.h ../*.sh ../*.1 ../Makefile ../README.md)"
 
+# This is just a workaround for Fedora and related distributions.
+# Once it gets fixed, we can drop this.
+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 <<EOF
-- 
2.47.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] test: fix 'make assets' failure as root
  2025-09-26  1:17 [PATCH v2] test: fix 'make assets' failure as root Yumei Huang
@ 2025-09-26  9:12 ` Richard W.M. Jones
  2025-09-26 12:37 ` Stefano Brivio
  1 sibling, 0 replies; 3+ messages in thread
From: Richard W.M. Jones @ 2025-09-26  9:12 UTC (permalink / raw)
  To: Yumei Huang; +Cc: passt-dev, sbrivio, david, berrange

On Fri, Sep 26, 2025 at 09:17:14AM +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 <yuhuang@redhat.com>
> ---
>  test/prepare-distro-img.sh | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/test/prepare-distro-img.sh b/test/prepare-distro-img.sh
> index 0d967c9..be2386e 100755
> --- a/test/prepare-distro-img.sh
> +++ b/test/prepare-distro-img.sh
> @@ -3,6 +3,10 @@
>  IMG="$1"
>  PASST_FILES="$(echo ../*.c ../*.h ../*.sh ../*.1 ../Makefile ../README.md)"
>  
> +# This is just a workaround for Fedora and related distributions.
> +# Once it gets fixed, we can drop this.
> +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 <<EOF

Reviewed-by: Richard W.M. Jones <rjones@redhat.com>

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] test: fix 'make assets' failure as root
  2025-09-26  1:17 [PATCH v2] test: fix 'make assets' failure as root Yumei Huang
  2025-09-26  9:12 ` Richard W.M. Jones
@ 2025-09-26 12:37 ` Stefano Brivio
  1 sibling, 0 replies; 3+ messages in thread
From: Stefano Brivio @ 2025-09-26 12:37 UTC (permalink / raw)
  To: Yumei Huang; +Cc: passt-dev, david, rjones, berrange

On Fri, 26 Sep 2025 09:17:14 +0800
Yumei Huang <yuhuang@redhat.com> 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 <yuhuang@redhat.com>

Applied.

-- 
Stefano


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-26 12:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-26  1:17 [PATCH v2] test: fix 'make assets' failure as root Yumei Huang
2025-09-26  9:12 ` Richard W.M. Jones
2025-09-26 12:37 ` Stefano Brivio

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).