ppc64-diag/SPECS/ppc64-diag.spec
2021-11-25 11:52:03 +00:00

270 lines
10 KiB
RPMSpec

Name: ppc64-diag
Version: 2.7.4
Release: 4%{?dist}
Summary: PowerLinux Platform Diagnostics
URL: http://sourceforge.net/projects/linux-diag/files/ppc64-diag/
Group: System Environment/Base
License: GPLv2
ExclusiveArch: ppc %{power64}
BuildRequires: libservicelog-devel, flex, perl-interpreter, byacc
BuildRequires: libvpd-devel, systemd-units
BuildRequires: ncurses-devel
BuildRequires: librtas-devel >= 1.4.0
BuildRequires: systemd-devel
BuildRequires: libtool
Requires: servicelog, lsvpd
# PCI hotplug support on PowerKVM guest depends on below
# powerpc-utils version.
Requires: powerpc-utils >= 1.3.0
Source0: http://downloads.sourceforge.net/project/linux-diag/ppc64-diag/%{version}/%{name}-%{version}.tar.gz
Source1: add_regex.8
Source2: convert_dt_node_props.8
Source3: extract_opal_dump.8
Source4: extract_platdump.8
Source5: rtas_errd.8
# fix paths and permissions
Patch0: ppc64-diag-messagecatalog-location.patch
Patch2: ppc64-diag-scriptlocation.patch
Patch3: ppc64-diag-lpdscriptloc.patch
Patch4: ppc64-diag-permission.patch
# https://sourceforge.net/p/linux-diag/ppc64-diag/ci/608507ea8ed81209204feacbbde40e234d261141/
Patch5: ppc64-diag-service.patch
# 1657757 - diag_encl -d fails with error "Unable to read system"
Patch6: ppc64-diag-2.7.4-d42252e93ea4a80fbad5646399f29ebe2a54013f.patch
Patch7: ppc64-diag-2.7.4-1837ee17e201c66ed13ae1665a08a92fc42cb347.patch
Patch8: ppc64-diag-2.7.4-7be810122b48af0c095c1d1d5e8bd0b124026ed4.patch
Patch9: ppc64-diag-2.7.4-d2ec2733829b69f8b935f328f5cc2396e4c2af70.patch
%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.
# BZ#860040:
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/servevent_parse.pl
%prep
%autosetup -p1
%build
./autogen.sh
%configure
LDFLAGS="%{build_ldflags}" CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cflags}" make %{?_smp_mflags} V=1
%install
make install DESTDIR=$RPM_BUILD_ROOT
chmod 644 COPYING
rm -f $RPM_BUILD_ROOT%{_docdir}/ppc64-diag/*
mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}/%{name}
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/ses_pages
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/log/dump
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/log/opal-elog
ln -sfv %{_sbindir}/usysattn $RPM_BUILD_ROOT/%{_sbindir}/usysfault
install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} $RPM_BUILD_ROOT/%{_mandir}/man8/
%files
%license COPYING
%doc README
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/ses_pages
%dir %{_localstatedir}/log/%{name}/diag_disk
%dir %{_localstatedir}/log/dump
%dir %{_localstatedir}/log/opal-elog
%{_mandir}/man8/*
%config(noreplace) %{_sysconfdir}/%{name}/ppc64-diag.config
%{_sbindir}/*
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/message_catalog/
%{_libexecdir}/%{name}/ppc64_diag_migrate
%{_libexecdir}/%{name}/ppc64_diag_mkrsrc
%{_libexecdir}/%{name}/ppc64_diag_notify
%{_libexecdir}/%{name}/ppc64_diag_setup
%{_libexecdir}/%{name}/lp_diag_setup
%{_libexecdir}/%{name}/lp_diag_notify
%{_libexecdir}/%{name}/servevent_parse.pl
%{_datadir}/%{name}/message_catalog/*
%{_sysconfdir}/rc.powerfail
%{_libexecdir}/%{name}/rtas_errd
%{_libexecdir}/%{name}/opal_errd
%{_unitdir}/rtas_errd.service
%{_unitdir}/opal_errd.service
%{_sysconfdir}/cron.daily/run_diag_encl
%post
# Post-install script --------------------------------------------------
%{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1
%{_libexecdir}/%{name}/ppc64_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
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
%{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null
%{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null
fi
%triggerin -- librtas
# trigger on librtas upgrades ------------------------------------------
if [ "$2" = "2" ]; then
systemctl restart opal_errd.service >/dev/null
systemctl restart rtas_errd.service >/dev/null
fi
%changelog
* Mon Dec 10 2018 Than Ngo <than@redhat.com> - 2.7.4-4
- install missing man pages
* Mon Dec 10 2018 Than Ngo <than@redhat.com> - 2.7.4-3
- create diag_disk path part of installation
- diags: Increase buffer length size to read complete system vpd information
- diags: Remove timestamp from disk health log file
- diags: Create diag_disk log directory manually if not present
Resolves: #1657757
* Thu May 10 2018 Dan Horák <dan[at]danny.cz> - 2.7.4-2
- fix conditition for rtas_errd service (#1575638)
* Fri Mar 09 2018 Than Ngo <than@redhat.com> - 2.7.4-1
- update to latest upstream 2.7.4
* Wed Mar 07 2018 Than Ngo <than@redhat.com> - 2.7.1-6
- fixed bz#1552653 - ppc64-diag: Missing Fedora build flags injection
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon May 9 2016 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2.7.1-1
- Update to latest upstream 2.7.1
* Sat Apr 9 2016 Peter Robinson <pbrobinson@fedoraproject.org> 2.7.0-2
- Rebuild for librtas soname bump
- Use %%license
* Mon Mar 21 2016 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2.7.0-1
- Update to latest upstream 2.7.0
- Change license to GPLv2
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Nov 16 2015 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2.6.10
- Update to latest upstream 2.6.10
* Tue Aug 4 2015 Peter Robinson <pbrobinson@fedoraproject.org> 2.6.7-4
- Make the build verbase as per packaging standards
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu Sep 25 2014 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2.6.7-2
- Update dependency list
* Thu Sep 25 2014 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2.6.7
- Update to latest upstream 2.6.7
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue Apr 15 2014 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2.6.6
- Update to latest upstream 2.6.6
* Wed Apr 02 2014 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2.6.5
- Update to latest upstream 2.6.5
* Fri Mar 21 2014 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2.6.4
- Update to latest upstream 2.6.4
* Fri Mar 07 2014 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2.6.3
- Update to latest upstream 2.6.3
* Thu Oct 10 2013 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2.6.2-3
- Add ppc64le architecture
* Sun Sep 15 2013 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2.6.2-2
- Fix minor build issue.
- Fix PRRN hotplug script location issue
* Wed Aug 21 2013 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2.6.2
- Update to latest upstream 2.6.2
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue May 21 2013 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2.6.1-2
- Add ncurses-devel as build dependency
- Fix script location issue
* Mon May 20 2013 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2.6.1
- Update to latest upstream 2.6.1
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Sep 26 2012 Karsten Hopp <karsten@redhat.com> 2.4.3-6
- revert permissions fix, filter requirement instead
* Mon Sep 24 2012 karsten Hopp <karsten@redhat.com> 2.4.3-4
- fix permissions of servevent_parse.pl
* Fri Jul 27 2012 Lukáš Nykrýn <lnykryn@redhat.com> - 2.4.3-3
- rename .service file
- auto start rtas_errd (#843471)
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri May 04 2012 Karsten Hopp <karsten@redhat.com> 2.4.3-1
- update to 2.4.3
* Wed Feb 15 2012 Karsten Hopp <karsten@redhat.com> 2.4.2-5
- don't strip binaries
- fix some build issues
* Thu Sep 22 2011 Karsten Hopp <karsten@redhat.com> 2.4.2-4
- fix preun and post install scriptlets
* Fri Sep 09 2011 Karsten Hopp <karsten@redhat.com> 2.4.2-3
- add buildrequirement systemd-units for _unitdir rpm macro
- move helper scripts to libexecdir/ppc64-diag
* Wed Sep 07 2011 Karsten Hopp <karsten@redhat.com> 2.4.2-2
- additional fixes for Fedora package review (bugzilla #736062)
* Wed Aug 17 2011 Karsten Hopp <karsten@redhat.com> 2.4.2-1
- initial Fedora version, based on IBM spec file with rpmlint cleanups
- move scripts to /usr/share/ppc-diag
- don't start service automatically after install