Blame SPECS/opal-prd.spec

902ecd
%global project skiboot
31e3da
e9f1d7
Name: opal-prd
e9f1d7
Version: 6.2
e9f1d7
Release: 3%{?dist}
e9f1d7
Summary: OPAL Processor Recovery Diagnostics Daemon
31e3da
e9f1d7
Group: System Environment/Daemons
e9f1d7
License: ASL 2.0
e9f1d7
URL: http://github.com/open-power/skiboot
31e3da
902ecd
# Presently opal-prd is supported on ppc64le architecture only.
e9f1d7
ExclusiveArch: ppc64le
902ecd
902ecd
BuildRequires:	systemd
902ecd
BuildRequires:	gcc
902ecd
%if 0%{?fedora}
e9f1d7
BuildRequires: gcc-powerpc64-linux-gnu
902ecd
%endif
e9f1d7
BuildRequires: openssl-devel
902ecd
e9f1d7
Requires(post): systemd
e9f1d7
Requires(preun): systemd
e9f1d7
Requires(postun): systemd
902ecd
e9f1d7
Source0: https://github.com/open-power/%{project}/archive/v%{version}/%{project}-%{version}.tar.gz
9bde56
Source1: opal-prd-rsyslog
9bde56
Source2: opal-prd-logrotate
403ce0
31e3da
%description
31e3da
This package provides a daemon to load and run the OpenPower firmware's
31e3da
Processor Recovery Diagnostics binary. This is responsible for run time
31e3da
maintenance of OpenPower Systems hardware.
31e3da
31e3da
31e3da
%package -n	opal-utils
902ecd
Summary:	OPAL firmware utilities
902ecd
Group:		Applications/System
31e3da
31e3da
%description -n opal-utils
31e3da
This package contains utility programs.
31e3da
31e3da
The 'gard' utility, can read, parse and clear hardware gard partitions
31e3da
on OpenPower platforms. The 'getscom' and 'putscom' utilities provide
31e3da
an interface to query or modify the registers of the different chipsets
31e3da
of an OpenPower system. 'pflash' is a tool to access the flash modules
31e3da
on such systems and update the OpenPower firmware.
31e3da
31e3da
%package -n	opal-firmware
31e3da
Summary:	OPAL firmware
31e3da
BuildArch:	noarch
31e3da
31e3da
%description -n	opal-firmware
31e3da
OPAL firmware, aka skiboot, loads the bootloader and provides runtime
31e3da
services to the OS (Linux) on IBM Power and OpenPower systems.
31e3da
31e3da
%prep
31e3da
902ecd
%setup -q -n %{project}-%{version}
31e3da
31e3da
%build
902ecd
OPAL_PRD_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" -C external/opal-prd
902ecd
GARD_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" -C external/gard
902ecd
PFLASH_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" -C external/pflash
902ecd
XSCOM_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" -C external/xscom-utils
902ecd
902ecd
# build skiboot with a cross-compiler on Fedora and with system compiler otherwise
902ecd
# and always use upstream compiler flags for the firmware (no CFLAGS override)
902ecd
%if 0%{?fedora}
902ecd
SKIBOOT_VERSION=%{version} make V=1 CROSS="powerpc64-linux-gnu-"
902ecd
%else
902ecd
SKIBOOT_VERSION=%{version} make V=1 CROSS=
902ecd
%endif
31e3da
31e3da
%install
31e3da
make -C external/opal-prd install DESTDIR=%{buildroot} prefix=/usr
31e3da
make -C external/gard install DESTDIR=%{buildroot} prefix=/usr
9bde56
make -C external/pflash install DESTDIR=%{buildroot} prefix=/usr
9bde56
make -C external/xscom-utils install DESTDIR=%{buildroot} prefix=/usr
9bde56
31e3da
mkdir -p %{buildroot}%{_unitdir}
902ecd
install -m 644 -p external/opal-prd/opal-prd.service %{buildroot}%{_unitdir}/opal-prd.service
31e3da
31e3da
mkdir -p %{buildroot}%{_datadir}/qemu
31e3da
install -m 644 -p skiboot.lid %{buildroot}%{_datadir}/qemu/skiboot.lid
902ecd
install -m 644 -p skiboot.lid.xz %{buildroot}%{_datadir}/qemu/skiboot.lid.xz
31e3da
9bde56
# log opal-prd messages to /var/log/opal-prd.log
9bde56
mkdir -p %{buildroot}%{_sysconfdir}/{rsyslog.d,logrotate.d}
e9f1d7
install -m 644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/rsyslog.d/opal-prd.conf 
9bde56
install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/logrotate.d/opal-prd
9bde56
31e3da
%post
31e3da
%systemd_post opal-prd.service
31e3da
31e3da
%preun
31e3da
%systemd_preun opal-prd.service
31e3da
31e3da
%postun
31e3da
%systemd_postun_with_restart opal-prd.service
31e3da
31e3da
%files
f59131
%doc README.md
31e3da
%license LICENCE
9bde56
%config(noreplace) %{_sysconfdir}/logrotate.d/opal-prd
e9f1d7
%config(noreplace) %{_sysconfdir}/rsyslog.d/opal-prd.conf 
31e3da
%{_sbindir}/opal-prd
31e3da
%{_unitdir}/opal-prd.service
31e3da
%{_mandir}/man8/*
31e3da
31e3da
%files -n opal-utils
f59131
%doc README.md
31e3da
%license LICENCE
31e3da
%{_sbindir}/opal-gard
31e3da
%{_sbindir}/getscom
31e3da
%{_sbindir}/putscom
31e3da
%{_sbindir}/pflash
e9f1d7
%{_sbindir}/getsram
31e3da
%{_mandir}/man1/*
31e3da
31e3da
%files -n opal-firmware
f59131
%doc README.md
31e3da
%license LICENCE
31e3da
%{_datadir}/qemu/
31e3da
31e3da
%changelog
e9f1d7
* Wed May 22 2019 Than Ngo <than@redhat.com> - 6.2-3
e9f1d7
- Related: #1579164, log messages to /var/log/opal-prd.log 
9bde56
e9f1d7
* Thu Dec 20 2018 Than Ngo <than@redhat.com> - 6.2-2
e9f1d7
- add man pages for getscom, pflash, putscom
9bde56
e9f1d7
* Tue Dec 18 2018 Than Ngo <than@redhat.com> - 6.2-1
e9f1d7
- Resolves: #1640691, rebase to 6.2
e9f1d7
- Resolves: #1579164, log messages to /var/log/opal-prd.log
e9f1d7
- Resolves: #1660113, opal-prd occ reset causes hardlockup
9bde56
902ecd
* Thu Jun 28 2018 Than Ngo <than@redhat.com> - 6.0.4-2
902ecd
- Resolves: #1596245 - "diag_encl -d" creates xml file with blank space in file name
902ecd
902ecd
* Thu Jun 21 2018 Than Ngo <than@redhat.com> - 6.0.4-1
902ecd
- Resolves: #1537001 - update to 6.0.4
902ecd
403ce0
* Mon Jan 22 2018 Than Ngo <than@redhat.com> - 5.9-2
403ce0
- Related: rhbz#1456536 - add support for runtime OCC load/start in ZZ
403ce0
403ce0
* Tue Oct 31 2017 Dan HorĂ¡k <dhorak@redhat.com> - 5.9-1
403ce0
- Resolves: rhbz#1456536 - opal-prd update to 5.9
403ce0
403ce0
* Wed Oct 25 2017 Than Ngo <than@redhat.com> - 5.8-1
403ce0
- Resolves: rhbz#1456536 - opal-prd update to 5.8
403ce0
f59131
* Thu Apr 20 2017 Rafael Fonseca <rdossant@redhat.com> - 5.5.0-1
f59131
- Resolves: rhbz#1368702 - [Pegas1.0 FEAT] opal-prd package update
f59131
f59131
* Tue Mar 14 2017 Rafael Fonseca <rdossant@redhat.com> - 5.4.3-2
f59131
- Resolves: rhbz#1430332 - Restart opal-prd daemon on any kind of failure
f59131
f59131
* Wed Jan 18 2017 Rafael Fonseca <rdossant@redhat.com> - 5.4.3-1
f59131
- Resolves: rhbz#1384952 - [7.4 FEAT] opal-prd package update for ppc64le
f59131
31e3da
* Thu Sep 22 2016 Rafael Fonseca <rdossant@redhat.com> - 5.2.0-3
31e3da
- Resolves: rhbz#1375449
31e3da
31e3da
* Thu Aug 25 2016 Rafael Fonseca <rdossant@redhat.com> - 5.2.0-2
31e3da
- Resolves: rhbz#1367342
31e3da
- Remove systemd socket.
31e3da
31e3da
* Fri May 20 2016 Rafael dos Santos <rdossant@redhat.com> - 5.2.0-1
31e3da
- Importing package from Fedora.
31e3da