2006-04-18 02:10:40 +00:00
# comment out snap if building a real release
%define name torque
2007-03-13 19:12:01 +00:00
%define version 2.1.8
2006-05-11 21:26:06 +00:00
#%%define snap 200604251602
2007-03-13 19:12:01 +00:00
%define release 1
2006-04-18 02:10:40 +00:00
# The following options are supported:
# --with server_name=hostname
# --with homedir=directory
# --with[out] rcp
# --with[out] gui
# --with[out] tcl
# Hrm, should we default to the name of the buildhost? That seems only
# slightly better than picking a hostname at random. This is exactly the kind
# of compile-time default that doesn't work well with distributable packages.
# Let's force the issue with the non-sensical "localhost".
#
# Note that "localhost" doesn't actually work. You must either define the
# correct hostname here, pass '--with server_name=foo' to rpmbuild, or be sure
# that $PBS_SERVER_HOME/server_name contains the correct hostname.
%define server_name localhost
# change as you wish
%define use_rcp 0
%define use_tcl 1
%define build_gui 1
# these are non-defaults, but fit better into most RPM-based systems
%define torquehomedir %_localstatedir/torque
# --with/--without processing
# first, error if conflicting options are used
%{?_with_rcp: %{?_without_rcp: %{error: both _with_rcp and _without_rcp}}}
%{?_with_tcl: %{?_without_tcl: %{error: both _with_tcl and _without_tcl}}}
%{?_with_gui: %{?_without_gui: %{error: both _with_gui and _without_gui}}}
# did we find any --with options?
%{?_with_rcp: %define use_rcp 1}
%{?_with_tcl: %define use_tcl 1}
%{?_with_gui: %define build_gui 1}
%{?_with_server_name:%define server_name %(set -- %{_with_server_name}; echo $1 | grep -v with | sed 's/=//')}
%{?_with_homedir:%define torquehomedir %(set -- %{_with_homedir}; echo $1 | grep -v with | sed 's/=//')}
# did we find any --without options?
%{?_without_rcp: %define use_rcp 0}
%{?_without_tcl: %define use_tcl 0}
%{?_without_gui: %define build_gui 0}
# Set up all options as disabled
%define rcpflags --with-rcp=/usr/bin/scp
%define tclflags --without-tcl
%define guiflags --disable-gui
# Enable options that we want
%if %use_rcp
%define rcpflags --with-rcp=mom_rcp
%endif
%if %build_gui
%define guiflags --enable-gui
%endif
%if %use_tcl
%if %build_gui
%define tclflags --with-tcl --with-tk
%else
%define tclflags --with-tcl --without-tk
%endif
%endif
# finish up the configs...
%define server_nameflags --with-default-server=%{server_name}
%define shared_description %(echo -e "TORQUE (Tera-scale Open-source Resource and QUEue manager) is a resource \\nmanager providing control over batch jobs and distributed compute nodes. \\nTORQUE is based on OpenPBS version 2.3.12 and incorporates scalability, \\nfault tolerance, and feature extension patches provided by USC, NCSA, OSC, \\nthe U.S. Dept of Energy, Sandia, PNNL, U of Buffalo, TeraGrid, and many \\nother leading edge HPC organizations.\\n\\nThis build was configured with:\\n %{server_nameflags}\\n %{tclflags}\\n %{guiflags}\\n %{rcpflags}\\n")
Summary : Tera-scale Open-source Resource and QUEue manager
Name : %{name}
Version : %{version}
Release : %{?snap:0.%{release} .%{snap} cvs}%{!?snap:%{release} }%{?dist}
Source : torque-%{version} %{?snap:-snap.%snap}.tar.gz
Source2 : xpbs.desktop
Source3 : xpbsmon.desktop
Source4 : xpbs.png
Source5 : xpbsmon.png
2006-05-15 23:08:15 +00:00
Source6 : README-localhost
2006-04-18 02:10:40 +00:00
License : Freely redistributable (See PBS_License.txt)
Group : System Environment/Daemons
URL : http://www.clusterresources.com/products/torque/
BuildRoot : %{_tmppath} /%{name} -%{version} -%{release} -root-%(%{__id_u} -n)
Provides : pbs
2006-10-12 19:50:10 +00:00
BuildRequires : desktop-file-utils, pam-devel, xauth, readline-devel, ncurses-devel
2006-04-18 02:10:40 +00:00
Conflicts : pbspro, openpbs, openpbs-oscar
2006-05-15 23:08:15 +00:00
Obsoletes : torque-localhost
2006-04-18 02:10:40 +00:00
%if %use_tcl
BuildRequires : tcl-devel
%endif
%if %build_gui
BuildRequires : tk-devel
%else
Obsoletes : torque-gui
%endif
%if ! %use_rcp
Requires : openssh-clients
%endif
%description
%shared_description
This package holds just a few shared files and directories.
%prep
%setup -q -n torque-%{version} %{?snap:-snap.%snap}
2006-08-01 23:22:12 +00:00
%__install -pm 644 %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} .
2006-04-18 02:10:40 +00:00
%build
2006-08-01 23:22:12 +00:00
%configure --includedir=%{_includedir} /torque \
--with-server-home=%{torquehomedir} --with-pam=/%{_lib}/security \
2007-03-13 19:12:01 +00:00
--with-sendmail=/usr/sbin/sendmail \
2006-08-01 23:22:12 +00:00
%{server_nameflags} %{guiflags} %{tclflags} %{rcpflags}
2006-04-18 02:10:40 +00:00
%__make %{?_smp_mflags}
%install
%__rm -rf " $RPM_BUILD_ROOT "
%__make DESTDIR=$RPM_BUILD_ROOT install
# remove files we don't need
%__rm -f $RPM_BUILD_ROOT /%_libdir /*.la
%__rm -f $RPM_BUILD_ROOT /%_libdir /*/buildindex
2006-08-01 23:22:12 +00:00
%{__rm} -f $RPM_BUILD_ROOT /%{_lib}/security/pam_pbssimpleauth.{a,la}
2006-04-18 02:10:40 +00:00
# install initscripts
%__mkdir_p $RPM_BUILD_ROOT %{_initrddir}
for daemon in pbs_mom pbs_sched pbs_server; do
%__sed -e 's|^PBS_HOME=.*|PBS_HOME=%{torquehomedir}|' \
-e 's|^PBS_DAEMON=.*|PBS_DAEMON=%{_sbindir}/' $daemon'|' \
-e 's|chkconfig: 345|chkconfig: -|' \
< contrib/init.d/$daemon > $RPM_BUILD_ROOT %{_initrddir} /$daemon
%__chmod 755 $RPM_BUILD_ROOT %{_initrddir} /$daemon
done
%if %{build_gui}
# This is really trivial, but cleans up an rpmlint warning
%__sed -i -e 's|%_lib/../||' $RPM_BUILD_ROOT %{_bindir} /xpbs
# install .desktop files and my ugly icons
desktop-file-install --vendor fedora \
--dir $RPM_BUILD_ROOT %{_datadir} /applications \
--add-category X-Fedora \
xpbs.desktop
desktop-file-install --vendor fedora \
--dir $RPM_BUILD_ROOT %{_datadir} /applications \
--add-category X-Fedora \
xpbsmon.desktop
%__install -d $RPM_BUILD_ROOT %{_datadir} /pixmaps
%__install -p -m0644 xpbs.png xpbsmon.png $RPM_BUILD_ROOT %{_datadir} /pixmaps
%endif
%clean
%__rm -rf " $RPM_BUILD_ROOT "
%post
if %__grep -q " P B S s e r v i c e s " /etc/services;then
: PBS services already installed
else
cat<<-__EOF__>>/etc/services
# Standard PBS services
pbs 15001/tcp # pbs server (pbs_server)
pbs 15001/udp # pbs server (pbs_server)
pbs_mom 15002/tcp # mom to/from server
pbs_mom 15002/udp # mom to/from server
pbs_resmom 15003/tcp # mom resource management requests
pbs_resmom 15003/udp # mom resource management requests
pbs_sched 15004/tcp # scheduler
pbs_sched 15004/udp # scheduler
__EOF__
fi
%files
%defattr (-, root, root)
2006-05-15 23:08:15 +00:00
%doc README.torque torque.setup Release_Notes CHANGELOG PBS_License.txt README-localhost
2006-04-18 02:10:40 +00:00
%config (noreplace) %{torquehomedir} /pbs_environment
%config (noreplace) %{torquehomedir} /server_name
2006-10-16 22:36:00 +00:00
%dir %{torquehomedir}
2006-04-18 02:10:40 +00:00
%{torquehomedir} /aux
%{torquehomedir} /spool
%package docs
Group : Documentation
Summary : Documentation files for TORQUE
Requires : %{name} = %{?epoch:%{epoch} :}%{version} -%{release}
Provides : pbs-docs
%description docs
%shared_description
This package holds the documentation files.
%files docs
%defattr (-, root, root)
%doc doc/admin_guide.ps
%{_mandir} /man*/*
%package scheduler
Group : System Environment/Daemons
Summary : Simple fifo scheduler for TORQUE
Requires : %{name} = %{?epoch:%{epoch} :}%{version} -%{release}
Provides : pbs-scheduler
%description scheduler
%shared_description
This package holds the fifo C scheduler.
%files scheduler
%defattr (-, root, root)
%attr (0755, root, root) %{_sbindir} /pbs_sched
%{_initrddir} /pbs_sched
%dir %{torquehomedir} /sched_priv
%config (noreplace) %{torquehomedir} /sched_priv/*
%{torquehomedir} /sched_logs
%post scheduler
/sbin/chkconfig --add pbs_sched
%preun scheduler
if [ $1 -eq 0 ]; then
/sbin/service pbs_sched stop
/sbin/chkconfig --del pbs_sched
fi
%package server
Group : System Environment/Daemons
Summary : The main part of TORQUE
Requires : %{name} = %{?epoch:%{epoch} :}%{version} -%{release}
Provides : pbs-server
%description server
%shared_description
This package holds the server.
%files server
%defattr (-, root, root)
%attr (0755, root, root) %{_sbindir} /pbs_server
%attr (0755, root, root) %{_sbindir} /momctl
%{_initrddir} /pbs_server
%{torquehomedir} /server_logs
%{torquehomedir} /server_priv
%post server
/sbin/chkconfig --add pbs_server
%preun server
if [ $1 -eq 0 ]; then
/sbin/service pbs_server stop
/sbin/chkconfig --del pbs_server
fi
%package mom
Group : System Environment/Daemons
Summary : Node execution daemon for TORQUE
Requires : %{name} = %{?epoch:%{epoch} :}%{version} -%{release}
Provides : pbs-mom
%description mom
%shared_description
This package holds the execute daemon required on every node.
%files mom
%defattr (-, root, root)
%attr (0755, root, root) %{_sbindir} /pbs_mom
%{_initrddir} /pbs_mom
%if %{use_rcp}
%attr (4755 root root) %{_sbindir} /pbs_rcp
%endif
2006-10-16 22:36:00 +00:00
%{torquehomedir} /mom_priv
2006-04-18 02:10:40 +00:00
%{torquehomedir} /mom_logs
%{torquehomedir} /checkpoint
%{torquehomedir} /undelivered
%post mom
/sbin/chkconfig --add pbs_mom
%preun mom
if [ $1 -eq 0 ]; then
/sbin/service pbs_mom stop
/sbin/chkconfig --del pbs_mom
fi
%package client
Group : Applications/System
Summary : Client part of TORQUE
Requires : %{name} = %{?epoch:%{epoch} :}%{version} -%{release}
Provides : pbs-client
%description client
%shared_description
This package holds the command-line client programs.
%files client
%defattr (-, root, root)
%{_bindir} /q*
%{_bindir} /chk_tree
%{_bindir} /hostn
%{_bindir} /nqs2pbs
%{_bindir} /pbsdsh
%{_bindir} /pbsnodes
%{_bindir} /printjob
%{_bindir} /printtracking
%{_bindir} /tracejob
%attr (4755 root root) %{_sbindir} /pbs_iff
%{_sbindir} /pbs_demux
%if %use_tcl
%{_bindir} /pbs_tclsh
%endif
%package gui
Group : Applications/System
Summary : Graphical clients for TORQUE
Requires : %{name} -client = %{?epoch:%{epoch} :}%{version} -%{release}
Provides : xpbs xpbsmon
2006-10-21 01:28:07 +00:00
Provides : %{name} -x11tools
2006-04-18 02:10:40 +00:00
%description gui
%shared_description
This package holds the graphical clients.
%if %{build_gui}
%files gui
%defattr (-, root, root)
%{_bindir} /pbs_wish
%{_bindir} /xpbs
%{_bindir} /xpbsmon
%{_libdir} /xpbs
%{_libdir} /xpbsmon
%{_datadir} /applications/*.desktop
%{_datadir} /pixmaps/*.png
%endif
%package -n lib%{name}
Summary : Run-time libs for programs which will use the %{name} library
Group : Development/Libraries
Requires : %{name} = %{?epoch:%{epoch} :}%{version} -%{release}
%description -n lib%{name}
%shared_description
This package includes the shared libraries
necessary for running TORQUE programs.
%files -n lib%{name}
%defattr (-, root, root)
%{_libdir} /*.so.*
%post -n lib%{name} -p /sbin/ldconfig
%postun -n lib%{name} -p /sbin/ldconfig
%package -n lib%{name}-devel
Summary : Development tools for programs which will use the %{name} library
Group : Development/Libraries
Requires : lib%{name} = %{?epoch:%{epoch} :}%{version} -%{release}
%description -n lib%{name}-devel
%shared_description
This package includes the header files and static libraries
necessary for developing programs which will use %{name} .
%files -n lib%{name}-devel
%defattr (-, root, root)
%{_libdir} /*.a
%{_libdir} /*.so
%{_includedir} /torque
%{_bindir} /pbs-config
2006-08-01 23:22:12 +00:00
%package pam
2006-10-12 19:11:15 +00:00
Summary : PAM module for TORQUE MOM nodes
2006-08-01 23:22:12 +00:00
Group : System Environment/Base
%description pam
%shared_description
A simple PAM module to authorize users on PBS MOM nodes with a running job.
%files pam
%defattr (-, root, root)
%doc src/pam/README.pam
/%{_lib}/security/pam_pbssimpleauth.so
2006-04-18 02:10:40 +00:00
%changelog
2007-03-13 19:12:01 +00:00
* Tue Mar 13 2007 Garrick Staples <garrick@usc.edu> 2.1.8-1
- bump to 2.1.8
- ensure daemons have the correct path to sendmail
- don't need rpath configure patch anymore
2007-02-14 22:55:19 +00:00
* Wed Feb 14 2007 Garrick Staples <garrick@usc.edu> 2.1.6-5
- rebuilding because tcl8.5 was downgraded to tcl8.4
2007-02-06 18:41:14 +00:00
* Tue Feb 6 2007 Garrick Staples <garrick@usc.edu> 2.1.6-4
- rebuilding with new tcl
2007-02-04 05:14:12 +00:00
* Sat Feb 3 2007 Garrick Staples <garrick@usc.edu> 2.1.6-3
- trying to resolve tcl8.5 buildindex issue
2007-02-03 05:35:30 +00:00
* Fri Feb 2 2007 Garrick Staples <garrick@usc.edu> 2.1.6-2
- rebuild for tcl8.5
2006-10-25 00:33:38 +00:00
* Tue Oct 24 2006 Garrick Staples <garrick@usc.edu> 2.1.6-1
- fixes more regressions from Friday
2006-10-21 22:40:33 +00:00
* Sat Oct 21 2006 Garrick Staples <garrick@usc.edu> 2.1.5-1
- fixes " q s u b - o / d e v / n u l l " regression
2006-10-21 01:28:07 +00:00
* Fri Oct 20 2006 Garrick Staples <garrick@usc.edu> 2.1.4-1
- bump to fix " S p o o l J o b R a c e c o n d i t i o n " on bugtraq
2006-10-16 22:36:00 +00:00
* Mon Oct 16 2006 Garrick Staples <garrick@usc.edu> 2.1.3-3
- correct unowned directories
2006-10-12 19:50:10 +00:00
* Thu Oct 12 2006 Garrick Staples <garrick@usc.edu> 2.1.3-2
- missing BR ncurses-devel and readline-devel
2006-10-12 19:11:15 +00:00
* Thu Oct 12 2006 Garrick Staples <garrick@usc.edu> 2.1.3-1
- bump to 2.1.3
2006-08-27 22:11:44 +00:00
* Sun Aug 27 2006 Garrick Staples <garrick@usc.edu> 2.1.2-3
- FC6 mass rebuild
2006-08-03 05:39:37 +00:00
* Wed Aug 2 2006 Garrick Staples <garrick@usc.edu> 2.1.2-2
- fix incorrect _pam_getpwnam_r usage in pam module
2006-08-01 23:22:12 +00:00
* Tue Aug 1 2006 Garrick Staples <garrick@usc.edu> 2.1.2-1
- bump to 2.1.2
- fix bz #200830
- enable new pam module
2006-06-22 22:06:52 +00:00
* Thu Jun 22 2006 Garrick Staples <garrick@usc.edu> 2.1.1-3
- rebuild
* Thu Jun 22 2006 Garrick Staples <garrick@usc.edu> 2.1.1-2
- rebuild with added README-localhost
2006-06-22 21:46:17 +00:00
* Thu Jun 22 2006 Garrick Staples <garrick@usc.edu> 2.1.1-1
- bump to 2.1.1
2006-05-15 23:08:15 +00:00
* Mon May 15 2006 Garrick Staples <garrick@usc.edu> 2.1.0p0-3
- get rid of the annoying " l o c a l h o s t o n l y " package
2006-05-13 05:10:31 +00:00
* Fri May 12 2006 Garrick Staples <garrick@usc.edu> 2.1.0p0-2
- fix pbs_server segfault when mom_job_sync is enabled
2006-05-11 21:26:06 +00:00
* Thu May 11 2006 Garrick Staples <garrick@usc.edu> 2.1.0p0-1
- bump to final release
2006-04-26 01:54:37 +00:00
* Tue Apr 25 2006 Garrick Staples <garrick@usc.edu> 2.1.0p0-0.11.200604251602cvs
- bump to fix " m e m " job resources for non-serial jobs
- rm.h is now installed
2006-04-21 17:00:17 +00:00
* Fri Apr 21 2006 Garrick Staples <garrick@usc.edu> 2.1.0p0-0.10.200604211036cvs
- bump
* Fri Apr 21 2006 Garrick Staples <garrick@usc.edu> 2.1.0p0-0.9.200604171430cvs
- fix qsub write return check
2006-04-21 07:01:22 +00:00
* Thu Apr 20 2006 Garrick Staples <garrick@usc.edu> 2.1.0p0-0.8.200604171430cvs
- fix pbs_sched error opening lockfile and immediately exiting
2006-04-18 02:10:40 +00:00
* Mon Apr 17 2006 Garrick Staples <garrick@usc.edu> 2.1.0p0-0.7.200604171430cvs
- importing to fedora extras
* Mon Apr 17 2006 Garrick Staples <garrick@usc.edu> 2.1.0p0-0.6.200604171430cvs
- add %%{dist} tag
- cleanup the cleanups in spec
- bump to matching upstream
- move headers to /usr/include/torque/
* Wed Apr 12 2006 Garrick Staples <garrick@usc.edu> 2.1.0p0-0.5.200604071240cvs
- remove rpath
* Tue Apr 11 2006 Garrick Staples <garrick@usc.edu> 2.1.0p0-0.4.200604071240cvs
- fix release string to match fedora guidelines
* Fri Apr 7 2006 Garrick Staples <garrick@usc.edu> 2.1.0p0-0.3.200604071240
- spec and initscript cleanups
* Wed Apr 5 2006 Garrick Staples <garrick@usc.edu> 2.1.0p0-0.2.200604051756
- add .desktop files
* Wed Apr 5 2006 Garrick Staples <garrick@usc.edu> 2.1.0p0-0.1.200604051756
- Initial package for Fedora Extras