From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=EgnRRwDE; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 4886C5A0275 for ; Thu, 25 Sep 2025 10:53:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758790392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RTUnfZ/qfvwotYN1toF7IBdmn8HjwA6G/TH+1CdeK98=; b=EgnRRwDEb1wLWpTG9cXi1iZpq1W7bdja1ffy1acluLIaeAqAiWhnm0DiC4X7TpF7kqR5A6 9+OInCz0FNuo/1yt5rs9U04nyxQCp8Y2DUyqMBVjFZ9MfSt9aVC2tSWAb/lN2OYTo+bgBC 9aH5tZ2UVH5m5w6tWSzF8VxSJZnam6Y= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-159-tGFRguNaPw686nXekpsHag-1; Thu, 25 Sep 2025 04:53:10 -0400 X-MC-Unique: tGFRguNaPw686nXekpsHag-1 X-Mimecast-MFC-AGG-ID: tGFRguNaPw686nXekpsHag_1758790390 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EB5F51800452; Thu, 25 Sep 2025 08:53:08 +0000 (UTC) Received: from localhost (unknown [10.45.224.19]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 56FB830002D0; Thu, 25 Sep 2025 08:53:07 +0000 (UTC) Date: Thu, 25 Sep 2025 09:53:06 +0100 From: "Richard W.M. Jones" To: Yumei Huang Subject: Re: [PATCH] test: fix 'make assets' failure as root Message-ID: <20250925085305.GW1460@redhat.com> References: <20250925054306.15964-1-yuhuang@redhat.com> MIME-Version: 1.0 In-Reply-To: <20250925054306.15964-1-yuhuang@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: u6zEhwE0Tr8lSFmE19X7O4obVaC4J6PlxrrFhz9ZBdc_1758790390 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Message-ID-Hash: YG3LWRHLJDPGRXBXLNUNG6OAZRTN7TRT X-Message-ID-Hash: YG3LWRHLJDPGRXBXLNUNG6OAZRTN7TRT X-MailFrom: rjones@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, sbrivio@redhat.com, david@gibson.dropbear.id.au, berrange@redhat.com X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 > --- > 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 Please add a comment that this is only added as a temporary hack until we can get a proper fix (in libguestfs possibly, see Dan's earlier email). Rich. > 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 -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org