1
0
forked from jengelh/virtualbox

- Add file "fix_32_bit_builds.patch" to fix error in 32-bit builds.

Add file "switch_to_python3.6.patch" to convert to Python3.
  Update warning regarding the security hole in USB passthrough. The text no longer refers
  to an old bugzilla entry (bsc#1097248).
  Script vboxguestconfig.sh is fixed.

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=432
This commit is contained in:
Larry Finger
2018-06-19 17:53:58 +00:00
committed by Git OBS Bridge
parent daf1117235
commit 2ab1b7752d
7 changed files with 219 additions and 27 deletions

View File

@@ -21,6 +21,18 @@
%define _fillupdir /var/adm/fillup-templates
%endif
# Use Python3 rather than Python2 by default
%define __python /usr/bin/python3
# In /usr/lib/rpm/macros, py_compile is hard-wired to use the command "python". I think
# this is a bug for which the work-around is to redefine that macro to use python3.
%define py_compile(O) \
find %1 -name '*.pyc' -exec rm -f {} \\; \
python3 -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
%{-O: \
find %1 -name '*.pyo' -exec rm -f {} \\; \
python3 -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
}
# Do not provide libGL.so symbols - they are owned by Mesa already and this could potentially confuse rpm/zypp
%global __provides_exclude ^libE?GL.so.1.*$
@@ -120,6 +132,10 @@ Patch123: fixes_for_4.17.patch
Patch124: gcc8-configure.patch
# Fix build for Qt 5.11
Patch125: fixes_for_Qt5.11.patch
# Switch to Python 3.6
Patch126: switch_to_python3.6.patch
# Fix 32-bit builds
Patch127: fix_32_bit_builds.patch
#
BuildRequires: LibVNCServer-devel
BuildRequires: SDL-devel
@@ -159,7 +175,7 @@ BuildRequires: libxslt-devel
BuildRequires: module-init-tools
BuildRequires: pam-devel
BuildRequires: pulseaudio-devel
BuildRequires: python2-devel
BuildRequires: python3-devel
BuildRequires: quilt
BuildRequires: sed
BuildRequires: update-desktop-files
@@ -254,8 +270,8 @@ websrv GUI part for %{name}.
%package host-KMP
Summary: Host kernel module for VirtualBox
##\%kernel_module_package -t %%{_builddir}/virtualbox-kmp-template -p %%{SOURCE7} -n %%{name}-host -f %%{SOURCE5} -x kdump um xen pae xenpae pv
Group: System/Emulators/PC
%kernel_module_package -t %%{_builddir}/virtualbox-kmp-template -p %%{SOURCE7} -n %%{name}-host -f %%{SOURCE5} -x kdump um xen pae xenpae pv
Requires: %{kernel_module_package_buildreqs}
%description host-KMP
@@ -303,17 +319,21 @@ Requires(pre): net-tools-deprecated
VirtualBox guest addition tools.
###########################################
%package -n python2-%{name}
%package -n python3-%{name}
Summary: Python bindings for %{name}
Group: Development/Libraries/Python
Requires: %{name} = %{version}
#rename from "ose" version:
Provides: python-%{name} = %{version}-%{release}
Provides: python3-%{name} = %{version}-%{release}
Obsoletes: python-%{name} < %{version}-%{release}
Provides: python-%{name}-ose = %{version}
Obsoletes: python2-%{name} < %{version}-%{release}
Obsoletes: python3-%{name} < %{version}-%{release}
Provides: python3-%{name}-ose = %{version}
Obsoletes: python-%{name}-ose < %{version}
Obsoletes: python2-%{name}-ose < %{version}
Obsoletes: python3-%{name}-ose < %{version}
%description -n python2-%{name}
%description -n python3-%{name}
Python XPCOM bindings to %{name}. Used e.g. by vboxgtk package.
###########################################
@@ -321,7 +341,7 @@ Python XPCOM bindings to %{name}. Used e.g. by vboxgtk package.
Summary: Devel files for %{name}
Group: Development/Libraries/Other
Requires: %{name} = %{version}
Requires: python-%{name} = %{version}
Requires: python3-%{name} = %{version}
#rename from "ose" version:
Provides: %{name}-ose-devel = %{version}
Obsoletes: %{name}-ose-devel < %{version}
@@ -347,8 +367,8 @@ cd %{_prefix}/src/kernel-modules/virtualbox ; make ; make install
%package guest-source
Summary: Source files for %{name} guest kernel modules
#Requires: %{name} = %{version}
Group: Development/Sources
Requires: %{name} = %{version}
Requires: gcc
Requires: make
BuildArch: noarch
@@ -415,6 +435,8 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL.
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#copy user manual
cp %{SOURCE1} UserManual.pdf
@@ -696,7 +718,7 @@ install -m 0755 -D src/VBox/Installer/linux/VBoxCreateUSBNode.sh %{buildroot}%{_
echo "entering python-virtualbox install section"
######################################################
pushd out/linux.*/release/bin/sdk/installer
VBOX_INSTALL_PATH=%{_vbox_instdir} python vboxapisetup.py install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=%{_tmppath}/SITE_FILES
VBOX_INSTALL_PATH=%{_vbox_instdir} python3 vboxapisetup.py install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=%{_tmppath}/SITE_FILES
popd
install -d -m 755 %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
cp -r out/linux.*/release/bin/sdk/bindings/xpcom/python %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
@@ -970,13 +992,13 @@ export DISABLE_RESTART_ON_UPDATE=yes
%dir /media
%endif
%files -n python2-%{name} -f %{_tmppath}/SITE_FILES
%files -n python3-%{name} -f %{_tmppath}/SITE_FILES
%defattr(-, root, root)
%dir %{_vbox_instdir}/sdk
%dir %{_vbox_instdir}/sdk/bindings
%dir %{_vbox_instdir}/sdk/bindings/xpcom
%{_vbox_instdir}/sdk/bindings/xpcom/python
%attr(0755, root, root) %{_vbox_instdir}/VBoxPython2_7.so
%attr(0755, root, root) %{_vbox_instdir}/VBoxPython3_6m.so
%files devel
%defattr(-,root, root)