%define qtver 5.6.0
-%define rel 1
+%define rel 3
%define pname VirtualBox
Summary: VirtualBox - x86 hardware virtualizer
Summary(pl.UTF-8): VirtualBox - wirtualizator sprzętu x86
Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
-Version: 6.1.2
+Version: 6.1.30
Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
License: GPL v2
Group: Applications/Emulators
-Source0: http://download.virtualbox.org/virtualbox/%{version}/%{pname}-%{version}.tar.bz2
-# Source0-md5: f4f42fd09857556b04b803fb99cc6905
-Source1: http://download.virtualbox.org/virtualbox/%{version}/VBoxGuestAdditions_%{version}.iso
-# Source1-md5: 85a1ecad6dade9f22ea0b94556b96898
+Source0: https://download.virtualbox.org/virtualbox/%{version}/%{pname}-%{version}.tar.bz2
+# Source0-md5: 2e408e56e92cf778eb8722dbbcb5c357
+Source1: https://download.virtualbox.org/virtualbox/%{version}/VBoxGuestAdditions_%{version}.iso
+# Source1-md5: 3f235b417ae90a3347afa3f787bc82b9
Source2: vboxservice.init
Source3: vboxservice.service
Source4: vboxservice.sysconfig
Patch15: %{pname}-lightdm-1.19.2.patch
Patch16: %{pname}-no-vboxvideo.patch
Patch17: qt5-gl.patch
+Patch18: qt-detect.patch
+Patch19: kernel-4.9.256.patch
URL: http://www.virtualbox.org/
%if %{with userspace}
%ifarch %{x8664}
BuildRequires: libIDL-devel
BuildRequires: libcap-static
BuildRequires: libdrm-devel
-BuildRequires: libpng-devel >= 1.2.5
+BuildRequires: libpng-devel >= 2:1.2.5
BuildRequires: libstdc++-devel >= 5:3.2.3
BuildRequires: libstdc++-static >= 5:3.2.3
BuildRequires: libuuid-devel
BuildRequires: python-modules
BuildRequires: qt5-build
BuildRequires: qt5-linguist
-BuildRequires: rpmbuild(macros) >= 1.715
+BuildRequires: rpmbuild(macros) >= 1.752
BuildRequires: sed >= 4.0
%if %{with doc}
BuildRequires: texlive-fonts-bitstream
%define filterout -Werror=format-security
+%define _noautochrpath .*\\.debug$
+
%description
Oracle VirtualBox is a general-purpose full virtualizer for x86
hardware. Targeted at server, desktop and embedded use, it is now the
Summary: VirtualBox Guest Additions
Group: Base
Requires: %{name} = %{version}
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description additions
VirtualBox Guest Additions.
License: GPL v2+
Group: Base/Kernel
Requires: dkms
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description -n dkms-vboxguest
This package contains DKMS-ready VirtualBox Guest Additions for Linux
License: GPL v2+
Group: Base/Kernel
Requires: dkms
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description -n dkms-vboxhost
This package contains DKMS enabled sourcecode of VirtualBox Support
%config(noreplace) %verify(not md5 mtime size) /etc/depmod.d/%{_kernel_ver}/vboxguest.conf\
%endif\
%config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/virtualbox-guest.conf\
+%if %{_kernel_version_code} < %{_kernel_version_magic 5 14 0}\
/lib/modules/%{_kernel_ver}/misc/vboxguest.ko*\
/lib/modules/%{_kernel_ver}/misc/vboxsf.ko*\
%if %{_kernel_version_code} < %{_kernel_version_magic 4 13 0}\
/lib/modules/%{_kernel_ver}/misc/vboxvideo.ko*\
%endif\
+%endif\
\
%if %{with host}\
%files -n kernel%{_alt_kernel}-virtualbox-host\
%define build_kernel_pkg()\
export KERN_DIR=%{_kernelsrcdir}\
%if %{with host}\
-cd PLD-MODULE-BUILD/HostDrivers\
+cd kernel/HostDrivers\
%build_kernel_modules -m vboxdrv -C vboxdrv\
%build_kernel_modules -m vboxnetadp -C vboxnetadp KBUILD_EXTRA_SYMBOLS=$PWD/../vboxdrv/Module.symvers\
%build_kernel_modules -m vboxnetflt -C vboxnetflt KBUILD_EXTRA_SYMBOLS=$PWD/../vboxdrv/Module.symvers\
+%install_kernel_modules -D ../../kernel/installed -m vboxdrv/vboxdrv,vboxnetadp/vboxnetadp,vboxnetflt/vboxnetflt -d misc\
cd ../..\
%endif\
-cd PLD-MODULE-BUILD/GuestDrivers\
+%if %{_kernel_version_code} < %{_kernel_version_magic 5 14 0}\
+cd kernel/GuestDrivers\
%build_kernel_modules -m vboxguest -C vboxguest\
-cp -a vboxguest/Module.symvers vboxsf\
-%build_kernel_modules -m vboxsf -C vboxsf -c\
+%build_kernel_modules -m vboxsf -C vboxsf KBUILD_EXTRA_SYMBOLS=$PWD/../vboxguest/Module.symvers\
+%install_kernel_modules -D ../../kernel/installed -m vboxsf/vboxsf,vboxguest/vboxguest -d misc\
%if %{_kernel_version_code} < %{_kernel_version_magic 4 13 0}\
-%build_kernel_modules -m vboxvideo -C vboxvideo\
+%build_kernel_modules -m vboxvideo -C vboxvideo KBUILD_EXTRA_SYMBOLS=$PWD/../vboxguest/Module.symvers\
+%install_kernel_modules -D ../../kernel/installed -m vboxvideo/vboxvideo -d misc\
%endif\
cd ../..\
-%if %{with host}\
-%install_kernel_modules -D PLD-MODULE-BUILD/installed -m PLD-MODULE-BUILD/HostDrivers/vboxdrv/vboxdrv,PLD-MODULE-BUILD/HostDrivers/vboxnetadp/vboxnetadp,PLD-MODULE-BUILD/HostDrivers/vboxnetflt/vboxnetflt -d misc\
-%endif\
-%install_kernel_modules -D PLD-MODULE-BUILD/installed -m PLD-MODULE-BUILD/GuestDrivers/vboxsf/vboxsf,PLD-MODULE-BUILD/GuestDrivers/vboxguest/vboxguest -d misc\
-%if %{_kernel_version_code} < %{_kernel_version_magic 4 13 0}\
-%install_kernel_modules -D PLD-MODULE-BUILD/installed -m PLD-MODULE-BUILD/GuestDrivers/vboxvideo/vboxvideo -d misc\
%endif\
%{nil}
%define install_kernel_pkg()\
%if %{_kernel_version_code} >= %{_kernel_version_magic 4 16 0}\
-install -d PLD-MODULE-BUILD/installed/etc/depmod.d/%{_kernel_ver}\
-echo override vboxguest %{_kernel_ver} misc > PLD-MODULE-BUILD/installed/etc/depmod.d/%{_kernel_ver}/vboxguest.conf\
+install -d kernel/installed/etc/depmod.d/%{_kernel_ver}\
+echo override vboxguest %{_kernel_ver} misc > kernel/installed/etc/depmod.d/%{_kernel_ver}/vboxguest.conf\
+%if %{_kernel_version_code} >= %{_kernel_version_magic 5 6 0}\
+echo override vboxsf %{_kernel_ver} misc >> kernel/installed/etc/depmod.d/%{_kernel_ver}/vboxguest.conf\
+%endif\
%endif\
%{nil}
%patch15 -p0
%patch16 -p0
%patch17 -p1
+%patch18 -p1
%{__sed} -i -e 's,@VBOX_DOC_PATH@,%{_docdir}/%{name}-%{version},' \
-e 's/Categories=.*/Categories=Utility;Emulator;/' src/VBox/Installer/common/virtualbox.desktop.in
%{__sed} -i -e 's#@INSTALL_DIR@#%{_libdir}/%{pname}#' src/VBox/Installer/linux/VBox.sh
%if %{with kernel}
-install -d PLD-MODULE-BUILD/{GuestDrivers,HostDrivers}
-cd PLD-MODULE-BUILD
+install -d kernel/{GuestDrivers,HostDrivers}
+cd kernel
../src/VBox/Additions/linux/export_modules.sh guest-modules.tar.gz
tar -zxf guest-modules.tar.gz -C GuestDrivers
../src/VBox/HostDrivers/linux/export_modules.sh --file host-modules.tar.gz --without-hardening
tar -zxf host-modules.tar.gz -C HostDrivers
cd -
+%patch19 -p1
%endif
# using system kBuild package
# Guest Only Tools
%{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_bindir}}/VBoxClient
%{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_bindir}}/VBoxControl
+%{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_bindir}}/VBoxDRMClient
%{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_bindir}}/VBoxService
install -d $RPM_BUILD_ROOT/etc/xdg/autostart
cp -p src/VBox/Additions/x11/Installer/vboxclient.desktop \
%if %{with kernel}
install -d $RPM_BUILD_ROOT{/etc/modules-load.d,/sbin}
-cp -a PLD-MODULE-BUILD/installed/* $RPM_BUILD_ROOT
+cp -a kernel/installed/* $RPM_BUILD_ROOT
# Tell systemd to load modules
cp -p %{SOURCE7} $RPM_BUILD_ROOT/etc/modules-load.d/virtualbox-host.conf
%attr(755,root,root) %{_libdir}/%{pname}/VirtualBoxVM
%attr(755,root,root) %{_libdir}/%{pname}/bldRTLdrCheckImports
%attr(755,root,root) %{_libdir}/%{pname}/iPxeBaseBin
+%attr(755,root,root) %{_libdir}/%{pname}/vboximg-mount
%if %{with doc}
%attr(755,root,root) %{_libdir}/%{pname}/VBoxManageHelp
%endif
%lang(fr) %{_datadir}/%{pname}/nls/*_fr.qm
%lang(gl) %{_datadir}/%{pname}/nls/*_gl.qm
%lang(he) %{_datadir}/%{pname}/nls/*_he.qm
+%lang(hr) %{_datadir}/%{pname}/nls/*_hr_HR.qm
%lang(hu) %{_datadir}/%{pname}/nls/*_hu.qm
%lang(id) %{_datadir}/%{pname}/nls/*_id.qm
%lang(it) %{_datadir}/%{pname}/nls/*_it.qm
/etc/xdg/autostart/vboxclient.desktop
%attr(755,root,root) %{_bindir}/VBoxClient
%attr(755,root,root) %{_bindir}/VBoxClient-all
+%attr(755,root,root) %{_bindir}/VBoxDRMClient
%if %{with lightdm}
%files -n lightdm-greeter-vbox