From 47116d5eab169fc3db5164db887cd2a695f7f728 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 16 Oct 2018 09:10:35 +0100 Subject: [PATCH] Adjust dependencies for install requirements, few cleanups, fix up some conditionals for obsolete deps on systemd systems, kill off bits < el6 era --- torque.spec | 74 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 32 deletions(-) diff --git a/torque.spec b/torque.spec index bbb3a32..41eac5c 100644 --- a/torque.spec +++ b/torque.spec @@ -71,7 +71,7 @@ Name: torque Version: 4.2.10 -Release: 18%{?dist} +Release: 19%{?dist} Summary: Tera-scale Open-source Resource and QUEue manager Source0: http://www.adaptivecomputing.com/download/%{name}/%{name}-%{version}.tar.gz Source2: xpbs.desktop @@ -120,7 +120,7 @@ BuildRequires: tcl-devel BuildRequires: tk-devel %endif -%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 +%if 0%{?rhel} >= 7 || 0%{?fedora} %{?systemd_requires} BuildRequires: systemd %endif @@ -144,11 +144,7 @@ BuildRequires: tex-multirow BuildRequires: tex-adjustbox %endif %else -%if 0%{?rhel} >= 6 BuildRequires: tex(latex) -%else -BuildRequires: tetex-latex -%endif %endif %endif @@ -169,8 +165,8 @@ This package holds just a few shared files and directories. Group: Applications/System Summary: Client part of TORQUE Requires: %{name}-libs = %{version}-%{release} -Requires(posttrans): chkconfig -Requires(preun): chkconfig +Requires(posttrans): %{_sbindir}/alternatives +Requires(preun): %{_sbindir}/alternatives %description client TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource @@ -186,9 +182,7 @@ This package holds the command-line client programs. Group: Documentation Summary: Documentation files for TORQUE Requires: %{name} = %{version}-%{release} -%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 BuildArch: noarch -%endif %description docs TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource @@ -260,9 +254,14 @@ Requires: munge %if ! %{use_rcp} Requires: openssh-clients %endif -Requires(post): chkconfig -Requires(preun): chkconfig +%if 0%{?rhel} >= 7 || 0%{?fedora} +Requires(posttrans): systemd +Requires(preun): systemd +%else +Requires(posttrans): chkconfig +Requires(preun): chkconfig Requires(preun): initscripts +%endif @@ -294,9 +293,14 @@ A simple PAM module to authorize users on PBS MOM nodes with a running job. Group: System Environment/Daemons Summary: Simple fifo scheduler for TORQUE Requires: torque-libs = %{version}-%{release} -Requires(post): chkconfig -Requires(preun): chkconfig +%if 0%{?rhel} >= 7 || 0%{?fedora} +Requires(posttrans): systemd +Requires(preun): systemd +%else +Requires(posttrans): chkconfig +Requires(preun): chkconfig Requires(preun): initscripts +%endif %description scheduler TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource @@ -316,9 +320,14 @@ Requires: munge %if ! %{use_rcp} Requires: openssh-server %endif -Requires(post): chkconfig -Requires(preun): chkconfig -Requires(preun): initscripts +%if 0%{?rhel} >= 7 || 0%{?fedora} +Requires(posttrans): systemd +Requires(preun): systemd +%else +Requires(posttrans): chkconfig +Requires(preun): chkconfig +Requires(preun): initscripts +%endif %description server TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource @@ -407,7 +416,7 @@ rm -f %{buildroot}%{_libdir}/*/buildindex rm -f %{buildroot}/%{_lib}/security/pam_pbssimpleauth.{a,la} mkdir -p %{buildroot}%{_bindir} -%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 +%if 0%{?rhel} >= 7 || 0%{?fedora} # install systemd scripts mkdir -p %{buildroot}%{_unitdir} install -p -m 644 %{SOURCE20} %{buildroot}%{_unitdir}/ @@ -524,14 +533,14 @@ __EOF__ fi done done -%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 +%if 0%{?rhel} >= 7 || 0%{?fedora} %systemd_post trqauthd.service %else /sbin/chkconfig --add trqauthd %endif %preun -%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 +%if 0%{?rhel} >= 7 || 0%{?fedora} %systemd_preun trqauthd.service %else if [ $1 -eq 0 ]; then @@ -582,14 +591,14 @@ if test -f %{torquehomedir}/mom_priv/mom.layout ; then fi %post mom -%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 +%if 0%{?rhel} >= 7 || 0%{?fedora} %systemd_post pbs_mom.service %else /sbin/chkconfig --add pbs_mom %endif %preun mom -%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 +%if 0%{?rhel} >= 7 || 0%{?fedora} %systemd_preun pbs_mom.service %else if [ $1 -eq 0 ]; then @@ -599,14 +608,14 @@ fi %endif %post scheduler -%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 +%if 0%{?rhel} >= 7 || 0%{?fedora} %systemd_post pbs_sched.service %else /sbin/chkconfig --add pbs_sched %endif %preun scheduler -%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 +%if 0%{?rhel} >= 7 || 0%{?fedora} %systemd_preun pbs_sched.service %else if [ $1 -eq 0 ]; then @@ -616,14 +625,14 @@ fi %endif %post server -%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 +%if 0%{?rhel} >= 7 || 0%{?fedora} %systemd_post pbs_server.service %else /sbin/chkconfig --add pbs_server %endif %preun server -%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 +%if 0%{?rhel} >= 7 || 0%{?fedora} %systemd_preun pbs_server.service %else if [ $1 -eq 0 ]; then @@ -649,7 +658,7 @@ fi %config(noreplace) %{_sysconfdir}/torque/server_name %{_mandir}/man1/pbs.1.* %attr(0755, root, root) %{_sbindir}/trqauthd -%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 +%if 0%{?rhel} >= 7 || 0%{?fedora} %{_unitdir}/trqauthd.service %else %{_initrddir}/trqauthd @@ -789,7 +798,7 @@ fi %{_sbindir}/qnoded %{_sbindir}/pbs_demux %{_bindir}/pbs_track -%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 +%if 0%{?rhel} >= 7 || 0%{?fedora} %{_unitdir}/pbs_mom.service %else %{_initrddir}/pbs_mom @@ -813,7 +822,7 @@ fi %files scheduler %attr(0755, root, root) %{_sbindir}/pbs_sched %{_sbindir}/qschedd -%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 +%if 0%{?rhel} >= 7 || 0%{?fedora} %{_unitdir}/pbs_sched.service %else %{_initrddir}/pbs_sched @@ -835,7 +844,7 @@ fi %files server %attr(0755, root, root) %{_sbindir}/pbs_server %{_sbindir}/qserverd -%if 0%{?rhel} >= 7 || 0%{?fedora} > 0 +%if 0%{?rhel} >= 7 || 0%{?fedora} %{_unitdir}/pbs_server.service %else %{_initrddir}/pbs_server @@ -855,7 +864,6 @@ fi %{_mandir}/man3/compat.h.3.* %{_mandir}/man3/drmaa.3.* %{_mandir}/man3/drmaa.h.3.* -%if 0%{?rhel} >= 6 || 0%{?fedora} >= 6 %{_mandir}/man3/drmaa_attr_names_s.3.* %{_mandir}/man3/drmaa_attr_values_s.3.* %{_mandir}/man3/drmaa_attrib.3.* @@ -864,7 +872,6 @@ fi %{_mandir}/man3/drmaa_job_ids_s.3.* %{_mandir}/man3/drmaa_def_attr_s.3.* %{_mandir}/man3/pbs_attrib.3.* -%endif %{_mandir}/man3/drmaa_viter.3.* %{_mandir}/man3/drmaa_job_iter_s.3.* %{_mandir}/man3/drmaa_job_s.3.* @@ -879,6 +886,9 @@ fi %endif %changelog +* Mon Oct 15 2018 Peter Robinson 4.2.10-19 +- Adjust dependencies for install requirements, few cleanups + * Sat Jul 14 2018 Fedora Release Engineering - 4.2.10-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild