From 92731d960d50db35f42c09cabfcf8f0cafd1c577 Mon Sep 17 00:00:00 2001 From: Qiao Ma Date: Mon, 6 Mar 2023 10:56:56 +0800 Subject: [PATCH 1/2] spec: update spec to adapt anolis specification Signed-off-by: Qiao Ma --- mlnx-ofa_kernel.spec => kmod-mlnx-ofa_kernel.spec | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) rename mlnx-ofa_kernel.spec => kmod-mlnx-ofa_kernel.spec (98%) diff --git a/mlnx-ofa_kernel.spec b/kmod-mlnx-ofa_kernel.spec similarity index 98% rename from mlnx-ofa_kernel.spec rename to kmod-mlnx-ofa_kernel.spec index e3c24c4..39f8449 100644 --- a/mlnx-ofa_kernel.spec +++ b/kmod-mlnx-ofa_kernel.spec @@ -26,6 +26,10 @@ # # +# anolis specification +%global pkg mlnx-ofa_kernel +%define anolis_release 1 + # KMP is disabled by default %{!?KMP: %global KMP 0} @@ -70,9 +74,9 @@ %{!?KERNEL_SOURCES: %global KERNEL_SOURCES /lib/modules/%{KVERSION}/source} -%{!?_name: %global _name mlnx-ofa_kernel} -%{!?_version: %global _version 5.8} -%{!?_release: %global _release OFED.5.8.1.1.2.1} +%{!?_name: %global _name kmod-%{pkg}} +%{!?_version: %global _version %{kernel_version}} +%{!?_release: %global _release OFED.5.8.1.1.2.1_%{anolis_release}} %global _kmp_rel %{_release}%{?_kmp_build_num}%{?_dist} %global utils_pname %{_name} @@ -86,7 +90,7 @@ Release: %{_release}%{?_dist} License: GPLv2 Url: http://www.mellanox.com/ Group: System Environment/Base -Source: %{_name}-%{_version}.tgz +Patch0: source-git.patch BuildRoot: %{?build_root:%{build_root}}%{!?build_root:/var/tmp/OFED} Vendor: Mellanox Technologies Obsoletes: kernel-ib @@ -255,7 +259,7 @@ drivers against it. %{!?install_mod_dir: %global install_mod_dir updates} %prep -%setup -n %{_name}-%{_version} +%autosetup -p1 -c -T set -- * mkdir source mv "$@" source/ -- Gitee From 8e400869e40a93104f85743584156bf38cde83e9 Mon Sep 17 00:00:00 2001 From: Yuanhe Shu Date: Mon, 29 May 2023 17:50:44 +0800 Subject: [PATCH 2/2] spec: remove kernel_version Signed-off-by: Yuanhe Shu --- kmod-mlnx-ofa_kernel.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/kmod-mlnx-ofa_kernel.spec b/kmod-mlnx-ofa_kernel.spec index 39f8449..9dbe53c 100644 --- a/kmod-mlnx-ofa_kernel.spec +++ b/kmod-mlnx-ofa_kernel.spec @@ -75,7 +75,6 @@ %{!?KERNEL_SOURCES: %global KERNEL_SOURCES /lib/modules/%{KVERSION}/source} %{!?_name: %global _name kmod-%{pkg}} -%{!?_version: %global _version %{kernel_version}} %{!?_release: %global _release OFED.5.8.1.1.2.1_%{anolis_release}} %global _kmp_rel %{_release}%{?_kmp_build_num}%{?_dist} -- Gitee