Skip to content

Commit cf0f291

Browse files
Identify and Update versions of MOFED dependency SPECS that are present in Azure Linux core (#11841)
Co-authored-by: Christopher Co <35273088+christopherco@users.noreply.github.com>
1 parent 1da8035 commit cf0f291

16 files changed

Lines changed: 979 additions & 115 deletions

LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSES-AND-NOTICES/SPECS/data/licenses.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,6 +1764,7 @@
17641764
"python-poetry-core",
17651765
"python-process-tests",
17661766
"python-productmd",
1767+
"python-prometheus_client",
17671768
"python-ptyprocess",
17681769
"python-pycares",
17691770
"python-pycosat",
@@ -2458,6 +2459,7 @@
24582459
"mlnx-tools",
24592460
"mlx-bootctl",
24602461
"nvidia-container-toolkit",
2462+
"ofed-docs",
24612463
"ofed-scripts",
24622464
"perftest"
24632465
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"Signatures": {
3-
"mlnx-tools-5.2.0.tar.gz": "dab127335ef7698074a234a0937a261682c48674fe7bbaaefe1ac34ee30d68fb"
3+
"mlnx-tools-24.10.tar.gz": "7459a03eebc0c7f939ff9356dc0bcca4ad64120f957623f03f74523d62ee392d"
44
}
55
}

SPECS/mlnx-tools/mlnx-tools.spec

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,38 +26,38 @@
2626
#
2727
#
2828

29-
%global MLNX_OFED_VERSION 5.6-1.0.3.3
30-
%global BF_VERSION 3.9.0
29+
%global MLNX_OFED_VERSION 24.10-0.7.0.0
3130

3231
Summary: Mellanox userland tools and scripts
3332
Name: mlnx-tools
34-
Version: 5.2.0
35-
Release: 2%{?dist}
36-
License: CPL 1.0 or BSD or GPLv2
33+
Version: 24.10
34+
Release: 1%{?dist}
35+
License: GPLv2 or BSD
3736
Vendor: Microsoft Corporation
3837
Distribution: Azure Linux
39-
Group: System Environment/Programming
38+
Group: Applications/System
4039
URL: https://github.com/Mellanox/mlnx-tools
41-
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
40+
Source0: https://linux.mellanox.com/public/repo/mlnx_ofed/%{MLNX_OFED_VERSION}/SRPMS/%{name}-%{version}.tar.gz
4241
Obsoletes: mlnx-ofa_kernel < 5.4
4342
Obsoletes: mlnx_en-utils < 5.4
4443

44+
BuildRoot: %{?build_root:%{build_root}}%{!?build_root:/var/tmp/%{name}}
45+
4546
%description
4647
Mellanox userland tools and scripts
4748

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

5556
%prep
56-
%autosetup -n %{name}-%{version}
57-
58-
%build
57+
%setup -n %{name}-%{version}
5958

6059
%install
60+
rm -rf %{buildroot}
6161

6262
add_env()
6363
{
@@ -74,37 +74,47 @@ EOF
7474
}
7575

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

84-
if [ "$(echo %{_prefix} | sed -e 's@/@@g')" != "usr" ]; then
84+
%if "%{_prefix}" != "/usr"
8585
conf_env=/etc/profile.d/mlnx-tools.sh
8686
install -d %{buildroot}/etc/profile.d
87-
add_env %{buildroot}$conf_env PYTHONPATH $mlnx_python_sitelib
8887
add_env %{buildroot}$conf_env PATH %{_bindir}
8988
add_env %{buildroot}$conf_env PATH %{_sbindir}
9089
echo $conf_env >> mlnx-tools-files
91-
fi
92-
find %{buildroot}${mlnx_python_sitelib} -type f -print | sed -e 's@%{buildroot}@@' >> mlnx-tools-files
90+
%endif
91+
92+
%clean
93+
rm -rf %{buildroot}
9394

95+
%if "%{_prefix}" != "/usr"
9496
%files -f mlnx-tools-files
97+
%else
98+
%files
99+
%endif
100+
%license LICENSE
95101
%doc doc/*
96-
%license debian/copyright
97102
%defattr(-,root,root,-)
98103
/sbin/sysctl_perf_tuning
99104
/sbin/mlnx_bf_configure
100-
/sbin/mlnx_bf_configure_ct
101105
/sbin/mlnx-sf
102106
%{_sbindir}/*
103107
%{_bindir}/*
104-
%{_mandir}/man8/ib2ib_setup.8*
108+
%{_mandir}/man8/*.8*
109+
%{python_dir}/dcbnetlink.py*
110+
%{python_dir}/netlink.py*
111+
%exclude %{python_dir}/__pycache__/*.pyc
105112
/lib/udev/mlnx_bf_udev
106113

107114
%changelog
115+
* Thu Jan 09 2025 Alberto David Perez Guevara <aperezguevar@microsoft.com> 24.10-1
116+
- Upgrade package to version 24.10
117+
108118
* Fri Jul 22 2022 Rachel Menge <rachelmenge@microsoft.com> 5.2.0-2
109119
- Initial CBL-Mariner import from NVIDIA (license: GPLv2).
110120
- Lint spec to conform to Mariner
@@ -113,5 +123,5 @@ find %{buildroot}${mlnx_python_sitelib} -type f -print | sed -e 's@%{buildroot}@
113123
* Wed May 12 2021 Tzafrir Cohen <nvidia@cohens.org.il> - 5.2.0-1
114124
- MLNX_OFED branch
115125

116-
* Wed Nov 1 2017 Vladimir Sokolovsky <vlad@mellanox.com> - 4.6.0-1
126+
* Wed Nov 01 2017 Vladimir Sokolovsky <vlad@mellanox.com> - 4.6.0-1
117127
- Initial packaging
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"Signatures": {
3+
"ofed-docs-24.10.tar.gz": "ca307e3ef7407d9f4386fe021dd3f130d114f793884e60493ae129fdc83f7478"
4+
}
5+
}

SPECS/ofed-docs/ofed-docs.spec

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#
2+
# Copyright (c) 2012 Mellanox Technologies. All rights reserved.
3+
#
4+
# This Software is licensed under one of the following licenses:
5+
#
6+
# 1) under the terms of the "Common Public License 1.0" a copy of which is
7+
# available from the Open Source Initiative, see
8+
# http://www.opensource.org/licenses/cpl.php.
9+
#
10+
# 2) under the terms of the "The BSD License" a copy of which is
11+
# available from the Open Source Initiative, see
12+
# http://www.opensource.org/licenses/bsd-license.php.
13+
#
14+
# 3) under the terms of the "GNU General Public License (GPL) Version 2" a
15+
# copy of which is available from the Open Source Initiative, see
16+
# http://www.opensource.org/licenses/gpl-license.php.
17+
#
18+
# Licensee has the right to choose one of the above licenses.
19+
#
20+
# Redistributions of source code must retain the above copyright
21+
# notice and one of the license notices.
22+
#
23+
# Redistributions in binary form must reproduce both the above copyright
24+
# notice, one of the license notices in the documentation
25+
# and/or other materials provided with the distribution.
26+
#
27+
#
28+
# $Id: ofed-docs.spec 7948 2006-06-13 12:42:34Z vlad $
29+
#
30+
31+
%global MLNX_OFED_VERSION 24.10-0.7.0.0
32+
Summary: OFED docs
33+
Name: ofed-docs
34+
Version: 24.10
35+
Release: 1%{?dist}
36+
License: GPLv2
37+
Vendor: Microsoft Corporation
38+
Distribution: Azure Linux
39+
URL: https://www.openfabrics.org
40+
Source0: https://linux.mellanox.com/public/repo/mlnx_ofed/%{MLNX_OFED_VERSION}/SRPMS/%{name}-%{version}.tar.gz
41+
Group: Documentation/Man
42+
43+
BuildRoot: %{?build_root:%{build_root}}%{!?build_root:/var/tmp/%{name}-%{version}-root}
44+
45+
%description
46+
OpenFabrics documentation
47+
48+
%prep
49+
%setup -q -n %{name}-%{version}
50+
51+
%install
52+
mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}
53+
cp -a * $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}
54+
55+
%clean
56+
rm -rf $RPM_BUILD_ROOT
57+
58+
%files
59+
%license LICENSE
60+
%defattr(-,root,root)
61+
%{_defaultdocdir}/%{name}-%{version}
62+
63+
%changelog
64+
* Wed Jan 08 2025 Alberto David Perez Guevara <aperezguevar@microsoft.com> 24.10-1
65+
- Initial Azure Linux import from NVIDIA (license: GPLv2).
66+
- License verified.
67+
68+
* Sun Mar 25 2007 Vladimir Sokolovsky <vlad@mellanox.co.il>
69+
- Changed prefix
70+
71+
* Thu Jul 27 2006 Vladimir Sokolovsky <vlad@mellanox.co.il>
72+
- Changed version to 1.1
73+
74+
* Tue Jun 06 2006 Vladimir Sokolovsky <vlad@mellanox.co.il>
75+
- Initial packaging
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"Signatures": {
3-
"ofed-scripts-5.6.tar.gz": "43c4b4feef0101d68774ca6f7780eacd5d888beaf6514b155d7987337f1aa968"
3+
"ofed-scripts-24.10.tar.gz": "c27e6739dd878e8879945e8d15b5d0950a5b80597a21b60e1018bf707e281f20"
44
}
55
}

0 commit comments

Comments
 (0)