Message ID | 20211129135100.3934-1-mwilck@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [resend,v2] qemu-binfmt-conf.sh: fix -F option | expand |
Le 29/11/2021 à 14:51, mwilck@suse.com a écrit : > From: Martin Wilck <mwilck@suse.com> > > qemu-binfmt-conf.sh should use "-F" as short option for "--qemu-suffix". > Fix the getopt call to make this work. > > Signed-off-by: Martin Wilck <mwilck@suse.com> > --- > previous: https://lists.gnu.org/archive/html/qemu-devel/2021-09/msg03132.html Sorry for the delay, didn't see the email. To put "linux-user" in the email subject helps to pass through all my email filters... > ref: https://bugzilla.opensuse.org/show_bug.cgi?id=1186256 I think you don't need the suffix anymore with the new "--preserve-argv0" parameter. See 6e1c0d7b951e ("linux-user: manage binfmt-misc preserve-arg[0] flag") but you need v5.12 kernel. 2347961b11d4 ("binfmt_misc: pass binfmt_misc flags to the interpreter") Moreover it seems it will be possible (soon?) to use a binfmt_misc configuration per container; [1/2] binfmt_misc: cleanup on filesystem umount https://lore.kernel.org/lkml/20211105043000.GA25244@mail.hallyn.com/T/#m4a99a73c4e2c261a800dc6765fcbea8087635cfc [2/2/] binfmt_misc: enable sandboxed mounts https://lore.kernel.org/lkml/20211105043000.GA25244@mail.hallyn.com/T/#m8d991c47721f34e37d8253cb54ddf7b56a048f3e > --- > scripts/qemu-binfmt-conf.sh | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh > index 7de996d536..e9bfeb94d3 100755 > --- a/scripts/qemu-binfmt-conf.sh > +++ b/scripts/qemu-binfmt-conf.sh > @@ -340,7 +340,9 @@ PERSISTENT=no > PRESERVE_ARG0=no > QEMU_SUFFIX="" > > -options=$(getopt -o ds:Q:S:e:hc:p:g: -l debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential:,persistent:,preserve-argv0: -- "$@") > +_longopts="debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential:,\ > +persistent:,preserve-argv0:" > +options=$(getopt -o ds:Q:S:e:hc:p:g:F: -l ${_longopts} -- "$@") > eval set -- "$options" > > while true ; do > Fixes: 7155be7cda5c ("qemu-binfmt-conf.sh: allow to provide a suffix to the interpreter name") Reviewed-by: Laurent Vivier <laurent@vivier.eu>
diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 7de996d536..e9bfeb94d3 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh @@ -340,7 +340,9 @@ PERSISTENT=no PRESERVE_ARG0=no QEMU_SUFFIX="" -options=$(getopt -o ds:Q:S:e:hc:p:g: -l debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential:,persistent:,preserve-argv0: -- "$@") +_longopts="debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential:,\ +persistent:,preserve-argv0:" +options=$(getopt -o ds:Q:S:e:hc:p:g:F: -l ${_longopts} -- "$@") eval set -- "$options" while true ; do