mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Robert Schwebel <r.schwebel@pengutronix.de>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] qemu / 9p: store metadata for / in correct file
Date: Thu, 27 Apr 2023 23:35:09 +0200	[thread overview]
Message-ID: <20230427213509.GA5512@pengutronix.de> (raw)
In-Reply-To: <20230427110826.3414531-1-r.schwebel@pengutronix.de>

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-<nnn>/.virtfs_metadata/root but instead
> in platform-<nnn>/root/.virtfs_metadata_root.
> 
> Without this patch, / belongs to the user+group of the ptxdist user, not
> to root+root.
> 
> Inspired-by: Michael Olbrich <m.olbrich@pengutronix.de>
> Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
> ---
>  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 |



      reply	other threads:[~2023-04-27 21:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-27 11:08 Robert Schwebel
2023-04-27 21:35 ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230427213509.GA5512@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    --cc=r.schwebel@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox