Skip to content

Commit

Permalink
Bphilip/add mofed and dependencies (#11479)
Browse files Browse the repository at this point in the history
Co-authored-by: Binu Jose Philip <[email protected]>
Co-authored-by: chalamalasetty <[email protected]>
  • Loading branch information
3 people authored Jan 17, 2025
1 parent a4f754d commit d7bc078
Show file tree
Hide file tree
Showing 50 changed files with 5,064 additions and 3 deletions.
3 changes: 2 additions & 1 deletion LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 34 additions & 1 deletion LICENSES-AND-NOTICES/SPECS/data/licenses.json
Original file line number Diff line number Diff line change
Expand Up @@ -2455,13 +2455,46 @@
"NVIDIA": {
"license": "[ASL 2.0 License and spec specific licenses](http://www.apache.org/licenses/LICENSE-2.0)",
"specs": [
"fwctl",
"fwctl-signed",
"ibarr",
"ibsim",
"iser",
"iser-signed",
"isert",
"isert-signed",
"knem",
"knem-modules-signed",
"libnvidia-container",
"mft_kernel",
"mft_kernel-signed",
"mlnx-ethtool",
"mlnx-iproute2",
"mlnx-nfsrdma",
"mlnx-nfsrdma-signed",
"mlnx-ofa_kernel",
"mlnx-ofa_kernel-modules-signed",
"mlnx-tools",
"mlx-bootctl",
"mlx-steering-dump",
"multiperf",
"nvidia-container-toolkit",
"ofed-docs",
"ofed-scripts",
"perftest"
"perftest",
"rshim",
"sockperf",
"srp",
"srp-signed",
"xpmem",
"xpmem-lib",
"xpmem-modules-signed"
]
},
"NVIDIA (BSD)": {
"license": "[BSD](https://github.com/Mellanox/sockperf/blob/sockperf_v2/copying)",
"specs": [
"sockperf"
]
},
"OpenEuler": {
Expand Down
105 changes: 105 additions & 0 deletions SPECS-SIGNED/fwctl-signed/fwctl-signed.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
#
# Copyright (c) 2024 Nvidia Inc. All rights reserved.
#
# This software is available to you under a choice of one of two
# licenses. You may choose to be licensed under the terms of the GNU
# General Public License (GPL) Version 2, available from the file
# COPYING in the main directory of this source tree, or the
# OpenIB.org BSD license below:
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# - Redistributions of source code must retain the above
# copyright notice, this list of conditions and the following
# disclaimer.
#
# - Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#

%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}

%{!?_name: %define _name fwctl}

Summary: %{_name} Driver
Name: %{_name}
Version: 24.10
Release: 1%{?dist}
License: GPLv2
Url: http://nvidia.com
Group: System Environment/Base

#
# 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

Vendor: Microsoft Corporation
Distribution: Azure Linux
ExclusiveArch: x86_64

Requires: mlnx-ofa_kernel = %{_version}
Requires: mlnx-ofa_kernel-modules = %{_version}
Requires: kernel = %{target_kernel_version_full}
Requires: kmod

%description
fwctl signed kernel modules

%prep

%build

%install
rpm2cpio %{SOURCE0} | cpio -idmv -D %{buildroot}

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}

%post
if [ $1 -ge 1 ]; then # 1 : This package is being installed or reinstalled
/sbin/depmod %{KVERSION}
fi # 1 : closed
# END of post

%postun
/sbin/depmod %{KVERSION}

%files
%defattr(-,root,root,-)
%license %{_datadir}/licenses/%{name}/copyright
/lib/modules/%{KVERSION}/updates/
%config(noreplace) %{_sysconfdir}/depmod.d/zz02-%{name}-*.conf


%changelog
* Tue Dec 16 2024 Binu Jose Philip <[email protected]> - 24.10.0.6.7.1
- Creating signed spec
- Initial Azure Linux import from NVIDIA (license: GPLv2)
- License verified
100 changes: 100 additions & 0 deletions SPECS-SIGNED/iser-signed/iser-signed.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#
# Copyright (c) 2014 Mellanox Technologies. All rights reserved.
#
# This Software is licensed under one of the following licenses:
#
# 1) under the terms of the "Common Public License 1.0" a copy of which is
# available from the Open Source Initiative, see
# http://www.opensource.org/licenses/cpl.php.
#
# 2) under the terms of the "The BSD License" a copy of which is
# available from the Open Source Initiative, see
# http://www.opensource.org/licenses/bsd-license.php.
#
# 3) under the terms of the "GNU General Public License (GPL) Version 2" a
# copy of which is available from the Open Source Initiative, see
# http://www.opensource.org/licenses/gpl-license.php.
#
# Licensee has the right to choose one of the above licenses.
#
# Redistributions of source code must retain the above copyright
# notice and one of the license notices.
#
# Redistributions in binary form must reproduce both the above copyright
# notice, one of the license notices in the documentation
# and/or other materials provided with the distribution.
#
#

%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}

%{!?_name: %define _name iser}

Summary: %{_name} Driver
Name: %{_name}
Version: 24.10
Release: 1%{?dist}
License: GPLv2
Url: http://www.mellanox.com
Group: System Environment/Base

#
# 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

Vendor: Microsoft Corporation
Distribution: Azure Linux
ExclusiveArch: x86_64

Requires: mlnx-ofa_kernel = %{_version}
Requires: mlnx-ofa_kernel-modules = %{_version}
Requires: kernel = %{target_kernel_version_full}
Requires: kmod

%description
iser signed kernel modules

%prep

%build


%install
rpm2cpio %{SOURCE0} | cpio -idmv -D %{buildroot}

cp -r %{SOURCE1} %{buildroot}/lib/modules/%{KVERSION}/updates/iser/ib_iser.ko

%clean
rm -rf %{buildroot}

%post
if [ $1 -ge 1 ]; then # 1 : This package is being installed or reinstalled
/sbin/depmod %{KVERSION}
fi # 1 : closed
# END of post

%postun
/sbin/depmod %{KVERSION}

%files
%defattr(-,root,root,-)
%license %{_datadir}/licenses/%{name}/copyright
/lib/modules/%{KVERSION}/updates/
%config(noreplace) %{_sysconfdir}/depmod.d/zz02-%{name}-*.conf


%changelog
* Tue Dec 16 2024 Binu Jose Philip <[email protected]> - 24.10.0.6.7.1
- Creating signed spec
- License verified
- Initial Azure Linux import from NVIDIA (license: GPLv2)
100 changes: 100 additions & 0 deletions SPECS-SIGNED/isert-signed/isert-signed.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#
# Copyright (c) 2014 Mellanox Technologies. All rights reserved.
#
# This Software is licensed under one of the following licenses:
#
# 1) under the terms of the "Common Public License 1.0" a copy of which is
# available from the Open Source Initiative, see
# http://www.opensource.org/licenses/cpl.php.
#
# 2) under the terms of the "The BSD License" a copy of which is
# available from the Open Source Initiative, see
# http://www.opensource.org/licenses/bsd-license.php.
#
# 3) under the terms of the "GNU General Public License (GPL) Version 2" a
# copy of which is available from the Open Source Initiative, see
# http://www.opensource.org/licenses/gpl-license.php.
#
# Licensee has the right to choose one of the above licenses.
#
# Redistributions of source code must retain the above copyright
# notice and one of the license notices.
#
# Redistributions in binary form must reproduce both the above copyright
# notice, one of the license notices in the documentation
# and/or other materials provided with the distribution.
#
#

%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}

%{!?_name: %define _name isert}

Summary: %{_name} Driver
Name: %{_name}
Version: 24.10
Release: 1%{?dist}
License: GPLv2
Url: http://www.mellanox.com
Group: System Environment/Base

#
# 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

Vendor: Microsoft Corporation
Distribution: Azure Linux
ExclusiveArch: x86_64

Requires: mlnx-ofa_kernel = %{_version}
Requires: mlnx-ofa_kernel-modules = %{_version}
Requires: kernel = %{target_kernel_version_full}
Requires: kmod

%description
isert signed kernel modules

%prep

%build


%install
rpm2cpio %{SOURCE0} | cpio -idmv -D %{buildroot}

cp -r %{SOURCE1} %{buildroot}/lib/modules/%{KVERSION}/updates/isert/ib_isert.ko

%clean
rm -rf %{buildroot}

%post
if [ $1 -ge 1 ]; then # 1 : This package is being installed or reinstalled
/sbin/depmod %{KVERSION}
fi # 1 : closed
# END of post

%postun
/sbin/depmod %{KVERSION}

%files
%defattr(-,root,root,-)
%license %{_datadir}/licenses/%{name}/copyright
/lib/modules/%{KVERSION}/updates/
%config(noreplace) %{_sysconfdir}/depmod.d/zz02-%{name}-*.conf


%changelog
* Tue Dec 16 2024 Binu Jose Philip <[email protected]> - 24.10.0.6.7.1
- Creating signed spec
- License verified
- Initial Azure Linux import from NVIDIA (license: GPLv2)
Loading

0 comments on commit d7bc078

Please sign in to comment.