Message ID | 1448975646-9293-1-git-send-email-clg@fr.ibm.com |
---|---|
State | Changes Requested |
Headers | show |
On 12/01/2015 06:44 PM, Cédric Le Goater wrote: > This spec file is based on : Cedric, Thanks for the patch. > > 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. I think skiboot.lid also used by developers .. Not in real system. Hence I think we should include this in opal-utils itself .. Not in separate package. > > Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> > --- > > I think that pflash and also, to some extent, the *scom commands > should be part of a package. opal-utils ? Yes. I had discussed with Stewart and JK on this sometime back in IRC. I just added them to my local specfile and rebuilt rpms for RHEL 7.2. I can send my spec file. > > 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 :) IMO upstream spec file is a reference spec file. It will provide guideline like what is the package name, what are the files needs to be included etc. That way we can make sure various distros ships same package and binaries. It need not follow all the guideline set by various distros. Current spec file follows fedora standard .. Its because I'm more familiar with Fedora environment :-) > > Cheers, > > C. > > > skiboot.spec | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 118 insertions(+) > > Index: skiboot.git/skiboot.spec > =================================================================== > --- /dev/null > +++ skiboot.git/skiboot.spec If everyone agrees to include skiboot.lid then this is the right place. Else we can think of adding it under external/opal-prd directory.. as I consider opal-prd is main package and opal-util as subpackage. > @@ -0,0 +1,118 @@ > +Name: opal-prd > +Version: 5.1.11 > +Release: 5%{?dist} Generally release number starts with 1 and distro guys increments whenever they make changes. Hence lets keep it as 1. > +Summary: OPAL Processor Recovery Diagnostics Daemon > + > +Group: System Environment/Daemons > +License: ASL 2.0 > +URL: http://github.com/open-power/skiboot > +ExclusiveArch: ppc64 ppc64le My understanding is these packages are applicable for LE systems only. My mock build environment was fedora BE. Hence I've added "ppc64". I think we can remove it. > + > +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} Not sure cross compilation works in build environment. Have you verified? > +OPAL_PRD_VERSION=%version make %{?_smp_mflags} V=1 -C external/opal-prd > +make V=1 %{?_smp_mflags} -C external/gard +make V=1 %{?_smp_mflags} -C external/xscom-utils +PFLASH_VERSION=%version make V=1 %{?_smp_mflags} -C external/pflash > + > +%install > +make -C external/opal-prd install DESTDIR=%{buildroot} prefix=/usr > +make -C external/gard install DESTDIR=%{buildroot} prefix=/usr +cp external/xscom-utils/{get,put}scom %{buildroot}%{_sbindir} +cp external/pflash/pflash %{buildroot}%{_sbindir} > + > +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 We don't need "$RPM_BUILD_DIR/skiboot-skiboot-%version" . Just skiboot.lid works. > + > +%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}/getscom +%{_sbindir}/putscom +%{_sbindir}/pflash +%{_sbindir}/opal-gard > +%{_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@fr.ibm.com> - 5.1.11-5 > +- added opal-firmware package > + > +* Wed Nov 25 2015 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.11-4 > +- Fixed specfile based on Dan's review comment (#1284527) > + > +* Tue Nov 24 2015 Vasant Hegde <hegdevasant@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@linux.vnet.ibm.com> - 5.1.11-2 > +- Minor update to spec file > + > +* Mon Nov 23 2015 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.11 > +- Initial Fedora packaging These are fedora specific changelog and it doesn't apply to upstream. Hence lets remove this. And add changelog specific to upstream. May be we can just with "initial upstream spec file". -Vasant
On 12/01/2015 09:13 PM, Vasant Hegde wrote: > On 12/01/2015 06:44 PM, Cédric Le Goater wrote: >> This spec file is based on : > > Cedric, > > Thanks for the patch. > >> >> https://hegdevasant.fedorapeople.org/opal-prd/v4/opal-prd.spec Note that this is specific link and I may remove after we complete integrating opal-prd to fedora. -Vasant >> >> in which a new 'opal-firmware' package was added. It contains a >> skiboot.lid and is generated as a noarch package. > > I think skiboot.lid also used by developers .. Not in real system. Hence I think > we should include this in opal-utils itself .. Not in separate package. > >> >> Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> >> --- >> >> I think that pflash and also, to some extent, the *scom commands >> should be part of a package. opal-utils ? > > Yes. I had discussed with Stewart and JK on this sometime back in IRC. > I just added them to my local specfile and rebuilt rpms for RHEL 7.2. I can > send my spec file. > > >> >> 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 :) > > IMO upstream spec file is a reference spec file. It will provide guideline like > what is the package name, what are the files needs to be included etc. That way > we can make sure various distros ships same package and binaries. > > It need not follow all the guideline set by various distros. Current spec file > follows fedora standard .. Its because I'm more familiar with Fedora > environment :-) > >> >> Cheers, >> >> C. >> >> >> skiboot.spec | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 118 insertions(+) >> >> Index: skiboot.git/skiboot.spec >> =================================================================== >> --- /dev/null >> +++ skiboot.git/skiboot.spec > > If everyone agrees to include skiboot.lid then this is the right place. Else we > can think of adding it under external/opal-prd directory.. as I consider > opal-prd is main package and opal-util as subpackage. > >> @@ -0,0 +1,118 @@ >> +Name: opal-prd >> +Version: 5.1.11 >> +Release: 5%{?dist} > > Generally release number starts with 1 and distro guys increments whenever they > make changes. Hence lets keep it as 1. > > >> +Summary: OPAL Processor Recovery Diagnostics Daemon >> + >> +Group: System Environment/Daemons >> +License: ASL 2.0 >> +URL: http://github.com/open-power/skiboot >> +ExclusiveArch: ppc64 ppc64le > > My understanding is these packages are applicable for LE systems only. > My mock build environment was fedora BE. Hence I've added "ppc64". I think we > can remove it. > >> + >> +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} > > Not sure cross compilation works in build environment. Have you verified? > >> +OPAL_PRD_VERSION=%version make %{?_smp_mflags} V=1 -C external/opal-prd >> +make V=1 %{?_smp_mflags} -C external/gard > > +make V=1 %{?_smp_mflags} -C external/xscom-utils > +PFLASH_VERSION=%version make V=1 %{?_smp_mflags} -C external/pflash > >> + >> +%install >> +make -C external/opal-prd install DESTDIR=%{buildroot} prefix=/usr >> +make -C external/gard install DESTDIR=%{buildroot} prefix=/usr > > +cp external/xscom-utils/{get,put}scom %{buildroot}%{_sbindir} > +cp external/pflash/pflash %{buildroot}%{_sbindir} > >> + >> +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 > > We don't need "$RPM_BUILD_DIR/skiboot-skiboot-%version" . Just skiboot.lid works. > > >> + >> +%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}/getscom > +%{_sbindir}/putscom > +%{_sbindir}/pflash > +%{_sbindir}/opal-gard > >> +%{_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@fr.ibm.com> - 5.1.11-5 >> +- added opal-firmware package >> + >> +* Wed Nov 25 2015 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.11-4 >> +- Fixed specfile based on Dan's review comment (#1284527) >> + >> +* Tue Nov 24 2015 Vasant Hegde <hegdevasant@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@linux.vnet.ibm.com> - 5.1.11-2 >> +- Minor update to spec file >> + >> +* Mon Nov 23 2015 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.11 >> +- Initial Fedora packaging > > These are fedora specific changelog and it doesn't apply to upstream. Hence lets > remove this. And add changelog specific to upstream. May be we can just with > "initial upstream spec file". > > -Vasant >
On 12/01/2015 04:43 PM, Vasant Hegde wrote: > On 12/01/2015 06:44 PM, Cédric Le Goater wrote: >> This spec file is based on : > > Cedric, > > Thanks for the patch. > >> >> 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. > > I think skiboot.lid also used by developers .. Not in real system. Hence I think > we should include this in opal-utils itself .. Not in separate package. well, I see it more like a qemu-slof package. >> Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> >> --- >> >> I think that pflash and also, to some extent, the *scom commands >> should be part of a package. opal-utils ? > > Yes. I had discussed with Stewart and JK on this sometime back in IRC. > I just added them to my local specfile and rebuilt rpms for RHEL 7.2. I can > send my spec file. > > >> >> 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 :) > > IMO upstream spec file is a reference spec file. It will provide guideline like > what is the package name, what are the files needs to be included etc. That way > we can make sure various distros ships same package and binaries. > > It need not follow all the guideline set by various distros. Current spec file > follows fedora standard .. Its because I'm more familiar with Fedora > environment :-) > >> >> Cheers, >> >> C. >> >> >> skiboot.spec | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 118 insertions(+) >> >> Index: skiboot.git/skiboot.spec >> =================================================================== >> --- /dev/null >> +++ skiboot.git/skiboot.spec > > If everyone agrees to include skiboot.lid then this is the right place. Else we > can think of adding it under external/opal-prd directory.. as I consider > opal-prd is main package and opal-util as subpackage. OK. waiting for the crowd to react. >> @@ -0,0 +1,118 @@ >> +Name: opal-prd >> +Version: 5.1.11 >> +Release: 5%{?dist} > > Generally release number starts with 1 and distro guys increments whenever they > make changes. Hence lets keep it as 1. > > >> +Summary: OPAL Processor Recovery Diagnostics Daemon >> + >> +Group: System Environment/Daemons >> +License: ASL 2.0 >> +URL: http://github.com/open-power/skiboot >> +ExclusiveArch: ppc64 ppc64le > > My understanding is these packages are applicable for LE systems only. > My mock build environment was fedora BE. Hence I've added "ppc64". I think we > can remove it. > >> + >> +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} > > Not sure cross compilation works in build environment. Have you verified? No. I compiled on a f22/ppc64le which is good enough for skiboot. The above disables the cross compiler. >> +OPAL_PRD_VERSION=%version make %{?_smp_mflags} V=1 -C external/opal-prd >> +make V=1 %{?_smp_mflags} -C external/gard > > +make V=1 %{?_smp_mflags} -C external/xscom-utils > +PFLASH_VERSION=%version make V=1 %{?_smp_mflags} -C external/pflash > >> + >> +%install >> +make -C external/opal-prd install DESTDIR=%{buildroot} prefix=/usr >> +make -C external/gard install DESTDIR=%{buildroot} prefix=/usr > > +cp external/xscom-utils/{get,put}scom %{buildroot}%{_sbindir} > +cp external/pflash/pflash %{buildroot}%{_sbindir} > >> + >> +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 > > We don't need "$RPM_BUILD_DIR/skiboot-skiboot-%version" . Just skiboot.lid works. > > >> + >> +%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}/getscom > +%{_sbindir}/putscom > +%{_sbindir}/pflash > +%{_sbindir}/opal-gard > >> +%{_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@fr.ibm.com> - 5.1.11-5 >> +- added opal-firmware package >> + >> +* Wed Nov 25 2015 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.11-4 >> +- Fixed specfile based on Dan's review comment (#1284527) >> + >> +* Tue Nov 24 2015 Vasant Hegde <hegdevasant@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@linux.vnet.ibm.com> - 5.1.11-2 >> +- Minor update to spec file >> + >> +* Mon Nov 23 2015 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.11 >> +- Initial Fedora packaging > > These are fedora specific changelog and it doesn't apply to upstream. Hence lets > remove this. And add changelog specific to upstream. May be we can just with > "initial upstream spec file". > > -Vasant >
Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes: > On 12/01/2015 06:44 PM, Cédric Le Goater wrote: >> This spec file is based on : > > Cedric, > > Thanks for the patch. > >> >> 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. > > I think skiboot.lid also used by developers .. Not in real system. Hence I think > we should include this in opal-utils itself .. Not in separate > package. A separate package is likely going to be useful for the eventual powernv macihne type in qemu though.
Cédric Le Goater <clg@fr.ibm.com> writes: > 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@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 :) BTW, when you get this going, it'd be great to modify .travis.yml to build packages as part of the travis CI thing.
On 01/06/2016 06:50 AM, Stewart Smith wrote: > Cédric Le Goater <clg@fr.ibm.com> writes: >> 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@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 :) > > BTW, when you get this going, it'd be great to modify .travis.yml to > build packages as part of the travis CI thing. ah ! that is a challenge for me :) But yes it would be a good thing. It is still a bit obscure how the 'make dist' is done to build the tarball. That would be the first thing to understand. Then 'dist: trusty' might be an issue. I will check. C.
Cédric Le Goater <clg@fr.ibm.com> writes: > On 01/06/2016 06:50 AM, Stewart Smith wrote: >> Cédric Le Goater <clg@fr.ibm.com> writes: >>> 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@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 :) >> >> BTW, when you get this going, it'd be great to modify .travis.yml to >> build packages as part of the travis CI thing. > > ah ! that is a challenge for me :) But yes it would be a good thing. > > It is still a bit obscure how the 'make dist' is done to build the > tarball. That would be the first thing to understand. > > Then 'dist: trusty' might be an issue. I will check. Joel has some magic to do things in docker containers, and that could be how we achieve it without going *too* insane....
On 12/01/2015 09:50 PM, Cédric Le Goater wrote: > On 12/01/2015 04:43 PM, Vasant Hegde wrote: >> On 12/01/2015 06:44 PM, Cédric Le Goater wrote: .../... Stewart, Cedric, IIUC we all agree to have 3 separate packages here.. opal-prd -- binary package contains opal-prd daemon opal-firmware - contains skiboot.lid opla-utils -- Contains developer utilities like gard, xscom utilities etc. Thankfully Fedora folks haven't accepted opal-prd package. If everyone agrees with above 3 package/naming convention then I would like to propose changes now. >>> +%build >>> +SKIBOOT_VERSION=%version CROSS= make V=1 %{?_smp_mflags} >> >> Not sure cross compilation works in build environment. Have you verified? > > No. I compiled on a f22/ppc64le which is good enough for skiboot. The above > disables the cross compiler. But this will generate LE version of LID right? Are we fine with that? -Vasant
Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes: >>>> +%build >>>> +SKIBOOT_VERSION=%version CROSS= make V=1 %{?_smp_mflags} >>> >>> Not sure cross compilation works in build environment. Have you verified? >> >> No. I compiled on a f22/ppc64le which is good enough for skiboot. The above >> disables the cross compiler. > > > But this will generate LE version of LID right? Are we fine with that? I can produce a valid BE LID with the right incantations to the cross compiler on Fedora 23 at least... This *should* "just work", maybe having to sett CROSS manually though.
Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes: > IIUC we all agree to have 3 separate packages here.. > opal-prd -- binary package contains opal-prd daemon > opal-firmware - contains skiboot.lid > opla-utils -- Contains developer utilities like gard, xscom utilities etc. > > Thankfully Fedora folks haven't accepted opal-prd package. If everyone agrees > with above 3 package/naming convention then I would like to propose > changes now. I think that all works. If we were going to package the whole OpenPower firmware with petitboot, we'd name that package openpower-firmware I guess...
On 01/08/2016 11:08 AM, Stewart Smith wrote: > Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes: >> IIUC we all agree to have 3 separate packages here.. >> opal-prd -- binary package contains opal-prd daemon >> opal-firmware - contains skiboot.lid >> opla-utils -- Contains developer utilities like gard, xscom utilities etc. >> >> Thankfully Fedora folks haven't accepted opal-prd package. If everyone agrees >> with above 3 package/naming convention then I would like to propose >> changes now. > > I think that all works. > > If we were going to package the whole OpenPower firmware with petitboot, > we'd name that package openpower-firmware I guess... > Stewart We have to use consistent naming convention while generating multiple binaries from source. Either opal-* -OR- openpower-* We already have opal-* package in Ubuntu and most likely it will be included in fedora very soon. So I think think its better to stick to opal-* names. -Vasant
On 01/11/2016 06:28 AM, Vasant Hegde wrote: > On 01/08/2016 11:08 AM, Stewart Smith wrote: >> Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes: >>> IIUC we all agree to have 3 separate packages here.. >>> opal-prd -- binary package contains opal-prd daemon >>> opal-firmware - contains skiboot.lid >>> opla-utils -- Contains developer utilities like gard, xscom utilities etc. >>> >>> Thankfully Fedora folks haven't accepted opal-prd package. If everyone agrees >>> with above 3 package/naming convention then I would like to propose >>> changes now. >> >> I think that all works. >> >> If we were going to package the whole OpenPower firmware with petitboot, >> we'd name that package openpower-firmware I guess... >> > > Stewart > We have to use consistent naming convention while generating multiple binaries > from source. Either opal-* -OR- openpower-* > > We already have opal-* package in Ubuntu and most likely it will be included in > fedora very soon. So I think think its better to stick to opal-* names. I think what Stewart envisioned is a 'bit' larger than just opal anyhow :) We would need to make a rpm from a firmware image as generated by : https://github.com/open-power/op-build/ and openpower-firmware would be a good prefix for it but this is another package clearly. C.
On 01/11/2016 03:25 PM, Cédric Le Goater wrote: > On 01/11/2016 06:28 AM, Vasant Hegde wrote: >> On 01/08/2016 11:08 AM, Stewart Smith wrote: >>> Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes: >>>> IIUC we all agree to have 3 separate packages here.. >>>> opal-prd -- binary package contains opal-prd daemon >>>> opal-firmware - contains skiboot.lid >>>> opla-utils -- Contains developer utilities like gard, xscom utilities etc. >>>> >>>> Thankfully Fedora folks haven't accepted opal-prd package. If everyone agrees >>>> with above 3 package/naming convention then I would like to propose >>>> changes now. >>> >>> I think that all works. >>> >>> If we were going to package the whole OpenPower firmware with petitboot, >>> we'd name that package openpower-firmware I guess... >>> >> >> Stewart >> We have to use consistent naming convention while generating multiple binaries >> from source. Either opal-* -OR- openpower-* >> >> We already have opal-* package in Ubuntu and most likely it will be included in >> fedora very soon. So I think think its better to stick to opal-* names. > > I think what Stewart envisioned is a 'bit' larger than just opal anyhow :) I guessed it :-) > > We would need to make a rpm from a firmware image as generated by : > > https://github.com/open-power/op-build/ > > and openpower-firmware would be a good prefix for it but this is another > package clearly. Yep. Thanks for the clarification. -Vasant
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@fr.ibm.com> - 5.1.11-5 +- added opal-firmware package + +* Wed Nov 25 2015 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.11-4 +- Fixed specfile based on Dan's review comment (#1284527) + +* Tue Nov 24 2015 Vasant Hegde <hegdevasant@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@linux.vnet.ibm.com> - 5.1.11-2 +- Minor update to spec file + +* Mon Nov 23 2015 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 5.1.11 +- Initial Fedora packaging
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@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(+)