From c9cc8d5aadd79dc831d2363fd95e5365412ee13c Mon Sep 17 00:00:00 2001 From: qihao Date: Fri, 17 Mar 2023 11:20:15 +0800 Subject: [PATCH] Fix BlockThreshold Callback argument conversion once more cheery-pick from b5cd547bfd7e9dd566de672f76a17aa9229b7c52 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 (cherry picked from commit 7a318ceed146f1860101cd672b9944583a755a37) --- ...ld-Callback-argument-conversion-once.patch | 34 +++++++++++++++++++ libvirt-python.spec | 6 +++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 Fix-BlockThreshold-Callback-argument-conversion-once.patch diff --git a/Fix-BlockThreshold-Callback-argument-conversion-once.patch b/Fix-BlockThreshold-Callback-argument-conversion-once.patch new file mode 100644 index 0000000..dc5acab --- /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 6c66a4f..82d351f 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 -- Gitee