Fix requires for systemd and add sample mom.layout

This fixes bugs #1319195 and #1321154 mostly I've added a sample
mom.layout so that pbs_mom may have a better chance of starting
out of the box. I've also revised the systemd reqiures bits to
match guidelines.
This commit is contained in:
David Brown 2016-04-09 05:18:00 -07:00
parent b2cb6798cf
commit f1af42e0d5
2 changed files with 19 additions and 5 deletions

1
mom.layout Normal file
View File

@ -0,0 +1 @@
nodes=0

View File

@ -71,7 +71,7 @@
Name: torque Name: torque
Version: 4.2.10 Version: 4.2.10
Release: 9%{?dist} Release: 10%{?dist}
Summary: Tera-scale Open-source Resource and QUEue manager Summary: Tera-scale Open-source Resource and QUEue manager
Source0: http://www.adaptivecomputing.com/download/%{name}/%{name}-%{version}.tar.gz Source0: http://www.adaptivecomputing.com/download/%{name}/%{name}-%{version}.tar.gz
Source2: xpbs.desktop Source2: xpbs.desktop
@ -84,6 +84,7 @@ Source20: pbs_mom.service
Source21: pbs_sched.service Source21: pbs_sched.service
Source22: pbs_server.service Source22: pbs_server.service
Source23: trqauthd.service Source23: trqauthd.service
Source24: mom.layout
# Feb 3rd 2011, I've sent a mail upstream to request the re-inclusion # Feb 3rd 2011, I've sent a mail upstream to request the re-inclusion
# of the OpenPBS license file in distribution. # of the OpenPBS license file in distribution.
# I'll announce to fedora-devel once this is resolved either way. # I'll announce to fedora-devel once this is resolved either way.
@ -118,10 +119,8 @@ BuildRequires: tk-devel
%endif %endif
%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 %if 0%{?rhel} >= 7 || 0%{?fedora} > 0
%{?systemd_requires}
BuildRequires: systemd BuildRequires: systemd
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%endif %endif
%if 0%{?doxydoc} %if 0%{?doxydoc}
@ -460,9 +459,11 @@ popd
# Install mom_priv/config file to /etc/torque/mom # Install mom_priv/config file to /etc/torque/mom
mkdir -p %{buildroot}%{_sysconfdir}/torque/mom mkdir -p %{buildroot}%{_sysconfdir}/torque/mom
install -p -m 644 config %{buildroot}%{_sysconfdir}/torque/mom/config install -p -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/torque/mom/config
install -p -m 644 %{SOURCE24} %{buildroot}%{_sysconfdir}/torque/mom/mom.layout
pushd %{buildroot}%{torquehomedir}/mom_priv pushd %{buildroot}%{torquehomedir}/mom_priv
ln -s %{_sysconfdir}/torque/mom/config . ln -s %{_sysconfdir}/torque/mom/config .
ln -s %{_sysconfdir}/torque/mom/mom.layout .
popd popd
# Install sched_config files to /etc/torque/sched # Install sched_config files to /etc/torque/sched
@ -571,6 +572,13 @@ fi
%post drmaa -p /sbin/ldconfig %post drmaa -p /sbin/ldconfig
%postun drmaa -p /sbin/ldconfig %postun drmaa -p /sbin/ldconfig
%pre mom
if test -f %{torquehomedir}/mom_priv/mom.layout ; then
if ! test -h %{torquehomedir}/mom_priv/mom.layout ; then
mkdir -p %{_sysconfdir}/torque/mom
cp -p %{torquehomedir}/mom_priv/mom.layout %{_sysconfdir}/torque/mom/
fi
fi
%post mom %post mom
%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 %if 0%{?rhel} >= 7 || 0%{?fedora} > 0
@ -802,6 +810,7 @@ fi
%dir %{_sysconfdir}/torque/mom %dir %{_sysconfdir}/torque/mom
%{_mandir}/man8/pbs_mom.8.* %{_mandir}/man8/pbs_mom.8.*
%config(noreplace) %{_sysconfdir}/torque/mom/config %config(noreplace) %{_sysconfdir}/torque/mom/config
%config(noreplace) %{_sysconfdir}/torque/mom/mom.layout
%files pam %files pam
%defattr(-, root, root, -) %defattr(-, root, root, -)
@ -881,6 +890,10 @@ fi
%endif %endif
%changelog %changelog
* Fri Apr 8 2016 David Brown <david.brown@pnnl.gov> - 4.2.10-10
- Resolve systemd requires for bug #1319195
- add sample mom.layout file as an example
* Fri Feb 19 2016 David Brown <david.brown@pnnl.gov> - 4.2.10-9 * Fri Feb 19 2016 David Brown <david.brown@pnnl.gov> - 4.2.10-9
- Resolve dependencies for rawhide (#1308192) - Resolve dependencies for rawhide (#1308192)
- Fix port and args environment variables for el5/6 (#1254301) - Fix port and args environment variables for el5/6 (#1254301)