mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Robert Schwebel <r.schwebel@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Robert Schwebel <r.schwebel@pengutronix.de>,
	Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [ptxdist] [PATCH v2] qemu / 9p: store metadata for / in correct file
Date: Fri, 28 Apr 2023 10:02:20 +0200	[thread overview]
Message-ID: <20230428080219.2971043-1-r.schwebel@pengutronix.de> (raw)

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




             reply	other threads:[~2023-04-28  8:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28  8:02 Robert Schwebel [this message]
2023-05-02  7:06 ` [ptxdist] [APPLIED] " Michael Olbrich

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=20230428080219.2971043-1-r.schwebel@pengutronix.de \
    --to=r.schwebel@pengutronix.de \
    --cc=m.olbrich@pengutronix.de \
    --cc=ptxdist@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