From f1af42e0d59574a2c4c8a976687e2e9dd950ed09 Mon Sep 17 00:00:00 2001 From: David Brown Date: Sat, 9 Apr 2016 05:18:00 -0700 Subject: [PATCH] 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. --- mom.layout | 1 + torque.spec | 23 ++++++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 mom.layout diff --git a/mom.layout b/mom.layout new file mode 100644 index 0000000..aa177d7 --- /dev/null +++ b/mom.layout @@ -0,0 +1 @@ +nodes=0 diff --git a/torque.spec b/torque.spec index beb05fa..a4b0d97 100644 --- a/torque.spec +++ b/torque.spec @@ -71,7 +71,7 @@ Name: torque Version: 4.2.10 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Tera-scale Open-source Resource and QUEue manager Source0: http://www.adaptivecomputing.com/download/%{name}/%{name}-%{version}.tar.gz Source2: xpbs.desktop @@ -84,6 +84,7 @@ Source20: pbs_mom.service Source21: pbs_sched.service Source22: pbs_server.service Source23: trqauthd.service +Source24: mom.layout # Feb 3rd 2011, I've sent a mail upstream to request the re-inclusion # of the OpenPBS license file in distribution. # I'll announce to fedora-devel once this is resolved either way. @@ -118,10 +119,8 @@ BuildRequires: tk-devel %endif %if 0%{?rhel} >= 7 || 0%{?fedora} > 0 +%{?systemd_requires} BuildRequires: systemd -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd %endif %if 0%{?doxydoc} @@ -460,9 +459,11 @@ popd # Install mom_priv/config file to /etc/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 ln -s %{_sysconfdir}/torque/mom/config . +ln -s %{_sysconfdir}/torque/mom/mom.layout . popd # Install sched_config files to /etc/torque/sched @@ -571,6 +572,13 @@ fi %post 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 %if 0%{?rhel} >= 7 || 0%{?fedora} > 0 @@ -802,6 +810,7 @@ fi %dir %{_sysconfdir}/torque/mom %{_mandir}/man8/pbs_mom.8.* %config(noreplace) %{_sysconfdir}/torque/mom/config +%config(noreplace) %{_sysconfdir}/torque/mom/mom.layout %files pam %defattr(-, root, root, -) @@ -881,6 +890,10 @@ fi %endif %changelog +* Fri Apr 8 2016 David Brown - 4.2.10-10 +- Resolve systemd requires for bug #1319195 +- add sample mom.layout file as an example + * Fri Feb 19 2016 David Brown - 4.2.10-9 - Resolve dependencies for rawhide (#1308192) - Fix port and args environment variables for el5/6 (#1254301)