]>
Commit | Line | Data |
---|---|---|
6781ee2b | 1 | # |
2 | # spec file for package OpenPBS (Version 2.3.16) | |
3 | # | |
4 | # | |
5 | # Usage: | |
6 | # 1) build the SRPM: (as user) rpmbuild -bs OpenPBS.spec | |
7 | # 2) build the binary RPM: (as root) rpmbuild --rebuild ...srpm | |
8 | # | |
9 | ||
10 | Summary: Portable Batch System | |
11 | Name: OpenPBS | |
12 | Version: 2.3.16 | |
13 | Release: 0.1 | |
14 | Requires: tcl tk | |
15 | Copyright: Portable Batch System (PBS) Software License | |
16 | Group: Applications/Networking | |
17 | URL: http://www.openpbs.org/ | |
18 | Source0: %{name}_2_3_16.tar.gz | |
19 | Source1: pbs_mom | |
20 | Source2: pbs_server | |
21 | Source3: pbs_sched | |
22 | Source4: pbsrun | |
23 | #Source5: pbsenv.sh | |
24 | #Source6: pbsenv.csh | |
25 | Source7: pbsconfig | |
26 | Source8: patch.ko | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | The Portable Batch System (PBS) is a flexible batch software | |
31 | processing system developed at NASA Ames Research Center. It operates | |
32 | on networked, multi-platform UNIX environments, including | |
33 | heterogeneous clusters of workstations, supercomputers, and massively | |
34 | parallel systems. | |
35 | ||
36 | Authors: | |
37 | - -------- NASA Ames Research Cente | |
38 | ||
39 | ||
40 | %package mom | |
41 | Summary: PBS client daemon: pbs_mom | |
42 | Requires: OpenPBS | |
43 | Group: Applications/Clustering | |
44 | ###### Unknown group! | |
45 | %description mom | |
46 | This package contains the PBS client daemon pbs_mom executable and | |
47 | startup script. | |
48 | ||
49 | %package server | |
50 | Summary: PBS server daemon: pbs_server | |
51 | Requires: OpenPBS | |
52 | Group: Applications/Clustering | |
53 | ###### Unknown group! | |
54 | %description server | |
55 | This package contains the PBS server daemon pbs_server executable and | |
56 | startup script. | |
57 | ||
58 | %package sched | |
59 | Summary: PBS scheduler daemon: pbs_sched | |
60 | Requires: OpenPBS | |
61 | Group: Applications/Clustering | |
62 | ###### Unknown group! | |
63 | %description sched | |
64 | This package contains the PBS scheduler daemon pbs_sched executable | |
65 | and startup script. | |
66 | ||
67 | ||
68 | %prep | |
69 | %setup -q -n OpenPBS_2_3_16 | |
70 | cp %{SOURCE1} . | |
71 | cp %{SOURCE2} . | |
72 | cp %{SOURCE3} . | |
73 | cp %{SOURCE4} . | |
74 | #cp %{SOURCE5} . | |
75 | #cp %{SOURCE6} . | |
76 | cp %{SOURCE7} . | |
77 | #cp %{SOURCE8} . | |
78 | patch -p1 < %{SOURCE8} | |
79 | ||
80 | %build | |
81 | pbs_server_home=/var/spool/pbs | |
82 | ||
83 | ./configure --prefix=${_prefix} --set-server-home=${pbs_server_home} --mandir=$RPM_BUILD_ROOT%{_mandir} --enable-docs --enable-server --enable-mom --enable-clients --disable-gui --set-default-server=localhost --enable-tcl-qstat --with-scp --with-tcl --enable-syslog | |
84 | %{__make} | |
85 | cp buildutils/pbs_mkdirs buildutils/pbs_mkdirs.orig | |
86 | cp src/scheduler.cc/samples/fifo/Makefile src/scheduler.cc/samples/fifo/Makefile.orig | |
87 | ||
88 | %install | |
89 | ||
90 | # make directories | |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/ | |
93 | install -d $RPM_BUILD_ROOT%{_prefix} | |
94 | install -d $RPM_BUILD_ROOT%{_datadir} | |
95 | install -d $RPM_BUILD_ROOT/var/spool/pbs | |
96 | # kludge pbs_mkdirs to create things in $RPM_BUILD_ROOT | |
97 | ||
98 | cat buildutils/pbs_mkdirs.orig | sed -e 's|%{_prefix}|$RPM_BUILD_ROOT%{_prefix}|' | sed -e 's|/var/spool|$RPM_BUILD_ROOT/var/spool|' >buildutils/pbs_mkdirs | |
99 | # kludge scheduler install | |
100 | cat src/scheduler.cc/samples/fifo/Makefile.orig | sed -e 's|%{_prefix}|$(RPM_BUILD_ROOT)%{_prefix}|' | sed -e 's|/var/spool|$(RPM_BUILD_ROOT)/var/spool|' >src/scheduler.cc/samples/fifo/Makefile | |
101 | # run make install | |
102 | #make install prefix=$RPM_BUILD_ROOT/usr PBS_SERVER_HOME=$RPM_BUILD_ROOT/var/spool/pbs | |
103 | %{__make} install prefix=$RPM_BUILD_ROOT%{_prefix} | |
104 | # copy docs | |
105 | #cp INSTALL PBS_License.text Read.Me Release_Notes $RPM_BUILD_ROOT/usr | |
106 | # copy startup files | |
107 | cp pbs_mom pbs_server pbs_sched $RPM_BUILD_ROOT/etc/rc.d/init.d | |
108 | # copy scripts | |
109 | #cp pbsenv.sh pbsenv.csh $RPM_BUILD_ROOT/usr/bin | |
110 | cp pbsrun pbsconfig $RPM_BUILD_ROOT%{_bindir} | |
111 | # make sure all the config files exist | |
112 | touch $RPM_BUILD_ROOT/var/spool/pbs/default_server | |
113 | touch $RPM_BUILD_ROOT/var/spool/pbs/server_name | |
114 | touch $RPM_BUILD_ROOT/var/spool/pbs/mom_priv/config | |
115 | touch $RPM_BUILD_ROOT/var/spool/pbs/sched_priv/sched_config | |
116 | touch $RPM_BUILD_ROOT/var/spool/pbs/server_priv/nodes | |
117 | ||
118 | %post | |
119 | ||
120 | %post mom | |
121 | /sbin/chkconfig --add pbs_mom | |
122 | if [ -f /var/lock/subsys/pbs_mom ]; then | |
123 | /etc/rc.d/init.d/pbs_mom restart >/dev/null 2>&1 | |
124 | else | |
125 | echo "Run \"/etc/rc.d/init.d/pbs_mom start\" to start pbs_mom daemon." | |
126 | fi | |
127 | ||
128 | ||
129 | %preun mom | |
130 | if [ "$1" = "0" ]; then | |
131 | if [ -f /var/lock/subsys/pbs_mom ]; then | |
132 | /etc/rc.d/init.d/pbs_mom stop >&2 | |
133 | fi | |
134 | /sbin/chkconfig --del pbs_mom | |
135 | fi | |
136 | ||
137 | %post server | |
138 | /sbin/chkconfig --add pbs_server | |
139 | if [ -f /var/lock/subsys/pbs_server ]; then | |
140 | /etc/rc.d/init.d/pbs_server restart >/dev/null 2>&1 | |
141 | else | |
142 | echo "Run \"/etc/rc.d/init.d/pbs_server start\" to start pbs_server daemon." | |
143 | fi | |
144 | ||
145 | %preun server | |
146 | if [ "$1" = "0" ]; then | |
147 | if [ -f /var/lock/subsys/pbs_server ]; then | |
148 | /etc/rc.d/init.d/pbs_server stop >&2 | |
149 | fi | |
150 | /sbin/chkconfig --del pbs_server | |
151 | fi | |
152 | ||
153 | %post sched | |
154 | /sbin/chkconfig --add pbs_sched | |
155 | if [ -f /var/lock/subsys/pbs_shed ]; then | |
156 | /etc/rc.d/init.d/pbs_shed restart >/dev/null 2>&1 | |
157 | else | |
158 | echo "Run \"/etc/rc.d/init.d/pbs_shed start\" to start pbs_shed daemon." | |
159 | fi | |
160 | ||
161 | %preun sched | |
162 | if [ "$1" = "0" ]; then | |
163 | if [ -f /var/lock/subsys/pbs_sched ]; then | |
164 | /etc/rc.d/init.d/pbs_sched stop >&2 | |
165 | fi | |
166 | /sbin/chkconfig --del pbs_sched | |
167 | fi | |
168 | ||
169 | ||
170 | %files | |
171 | %defattr(644,root,root,755) | |
172 | %doc INSTALL | |
173 | %doc PBS_License.text | |
174 | %doc Read.Me | |
175 | %doc Release_Notes | |
176 | %config(noreplace) %verify(not md5 size mtime) %attr(640,root,root) /var/spool/pbs/default_server | |
177 | %config(noreplace) %verify(not md5 size mtime) %attr(640,root,root) /var/spool/pbs/pbs_environment | |
178 | %attr(755,root,root) %{_bindir}/chk_tree | |
179 | %attr(755,root,root) %{_bindir}/hostn | |
180 | %attr(755,root,root) %{_bindir}/nqs2pbs | |
181 | %attr(755,root,root) %{_bindir}/pbs_tclsh | |
182 | %attr(755,root,root) %{_bindir}/pbsconfig | |
183 | %attr(755,root,root) %{_bindir}/pbsdsh | |
184 | #/usr/bin/pbsenv.csh | |
185 | #/usr/bin/pbsenv.sh | |
186 | %attr(755,root,root) %{_bindir}/pbsnodes | |
187 | %attr(755,root,root) %{_bindir}/pbsrun | |
188 | %attr(755,root,root) %{_bindir}/printjob | |
189 | %attr(755,root,root) %{_bindir}/qalter | |
190 | %attr(755,root,root) %{_bindir}/qdel | |
191 | %attr(755,root,root) %{_bindir}/qdisable | |
192 | %attr(755,root,root) %{_bindir}/qenable | |
193 | %attr(755,root,root) %{_bindir}/qhold | |
194 | %attr(755,root,root) %{_bindir}/qmgr | |
195 | %attr(755,root,root) %{_bindir}/qmove | |
196 | %attr(755,root,root) %{_bindir}/qmsg | |
197 | %attr(755,root,root) %{_bindir}/qorder | |
198 | %attr(755,root,root) %{_bindir}/qrerun | |
199 | %attr(755,root,root) %{_bindir}/qrls | |
200 | %attr(755,root,root) %{_bindir}/qrun | |
201 | %attr(755,root,root) %{_bindir}/qselect | |
202 | %attr(755,root,root) %{_bindir}/qsig | |
203 | %attr(755,root,root) %{_bindir}/qstart | |
204 | %attr(755,root,root) %{_bindir}/qstat | |
205 | %attr(755,root,root) %{_bindir}/qstop | |
206 | %attr(755,root,root) %{_bindir}/qsub | |
207 | %attr(755,root,root) %{_bindir}/qterm | |
208 | %attr(755,root,root) %{_bindir}/tracejob | |
209 | %attr(755,root,root) %{_sbindir}/pbs_demux | |
210 | %attr(4755,root,root) %{_sbindir}/pbs_iff | |
211 | %attr(755,root,root) %{_sbindir}/pbs_rcp | |
212 | %{_libdir}/libattr.a | |
213 | %{_libdir}/libcmds.a | |
214 | %{_libdir}/liblog.a | |
215 | %{_libdir}/libnet.a | |
216 | %{_libdir}/libpbs.a | |
217 | %{_libdir}/libsite.a | |
218 | %{_libdir}/pbs_sched.a | |
219 | #/usr/lib/pbs | |
220 | %{_includedir}/pbs_error.h | |
221 | %{_includedir}/pbs_ifl.h | |
222 | %{_includedir}/tm.h | |
223 | %{_includedir}/tm_.h | |
224 | %doc %{_mandir} | |
225 | ||
226 | %files mom | |
227 | %defattr(644,root,root,755) | |
228 | %attr(744,root,root) /etc/rc.d/init.d/pbs_mom | |
229 | %attr(755,root,root) %{_sbindir}/pbs_mom | |
230 | %config(noreplace) %verify(not md5 size mtime) %attr(640,root,root) /var/spool/pbs/mom_priv/config | |
231 | %dir /var/spool/pbs/mom_priv | |
232 | %dir /var/spool/pbs/mom_priv/jobs | |
233 | %dir /var/spool/pbs/mom_logs | |
234 | ||
235 | %files server | |
236 | %defattr(644,root,root,755) | |
237 | %attr(744,root,root) /etc/rc.d/init.d/pbs_server | |
238 | %attr(755,root,root) %{_sbindir}/pbs_server | |
239 | %dir /var/spool/pbs/server_priv | |
240 | %dir /var/spool/pbs/server_priv/jobs | |
241 | %dir /var/spool/pbs/server_priv/queues | |
242 | %dir /var/spool/pbs/server_priv/acl_svr | |
243 | %dir /var/spool/pbs/server_priv/acl_hosts | |
244 | %dir /var/spool/pbs/server_priv/acl_users | |
245 | %dir /var/spool/pbs/server_priv/acl_groups | |
246 | %dir /var/spool/pbs/server_priv/accounting | |
247 | %dir /var/spool/pbs/server_logs | |
248 | %dir /var/spool/pbs | |
249 | %dir /var/spool/pbs/spool | |
250 | %dir /var/spool/pbs/aux | |
251 | %dir /var/spool/pbs/checkpoint | |
252 | %dir /var/spool/pbs/undelivered | |
253 | %config(noreplace) %verify(not md5 size mtime) %attr(640,root,root) /var/spool/pbs/server_name | |
254 | %config(noreplace) %verify(not md5 size mtime) %attr(640,root,root) /var/spool/pbs/server_priv/nodes | |
255 | ||
256 | %files sched | |
257 | %defattr(644,root,root,755) | |
258 | %attr(744,root,root) /etc/rc.d/init.d/pbs_sched | |
259 | %attr(755,root,root) %{_sbindir}/pbs_sched | |
260 | %dir /var/spool/pbs/sched_priv | |
261 | %dir /var/spool/pbs/sched_logs | |
262 | %config(noreplace) %verify(not md5 size mtime) %attr(640,root,root) /var/spool/pbs/sched_priv/sched_config | |
263 | %config(noreplace) %verify(not md5 size mtime) %attr(640,root,root) /var/spool/pbs/sched_priv/resource_group | |
264 | %config(noreplace) %verify(not md5 size mtime) %attr(640,root,root) /var/spool/pbs/sched_priv/holidays | |
265 | %config(noreplace) %verify(not md5 size mtime) %attr(640,root,root) /var/spool/pbs/sched_priv/dedicated_time | |
266 | ||
267 | %clean | |
268 | rm -rf $RPM_BUILD_ROOT | |
269 | ||
270 | #end file |