# Use rsh if use_ssh is set to 0 %define use_ssh 1 %define pbs_server_home /var/spool/pbs %define pbs_config %{_sysconfdir}/pbs Name: torque Version: 2.0.0p8 Release: 13%{?dist} Summary: Tera-scale Open-source Resource and QUEue manager Group: Clustering/Job Management License: Portable Batch System (PBS) Software License URL: http://www.clusterresources.com/products/torque/ Source: http://www.clusterresources.com/downloads/torque/torque-%{version}.tar.gz Source1: torque_init.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: autoconf213 BuildRequires: tcl-devel, tk-devel, tclx, perl BuildRequires: flex, bison BuildRequires: groff, elfutils-libelf-devel, readline-devel BuildRequires: ncurses-devel, ed # BuildRequires: sendmail Provides: pbs Obsoletes: pbs Requires: tcl tk Requires: torque-server >= %{version}, torque-mom >= %{version} Requires: torque-scheduler >= %{version}, torque-x11tools >= %{version} Conflicts: dqs %description TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource manager providing control over batch jobs and distributed compute nodes. It is a community effort based on the original *PBS project and has incorporated significant advances in the areas of scalability, fault tolerance, and feature extensions contributed by NCSA, OSC, USC, the U.S. Dept of Energy, Sandia, PNNL, U of Buffalo, TeraGrid, and many other leading edge HPC organizations. This version may be freely modified and redistributed subject to the constraints of the included license. %package devel Summary: Portable Batch System development headers and libraries Group: Clustering/Job Management Requires: gcc >= 2.95.2 %description devel TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource manager providing control over batch jobs and distributed compute nodes. It is a community effort based on the original *PBS project and has incorporated significant advances in the areas of scalability, fault tolerance, and feature extensions contributed by NCSA, OSC, USC, the U.S. Dept of Energy, Sandia, PNNL, U of Buffalo, TeraGrid, and many other leading edge HPC organizations. This version may be freely modified and redistributed subject to the constraints of the included license. This package contains the torque development headers and libraries. %package mom Summary: Portable Batch System clients and MOM server Group: Clustering/Job Management Provides: pbs-mom pbs-clients %description mom TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource manager providing control over batch jobs and distributed compute nodes. It is a community effort based on the original *PBS project and has incorporated significant advances in the areas of scalability, fault tolerance, and feature extensions contributed by NCSA, OSC, USC, the U.S. Dept of Energy, Sandia, PNNL, U of Buffalo, TeraGrid, and many other leading edge HPC organizations. This version may be freely modified and redistributed subject to the constraints of the included license. This package contains the PBS clients, and the MOM server. %package server Summary: Portable Batch System server Group: Clustering/Job Management Requires: %{name}-mom %description server TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource manager providing control over batch jobs and distributed compute nodes. It is a community effort based on the original *PBS project and has incorporated significant advances in the areas of scalability, fault tolerance, and feature extensions contributed by NCSA, OSC, USC, the U.S. Dept of Energy, Sandia, PNNL, U of Buffalo, TeraGrid, and many other leading edge HPC organizations. This version may be freely modified and redistributed subject to the constraints of the included license. This package contains the PBS server. %package scheduler Summary: The Torque Scheduler Group: Clustering/Job Management Requires: %{name}-server = %{version} %description scheduler The torque scheduler is a daemon that evaulates jobs in the queue and selects those which will run next. %package x11tools Summary: Portable Batch System X11 based tools Group: Clustering/Job Management Requires: %{name}-mom tcl tk %description x11tools TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource manager providing control over batch jobs and distributed compute nodes. It is a community effort based on the original *PBS project and has incorporated significant advances in the areas of scalability, fault tolerance, and feature extensions contributed by NCSA, OSC, USC, the U.S. Dept of Energy, Sandia, PNNL, U of Buffalo, TeraGrid, and many other leading edge HPC organizations. This version may be freely modified and redistributed subject to the constraints of the included license. This package contains the X11 user tools. %prep %setup -q -n %{name}-%{version} -a1 perl -pi -e's,AC_PROG_AR,AC_PROG_RANLIB,' configure.in %if %{use_ssh} # make mom_rcp to use ssh perl -pi -e's|#define\s+_PATH_RSH\s+"rsh"|#define _PATH_RSH\t"ssh"|' src/mom_rcp/pathnames.h # have xpbs use ssh too perl -pi -e's|RSH rshCmd "rsh"|RSH rshCmd "ssh"|' src/gui/xpbs.src perl -pi -e's|set default(trackjob_rsh_command) rsh|set default(trackjob_rsh_command) ssh|' src/gui/xpbs.src %endif %build CFLAGS="%{optflags}"; export CFLAGS ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --mandir=%{_mandir} \ --enable-docs \ --enable-server \ --enable-mom \ --enable-gui \ --enable-clients \ --enable-syslog \ --enable-tcl-qstat \ --x-libraries=%{_x_libraries} \ --set-server-home=%{pbs_server_home} \ --set-server-name-file=%{pbs_config}/default_server \ --set-default-server=localhost \ --set-environ=%{pbs_config}/environment make all %install rm -rf %{buildroot} %makeinstall \ PBS_SERVER_HOME=%{buildroot}%{pbs_server_home} \ PBS_DEFAULT_FILE=%{buildroot}%{pbs_config}/default_server \ PBS_DEFAULT_SERVER=localhost \ PBS_ENVIRON=%{buildroot}%{pbs_config}/environment # Remove %{buildroot} traces space_buildroot=`echo %{buildroot} | tr / ' '` perl -pi -e "s|$space_buildroot||g" \ %{buildroot}%{_libdir}/xpbs/tclIndex \ %{buildroot}%{_libdir}/xpbsmon/tclIndex # Init scripts install -d %{buildroot}%{_initrddir} install -Dm 755 pbsserv_init.%{_vendor} %{buildroot}%{_initrddir}/pbsserv install -Dm 755 pbssched_init.%{_vendor} %{buildroot}%{_initrddir}/pbssched install -Dm 755 pbsmom_init.%{_vendor} %{buildroot}%{_initrddir}/pbsmom %if "%{_vendor}" == "suse" ln -sf ../../etc/init.d/pbsserv %{buildroot}%{_sbindir}/rcpbsserv ln -sf ../../etc/init.d/pbsmom %{buildroot}%{_sbindir}/rcpbsmom ln -sf ../../etc/init.d/pbssched %{buildroot}%{_sbindir}/rcpbssched %endif # devel files install -d %{buildroot}%{_includedir}/pbs install -m 644 src/include/*.h %{buildroot}%{_includedir}/pbs install -m 644 src/include/tm.h %{buildroot}%{_includedir} install -m 644 src/include/portability.h %{buildroot}%{_includedir} install -m 644 src/include/tm_.h %{buildroot}%{_includedir} # logs mkdir -p %{buildroot}%{_localstatedir}/log/torque/mom mkdir -p %{buildroot}%{_localstatedir}/log/torque/sched mkdir -p %{buildroot}%{_localstatedir}/log/torque/serv rmdir %{buildroot}%{pbs_server_home}/mom_logs rmdir %{buildroot}%{pbs_server_home}/sched_logs rmdir %{buildroot}%{pbs_server_home}/server_logs ln -s %{_localstatedir}/log/torque/mom %{buildroot}%{pbs_server_home}/mom_logs ln -s %{_localstatedir}/log/torque/sched %{buildroot}%{pbs_server_home}/sched_logs ln -s %{_localstatedir}/log/torque/serv %{buildroot}%{pbs_server_home}/server_logs # touch %{buildroot}%{pbs_server_home}/mom_priv/config #install -Dm 744 buildutils/pbs_mkdirs %{buildroot}%{_sbindir}/pbs_mkdirs # rename libattr.a so it doesn't conflict with libattr-devel mv %{buildroot}%{_libdir}/libattr.a %{buildroot}%{_libdir}/pbs_libattr.a %clean rm -rf %{buildroot} %post server /sbin/chkconfig --add pbsserv %preun server if [ $1 = 0 ]; then /sbin/service pbsserv stop > /dev/null 2>&1 /sbin/chkconfig --del pbsserv fi %post scheduler /sbin/chkconfig --add pbssched %preun scheduler if [ $1 = 0 ]; then /sbin/service pbssched stop > /dev/null 2>&1 /sbin/chkconfig --del pbssched fi %post mom /sbin/chkconfig --add pbsmom %preun mom if [ $1 = 0 ]; then /sbin/service mom stop > /dev/null 2>&1 /sbin/chkconfig --del mom fi %files %defattr(-,root,root,-) %files mom %defattr(-,root,root,0755) %doc INSTALL PBS_License.txt Release_Notes README.mpiexec README.torque CHANGELOG %{_bindir}/qalter %{_bindir}/qdel %{_bindir}/qhold %{_bindir}/qmove %{_bindir}/qorder %{_bindir}/qmsg %{_bindir}/qrls %{_bindir}/qrerun %{_bindir}/qselect %{_bindir}/qsig %{_bindir}/qsub %{_bindir}/pbsdsh %{_bindir}/nqs2pbs %{_bindir}/printtracking %{_sbindir}/pbs_mom %{_sbindir}/pbs_rcp %{_sbindir}/pbs_iff %{_sbindir}/pbs_demux #%{_sbindir}/pbs_mkdirs %if "%{_vendor}" == "suse" %{_sbindir}/rcpbsmom %endif %{_initrddir}/pbsmom %config(noreplace) %{_sysconfdir}/pbs/default_server %config(noreplace) %{_sysconfdir}/pbs/environment %config(noreplace) %{pbs_server_home}/mom_priv/config %dir %{_sysconfdir}/pbs %dir %{_localstatedir}/log/torque/mom %{pbs_server_home}/mom_logs %dir %{pbs_server_home} %dir %{pbs_server_home}/aux %dir %{pbs_server_home}/mom_priv %dir %{pbs_server_home}/mom_priv/jobs %dir %{pbs_server_home}/spool %dir %{pbs_server_home}/undelivered %{_mandir}/man7/pbs_resources_all.soB* %{_mandir}/man7/pbs_resources_aix4.7B* %{_mandir}/man7/pbs_resources_digitalunix.7B* %{_mandir}/man7/pbs_resources_freebsd.7B* %{_mandir}/man7/pbs_resources_fujitsu.7B* %{_mandir}/man7/pbs_resources_irix5.7B* %{_mandir}/man7/pbs_resources_irix6array.7B* %{_mandir}/man7/pbs_resources_irix6.7B* %{_mandir}/man7/pbs_resources_linux.7B* %{_mandir}/man7/pbs_resources_solaris5.7B* %{_mandir}/man7/pbs_resources_solaris7.7B* %{_mandir}/man7/pbs_resources_sp2.7B* %{_mandir}/man7/pbs_resources_sunos4.7B* %{_mandir}/man7/pbs_resources_unicos8.7B* %{_mandir}/man7/pbs_resources_unicosmk2.7B* %{_mandir}/man7/pbs_resources.7B* %{_mandir}/man7/pbs_job_attributes.7B* %{_mandir}/man7/pbs_queue_attributes.7B* %{_mandir}/man7/pbs_resources_netbsd.7B* %{_mandir}/man7/pbs_resources_hpux11.7B* %{_mandir}/man8/pbs_mom.8B* %{_mandir}/man1/qdel.1B* %{_mandir}/man1/qmove.1B* %{_mandir}/man1/qmsg.1B* %{_mandir}/man1/qorder.1B* %{_mandir}/man1/qrerun.1B* %{_mandir}/man1/qrls.1B* %{_mandir}/man1/qsig.1B* %{_mandir}/man1/qsub.1B* %{_mandir}/man1/pbs.1B* %{_mandir}/man1/nqs2pbs.1B* %{_mandir}/man1/qalter.1B* %{_mandir}/man1/qhold.1B* %{_mandir}/man1/qselect.1B* %files devel %defattr(-,root,root,0755) %{_libdir}/pbs_sched.a %{_libdir}/pbs_libattr.a %{_libdir}/libcmds.a %{_libdir}/liblog.a %{_libdir}/libnet.a %{_libdir}/libpbs.a %{_libdir}/libsite.a %{_includedir}/pbs/ %{_includedir}/*.h %{_mandir}/man3/pbs_deljob.3B* %{_mandir}/man3/pbs_default.3B* %{_mandir}/man3/pbs_disconnect.3B* %{_mandir}/man3/pbs_geterrmsg.3B* %{_mandir}/man3/pbs_holdjob.3B* %{_mandir}/man3/pbs_manager.3B* %{_mandir}/man3/pbs_movejob.3B* %{_mandir}/man3/pbs_msgjob.3B* %{_mandir}/man3/pbs_orderjob.3B* %{_mandir}/man3/pbs_rescquery.3B* %{_mandir}/man3/pbs_rerunjob.3B* %{_mandir}/man3/pbs_rlsjob.3B* %{_mandir}/man3/pbs_runjob.3B* %{_mandir}/man3/pbs_selectjob.3B* %{_mandir}/man3/pbs_sigjob.3B* %{_mandir}/man3/pbs_stagein.3B* %{_mandir}/man3/pbs_statjob.3B* %{_mandir}/man3/pbs_statque.3B* %{_mandir}/man3/pbs_statserver.3B* %{_mandir}/man3/pbs_submit.3B* %{_mandir}/man3/pbs_terminate.3B* %{_mandir}/man3/rpp.3B* %{_mandir}/man3/tm.3B* %{_mandir}/man3/pbs_alterjob.3B* %{_mandir}/man3/pbs_connect.3B* %{_mandir}/man3/pbs_rescreserve.3B* %{_mandir}/man3/pbs_selstat.3B* %files server %defattr(-,root,root,0755) # commented out for clean vanilla build #%config(noreplace) /etc/pbs/server.conf %{_bindir}/qdisable %{_bindir}/qenable %{_bindir}/qrun %{_bindir}/qstart %{_bindir}/qstop %{_bindir}/qterm %{_bindir}/pbsnodes %{_bindir}/qmgr %{_bindir}/chk_tree %{_bindir}/hostn %{_bindir}/printjob %{_bindir}/tracejob %{_sbindir}/pbs_server %{_sbindir}/pbs_sched %{_sbindir}/momctl %{_initrddir}/pbsserv %if "%{_vendor}" == "suse" %{_sbindir}/rcpbsserv %endif %dir %{_localstatedir}/log/torque/serv %{pbs_server_home}/server_logs %dir %{pbs_server_home} %dir %{pbs_server_home}/server_priv %dir %{pbs_server_home}/server_priv/jobs %dir %{pbs_server_home}/server_priv/queues %dir %{pbs_server_home}/server_priv/acl_svr %dir %{pbs_server_home}/server_priv/acl_hosts %dir %{pbs_server_home}/server_priv/acl_users %dir %{pbs_server_home}/server_priv/acl_groups %dir %{pbs_server_home}/server_priv/accounting %dir %{pbs_server_home}/checkpoint #%doc pbs_admin.pdf -- not in torque? %{_mandir}/man7/pbs_server_attributes.7B* %{_mandir}/man7/pbs_resources_aix5.7B* %{_mandir}/man7/pbs_resources_darwin.7B* %{_mandir}/man7/pbs_resources_hpux10.7B* %{_mandir}/man8/pbs_server.8B* %{_mandir}/man8/qmgr.8B* %{_mandir}/man8/qrun.8B* %{_mandir}/man8/qstart.8B* %{_mandir}/man8/qstop.8B* %{_mandir}/man8/qterm.8B* %{_mandir}/man8/qdisable.8B* %{_mandir}/man8/qenable.8B* %{_mandir}/man8/pbsnodes.8B* %{_mandir}/man8/pbs_sched.8B* %{_mandir}/man1/pbsdsh.1B* %files scheduler %defattr(-,root,root) %{_initrddir}/pbssched %if "%{_vendor}" == "suse" %{_sbindir}/rcpbssched %endif %dir %{_localstatedir}/log/torque/sched %{pbs_server_home}/sched_logs %dir %{pbs_server_home}/sched_logs %dir %{pbs_server_home}/sched_priv %config(noreplace) %{pbs_server_home}/sched_priv/sched_config %config(noreplace) %{pbs_server_home}/sched_priv/resource_group %config(noreplace) %{pbs_server_home}/sched_priv/holidays %config(noreplace) %{pbs_server_home}/sched_priv/dedicated_time %{_mandir}/man1/basl2c.1B* %{_mandir}/man8/pbs_sched_cc.8B* %{_mandir}/man8/pbs_sched_basl.8B* %{_mandir}/man8/pbs_sched_tcl.8B* %files x11tools %defattr(-,root,root,0755) %{_bindir}/pbs_tclsh %{_bindir}/pbs_wish %{_bindir}/qstat %{_bindir}/xpbs %{_bindir}/xpbsmon %{_libdir}/xpbsmon %{_libdir}/xpbs %{_mandir}/man1/xpbsmon.1B* %{_mandir}/man1/xpbs.1B* %{_mandir}/man1/qstat.1B* %changelog * Sat Mar 11 2006 Axel Thimm - Update to 2.0.0p8. * Tue Dec 27 2005 Jarod Wilson - Added missing BuildRequires - Fix more lib/lib64 issues in configure - Add torque pseudo-package - Bump to version 2.0.0p4 * Thu Dec 08 2005 Jarod Wilson - Fixed scheduler items misplaced in server package - Altered libattr.a file in devel package to avoid conflict with libattr-devel * Wed Dec 07 2005 Jarod Wilson - Initial build