[packages/VirtualBox] - up to 7.0.24 - disable python support
baggins
baggins at pld-linux.org
Sat Mar 22 03:54:08 CET 2025
commit 3e5415204c9b90ae8f5748c83194eba4bd1388ed
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat Mar 22 03:09:25 2025 +0100
- up to 7.0.24
- disable python support
VirtualBox relies on deprecated API that has been removed in python 3.12
VirtualBox.spec | 10 ++++++----
python3.patch | 45 +++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 49 insertions(+), 6 deletions(-)
---
diff --git a/VirtualBox.spec b/VirtualBox.spec
index 2e41632..f4f0bbb 100644
--- a/VirtualBox.spec
+++ b/VirtualBox.spec
@@ -48,19 +48,19 @@ exit 1
%define qtver 5.6.0
-%define rel 2
+%define rel 1
%define pname VirtualBox
Summary: VirtualBox - x86 hardware virtualizer
Summary(pl.UTF-8): VirtualBox - wirtualizator sprzętu x86
Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
-Version: 7.0.20
+Version: 7.0.24
Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
License: GPL v3
Group: Applications/Emulators
Source0: https://download.virtualbox.org/virtualbox/%{version}/%{pname}-%{version}.tar.bz2
-# Source0-md5: ffbcd4bfa09e12b1fd6686c3a10acd0f
+# Source0-md5: b589c3d999f0ff1ddb1cd03c59f766aa
Source1: https://download.virtualbox.org/virtualbox/%{version}/VBoxGuestAdditions_%{version}.iso
-# Source1-md5: 46ed708d7994dc36bb99159542e4444e
+# Source1-md5: 2681c7d1be1dc145983f24c4bca96fa8
Source2: vboxservice.init
Source3: vboxservice.service
Source4: vboxservice.sysconfig
@@ -639,6 +639,7 @@ VBOX_ONLY_ADDITIONS=1
%endif
EOF
+#VBOX_WITH_PYTHON=0
%undefine filterout_c
%undefine filterout_cxx
@@ -649,6 +650,7 @@ EOF
--with-g++="%{__cxx}" \
%{!?with_doc:--disable-docs} \
--disable-java \
+ --disable-python \
--disable-hardening \
--disable-kmods \
--enable-vnc \
diff --git a/python3.patch b/python3.patch
index cd0efa5..32b967f 100644
--- a/python3.patch
+++ b/python3.patch
@@ -5,7 +5,7 @@
EOF
found=
- SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m python3.8 python3.9 python3.10 python3.11 python3.12"
-+ SUPPYTHONLIBS="python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m python3.8 python3.9 python3.10 python3.11 python3.12"
++ SUPPYTHONLIBS="python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m python3.8 python3.9 python3.10 python3.11 python3.12 python3.13"
for p in $PYTHONDIR; do
for d in $SUPPYTHONLIBS; do
for b in lib/x86_64-linux-gnu lib/i386-linux-gnu lib64 lib/64 lib; do
@@ -22,7 +22,7 @@
from distutils.version import StrictVersion
-versions = ["2.6", "2.7", "3.1", "3.2", "3.2m", "3.3", "3.3m", "3.4", "3.4m", "3.5", "3.5m", "3.6", "3.6m", "3.7", "3.7m", "3.8", "3.9", "3.10", "3.11", "3.12" ]
-+versions = ["3.1", "3.2", "3.2m", "3.3", "3.3m", "3.4", "3.4m", "3.5", "3.5m", "3.6", "3.6m", "3.7", "3.7m", "3.8", "3.9", "3.10", "3.11", "3.12" ]
++versions = ["3.1", "3.2", "3.2m", "3.3", "3.3m", "3.4", "3.4m", "3.5", "3.5m", "3.6", "3.6m", "3.7", "3.7m", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
prefixes = ["/usr", "/usr/local", "/opt", "/opt/local"]
known = {}
@@ -37,3 +37,44 @@
# Build the Validation Kit.
VBOX_WITH_VALIDATIONKIT = 1
# Include unit tests (testcases) on the Validation Kit .ISO
+--- VirtualBox-7.0.24/src/libs/xpcom18a4/python/src/PyGBase.cpp~ 2025-01-21 15:11:16.000000000 +0100
++++ VirtualBox-7.0.24/src/libs/xpcom18a4/python/src/PyGBase.cpp 2025-03-22 00:49:21.276649368 +0100
+@@ -224,7 +224,7 @@
+ if (obIID==NULL) goto done;
+ args = Py_BuildValue("OOzi", ob, obIID, NULL, 0);
+ if (args==NULL) goto done;
+- wrap_ret = PyEval_CallObject(func, args);
++ wrap_ret = PyObject_CallObject(func, args);
+ if (wrap_ret==NULL) goto done;
+ ok = Py_nsISupports::InterfaceFromPyObject(wrap_ret, iid, ppret, PR_FALSE, PR_FALSE);
+ #ifdef DEBUG
+@@ -572,7 +572,7 @@
+ goto done;
+ }
+ // Make the call
+- *ppResult = PyEval_CallObject(method, args);
++ *ppResult = PyObject_CallObject(method, args);
+ ret = *ppResult ? NS_OK : NS_ERROR_FAILURE;
+ done:
+ Py_XDECREF(method);
+--- VirtualBox-7.0.24/src/libs/xpcom18a4/python/src/PyGInputStream.cpp~ 2025-01-21 15:11:16.000000000 +0100
++++ VirtualBox-7.0.24/src/libs/xpcom18a4/python/src/PyGInputStream.cpp 2025-03-22 00:54:42.396649345 +0100
+@@ -103,15 +103,15 @@
+ const char *methodName = "read";
+ nsresult nr = InvokeNativeViaPolicy(methodName, &ret, "i", count);
+ if (NS_SUCCEEDED(nr)) {
+-#if 0 /* VBox: new buffer protocol (though I could use it for Py_LIMITED_API and ditch the warning, but cpython specific) */
++#if 1 /* VBox: new buffer protocol (though I could use it for Py_LIMITED_API and ditch the warning, but cpython specific) */
+ Py_buffer py_view;
+ if (PyObject_GetBuffer(ret, &py_view, PyBUF_SIMPLE) == 0) {
+ if (py_view.len <= count) {
+ count = py_view.len;
+ } else {
+- PyXPCOM_LogWarning("nsIInputStream::read() was asked for %d bytes, but the string returned is %d bytes - truncating!\n", count, py_size);
++ PyXPCOM_LogWarning("nsIInputStream::read() was asked for %d bytes, but the string returned is %d bytes - truncating!\n", count, py_view.len);
+ }
+- memcpy(buf, py_view.py_buf, count);
++ memcpy(buf, py_view.buf, count);
+ PyBuffer_Release(&py_view);
+ *_retval = count;
+ } else {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/VirtualBox.git/commitdiff/3e5415204c9b90ae8f5748c83194eba4bd1388ed
More information about the pld-cvs-commit
mailing list