diff --git a/Fix-BlockThreshold-Callback-argument-conversion-once.patch b/Fix-BlockThreshold-Callback-argument-conversion-once.patch new file mode 100644 index 0000000000000000000000000000000000000000..dc5acab50268c80175264c4a8edd6dbb3db69048 --- /dev/null +++ b/Fix-BlockThreshold-Callback-argument-conversion-once.patch @@ -0,0 +1,34 @@ +From 387b95910caf87f8a7bb7d92b5258fc2ef46453d Mon Sep 17 00:00:00 2001 +From: qihao +Date: Fri, 17 Mar 2023 11:14:32 +0800 +Subject: [PATCH] Fix BlockThreshold Callback argument conversion once more + +The conversion was changed from "OssiiO" to "OssLLO". Unfortunately the +arguments are unsigned long long, where the proper coversion character +is 'K'. + +Fixes: https://gitlab.com/libvirt/libvirt-python/-/merge_requests/40 +Fixes: fd069ac85c8cf1593587dc9287a3d5eb6bd4bdb9 +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1976109 +Signed-off-by: Peter Krempa +Signed-off-by: qihao +--- + libvirt-override.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libvirt-override.c b/libvirt-override.c +index 2b39ace..48dfe4e 100644 +--- a/libvirt-override.c ++++ b/libvirt-override.c +@@ -7231,7 +7231,7 @@ libvirt_virConnectDomainEventBlockThresholdCallback(virConnectPtr conn ATTRIBUTE + /* Call the Callback Dispatcher */ + pyobj_ret = PyObject_CallMethod(pyobj_conn, + (char*)"_dispatchDomainEventBlockThresholdCallback", +- (char*)"OssiiO", ++ (char*)"OssKKO", + pyobj_dom, dev, path, threshold, excess, + pyobj_cbData); + +-- +2.18.2 + diff --git a/libvirt-python.spec b/libvirt-python.spec index 6c66a4f2c7f9bb6586f3eabb2c1ce59876a7de2f..82d351fe7d5aaa4687a479bf720a0aa57bfe34a8 100644 --- a/libvirt-python.spec +++ b/libvirt-python.spec @@ -3,7 +3,7 @@ Summary: The libvirt virtualization API python3 binding Name: libvirt-python Version: 6.2.0 -Release: 5 +Release: 6 Source0: http://libvirt.org/sources/python/%{name}-%{version}.tar.gz Patch0000: setup-use-pytest-instead-of-nose-to-run-the-test-sui.patch Patch0001: spec-use-pytest-instead-of-nose.patch @@ -14,6 +14,7 @@ Patch0005: Replace-deprecated-PyEval_CallObject-with-PyObject_C.patch Patch0006: Avoid-truncating-python-version-number-when-running-.patch Patch0007: Fix-the-invalid-operation-between-incompatible-types.patch Patch0008: Fix-string-formatting.patch +Patch0009: Fix-BlockThreshold-Callback-argument-conversion-once.patch Url: http://libvirt.org License: LGPLv2+ BuildRequires: libvirt-devel == %{version} @@ -78,6 +79,9 @@ find examples -type f -exec chmod 0644 \{\} \; %{python3_sitearch}/*egg-info %changelog +* Fri Apr 14 2023 Qi Hao - 6.2.0-6 +- libvirt-override.c: Fix BlockThreshold Callback argument conversion + * Tue Nov 29 2022 Qi Hao - 6.2.0-5 - generator: Fix string formatting