1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396
|
# comment out snap if building a real release
%define name torque
%define version 2.4.8
%define release 1cri
%define torquehomedir /var/spool/torque
%define server_name arc.icluster.org
%define _libdir /usr/lib
%define _mandir /usr/man
%define _bindir /usr/bin
%define _sbindir /usr/sbin
%define _includedir /usr/include
%define drmaadocdir /usr/share/doc/torque-drmaa
%define use_tcl 0
%define build_server yes
%define build_mom yes
%define build_clients yes
%define build_gui no
%define build_pbs_rcp no
%define build_drmaa no
%define build_drmaa_docs no
%define pammoddir disabled
%define modulefiles_dir no
%define configure_args ''
############################################
## no user serviceable parts below this line
%if "%build_gui" == "yes"
%if "%use_tcl" == "0"
%error GUI cannot be built without TCL support
%endif
%endif
%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 %{?configure_args}\\n \\n")
Summary: Tera-scale Open-source Resource and QUEue manager
Name: %{name}
Version: %{version}
Release: %{?snap:snap.%snap.}%{release}
Source: torque-%{version}%{?snap:-snap.%snap}.tar.gz
License: OpenPBS
Group: System Environment/Daemons
URL: http://www.clusterresources.com/products/torque/
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Provides: pbs
BuildRequires: ed
Conflicts: pbspro, openpbs, openpbs-oscar
Obsoletes: scatorque
%if "%build_gui" == "no"
Obsoletes: %{name}-gui
%endif
%description
%shared_description
This package holds just a few shared files and directories.
%prep
%setup -n torque-%{version}%{?snap:-snap.%snap}
%build
CFLAGS="%{optflags}" ./configure %{?configure_args}
%{__make} %{?_smp_mflags}
%install
[ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"
%{__make} install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p"
env DESTDIR=$RPM_BUILD_ROOT sh ./buildutils/pbs_mkdirs common
if [ -f /etc/SuSE-release ];then
initpre="suse."
else
initpre=""
fi
# install initscripts
serverinit="`test "%build_server" == "yes" && echo pbs_sched pbs_server || echo`"
mominit="`test "%build_mom" == "yes" && echo pbs_mom || echo`"
%{__mkdir_p} $RPM_BUILD_ROOT%{_initrddir}
for initscript in $serverinit $mominit; do
%__sed -e 's|^PBS_HOME=.*|PBS_HOME=%{torquehomedir}|' \
-e 's|^PBS_DAEMON=.*|PBS_DAEMON=%{_sbindir}/'$initscript'|' \
< contrib/init.d/$initpre$initscript > $RPM_BUILD_ROOT%{_initrddir}/$initscript
%__chmod 755 $RPM_BUILD_ROOT%{_initrddir}/$initscript
done
# remove libtool droppings
%{__rm} -vf $RPM_BUILD_ROOT/%pammoddir/pam_pbssimpleauth.{a,la} $RPM_BUILD_ROOT/%{_libdir}/*.la
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
%post
if %__grep -q "PBS services" /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)
%doc INSTALL README.torque torque.setup Release_Notes CHANGELOG PBS_License.txt
%config(noreplace) %{torquehomedir}/server_name
%config(noreplace) %{torquehomedir}/pbs_environment
%{torquehomedir}/spool
%{torquehomedir}/aux
%{_libdir}/libtorque*.so.*
%if "%modulefiles_dir" != "no"
%modulefiles_dir/%{name}
%endif
%package docs
Group: Documentation
Summary: docs 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: scheduler part of Torque
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: pbs-scheduler
%description scheduler
%shared_description
This package holds the fifo C scheduler.
%if "%build_server" == "yes"
%files scheduler
%defattr(-, root, root)
%{_sbindir}/pbs_sched
%{_sbindir}/qschedd
%{_initrddir}/pbs_sched
%dir %{torquehomedir}/sched_priv
%config(noreplace) %{torquehomedir}/sched_priv/*
%{torquehomedir}/sched_logs
%endif
%post scheduler
/sbin/chkconfig --add pbs_sched
%preun scheduler
[ $1 = 0 ] || exit 0
/sbin/chkconfig --del pbs_sched
%package server
Group: System Environment/Daemons
Summary: server part of Torque
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: pbs-server
%description server
%shared_description
This package holds the server.
%if "%build_server" == "yes"
%files server
%defattr(-, root, root)
%{_sbindir}/pbs_server
%{_sbindir}/qserverd
%{_initrddir}/pbs_server
%{torquehomedir}/server_logs
%{torquehomedir}/server_priv
%endif
%post server
/sbin/chkconfig --add pbs_server
%preun server
[ $1 = 0 ] || exit 0
/sbin/chkconfig --del pbs_server
%package mom
Group: System Environment/Daemons
Summary: execution part of Torque
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: pbs-mom
%description mom
%shared_description
This package holds the execute daemon required on every node.
%if "%build_mom" == "yes"
%files mom
%defattr(-, root, root)
%{_sbindir}/pbs_mom
%{_sbindir}/qnoded
%{_sbindir}/pbs_demux
%{_bindir}/pbs_track
%{_initrddir}/pbs_mom
%if "%build_pbs_rcp" == "yes"
%attr(4755 root root) %{_sbindir}/pbs_rcp
%endif
%{torquehomedir}/mom_priv/*
%{torquehomedir}/mom_logs
%{torquehomedir}/checkpoint
%{torquehomedir}/undelivered
%endif
%post mom
/sbin/chkconfig --add pbs_mom
%preun mom
[ $1 = 0 ] || exit 0
/sbin/chkconfig --del pbs_mom
%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.
%if "%build_clients" == "yes"
%files client
%defattr(-, root, root)
%{_bindir}/q*
%{_bindir}/chk_tree
%{_bindir}/hostn
%{_bindir}/nqs2pbs
%{_bindir}/pbsdsh
%{_bindir}/pbsnodes
%{_bindir}/printjob
%{_bindir}/printtracking
%{_bindir}/printserverdb
%{_bindir}/tracejob
%{_sbindir}/momctl
%attr(4755 root root) %{_sbindir}/pbs_iff
%if "%use_tcl" == "1"
%{_bindir}/pbs_tclsh
%endif
%endif
%package gui
Group: Applications/System
Summary: graphical client part of Torque
Requires: %{name}-client = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: xpbs xpbsmon
%description gui
%shared_description
This package holds the graphical clients.
%if "%build_gui" == "yes"
%files gui
%defattr(-, root, root)
%{_bindir}/pbs_wish
%{_bindir}/xpbs
%{_bindir}/xpbsmon
%{_libdir}/xpbs
%{_libdir}/xpbsmon
%endif
%package localhost
Group: Applications/System
Summary: installs and configures a minimal localhost-only batch queue system
PreReq: pbs-mom pbs-server pbs-client pbs-scheduler
%description localhost
%shared_description
This package installs and configures a minimal localhost-only batch queue system.
%files localhost
%defattr(-, root, root)
%post localhost
/sbin/chkconfig pbs_mom on
/sbin/chkconfig pbs_server on
/sbin/chkconfig pbs_sched on
/bin/hostname --long > %{torquehomedir}/server_priv/nodes
/bin/hostname --long > %{torquehomedir}/server_name
/bin/hostname --long > %{torquehomedir}/mom_priv/config
pbs_server -t create
qmgr -c "s s scheduling=true"
qmgr -c "c q batch queue_type=execution"
qmgr -c "s q batch started=true"
qmgr -c "s q batch enabled=true"
qmgr -c "s q batch resources_default.nodes=1"
qmgr -c "s q batch resources_default.walltime=3600"
qmgr -c "s s default_queue=batch"
%{_initrddir}/pbs_mom restart
%{_initrddir}/pbs_sched restart
%{_initrddir}/pbs_server restart
qmgr -c "s n `/bin/hostname --long` state=free" -e
%package devel
Summary: Development tools for programs which will use the %{name} library
Group: Development/Libraries
Provides: lib%{name}-devel
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
%description devel
%shared_description
This package includes the header files and static libraries
necessary for developing programs which will use %{name}.
%files devel
%defattr(-, root, root)
%{_libdir}/libtorque*.a
%{_libdir}/libtorque*.so
%{_includedir}/pbs_error.h
%{_includedir}/pbs_error_db.h
%{_includedir}/pbs_ifl.h
%{_includedir}/rm.h
%{_includedir}/rpp.h
%{_includedir}/tm_.h
%{_includedir}/tm.h
%{_bindir}/pbs-config
%package pam
Summary: PAM module for PBS MOM nodes
Group: System Environment/Base
%description pam
%shared_description
A simple PAM module to authorize users on PBS MOM nodes with a running job.
%if "%pammoddir" != "disabled"
%files pam
%defattr(-, root, root)
%doc src/pam/README.pam
%pammoddir/pam_pbssimpleauth.so
%endif
%package drmaa
Summary: DRMAA 1.0 implementation for PBS/TORQUE
Group: System Environment/Base
%description drmaa
%shared_description
An API specification for the submission and control of jobs to one or more
Distributed Resource Management (DRM) systems.
%if "%build_drmaa" == "yes"
%files drmaa
%defattr(-, root, root)
%{_libdir}/libdrmaa.*
%{_includedir}/drmaa.h
%endif
%package drmaa-docs
Summary: DRMAA 1.0 implementation for PBS/TORQUE
Group: System Environment/Base
%description drmaa-docs
%shared_description
An API specification for the submission and control of jobs to one or more
Distributed Resource Management (DRM) systems.
%if "%build_drmaa_docs" == "yes"
%files drmaa-docs
%defattr(-, root, root)
%{drmaadocdir}
%endif
|