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 |