import ppc64-diag-2.7.6-2.el8

This commit is contained in:
CentOS Sources 2020-05-14 22:37:31 +00:00 committed by Stepan Oksanichenko
parent c0af006198
commit 3169f53322
1 changed files with 66 additions and 22 deletions

View File

@ -1,25 +1,34 @@
# BZ#860040:
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/servevent_parse.pl
Name: ppc64-diag Name: ppc64-diag
Version: 2.7.6 Version: 2.7.6
Release: 1%{?dist} Release: 2%{?dist}
Summary: PowerLinux Platform Diagnostics Summary: PowerLinux Platform Diagnostics
URL: http://sourceforge.net/projects/linux-diag/files/ppc64-diag/ URL: https://github.com/power-ras/ppc64-diag
Group: System Environment/Base Group: System Environment/Base
License: GPLv2 License: GPLv2
ExclusiveArch: ppc %{power64} ExclusiveArch: ppc %{power64}
BuildRequires: libservicelog-devel, flex, perl-interpreter, byacc
BuildRequires: libvpd-devel, systemd-units BuildRequires: libservicelog-devel
BuildRequires: flex
BuildRequires: perl-interpreter
BuildRequires: byacc
BuildRequires: libvpd-devel
BuildRequires: systemd-units
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: librtas-devel >= 1.4.0 BuildRequires: librtas-devel >= 1.4.0
BuildRequires: systemd-devel BuildRequires: systemd-devel
BuildRequires: libtool BuildRequires: libtool
BuildRequires: bison BuildRequires: bison
Requires: servicelog, lsvpd Requires: ppc64-diag-rtas >= 2.7.6
# PCI hotplug support on PowerKVM guest depends on below Requires: servicelog
# powerpc-utils version. Requires: lsvpd
# PCI hotplug support on PowerKVM guest depends on below powerpc-utils version.
Requires: powerpc-utils >= 1.3.0 Requires: powerpc-utils >= 1.3.0
Source0: http://downloads.sourceforge.net/project/linux-diag/ppc64-diag/v%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/power-ras/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: add_regex.8 Source1: add_regex.8
Source2: convert_dt_node_props.8 Source2: convert_dt_node_props.8
Source3: extract_opal_dump.8 Source3: extract_opal_dump.8
@ -43,19 +52,21 @@ predictive failures, if appropriate modifies the FRUs fault
indicator(s) and provides event notification to system indicator(s) and provides event notification to system
administrators or connected service frameworks. administrators or connected service frameworks.
# BZ#860040: %package rtas
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/servevent_parse.pl Summary: rtas_errd daemon
Requires: powerpc-utils-core >= 1.3.6-6
%description rtas
This package contains only rtas_errd daemon.
%prep %prep
%autosetup -p1 %autosetup -p1
%build %build
./autogen.sh ./autogen.sh
%configure %configure
LDFLAGS="%{build_ldflags}" CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cflags}" make %{?_smp_mflags} V=1 LDFLAGS="%{build_ldflags}" CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cflags}" make %{?_smp_mflags} V=1
%install %install
make install DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT
chmod 644 COPYING chmod 644 COPYING
@ -81,7 +92,6 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} $RPM_BUILD
%dir %{_localstatedir}/log/dump %dir %{_localstatedir}/log/dump
%dir %{_localstatedir}/log/opal-elog %dir %{_localstatedir}/log/opal-elog
%{_mandir}/man8/* %{_mandir}/man8/*
%config(noreplace) %{_sysconfdir}/%{name}/ppc64-diag.config
%{_sbindir}/* %{_sbindir}/*
%dir %{_datadir}/%{name} %dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/message_catalog/ %dir %{_datadir}/%{name}/message_catalog/
@ -93,25 +103,43 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} $RPM_BUILD
%{_libexecdir}/%{name}/lp_diag_notify %{_libexecdir}/%{name}/lp_diag_notify
%{_libexecdir}/%{name}/servevent_parse.pl %{_libexecdir}/%{name}/servevent_parse.pl
%{_datadir}/%{name}/message_catalog/* %{_datadir}/%{name}/message_catalog/*
%{_sysconfdir}/rc.powerfail
%{_libexecdir}/%{name}/rtas_errd
%{_libexecdir}/%{name}/opal_errd
%{_unitdir}/rtas_errd.service
%{_unitdir}/opal_errd.service %{_unitdir}/opal_errd.service
%{_sysconfdir}/cron.daily/run_diag_encl %{_sysconfdir}/cron.daily/run_diag_encl
# get rid of obsolete initscripts for rhel >=7
%exclude %{_libexecdir}/%{name}/rtas_errd
%exclude %{_libexecdir}/%{name}/opal_errd
# exclude stuffs which are moved to rtas
%exclude %{_mandir}/man8/convert_dt_node_props*
%exclude %{_mandir}/man8/extract_platdump*
%exclude %{_mandir}/man8/rtas_errd*
%exclude %{_sbindir}/convert_dt_node_props
%exclude %{_sbindir}/extract_platdump
%exclude %{_sbindir}/rtas_errd
%files rtas
%license COPYING
%dir %{_sysconfdir}/%{name}
%{_mandir}/man8/convert_dt_node_props*
%{_mandir}/man8/extract_platdump*
%{_mandir}/man8/rtas_errd*
%config(noreplace) %{_sysconfdir}/%{name}/ppc64-diag.config
%{_sbindir}/convert_dt_node_props
%{_sbindir}/extract_platdump
%{_sbindir}/rtas_errd
%{_sysconfdir}/rc.powerfail
%{_unitdir}/rtas_errd.service
%post %post
# Post-install script -------------------------------------------------- # Post-install script --------------------------------------------------
%{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1 %{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1
%{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1 %{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1
if [ "$1" = "1" ]; then # first install if [ "$1" = "1" ]; then # first install
systemctl -q enable opal_errd.service >/dev/null 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 opal_errd.service >/dev/null
systemctl start rtas_errd.service >/dev/null
elif [ "$1" = "2" ]; then # upgrade elif [ "$1" = "2" ]; then # upgrade
systemctl restart opal_errd.service >/dev/null systemctl restart opal_errd.service >/dev/null
systemctl restart rtas_errd.service >/dev/null
systemctl daemon-reload > /dev/null 2>&1 systemctl daemon-reload > /dev/null 2>&1
fi fi
@ -119,9 +147,7 @@ fi
# Pre-uninstall script ------------------------------------------------- # Pre-uninstall script -------------------------------------------------
if [ "$1" = "0" ]; then # last uninstall if [ "$1" = "0" ]; then # last uninstall
systemctl stop opal_errd.service >/dev/null systemctl stop opal_errd.service >/dev/null
systemctl stop rtas_errd.service >/dev/null
systemctl -q disable opal_errd.service systemctl -q disable opal_errd.service
systemctl -q disable rtas_errd.service
%{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null %{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null
%{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null %{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null
systemctl daemon-reload > /dev/null 2>&1 systemctl daemon-reload > /dev/null 2>&1
@ -134,8 +160,26 @@ if [ "$2" = "2" ]; then
systemctl restart rtas_errd.service >/dev/null systemctl restart rtas_errd.service >/dev/null
fi fi
%post rtas
if [ "$1" = "1" ]; then # first install
systemctl -q enable rtas_errd.service >/dev/null
systemctl start rtas_errd.service >/dev/null
elif [ "$1" = "2" ]; then # upgrade
systemctl restart rtas_errd.service >/dev/null
systemctl daemon-reload > /dev/null 2>&1
fi
%preun rtas
if [ "$1" = "0" ]; then # last uninstall
systemctl stop rtas_errd.service >/dev/null
systemctl -q disable rtas_errd.service
systemctl daemon-reload > /dev/null 2>&1
fi
%changelog %changelog
* Thu Mar 26 2020 Than Ngo <than@redhat.com> - 2.7.6-2
- Resolves: #1814335, create rtas subpackage to avoid the perl dependency
* Thu Nov 07 2019 Than Ngo <than@redhat.com> - 2.7.6-1 * Thu Nov 07 2019 Than Ngo <than@redhat.com> - 2.7.6-1
- Resolves: #1725200, rebase to 2.7.6 - Resolves: #1725200, rebase to 2.7.6