forked from Mellanox/rshim-user-space
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrshim.spec.in
133 lines (111 loc) · 4.03 KB
/
rshim.spec.in
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
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2019 Mellanox Technologies. All Rights Reserved.
#
Name: rshim
Version: @VERSION@
Release: 3%{?dist}
Summary: User-space driver for Mellanox BlueField SoC
License: GPLv2
URL: https://github.com/mellanox/rshim-user-space
Source0: https://github.com/mellanox/rshim-user-space/archive/%{name}-%{version}.tar.gz
BuildRequires: gcc, autoconf, automake, pkgconfig, make
BuildRequires: pkgconfig(libpci), pkgconfig(libusb-1.0), pkgconfig(fuse)
%if 0%{?rhel} >= 8 || 0%{?fedora} > 0
Requires: kernel-modules-extra
%endif
%global with_systemd %(if (test -d "%{_unitdir}" > /dev/null); then echo -n '1'; else echo -n '0'; fi)
%description
This is the user-space driver to access the BlueField SoC via the rshim
interface. It provides ways to push boot stream, debug the target or login
via the virtual console or network interface.
%prep
rm -fr %{name}-%{version}
mkdir %{name}-%{version}
tar -axf %{SOURCE0} -C %{name}-%{version} --strip-components 1
%setup -q -D -T
%build
./bootstrap.sh
%configure
%if %{?make_build:1}%{!?make_build:0}
%make_build
%else
make
%endif
%install
%undefine _missing_build_ids_terminate_build
%makeinstall -C src INSTALL_DIR="%{buildroot}%{_sbindir}"
%if "%{with_systemd}" == "1"
%{__install} -d %{buildroot}%{_unitdir}
%{__install} -m 0644 rshim.service %{buildroot}%{_unitdir}
%endif
%{__install} -d %{buildroot}%{_mandir}/man8
%{__install} -m 0644 man/rshim.8 %{buildroot}%{_mandir}/man8
%{__install} -d %{buildroot}%{_sysconfdir}
%{__install} -m 0644 etc/rshim.conf %{buildroot}%{_sysconfdir}
%post
%if "%{with_systemd}" == "1"
systemctl daemon-reload
systemctl enable rshim.service
%endif
%preun
%if "%{with_systemd}" == "1"
systemctl stop rshim
%else
killall -9 rshim
%endif
%files
%{!?_licensedir:%global license %%doc}
%license LICENSE
%defattr(-,root,root,-)
%doc README.md
%config(noreplace) %{_sysconfdir}/rshim.conf
%if "%{with_systemd}" == "1"
%{_unitdir}/rshim.service
%endif
%{_sbindir}/rshim
%{_mandir}/man8/rshim.8.gz
%changelog
* Mon Aug 17 2020 Liming Sun <lsun@mellanox.com> - 2.0.5-3
- Fix several coverity warnings
- Add workaround to boot Viper rev A0 in LiveFish mode
- Display/configure OPN string for BlueField-2
* Fri Jul 24 2020 Liming Sun <lsun@mellanox.com> - 2.0.5-2
- Add configuration file support
- misc: Display device version / revision ID
- Add service file for FreeBSD
* Tue Jun 16 2020 Liming Sun <lsun@mellanox.com> - 2.0.5-1
- Improve response time to ctrl+c for boot stream
- Fix a rpmbuild issue when make_build is not defined
- Add DROP_MODE configuration in misc file
- Avoid reading the fifo if still booting
- Fix configure issue for FreeBSD 12.1-RELEASE
- Add domain id to the DEV_NAME in the misc file
- Fix the debian copyright format
- Enhance rshim_pcie_enable function
* Tue Apr 21 2020 Liming Sun <lsun@mellanox.com> - 2.0.4-1
- Update .spec file according to review comments
- Fix the 'KillMode' in rshim.service
- Support process termination by SIGTERM
- Fix some compiling warnings and configure issue for FreeBSD
- Fix a read()/write() issue in rshim_pcie.c caused by optimization
* Tue Apr 14 2020 Liming Sun <lsun@mellanox.com> - 2.0.3-1
- Enable pci device during probing
- Map the pci resource0 file instead of /dev/mem
- Add copyright header in bootstrap.sh
- Add 'Requires' tag check in the rpm .spec for kernel-modules-extra
- Fix the 'rshim --version' output
* Thu Apr 09 2020 Liming Sun <lsun@mellanox.com> - 2.0.2-1
- Remove unnecessary dependency in .spec and use make_build
- Add package build for debian/ubuntu
- Fix some format in the man page
- Add check for syslog headers
* Mon Mar 23 2020 Liming Sun <lsun@mellanox.com> - 2.0.1-1
- Rename bfrshim to rshim
- Remove rshim.spec since it's auto-generated from rshim.spec.in
- Fix some warnings reported by coverity
- Add file rhel/rshim.spec.in for fedora
- Move rshim to sbin and move man page to man8
* Fri Mar 13 2020 Liming Sun <lsun@mellanox.com> - 2.0-1
- Update the spec file according to fedora packaging-guidelines
* Mon Dec 16 2019 Liming Sun <lsun@mellanox.com>
- Initial packaging