create rtas subpackage to avoid the perl dependency
This commit is contained in:
parent
b0f4d0f940
commit
01215790c0
@ -1,6 +1,6 @@
|
||||
Name: ppc64-diag
|
||||
Version: 2.7.6
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: PowerLinux Platform Diagnostics
|
||||
URL: https://github.com/power-ras/%{name}
|
||||
License: GPLv2
|
||||
@ -18,10 +18,9 @@ BuildRequires: systemd-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: bison
|
||||
|
||||
Requires: servicelog, lsvpd
|
||||
# PCI hotplug support on PowerKVM guest depends on below
|
||||
# powerpc-utils version.
|
||||
Requires: powerpc-utils >= 1.3.0
|
||||
Requires: ppc64-diag-rtas >= 2.7.6
|
||||
Requires: servicelog
|
||||
Requires: lsvpd
|
||||
|
||||
Source0: https://github.com/power-ras/p%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
# fix paths and permissions
|
||||
@ -40,19 +39,22 @@ 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
|
||||
# PCI hotplug support on PowerKVM guest depends on below powerpc-utils version.
|
||||
Requires: powerpc-utils-core >= 1.3.0
|
||||
|
||||
%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
|
||||
@ -74,7 +76,6 @@ ln -sfv %{_sbindir}/usysattn $RPM_BUILD_ROOT/%{_sbindir}/usysfault
|
||||
%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/
|
||||
@ -86,36 +87,54 @@ ln -sfv %{_sbindir}/usysattn $RPM_BUILD_ROOT/%{_sbindir}/usysfault
|
||||
%{_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
|
||||
|
||||
%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
|
||||
systemctl daemon-reload > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
%triggerin -- librtas
|
||||
@ -125,8 +144,27 @@ 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
|
||||
* Sat Mar 28 2020 Than Ngo <than@redhat.com> - 2.7.6-4
|
||||
- create rtas subpackage to avoid the perl dependency
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.6-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user