import ppc64-diag-2.7.6-2.el8
This commit is contained in:
parent
c0af006198
commit
3169f53322
@ -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 <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
|
||||
- Resolves: #1725200, rebase to 2.7.6
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user