* [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
* Re: [ptxdist] [APPLIED] qemu / 9p: store metadata for / in correct file
2023-04-28 8:02 [ptxdist] [PATCH v2] qemu / 9p: store metadata for / in correct file Robert Schwebel
@ 2023-05-02 7:06 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2023-05-02 7:06 UTC (permalink / raw)
To: ptxdist; +Cc: Robert Schwebel
Thanks, applied as 94b4846fbe5b18327baca493b181a94a7d610fb2.
Michael
[sent from post-receive hook]
On Tue, 02 May 2023 09:06:10 +0200, Robert Schwebel <r.schwebel@pengutronix.de> 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. 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>
> Message-Id: <20230428080219.2971043-1-r.schwebel@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
> index 1a1af0c1995b..a2fa7b99ac7e 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}"
^ 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