From e05a2be9554e22de6d015d5c63933baaf2d86fc9a0fbdadb94d2fcb4a414b895 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 27 May 2015 13:07:32 +0000 Subject: [PATCH 1/6] Accepting request 308894 from home:jirislaby:branches:Virtualization initial gcc5 support (it builds at least) OBS-URL: https://build.opensuse.org/request/show/308894 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=195 --- gcc5-real-support.patch | 34 ++++++++++++++++++++++++++++++++++ gcc5-support.patch | 16 ++++++++++++++++ gcc51-support.patch | 16 ++++++++++++++++ virtualbox.changes | 8 ++++++++ virtualbox.spec | 6 ++++++ 5 files changed, 80 insertions(+) create mode 100644 gcc5-real-support.patch create mode 100644 gcc5-support.patch create mode 100644 gcc51-support.patch diff --git a/gcc5-real-support.patch b/gcc5-real-support.patch new file mode 100644 index 0000000..f4dbb73 --- /dev/null +++ b/gcc5-real-support.patch @@ -0,0 +1,34 @@ +--- + Config.kmk | 2 +- + configure | 9 +++++++-- + 2 files changed, 8 insertions(+), 3 deletions(-) + +--- a/Config.kmk ++++ b/Config.kmk +@@ -2292,7 +2292,7 @@ else + # The reason for this hack is that the windows kmk_ash cannot deal with $((1+1)). + # Some versions of gcc (e.g. openSUSE11) return only major.minor on `gcc -dumpversion`. + VBOX_GCC_VERSION = $(shell \ +- $(1) -dumpversion | $(SED_EXT) 's|\([0-9]\)\.\([0-9]\)\.\{0,1\}\([0-9]\{0,1\}\).*|$$(int-add $$(int-mul 10000, \1), $$(int-mul 100, \2), $$(firstword \3 0))|' ) ++ $(1) -dumpversion | $(SED_EXT) 's|\([0-9]\)\.\{0,1\}\([0-9]\{0,1\}\)\.\{0,1\}\([0-9]\{0,1\}\).*|$$(int-add $$(int-mul 10000, \1), $$(int-mul 100, $$(firstword \2 0)), $$(firstword \3 0))|' ) + endif + + # Find MinGW cross compilers for EFI on non-windows systems. We need to probe +--- a/configure ++++ b/configure +@@ -409,8 +409,13 @@ check_gcc() + log_failure "cannot execute '$CXX -dumpversion'" + fail really + fi +- cc_maj=`echo $cc_ver|cut -d. -f1` +- cc_min=`echo $cc_ver|cut -d. -f2` ++ if echo $cc_ver | grep -q '\.'; then ++ cc_maj=`echo $cc_ver|cut -d. -f1` ++ cc_min=`echo $cc_ver|cut -d. -f2` ++ else ++ cc_maj=$cc_ver ++ cc_min=0 ++ fi + if [ "x$cc_ver" != "x$cxx_ver" ]; then + log_failure "gcc version $cc_ver does not match g++ version $cxx_ver" + fail really diff --git a/gcc5-support.patch b/gcc5-support.patch new file mode 100644 index 0000000..282c2df --- /dev/null +++ b/gcc5-support.patch @@ -0,0 +1,16 @@ +Index: configure +=================================================================== +--- configure (revision 55371) ++++ configure (revision 55372) +@@ -422,8 +422,9 @@ + -o \( $cc_maj -eq 3 -a $cc_min -lt 2 \) \ + -o \( $cc_maj -eq 4 -a $cc_min -lt 1 -a "$OS" != "darwin" \) \ + -o \( $cc_maj -eq 4 -a $cc_min -gt 9 \) \ +- -o $cc_maj -gt 4 ]; then +- log_failure "gcc version $cc_ver found, expected gcc 3.x with x>1 or gcc 4.x with 01 or gcc 4.x with 01 or gcc 4.x with 01 or gcc 4.x with 0 Date: Tue, 9 Jun 2015 11:37:33 +0000 Subject: [PATCH 2/6] - Disable multiversion_kernel support, taken from nvidia driver spec, should fix bnc#925663. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=196 --- virtualbox.changes | 6 ++++++ virtualbox.spec | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/virtualbox.changes b/virtualbox.changes index 94fdb2f..4eda5c7 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 9 11:36:42 UTC 2015 - tchvatal@suse.com + +- Disable multiversion_kernel support, taken from nvidia driver spec, + should fix bnc#925663. + ------------------------------------------------------------------- Wed May 27 10:22:22 UTC 2015 - jslaby@suse.com diff --git a/virtualbox.spec b/virtualbox.spec index c7c0681..7ed1e44 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -16,6 +16,8 @@ # +%define kmp_template_name /usr/lib/rpm/kernel-module-subpackage +%(sed -e '/^Provides: multiversion(kernel)/d' %kmp_template_name > %_builddir/virtualbox-kmp-template) %define _vbox_instdir %{_libexecdir}/virtualbox %define _udevrulesdir %{_libexecdir}/udev/rules.d Name: virtualbox @@ -190,7 +192,7 @@ websrv GUI part for %{name}. Summary: Host kernel module for VirtualBox Group: System/Emulators/PC # SUSE specify macro to define host kmp package -%{?suse_kernel_module_package:%suse_kernel_module_package -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} kdump um xen xenpae} +%{?suse_kernel_module_package:%suse_kernel_module_package -t %_builddir/virtualbox-kmp-template -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} kdump um xen xenpae} %description host-KMP This package contains the kernel-module for VirtualBox. @@ -200,7 +202,7 @@ This package contains the kernel-module for VirtualBox. Summary: Guest kernel modules for VirtualBox Group: System/Emulators/PC #SUSE specify macro to define guest kmp package -%{?suse_kernel_module_package:%suse_kernel_module_package -p %{SOURCE8} -n %{name}-guest -f %{SOURCE6} kdump um xen xenpae} +%{?suse_kernel_module_package:%suse_kernel_module_package -t %_builddir/virtualbox-kmp-template -p %{SOURCE8} -n %{name}-guest -f %{SOURCE6} kdump um xen xenpae} %description guest-KMP This package contains the kernel-module for VirtualBox. From 355912a58562e7d42d04ed246d761a1508840dcc68f485f33c703b09b31813f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 9 Jun 2015 11:38:07 +0000 Subject: [PATCH 3/6] OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=197 --- virtualbox.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/virtualbox.spec b/virtualbox.spec index 7ed1e44..1d4f31a 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -16,8 +16,7 @@ # -%define kmp_template_name /usr/lib/rpm/kernel-module-subpackage -%(sed -e '/^Provides: multiversion(kernel)/d' %kmp_template_name > %_builddir/virtualbox-kmp-template) +%(sed -e '/^Provides: multiversion(kernel)/d' /usr/lib/rpm/kernel-module-subpackage > %_builddir/virtualbox-kmp-template) %define _vbox_instdir %{_libexecdir}/virtualbox %define _udevrulesdir %{_libexecdir}/udev/rules.d Name: virtualbox From 5cae606db1d31cf433effb4d27f4b4868f3f3064fc9977b01937cef5b2dfccfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 9 Jun 2015 11:38:55 +0000 Subject: [PATCH 4/6] OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=198 --- virtualbox.spec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/virtualbox.spec b/virtualbox.spec index 1d4f31a..d475de6 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -16,7 +16,6 @@ # -%(sed -e '/^Provides: multiversion(kernel)/d' /usr/lib/rpm/kernel-module-subpackage > %_builddir/virtualbox-kmp-template) %define _vbox_instdir %{_libexecdir}/virtualbox %define _udevrulesdir %{_libexecdir}/udev/rules.d Name: virtualbox @@ -51,13 +50,13 @@ Source99: %{name}-patch-source.sh Patch1: vbox-vboxdrv-init-script.diff Patch2: vbox-vboxadd-init-script.diff Patch3: vbox-vboxweb-init-script.diff +#PATCH-FIX-OPENSUSE: Use system X libraries and do not build local things +Patch4: virtualbox-system-x.patch #fix build : "Error 4001 - String must be entirely alphanumeric" #with renaming we probably break some macosx functionality however ths is just quick fix #file :http://www.virtualbox.org/browser/trunk/src/VBox/Devices/PC/vbox.ds #see thread : http://lists.freebsd.org/pipermail/freebsd-acpi/2010-October/006795.html Patch6: vbox-smc-napa.diff -#PATCH-FIX-OPENSUSE: Use system X libraries and do not build local things -Patch4: virtualbox-system-x.patch #fix build of Python and dev package on openSUSE 11.3 Patch8: vbox-python-detection.diff #deprecated old-style C++ service proxies and objects,we have to use soapcpp2 -z1 flag @@ -143,6 +142,7 @@ Recommends: %{name}-gui = %{version} Provides: %{name}-ose = %{version} Obsoletes: %{name}-ose < %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build +%(sed -e '/^Provides: multiversion(kernel)/d' %{_libexecdir}/rpm/kernel-module-subpackage > %{_builddir}/virtualbox-kmp-template) ExclusiveArch: %ix86 x86_64 %ifarch amd64 x86_64 ia32e em64t BuildRequires: gcc-32bit @@ -191,7 +191,7 @@ websrv GUI part for %{name}. Summary: Host kernel module for VirtualBox Group: System/Emulators/PC # SUSE specify macro to define host kmp package -%{?suse_kernel_module_package:%suse_kernel_module_package -t %_builddir/virtualbox-kmp-template -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} kdump um xen xenpae} +%{?suse_kernel_module_package:%suse_kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} kdump um xen xenpae} %description host-KMP This package contains the kernel-module for VirtualBox. @@ -201,7 +201,7 @@ This package contains the kernel-module for VirtualBox. Summary: Guest kernel modules for VirtualBox Group: System/Emulators/PC #SUSE specify macro to define guest kmp package -%{?suse_kernel_module_package:%suse_kernel_module_package -t %_builddir/virtualbox-kmp-template -p %{SOURCE8} -n %{name}-guest -f %{SOURCE6} kdump um xen xenpae} +%{?suse_kernel_module_package:%suse_kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE8} -n %{name}-guest -f %{SOURCE6} kdump um xen xenpae} %description guest-KMP This package contains the kernel-module for VirtualBox. @@ -263,14 +263,14 @@ Development file for %{name} Summary: Source files for %{name} kernel modules Group: Development/Sources Requires: %{name} = %{version} -BuildArch: noarch Requires: gcc Requires: make +BuildArch: noarch %description host-source Source files for %{name} kernel modules These can be built for custom kernels using -cd /usr/src/kernel-modules/virtualbox ; make ; make install +cd %{_prefix}/src/kernel-modules/virtualbox ; make ; make install ########################################### %package guest-desktop-icons From d0795051d9a4095ce6cf3cbfa4b66f1451ec16dfa1f0e9493e5905d2c03093d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 9 Jun 2015 12:00:23 +0000 Subject: [PATCH 5/6] OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=199 --- virtualbox.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/virtualbox.spec b/virtualbox.spec index d475de6..472912b 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -190,8 +190,7 @@ websrv GUI part for %{name}. %package host-KMP Summary: Host kernel module for VirtualBox Group: System/Emulators/PC -# SUSE specify macro to define host kmp package -%{?suse_kernel_module_package:%suse_kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} kdump um xen xenpae} +%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} kdump um xen xenpae %description host-KMP This package contains the kernel-module for VirtualBox. @@ -200,8 +199,7 @@ This package contains the kernel-module for VirtualBox. %package guest-KMP Summary: Guest kernel modules for VirtualBox Group: System/Emulators/PC -#SUSE specify macro to define guest kmp package -%{?suse_kernel_module_package:%suse_kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE8} -n %{name}-guest -f %{SOURCE6} kdump um xen xenpae} +%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE8} -n %{name}-guest -f %{SOURCE6} kdump um xen xenpae %description guest-KMP This package contains the kernel-module for VirtualBox. From e8d03d451e4fcd86189424025a3f135ef679f88349dd27ae821a59fd6797e1f7 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Fri, 12 Jun 2015 10:57:10 +0000 Subject: [PATCH 6/6] Accepting request 311788 from home:pluskalm:branches:Virtualization - Enable building of for all supported kernel flavours * exclude also pv flavour OBS-URL: https://build.opensuse.org/request/show/311788 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=200 --- virtualbox.changes | 6 ++++++ virtualbox.spec | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/virtualbox.changes b/virtualbox.changes index 4eda5c7..5b4115b 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 12 10:33:55 UTC 2015 - mpluskal@suse.com + +- Enable building of for all supported kernel flavours + * exclude also pv flavour + ------------------------------------------------------------------- Tue Jun 9 11:36:42 UTC 2015 - tchvatal@suse.com diff --git a/virtualbox.spec b/virtualbox.spec index 472912b..d730fc9 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -190,7 +190,7 @@ websrv GUI part for %{name}. %package host-KMP Summary: Host kernel module for VirtualBox Group: System/Emulators/PC -%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} kdump um xen xenpae +%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} -x kdump um xen xenpae pv %description host-KMP This package contains the kernel-module for VirtualBox. @@ -199,7 +199,7 @@ This package contains the kernel-module for VirtualBox. %package guest-KMP Summary: Guest kernel modules for VirtualBox Group: System/Emulators/PC -%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE8} -n %{name}-guest -f %{SOURCE6} kdump um xen xenpae +%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE8} -n %{name}-guest -f %{SOURCE6} -x kdump um xen xenpae pv %description guest-KMP This package contains the kernel-module for VirtualBox.