mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2] qemu / 9p: store metadata for / in correct file
@ 2023-04-28  8:02 Robert Schwebel
  2023-05-02  7:06 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Schwebel @ 2023-04-28  8:02 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. For nfsroot, we also leave
the file in the current position.

Without this patch, / belongs to the user+group of the ptxdist user on
9p, 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 | 4 ++++
 1 file changed, 4 insertions(+)

Changes since (implicit) v1:

- leave old file for nfsroot (feedback from mol)

diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
index 1a1af0c19..a2fa7b99a 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -296,6 +296,10 @@ ptxd_install_virtfs() {
 	virtfs.gid=${grp}
 	virtfs.mode=${mod_virtfs}
 	EOF
+	if [ -z "${dst}" ]; then
+		mkdir_p "${d%/*}/root" &&
+		cp $file "${d%/*}/root/.virtfs_metadata_root"
+	fi &&
 	if [ -n "${major}" -a -n "${minor}" ]; then
 	    local rdev=$[ ${major} << 8 | ${minor} ] &&
 	    echo "virtfs.rdev=${rdev}" >> "${file}"
-- 
2.39.2




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

end of thread, other threads:[~2023-05-02  7:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-28  8:02 [ptxdist] [PATCH v2] qemu / 9p: store metadata for / in correct file Robert Schwebel
2023-05-02  7:06 ` [ptxdist] [APPLIED] " Michael Olbrich

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