From 2189155b752672b18bfa31f8acc758d06419b47b Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Tue, 19 Jan 2021 10:56:33 +0100 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/opal-prd.git#645d861e8c1b1cccfc23b673a91a4ae7be97d972 --- .gitignore | 27 +++ opal-prd-logrotate | 9 + opal-prd-rsyslog | 3 + opal-prd.spec | 301 ++++++++++++++++++++++++++ sources | 1 + tests/smoke-functionality/Makefile | 43 ++++ tests/smoke-functionality/PURPOSE | 3 + tests/smoke-functionality/blank.bin | Bin 0 -> 20480 bytes tests/smoke-functionality/data-p9.bin | Bin 0 -> 20480 bytes tests/smoke-functionality/data1.bin | Bin 0 -> 20480 bytes tests/smoke-functionality/runtest.sh | 44 ++++ tests/tests.yml | 13 ++ 12 files changed, 444 insertions(+) create mode 100644 opal-prd-logrotate create mode 100644 opal-prd-rsyslog create mode 100644 opal-prd.spec create mode 100644 sources create mode 100644 tests/smoke-functionality/Makefile create mode 100644 tests/smoke-functionality/PURPOSE create mode 100644 tests/smoke-functionality/blank.bin create mode 100644 tests/smoke-functionality/data-p9.bin create mode 100644 tests/smoke-functionality/data1.bin create mode 100755 tests/smoke-functionality/runtest.sh create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore index e69de29..7f6cd1b 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,27 @@ +/skiboot-5.1.13.tar.gz +/skiboot-5.2.0.tar.gz +/skiboot-5.5.0.tar.gz +/v5.7.tar.gz +/v5.9.8.tar.gz +/skiboot-5.10.tar.gz +/skiboot-5.10.1.tar.gz +/skiboot-5.10.2.tar.gz +/skiboot-5.11.tar.gz +/skiboot-6.0.1.tar.gz +/skiboot-6.0.4.tar.gz +/skiboot-6.1.tar.gz +/skiboot-6.2.tar.gz +/skiboot-6.3.1.tar.gz +/skiboot-6.4.tar.gz +/skiboot-6.5.tar.gz +/skiboot-6.5.1.tar.gz +/skiboot-6.5.2.tar.gz +/skiboot-6.5.3.tar.gz +/skiboot-6.5.4.tar.gz +/skiboot-6.6.tar.gz +/skiboot-6.6.1.tar.gz +/skiboot-6.6.2.tar.gz +/skiboot-6.6.3.tar.gz +/skiboot-6.6.4.tar.gz +/skiboot-6.7.tar.gz +/skiboot-6.7.1.tar.gz diff --git a/opal-prd-logrotate b/opal-prd-logrotate new file mode 100644 index 0000000..e46b2b2 --- /dev/null +++ b/opal-prd-logrotate @@ -0,0 +1,9 @@ +/var/log/opal-prd.log { + monthly + rotate 12 + compress + delaycompress + missingok + notifempty + create 644 root root +} diff --git a/opal-prd-rsyslog b/opal-prd-rsyslog new file mode 100644 index 0000000..ce89e38 --- /dev/null +++ b/opal-prd-rsyslog @@ -0,0 +1,3 @@ +if $programname == 'opal-prd' then /var/log/opal-prd.log +if $programname == 'opal-prd' and $syslogseverity <= 4 then /var/log/messages +if $programname == 'opal-prd' then ~ diff --git a/opal-prd.spec b/opal-prd.spec new file mode 100644 index 0000000..c4d50e4 --- /dev/null +++ b/opal-prd.spec @@ -0,0 +1,301 @@ +%global project skiboot + +Name: opal-prd +Version: 6.7.1 +Release: 1%{?dist} +Summary: OPAL Processor Recovery Diagnostics Daemon + +License: ASL 2.0 +URL: http://github.com/open-power/skiboot + +# Presently opal-prd is supported on ppc64le architecture only. +ExclusiveArch: ppc64le + +BuildRequires: systemd +BuildRequires: openssl +BuildRequires: gcc +%if 0%{?fedora} +BuildRequires: gcc-powerpc64-linux-gnu +%endif +BuildRequires: openssl-devel +BuildRequires: python3-devel + +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +Source0: https://github.com/open-power/%{project}/archive/v%{version}/%{project}-%{version}.tar.gz +Source1: opal-prd-rsyslog +Source2: opal-prd-logrotate + + +%description +This package provides a daemon to load and run the OpenPower firmware's +Processor Recovery Diagnostics binary. This is responsible for run time +maintenance of OpenPower Systems hardware. + + +%package -n opal-utils +Summary: OPAL firmware utilities + +%description -n opal-utils +This package contains utility programs. + +The 'gard' utility, can read, parse and clear hardware gard partitions +on OpenPower platforms. The 'getscom' and 'putscom' utilities provide +an interface to query or modify the registers of the different chipsets +of an OpenPower system. 'pflash' is a tool to access the flash modules +on such systems and update the OpenPower firmware. + +%package -n opal-firmware +Summary: OPAL firmware +BuildArch: noarch + +%description -n opal-firmware +OPAL firmware, aka skiboot, loads the bootloader and provides runtime +services to the OS (Linux) on IBM Power and OpenPower systems. + + +%prep +%autosetup -p1 -n %{project}-%{version} + + +%build +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 +GARD_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" -C external/gard +PFLASH_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" -C external/pflash +XSCOM_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" -C external/xscom-utils +FFSPART_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" -C external/ffspart + +# build skiboot with a cross-compiler on Fedora and with system compiler otherwise +# and always use upstream compiler flags for the firmware (no CFLAGS override) +%if 0%{?fedora} +SKIBOOT_VERSION=%{version} make V=1 CROSS="powerpc64-linux-gnu-" +%else +SKIBOOT_VERSION=%{version} make V=1 CROSS= +%endif + + +%install +OPAL_PRD_VERSION=%{version} make -C external/opal-prd install DESTDIR=%{buildroot} prefix=/usr +GARD_VERSION=%{version} make -C external/gard install DESTDIR=%{buildroot} prefix=/usr +PFLASH_VERSION=%{version} make -C external/pflash install DESTDIR=%{buildroot} prefix=/usr +XSCOM_VERSION=%{version} make -C external/xscom-utils install DESTDIR=%{buildroot} prefix=/usr +FFSPART_VERSION=%{version} make -C external/ffspart install DESTDIR=%{buildroot} prefix=/usr + +mkdir -p %{buildroot}%{_unitdir} +install -m 644 -p external/opal-prd/opal-prd.service %{buildroot}%{_unitdir}/opal-prd.service + +mkdir -p %{buildroot}%{_datadir}/qemu +install -m 644 -p skiboot.lid %{buildroot}%{_datadir}/qemu/skiboot.lid +install -m 644 -p skiboot.lid.xz %{buildroot}%{_datadir}/qemu/skiboot.lid.xz + +# log opal-prd messages to /var/log/opal-prd.log +mkdir -p %{buildroot}%{_sysconfdir}/{rsyslog.d,logrotate.d} +install -m 644 -p %{SOURCE1} %{buildroot}/%{_sysconfdir}/rsyslog.d/opal-prd.conf +install -m 644 -p %{SOURCE2} %{buildroot}/%{_sysconfdir}/logrotate.d/opal-prd + +# install phberr script +install -D -p -m 644 external/pci-scripts/ppc.py %{buildroot}%{python3_sitelib}/ppc/__init__.py +install -D -p -m 755 external/pci-scripts/phberr.py %{buildroot}%{_bindir}/phberr + + +%post +%systemd_post opal-prd.service + +%preun +%systemd_preun opal-prd.service + +%postun +%systemd_postun_with_restart opal-prd.service + + +%files +%doc README.md +%license LICENCE +%config(noreplace) %{_sysconfdir}/logrotate.d/opal-prd +%config(noreplace) %{_sysconfdir}/rsyslog.d/opal-prd.conf +%{_sbindir}/opal-prd +%{_unitdir}/opal-prd.service +%{_mandir}/man8/* + +%files -n opal-utils +%doc README.md +%license LICENCE +%{_bindir}/phberr +%{_sbindir}/opal-gard +%{_sbindir}/getscom +%{_sbindir}/putscom +%{_sbindir}/pflash +%{_sbindir}/getsram +%{_sbindir}/ffspart +%{python3_sitelib}/ppc/ +%{_mandir}/man1/* + +%files -n opal-firmware +%doc README.md +%license LICENCE +%{_datadir}/qemu/ + + +%changelog +* Thu Jan 07 2021 Dan Horák - 6.7.1-1 +- update to 6.7.1 (#1913304) + +* Tue Nov 03 2020 Dan Horák - 6.7-2 +- install phberr script +- fix %%install to avoid recompilation + +* Tue Nov 03 2020 Dan Horák - 6.7-1 +- update to 6.7 + +* Fri Oct 23 2020 Dan Horák - 6.6.4-1 +- update to 6.6.4 (#1890868) + +* Thu Sep 10 2020 Dan Horák - 6.6.3-1 +- update to 6.6.3 + +* Mon Aug 10 2020 Dan Horák - 6.6.2-3 +- build and install ffspart +- add BR: openssl for skibot image signing + +* Tue Jul 28 2020 Fedora Release Engineering - 6.6.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 03 2020 Dan Horák - 6.6.2-1 +- update to 6.6.2 + +* Tue Jun 09 2020 Dan Horák - 6.6.1-1 +- update to 6.6.1 + +* Thu Apr 23 2020 Dan Horák - 6.6-1 +- update to 6.6 + +* Fri Mar 20 2020 Dan Horák - 6.5.4-1 +- update to 6.5.4 + +* Wed Mar 11 2020 Dan Horák - 6.5.3-1 +- update to 6.5.3 + +* Wed Jan 29 2020 Fedora Release Engineering - 6.5.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Dec 12 2019 Dan Horák - 6.5.2-1 +- update to 6.5.2 + +* Thu Oct 24 2019 Dan Horák - 6.5.1-1 +- update to 6.5.1 + +* Mon Aug 19 2019 Dan Horák - 6.5-1 +- update to 6.5 + +* Thu Jul 25 2019 Fedora Release Engineering - 6.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Jul 16 2019 Dan Horák - 6.4-1 +- update to 6.4 + +* Fri May 24 2019 Than Ngo - 6.3.1-1 +- update to 6.3.1 +- log messages to /var/log/opal-prd.log + +* Fri Feb 01 2019 Fedora Release Engineering - 6.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Dec 20 2018 Than Ngo - 6.2-2 +- add man pages + +* Thu Dec 20 2018 Than Ngo - 6.2-1 +- update to 6.2 + +* Thu Sep 27 2018 Than Ngo - 6.1-4 +- log opal-prd messages to /var/log/opal-prd.log + +* Fri Sep 21 2018 Than Ngo - 6.1-3 +- Fixed opal-prd crash +- Fixed annocheck distro flag failures + +* Fri Jul 13 2018 Fedora Release Engineering - 6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Jul 12 2018 Dan Horák - 6.1-1 +- Update to latest upstream 6.1 + +* Mon May 28 2018 Dan Horák - 6.0.4-1 +- Update to latest upstream 6.0.4 + +* Thu May 17 2018 Dan Horák - 6.0.1-1 +- Update to latest upstream 6.0.1 + +* Mon Apr 09 2018 Dan Horák - 5.11-1 +- Update to latest upstream 5.11 + +* Mon Mar 12 2018 Than Ngo - 5.10.2-1 +- update to latest upstream 5.10.2 + +* Thu Mar 08 2018 Than Ngo - 5.10.1-2 +- fixed bz#1552650 - incomplete Fedora build flags injection + +* Fri Mar 02 2018 Dan Horák - 5.10.1-1 +- Update to latest upstream 5.10.1 + +* Wed Feb 28 2018 Dan Horák - 5.10-1 +- Update to latest upstream 5.10 + +* Mon Feb 26 2018 Dan Horák - 5.9.8-3 +- fix firmware build (#1545784) + +* Thu Feb 08 2018 Fedora Release Engineering - 5.9.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jan 25 2018 Dan Horák - 5.9.8-1 +- Update to latest upstream 5.9.8 + +* Fri Aug 4 2017 Vasant Hegde - 5.7.0-1 +- Update to latest upstream 5.7.0 + +* Thu Aug 03 2017 Fedora Release Engineering - 5.5.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 5.5.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Apr 19 2017 Vasant Hegde - 5.5.0-2 +- Fix build warning +- Include skiboot.lid.xz file + +* Tue Apr 18 2017 Vasant Hegde - 5.5.0-1 +- Update to latest upstream 5.5.0 + +* Sat Feb 11 2017 Fedora Release Engineering - 5.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Mar 21 2016 Vasant Hegde - 5.2.0 +- Update to latest upstream 5.2.0 + +* Fri Feb 26 2016 Vasant Hegde - 5.1.13-4 +- Fix stack frame compilation issue on gcc6 +- Remove ppc64 from ExclusiveArch list + +* Mon Feb 22 2016 Vasant Hegde - 5.1.13-3 +- Fix opal-prd recompilation issse during install + +* Mon Feb 22 2016 Vasant Hegde - 5.1.13-2 +- Added "Requires(post|preun|postun) tags" + +* Tue Feb 09 2016 Vasant Hegde - 5.1.13 +- Update to latest upstream 5.1.13 +- Fixed specfile based on Dan's review comment (#1284527) + +* Wed Nov 25 2015 Vasant Hegde - 5.1.11-4 +- Fixed specfile based on Dan's review comment (#1284527) + +* Tue Nov 24 2015 Vasant Hegde - 5.1.11-3 +- Consistent use of build macros +- Removed defattr from files section + +* Tue Nov 24 2015 Vasant Hegde - 5.1.11-2 +- Minor update to spec file + +* Mon Nov 23 2015 Vasant Hegde - 5.1.11 +- Initial Fedora packaging diff --git a/sources b/sources new file mode 100644 index 0000000..d941f1c --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (skiboot-6.7.1.tar.gz) = 3fc121bd4ac762c16a8426915812960e29ac9a1d2c1d617dbd2d6e344e23cd4483c2128cb007b4c542644aba45f99166369afcf59bb93f270dde3a752be7fee8 diff --git a/tests/smoke-functionality/Makefile b/tests/smoke-functionality/Makefile new file mode 100644 index 0000000..958ef8c --- /dev/null +++ b/tests/smoke-functionality/Makefile @@ -0,0 +1,43 @@ +TOPLEVEL_NAMESPACE=/CoreOS +PACKAGE_NAME=opal-prd +RELATIVE_PATH=smoke-functionality + +export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH) +export TESTVERSION=1.0 + +BUILT_FILES= +FILES=$(METADATA) runtest.sh Makefile + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + chmod a+x ./runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + +# You may need to add other taregts e.g. to build executables from source code +# Add them here: + + +# Include Common Makefile +include /usr/share/rhts/lib/rhts-make.include + +# Generate the testinfo.desc here: +$(METADATA): Makefile + @touch $(METADATA) + @echo "Owner: Than Ngo " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Description: Basic sanity and function tests">> $(METADATA) + @echo "Type: Sanity and function" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA) # add any other packages for which your test ought to run here + @echo "Requires: $(PACKAGE_NAME)" >> $(METADATA) # add any other requirements for the script to run here + @echo "Requires: opal-prd" >> $(METADATA) + @echo "Requires: opal-utils" >> $(METADATA) + @echo "License: ASL 2.0" >> $(METADATA) diff --git a/tests/smoke-functionality/PURPOSE b/tests/smoke-functionality/PURPOSE new file mode 100644 index 0000000..bc65079 --- /dev/null +++ b/tests/smoke-functionality/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/opal-prd/smoke-functionality +Description: Smoke, Sanity and function tests +Author: Than Ngo diff --git a/tests/smoke-functionality/blank.bin b/tests/smoke-functionality/blank.bin new file mode 100644 index 0000000000000000000000000000000000000000..c6cc6b8c239e484ec62bbc701ccf4c733a792a36 GIT binary patch literal 20480 zcmeIxu?YYG2m?X)Upfjpg5}x7`r(qjx{YT_h#&$N6i`3`1r$&~0R7i+L9c3PE~!9 z^}K3aef!1l#7~t7eFY+jFdhR-umnq>fC36Apnw7jD4>7>3Mim}0tzUgfC36Apnw7j zD4>7>3Mim}0tzUgfC36Apnw7jD4>7>3Mim}0tzUgfC36Apnw7jD4>7>3Mim}0tzU2 TtzeADR{;eSP(T3%{-MAPIkB7P literal 0 HcmV?d00001 diff --git a/tests/smoke-functionality/data1.bin b/tests/smoke-functionality/data1.bin new file mode 100644 index 0000000000000000000000000000000000000000..aa5bf1437e3ce8c74b7ea8a2b2b1dc9cbf989892 GIT binary patch literal 20480 zcmeIy!41MN3Jq#h?8wdO%dbh6%aZkxW43ec zHfvSAlGE*5J$sL~&d1LjdUEeJYd=1J_Qzweo%zK@2vs&=Y=IDj&_4s4U=wTt1r$&~ z0R