Blame SPECS/opal-prd.spec

bf078c
%global project skiboot
bf078c
bf078c
Name: opal-prd
684fce
Version: 6.7.1
684fce
Release: 1%{?dist}
bf078c
Summary: OPAL Processor Recovery Diagnostics Daemon
bf078c
bf078c
Group: System Environment/Daemons
bf078c
License: ASL 2.0
bf078c
URL: http://github.com/open-power/skiboot
bf078c
bf078c
# Presently opal-prd is supported on ppc64le architecture only.
bf078c
ExclusiveArch: ppc64le
bf078c
bf078c
BuildRequires: systemd
684fce
BuildRequires: openssl
bf078c
BuildRequires: gcc
bf078c
%if 0%{?fedora}
bf078c
BuildRequires: gcc-powerpc64-linux-gnu
bf078c
%endif
bf078c
BuildRequires: openssl-devel
684fce
BuildRequires: python3-devel
bf078c
bf078c
Requires(post): systemd
bf078c
Requires(preun): systemd
bf078c
Requires(postun): systemd
bf078c
bf078c
Source0: https://github.com/open-power/%{project}/archive/v%{version}/%{project}-%{version}.tar.gz
bf078c
Source1: opal-prd-rsyslog
bf078c
Source2: opal-prd-logrotate
bf078c
737c22
# upstream fix
737c22
bf078c
%description
bf078c
This package provides a daemon to load and run the OpenPower firmware's
bf078c
Processor Recovery Diagnostics binary. This is responsible for run time
bf078c
maintenance of OpenPower Systems hardware.
bf078c
bf078c
bf078c
%package -n	opal-utils
bf078c
Summary:	OPAL firmware utilities
bf078c
Group:		Applications/System
bf078c
bf078c
%description -n opal-utils
bf078c
This package contains utility programs.
bf078c
bf078c
The 'gard' utility, can read, parse and clear hardware gard partitions
bf078c
on OpenPower platforms. The 'getscom' and 'putscom' utilities provide
bf078c
an interface to query or modify the registers of the different chipsets
bf078c
of an OpenPower system. 'pflash' is a tool to access the flash modules
bf078c
on such systems and update the OpenPower firmware.
bf078c
bf078c
%package -n	opal-firmware
bf078c
Summary:	OPAL firmware
bf078c
BuildArch:	noarch
bf078c
bf078c
%description -n	opal-firmware
bf078c
OPAL firmware, aka skiboot, loads the bootloader and provides runtime
bf078c
services to the OS (Linux) on IBM Power and OpenPower systems.
bf078c
bf078c
%prep
bf078c
%setup -q -n %{project}-%{version}
bf078c
bf078c
%build
bf078c
OPAL_PRD_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" ASFLAGS="-m64 -Wa,--generate-missing-build-notes=yes" -C external/opal-prd
bf078c
GARD_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" -C external/gard
bf078c
PFLASH_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" -C external/pflash
bf078c
XSCOM_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" -C external/xscom-utils
684fce
FFSPART_VERSION=%{version}  make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" -C external/ffspart
bf078c
bf078c
# build skiboot with a cross-compiler on Fedora and with system compiler otherwise
bf078c
# and always use upstream compiler flags for the firmware (no CFLAGS override)
bf078c
%if 0%{?fedora}
bf078c
SKIBOOT_VERSION=%{version} make V=1 CROSS="powerpc64-linux-gnu-"
bf078c
%else
bf078c
SKIBOOT_VERSION=%{version} make V=1 CROSS=
bf078c
%endif
bf078c
bf078c
%install
684fce
OPAL_PRD_VERSION=%{version} make -C external/opal-prd install DESTDIR=%{buildroot} prefix=/usr
684fce
GARD_VERSION=%{version}     make -C external/gard install DESTDIR=%{buildroot} prefix=/usr
684fce
PFLASH_VERSION=%{version}   make -C external/pflash install DESTDIR=%{buildroot} prefix=/usr
684fce
XSCOM_VERSION=%{version}    make -C external/xscom-utils install DESTDIR=%{buildroot} prefix=/usr
684fce
FFSPART_VERSION=%{version}  make -C external/ffspart install DESTDIR=%{buildroot} prefix=/usr
bf078c
bf078c
mkdir -p %{buildroot}%{_unitdir}
bf078c
install -m 644 -p external/opal-prd/opal-prd.service %{buildroot}%{_unitdir}/opal-prd.service
bf078c
bf078c
mkdir -p %{buildroot}%{_datadir}/qemu
bf078c
install -m 644 -p skiboot.lid %{buildroot}%{_datadir}/qemu/skiboot.lid
bf078c
install -m 644 -p skiboot.lid.xz %{buildroot}%{_datadir}/qemu/skiboot.lid.xz
bf078c
bf078c
# log opal-prd messages to /var/log/opal-prd.log
bf078c
mkdir -p %{buildroot}%{_sysconfdir}/{rsyslog.d,logrotate.d}
bf078c
install -m 644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/rsyslog.d/opal-prd.conf 
bf078c
install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/logrotate.d/opal-prd
bf078c
684fce
# install phberr script
684fce
install -D -p -m 644 external/pci-scripts/ppc.py %{buildroot}%{python3_sitelib}/ppc/__init__.py
684fce
install -D -p -m 755 external/pci-scripts/phberr.py %{buildroot}%{_bindir}/phberr
684fce
bf078c
%post
bf078c
%systemd_post opal-prd.service
bf078c
bf078c
%preun
bf078c
%systemd_preun opal-prd.service
bf078c
bf078c
%postun
bf078c
%systemd_postun_with_restart opal-prd.service
bf078c
bf078c
%files
bf078c
%doc README.md
bf078c
%license LICENCE
bf078c
%config(noreplace) %{_sysconfdir}/logrotate.d/opal-prd
bf078c
%config(noreplace) %{_sysconfdir}/rsyslog.d/opal-prd.conf 
bf078c
%{_sbindir}/opal-prd
bf078c
%{_unitdir}/opal-prd.service
bf078c
%{_mandir}/man8/*
bf078c
bf078c
%files -n opal-utils
bf078c
%doc README.md
bf078c
%license LICENCE
684fce
%{_bindir}/phberr
bf078c
%{_sbindir}/opal-gard
bf078c
%{_sbindir}/getscom
bf078c
%{_sbindir}/putscom
bf078c
%{_sbindir}/pflash
bf078c
%{_sbindir}/getsram
684fce
%{_sbindir}/ffspart
684fce
%{python3_sitelib}/ppc/
bf078c
%{_mandir}/man1/*
bf078c
bf078c
%files -n opal-firmware
bf078c
%doc README.md
bf078c
%license LICENCE
bf078c
%{_datadir}/qemu/
bf078c
bf078c
%changelog
684fce
* Mon May 10 2021 Than Ngo <than@redhat.com> - 6.7.1-1
684fce
- Resolves: #1921665, rebase to 6.7.1
684fce
737c22
* Mon Oct 05 2020 Than Ngo <than@redhat.com> - 6.6.3-2
737c22
- Resolves: #1885134, fix which makes the actual page off lining asynchronous
737c22
737c22
* Thu Oct 01 2020 Than Ngo <than@redhat.com> - 6.6.3-1
737c22
- Resolves: #1844427, rebase to 6.6.3
737c22
a58b3f
* Fri Apr 24 2020 Than Ngo <than@redhat.com> - 6.6-1
a58b3f
- Resolves: #1779211, rebase to 6.6
a58b3f
fde017
* Mon Oct 28 2019 Than Ngo <than@redhat.com> - 6.5.1-1
fde017
- Resolves: #1731434. rebase to 6.5.1
fde017
bf078c
* Thu May 23 2019 Than Ngo <than@redhat.com> - 6.3.1-2
bf078c
- Related: #1664099, log messages to /var/log/opal-prd.log
bf078c
bf078c
* Tue May 14 2019 Than Ngo <than@redhat.com> - 6.3.1-1
bf078c
- Resolves: #1664099, rebase to 6.3.1
bf078c
bf078c
* Mon Mar 25 2019 Than Ngo <than@redhat.com> - 6.2-3
bf078c
- Related: #1664099. add missing man pages
bf078c
bf078c
* Thu Mar 21 2019 Than Ngo <than@redhat.com> - 6.2-2
bf078c
- Related: #1682400, bump release for gating on tests
bf078c
bf078c
* Tue Mar 19 2019 Than Ngo <than@redhat.com> - 6.2-1
bf078c
- Resolves: #1664099, rebase to 6.2
bf078c
- Resolves: #1682400, add gating on tests
bf078c
bf078c
* Fri Dec 14 2018 Than Ngo <than@redhat.com> - 6.1-5
bf078c
- Resolves: #1659458, opal-prd occ reset causes hardlockup
bf078c
bf078c
* Thu Sep 27 2018 Than Ngo <than@redhat.com> - 6.1-4
bf078c
- opal-prd messages to /var/log/opal-prd.log
bf078c
bf078c
* Fri Sep 21 2018 Than Ngo <than@redhat.com> - 6.1-3
bf078c
- Resolves: #1630612 - annocheck distro flag failures
bf078c
bf078c
* Mon Jul 30 2018 Than Ngo <than@redhat.com> - 6.1-2
bf078c
- fixed bz#1568027, opal-prd crash
bf078c
bf078c
* Mon Jul 16 2018 Than Ngo <than@redhat.com> - 6.1-1
bf078c
- update to 6.1
bf078c
bf078c
* Fri Jun 29 2018 Than Ngo <than@redhat.com> - 6.0.4-2
bf078c
- Resolves: #1596245, "diag_encl -d" creates xml file with blank space in file name
bf078c
bf078c
* Mon May 28 2018 Dan Horák <dan@danny.cz> - 6.0.4-1
bf078c
- Update to latest upstream 6.0.4
bf078c
bf078c
* Thu May 17 2018 Dan Horák <dan@danny.cz> - 6.0.1-1
bf078c
- Update to latest upstream 6.0.1
bf078c
bf078c
* Mon Apr 09 2018 Dan Horák <dan@danny.cz> - 5.11-1
bf078c
- Update to latest upstream 5.11
bf078c
bf078c
* Mon Mar 12 2018 Than Ngo <than@redhat.com> - 5.10.2-1
bf078c
- update to latest upstream 5.10.2
bf078c
bf078c
* Thu Mar 08 2018 Than Ngo <than@redhat.com> - 5.10.1-2
bf078c
- fixed bz#1552650 - incomplete Fedora build flags injection
bf078c
bf078c
* Fri Mar 02 2018 Dan Horák <dan[at]danny.cz> - 5.10.1-1
bf078c
- Update to latest upstream 5.10.1
bf078c
bf078c
* Wed Feb 28 2018 Dan Horák <dan[at]danny.cz> - 5.10-1
bf078c
- Update to latest upstream 5.10
bf078c
bf078c
* Mon Feb 26 2018 Dan Horák <dan[at]danny.cz> - 5.9.8-3
bf078c
- fix firmware build (#1545784)
bf078c
bf078c
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.9.8-2
bf078c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
bf078c
bf078c
* Thu Jan 25 2018 Dan Horák <dan[at]danny.cz> - 5.9.8-1
bf078c
- Update to latest upstream 5.9.8
bf078c
bf078c
* Fri Aug 4 2017 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.7.0-1
bf078c
- Update to latest upstream 5.7.0
bf078c
bf078c
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.5.0-4
bf078c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
bf078c
bf078c
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.5.0-3
bf078c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
bf078c
bf078c
* Wed Apr 19 2017 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.5.0-2
bf078c
- Fix build warning
bf078c
- Include skiboot.lid.xz file
bf078c
bf078c
* Tue Apr 18 2017 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.5.0-1
bf078c
- Update to latest upstream 5.5.0
bf078c
bf078c
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-2
bf078c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
bf078c
bf078c
* Mon Mar 21 2016 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.2.0
bf078c
- Update to latest upstream 5.2.0
bf078c
bf078c
* Fri Feb 26 2016 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.13-4
bf078c
- Fix stack frame compilation issue on gcc6
bf078c
- Remove ppc64 from ExclusiveArch list
bf078c
bf078c
* Mon Feb 22 2016 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.13-3
bf078c
- Fix opal-prd recompilation issse during install
bf078c
bf078c
* Mon Feb 22 2016 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.13-2
bf078c
- Added "Requires(post|preun|postun) tags"
bf078c
bf078c
* Tue Feb 09 2016 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.13
bf078c
- Update to latest upstream 5.1.13
bf078c
- Fixed specfile based on Dan's review comment (#1284527)
bf078c
bf078c
* Wed Nov 25 2015 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.11-4
bf078c
- Fixed specfile based on Dan's review comment (#1284527)
bf078c
bf078c
* Tue Nov 24 2015 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.11-3
bf078c
- Consistent use of build macros
bf078c
- Removed defattr from files section
bf078c
bf078c
* Tue Nov 24 2015 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.11-2
bf078c
- Minor update to spec file
bf078c
bf078c
* Mon Nov 23 2015 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.11
bf078c
- Initial Fedora packaging