Entering freeze for libvirt-9.3.0
by Jiri Denemark
I have just tagged v9.3.0-rc1 in the repository and pushed signed
tarballs and source RPMs to https://libvirt.org/sources/
Please give the release candidate some testing and in case you find a
serious issue which should have a fix in the upcoming release, feel
free to reply to this thread to make sure the issue is more visible.
If you have not done so yet, please update NEWS.rst to document any
significant change you made since the last release.
Thanks,
Jirka
1 year, 6 months
[libvirt PATCH] meson: Check usability of linux/kvm.h
by Andrea Bolognani
This fixes cross-building in some scenarios.
Specifically, when building for armv7l on x86_64, has_header()
will see the x86_64 version of the header and consider it usable.
Later, when an attempt is made to actually use it, the compiler
will quickly realize that things can't quite work.
The reason why we haven't hit this in our CI is that we only ever
install the foreign version of header files. When building the
Debian package, however, some of the Debian-specific tooling will
bring in the native version of the Linux headers in addition to
the foreign one, causing Meson to misreport the header's
availability status.
Checking for its actual usability, as opposed to mere presence,
is enough to make things work correctly in all cases.
https://bugs.debian.org/1024504
Suggested-by: Helmut Grohne <helmut(a)subdivi.de>
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
meson.build | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index d35d5e076b..21a4bd5b37 100644
--- a/meson.build
+++ b/meson.build
@@ -614,7 +614,6 @@ headers = [
'asm/hwcap.h',
'ifaddrs.h',
'libtasn1.h',
- 'linux/kvm.h',
'mntent.h',
'net/ethernet.h',
'net/if.h',
@@ -635,12 +634,24 @@ if host_machine.system() == 'freebsd'
headers += 'libutil.h'
endif
+# headers for which we need to check actual usability. in most
+# cases, checking for presence is enough (and it's way faster)
+check_headers = [
+ 'linux/kvm.h',
+]
+
foreach name : headers
if cc.has_header(name)
conf.set('WITH_@0@'.format(name.underscorify().to_upper()), 1)
endif
endforeach
+foreach name : check_headers
+ if cc.check_header(name)
+ conf.set('WITH_@0@'.format(name.underscorify().to_upper()), 1)
+ endif
+endforeach
+
# check for kernel header required by src/util/virnetdevbridge.c
if host_machine.system() == 'linux'
if not cc.has_header('linux/sockios.h')
--
2.40.0
1 year, 6 months
[PATCH] ci: Regenerate files
by Michal Privoznik
This removes minor version number from OpenSUSE LEAP target names
and on CentOS Stream 9 installs flake8 from repositories, instead
of pip.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
ci/buildenv/centos-stream-9.sh | 5 +----
.../{opensuse-leap-154.sh => opensuse-leap-15.sh} | 0
ci/containers/centos-stream-9.Dockerfile | 6 +-----
...leap-154.Dockerfile => opensuse-leap-15.Dockerfile} | 0
ci/gitlab/builds.yml | 10 +++++-----
ci/gitlab/containers.yml | 4 ++--
ci/manifest.yml | 2 +-
7 files changed, 10 insertions(+), 17 deletions(-)
rename ci/buildenv/{opensuse-leap-154.sh => opensuse-leap-15.sh} (100%)
rename ci/containers/{opensuse-leap-154.Dockerfile => opensuse-leap-15.Dockerfile} (100%)
diff --git a/ci/buildenv/centos-stream-9.sh b/ci/buildenv/centos-stream-9.sh
index 79d74d9b2b..454e1f6322 100644
--- a/ci/buildenv/centos-stream-9.sh
+++ b/ci/buildenv/centos-stream-9.sh
@@ -68,9 +68,7 @@ function install_buildenv() {
polkit \
python3 \
python3-docutils \
- python3-pip \
- python3-setuptools \
- python3-wheel \
+ python3-flake8 \
qemu-img \
readline-devel \
rpcgen \
@@ -88,7 +86,6 @@ function install_buildenv() {
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
- /usr/bin/pip3 install flake8
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
diff --git a/ci/buildenv/opensuse-leap-154.sh b/ci/buildenv/opensuse-leap-15.sh
similarity index 100%
rename from ci/buildenv/opensuse-leap-154.sh
rename to ci/buildenv/opensuse-leap-15.sh
diff --git a/ci/containers/centos-stream-9.Dockerfile b/ci/containers/centos-stream-9.Dockerfile
index 6478031379..47e9008b72 100644
--- a/ci/containers/centos-stream-9.Dockerfile
+++ b/ci/containers/centos-stream-9.Dockerfile
@@ -69,9 +69,7 @@ RUN dnf distro-sync -y && \
polkit \
python3 \
python3-docutils \
- python3-pip \
- python3-setuptools \
- python3-wheel \
+ python3-flake8 \
qemu-img \
readline-devel \
rpcgen \
@@ -92,8 +90,6 @@ RUN dnf distro-sync -y && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
-RUN /usr/bin/pip3 install flake8
-
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
diff --git a/ci/containers/opensuse-leap-154.Dockerfile b/ci/containers/opensuse-leap-15.Dockerfile
similarity index 100%
rename from ci/containers/opensuse-leap-154.Dockerfile
rename to ci/containers/opensuse-leap-15.Dockerfile
diff --git a/ci/gitlab/builds.yml b/ci/gitlab/builds.yml
index 545478d351..258d7a1da7 100644
--- a/ci/gitlab/builds.yml
+++ b/ci/gitlab/builds.yml
@@ -285,23 +285,23 @@ x86_64-fedora-rawhide-clang-local-env:
RPM: skip
-x86_64-opensuse-leap-154-prebuilt-env:
+x86_64-opensuse-leap-15-prebuilt-env:
extends: .native_build_job_prebuilt_env
needs:
- - job: x86_64-opensuse-leap-154-container
+ - job: x86_64-opensuse-leap-15-container
optional: true
allow_failure: false
variables:
- NAME: opensuse-leap-154
+ NAME: opensuse-leap-15
RPM: skip
-x86_64-opensuse-leap-154-local-env:
+x86_64-opensuse-leap-15-local-env:
extends: .native_build_job_local_env
needs: []
allow_failure: false
variables:
IMAGE: registry.opensuse.org/opensuse/leap:15.4
- NAME: opensuse-leap-154
+ NAME: opensuse-leap-15
RPM: skip
diff --git a/ci/gitlab/containers.yml b/ci/gitlab/containers.yml
index 150df26519..5a02843ed9 100644
--- a/ci/gitlab/containers.yml
+++ b/ci/gitlab/containers.yml
@@ -77,11 +77,11 @@ x86_64-fedora-rawhide-container:
NAME: fedora-rawhide
-x86_64-opensuse-leap-154-container:
+x86_64-opensuse-leap-15-container:
extends: .container_job
allow_failure: false
variables:
- NAME: opensuse-leap-154
+ NAME: opensuse-leap-15
x86_64-opensuse-tumbleweed-container:
diff --git a/ci/manifest.yml b/ci/manifest.yml
index b68c7361ab..82b8463605 100644
--- a/ci/manifest.yml
+++ b/ci/manifest.yml
@@ -160,7 +160,7 @@ targets:
freebsd-13: x86_64
- opensuse-leap-154:
+ opensuse-leap-15:
jobs:
- arch: x86_64
variables:
--
2.39.2
1 year, 6 months
[libvirt PATCH 0/2] docs: Link to java.libvirt.org
by Andrea Bolognani
That's the new canonical location for information on
libvirt-java.
A server-side redirect will have to be created in order
to keep existing external links working.
Andrea Bolognani (2):
docs: Link to java.libvirt.org
docs: Drop java.rst
docs/bindings.rst | 3 +-
docs/docs.rst | 2 +-
docs/java.rst | 127 ----------------------------------------------
docs/meson.build | 1 -
4 files changed, 3 insertions(+), 130 deletions(-)
delete mode 100644 docs/java.rst
--
2.40.0
1 year, 6 months
[PATCH 0/2] tools: virsh-domain: display progress with enhanced granularity
by Shaleen Bathla
While working with active blockcommit using virsh/libvirt, we found that in case of heavy IO, the progress may stay stuck at 99% for quite a while.
It will be much better if we show progress upto 2 decimal places more precise which should be sufficient for most scenarios for now.
This will give a user, a better understanding of the progress of blockjob/blockcommit etc
This patch intends to do exactly that by adding more granularity to blockjob/blockcommit etc progress.
Shaleen Bathla (2):
tools: virsh-domain: refactor variable initialization
tools: virsh-domain: display progress with enhanced granularity
tools/virsh-domain.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
--
2.31.1
1 year, 6 months
[libvirt PATCH] run: add ability to set selinux context
by Jonathon Jongsma
When running libvirt from the build directory with the 'run' script, it
will run as unconfined_t. This can result in unexpected behavior when
selinux is enforcing due to the fact that the selinux policies are
written assuming that libvirt is running with the
system_u:system_r:virtd_t context. This patch adds a new --selinux
option to the run script. When this option is specified, it will launch
the specified binary using the 'runcon' utility to set its selinux
context to the one mentioned above. Since this requires root privileges,
setting the selinux context is not the default behavior and must be
enabled with the command line switch.
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
run.in | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 50 insertions(+), 6 deletions(-)
diff --git a/run.in b/run.in
index c6d3411082..4aa458b791 100644
--- a/run.in
+++ b/run.in
@@ -40,6 +40,7 @@
#
# ----------------------------------------------------------------------
+import argparse
import os
import os.path
import random
@@ -59,15 +60,20 @@ def prepend(env, varname, extradir):
here = "@abs_builddir@"
-if len(sys.argv) < 2:
- print("syntax: %s BINARY [ARGS...]" % sys.argv[0], file=sys.stderr)
+parser = argparse.ArgumentParser(add_help=False)
+parser.add_argument('--selinux',
+ action='store_true',
+ help='Run in the appropriate selinux context')
+
+opts, args = parser.parse_known_args()
+
+if len(args) < 1:
+ print("syntax: %s [--selinux] BINARY [ARGS...]" % sys.argv[0], file=sys.stderr)
sys.exit(1)
-prog = sys.argv[1]
-args = sys.argv[1:]
+prog = args[0]
env = os.environ
-
prepend(env, "LD_LIBRARY_PATH", os.path.join(here, "src"))
prepend(env, "PKG_CONFIG_PATH", os.path.join(here, "src"))
prepend(env, "PATH", os.path.join(here, "tools"))
@@ -130,10 +136,20 @@ def change_unit(name, action):
return ret == 0
+def chcon(path, type):
+ ret = subprocess.call(["chcon", "-t", type, path])
+ return ret == 0
+
+
+def restorecon(path):
+ ret = subprocess.call(["restorecon", path])
+ return ret == 0
+
+
try_stop_units = []
if is_systemd_host():
maybe_stopped_units = []
- for arg in sys.argv:
+ for arg in args:
name = os.path.basename(arg)
if is_modular_daemon(name):
# Only need to stop libvirtd or this specific modular unit
@@ -149,6 +165,31 @@ if is_systemd_host():
if is_unit_active(unit):
try_stop_units.append(unit)
+if opts.selinux:
+ # if using a wrapper command like 'gdb', setting the selinux context
+ # won't work because the wrapper command will not be a valid entrypoint
+ # for the virtd_t context
+ if os.path.basename(prog) not in ["libvirtd", *modular_daemons]:
+ sys.exit("'{}' is not recognized as a valid libvirt daemon. Selinux "
+ "process context can only be set when using executing a "
+ "libvirt daemon directly without wrapper commands".format(prog))
+
+ progpath = os.path.abspath(prog)
+ if not progpath.startswith(os.path.abspath(here)):
+ sys.exit("Refusing to change selinux context of file outside build "
+ "directory: {}".format(prog))
+
+ # selinux won't allow us to transition to the virtd_t context from e.g. the
+ # user_home_t context (the likely label of the local executable file)
+ print("Setting file context of {} to virtd_exec_t...".format(progpath))
+ if not chcon(progpath, "virtd_exec_t"):
+ sys.exit("Failed to change selinux context of binary")
+
+ args = ['runcon',
+ '-u', 'system_u',
+ '-r', 'system_r',
+ '-t', 'virtd_t', *args]
+
if len(try_stop_units) == 0:
# Run the program directly, replacing ourselves
os.execvpe(prog, args, env)
@@ -178,6 +219,9 @@ else:
except Exception as e:
print("%s" % e, file=sys.stderr)
finally:
+ if opts.selinux:
+ print("Restoring selinux context...")
+ restorecon(prog)
print("Re-starting original systemd units...")
stopped_units.reverse()
for unit in stopped_units:
--
2.39.2
1 year, 7 months
Re: [PATCH v3 10/10] hmp: Deprecate 'singlestep' member of StatusInfo
by Peter Maydell
On Tue, 25 Apr 2023 at 13:10, Markus Armbruster <armbru(a)redhat.com> wrote:
>
> Peter Maydell <peter.maydell(a)linaro.org> writes:
>
> > -# Notes: @singlestep is enabled through the GDB stub
> > +# Notes: @singlestep is enabled on the command line with
> > +# '-accel tcg,one-insn-per-tb=on', or with the HMP
> > +# 'one-insn-per-tb' command.
>
> You're deleting "enabled through the GDB stub". Is this one of the
> misstatements you alluded to in the commit message
Yes -- this field has never been anything to do with
GDB-enabled singlestep (or for that matter with
emulation of any guest-CPU architecture singlestep
functionality). I assume that whoever originally wrote
that text was confused by the terrible name of the
command line option/global variable.
-- PMM
1 year, 7 months
[PATCH] docs: Fix missing backtick in formatdomain.rst
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Pushed as trivial
docs/formatdomain.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 8420f5f99c3a..3b9251547e84 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -1209,7 +1209,7 @@ NUMA Node Tuning
memory nodes, and it requires setting mode to 'restrictive' in ``memnode``
elements (see quirk below). This exists solely for the purpose of being able
to request movement of such memory for a running domain using ``virsh
- numatune`` or ``virDomainSetNumaParameters` and is not guaranteed to happen.
+ numatune`` or ``virDomainSetNumaParameters`` and is not guaranteed to happen.
Attribute ``nodeset`` specifies the NUMA nodes, using the same
syntax as attribute ``cpuset`` of element ``vcpu``. Attribute ``placement`` (
:since:`since 0.9.12` ) can be used to indicate the memory placement mode for
--
2.40.0
1 year, 7 months
[PATCH v2 0/9] qemu: Move <hostdev> preparation into qemuDomainPrepareHostdev()
by Michal Privoznik
v2 of:
https://listman.redhat.com/archives/libvir-list/2023-April/239378.html
diff to v1:
- More patches
- Dropped qemuHostdevPreparePCIDevicesCheckSupport() completely
- Dropped virQEMUCaps passing (patch 9/9)
- Dropped even more checks effectively dead code
Michal Prívozník (9):
qemuDomainAttachHostDevice: Prepare device early and for all types
qemu_domain: Move internals of qemuDomainPrepareHostdev() into a
separate function
qemu: Move <hostdev/> PCI backend setting into
qemuDomainPrepareHostdev()
qemuxml2argvtest: Drop needless PCI backend setting
qemu: Deny all but VFIO PCI backends in hostdev prepare phase
qemu_hotplug: Drop PCI backend check in
qemuDomainAttachHostPCIDevice()
qemu: Move <hostdev> SCSI path generation into
qemuDomainPrepareHostdev()
qemu: Remove empty functions
qemu: Stop virQEMUCaps propagation into qemuHostdevPreparePCIDevices()
src/qemu/qemu_domain.c | 167 ++++++++++++++++++++++++++++-----------
src/qemu/qemu_driver.c | 56 -------------
src/qemu/qemu_hostdev.c | 67 +---------------
src/qemu/qemu_hostdev.h | 2 -
src/qemu/qemu_hotplug.c | 43 ++--------
src/qemu/qemu_process.c | 60 +-------------
src/qemu/qemu_process.h | 3 -
tests/qemuxml2argvmock.c | 10 +++
tests/qemuxml2argvtest.c | 28 -------
9 files changed, 142 insertions(+), 294 deletions(-)
--
2.39.2
1 year, 7 months