-
Notifications
You must be signed in to change notification settings - Fork 27
/
mlxbf-bfscripts.spec.rpkg
153 lines (130 loc) · 4.75 KB
/
mlxbf-bfscripts.spec.rpkg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
%global debug_package %{nil}
Summary: Utility scripts for managing Mellanox BlueField hardware
Name: mlxbf-bfscripts
Version: 3.6.0
URL: https://github.com/Mellanox/bfscripts
Release: 1%{?dist}
License: BSD
BuildArch: noarch
# Source is created by:
# git clone https://github.com/Mellanox/bfscripts
# cd bfscripts
# git checkout {{{ v=$(git describe --tags); if grep -q -- '-g' <<<"$v"; then printf $(git rev-parse HEAD); else printf "$v"; fi }}}
# rpkg spec --sources
Source: {{{ name=$(rpmspec -q --qf "%{name}-%{version}\n" mlxbf-bfscripts.spec.rpkg); git_dir_pack dir_name="$name" source_name="$name".tar.gz }}}
BuildRequires: systemd-rpm-macros
BuildRequires: python3-devel
BuildRequires: /usr/bin/pathfix.py
Requires: mlxbf-bootctl
# Note: mlxbf-bootimages is provided by mlxbf-aarch64-firmware on Fedora.
Requires: mlxbf-bootimages
Requires: bash
Requires: python3
Requires: grub2-tools
Requires: dosfstools
Requires: e2fsprogs
Requires: efibootmgr
Requires: pciutils
Requires: util-linux
Requires: binutils
Requires: systemd
%description
Useful scripts for managing Mellanox BlueField hardware.
%prep
%setup
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" mlx-mkbfb
%build
exit 0
%install
%global installdir %{buildroot}%{_bindir}
%global man1dir %{buildroot}%{_mandir}/man1
%global man8dir %{buildroot}%{_mandir}/man8
mkdir -p %{installdir}
install -p -d %{man1dir}
install -p -d %{man8dir}
install -p bfbootmgr %{installdir}
install -p man/bfbootmgr.8 %{man8dir}
install -p bfcfg %{installdir}
install -p man/bfcfg.8 %{man8dir}
install -p bfcpu-freq %{installdir}
install -p man/bfcpu-freq.8 %{man8dir}
install -p bfdracut %{installdir}
install -p man/bfdracut.8 %{man8dir}
install -p bffamily %{installdir}
install -p man/bffamily.8 %{man8dir}
install -p bfgrubcheck %{installdir}
install -p man/bfgrubcheck.8 %{man8dir}
install -p bfinst %{installdir}
install -p man/bfinst.8 %{man8dir}
install -p bfpxe %{installdir}
install -p man/bfpxe.8 %{man8dir}
install -p bfperf_pmc %{installdir}
install -p man/bfperf_pmc.8 %{man8dir}
install -p bfrec %{installdir}
install -p man/bfrec.8 %{man8dir}
install -p bfsbdump %{installdir}
install -p man/bfsbdump.8 %{man8dir}
install -p bfsbkeys %{installdir}
install -p man/bfsbkeys.8 %{man8dir}
install -p bfsbverify %{installdir}
install -p man/bfsbverify.8 %{man8dir}
install -p bfvcheck %{installdir}
install -p man/bfvcheck.8 %{man8dir}
install -p bfver %{installdir}
install -p man/bfver.8 %{man8dir}
install -p bfacpievt %{installdir}
install -p man/bfacpievt.8 %{man8dir}
install -p bfgrubcheck %{installdir}
install -p man/bfgrubcheck.8 %{man8dir}
install -p bfhcafw %{installdir}
install -p man/bfhcafw.8 %{man8dir}
install -p bfrshlog %{installdir}
install -p man/bfrshlog.8 %{man8dir}
install -p bfup %{installdir}
install -p man/bfup.8 %{man8dir}
install -p mlx-mkbfb %{installdir}
install -p man/mlx-mkbfb.1 %{man1dir}
install -p -d %{buildroot}%{_unitdir}
install -p bfvcheck.service %{buildroot}%{_unitdir}/
install -p bfup.service %{buildroot}%{_unitdir}/
install -p -d %{buildroot}%{_presetdir}
install -p 80-bfvcheck.preset %{buildroot}%{_presetdir}/
install -p 80-bfup.preset %{buildroot}%{_presetdir}/
# Install tweak for fwupd on BlueField
%global fwupdquirkdir %{buildroot}%{_datadir}/fwupd/quirks.d
install -p -d %{fwupdquirkdir}
install -p mlx-uefi.quirk %{fwupdquirkdir}/
%post
%systemd_post bfvcheck.service
%systemd_post bfup.service
%preun
%systemd_preun bfvcheck.service
%systemd_preun bfup.service
%postun
%systemd_postun bfvcheck.service
%systemd_postun bfup.service
%files
%license LICENSE
%{_bindir}/bf*
%{_bindir}/mlx-mkbfb
%attr(644, root, root) %{_mandir}/man1/*
%attr(644, root, root) %{_mandir}/man8/*
%attr(644, root, root) %{_unitdir}/bfvcheck.service
%attr(644, root, root) %{_unitdir}/bfup.service
%attr(644, root, root) %{_presetdir}/80-bfvcheck.preset
%attr(644, root, root) %{_presetdir}/80-bfup.preset
%attr(644, root, root) %{_datadir}/fwupd/quirks.d/mlx-uefi.quirk
%doc README.md
%changelog
* Thu May 20 2021 Spencer Lingard <[email protected]> - 3.6.0-1
- Update version number to 3.6.0-1
* Fri Jul 24 2020 Spencer Lingard <[email protected]> - 3.0.0~beta1-3
- Add -p to all install invocations
- Change __install macro to just install
- Add autogenerated comment to Source to tell how to obtain sources
* Tue Jul 21 2020 Spencer Lingard <[email protected]> - 3.0.0~beta1-2
- Use systemd macros for unit setup
- Use preset file instead of enabling service manually
- Fix Requires/BuildRequires
* Wed Jul 1 2020 Spencer Lingard <[email protected]> - 3.0.0~beta1-1
Initial packaging.