Bug 1814335
Summary: | coreos requirements for ppc64-diag package | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | mkumatag | |
Component: | ppc64-diag | Assignee: | Than Ngo <than> | |
Status: | CLOSED ERRATA | QA Contact: | Eirik Fuller <efuller> | |
Severity: | urgent | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 8.1 | CC: | bugproxy, clnperez, dhorak, fnovak, hannsj_uhl, jbastian, jcajka, jdluhos, lmcfadde, ovasik, pradikum, psundara, rvr, tbowling, than, toneata | |
Target Milestone: | rc | Keywords: | Patch | |
Target Release: | 8.3 | Flags: | jdluhos:
needinfo+
|
|
Hardware: | ppc64le | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | ppc64-diag-2.7.6-2.el8 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1843980 (view as bug list) | Environment: | ||
Last Closed: | 2020-11-04 01:43:00 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1776265, 1819712, 1843980, 1843983 |
Description
mkumatag
2020-03-17 16:55:05 UTC
Please don't forget to make the changes in Fedora packages too. ------- Comment From hegdevasant.com 2020-03-19 00:58 EDT------- - IIUC all you need is `rtas_errd` daemon code in the package? Is that correct? - Also I'd assume CoreOS will maintain separate spec file for each package (different from upsteam).. Similar to the way its done in Fedora. Is that correct? -Vasant (In reply to IBM Bug Proxy from comment #3) > ------- Comment From hegdevasant.com 2020-03-19 00:58 EDT------- > - IIUC all you need is `rtas_errd` daemon code in the package? Is that > correct? > > - Also I'd assume CoreOS will maintain separate spec file for each package > (different from upsteam).. Similar to the way its done in Fedora. Is that > correct? > > -Vasant @psundara can you please help us understanding how the packaging been for this package in the CoreOS? @hegdevasant.com coreos image building uses the RHEL8 repos for installing these packages, here is the repo file looks like: # The baseurls below are tracking the latest version of RHEL that has been released. # In the case of any of these locations being unavailable, it should be possible # to switch out the `/8/` to the latest RHEL version (i.e. `/8.1/` or `/8.2/`). [rhel8-baseos] baseurl=http://pulp-read.dist.prod.ext.phx2.redhat.com/content/dist/rhel8/8/$basearch/baseos/os/ enabled=1 gpgcheck=0 [rhel8-appstream] baseurl=http://pulp-read.dist.prod.ext.phx2.redhat.com/content/dist/rhel8/8/$basearch/appstream/os/ enabled=1 gpgcheck=0 exclude=conmon [rhel8-rt] baseurl=http://pulp-read.dist.prod.ext.phx2.redhat.com/content/dist/rhel8/8/x86_64/rt/os/ enabled=1 gpgcheck=0 And the spec file used for this package is from standard RHEL pkg repo - http://pkgs.devel.redhat.com/cgit/rpms/ppc64-diag/refs/heads So is the package rebuilt for RHCOS? so some options could be included for different build/packaging for RHCOS vs RHEL? (In reply to Frank Novak from comment #6) > So is the package rebuilt for RHCOS? so some options could be included for > different build/packaging for RHCOS vs RHEL? As clearly mentioned in the above comment, none of these packages are built for RHCOS! They are just installed from RHEL repo directly. ------- Comment From hegdevasant.com 2020-03-21 11:13 EDT------- (In reply to comment #11) > (In reply to Frank Novak from comment #6) > > So is the package rebuilt for RHCOS? so some options could be included for > > different build/packaging for RHCOS vs RHEL? > As clearly mentioned in the above comment, none of these packages are built > for RHCOS! They are just installed from RHEL repo directly. Hmmm. This is complicate stuff. Default ppc64-diag package built for RHEL contains all the tools and it pulls `perl` as dependency. We can't get rid of `perl` dependency. So now we have two option: #1 : As mentioned earlier we will introduce new `configure` option Something like `configure --with-rtas-errd <or some such option>` It will build only rtas_errd. Hence no perl dependency. You have to tweak CoreOS spec file to pass this new option ..so that it creates proper package for CoreOS #2 Just pull RHEL package and do *force* installation. Since you are just using `rtas_errd` this will work fine. You don't need to install `perl`. Let me know how you want to proceed here. -Vasant If you just want `rtas_errd` for CoreOS then you have to rebuild package. I can't think of any other option. Another additional complication to throw a wrench in the works is that powerpc-utils also has a perl dependency. So, even if we do this, we need to look into that as well. ------- Comment From mbringm.com 2020-03-23 10:26 EDT------- (In reply to comment #13) > Another additional complication to throw a wrench in the works is that > powerpc-utils also has a perl dependency. So, even if we do this, we need to > look into that as well. The scripts 'hvcsadmin', 'rtas_dump', and 'snap' are perl scripts in the powerpc-utils package. (In reply to IBM Bug Proxy from comment #8) > ------- Comment From hegdevasant.com 2020-03-21 11:13 EDT------- > (In reply to comment #11) > > (In reply to Frank Novak from comment #6) > > > So is the package rebuilt for RHCOS? so some options could be included for > > > different build/packaging for RHCOS vs RHEL? > > As clearly mentioned in the above comment, none of these packages are built > > for RHCOS! They are just installed from RHEL repo directly. > > Hmmm. This is complicate stuff. > > Default ppc64-diag package built for RHEL contains all the tools and it > pulls `perl` as dependency. > > We can't get rid of `perl` dependency. > > So now we have two option: > #1 : As mentioned earlier we will introduce new `configure` option > Something like `configure --with-rtas-errd <or some such option>` > It will build only rtas_errd. Hence no perl dependency. > You have to tweak CoreOS spec file to pass this new option ..so that it > creates proper package for CoreOS > > #2 Just pull RHEL package and do *force* installation. Since you are just > using `rtas_errd` this will work fine. You don't need to install `perl`. > > Let me know how you want to proceed here. > > -Vasant > > If you just want `rtas_errd` for CoreOS then you have to rebuild package. I > can't think of any other option. A third option is that we split the rtas_errd daemon into subpackages (ppc64-diag-rtas_errd). The rest remain in the main package, which in turn gets the dependency of ppc64-diag-rtas_errd. For powerpc-utils package we can do the same with splitting drmgr into subpackage. The advantage is that CoreOS can install ppc64-diag-rtas_errd without Perl dependency and we have only one specfile for CoreOS, Fedora and RHEL. @hegdevasant.com. Could the third option work? I think the problem is that the rtas_errd service relies on the perl scripts. So rewriting them as shell scripts is probably the best way to go forward. ------- Comment From mbringm.com 2020-03-24 10:17 EDT------- (In reply to comment #18) > I think the problem is that the rtas_errd service relies on the perl > scripts. So rewriting them as shell scripts is probably the best way to go > forward. Sounds reasonable. Same could be done with the 3 perl scripts in powerpc-utils. (In reply to IBM Bug Proxy from comment #10) > ------- Comment From mbringm.com 2020-03-23 10:26 EDT------- > (In reply to comment #13) > > Another additional complication to throw a wrench in the works is that > > powerpc-utils also has a perl dependency. So, even if we do this, we need to > > look into that as well. > > The scripts 'hvcsadmin', 'rtas_dump', and 'snap' are perl scripts in > the powerpc-utils package. the other option is to move drmgr into subpackage powerpc-utils-core and CoreOS should install powerpc-utils-core instead powerpc-utils. Plese have a look at bz#1811537, it's similar issue what we did in the past. ------- Comment From hegdevasant.com 2020-03-26 07:29 EDT------- (In reply to comment #18) > I think the problem is that the rtas_errd service relies on the perl > scripts. So rewriting them as shell scripts is probably the best way to go > forward. perl scripts are working fine. IMO CoreOS is not rebuilding package (and inherits from RHEL), is not a solid justification to rewrite the code in some other language. Even if this is right things we don't have bandwidth to do it anytime soon. Of course if someone is willing to re-write feel free to do it. I will be happy to review/merge code :-) -Vasant ------- Comment From hegdevasant.com 2020-03-26 07:32 EDT-------
> A third option is that we split the rtas_errd daemon into subpackages
> (ppc64-diag-rtas_errd). The rest remain in the main package, which in turn
> gets the dependency of ppc64-diag-rtas_errd.
> For powerpc-utils package we can do the same with splitting drmgr into
> subpackage.
> The advantage is that CoreOS can install ppc64-diag-rtas_errd without Perl
> dependency and we have only one specfile for CoreOS, Fedora and RHEL.
> @hegdevasant.com. Could the third option work?
Sounds reasonable.
How about rewriting fedora spec file .. which will generate two packages?
- ppc64-diag-core (just contains rtas_errd)
- ppc64-diag (main package contains all tools except rtas_errd)
This will depend on ppc64-diag-core and will have perl dependency
This way for coreOS, we can just pull ppc64-diag-core and for Fedora/RHEL we can continue to use `ppc64-diag` in base install list .. that will install ppc64-diag-core as well.
So one spec file --> two packages --> no change for Fedora/RHEL.
I can write/modify fedora spec file and get this done. Let me know your thought on this.
-Vasant
------- Comment From hegdevasant.com 2020-03-26 09:26 EDT------- (In reply to comment #21) > (In reply to comment #18) > > I think the problem is that the rtas_errd service relies on the perl > > scripts. So rewriting them as shell scripts is probably the best way to go > > forward. > perl scripts are working fine. > IMO CoreOS is not rebuilding package (and inherits from RHEL), is not a > solid justification to rewrite the code in some other language. > Even if this is right things we don't have bandwidth to do it anytime soon. > Of course if someone is willing to re-write feel free to do it. I will be > happy to review/merge code :-) Just to clarify. rtas_errd itself doesn't rely in perl scripts. Scripts are required for notification (meaning if any other tool wants notification of particular event). -Vasant yes, I see it's not required for the core functionality of rtas_errd, but still there will have to be changes (scriptlets in spec, rtas_errd script) to allow it run. IMHO it can be an interim solution, but in the longer term, RHCOS should just reuse RHEL binaries (as it does for everything else). (In reply to IBM Bug Proxy from comment #16) > ------- Comment From hegdevasant.com 2020-03-26 07:32 EDT------- > > A third option is that we split the rtas_errd daemon into subpackages > > (ppc64-diag-rtas_errd). The rest remain in the main package, which in turn > > gets the dependency of ppc64-diag-rtas_errd. > > For powerpc-utils package we can do the same with splitting drmgr into > > subpackage. > > The advantage is that CoreOS can install ppc64-diag-rtas_errd without Perl > > dependency and we have only one specfile for CoreOS, Fedora and RHEL. > > @hegdevasant.com. Could the third option work? > > Sounds reasonable. > > How about rewriting fedora spec file .. which will generate two packages? > - ppc64-diag-core (just contains rtas_errd) > - ppc64-diag (main package contains all tools except rtas_errd) > This will depend on ppc64-diag-core and will have perl dependency > > This way for coreOS, we can just pull ppc64-diag-core and for Fedora/RHEL we > can continue to use `ppc64-diag` in base install list .. that will install > ppc64-diag-core as well. > > So one spec file --> two packages --> no change for Fedora/RHEL. > > I can write/modify fedora spec file and get this done. Let me know your > thought on this. > > -Vasant Hi Vasant, it's exactly what i mentioned by 3. option. I already fixed the spec file which now generates ppc64-diag-core (just contains rtas_errd) and ppc64-diag (main package contains all tools except rtas_errd) here is the change: diff --git a/ppc64-diag.spec b/ppc64-diag.spec index f780b1a..dcee3a5 100644 --- a/ppc64-diag.spec +++ b/ppc64-diag.spec @@ -1,6 +1,9 @@ +# BZ#860040: +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/servevent_parse.pl + Name: ppc64-diag Version: 2.7.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: PowerLinux Platform Diagnostics URL: http://sourceforge.net/projects/linux-diag/files/ppc64-diag/ Group: System Environment/Base @@ -14,10 +17,11 @@ BuildRequires: systemd-devel BuildRequires: libtool BuildRequires: bison +Requires: ppc64-diag-core >= 2.7.6 Requires: servicelog, lsvpd # PCI hotplug support on PowerKVM guest depends on below # powerpc-utils version. -Requires: powerpc-utils >= 1.3.0 +Requires: powerpc-utils-core >= 1.3.0 Source0: http://downloads.sourceforge.net/project/linux-diag/ppc64-diag/v%{version}/%{name}-%{version}.tar.gz Source1: add_regex.8 @@ -43,19 +47,20 @@ predictive failures, if appropriate modifies the FRUs fault indicator(s) and provides event notification to system administrators or connected service frameworks. -# BZ#860040: -%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/servevent_parse.pl +%package core +Summary: Core PowerLinux Platform Diagnostics + +%description core +This package contains core PowerLinux Platform Diagnostics. %prep %autosetup -p1 - %build ./autogen.sh %configure LDFLAGS="%{build_ldflags}" CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cflags}" make %{?_smp_mflags} V=1 - %install make install DESTDIR=$RPM_BUILD_ROOT chmod 644 COPYING @@ -81,7 +86,6 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} $RPM_BUILD %dir %{_localstatedir}/log/dump %dir %{_localstatedir}/log/opal-elog %{_mandir}/man8/* -%config(noreplace) %{_sysconfdir}/%{name}/ppc64-diag.config %{_sbindir}/* %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/message_catalog/ @@ -93,17 +97,41 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} $RPM_BUILD %{_libexecdir}/%{name}/lp_diag_notify %{_libexecdir}/%{name}/servevent_parse.pl %{_datadir}/%{name}/message_catalog/* -%{_sysconfdir}/rc.powerfail -%{_libexecdir}/%{name}/rtas_errd -%{_libexecdir}/%{name}/opal_errd -%{_unitdir}/rtas_errd.service %{_unitdir}/opal_errd.service %{_sysconfdir}/cron.daily/run_diag_encl +# exclude stuffs which are moved to core +%exclude %{_mandir}/man8/convert_dt_node_props* +%exclude %{_mandir}/man8/extract_platdump* +%exclude %{_mandir}/man8/rtas_errd* +%exclude %{_libexecdir}/%{name}/rtas_errd +%exclude %{_libexecdir}/%{name}/opal_errd +%exclude %{_sbindir}/convert_dt_node_props +%exclude %{_sbindir}/extract_platdump +%exclude %{_sbindir}/rtas_errd + +%files core +%license COPYING +%dir %{_sysconfdir}/%{name} +%{_mandir}/man8/convert_dt_node_props* +%{_mandir}/man8/extract_platdump* +%{_mandir}/man8/rtas_errd* +%config(noreplace) %{_sysconfdir}/%{name}/ppc64-diag.config +%{_sbindir}/convert_dt_node_props +%{_sbindir}/extract_platdump +%{_sbindir}/rtas_errd +%{_sysconfdir}/rc.powerfail +%{_unitdir}/rtas_errd.service + %post # Post-install script -------------------------------------------------- -%{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1 -%{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1 +if [ -x %{_libexecdir}/%{name}/lp_diag_setup ] ; then + %{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1 +fi +if [ -x %{_libexecdir}/%{name}/ppc64_diag_setup ] ; then + %{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1 +fi + if [ "$1" = "1" ]; then # first install systemctl -q enable opal_errd.service >/dev/null systemctl -q enable rtas_errd.service >/dev/null @@ -122,8 +150,12 @@ if [ "$1" = "0" ]; then # last uninstall systemctl stop rtas_errd.service >/dev/null systemctl -q disable opal_errd.service systemctl -q disable rtas_errd.service - %{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null - %{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null + if [ -x %{_libexecdir}/%{name}/ppc64_diag_setup ] ; then + %{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null + fi + if [ -x %{_libexecdir}/%{name}/lp_diag_setup ] ; then + %{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null + fi systemctl daemon-reload > /dev/null 2>&1 fi @@ -136,6 +168,9 @@ fi %changelog +* Thu Mar 26 2020 Than Ngo <than> - 2.7.6-2 +- create core subpackage to avoid the perl dependency + * Thu Nov 07 2019 Than Ngo <than> - 2.7.6-1 - Resolves: #1725200, rebase to 2.7.6 To avoid the perl dependency in powerpc-utils, we will move drmgr into subpackage powerpc-utils-core. CoreOS should install powerpc-utils-core instead powerpc-utils. (In reply to Dan Horák from comment #18) > yes, I see it's not required for the core functionality of rtas_errd, but > still there will have to be changes (scriptlets in spec, rtas_errd script) > to allow it run. the rtas_errd script is only for the old system init and can be ignored. We use the systemd service rtas_errd.service. I also changed the scriptlets in the specfile, >IMHO it can be an interim solution, but in the longer term, > RHCOS should just reuse RHEL binaries (as it does for everything else). it's not needed to build ppc64-diag and powerpc-utils separtely for RHCOS. From RHCOS side, they need to add the correct requirement manifests/*-coreos-base.yaml like: manifests/fedora-coreos-base.yaml packages-ppc64le: - irqbalance - librtas - powerpc-utils-core - ppc64-diag-core ------- Comment From hegdevasant.com 2020-03-26 10:26 EDT------- > Hi Vasant, it's exactly what i mentioned by 3. option. I already fixed the > spec file which now generates > ppc64-diag-core (just contains rtas_errd) and ppc64-diag (main package On second thought how about "ppc64-diag-core" -> "ppc64-diag-rtas"? > contains all tools except rtas_errd) Thanks! > here is the change: > diff --git a/ppc64-diag.spec b/ppc64-diag.spec > index f780b1a..dcee3a5 100644 > --- a/ppc64-diag.spec > +++ b/ppc64-diag.spec > @@ -1,6 +1,9 @@ > +# BZ#860040: > +%global __requires_exclude > %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/ > servevent_parse.pl > + > Name: ppc64-diag > Version: 2.7.6 > -Release: 1%{?dist} > +Release: 2%{?dist} > Summary: PowerLinux Platform Diagnostics > URL: http://sourceforge.net/projects/linux-diag/files/ppc64-diag/ > Group: System Environment/Base > @@ -14,10 +17,11 @@ BuildRequires: systemd-devel > BuildRequires: libtool > BuildRequires: bison > +Requires: ppc64-diag-core >= 2.7.6 > Requires: servicelog, lsvpd > # PCI hotplug support on PowerKVM guest depends on below > # powerpc-utils version. > -Requires: powerpc-utils >= 1.3.0 > +Requires: powerpc-utils-core >= 1.3.0 I think we can have package specific "Requires" / BuildRequires tags. > Source0: > http://downloads.sourceforge.net/project/linux-diag/ppc64-diag/v%{version}/ > %{name}-%{version}.tar.gz > Source1: add_regex.8 > @@ -43,19 +47,20 @@ predictive failures, if appropriate modifies the FRUs > fault > indicator(s) and provides event notification to system > administrators or connected service frameworks. > -# BZ#860040: > -%global __requires_exclude > %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/ > servevent_parse.pl > +%package core > +Summary: Core PowerLinux Platform Diagnostics > + > +%description core > +This package contains core PowerLinux Platform Diagnostics. May be you should add saying this contains only rtas_errd daemon. > %prep > %autosetup -p1 > - > %build > ./autogen.sh > %configure > LDFLAGS="%{build_ldflags}" CFLAGS="%{build_cflags}" > CXXFLAGS="%{build_cflags}" make %{?_smp_mflags} V=1 > - > %install > make install DESTDIR=$RPM_BUILD_ROOT > chmod 644 COPYING > @@ -81,7 +86,6 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} > %{SOURCE5} $RPM_BUILD > %dir %{_localstatedir}/log/dump > %dir %{_localstatedir}/log/opal-elog > %{_mandir}/man8/* > -%config(noreplace) %{_sysconfdir}/%{name}/ppc64-diag.config > %{_sbindir}/* > %dir %{_datadir}/%{name} > %dir %{_datadir}/%{name}/message_catalog/ > @@ -93,17 +97,41 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} > %{SOURCE4} %{SOURCE5} $RPM_BUILD > %{_libexecdir}/%{name}/lp_diag_notify > %{_libexecdir}/%{name}/servevent_parse.pl > %{_datadir}/%{name}/message_catalog/* > -%{_sysconfdir}/rc.powerfail > -%{_libexecdir}/%{name}/rtas_errd > -%{_libexecdir}/%{name}/opal_errd You should keep opal_errd here. > -%{_unitdir}/rtas_errd.service > %{_unitdir}/opal_errd.service > %{_sysconfdir}/cron.daily/run_diag_encl > > +# exclude stuffs which are moved to core > +%exclude %{_mandir}/man8/convert_dt_node_props* > +%exclude %{_mandir}/man8/extract_platdump* > +%exclude %{_mandir}/man8/rtas_errd* > +%exclude %{_libexecdir}/%{name}/rtas_errd > +%exclude %{_libexecdir}/%{name}/opal_errd Remove above line. opal_errd goes to main package. > +%exclude %{_sbindir}/convert_dt_node_props > +%exclude %{_sbindir}/extract_platdump > +%exclude %{_sbindir}/rtas_errd > + > +%files core > +%license COPYING > +%dir %{_sysconfdir}/%{name} > +%{_mandir}/man8/convert_dt_node_props* > +%{_mandir}/man8/extract_platdump* > +%{_mandir}/man8/rtas_errd* > +%config(noreplace) %{_sysconfdir}/%{name}/ppc64-diag.config > +%{_sbindir}/convert_dt_node_props > +%{_sbindir}/extract_platdump > +%{_sbindir}/rtas_errd > +%{_sysconfdir}/rc.powerfail > +%{_unitdir}/rtas_errd.service > + > %post > # Post-install script -------------------------------------------------- > -%{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1 > -%{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1 > +if [ -x %{_libexecdir}/%{name}/lp_diag_setup ] ; then > + %{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1 > +fi > +if [ -x %{_libexecdir}/%{name}/ppc64_diag_setup ] ; then > + %{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1 > +fi > + Can't we add package specific "%post" instead of having above check? > if [ "$1" = "1" ]; then # first install > systemctl -q enable opal_errd.service >/dev/null > systemctl -q enable rtas_errd.service >/dev/null > @@ -122,8 +150,12 @@ if [ "$1" = "0" ]; then # last uninstall > systemctl stop rtas_errd.service >/dev/null > systemctl -q disable opal_errd.service > systemctl -q disable rtas_errd.service > - %{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null > - %{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null > + if [ -x %{_libexecdir}/%{name}/ppc64_diag_setup ] ; then > + %{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null > + fi > + if [ -x %{_libexecdir}/%{name}/lp_diag_setup ] ; then > + %{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null > + fi > systemctl daemon-reload > /dev/null 2>&1 > fi > > @@ -136,6 +168,9 @@ fi > > > %changelog > +* Thu Mar 26 2020 Than Ngo <than> - 2.7.6-2 > +- create core subpackage to avoid the perl dependency > + > * Thu Nov 07 2019 Than Ngo <than> - 2.7.6-1 > - Resolves: #1725200, rebase to 2.7.6 -Vasant (In reply to IBM Bug Proxy from comment #22) > ------- Comment From hegdevasant.com 2020-03-26 10:26 EDT------- > > Hi Vasant, it's exactly what i mentioned by 3. option. I already fixed the > > spec file which now generates > > ppc64-diag-core (just contains rtas_errd) and ppc64-diag (main package > > On second thought how about "ppc64-diag-core" -> "ppc64-diag-rtas"? > i prefered the name "ppc64-diag-core" for the case we have to move some more stuffs into core subpackage in the future, but it's fine to change it to ppc64-diag-rtas. Should we change it? > > contains all tools except rtas_errd) > > Thanks! > > > here is the change: > > diff --git a/ppc64-diag.spec b/ppc64-diag.spec > > index f780b1a..dcee3a5 100644 > > --- a/ppc64-diag.spec > > +++ b/ppc64-diag.spec > > @@ -1,6 +1,9 @@ > > +# BZ#860040: > > +%global __requires_exclude > > %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/ > > servevent_parse.pl > > + > > Name: ppc64-diag > > Version: 2.7.6 > > -Release: 1%{?dist} > > +Release: 2%{?dist} > > Summary: PowerLinux Platform Diagnostics > > URL: http://sourceforge.net/projects/linux-diag/files/ppc64-diag/ > > Group: System Environment/Base > > @@ -14,10 +17,11 @@ BuildRequires: systemd-devel > > BuildRequires: libtool > > BuildRequires: bison > > +Requires: ppc64-diag-core >= 2.7.6 > > Requires: servicelog, lsvpd > > # PCI hotplug support on PowerKVM guest depends on below > > # powerpc-utils version. > > -Requires: powerpc-utils >= 1.3.0 > > +Requires: powerpc-utils-core >= 1.3.0 > > I think we can have package specific "Requires" / BuildRequires tags. > what do you mean with "package specific "Requires" / BuildRequires tags" ? > > Source0: > > http://downloads.sourceforge.net/project/linux-diag/ppc64-diag/v%{version}/ > > %{name}-%{version}.tar.gz > > Source1: add_regex.8 > > @@ -43,19 +47,20 @@ predictive failures, if appropriate modifies the FRUs > > fault > > indicator(s) and provides event notification to system > > administrators or connected service frameworks. > > -# BZ#860040: > > -%global __requires_exclude > > %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/ > > servevent_parse.pl > > +%package core > > +Summary: Core PowerLinux Platform Diagnostics > > + > > +%description core > > +This package contains core PowerLinux Platform Diagnostics. > > May be you should add saying this contains only rtas_errd daemon. > ok, "This package contains only rtas_errd daemon." > > %prep > > %autosetup -p1 > > - > > %build > > ./autogen.sh > > %configure > > LDFLAGS="%{build_ldflags}" CFLAGS="%{build_cflags}" > > CXXFLAGS="%{build_cflags}" make %{?_smp_mflags} V=1 > > - > > %install > > make install DESTDIR=$RPM_BUILD_ROOT > > chmod 644 COPYING > > @@ -81,7 +86,6 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} > > %{SOURCE5} $RPM_BUILD > > %dir %{_localstatedir}/log/dump > > %dir %{_localstatedir}/log/opal-elog > > %{_mandir}/man8/* > > -%config(noreplace) %{_sysconfdir}/%{name}/ppc64-diag.config > > %{_sbindir}/* > > %dir %{_datadir}/%{name} > > %dir %{_datadir}/%{name}/message_catalog/ > > @@ -93,17 +97,41 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} > > %{SOURCE4} %{SOURCE5} $RPM_BUILD > > %{_libexecdir}/%{name}/lp_diag_notify > > %{_libexecdir}/%{name}/servevent_parse.pl > > %{_datadir}/%{name}/message_catalog/* > > -%{_sysconfdir}/rc.powerfail > > -%{_libexecdir}/%{name}/rtas_errd > > -%{_libexecdir}/%{name}/opal_errd > > You should keep opal_errd here. > as i understand opal_errd script is the init script for old system init and is obsolete for rhel >=7 We only use the rtas_errd.service. It's the reason why i remove it. > > -%{_unitdir}/rtas_errd.service > > %{_unitdir}/opal_errd.service > > %{_sysconfdir}/cron.daily/run_diag_encl > > > > +# exclude stuffs which are moved to core > > +%exclude %{_mandir}/man8/convert_dt_node_props* > > +%exclude %{_mandir}/man8/extract_platdump* > > +%exclude %{_mandir}/man8/rtas_errd* > > +%exclude %{_libexecdir}/%{name}/rtas_errd > > +%exclude %{_libexecdir}/%{name}/opal_errd > > Remove above line. opal_errd goes to main package. > have a look at the above comments > > +%exclude %{_sbindir}/convert_dt_node_props > > +%exclude %{_sbindir}/extract_platdump > > +%exclude %{_sbindir}/rtas_errd > > + > > +%files core > > +%license COPYING > > +%dir %{_sysconfdir}/%{name} > > +%{_mandir}/man8/convert_dt_node_props* > > +%{_mandir}/man8/extract_platdump* > > +%{_mandir}/man8/rtas_errd* > > +%config(noreplace) %{_sysconfdir}/%{name}/ppc64-diag.config > > +%{_sbindir}/convert_dt_node_props > > +%{_sbindir}/extract_platdump > > +%{_sbindir}/rtas_errd > > +%{_sysconfdir}/rc.powerfail > > +%{_unitdir}/rtas_errd.service > > + > > %post > > # Post-install script -------------------------------------------------- > > -%{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1 > > -%{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1 > > +if [ -x %{_libexecdir}/%{name}/lp_diag_setup ] ; then > > + %{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1 > > +fi > > +if [ -x %{_libexecdir}/%{name}/ppc64_diag_setup ] ; then > > + %{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1 > > +fi > > + > > Can't we add package specific "%post" instead of having above check? > you mean like that: %post # Post-install script -------------------------------------------------- %{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1 %{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1 if [ "$1" = "1" ]; then # first install systemctl -q enable opal_errd.service >/dev/null systemctl start opal_errd.service >/dev/null elif [ "$1" = "2" ]; then # upgrade systemctl restart opal_errd.service >/dev/null systemctl daemon-reload > /dev/null 2>&1 fi %preun # Pre-uninstall script ------------------------------------------------- if [ "$1" = "0" ]; then # last uninstall systemctl stop opal_errd.service >/dev/null systemctl -q disable opal_errd.service %{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null %{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null systemctl daemon-reload > /dev/null 2>&1 fi %triggerin -- librtas # trigger on librtas upgrades ------------------------------------------ if [ "$2" = "2" ]; then systemctl restart opal_errd.service >/dev/null systemctl restart rtas_errd.service >/dev/null fi %post core if [ "$1" = "1" ]; then # first install systemctl -q enable rtas_errd.service >/dev/null systemctl start rtas_errd.service >/dev/null elif [ "$1" = "2" ]; then # upgrade systemctl restart rtas_errd.service >/dev/null systemctl daemon-reload > /dev/null 2>&1 fi %preun core if [ "$1" = "0" ]; then # last uninstall systemctl stop rtas_errd.service >/dev/null systemctl -q disable rtas_errd.service systemctl daemon-reload > /dev/null 2>&1 fi > > if [ "$1" = "1" ]; then # first install > > systemctl -q enable opal_errd.service >/dev/null > > systemctl -q enable rtas_errd.service >/dev/null > > @@ -122,8 +150,12 @@ if [ "$1" = "0" ]; then # last uninstall > > systemctl stop rtas_errd.service >/dev/null > > systemctl -q disable opal_errd.service > > systemctl -q disable rtas_errd.service > > - %{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null > > - %{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null > > + if [ -x %{_libexecdir}/%{name}/ppc64_diag_setup ] ; then > > + %{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null > > + fi > > + if [ -x %{_libexecdir}/%{name}/lp_diag_setup ] ; then > > + %{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null > > + fi > > systemctl daemon-reload > /dev/null 2>&1 > > fi > > > > @@ -136,6 +168,9 @@ fi > > > > > > %changelog > > +* Thu Mar 26 2020 Than Ngo <than> - 2.7.6-2 > > +- create core subpackage to avoid the perl dependency > > + > > * Thu Nov 07 2019 Than Ngo <than> - 2.7.6-1 > > - Resolves: #1725200, rebase to 2.7.6 > > -Vasant ------- Comment From hegdevasant.com 2020-03-27 06:55 EDT------- (In reply to comment #27) > (In reply to IBM Bug Proxy from comment #22) > > > Hi Vasant, it's exactly what i mentioned by 3. option. I already fixed the > > > spec file which now generates > > > ppc64-diag-core (just contains rtas_errd) and ppc64-diag (main package > > On second thought how about "ppc64-diag-core" -> "ppc64-diag-rtas"? > i prefered the name "ppc64-diag-core" for the case we have to move some more > stuffs into core subpackage in the future, but it's fine to change it to > ppc64-diag-rtas. > Should we change it? I think yes. `rtas` is just one part of ppc64-diag. > > > contains all tools except rtas_errd) > > Thanks! > > > here is the change: > > > diff --git a/ppc64-diag.spec b/ppc64-diag.spec > > > index f780b1a..dcee3a5 100644 > > > --- a/ppc64-diag.spec > > > +++ b/ppc64-diag.spec > > > @@ -1,6 +1,9 @@ > > > +# BZ#860040: > > > +%global __requires_exclude > > > %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/ > > > servevent_parse.pl > > > + > > > Name: ppc64-diag > > > Version: 2.7.6 > > > -Release: 1%{?dist} > > > +Release: 2%{?dist} > > > Summary: PowerLinux Platform Diagnostics > > > URL: http://sourceforge.net/projects/linux-diag/files/ppc64-diag/ > > > Group: System Environment/Base > > > @@ -14,10 +17,11 @@ BuildRequires: systemd-devel > > > BuildRequires: libtool > > > BuildRequires: bison > > > +Requires: ppc64-diag-core >= 2.7.6 > > > Requires: servicelog, lsvpd > > > # PCI hotplug support on PowerKVM guest depends on below > > > # powerpc-utils version. > > > -Requires: powerpc-utils >= 1.3.0 > > > +Requires: powerpc-utils-core >= 1.3.0 > > I think we can have package specific "Requires" / BuildRequires tags. > what do you mean with "package specific "Requires" / BuildRequires tags" ? I think specfile allows use to define Requires under each package. That way it becomes neat. > > > Source0: > > > http://downloads.sourceforge.net/project/linux-diag/ppc64-diag/v%{version}/ > > > %{name}-%{version}.tar.gz > > > Source1: add_regex.8 > > > @@ -43,19 +47,20 @@ predictive failures, if appropriate modifies the FRUs > > > fault > > > indicator(s) and provides event notification to system > > > administrators or connected service frameworks. > > > -# BZ#860040: > > > -%global __requires_exclude > > > %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/ > > > servevent_parse.pl > > > +%package core > > > +Summary: Core PowerLinux Platform Diagnostics > > > + > > > +%description core > > > +This package contains core PowerLinux Platform Diagnostics. > > May be you should add saying this contains only rtas_errd daemon. > ok, "This package contains only rtas_errd daemon." Yep! > > > %prep > > > %autosetup -p1 > > > - > > > %build > > > ./autogen.sh > > > %configure > > > LDFLAGS="%{build_ldflags}" CFLAGS="%{build_cflags}" > > > CXXFLAGS="%{build_cflags}" make %{?_smp_mflags} V=1 > > > - > > > %install > > > make install DESTDIR=$RPM_BUILD_ROOT > > > chmod 644 COPYING > > > @@ -81,7 +86,6 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} > > > %{SOURCE5} $RPM_BUILD > > > %dir %{_localstatedir}/log/dump > > > %dir %{_localstatedir}/log/opal-elog > > > %{_mandir}/man8/* > > > -%config(noreplace) %{_sysconfdir}/%{name}/ppc64-diag.config > > > %{_sbindir}/* > > > %dir %{_datadir}/%{name} > > > %dir %{_datadir}/%{name}/message_catalog/ > > > @@ -93,17 +97,41 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} > > > %{SOURCE4} %{SOURCE5} $RPM_BUILD > > > %{_libexecdir}/%{name}/lp_diag_notify > > > %{_libexecdir}/%{name}/servevent_parse.pl > > > %{_datadir}/%{name}/message_catalog/* > > > -%{_sysconfdir}/rc.powerfail > > > -%{_libexecdir}/%{name}/rtas_errd > > > -%{_libexecdir}/%{name}/opal_errd > > You should keep opal_errd here. > as i understand opal_errd script is the init script for old system init and > is obsolete for rhel >=7 > We only use the rtas_errd.service. It's the reason why i remove it. Oh Yeah. you are right. Someday I should get rid of this script in upstream. > > > -%{_unitdir}/rtas_errd.service > > > %{_unitdir}/opal_errd.service > > > %{_sysconfdir}/cron.daily/run_diag_encl > > > > > > +# exclude stuffs which are moved to core > > > +%exclude %{_mandir}/man8/convert_dt_node_props* > > > +%exclude %{_mandir}/man8/extract_platdump* > > > +%exclude %{_mandir}/man8/rtas_errd* > > > +%exclude %{_libexecdir}/%{name}/rtas_errd > > > +%exclude %{_libexecdir}/%{name}/opal_errd > > Remove above line. opal_errd goes to main package. > have a look at the above comments > > > +%exclude %{_sbindir}/convert_dt_node_props > > > +%exclude %{_sbindir}/extract_platdump > > > +%exclude %{_sbindir}/rtas_errd > > > + > > > +%files core > > > +%license COPYING > > > +%dir %{_sysconfdir}/%{name} > > > +%{_mandir}/man8/convert_dt_node_props* > > > +%{_mandir}/man8/extract_platdump* > > > +%{_mandir}/man8/rtas_errd* > > > +%config(noreplace) %{_sysconfdir}/%{name}/ppc64-diag.config > > > +%{_sbindir}/convert_dt_node_props > > > +%{_sbindir}/extract_platdump > > > +%{_sbindir}/rtas_errd > > > +%{_sysconfdir}/rc.powerfail > > > +%{_unitdir}/rtas_errd.service > > > + > > > %post > > > # Post-install script -------------------------------------------------- > > > -%{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1 > > > -%{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1 > > > +if [ -x %{_libexecdir}/%{name}/lp_diag_setup ] ; then > > > + %{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1 > > > +fi > > > +if [ -x %{_libexecdir}/%{name}/ppc64_diag_setup ] ; then > > > + %{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1 > > > +fi > > > + > > Can't we add package specific "%post" instead of having above check? > you mean like that: > %post > # Post-install script -------------------------------------------------- > %{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1 > %{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1 > if [ "$1" = "1" ]; then # first install > systemctl -q enable opal_errd.service >/dev/null > systemctl start opal_errd.service >/dev/null > elif [ "$1" = "2" ]; then # upgrade > systemctl restart opal_errd.service >/dev/null > systemctl daemon-reload > /dev/null 2>&1 > fi > %preun > # Pre-uninstall script ------------------------------------------------- > if [ "$1" = "0" ]; then # last uninstall > systemctl stop opal_errd.service >/dev/null > systemctl -q disable opal_errd.service > %{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null > %{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null > systemctl daemon-reload > /dev/null 2>&1 > fi > %triggerin -- librtas > # trigger on librtas upgrades ------------------------------------------ > if [ "$2" = "2" ]; then > systemctl restart opal_errd.service >/dev/null > systemctl restart rtas_errd.service >/dev/null > fi > > %post core > if [ "$1" = "1" ]; then # first install > systemctl -q enable rtas_errd.service >/dev/null > systemctl start rtas_errd.service >/dev/null > elif [ "$1" = "2" ]; then # upgrade > systemctl restart rtas_errd.service >/dev/null > systemctl daemon-reload > /dev/null 2>&1 > fi > > %preun core > if [ "$1" = "0" ]; then # last uninstall > systemctl stop rtas_errd.service >/dev/null > systemctl -q disable rtas_errd.service > systemctl daemon-reload > /dev/null 2>&1 > fi Yes. This way it becomes neat and easy to understand. -Vasant I think it's the final change in the spec file. Vasant, could you have please have a look? Thank you so much :) diff --git a/ppc64-diag.spec b/ppc64-diag.spec index f780b1a..2bf88cd 100644 --- a/ppc64-diag.spec +++ b/ppc64-diag.spec @@ -1,23 +1,32 @@ +# BZ#860040: +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/servevent_parse.pl + Name: ppc64-diag Version: 2.7.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: PowerLinux Platform Diagnostics URL: http://sourceforge.net/projects/linux-diag/files/ppc64-diag/ Group: System Environment/Base License: GPLv2 ExclusiveArch: ppc %{power64} -BuildRequires: libservicelog-devel, flex, perl-interpreter, byacc -BuildRequires: libvpd-devel, systemd-units + +BuildRequires: libservicelog-devel +BuildRequires: flex +BuildRequires: perl-interpreter +BuildRequires: byacc +BuildRequires: libvpd-devel +BuildRequires: systemd-units BuildRequires: ncurses-devel BuildRequires: librtas-devel >= 1.4.0 BuildRequires: systemd-devel BuildRequires: libtool BuildRequires: bison -Requires: servicelog, lsvpd -# PCI hotplug support on PowerKVM guest depends on below -# powerpc-utils version. -Requires: powerpc-utils >= 1.3.0 +Requires: ppc64-diag-rtas >= 2.7.6 +Requires: servicelog +Requires: lsvpd +# PCI hotplug support on PowerKVM guest depends on below powerpc-utils version. +Requires: powerpc-utils-core >= 1.3.0 Source0: http://downloads.sourceforge.net/project/linux-diag/ppc64-diag/v%{version}/%{name}-%{version}.tar.gz Source1: add_regex.8 @@ -43,19 +52,20 @@ predictive failures, if appropriate modifies the FRUs fault indicator(s) and provides event notification to system administrators or connected service frameworks. -# BZ#860040: -%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/servevent_parse.pl +%package rtas +Summary: rtas_errd daemon + +%description rtas +This package contains only rtas_errd daemon. %prep %autosetup -p1 - %build ./autogen.sh %configure LDFLAGS="%{build_ldflags}" CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cflags}" make %{?_smp_mflags} V=1 - %install make install DESTDIR=$RPM_BUILD_ROOT chmod 644 COPYING @@ -81,7 +91,6 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} $RPM_BUILD %dir %{_localstatedir}/log/dump %dir %{_localstatedir}/log/opal-elog %{_mandir}/man8/* -%config(noreplace) %{_sysconfdir}/%{name}/ppc64-diag.config %{_sbindir}/* %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/message_catalog/ @@ -93,25 +102,43 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} $RPM_BUILD %{_libexecdir}/%{name}/lp_diag_notify %{_libexecdir}/%{name}/servevent_parse.pl %{_datadir}/%{name}/message_catalog/* -%{_sysconfdir}/rc.powerfail -%{_libexecdir}/%{name}/rtas_errd -%{_libexecdir}/%{name}/opal_errd -%{_unitdir}/rtas_errd.service %{_unitdir}/opal_errd.service %{_sysconfdir}/cron.daily/run_diag_encl +# get rid of obsolete initscripts for rhel >=7 +%exclude %{_libexecdir}/%{name}/rtas_errd +%exclude %{_libexecdir}/%{name}/opal_errd + +# exclude stuffs which are moved to rtas +%exclude %{_mandir}/man8/convert_dt_node_props* +%exclude %{_mandir}/man8/extract_platdump* +%exclude %{_mandir}/man8/rtas_errd* +%exclude %{_sbindir}/convert_dt_node_props +%exclude %{_sbindir}/extract_platdump +%exclude %{_sbindir}/rtas_errd + +%files rtas +%license COPYING +%dir %{_sysconfdir}/%{name} +%{_mandir}/man8/convert_dt_node_props* +%{_mandir}/man8/extract_platdump* +%{_mandir}/man8/rtas_errd* +%config(noreplace) %{_sysconfdir}/%{name}/ppc64-diag.config +%{_sbindir}/convert_dt_node_props +%{_sbindir}/extract_platdump +%{_sbindir}/rtas_errd +%{_sysconfdir}/rc.powerfail +%{_unitdir}/rtas_errd.service + %post # Post-install script -------------------------------------------------- %{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1 %{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1 if [ "$1" = "1" ]; then # first install systemctl -q enable opal_errd.service >/dev/null - systemctl -q enable rtas_errd.service >/dev/null systemctl start opal_errd.service >/dev/null - systemctl start rtas_errd.service >/dev/null elif [ "$1" = "2" ]; then # upgrade systemctl restart opal_errd.service >/dev/null - systemctl restart rtas_errd.service >/dev/null systemctl daemon-reload > /dev/null 2>&1 fi @@ -119,9 +146,7 @@ fi # Pre-uninstall script ------------------------------------------------- if [ "$1" = "0" ]; then # last uninstall systemctl stop opal_errd.service >/dev/null - systemctl stop rtas_errd.service >/dev/null systemctl -q disable opal_errd.service - systemctl -q disable rtas_errd.service %{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null %{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null systemctl daemon-reload > /dev/null 2>&1 @@ -134,8 +159,26 @@ if [ "$2" = "2" ]; then systemctl restart rtas_errd.service >/dev/null fi +%post rtas +if [ "$1" = "1" ]; then # first install + systemctl -q enable rtas_errd.service >/dev/null + systemctl start rtas_errd.service >/dev/null +elif [ "$1" = "2" ]; then # upgrade + systemctl restart rtas_errd.service >/dev/null + systemctl daemon-reload > /dev/null 2>&1 +fi + +%preun rtas +if [ "$1" = "0" ]; then # last uninstall + systemctl stop rtas_errd.service >/dev/null + systemctl -q disable rtas_errd.service + systemctl daemon-reload > /dev/null 2>&1 +fi %changelog +* Thu Mar 26 2020 Than Ngo <than> - 2.7.6-2 +- create rtas subpackage to avoid the perl dependency + * Thu Nov 07 2019 Than Ngo <than> - 2.7.6-1 - Resolves: #1725200, rebase to 2.7.6 ------- Comment From hegdevasant.com 2020-03-28 12:10 EDT------- (In reply to comment #29) > I think it's the final change in the spec file. Vasant, could you have > please have a look? Looks good to me. Thanks! -Vasant (In reply to Prashanth Sundararaman from comment #9) > Another additional complication to throw a wrench in the works is that > powerpc-utils also has a perl dependency. So, even if we do this, we need to > look into that as well. Prashanth, Manjunath could you please open new bug against powerpc-utils component so we can fix the perl dependency in powerpc-utils? Does the hotplug devices work as expected with the new image? Thanks (In reply to Than Ngo from comment #27) > (In reply to Prashanth Sundararaman from comment #9) > > Another additional complication to throw a wrench in the works is that > > powerpc-utils also has a perl dependency. So, even if we do this, we need to > > look into that as well. > > Prashanth, Manjunath > > could you please open new bug against powerpc-utils component so we can fix > the perl dependency in powerpc-utils? Here is the bug reported for powerpc-utils: https://bugzilla.redhat.com/show_bug.cgi?id=1819566 > > Does the hotplug devices work as expected with the new image? > Waiting for a patched coreos image from Prashant. > Thanks (In reply to mkumatag from comment #28) > (In reply to Than Ngo from comment #27) > > (In reply to Prashanth Sundararaman from comment #9) > > > Another additional complication to throw a wrench in the works is that > > > powerpc-utils also has a perl dependency. So, even if we do this, we need to > > > look into that as well. > > > > Prashanth, Manjunath > > > > could you please open new bug against powerpc-utils component so we can fix > > the perl dependency in powerpc-utils? > > Here is the bug reported for powerpc-utils: > https://bugzilla.redhat.com/show_bug.cgi?id=1819566 > > > > Does the hotplug devices work as expected with the new image? > > > > Waiting for a patched coreos image from Prashant. > > Thanks Testing is complete with the patched image got from the Prashant *** Bug 1825850 has been marked as a duplicate of this bug. *** it's fixed in ppc64-diag-2.7.6-2.el8 Request the fix for 8.1 and 8.2 zstream The Beaker job linked in bug 1819566 comment 8 had already verified this fix, by demonstrating that the removal of the perl-interpreter package did not result in the absence of drmgr nor rtas_errd with sufficiently new package versions. A newer Beaker job (https://beaker.engineering.redhat.com/jobs/4330927) also verified this fix, but with a deviation from the bug 1819566 verification. The nightly builds used for the bug 1819566 verification are no longer online, so the newer Beaker job tested powerpc-utils-1.3.6-9.el8 rather than powerpc-utils-1.3.6-6.el8, but that was not the apparent cause of the deviation. The powerpc-utils-1.3.6-5.el8 recipe used RHEL-8.2.0 rather than a RHEL-8.3.0 nightly build. Output from that recipe follows. - eval drmgr=$(type -p drmgr) && rtas_errd=$(type -p rtas_errd) && rpm -qf $drmgr && rpm -qf $rtas_errd && dnf -qy --noautoremove remove perl-interpreter && rpm -qf $drmgr && rpm -qf $rtas_errd powerpc-utils-1.3.6-5.el8.ppc64le ppc64-diag-2.7.6-1.el8.ppc64le - fail: unexpected error code 1. That output matches the output from the RHEL-8.3.0-20200422.n.1 recipe mentioned in bug 1819566 comment 8, for the same reason (explained in taskout.log rather than resultoutputfile.log), as follows. ++ rpm -qf /usr/sbin/drmgr powerpc-utils-1.3.6-5.el8.ppc64le ++ rpm -qf /usr/sbin/rtas_errd ppc64-diag-2.7.6-1.el8.ppc64le++ dnf -qy --noautoremove remove perl-interpreter ++ rpm -qf /usr/sbin/drmgr error: file /usr/sbin/drmgr: No such file or directory + code=1 + '[' 1 -ne 0 ']' + echo '- fail: unexpected error code 1.' The absence of a drmgr command following the removal of the perl-interpreter package is the reason for that failure. The RHEL-8.3.0-20200605.n.0 recipe in the newer Beaker job failed for a different reason. Output from its resultoutputfile.log follows. - eval drmgr=$(type -p drmgr) && rtas_errd=$(type -p rtas_errd) && rpm -qf $drmgr && rpm -qf $rtas_errd && dnf -qy --noautoremove remove perl-interpreter && rpm -qf $drmgr && rpm -qf $rtas_errd powerpc-utils-core-1.3.6-9.el8.ppc64le ppc64-diag-rtas-2.7.6-2.el8.ppc64le - fail: unexpected error code 1. At first glance that output resembles the error output from the RHEL-8.2.0 recipe. Aside from package versions the most visible difference is the names of the packages providing drmgr and rtas_errd (correctly reported as names of packages which do not depend on perl-interpreter). The reason for the failure is evident in taskout.log, as follows. ++ rpm -qf /usr/sbin/drmgr powerpc-utils-core-1.3.6-9.el8.ppc64le ++ rpm -qf /usr/sbin/rtas_errd ppc64-diag-rtas-2.7.6-2.el8.ppc64le ++ dnf -qy --noautoremove remove perl-interpreter Error: Problem: The operation would result in removing the following protected packages: systemd + code=1 + '[' 1 -ne 0 ']' + echo '- fail: unexpected error code 1.' That output suggests a recent dependency of the systemd package on the perl-interpreter package. Whatever effect that dependency might have on coreos, it is beyond the scope of this bug. In summary, newer RHEL-8.3.0 nightly builds do not lend themselves to verification of this fix by removing perl-interpreter, but this fix had already been verified in older RHEL-8.3.0 nightly builds. Another Beaker job (https://beaker.engineering.redhat.com/jobs/4330980) verified this fix with two recipes based on RHEL-8.2.0, with repo tags in one recipe to specify newer ppc64-diag and powerpc-utils packages. Neither recipe in that job encountered problems due to systemd depending on perl-interpreter. The powerpc-utils-1.3.6-5.el8 ppc64-diag-2.7.6-1.el8 recipe failed with the following output (resultoutputfile.log). - eval drmgr=$(type -p drmgr) && rtas_errd=$(type -p rtas_errd) && rpm -qf $drmgr && rpm -qf $rtas_errd && dnf -qy --noautoremove remove perl-interpreter && rpm -qf $drmgr && rpm -qf $rtas_errd powerpc-utils-1.3.6-5.el8.ppc64le ppc64-diag-2.7.6-1.el8.ppc64le - fail: unexpected error code 1. As expected taskout.log explains the failure as the absence of a drmgr command following the removal of the perl-interpreter package, as follows. ++ rpm -qf /usr/sbin/drmgr powerpc-utils-1.3.6-5.el8.ppc64le ++ rpm -qf /usr/sbin/rtas_errd ppc64-diag-2.7.6-1.el8.ppc64le ++ dnf -qy --noautoremove remove perl-interpreter ++ rpm -qf /usr/sbin/drmgr error: file /usr/sbin/drmgr: No such file or directory + code=1 + '[' 1 -ne 0 ']' + echo '- fail: unexpected error code 1.' The powerpc-utils-1.3.6-6.el8 ppc64-diag-2.7.6-2.el8 recipe passes with the following output. - eval drmgr=$(type -p drmgr) && rtas_errd=$(type -p rtas_errd) && rpm -qf $drmgr && rpm -qf $rtas_errd && dnf -qy --noautoremove remove perl-interpreter && rpm -qf $drmgr && rpm -qf $rtas_errd powerpc-utils-core-1.3.6-6.el8.ppc64le ppc64-diag-rtas-2.7.6-2.el8.ppc64le powerpc-utils-core-1.3.6-6.el8.ppc64le ppc64-diag-rtas-2.7.6-2.el8.ppc64le - pass: the command returns 0. As in bug 1819566 comment 8 the names of the newer packages containing drmgr and rtas_errd are different before and after the perl-interpreter removal. Moving to VERIFIED based on the preceding analysis. we do not fix this in 8.1 at all because that's EUS and coreos is going to move off EUS soon! https://beaker.engineering.redhat.com/jobs/4332624 is a Beaker job which attempted the verification described in comment 37 against adjacent nightly builds (RHEL-8.3.0-20200601.n.1 and RHEL-8.3.0-20200602.n.0). The two recipes are labeled by the libpcap package version, because the fix for bug 1806422 is what prevents the removal of the perl-interpreter package. https://github.com/the-tcpdump-group/libpcap/commit/f5f1484a931851d2d3b67d6033aedea8da5acb42 is the upstream commit which introduced the libibverbs dependency in libpcap; libibverbs depends on perl, and systemd depends on libpcap (see also bug 1837812). The libpcap-1.9.1-2.el8 recipe (RHEL-8.3.0-20200602.n.0) failed the same way as the RHEL-8.3.0-20200605.n.0 recipe mentioned in comment 37 (removal of the perl-interpreter package failed due to the indirect dependency of systemd on perl-interpreter, systemd -> libpcap -> libibverbs -> perl-interpreter). As in comment 37, the package names reported for drmgr and rtas_errd are correct, so that task failure does not invalidate this fix. The libpcap-1.9.0-3.el8 recipe (RHEL-8.3.0-20200601.n.1) succeeded (the perl-interpreter package was successfully removed, after which drmgr and rtas_errd still existed). The implication for coreos is that excluding the perl interpreter might be problematic with newer versions of libpcap. A separate libpcap package with RDMA sniffing disabled would presumably allow the exclusion of the perl-interpreter package (the fix for https://github.com/the-tcpdump-group/libpcap/issues/782 seems necessary for that; the good news is that libpcap-1.9.1 already has it). In summary, none of this further testing invalidates the fix, but rather it explains the oddity which interfered with the testing in newer nightly builds. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (ppc64-diag bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:4474 |