mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] qemu / 9p: store metadata for / in correct file
@ 2023-04-27 11:08 Robert Schwebel
  2023-04-27 21:35 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Schwebel @ 2023-04-27 11:08 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel, Michael Olbrich

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 &&
 	mkdir_p "${dir}" &&
 	cat <<- EOF > "${file}"
 	virtfs.uid=${usr}
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-27 21:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-27 11:08 [ptxdist] [PATCH] qemu / 9p: store metadata for / in correct file Robert Schwebel
2023-04-27 21:35 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox