2020-08-29 21:52:49 +02:00
Index: VirtualBox-6.1.13/src/bldprogs/scm.cpp
2018-06-19 19:53:58 +02:00
===================================================================
2020-08-29 21:52:49 +02:00
--- VirtualBox-6.1.13.orig/src/bldprogs/scm.cpp
+++ VirtualBox-6.1.13/src/bldprogs/scm.cpp
2019-01-28 21:37:13 +01:00
@@ -2206,7 +2206,7 @@ static int scmProcessFileInner(PSCMRWSTA
2018-06-19 19:53:58 +02:00
pszTreatAs = "shell";
else if ( (cchFirst >= 15 && strncmp(pchFirst, "/usr/bin/python", 15) == 0)
|| (cchFirst >= 19 && strncmp(pchFirst, "/usr/bin/env python", 19) == 0) )
- pszTreatAs = "python";
+ pszTreatAs = "python3";
else if ( (cchFirst >= 13 && strncmp(pchFirst, "/usr/bin/perl", 13) == 0)
|| (cchFirst >= 17 && strncmp(pchFirst, "/usr/bin/env perl", 17) == 0) )
pszTreatAs = "perl";
2020-08-29 21:52:49 +02:00
Index: VirtualBox-6.1.13/src/libs/libxml2-2.9.4/configure
2018-06-19 19:53:58 +02:00
===================================================================
2020-08-29 21:52:49 +02:00
--- VirtualBox-6.1.13.orig/src/libs/libxml2-2.9.4/configure
+++ VirtualBox-6.1.13/src/libs/libxml2-2.9.4/configure
2018-06-19 19:53:58 +02:00
@@ -15153,10 +15153,10 @@ PYTHON_SITE_PACKAGES=
PYTHON_TESTS=
pythondir=
if test "$with_python" != "no" ; then
- if test -x "$with_python/bin/python"
+ if test -x "$with_python/bin/python3"
then
- echo Found python in $with_python/bin/python
- PYTHON="$with_python/bin/python"
+ echo Found python in $with_python/bin/python3
+ PYTHON="$with_python/bin/python3"
else
if test -x "$with_python/python.exe"
then
@@ -15174,7 +15174,8 @@ if test "$with_python" != "no" ; then
with_python=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
else
# Extract the first word of "python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5", so it can be a program name with args.
-set dummy python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5; ac_word=$2
+PYTHON=python3
+set dummy python3 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PYTHON+:} false; then :
2020-08-29 21:52:49 +02:00
Index: VirtualBox-6.1.13/src/VBox/ValidationKit/testboxscript/setup.sh
2018-06-19 19:53:58 +02:00
===================================================================
2020-08-29 21:52:49 +02:00
--- VirtualBox-6.1.13.orig/src/VBox/ValidationKit/testboxscript/setup.sh
+++ VirtualBox-6.1.13/src/VBox/ValidationKit/testboxscript/setup.sh
@@ -659,7 +659,7 @@ import sys;\
2018-06-19 19:53:58 +02:00
x = sys.version_info[0] == 2 and (sys.version_info[1] >= 6 or (sys.version_info[1] == 5 and sys.version_info[2] >= 1));\
sys.exit(not x);\
";
- for python in python2.7 python2.6 python2.5 python;
+ for python in python3.6 python2.7 python2.6 python2.5 python;
do
python=`which ${python} 2> /dev/null`
if [ -n "${python}" -a -x "${python}" ]; then
2020-08-29 21:52:49 +02:00
Index: VirtualBox-6.1.13/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
2018-06-19 19:53:58 +02:00
===================================================================
2020-08-29 21:52:49 +02:00
--- VirtualBox-6.1.13.orig/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
+++ VirtualBox-6.1.13/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
@@ -21,7 +21,7 @@
%define %CHM% 1
2018-06-19 19:53:58 +02:00
%define VBOXDOCDIR %{_defaultdocdir}/%NAME%
%global __requires_exclude_from ^/usr/lib/virtualbox/VBoxPython.*$
2019-10-22 03:29:29 +02:00
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python_sitelib: %define python_sitelib python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
2018-06-19 19:53:58 +02:00
Summary: Oracle VM VirtualBox
Name: %NAME%
2020-08-29 21:52:49 +02:00
@@ -101,7 +101,7 @@ install -m 755 -d $RPM_BUILD_ROOT/usr/sh
2018-06-19 19:53:58 +02:00
%if %{?with_python:1}%{!?with_python:0}
(export VBOX_INSTALL_PATH=/usr/lib/virtualbox && \
cd ./sdk/installer && \
2019-09-07 21:41:40 +02:00
- %{vbox_python} ./vboxapisetup.py install --prefix %{_prefix} --root $RPM_BUILD_ROOT)
2018-06-19 19:53:58 +02:00
+ %{python3} ./vboxapisetup.py install --prefix %{_prefix} --root $RPM_BUILD_ROOT)
%endif
rm -rf sdk/installer
mv nls $RPM_BUILD_ROOT/usr/share/virtualbox
2020-08-29 21:52:49 +02:00
Index: VirtualBox-6.1.13/src/libs/libxml2-2.9.4/libxml.spec.in
2018-06-19 19:53:58 +02:00
===================================================================
2020-08-29 21:52:49 +02:00
--- VirtualBox-6.1.13.orig/src/libs/libxml2-2.9.4/libxml.spec.in
+++ VirtualBox-6.1.13/src/libs/libxml2-2.9.4/libxml.spec.in
2018-06-19 19:53:58 +02:00
@@ -101,11 +101,11 @@ rm -fr %{buildroot}
make install DESTDIR=%{buildroot}
-%if 0%{?with_python3}
+%if 0%{?with_python}
make clean
-%configure --with-python=%{__python3}
+%configure --with-python=python3
make install DESTDIR=%{buildroot}
-%endif # with_python3
+%endif # with_python
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
2020-08-29 21:52:49 +02:00
Index: VirtualBox-6.1.13/src/libs/libxml2-2.9.4/libxml2.spec
2018-06-19 19:53:58 +02:00
===================================================================
2020-08-29 21:52:49 +02:00
--- VirtualBox-6.1.13.orig/src/libs/libxml2-2.9.4/libxml2.spec
+++ VirtualBox-6.1.13/src/libs/libxml2-2.9.4/libxml2.spec
2018-06-19 19:53:58 +02:00
@@ -103,7 +103,7 @@ make install DESTDIR=%{buildroot}
%if 0%{?with_python3}
make clean
-%configure --with-python=%{__python3}
+%configure --with-python=python3
make install DESTDIR=%{buildroot}
%endif # with_python3
2020-08-29 21:52:49 +02:00
Index: VirtualBox-6.1.13/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
2018-11-03 05:10:03 +01:00
===================================================================
2020-08-29 21:52:49 +02:00
--- VirtualBox-6.1.13.orig/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
+++ VirtualBox-6.1.13/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
2019-01-28 21:37:13 +01:00
@@ -439,6 +439,8 @@ char *PyTraceback_AsString(PyObject *exc
2018-11-03 05:10:03 +01:00
{ // a temp scope so I can use temp locals.
#if PY_MAJOR_VERSION <= 2
char *tempResult = PyString_AsString(obResult);
+#elif PY_MINOR_VERSION <= 6
2019-01-28 21:37:13 +01:00
+ char *tempResult = PyUnicode_AsUTF8(obResult);
#else
/* PyUnicode_AsUTF8() is const char * as of Python 3.7, char * earlier. */
const char *tempResult = (const char *)PyUnicode_AsUTF8(obResult);
2020-08-29 21:52:49 +02:00
Index: VirtualBox-6.1.13/src/libs/xpcom18a4/python/src/PyGBase.cpp
2018-11-03 05:10:03 +01:00
===================================================================
2020-08-29 21:52:49 +02:00
--- VirtualBox-6.1.13.orig/src/libs/xpcom18a4/python/src/PyGBase.cpp
+++ VirtualBox-6.1.13/src/libs/xpcom18a4/python/src/PyGBase.cpp
2018-11-03 05:10:03 +01:00
@@ -183,7 +183,11 @@ PyG_Base::~PyG_Base()
// Get the correct interface pointer for this object given the IID.
void *PyG_Base::ThisAsIID( const nsIID &iid )
{
- if (this==NULL) return NULL;
+#if PY_MINOR_VERSION <= 6
+ if (!this) return NULL;
+#else
+ if (!this) return NULL;
+#endif
if (iid.Equals(NS_GET_IID(nsISupports)))
return (nsISupports *)(nsIInternalPython *)this;
if (iid.Equals(NS_GET_IID(nsISupportsWeakReference)))
2020-08-29 21:52:49 +02:00
Index: VirtualBox-6.1.13/src/libs/xpcom18a4/python/Makefile.kmk
2019-12-04 17:40:59 +01:00
===================================================================
2020-08-29 21:52:49 +02:00
--- VirtualBox-6.1.13.orig/src/libs/xpcom18a4/python/Makefile.kmk
+++ VirtualBox-6.1.13/src/libs/xpcom18a4/python/Makefile.kmk
@@ -554,6 +554,52 @@ VBoxPython3_8m_x86_LIBS = $(VBOX_P
2019-12-04 17:40:59 +01:00
endif
endif
2020-01-20 21:15:41 +01:00
2019-12-04 17:40:59 +01:00
+ifdef VBOX_PYTHON38_INC
+#
+# Python 3.8 version
+#
+DLLS += VBoxPython3_8
+VBoxPython3_8_EXTENDS = VBoxPythonBase
+VBoxPython3_8_EXTENDS_BY = appending
+VBoxPython3_8_TEMPLATE = XPCOM
+VBoxPython3_8_INCS = $(VBOX_PYTHON38_INC)
+VBoxPython3_8_LIBS = $(VBOX_PYTHON38_LIB)
+
+ ifdef VBOX_WITH_32_ON_64_MAIN_API
+ ifdef VBOX_PYTHON38_LIB_X86
+DLLS += VBoxPython3_8_x86
+VBoxPython3_8_x86_EXTENDS = VBoxPythonBase_x86
+VBoxPython3_8_x86_EXTENDS_BY = appending
+VBoxPython3_8_x86_TEMPLATE = XPCOM
+VBoxPython3_8_x86_INCS = $(VBOX_PYTHON38_INC)
+VBoxPython3_8_x86_LIBS = $(VBOX_PYTHON38_LIB_X86)
+ endif
+ endif
+endif
+
+ifdef VBOX_PYTHON38M_INC
+#
+# Python 3.8 version with pymalloc
+#
+DLLS += VBoxPython3_8m
+VBoxPython3_8m_EXTENDS = VBoxPythonBase_m
+VBoxPython3_8m_EXTENDS_BY = appending
+VBoxPython3_8m_TEMPLATE = XPCOM
+VBoxPython3_8m_INCS = $(VBOX_PYTHON38M_INC)
+VBoxPython3_8m_LIBS = $(VBOX_PYTHON38M_LIB)
+
+ ifdef VBOX_WITH_32_ON_64_MAIN_API
+ ifdef VBOX_PYTHON38M_LIB_X86
+DLLS += VBoxPython3_8m_x86
+VBoxPython3_8m_x86_EXTENDS = VBoxPythonBase_x86_m
+VBoxPython3_8m_x86_EXTENDS_BY = appending
+VBoxPython3_8m_x86_TEMPLATE_ = XPCOM
+VBoxPython3_8m_x86_INCS = $(VBOX_PYTHON38M_INC)
+VBoxPython3_8m_x86_LIBS = $(VBOX_PYTHON38M_LIB_X86)
+ endif
+ endif
+endif
2020-01-20 21:15:41 +01:00
+
2019-12-04 17:40:59 +01:00
ifdef VBOX_PYTHONDEF_INC
#
2020-01-20 21:15:41 +01:00
# Python without versioning
2020-08-29 21:52:49 +02:00
Index: VirtualBox-6.1.13/src/libs/xpcom18a4/python/gen_python_deps.py
2019-12-04 17:40:59 +01:00
===================================================================
2020-08-29 21:52:49 +02:00
--- VirtualBox-6.1.13.orig/src/libs/xpcom18a4/python/gen_python_deps.py
+++ VirtualBox-6.1.13/src/libs/xpcom18a4/python/gen_python_deps.py
2019-12-04 17:40:59 +01:00
@@ -16,7 +16,7 @@ from __future__ import print_function
import os,sys
from distutils.version import StrictVersion
2020-01-20 21:15:41 +01:00
-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.8m" ]
+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.8m", "3.8", "3.8m" ]
2019-12-04 17:40:59 +01:00
prefixes = ["/usr", "/usr/local", "/opt", "/opt/local"]
known = {}