[Skiboot] [RFC PATCH] add a skiboot rpm spec file

Cédric Le Goater clg at fr.ibm.com
Wed Dec 2 00:14:06 AEDT 2015


This spec file is based on :  

     https://hegdevasant.fedorapeople.org/opal-prd/v4/opal-prd.spec

in which a new 'opal-firmware' package was added. It contains a
skiboot.lid and is generated as a noarch package.

Signed-off-by: Cédric Le Goater <clg at fr.ibm.com>
---

I think that pflash and also, to some extent, the *scom commands
should be part of a package. opal-utils ? 

This rfc is a way to discuss on what and how we should provide tools
and various blobs to the distros. I do not expect this patch to get
commited. Well, not as is :)

Cheers,

C.


 skiboot.spec |  118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 118 insertions(+)

Index: skiboot.git/skiboot.spec
===================================================================
--- /dev/null
+++ skiboot.git/skiboot.spec
@@ -0,0 +1,118 @@
+Name:		opal-prd
+Version:	5.1.11
+Release:	5%{?dist}
+Summary:	OPAL Processor Recovery Diagnostics Daemon
+
+Group:		System Environment/Daemons
+License:	ASL 2.0
+URL:		http://github.com/open-power/skiboot
+ExclusiveArch:	ppc64 ppc64le
+
+BuildRequires:	systemd
+
+Requires:	systemd
+
+Source0:	https://github.com/open-power/skiboot/archive/skiboot-%{version}.tar.gz
+Source1:	opal-prd.socket
+Source2:	opal-prd.service
+
+%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
+Group:		Applications/System
+
+%description -n opal-utils
+This package contains utility programs.
+The 'gard' utility, can read, parse and clear hardware gard partitions
+on OpenPower platforms.
+
+%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 Open Power systems.
+
+
+%prep
+
+%setup -q -n skiboot-skiboot-%version
+
+%build
+SKIBOOT_VERSION=%version CROSS= make V=1 %{?_smp_mflags}
+OPAL_PRD_VERSION=%version make %{?_smp_mflags} V=1 -C external/opal-prd
+make V=1 %{?_smp_mflags} -C external/gard
+
+%install
+make -C external/opal-prd install DESTDIR=%{buildroot} prefix=/usr
+make -C external/gard install DESTDIR=%{buildroot} prefix=/usr
+
+mkdir -p %{buildroot}%{_unitdir}
+install -m 644 -p %{SOURCE1} %{buildroot}%{_unitdir}/opal-prd.socket
+install -m 644 -p %{SOURCE2} %{buildroot}%{_unitdir}/opal-prd.service
+
+mkdir -p %{buildroot}%{_datadir}/qemu
+install -m 644 -p $RPM_BUILD_DIR/skiboot-skiboot-%version/skiboot.lid %{buildroot}%{_datadir}/qemu/skiboot.lid
+
+%post
+if [ $1 -eq 1 ] ; then
+    # Initial installation
+    /bin/systemctl enable opal-prd.service >/dev/null 2>&1 || :
+    /bin/systemctl start opal-prd.service >/dev/null 2>&1 || :
+fi
+
+%preun
+if [ $1 -eq 0 ] ; then
+    # Package removal, not upgrade
+    /bin/systemctl --no-reload disable opal-prd.service > /dev/null 2>&1 || :
+    /bin/systemctl stop opal-prd.service > /dev/null 2>&1 || :
+fi
+
+%postun
+systemctl daemon-reload >/dev/null 2>&1 || :
+if [ "$1" -ge 1 ] ; then
+    /bin/systemctl try-restart opal-prd.service >/dev/null 2>&1 || :
+fi
+
+%files
+%doc README
+%license LICENCE
+%{_sbindir}/opal-prd
+%{_unitdir}/opal-prd.socket
+%{_unitdir}/opal-prd.service
+%{_mandir}/man8/*
+
+%files -n opal-utils
+%doc README
+%license LICENCE
+%{_sbindir}/opal-gard
+%{_mandir}/man1/*
+
+
+%files -n opal-firmware
+%doc README
+%license LICENCE
+%{_datadir}/qemu/
+
+%changelog
+* Tue Dec  1 2015 Cédric Le Goater <clg at fr.ibm.com> - 5.1.11-5
+- added opal-firmware package
+
+* Wed Nov 25 2015 Vasant Hegde <hegdevasant at linux.vnet.ibm.com> - 5.1.11-4
+- Fixed specfile based on Dan's review comment (#1284527)
+
+* Tue Nov 24 2015 Vasant Hegde <hegdevasant at linux.vnet.ibm.com> - 5.1.11-3
+- Consistent use of build macros
+- Removed defattr from files section
+
+* Tue Nov 24 2015 Vasant Hegde <hegdevasant at linux.vnet.ibm.com> - 5.1.11-2
+- Minor update to spec file
+
+* Mon Nov 23 2015 Vasant Hegde <hegdevasant at linux.vnet.ibm.com> - 5.1.11
+- Initial Fedora packaging



More information about the Skiboot mailing list