From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 27 Apr 2023 23:35:38 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ps9H7-002mvp-4Q for lore@lore.pengutronix.de; Thu, 27 Apr 2023 23:35:38 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1ps9H6-0007iT-Uv; Thu, 27 Apr 2023 23:35:36 +0200 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ps9Gf-0007i6-MT; Thu, 27 Apr 2023 23:35:09 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1ps9Gf-0008NT-9Y; Thu, 27 Apr 2023 23:35:09 +0200 Date: Thu, 27 Apr 2023 23:35:09 +0200 From: Michael Olbrich To: Robert Schwebel Message-ID: <20230427213509.GA5512@pengutronix.de> Mail-Followup-To: Robert Schwebel , ptxdist@pengutronix.de References: <20230427110826.3414531-1-r.schwebel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230427110826.3414531-1-r.schwebel@pengutronix.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [ptxdist] [PATCH] qemu / 9p: store metadata for / in correct file X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false On Thu, Apr 27, 2023 at 01:08:26PM +0200, Robert Schwebel wrote: > Since qemu commit 81ffbf5ab1458e357a761f1272105a55829b351e the metadata > for / is not stored in platform-/.virtfs_metadata/root but instead > in platform-/root/.virtfs_metadata_root. > > Without this patch, / belongs to the user+group of the ptxdist user, not > to root+root. > > Inspired-by: Michael Olbrich > Signed-off-by: Robert Schwebel > --- > scripts/lib/ptxd_make_xpkg_pkg.sh | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh > index 1a1af0c19..38ffa61ad 100644 > --- a/scripts/lib/ptxd_make_xpkg_pkg.sh > +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh > @@ -288,8 +288,13 @@ ptxd_install_virtfs() { > fi > > for d in "${ndirs[@]/%/${dst}}"; do > - dir="${d%/*}/.virtfs_metadata" > - file="${dir}/${d##*/}"&& > + if [ -z "${dst}" ]; then > + dir="${d%/*}/root" > + file="${dir}/.virtfs_metadata_root" > + else > + dir="${d%/*}/.virtfs_metadata" > + file="${dir}/${d##*/}" > + fi && Hmmm, I think we need both versions for the root folder: This stuff is also used by 'ptxdist nfsroot'. And for the NFS server, there is no special root directory. So changing it like this will break nfsroot. Michael > mkdir_p "${dir}" && > cat <<- EOF > "${file}" > virtfs.uid=${usr} > -- > 2.39.2 > > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |