-
Notifications
You must be signed in to change notification settings - Fork 20
/
ppc64-diag.spec.in
289 lines (241 loc) · 10.5 KB
/
ppc64-diag.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
%define name @PACKAGE_NAME@
%define version @PACKAGE_VERSION@
%define release 1
Name: %{name}
Version: %{version}
Release: %{release}
Summary: PowerLinux Platform Diagnostics
Group: System Environment/Base
License: GNU General Public License (GPL)
URL: https://github.com/power-ras/%{name}/releases
Packager: IBM Corp.
Vendor: IBM Corp.
ExclusiveArch: ppc ppc64 ppc64le
BuildRequires: libservicelog-devel, flex, perl, /usr/bin/bison
BuildRequires: librtas-devel >= 1.4.0
BuildRequires: ncurses-devel
%if (0%{?fedora} || 0%{?rhel} || 0%{?centos})
BuildRequires: libvpd-devel >= 2.2.9
BuildRequires: systemd-devel
%else
%if 0%{?sle_version}
BuildRequires: libudev-devel
BuildRequires: libvpd2-devel >= 2.2.9
%endif
%endif
Requires: servicelog
Requires: systemd
# License change
Requires: powerpc-utils >= 1.3.2
# Light Path Diagnostics depends on below lsvpd version.
Requires: lsvpd >= 1.7.1
Source0: https://github.com/power-ras/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
%if 0%{?sle_version}
%debug_package
%global _libexecdir %{_exec_prefix}/libexec
%endif
%description
This package contains various diagnostic tools for PowerLinux.
These tools captures the diagnostic events from Power Systems
platform firmware, SES enclosures and device drivers, and
write events to servicelog database. It also provides automated
responses to urgent events such as environmental conditions and
predictive failures, if appropriate modifies the FRUs fault
indicator(s) and provides event notification to system
administrators or connected service frameworks.
%prep
%setup -q
%build
./autogen.sh
%configure
make
%install
make install DESTDIR=$RPM_BUILD_ROOT
chmod 644 $RPM_BUILD_ROOT/etc/%{name}/servevent_parse.pl
mkdir -p $RPM_BUILD_ROOT/etc/%{name}/ses_pages
mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}/%{name}
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
mkdir -p $RPM_BUILD_ROOT/var/log/dump
mkdir -p $RPM_BUILD_ROOT/var/log/opal-elog
mkdir -p $RPM_BUILD_ROOT/var/log/ppc64_diag
mkdir -p $RPM_BUILD_ROOT/var/log/ppc64_diag/diag_disk
%files
%defattr (-,root,root,-)
%doc /usr/share/doc/%{name}/COPYING
%doc /usr/share/doc/%{name}/README.md
%doc /usr/share/man/man8/*
/usr/sbin/*
%dir /etc/%{name}
%dir /etc/%{name}/ses_pages
%dir /var/log/ppc64-diag
%dir /var/log/ppc64-diag/diag_disk
%dir /var/log/dump
%dir /var/log/opal-elog
%config /etc/%{name}/*
%config /etc/rc.powerfail
%attr(755,root,root) /etc/cron.daily/run_diag_encl
%attr(755,root,root) /etc/cron.daily/run_diag_nvme
%attr(755,root,root) %{_libexecdir}/%{name}/rtas_errd
%attr(755,root,root) %{_libexecdir}/%{name}/opal_errd
%attr(644,root,root) %{_unitdir}/rtas_errd.service
%attr(644,root,root) %{_unitdir}/opal_errd.service
%post
# Post-install script --------------------------------------------------
# We will install both opal_errd and rtas_errd daemon and during boottime
# daemon will fail gracefully if its not relevant to the running platform
/etc/ppc64-diag/ppc64_diag_setup --register >/dev/null 2>&1
/etc/ppc64-diag/lp_diag_setup --register >/dev/null 2>&1
if [ "$1" = "1" ]; then # first install
systemctl -q enable opal_errd.service >/dev/null
systemctl -q enable rtas_errd.service >/dev/null
systemctl start opal_errd.service >/dev/null
systemctl start rtas_errd.service >/dev/null
elif [ "$1" = "2" ]; then # upgrade
systemctl restart opal_errd.service >/dev/null
systemctl restart rtas_errd.service >/dev/null
systemctl daemon-reload > /dev/null 2>&1
fi
%preun
# Pre-uninstall script -------------------------------------------------
if [ "$1" = "0" ]; then # last uninstall
systemctl stop opal_errd.service >/dev/null
systemctl stop rtas_errd.service >/dev/null
systemctl -q disable opal_errd.service
systemctl -q disable rtas_errd.service
/etc/ppc64-diag/ppc64_diag_setup --unregister >/dev/null
/etc/ppc64-diag/lp_diag_setup --unregister >/dev/null
systemctl daemon-reload > /dev/null 2>&1
fi
%triggerin -- librtas
# trigger on librtas upgrades ------------------------------------------
if [ "$2" = "2" ]; then
systemctl restart rtas_errd.service >/dev/null
fi
%changelog
* Fri Sep 13 2024 - Mahesh Salgaonkar <[email protected]> - 2.7.10
- Add support for multiple platform dumps
- Add support for light path diagnostics for rtas events
- Enable correct display of model and system-id for IPS Power systems
- Fix call home feature for nvmf devices
- Fix crash in rtas_errd due to invalid -f option values
- Fix build warnings with GCC-15
- Update travis build to use v3 supported tags
* Wed Oct 12 2022 - Mahesh Salgaonkar <[email protected]> - 2.7.9
- Add NVMe diagnostics support (Murilo).
- Update travis build to use fedora37 and Ubuntu22.10
- Few minor bugs fixes.
* Thu Mar 3 2022 - Mahesh Salgaonkar <[email protected]> - 2.7.8
- Update build dependency to use libvpd >= v2.2.9
- Fix extract_opal_dump error message on unsupported platform
- Fix build warning with GCC-8.5 and GCC-11
* Fri Apr 30 2021 - Vasant Hegde <[email protected]> - 2.7.7
- Add travis build support
- rtas_errd: Don't run the service in LXC
- Drop obsolete logging options from systemd service files
- Unit test case improvements
* Tue Sep 10 2019 - Vasant Hegde <[email protected]> - 2.7.6
- opal_errd: Enhance the purging logic of rotate_logs
- diags/cronjob: Include disk diagnostics
- CVE fixes
* Thu Apr 25 2019 - Vasant Hegde <[email protected]> - 2.7.5
- usysident: Add option to scan only the system indicators
- scripts: Fix service scripts
- Various enclosure diagnostics improvements
* Mon Jul 24 2017 - Vasant Hegde <[email protected]> - 2.7.4
- Move to autotools based build environment
- Run diag_encl automatically (via crontab)
- Added disk diagnostics support
- Test case improvement
- Service script improvement
* Tue Dec 6 2016 - Vasant Hegde <[email protected]> - 2.7.3
- LED support for Marvell HDD
- Added support to parse new drc-index device tree property
- ela: remove support on PowerVM LPAR
* Mon Sep 19 2016 - Vasant Hegde <[email protected]> - 2.7.2
- Added slider enclosure diagnostics support
- Added support for eSEL parsing
* Mon May 9 2016 - Vasant Hegde <[email protected]> - 2.7.1
- Fixed endianness issues in diagnostics code
* Tue Jan 19 2016 - Vasant Hegde <[email protected]> - 2.7.0
- Move from EPL to the GNU GPL license
* Sat Nov 7 2015 - Vasant Hegde <[email protected]> - 2.6.10
- LED support on FSP based PowerNV platform
- Few minor bugs fixes
* Mon Jun 29 2015 - Vasant Hegde <[email protected]> - 2.6.9
- Added Home Run (5887) enclosure diagnostics support
- Added PHB hotplugging support for PowerKVM guest
- Fixed LE issue in rtas_errd
- Fixed memory leak in rtas_errd
* Mon May 11 2015 - Vasant Hegde <[email protected]> - 2.6.8
- Cpu and memory hotplugging support for PowerKVM guest
- Various fixes to opal-dump-parse tool
- Few LE related fixes
- Several security fixes across tools
* Fri Aug 15 2014 - Vasant Hegde <[email protected]> - 2.6.7
- Bug fixes in opal_errd and opal-elog-parse
- Added opal-dump-parse tool
- LE support for light path code (usysident, usysattn and lp_diag)
- Switch to systemd based daemon management
- Fixed bashism issues
* Tue Apr 15 2014 - Vasant Hegde <[email protected]> - 2.6.6
- Log rotator for opal_errd
- Dump retention policy for extract_opal_dump
- Couple of fixes in opal_errd and opal-elog-parse file
* Wed Apr 02 2014 - Vasant Hegde <[email protected]> - 2.6.5
- Fixed number of issues in opal_errd and opal-elog-parse code
- Bashism fix
- Fixes to comply with hardened build flags
* Fri Mar 21 2014 - Vasant Hegde <[email protected]> - 2.6.4
- Added support for PowerKVM host (opal_errd, extract_opal_dump)
- Added support to parse PEL format log (opal-elog-parse)
* Fri Mar 07 2014 - Vasant Hegde <[email protected]> - 2.6.3
- Added platform validation code
- Add support for hotplugging qemu pci devices via RTAS event
- Minor bug fixes in rtas_errd code
* Tue Aug 20 2013 - Vasant Hegde <[email protected]> - 2.6.2
- Minor bug fix in diag_encl and encl_led
* Fri Feb 08 2013 - Vasant Hegde <[email protected]> - 2.6.1
- Handler to handle PRRN RTAS notification
* Tue Jan 29 2013 - Vasant Hegde <[email protected]> - 2.6.0-3
- rtas_errd segfault fix in test path (bug #88056)
* Fri Jan 18 2013 - Vasant Hegde <[email protected]> - 2.6.0-2
- Updated ELA catalog for e1000e and cxgb3 driver
* Fri Jan 11 2013 - Vasant Hegde <[email protected]> - 2.6.0-1
- ppc64_diag_notify alignment fix
* Wed Dec 19 2012 - Vasant Hegde <[email protected]> - 2.6.0
- Added Light Path Diagnostics code.
* Fri Nov 23 2012 - Vasant Hegde <[email protected]> - 2.5.1
- 2.5.1 release
* Fri Sep 07 2012 - Vasant Hegde <[email protected]> - 2.5.0
- Introduced new options to diag_encl command (Jim).
- Added bluehawk enclosure diagnostics support (Jim).
- Introduced new command "encl_led" to modify identify/fault indicators
for SCSI enclosures (Jim).
- Fixed bug #78826.
- Added libvpd-devel as compilation dependency.
* Wed May 23 2012 - Vasant Hegde <[email protected]> - 2.4.4
- Fixed bug #80220 and #81288.
* Tue Feb 14 2012 - Jim Keniston <[email protected]> - 2.4.3
- Added message catalogs for the ipr, ixgb, lpfc, and qla2xxx drivers
(Anithra). Fixed bugs #75118, #74636 and #74308. Removed obsolete
ppc64_diag_servagent script.
* Mon Jul 11 2011 - Anithra P Janakiraman <[email protected]> -2.4.2-1
- Minor modifications to GPFS catalog files and syslog_to_svclog.cpp
* Wed Jun 29 2011 - Anithra P Janakiraman <[email protected]> -2.4.2-0
- Added gpfs files to the catalog, updated ppc64-diag-setup notification
commands
* Wed Jun 15 2011 - Jim Keniston <[email protected]> - 2.4.1-0
- Changed Makefiles and rules.mk to build for the default architecture
rather than -m32.
* Tue Feb 22 2011 - Anithra P Janakiraman <[email protected]> - 2.4.0-0
- Added ELA code to the package, made changes to the rules.mk and minor changes
to the spec file.
* Fri Nov 19 2010 - Brad Peters <[email protected]> - 2.3.5-0
- Bug fix adding in support for -e and -l, so that root users can
be notified of serviceable events. Addresses bug #26192
* Wed Feb 24 2010 - Mike Mason <[email protected]> - 2.3.4-2
- Added SIGCHLD handler to clean up servicelog notification scripts.
* Tue Sep 22 2009 - Brad Peters <[email protected]> - 2.3.2-2
- Removed all absolute path references, specifically to /sbin/lsvpd and lsvpd
* Mon Sep 21 2009 - Brad Peters <[email protected]> - 2.3.2-1
- Removed .spec references to aaa_base and insserv, which are SLES specific