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=T/M5ShEO; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 2FCBA5A0275 for ; Thu, 25 Sep 2025 12:28:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758796082; 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=2jH5yIZbd5uhXBKUFYnrZtSk/8JgXgo59HbeqNWy+Zw=; b=T/M5ShEOHkEMco2A2/6NJh3rs6ev/4THKtDL0r44vzKFdnbBKxqy4jMI+Gpq3GE5Yy9Xn8 x6qmvS5RQ0m2CuFCV9pxf02ygvB3XMtoq/0PxLUdgxO50Hyca/ntUKUQA5ChYkRaeslmiT WxmnGpqGgry5fsgRTuqUmh47MRcY6Ns= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-576-xJX5BJIaOFyNyi7OZHnnxA-1; Thu, 25 Sep 2025 06:27:54 -0400 X-MC-Unique: xJX5BJIaOFyNyi7OZHnnxA-1 X-Mimecast-MFC-AGG-ID: xJX5BJIaOFyNyi7OZHnnxA_1758796073 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8337619560AD; Thu, 25 Sep 2025 10:27:52 +0000 (UTC) Received: from localhost (unknown [10.45.224.19]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 199F7180035E; Thu, 25 Sep 2025 10:27:50 +0000 (UTC) Date: Thu, 25 Sep 2025 11:27:49 +0100 From: "Richard W.M. Jones" To: Stefano Brivio Subject: Re: [PATCH] test: fix 'make assets' failure as root Message-ID: <20250925102749.GY1460@redhat.com> References: <20250925054306.15964-1-yuhuang@redhat.com> <20250925085305.GW1460@redhat.com> <20250925114025.14ea1815@elisabeth> MIME-Version: 1.0 In-Reply-To: <20250925114025.14ea1815@elisabeth> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: BvWouEaMdXn4D_z3Tuzk8raCYQo1kEyRb8ZIodkOCFY_1758796073 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Message-ID-Hash: GC7325TQ23EGDACNZA4O66QJZ4H2WXAA X-Message-ID-Hash: GC7325TQ23EGDACNZA4O66QJZ4H2WXAA 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: Yumei Huang , passt-dev@passt.top, 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 11:40:25AM +0200, Stefano Brivio wrote: > On Thu, 25 Sep 2025 09:53:06 +0100 > "Richard W.M. Jones" wrote: > > > 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). > > On the other hand, regardless of that fix, I would be happy to be run > this on single-user Alpine L1 guests, eventually, where libguestfs > doesn't depend on libvirt (see my caveat 2.), and I usually reserve > very little disk space for those. The upstream default is backend 'direct'. In Fedora & RHEL we override this with 'libvirt': https://src.fedoraproject.org/rpms/libguestfs/blob/rawhide/f/libguestfs.spec#_714 I don't know what Alpine does, but likely it leaves it at the default. (You can try: `guestfish get-backend`) > If you don't have compelling reasons (like you're dropping > LIBGUESTFS_BACKEND=direct in two weeks), I would simply keep this as > long as it works. The day you drop that, we'll drop this too. We're not dropping the environment variable / feature ever. The problem is that this was cargo-culted into a lot of code over the years, and it does reduce the security of libguestfs on RHEL. We're having an (ongoing) battle to remove this cargo-culting from CNV right now. I'm just not keen to add this line in new places, without at least a comment saying this is a temporary hack, and not generally recommended. > This part won't be executed as part of automated distribution tests > either, so occasional breakages are really unproblematic. > > Do you see any further issue with it? > > -- > Stefano Rich. -- 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