From 3169f53322426cf1df3f9115d9a7eabc067382f7 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Thu, 14 May 2020 22:37:31 +0000 Subject: [PATCH] import ppc64-diag-2.7.6-2.el8 --- SPECS/ppc64-diag.spec | 88 ++++++++++++++++++++++++++++++++----------- 1 file changed, 66 insertions(+), 22 deletions(-) diff --git a/SPECS/ppc64-diag.spec b/SPECS/ppc64-diag.spec index f780b1a..8cae2c8 100644 --- a/SPECS/ppc64-diag.spec +++ b/SPECS/ppc64-diag.spec @@ -1,25 +1,34 @@ +# BZ#860040: +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/servevent_parse.pl + Name: ppc64-diag Version: 2.7.6 -Release: 1%{?dist} +Release: 2%{?dist} 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 License: GPLv2 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: librtas-devel >= 1.4.0 BuildRequires: systemd-devel BuildRequires: libtool BuildRequires: bison -Requires: servicelog, lsvpd -# PCI hotplug support on PowerKVM guest depends on below -# powerpc-utils version. +Requires: ppc64-diag-rtas >= 2.7.6 +Requires: servicelog +Requires: 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/v%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/power-ras/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: add_regex.8 Source2: convert_dt_node_props.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 administrators or connected service frameworks. -# BZ#860040: -%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/servevent_parse.pl +%package rtas +Summary: rtas_errd daemon +Requires: powerpc-utils-core >= 1.3.6-6 + +%description rtas +This package contains only rtas_errd daemon. %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 @@ -81,7 +92,6 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} $RPM_BUILD %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/ @@ -93,25 +103,43 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} $RPM_BUILD %{_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 +# 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-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 systemctl daemon-reload > /dev/null 2>&1 fi @@ -119,9 +147,7 @@ fi # 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 systemctl daemon-reload > /dev/null 2>&1 @@ -134,8 +160,26 @@ if [ "$2" = "2" ]; then systemctl restart rtas_errd.service >/dev/null 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 +* Thu Mar 26 2020 Than Ngo - 2.7.6-2 +- Resolves: #1814335, create rtas subpackage to avoid the perl dependency + * Thu Nov 07 2019 Than Ngo - 2.7.6-1 - Resolves: #1725200, rebase to 2.7.6