[packages/VirtualBox] use official fix for missing SVN rev and drop vboxpci module
atler
atler at pld-linux.org
Fri Dec 13 18:26:18 CET 2019
commit 8aa647a7d74d9fba642b2e24d1eec2b6c40b9090
Author: Jan Palus <atler at pld-linux.org>
Date: Fri Dec 13 18:24:52 2019 +0100
use official fix for missing SVN rev and drop vboxpci module
Config.kmk states about vboxpci:
"disabled with 6.1, since it's not complete/useful enough"
VirtualBox.spec | 7 ++---
svn_rev.patch | 96 +++++++++++++++++++++++++++++++++++++++++++++++----------
2 files changed, 81 insertions(+), 22 deletions(-)
---
diff --git a/VirtualBox.spec b/VirtualBox.spec
index 3bc7a28..53c252d 100644
--- a/VirtualBox.spec
+++ b/VirtualBox.spec
@@ -444,7 +444,6 @@ Requires: systemd-units >= 38\
Provides: kernel(vboxdrv) = %{version}-%{rel}\
Provides: kernel(vboxnetadp) = %{version}-%{rel}\
Provides: kernel(vboxnetflt) = %{version}-%{rel}\
-Provides: kernel(vboxpci) = %{version}-%{rel}\
Obsoletes: kernel-init-host\
\
%description -n kernel%{_alt_kernel}-virtualbox-host\
@@ -476,7 +475,6 @@ gospodarzem sprzętu PCI.\
/lib/modules/%{_kernel_ver}/misc/vboxdrv.ko*\
/lib/modules/%{_kernel_ver}/misc/vboxnetadp.ko*\
/lib/modules/%{_kernel_ver}/misc/vboxnetflt.ko*\
-/lib/modules/%{_kernel_ver}/misc/vboxpci.ko*\
%endif\
\
%post -n kernel%{_alt_kernel}-virtualbox-guest\
@@ -498,7 +496,6 @@ cd PLD-MODULE-BUILD/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\
-%build_kernel_modules -m vboxpci -C vboxpci KBUILD_EXTRA_SYMBOLS=$PWD/../vboxdrv/Module.symvers\
cd ../GuestDrivers\
%build_kernel_modules -m vboxguest -C vboxguest\
cp -a vboxguest/Module.symvers vboxsf\
@@ -507,7 +504,7 @@ cp -a vboxguest/Module.symvers vboxsf\
%build_kernel_modules -m vboxvideo -C vboxvideo\
%endif\
cd ../..\
-%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,PLD-MODULE-BUILD/HostDrivers/vboxpci/vboxpci,PLD-MODULE-BUILD/GuestDrivers/vboxsf/vboxsf -d misc\
+%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,PLD-MODULE-BUILD/GuestDrivers/vboxsf/vboxsf -d misc\
%install_kernel_modules -D PLD-MODULE-BUILD/installed -m 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\
@@ -528,7 +525,7 @@ echo override vboxguest %{_kernel_ver} misc > PLD-MODULE-BUILD/installed/etc/dep
%patch0 -p1
%patch1 -p1
%patch2 -p1
-%patch3 -p1
+%patch3 -p0
%patch4 -p1
%patch6 -p1
%patch7 -p1
diff --git a/svn_rev.patch b/svn_rev.patch
index eedb586..a59f6fe 100644
--- a/svn_rev.patch
+++ b/svn_rev.patch
@@ -1,24 +1,86 @@
-diff -urN VirtualBox-6.1.0.orig/src/VBox/Additions/linux/export_modules.sh VirtualBox-6.1.0/src/VBox/Additions/linux/export_modules.sh
---- VirtualBox-6.1.0.orig/src/VBox/Additions/linux/export_modules.sh 2019-12-10 18:45:30.000000000 +0100
-+++ VirtualBox-6.1.0/src/VBox/Additions/linux/export_modules.sh 2019-12-12 01:14:57.529314700 +0100
-@@ -46,7 +46,7 @@
- VBOX_VERSION_MAJOR=`sed -e "s/^ *VBOX_VERSION_MAJOR *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Version.kmk`
- VBOX_VERSION_MINOR=`sed -e "s/^ *VBOX_VERSION_MINOR *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Version.kmk`
- VBOX_VERSION_BUILD=`sed -e "s/^ *VBOX_VERSION_BUILD *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Version.kmk`
--VBOX_SVN_REV=`sed -e 's/^ *VBOX_SVN_REV_FALLBACK *:= \+\$(patsubst *%:,, *\$Rev: *\([0-9]\+\) *\$ *) */\1/;t;d' $PATH_ROOT/Config.kmk`
-+VBOX_SVN_REV=`sed -e 's/^ *VBOX_SVN_REV_CONFIG_FALLBACK *:= \+\$(patsubst *%:,, *\$Rev: *\([0-9]\+\) *\$ *) */\1/;t;d' $PATH_ROOT/Config.kmk`
- VBOX_VENDOR=`sed -e 's/^ *VBOX_VENDOR *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk`
- VBOX_VENDOR_SHORT=`sed -e 's/^ *VBOX_VENDOR_SHORT *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk`
- VBOX_PRODUCT=`sed -e 's/^ *VBOX_PRODUCT *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk`
-diff -urN VirtualBox-6.1.0.orig/src/VBox/HostDrivers/linux/export_modules.sh VirtualBox-6.1.0/src/VBox/HostDrivers/linux/export_modules.sh
---- VirtualBox-6.1.0.orig/src/VBox/HostDrivers/linux/export_modules.sh 2019-12-10 18:52:40.000000000 +0100
-+++ VirtualBox-6.1.0/src/VBox/HostDrivers/linux/export_modules.sh 2019-12-12 01:15:07.499246825 +0100
-@@ -100,7 +100,7 @@
+------------------------------------------------------------------------
+r82582 | vboxsync | 2019-12-13 17:49:00 +0100 (pią, 13 gru 2019) | 3 lines
+
+Additions/linux/export_modules.sh: adjust to use proper svn rev fallback
+HostDrivers/linux/export_modules.sh: adjust to use proper svn rev fallback and use the setting from Config.kmk to decide whether vboxpci should be included or not
+
+
+Index: src/VBox/HostDrivers/linux/export_modules.sh
+===================================================================
+--- src/VBox/HostDrivers/linux/export_modules.sh (revision 82581)
++++ src/VBox/HostDrivers/linux/export_modules.sh (revision 82582)
+@@ -100,12 +100,26 @@
VBOX_VERSION_MINOR=`sed -e "s/^ *VBOX_VERSION_MINOR *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Version.kmk`
VBOX_VERSION_BUILD=`sed -e "s/^ *VBOX_VERSION_BUILD *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Version.kmk`
VBOX_VERSION_STRING=$VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILD
-VBOX_SVN_REV=`sed -e 's/^ *VBOX_SVN_REV_FALLBACK *:= \+\$(patsubst *%:,, *\$Rev: *\([0-9]\+\) *\$ *) */\1/;t;d' $PATH_ROOT/Config.kmk` VBOX_VENDOR=`sed -e 's/^ *VBOX_VENDOR *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk` VBOX_VENDOR_SHORT=`sed -e 's/^ *VBOX_VENDOR_SHORT *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk` VBOX_PRODUCT=`sed -e 's/^ *VBOX_PRODUCT *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk` VBOX_C_YEAR=`date +%Y`
-+VBOX_SVN_REV=`sed -e 's/^ *VBOX_SVN_REV_CONFIG_FALLBACK *:= \+\$(patsubst *%:,, *\$Rev: *\([0-9]\+\) *\$ *) */\1/;t;d' $PATH_ROOT/Config.kmk` VBOX_VENDOR=`sed -e 's/^ *VBOX_VENDOR *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk` VBOX_VENDOR_SHORT=`sed -e 's/^ *VBOX_VENDOR_SHORT *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk` VBOX_PRODUCT=`sed -e 's/^ *VBOX_PRODUCT *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk` VBOX_C_YEAR=`date +%Y`
++VBOX_VERSION_BUILD=`sed -e "s/^ *VBOX_VERSION_BUILD *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Version.kmk`
++VBOX_SVN_CONFIG_REV=`sed -e 's/^ *VBOX_SVN_REV_CONFIG_FALLBACK *:= \+\$(patsubst *%:,, *\$Rev: *\([0-9]\+\) *\$ *) */\1/;t;d' $PATH_ROOT/Config.kmk`
++VBOX_SVN_VERSION_REV=`sed -e 's/^ *VBOX_SVN_REV_VERSION_FALLBACK *:= \+\$(patsubst *%:,, *\$Rev: *\([0-9]\+\) *\$ *) */\1/;t;d' $PATH_ROOT/Version.kmk`
++if [ "$VBOX_SVN_CONFIG_REV" -gt "$VBOX_SVN_VERSION_REV" ]; then
++ VBOX_SVN_REV=$VBOX_SVN_CONFIG_REV
++else
++ VBOX_SVN_REV=$VBOX_SVN_VERSION_REV
++fi
++VBOX_VENDOR=`sed -e 's/^ *VBOX_VENDOR *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk`
++VBOX_VENDOR_SHORT=`sed -e 's/^ *VBOX_VENDOR_SHORT *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk`
++VBOX_PRODUCT=`sed -e 's/^ *VBOX_PRODUCT *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk`
++VBOX_C_YEAR=`date +%Y`
++VBOX_WITH_PCI_PASSTHROUGH=`sed -e "s/^ *VBOX_WITH_PCI_PASSTHROUGH *= *\(1\?\)/\1/;t;d" $PATH_ROOT/Config.kmk`
. $PATH_VBOXDRV/linux/files_vboxdrv
. $PATH_VBOXNET/linux/files_vboxnetflt
+ . $PATH_VBOXADP/linux/files_vboxnetadp
+-. $PATH_VBOXPCI/linux/files_vboxpci
++if [ "$VBOX_WITH_PCI_PASSTHROUGH" -eq "1" ]; then
++ . $PATH_VBOXPCI/linux/files_vboxpci
++fi
+
+ # Temporary path for creating the modules, will be removed later
+ rm -rf "$PATH_TMP"
+@@ -187,14 +201,16 @@
+ fi
+
+ # vboxpci (VirtualBox host PCI access kernel module)
+-mkdir $PATH_TMP/vboxpci || exit 1
+-for f in $VBOX_VBOXPCI_SOURCES; do
+- install -D -m 0644 `echo $f|cut -d'=' -f1` "$PATH_TMP/vboxpci/`echo $f|cut -d'>' -f2`"
+-done
+-if [ -n "$VBOX_WITH_HARDENING" ]; then
+- cat $PATH_VBOXPCI/linux/Makefile > $PATH_TMP/vboxpci/Makefile
+-else
+- sed -e "s;VBOX_WITH_HARDENING;;g" < $PATH_VBOXPCI/linux/Makefile > $PATH_TMP/vboxpci/Makefile
++if [ "$VBOX_WITH_PCI_PASSTHROUGH" -eq "1" ]; then
++ mkdir $PATH_TMP/vboxpci || exit 1
++ for f in $VBOX_VBOXPCI_SOURCES; do
++ install -D -m 0644 `echo $f|cut -d'=' -f1` "$PATH_TMP/vboxpci/`echo $f|cut -d'>' -f2`"
++ done
++ if [ -n "$VBOX_WITH_HARDENING" ]; then
++ cat $PATH_VBOXPCI/linux/Makefile > $PATH_TMP/vboxpci/Makefile
++ else
++ sed -e "s;VBOX_WITH_HARDENING;;g" < $PATH_VBOXPCI/linux/Makefile > $PATH_TMP/vboxpci/Makefile
++ fi
+ fi
+
+ install -D -m 0644 $PATH_LINUX/Makefile $PATH_TMP/Makefile
+Index: src/VBox/Additions/linux/export_modules.sh
+===================================================================
+--- src/VBox/Additions/linux/export_modules.sh (revision 82581)
++++ src/VBox/Additions/linux/export_modules.sh (revision 82582)
+@@ -46,7 +46,13 @@
+ VBOX_VERSION_MAJOR=`sed -e "s/^ *VBOX_VERSION_MAJOR *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Version.kmk`
+ VBOX_VERSION_MINOR=`sed -e "s/^ *VBOX_VERSION_MINOR *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Version.kmk`
+ VBOX_VERSION_BUILD=`sed -e "s/^ *VBOX_VERSION_BUILD *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Version.kmk`
+-VBOX_SVN_REV=`sed -e 's/^ *VBOX_SVN_REV_FALLBACK *:= \+\$(patsubst *%:,, *\$Rev: *\([0-9]\+\) *\$ *) */\1/;t;d' $PATH_ROOT/Config.kmk`
++VBOX_SVN_CONFIG_REV=`sed -e 's/^ *VBOX_SVN_REV_CONFIG_FALLBACK *:= \+\$(patsubst *%:,, *\$Rev: *\([0-9]\+\) *\$ *) */\1/;t;d' $PATH_ROOT/Config.kmk`
++VBOX_SVN_VERSION_REV=`sed -e 's/^ *VBOX_SVN_REV_VERSION_FALLBACK *:= \+\$(patsubst *%:,, *\$Rev: *\([0-9]\+\) *\$ *) */\1/;t;d' $PATH_ROOT/Version.kmk`
++if [ "$VBOX_SVN_CONFIG_REV" -gt "$VBOX_SVN_VERSION_REV" ]; then
++ VBOX_SVN_REV=$VBOX_SVN_CONFIG_REV
++else
++ VBOX_SVN_REV=$VBOX_SVN_VERSION_REV
++fi
+ VBOX_VENDOR=`sed -e 's/^ *VBOX_VENDOR *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk`
+ VBOX_VENDOR_SHORT=`sed -e 's/^ *VBOX_VENDOR_SHORT *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk`
+ VBOX_PRODUCT=`sed -e 's/^ *VBOX_PRODUCT *= \+\(.\+\)/\1/;t;d' $PATH_ROOT/Config.kmk`
+
+------------------------------------------------------------------------
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/VirtualBox.git/commitdiff/8aa647a7d74d9fba642b2e24d1eec2b6c40b9090
More information about the pld-cvs-commit
mailing list