commit 16ead04897a9bbc2e588055c379d7670b338cf0b
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Mon Jan 7 06:20:00 2019 +0000
Enable Python3 support, move all SDK python files to devel sub-package, they
may be used by python2 and python3.
Add patch VBoxVNC.fix.patch from Debian
Issue with EXTPACK_VBOXDTRACE was fix some time ago.
007-python2-path.patch | 9 +++++++++
37-python-3.7-support.patch | 17 +++++++++++++++++
VBoxVNC.fix.patch | 17 +++++++++++++++++
VirtualBox.spec | 46 ++++++++++++++++++++++++++++++++++-----------
4 files changed, 78 insertions(+), 11 deletions(-)
---
diff --git a/007-python2-path.patch b/007-python2-path.patch
new file mode 100644
index 0000000..b7d19ce
--- /dev/null
+++ b/007-python2-path.patch
@@ -0,0 +1,9 @@
+# 2013 © Sébastien Luttringer
+--- ./src/VBox/Frontends/VBoxShell/vboxshell.py.orig 2018-12-18 12:59:24.000000000 +0000
++++ ./src/VBox/Frontends/VBoxShell/vboxshell.py 2019-01-03 22:05:42.645245995 +0000
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python2
+ # -*- coding: utf-8 -*-
+ # $Id: vboxshell.py $
+
diff --git a/37-python-3.7-support.patch b/37-python-3.7-support.patch
new file mode 100644
index 0000000..51d2cd1
--- /dev/null
+++ b/37-python-3.7-support.patch
@@ -0,0 +1,17 @@
+Description: add python 3.7m as a supported version
+Author: Michael Hudson-Doyle <michael.hudson(a)ubuntu.com>
+Origin: vendor
+Last-Update: 2018-07-12
+---
+This patch header follows DEP-3:
http://dep.debian.net/deps/dep3/
+--- a/configure
++++ b/configure
+@@ -1963,7 +1963,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"
++ 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"
+ 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/VBoxVNC.fix.patch b/VBoxVNC.fix.patch
new file mode 100644
index 0000000..fc8120f
--- /dev/null
+++ b/VBoxVNC.fix.patch
@@ -0,0 +1,17 @@
+--- a/src/VBox/ExtPacks/VNC/VBoxVNC.cpp 2017-03-16 03:17:09.000000000 +0800
++++ b/src/VBox/ExtPacks/VNC/VBoxVNC.cpp 2017-03-24 10:57:12.381136918 +0800
+@@ -820,6 +820,14 @@
+ }
+ }
+
++ if(!instance->mScreenBuffer) {
++ VRDEResize(hServer);
++ if(!instance->mScreenBuffer) {
++ LogRel(("VNCServerImpl::VRDEUpdate: Cannot get frame
buffer"));
++ return;
++ }
++ }
++
+ uint32_t width = instance->FrameInfo.cWidth;
+ uint32_t bpp = instance->FrameInfo.cBitsPerPixel / 8;
+ uint32_t joff = order->y * width + order->x;
diff --git a/VirtualBox.spec b/VirtualBox.spec
index bb05c83..e53a62e 100644
--- a/VirtualBox.spec
+++ b/VirtualBox.spec
@@ -34,7 +34,7 @@
Name: VirtualBox
Version: 6.0.0
-Release: 1%{?prerel:.%{prerel}}%{?dist}
+Release: 2%{?prerel:.%{prerel}}%{?dist}
Summary: A general-purpose full virtualizer for PC hardware
License: GPLv2 or (GPLv2 and CDDL)
@@ -64,6 +64,10 @@ Patch18: VirtualBox-OSE-4.0.2-aiobug.patch
Patch27: VirtualBox-gcc.patch
# from Debian
Patch28: 02-gsoap-build-fix.patch
+Patch30: 37-python-3.7-support.patch
+Patch32: VBoxVNC.fix.patch
+# from ArchLinux
+Patch40: 007-python2-path.patch
# from Mageia
Patch50: VirtualBox-5.1.0-add-Mageia-support.patch
Patch51: VirtualBox-5.1.0-revert-VBox.sh.patch
@@ -85,6 +89,7 @@ BuildRequires: libIDL-devel
BuildRequires: yasm
BuildRequires: pulseaudio-libs-devel
BuildRequires: python2-devel
+BuildRequires: python3-devel
BuildRequires: desktop-file-utils
BuildRequires: libcap-devel
BuildRequires: qt5-qtbase-devel
@@ -208,6 +213,15 @@ Obsoletes: python-VirtualBox < %{version}-%{release}
Python XPCOM bindings to %{name}.
+%package -n python3-%{name}
+Summary: Python3 bindings for %{name}
+Group: Development/Libraries
+Requires: %{name}-server%{?_isa} = %{version}-%{release}
+%{?python_provide:%python_provide python3-%{name}}
+
+%description -n python3-%{name}
+Python3 XPCOM bindings to %{name}.
+
%package guest-additions
Summary: %{name} Guest Additions
Group: System Environment/Base
@@ -274,6 +288,9 @@ rm -r src/libs/zlib-1.2.8/
%if 0%{?fedora} > 20
%patch28 -p1 -b .gsoap2
%endif
+%patch30 -p1
+%patch32 -p1
+%patch40 -p1
# mageia support not ready for 6.0
#patch50 -p1 -b .mageia-support
%patch51 -p1 -b .revert-VBox.sh
@@ -321,7 +338,6 @@ kmk %{_smp_mflags} \
VBOX_PATH_APP_DOCS=%{_docdir}/VirtualBox \
VBOX_WITH_TESTCASES= \
VBOX_WITH_VALIDATIONKIT= \
- VBOX_WITH_EXTPACK_VBOXDTRACE= \
VBOX_WITH_VBOX_IMG=1 \
VBOX_WITH_SYSFS_BY_DEFAULT=1 \
VBOX_USE_SYSTEM_XORG_HEADERS=1 \
@@ -370,7 +386,6 @@ install -d %{buildroot}%{_datadir}/pixmaps
install -d %{buildroot}%{_datadir}/mime/packages
install -d %{buildroot}%{_datadir}/icons
install -d %{buildroot}%{_prefix}/src/%{name}-kmod-%{version}
-install -d %{buildroot}%{python2_sitelib}/virtualbox
# Libs
install -p -m 0755 -t %{buildroot}%{_libdir}/virtualbox \
@@ -386,9 +401,6 @@ install -p -m 0755 obj/bin/VBox.sh %{buildroot}%{_bindir}/VBox
install -p -m 0755 -t %{buildroot}%{_bindir} \
obj/bin/VBoxTunctl
-# Fixes ERROR: ambiguous python shebang in F30
-sed -i '1s:#!/usr/bin/env python:#!/usr/bin/env python2:' obj/bin/vboxshell.py
-
# Executables
install -p -m 0755 -t %{buildroot}%{_libdir}/virtualbox \
obj/bin/VirtualBox \
@@ -453,11 +465,15 @@ cp -a obj/bin/components/*
%{buildroot}%{_libdir}/virtualbox/components/
install -p -m 0755 -t %{buildroot}%{_libdir}/virtualbox/nls \
obj/bin/nls/*
-# SDK
+# Python
pushd obj/bin/sdk/installer
VBOX_INSTALL_PATH=%{_libdir}/virtualbox \
%{__python2} vboxapisetup.py install --prefix %{_prefix} --root %{buildroot}
+VBOX_INSTALL_PATH=%{_libdir}/virtualbox \
+ %{__python3} vboxapisetup.py install --prefix %{_prefix} --root %{buildroot}
popd
+
+# SDK
cp -rp obj/bin/sdk/. %{buildroot}%{_libdir}/virtualbox/sdk
rm -rf %{buildroot}%{_libdir}/virtualbox/sdk/installer
@@ -571,7 +587,7 @@ desktop-file-validate
%{buildroot}%{_datadir}/applications/virtualbox.desktop
# vboxautostart-service
install -d %{buildroot}%{_libdir}/virtualbox/rdesktop-vrdp-keymaps
-install -D obj/bin/rdesktop-vrdp-keymaps/*
%{buildroot}%{_libdir}/virtualbox/rdesktop-vrdp-keymaps
+install -p -m 0644 -t %{buildroot}%{_libdir}/virtualbox/rdesktop-vrdp-keymaps
obj/bin/rdesktop-vrdp-keymaps/*
install -p -m 0644 -t %{buildroot}%{_libdir}/virtualbox obj/bin/rdesktop-vrdp.tar.gz
install -p -m 0755 -t %{buildroot}%{_bindir} obj/bin/rdesktop-vrdp
@@ -749,14 +765,16 @@ getent passwd vboxadd >/dev/null || \
%files devel
%{_libdir}/virtualbox/sdk
-%exclude %{_libdir}/virtualbox/sdk/bindings/xpcom/python
%files -n python2-%{name}
%{_libdir}/virtualbox/*.py*
-%{python2_sitelib}/virtualbox
%{python2_sitelib}/vboxapi*
%{_libdir}/virtualbox/VBoxPython2_7.so
-%{_libdir}/virtualbox/sdk/bindings/xpcom/python
+
+%files -n python3-%{name}
+%{_libdir}/virtualbox/*.py*
+%{python3_sitelib}/vboxapi*
+%{_libdir}/virtualbox/VBoxPython3*.so
%if %{with guest_additions}
%files guest-additions
@@ -784,6 +802,12 @@ getent passwd vboxadd >/dev/null || \
%{_datadir}/%{name}-kmod-%{version}
%changelog
+* Mon Jan 07 2019 Sérgio Basto <sergio(a)serjux.com> - 6.0.0-2
+- Enable Python3 support, move all SDK python files to devel sub-package, they
+ may be used by python2 and 3.
+- Add patch VBoxVNC.fix.patch from Debian
+- Issue with EXTPACK_VBOXDTRACE was fix some time ago.
+
* Sun Dec 30 2018 Sérgio Basto <sergio(a)serjux.com> - 6.0.0-1
- VirtualBox 6.0
- Patch23 was applied upstream.