Skip to content

Commit

Permalink
Update mlnx-tools and ofed-docs
Browse files Browse the repository at this point in the history
 Changes to be committed:
	modified:   SPECS/mlnx-tools/mlnx-tools.signatures.json
	modified:   SPECS/mlnx-tools/mlnx-tools.spec
	modified:   SPECS/ofed-docs/ofed-docs.spec
	modified:   cgmanifest.json
  • Loading branch information
Alberto-Perez-Guevara committed Jan 9, 2025
1 parent 17d0cf7 commit b4ffaf0
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 33 deletions.
2 changes: 1 addition & 1 deletion SPECS/mlnx-tools/mlnx-tools.signatures.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Signatures": {
"mlnx-tools-5.2.0.tar.gz": "dab127335ef7698074a234a0937a261682c48674fe7bbaaefe1ac34ee30d68fb"
"mlnx-tools-24.10.tar.gz": "7459a03eebc0c7f939ff9356dc0bcca4ad64120f957623f03f74523d62ee392d"
}
}
68 changes: 39 additions & 29 deletions SPECS/mlnx-tools/mlnx-tools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -26,38 +26,38 @@
#
#

%global MLNX_OFED_VERSION 5.6-1.0.3.3
%global BF_VERSION 3.9.0
%global MLNX_OFED_VERSION 24.10-0.7.0.0

Summary: Mellanox userland tools and scripts
Name: mlnx-tools
Version: 5.2.0
Release: 2%{?dist}
License: CPL 1.0 or BSD or GPLv2
Version: 24.10
Release: 1%{?_dist}
License: GPLv2 or BSD
Vendor: Microsoft Corporation
Distribution: Azure Linux
Group: System Environment/Programming
Group: Applications/System
URL: https://github.com/Mellanox/mlnx-tools
Source0: https://linux.mellanox.com/public/repo/bluefield/%{BF_VERSION}/extras/mlnx_ofed/%{MLNX_OFED_VERSION}/SOURCES/%{name}_%{version}.orig.tar.gz#/%{name}-%{version}.tar.gz
Source0: https://linux.mellanox.com/public/repo/mlnx_ofed/%{MLNX_OFED_VERSION}/SRPMS/%{name}-%{version}.tar.gz
Obsoletes: mlnx-ofa_kernel < 5.4
Obsoletes: mlnx_en-utils < 5.4

BuildRoot: %{?build_root:%{build_root}}%{!?build_root:/var/tmp/%{name}}

%description
Mellanox userland tools and scripts

%define debug_package %{nil}
%define __python %{_bindir}/python3
BuildRequires: python3
# mlnx_tune is python2 but is not important enough to create a dependency
# on python2 in a python3 system:
%global __requires_exclude_from mlnx_tune
%global RHEL8 0%{?rhel} >= 8
%global FEDORA3X 0%{?fedora} >= 30
%global SLES15 0%{?suse_version} >= 1500
%global OPENEULER 0%{?openEuler} >= 2
%global PYTHON3 %{RHEL8} || %{FEDORA3X} || %{SLES15} || %{OPENEULER}
%global python_dir %{_datadir}/%{name}/python

%prep
%autosetup -n %{name}-%{version}

%build
%setup -n %{name}-%{version}

%install
rm -rf %{buildroot}

add_env()
{
Expand All @@ -74,37 +74,47 @@ EOF
}

touch mlnx-tools-files
mlnx_python_sitelib=%{python_sitelib}
if [ "$(echo %{_prefix} | sed -e 's@/@@g')" != "usr" ]; then
mlnx_python_sitelib=$(echo %{python_sitelib} | sed -e 's@/usr@%{_prefix}@')
fi
export PKG_VERSION="%{version}"
%make_install PYTHON="%__python" PYTHON_SETUP_EXTRA_ARGS="-O1 --prefix=%{buildroot}%{_prefix} --install-lib=%{buildroot}${mlnx_python_sitelib}"
%make_install
%if %PYTHON3
sed -i -e '1s/python\>/python3/' %{buildroot}/usr/{s,}bin/* \
%{buildroot}%{python_dir}/*.py
%endif

if [ "$(echo %{_prefix} | sed -e 's@/@@g')" != "usr" ]; then
%if "%{_prefix}" != "/usr"
conf_env=/etc/profile.d/mlnx-tools.sh
install -d %{buildroot}/etc/profile.d
add_env %{buildroot}$conf_env PYTHONPATH $mlnx_python_sitelib
add_env %{buildroot}$conf_env PATH %{_bindir}
add_env %{buildroot}$conf_env PATH %{_sbindir}
echo $conf_env >> mlnx-tools-files
fi
find %{buildroot}${mlnx_python_sitelib} -type f -print | sed -e 's@%{buildroot}@@' >> mlnx-tools-files
%endif

%clean
rm -rf %{buildroot}

%if "%{_prefix}" != "/usr"
%files -f mlnx-tools-files
%else
%files
%endif
%license LICENSE
%doc doc/*
%license debian/copyright
%defattr(-,root,root,-)
/sbin/sysctl_perf_tuning
/sbin/mlnx_bf_configure
/sbin/mlnx_bf_configure_ct
/sbin/mlnx-sf
%{_sbindir}/*
%{_bindir}/*
%{_mandir}/man8/ib2ib_setup.8*
%{_mandir}/man8/*.8*
%{python_dir}/dcbnetlink.py*
%{python_dir}/netlink.py*
%exclude %{python_dir}/__pycache__/*.pyc
/lib/udev/mlnx_bf_udev

%changelog
* Thu Jan 09 2025 Alberto David Perez Guevara <aperezguevar@microsoft.com>
- Upgrade package to version 24.10 for HPC image

* Fri Jul 22 2022 Rachel Menge <rachelmenge@microsoft.com> 5.2.0-2
- Initial CBL-Mariner import from NVIDIA (license: GPLv2).
- Lint spec to conform to Mariner
Expand All @@ -113,5 +123,5 @@ find %{buildroot}${mlnx_python_sitelib} -type f -print | sed -e 's@%{buildroot}@
* Wed May 12 2021 Tzafrir Cohen <nvidia@cohens.org.il> - 5.2.0-1
- MLNX_OFED branch

* Wed Nov 1 2017 Vladimir Sokolovsky <vlad@mellanox.com> - 4.6.0-1
* Wed Nov 01 2017 Vladimir Sokolovsky <vlad@mellanox.com> - 4.6.0-1
- Initial packaging
2 changes: 1 addition & 1 deletion SPECS/ofed-docs/ofed-docs.spec
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ rm -rf $RPM_BUILD_ROOT

%changelog
* Wed Jan 08 2025 Alberto David Perez Guevara <aperezguevar@microsoft.com> 24.10-1
- Initial Azure Linux import from NVIDIA (licences: GPL).
- Initial Azure Linux import from NVIDIA (license: GPL).

* Sun Mar 25 2007 Vladimir Sokolovsky <vlad@mellanox.co.il>
- Changed prefix
Expand Down
14 changes: 12 additions & 2 deletions cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13132,8 +13132,8 @@
"type": "other",
"other": {
"name": "mlnx-tools",
"version": "5.2.0",
"downloadUrl": "https://linux.mellanox.com/public/repo/bluefield/3.9.0/extras/mlnx_ofed/5.6-1.0.3.3/SOURCES/mlnx-tools_5.2.0.orig.tar.gz"
"version": "24.10",
"downloadUrl": "https://linux.mellanox.com/public/repo/mlnx_ofed/24.10-0.7.0.0/SRPMS/mlnx-tools-24.10.tar.gz"
}
}
},
Expand Down Expand Up @@ -13367,6 +13367,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "mpitests",
"version": "3.2.24",
"downloadUrl": "https://linux.mellanox.com/public/repo/mlnx_ofed/24.10-0.7.0.0/SRPMS/mpitests-3.2.24.tar.gz"
}
}
},
{
"component": {
"type": "other",
Expand Down

0 comments on commit b4ffaf0

Please sign in to comment.