-
Notifications
You must be signed in to change notification settings - Fork 564
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update signed SPECS and fix code review comments
- Loading branch information
1 parent
b42ac94
commit f5c2090
Showing
18 changed files
with
135 additions
and
531 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,75 +30,30 @@ | |
# SOFTWARE. | ||
# | ||
|
||
%{!?_name: %define _name fwctl} | ||
%{!?_version: %define _version 24.10} | ||
%{!?_release: %define _release OFED.24.10.0.6.7.1} | ||
|
||
%global target_kernel_version_full %(/bin/rpm -q --queryformat '%{RPMTAG_VERSION}-%{RPMTAG_RELEASE}' $(/bin/rpm -q --whatprovides kernel-headers)) | ||
%global target_azurelinux_build_kernel_version %(/bin/rpm -q --queryformat '%{RPMTAG_VERSION}' $(/bin/rpm -q --whatprovides kernel-headers)) | ||
%global target_kernel_release %(/bin/rpm -q --queryformat '%{RPMTAG_RELEASE}' $(/bin/rpm -q --whatprovides kernel-headers) | /bin/cut -d . -f 1) | ||
|
||
%global KVERSION %{target_kernel_version_full} | ||
%global K_SRC /lib/modules/%{target_kernel_version_full}/build | ||
|
||
# KMP is disabled by default | ||
%{!?KMP: %global KMP 0} | ||
|
||
%{!?KVERSION: %global KVERSION %{target_kernel_version_full}} | ||
%global kernel_version %{KVERSION} | ||
%global krelver %(echo -n %{KVERSION} | sed -e 's/-/_/g') | ||
# take path to kernel sources if provided, otherwise look in default location (for non KMP rpms). | ||
%{!?K_SRC: %global K_SRC /lib/modules/%{KVERSION}/build} | ||
|
||
# define release version | ||
%{!?src_release: %global src_release %{_release}_%{krelver}} | ||
%if "%{KMP}" != "1" | ||
%global _release1 %{src_release} | ||
%else | ||
%global _release1 %{_release} | ||
%endif | ||
%global _kmp_rel %{_release1}%{?_kmp_build_num}%{?_dist} | ||
|
||
%{!?_name: %define _name fwctl} | ||
|
||
Summary: %{_name} Driver | ||
Name: %{_name} | ||
Version: %{_version} | ||
Version: 24.10 | ||
Release: 1%{?dist} | ||
License: GPLv2 | ||
Url: http://nvidia.com | ||
Group: System Environment/Base | ||
|
||
# This package's "version" and "release" must reflect the unsigned version that | ||
# was signed. | ||
# An important consequence is that when making a change to this package, the | ||
# unsigned version/release must be increased to keep the two versions consistent. | ||
# Ideally though, this spec will not change much or at all, so the version will | ||
# just track the unsigned package's version/release. | ||
# | ||
# To populate these sources: | ||
# 1. Build the unsigned packages as normal | ||
# 2. Sign the desired binary | ||
# 3. Place the unsigned package and signed binary in this spec's folder | ||
# 4. Build this spec | ||
|
||
Source0: %{name}-%{version}-%{release}.%{_arch}.rpm | ||
Source1: fwctl.ko | ||
Source2: mlx5_fwctl.ko | ||
|
||
BuildRoot: /var/tmp/%{name}-%{version}-build | ||
Vendor: Microsoft Corporation | ||
Distribution: Azure Linux | ||
ExclusiveArch: x86_64 | ||
|
||
BuildRequires: gcc | ||
BuildRequires: make | ||
BuildRequires: kernel-devel = %{target_kernel_version_full} | ||
BuildRequires: kernel-headers = %{target_kernel_version_full} | ||
BuildRequires: binutils | ||
BuildRequires: systemd | ||
BuildRequires: kmod | ||
BuildRequires: mlnx-ofa_kernel-devel = %{_version} | ||
BuildRequires: mlnx-ofa_kernel-source = %{_version} | ||
|
||
Requires: mlnx-ofa_kernel = %{_version} | ||
Requires: mlnx-ofa_kernel-modules = %{_version} | ||
Requires: kernel = %{target_kernel_version_full} | ||
|
@@ -110,11 +65,11 @@ fwctl signed kernel modules | |
%prep | ||
|
||
%build | ||
rpm2cpio %{Source0} | cpio -idmv -D %{buildroot} | ||
rpm2cpio %{SOURCE0} | cpio -idmv -D %{buildroot} | ||
|
||
%install | ||
cp %{Source1} %{buildroot}/lib/modules/%{KVERSION}/updates/fwctl/fwctl.ko | ||
cp %{Source2} %{buildroot}/lib/modules/%{KVERSION}/updates/fwctl/mlx5/mlx5_fwctl.ko | ||
cp -r %{SOURCE1} %{buildroot}/lib/modules/%{KVERSION}/updates/fwctl/fwctl.ko | ||
cp -r %{SOURCE2} %{buildroot}/lib/modules/%{KVERSION}/updates/fwctl/mlx5/mlx5_fwctl.ko | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
@@ -128,12 +83,12 @@ fi # 1 : closed | |
%postun | ||
/sbin/depmod %{KVERSION} | ||
|
||
%if "%{KMP}" != "1" | ||
%files | ||
%defattr(-,root,root,-) | ||
/lib/modules/%{KVERSION}/%{install_mod_dir}/ | ||
%license copyright | ||
/lib/modules/%{KVERSION}/updates/ | ||
%config(noreplace) %{_sysconfdir}/depmod.d/zz02-%{name}-*.conf | ||
%endif | ||
|
||
|
||
%changelog | ||
* Tue Dec 16 2024 Binu Jose Philip <[email protected]> - 24.10.0.6.7.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,71 +31,24 @@ | |
%global target_kernel_release %(/bin/rpm -q --queryformat '%{RPMTAG_RELEASE}' $(/bin/rpm -q --whatprovides kernel-headers) | /bin/cut -d . -f 1) | ||
|
||
%global KVERSION %{target_kernel_version_full} | ||
%global K_SRC /lib/modules/%{target_kernel_version_full}/build | ||
|
||
%{!?_name: %define _name iser} | ||
%{!?_version: %define _version 24.10} | ||
%{!?_release: %define _release OFED.24.10.0.6.7.1} | ||
|
||
# KMP is disabled by default | ||
%{!?KMP: %global KMP 0} | ||
|
||
# take kernel version or default to uname -r | ||
# %{!?KVERSION: %global KVERSION %(uname -r)} | ||
%{!?KVERSION: %global KVERSION %{target_kernel_version_full}} | ||
%global kernel_version %{KVERSION} | ||
%global krelver %(echo -n %{KVERSION} | sed -e 's/-/_/g') | ||
# take path to kernel sources if provided, otherwise look in default location (for non KMP rpms). | ||
# %{!?K_SRC: %global K_SRC /lib/modules/%{KVERSION}/build} | ||
|
||
# define release version | ||
%{!?src_release: %global src_release %{_release}_%{krelver}} | ||
%if "%{KMP}" != "1" | ||
%global _release1 %{src_release} | ||
%else | ||
%global _release1 %{_release} | ||
%endif | ||
%global _kmp_rel %{_release1}%{?_kmp_build_num}%{?_dist} | ||
|
||
Summary: %{_name} Driver | ||
Name: %{_name} | ||
Version: %{_version} | ||
Version: 24.10 | ||
Release: 1%{?dist} | ||
License: GPLv2 | ||
Url: http://www.mellanox.com | ||
Group: System Environment/Base | ||
|
||
# This package's "version" and "release" must reflect the unsigned version that | ||
# was signed. | ||
# An important consequence is that when making a change to this package, the | ||
# unsigned version/release must be increased to keep the two versions consistent. | ||
# Ideally though, this spec will not change much or at all, so the version will | ||
# just track the unsigned package's version/release. | ||
# | ||
# To populate these sources: | ||
# 1. Build the unsigned packages as normal | ||
# 2. Sign the desired binary | ||
# 3. Place the unsigned package and signed binary in this spec's folder | ||
# 4. Build this spec | ||
|
||
Source0: %{name}-%{version}-%{release}.%{_arch}.rpm | ||
Source1: ib_iser.ko | ||
|
||
BuildRoot: /var/tmp/%{name}-%{version}-build | ||
Vendor: Microsoft Corporation | ||
Distribution: Azure Linux | ||
ExclusiveArch: x86_64 | ||
|
||
BuildRequires: gcc | ||
BuildRequires: make | ||
BuildRequires: kernel-devel = %{target_kernel_version_full} | ||
BuildRequires: kernel-headers = %{target_kernel_version_full} | ||
BuildRequires: binutils | ||
BuildRequires: systemd | ||
BuildRequires: kmod | ||
BuildRequires: mlnx-ofa_kernel-devel = %{_version} | ||
BuildRequires: mlnx-ofa_kernel-source = %{_version} | ||
|
||
Requires: mlnx-ofa_kernel = %{_version} | ||
Requires: mlnx-ofa_kernel-modules = %{_version} | ||
Requires: kernel = %{target_kernel_version_full} | ||
|
@@ -107,10 +60,10 @@ iser signed kernel modules | |
%prep | ||
|
||
%build | ||
rpm2cpio %{Source0} | cpio -idmv -D %{buildroot} | ||
rpm2cpio %{SOURCE0} | cpio -idmv -D %{buildroot} | ||
|
||
%install | ||
cp %{Source1} %{buildroot}/lib/modules/%{KVERSION}/updates/iser/ib_iser.ko | ||
cp -r %{SOURCE1} %{buildroot}/lib/modules/%{KVERSION}/updates/iser/ib_iser.ko | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
@@ -124,12 +77,12 @@ fi # 1 : closed | |
%postun | ||
/sbin/depmod %{KVERSION} | ||
|
||
%if "%{KMP}" != "1" | ||
%files | ||
%defattr(-,root,root,-) | ||
/lib/modules/%{KVERSION}/%{install_mod_dir}/ | ||
%license copyright | ||
/lib/modules/%{KVERSION}/updates/ | ||
%config(noreplace) %{_sysconfdir}/depmod.d/zz02-%{name}-*.conf | ||
%endif | ||
|
||
|
||
%changelog | ||
* Tue Dec 16 2024 Binu Jose Philip <[email protected]> - 24.10.0.6.7.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,71 +31,24 @@ | |
%global target_kernel_release %(/bin/rpm -q --queryformat '%{RPMTAG_RELEASE}' $(/bin/rpm -q --whatprovides kernel-headers) | /bin/cut -d . -f 1) | ||
|
||
%global KVERSION %{target_kernel_version_full} | ||
%global K_SRC /lib/modules/%{target_kernel_version_full}/build | ||
|
||
%{!?_name: %define _name isert} | ||
%{!?_version: %define _version 24.10} | ||
%{!?_release: %define _release OFED.24.10.0.6.7.1} | ||
|
||
# KMP is disabled by default | ||
%{!?KMP: %global KMP 0} | ||
|
||
# take kernel version or default to uname -r | ||
# %{!?KVERSION: %global KVERSION %(uname -r)} | ||
%{!?KVERSION: %global KVERSION %{target_kernel_version_full}} | ||
%global kernel_version %{KVERSION} | ||
%global krelver %(echo -n %{KVERSION} | sed -e 's/-/_/g') | ||
# take path to kernel sources if provided, otherwise look in default location (for non KMP rpms). | ||
# %{!?K_SRC: %global K_SRC /lib/modules/%{KVERSION}/build} | ||
|
||
# define release version | ||
%{!?src_release: %global src_release %{_release}_%{krelver}} | ||
%if "%{KMP}" != "1" | ||
%global _release1 %{src_release} | ||
%else | ||
%global _release1 %{_release} | ||
%endif | ||
%global _kmp_rel %{_release1}%{?_kmp_build_num}%{?_dist} | ||
|
||
Summary: %{_name} Driver | ||
Name: %{_name} | ||
Version: %{_version} | ||
Version: 24.10 | ||
Release: 1%{?dist} | ||
License: GPLv2 | ||
Url: http://www.mellanox.com | ||
Group: System Environment/Base | ||
|
||
# This package's "version" and "release" must reflect the unsigned version that | ||
# was signed. | ||
# An important consequence is that when making a change to this package, the | ||
# unsigned version/release must be increased to keep the two versions consistent. | ||
# Ideally though, this spec will not change much or at all, so the version will | ||
# just track the unsigned package's version/release. | ||
# | ||
# To populate these sources: | ||
# 1. Build the unsigned packages as normal | ||
# 2. Sign the desired binary | ||
# 3. Place the unsigned package and signed binary in this spec's folder | ||
# 4. Build this spec | ||
|
||
Source0: %{name}-%{version}-%{release}.%{_arch}.rpm | ||
Source1: ib_isert.ko | ||
|
||
BuildRoot: /var/tmp/%{name}-%{version}-build | ||
Vendor: Microsoft Corporation | ||
Distribution: Azure Linux | ||
ExclusiveArch: x86_64 | ||
|
||
BuildRequires: gcc | ||
BuildRequires: make | ||
BuildRequires: kernel-devel = %{target_kernel_version_full} | ||
BuildRequires: kernel-headers = %{target_kernel_version_full} | ||
BuildRequires: binutils | ||
BuildRequires: systemd | ||
BuildRequires: kmod | ||
BuildRequires: mlnx-ofa_kernel-devel = %{_version} | ||
BuildRequires: mlnx-ofa_kernel-source = %{_version} | ||
|
||
Requires: mlnx-ofa_kernel = %{_version} | ||
Requires: mlnx-ofa_kernel-modules = %{_version} | ||
Requires: kernel = %{target_kernel_version_full} | ||
|
@@ -107,10 +60,10 @@ isert signed kernel modules | |
%prep | ||
|
||
%build | ||
rpm2cpio %{Source0} | cpio -idmv -D %{buildroot} | ||
rpm2cpio %{SOURCE0} | cpio -idmv -D %{buildroot} | ||
|
||
%install | ||
cp %{Source1} %{buildroot}/lib/modules/%{KVERSION}/updates/isert/ib_isert.ko | ||
cp -r %{SOURCE1} %{buildroot}/lib/modules/%{KVERSION}/updates/isert/ib_isert.ko | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
@@ -124,12 +77,12 @@ fi # 1 : closed | |
%postun | ||
/sbin/depmod %{KVERSION} | ||
|
||
%if "%{KMP}" != "1" | ||
%files | ||
%defattr(-,root,root,-) | ||
/lib/modules/%{KVERSION}/%{install_mod_dir}/ | ||
%license copyright | ||
/lib/modules/%{KVERSION}/updates/ | ||
%config(noreplace) %{_sysconfdir}/depmod.d/zz02-%{name}-*.conf | ||
%endif | ||
|
||
|
||
%changelog | ||
* Tue Dec 16 2024 Binu Jose Philip <[email protected]> - 24.10.0.6.7.1 | ||
|
Oops, something went wrong.