commit f047357a9065110dd431fb95a30d61716019ded6
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Sun Dec 13 19:25:14 2020 +0000
Add fixes for Centos 8.4
VirtualBox-kmod.spec | 7 ++++++-
fixes_centos_8.4.patch | 16 ++++++++++++++++
2 files changed, 22 insertions(+), 1 deletion(-)
---
diff --git a/VirtualBox-kmod.spec b/VirtualBox-kmod.spec
index 26228ca..c0e70ba 100644
--- a/VirtualBox-kmod.spec
+++ b/VirtualBox-kmod.spec
@@ -36,7 +36,7 @@
Name: VirtualBox-kmod
Version: 6.1.16
-Release: 2%{?dist}
+Release: 3%{?dist}
#Release: 1%%{?prerel:.%%{prerel}}%%{?dist}
Summary: Kernel module for VirtualBox
@@ -45,6 +45,7 @@ URL:
http://www.virtualbox.org/wiki/VirtualBox
# This filters out the XEN kernel, since we don't run on XEN
Source1: excludekernel-filter.txt
Patch1: fixes_4.10.patch
+Patch2: fixes_centos_8.4.patch
%global AkmodsBuildRequires %{_bindir}/kmodtool VirtualBox-kmodsrc >=
%{version}%{vboxreltag} xz time elfutils-libelf-devel gcc
@@ -72,6 +73,7 @@ Kernel module for VirtualBox
%setup -T -c
tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{version}.tar.xz
%patch1 -p0
+%patch2 -p0
pushd %{name}-%{version}
popd
@@ -136,6 +138,9 @@ DIRS=$(ls %{name}-%{version} |wc -l)
%changelog
+* Sun Dec 13 2020 Sérgio Basto <sergio(a)serjux.com> - 6.1.16-3
+- Add fixes for Centos 8.4
+
* Sun Dec 06 2020 Sérgio Basto <sergio(a)serjux.com>
- We don't need build-sysbuild package when we just build the akmod
diff --git a/fixes_centos_8.4.patch b/fixes_centos_8.4.patch
new file mode 100644
index 0000000..9faee5a
--- /dev/null
+++ b/fixes_centos_8.4.patch
@@ -0,0 +1,16 @@
+cat /usr/include/linux/version.h
+#define RHEL_MAJOR 8
+#define RHEL_MINOR 4
+RTLNX_RHEL_MIN(8,4)
+
+--- ./VirtualBox-kmod-6.1.16/vboxsf/vfsmod.c.orig 2020-12-13 18:57:48.614216635 +0000
++++ ./VirtualBox-kmod-6.1.16/vboxsf/vfsmod.c 2020-12-13 18:59:41.537387526 +0000
+@@ -45,7 +45,7 @@
+ #include "version-generated.h"
+ #include "revision-generated.h"
+ #include "product-generated.h"
+-#if RTLNX_VER_MIN(5,0,0)
++#if RTLNX_VER_MIN(5,0,0) || RTLNX_RHEL_MIN(8,4)
+ # include <uapi/linux/mount.h> /* for MS_REMOUNT */
+ #elif RTLNX_VER_MAX(3,3,0)
+ # include <linux/mount.h>