Accepting request 936343 from home:dfaggioli:devel:Virtualization
* Patches added (bsc#1186256): qemu-binfmt-conf.sh-allow-overriding-SUS.patch OBS-URL: https://build.opensuse.org/request/show/936343 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=678
This commit is contained in:
parent
79eea0c530
commit
737e8e003d
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2db7f326bed24b186a55a6537ed6c7d5d69702aa0e881b1db5bf62faa885279b
|
||||
size 53172
|
||||
oid sha256:fc61bc17591d6fcddcd9148979bd62fa3bce2d164bb22d342fba802949713b19
|
||||
size 57244
|
||||
|
65
qemu-binfmt-conf.sh-allow-overriding-SUS.patch
Normal file
65
qemu-binfmt-conf.sh-allow-overriding-SUS.patch
Normal file
@ -0,0 +1,65 @@
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
Date: Wed, 19 May 2021 17:24:45 +0200
|
||||
Subject: qemu-binfmt-conf.sh: allow overriding SUSE-specific argv[0] handling
|
||||
|
||||
Git-commit: 0000000000000000000000000000000000000000
|
||||
References: bsc#1186256
|
||||
|
||||
Since abbc0ce ("qemu-binfmt-conf: use qemu-ARCH-binfmt"),
|
||||
qemu-binfmt-conf.sh automatically replaces the default qemu binfmt wrapper
|
||||
qemu-$ARCH with qemu-$ARCH-binfmt in order to ensure that argv[0] is
|
||||
preserved; qemu-$ARCH-binfmt is a link to qemu-binfmt, which is just a
|
||||
simple wrapper that mangles argv to achieve the desired result.
|
||||
|
||||
This is inconvenient in some situations. In particular for running
|
||||
foreign-arch containers, it's useful to use the binfmt_misc "F" ("fix
|
||||
binary") flag to pre-load the qemu wrapper in the kernel. That way,
|
||||
foreign-arch containers can be run just like native containers, without
|
||||
having to bind-mount interpreters into the container. But that's impossible
|
||||
with the SUSE binfmt wrapper that needs to exec() a different (native)
|
||||
executable.
|
||||
|
||||
As the qemu-binfmt-conf script supports the --qemu-suffix option anyway,
|
||||
use it to set the "-binfmt" suffix, thus allowing admins to override the
|
||||
SUSE default with the option "--qemu-suffix ''".
|
||||
|
||||
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
||||
Acked-by: Jose R Ziviani <jose.ziviani@suse.com>
|
||||
Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
|
||||
---
|
||||
scripts/qemu-binfmt-conf.sh | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
|
||||
index a73232edfd7f9dedb3a7c32218fb..93e2c7c83fded06c598b8e844464 100755
|
||||
--- a/scripts/qemu-binfmt-conf.sh
|
||||
+++ b/scripts/qemu-binfmt-conf.sh
|
||||
@@ -185,6 +185,7 @@ Usage: qemu-binfmt-conf.sh [--qemu-path PATH][--debian][--systemd CPU]
|
||||
--help: display this usage
|
||||
--qemu-path: set path to qemu interpreter ($QEMU_PATH)
|
||||
--qemu-suffix: add a suffix to the default interpreter name
|
||||
+ (default: "-binfmt")
|
||||
--debian: don't write into /proc,
|
||||
instead generate update-binfmts templates
|
||||
--systemd: don't write into /proc,
|
||||
@@ -316,9 +317,9 @@ qemu_set_binfmts() {
|
||||
continue
|
||||
fi
|
||||
|
||||
- qemu="$QEMU_PATH/qemu-$cpu-binfmt"
|
||||
+ qemu="$QEMU_PATH/qemu-$cpu"
|
||||
if [ "$cpu" = "i486" ] ; then
|
||||
- qemu="$QEMU_PATH/qemu-i386-binfmt"
|
||||
+ qemu="$QEMU_PATH/qemu-i386"
|
||||
fi
|
||||
|
||||
qemu="$qemu$QEMU_SUFFIX"
|
||||
@@ -338,7 +339,7 @@ QEMU_PATH=/usr/bin
|
||||
CREDENTIAL=no
|
||||
PERSISTENT=no
|
||||
PRESERVE_ARG0=no
|
||||
-QEMU_SUFFIX=""
|
||||
+QEMU_SUFFIX="-binfmt"
|
||||
|
||||
options=$(getopt -o ds:Q:S:e:hc:p:g:F: -l debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential:,persistent:,preserve-argv0: -- "$@")
|
||||
eval set -- "$options"
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 7 18:17:14 UTC 2021 - Dario Faggioli <dfaggioli@suse.com>
|
||||
|
||||
* Patches added (bsc#1186256):
|
||||
qemu-binfmt-conf.sh-allow-overriding-SUS.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 6 14:22:18 UTC 2021 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
|
@ -196,6 +196,7 @@ Patch00060: virtio-mem-pci-Fix-memory-leak-when-crea.patch
|
||||
Patch00061: vhost-vsock-fix-migration-issue-when-seq.patch
|
||||
Patch00062: block-introduce-max_hw_iov-for-use-in-sc.patch
|
||||
Patch00063: uas-add-stream-number-sanity-checks.patch
|
||||
Patch00064: qemu-binfmt-conf.sh-allow-overriding-SUS.patch
|
||||
# Patches applied in roms/seabios/:
|
||||
Patch01000: seabios-use-python2-explicitly-as-needed.patch
|
||||
Patch01001: seabios-switch-to-python3-as-needed.patch
|
||||
@ -1148,6 +1149,7 @@ This package records qemu testsuite results and represents successful testing.
|
||||
%patch00061 -p1
|
||||
%patch00062 -p1
|
||||
%patch00063 -p1
|
||||
%patch00064 -p1
|
||||
%patch01000 -p1
|
||||
%patch01001 -p1
|
||||
%patch01002 -p1
|
||||
|
@ -56,10 +56,7 @@ index 1b1a5c70eded006acf3cd142b6e6..dade0da03147705ede0180dc3039 100644
|
||||
{
|
||||
VHostVSockCommon *vvc = VHOST_VSOCK_COMMON(vdev);
|
||||
+ VHostVSock *vsock = VHOST_VSOCK(vdev);
|
||||
|
||||
- virtio_add_feature(&requested_features, VIRTIO_VSOCK_F_SEQPACKET);
|
||||
- return vhost_get_features(&vvc->vhost_dev, feature_bits,
|
||||
- requested_features);
|
||||
+
|
||||
+ if (vsock->seqpacket != ON_OFF_AUTO_OFF) {
|
||||
+ virtio_add_feature(&requested_features, VIRTIO_VSOCK_F_SEQPACKET);
|
||||
+ }
|
||||
@ -71,7 +68,10 @@ index 1b1a5c70eded006acf3cd142b6e6..dade0da03147705ede0180dc3039 100644
|
||||
+ !virtio_has_feature(requested_features, VIRTIO_VSOCK_F_SEQPACKET)) {
|
||||
+ error_setg(errp, "vhost-vsock backend doesn't support seqpacket");
|
||||
+ }
|
||||
+
|
||||
|
||||
- virtio_add_feature(&requested_features, VIRTIO_VSOCK_F_SEQPACKET);
|
||||
- return vhost_get_features(&vvc->vhost_dev, feature_bits,
|
||||
- requested_features);
|
||||
+ return requested_features;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user