Resolve spec file systemd unit file build issues
This commit is contained in:
parent
c1f08ea0af
commit
df22bed159
14
pcp.spec
14
pcp.spec
@ -77,9 +77,9 @@ Obsoletes: pcp-pmda-nvidia
|
|||||||
%define _with_doc --with-docdir=%{_docdir}/%{name}
|
%define _with_doc --with-docdir=%{_docdir}/%{name}
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
|
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
|
||||||
%define _with_initd --with-rcdir=%{_initddir}
|
|
||||||
%define disable_systemd 0
|
%define disable_systemd 0
|
||||||
%else
|
%else
|
||||||
|
%define _with_initd --with-rcdir=%{_initddir}
|
||||||
%define disable_systemd 1
|
%define disable_systemd 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -468,6 +468,7 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/pmwebd.*
|
|||||||
rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/PMWEBAPI.*
|
rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/PMWEBAPI.*
|
||||||
rm -fr $RPM_BUILD_ROOT/%{_confdir}/pmwebd
|
rm -fr $RPM_BUILD_ROOT/%{_confdir}/pmwebd
|
||||||
rm -fr $RPM_BUILD_ROOT/%{_initddir}/pmwebd
|
rm -fr $RPM_BUILD_ROOT/%{_initddir}/pmwebd
|
||||||
|
rm -fr $RPM_BUILD_ROOT/%{_unitdir}/pmwebd.service
|
||||||
rm -f $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin/pmwebd
|
rm -f $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin/pmwebd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -486,13 +487,11 @@ rm -rf $RPM_BUILD_ROOT/usr/share/doc/pcp-gui
|
|||||||
desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/pmchart.desktop
|
desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/pmchart.desktop
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{disable_systemd}
|
|
||||||
# default chkconfig off for Fedora and RHEL
|
# default chkconfig off for Fedora and RHEL
|
||||||
for f in $RPM_BUILD_ROOT/%{_initddir}/{pcp,pmcd,pmlogger,pmie,pmwebd,pmmgr,pmproxy}; do
|
for f in $RPM_BUILD_ROOT/%{_initddir}/{pcp,pmcd,pmlogger,pmie,pmwebd,pmmgr,pmproxy}; do
|
||||||
test -f "$f" || continue
|
test -f "$f" || continue
|
||||||
sed -i -e '/^# chkconfig/s/:.*$/: - 95 05/' -e '/^# Default-Start:/s/:.*$/:/' $f
|
sed -i -e '/^# chkconfig/s/:.*$/: - 95 05/' -e '/^# Default-Start:/s/:.*$/:/' $f
|
||||||
done
|
done
|
||||||
%endif
|
|
||||||
|
|
||||||
# list of PMDAs in the base pkg
|
# list of PMDAs in the base pkg
|
||||||
ls -1 $RPM_BUILD_ROOT/%{_pmdasdir} |\
|
ls -1 $RPM_BUILD_ROOT/%{_pmdasdir} |\
|
||||||
@ -755,6 +754,11 @@ chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
|
|||||||
%{_initddir}/pmlogger
|
%{_initddir}/pmlogger
|
||||||
%{_initddir}/pmie
|
%{_initddir}/pmie
|
||||||
%{_initddir}/pmproxy
|
%{_initddir}/pmproxy
|
||||||
|
%else
|
||||||
|
%{_unitdir}/pmcd.service
|
||||||
|
%{_unitdir}/pmlogger.service
|
||||||
|
%{_unitdir}/pmie.service
|
||||||
|
%{_unitdir}/pmproxy.service
|
||||||
%endif
|
%endif
|
||||||
%{_mandir}/man5/*
|
%{_mandir}/man5/*
|
||||||
%config(noreplace) %{_sysconfdir}/sasl2/pmcd.conf
|
%config(noreplace) %{_sysconfdir}/sasl2/pmcd.conf
|
||||||
@ -834,6 +838,8 @@ chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%if %{disable_systemd}
|
%if %{disable_systemd}
|
||||||
%{_initddir}/pmwebd
|
%{_initddir}/pmwebd
|
||||||
|
%else
|
||||||
|
%{_unitdir}/pmwebd.service
|
||||||
%endif
|
%endif
|
||||||
%{_libexecdir}/pcp/bin/pmwebd
|
%{_libexecdir}/pcp/bin/pmwebd
|
||||||
%attr(0775,pcp,pcp) %{_logsdir}/pmwebd
|
%attr(0775,pcp,pcp) %{_logsdir}/pmwebd
|
||||||
@ -847,6 +853,8 @@ chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%if %{disable_systemd}
|
%if %{disable_systemd}
|
||||||
%{_initddir}/pmmgr
|
%{_initddir}/pmmgr
|
||||||
|
%else
|
||||||
|
%{_unitdir}/pmmgr.service
|
||||||
%endif
|
%endif
|
||||||
%{_libexecdir}/pcp/bin/pmmgr
|
%{_libexecdir}/pcp/bin/pmmgr
|
||||||
%attr(0775,pcp,pcp) %{_logsdir}/pmmgr
|
%attr(0775,pcp,pcp) %{_logsdir}/pmmgr
|
||||||
|
Loading…
Reference in New Issue
Block a user