From 26a839baae4e1d7e0357af48c69bc2567b05fe06136ac47f5dbb0794492fee9a Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 24 Feb 2025 11:52:47 +0100 Subject: [PATCH] Update findings for newer-pythons.patch --- newer-pythons.patch | 43 +++++++++++++++++++++++++++++++++++++++++++ virtualbox.changes | 5 +++++ virtualbox.spec | 1 + 3 files changed, 49 insertions(+) create mode 100644 newer-pythons.patch diff --git a/newer-pythons.patch b/newer-pythons.patch new file mode 100644 index 0000000..baf5493 --- /dev/null +++ b/newer-pythons.patch @@ -0,0 +1,43 @@ +From: Jan Engelhardt +Date: 2025-02-19 11:09:20.509506861 +0100 + +Inspired by + +https://github.com/rpmfusion/VirtualBox/blob/master/VirtualBox-7.1.4-python-3.13.patch +http://launchpadlibrarian.net/769589116/virtualbox_7.0.20-dfsg-1.1_7.0.20-dfsg-1.1ubuntu1.diff.gz + +we whitelist all pythons. + +In practice however, it seems to be fruitless. + +``` +[ 1103s] + python3[3.13] vboxapisetup.py install --prefix=/usr --root=/home/abuild/rpmbuild/BUILD/virtualbox-7.1.4-build/BUILDROOT +[ 1103s] Traceback (most recent call last): +[ 1103s] File "/home/abuild/rpmbuild/BUILD/virtualbox-7.1.4-build/VirtualBox-7.1.4/out/linux.amd64/release/bin/sdk/installer/python/vboxapisetup.py", line 40, in +[ 1103s] import setup +[ 1103s] File "/home/abuild/rpmbuild/BUILD/virtualbox-7.1.4-build/VirtualBox-7.1.4/out/linux.amd64/release/bin/sdk/installer/python/vboxapi/setup.py", line 193, in +[ 1103s] class VBoxSetupInstallClass(install): +[ 1103s] ^^^^^^^ +[ 1103s] NameError: name 'install' is not defined +``` + +--- + configure | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +Index: VirtualBox-7.1.4/configure +=================================================================== +--- VirtualBox-7.1.4.orig/configure ++++ VirtualBox-7.1.4/configure +@@ -2187,7 +2187,10 @@ extern "C" int main(void) + } + 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="" ++ for i in /usr/bin/python[23]*; do ++ SUPPYTHONLIBS="$SUPPYTHONLIBS ${i##*/}" ++ done + 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 diff --git a/virtualbox.changes b/virtualbox.changes index 8b48e04..e7394f8 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 19 10:11:07 UTC 2025 - Jan Engelhardt + +- Add newer-pythons.patch + ------------------------------------------------------------------- Tue Jan 21 11:17:17 UTC 2025 - Jiri Slaby diff --git a/virtualbox.spec b/virtualbox.spec index 0375642..0a9b177 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -118,6 +118,7 @@ Patch10: fix_for_leap15.5.patch Patch11: cxx17.patch Patch12: host-source.patch Patch13: kernel-6-13.patch +Patch14: newer-pythons.patch # # Common BuildRequires for both virtualbox and virtualbox-kmp BuildRequires: %{kernel_module_package_buildreqs}