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] qemu / 9p: store metadata for / in correct file
Date: Thu, 27 Apr 2023 13:08:26 +0200 [thread overview]
Message-ID: <20230427110826.3414531-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.
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
next reply other threads:[~2023-04-27 11:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 11:08 Robert Schwebel [this message]
2023-04-27 21:35 ` 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=20230427110826.3414531-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