Package torque: Specfile

  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
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
# BEGIN SourceDeps(oneline):
BuildRequires(pre): rpm-build-tcl rpm-helper
BuildRequires: /usr/bin/scp libelf-devel perl(Curses.pm) perl(ExtUtils/testlib.pm) perl(Sys/Hostname.pm) perl(Time/Local.pm) perl(autouse.pm) perl(subs.pm) pkgconfig(check) zlib-devel
# END SourceDeps(oneline)
# see https://bugzilla.altlinux.org/show_bug.cgi?id=10382
%define _localstatedir %{_var}
# %%name and %%version is ahead of its definition. Predefining for rpm 4.0 compatibility.
%define name torque
%define version 6.1.2
%define         _disable_ld_no_undefined   1

%define         major              2
%define         libname            lib%{name}%{major}
%define         devname            lib%{name}-devel

%define         clientname         %{name}-client
%define         servername         %{name}-server
%define         schedname          %{name}-sched
%define         momname            %{name}-mom
%define         guiname            %{name}-gui


#default is /var/spool/torque: if you change this, you'll break some
#scripts coming along with the source files
%define         torquedir          /var/spool/torque
%define         srcversion         %{version}

Name:           torque
Summary:        The Torque resource and queue manager
Group:          Sciences/Computer science
Version:        6.1.2
Release:        alt3_5
License:        TORQUEv1.1
URL:            http://www.adaptivecomputing.com/products/open-source/torque/

Source0:        %{name}-%{srcversion}.tar.gz
Source1:        mom_config
Source2:        README.mga
Source3:        pbs_mom.service
Source4:        pbs_sched.service
Source5:        pbs_server.service
Source6:        trqauthd.service
Source7:        torque_addport
Source8:        torque_createdb
Source9:        openmp.pbs
Patch1:         torque-6.1.1.1-gcc7.patch

BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  groff-base groff-dvi groff-extra groff-lbp groff-lj4
BuildRequires:  groff-base groff-ps
BuildRequires:  xauth
BuildRequires:  gperf
BuildRequires:  graphviz
BuildRequires:  texlive
BuildRequires:  texlive-texmf
BuildRequires:  doxygen
BuildRequires:  pkgconfig(ncurses)
BuildRequires:  pkgconfig(tk)
BuildRequires:  pkgconfig(tcl)
BuildRequires:  tclx
BuildRequires:  openssh-clients
BuildRequires:  libreadline-devel
BuildRequires:  gcc-fortran
BuildRequires:  gcc-c++
%ifarch %ix86 x86_64
BuildRequires:  libquadmath-devel
%endif
BuildRequires:  libpam0-devel
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(hwloc)
BuildRequires:  boost-complete

Requires:       openssh-clients
Requires:     torque-mom
Source44: import.info

%description
The Tera-scale Open-source Resource and QUEue manager provides control
over batch jobs and distributed computing resources. It is an advanced
open-source product based on the original PBS project* and
incorporates the best of both community and professional
development. It incorporates significant advances in the areas of
scalability, reliability, and functionality and is currently in use at
tens of thousands of leading government, academic, and commercial
sites throughout the world. Please check out the README.mga file provided in
%{_docdir}/%{name} for setting up a minimal running system.

"TORQUE is a modification of OpenPBS which was developed by NASA Ames
Research Center, Lawrence Livermore National Laboratory, and Veridian
Information Solutions, Inc. Visit www.clusterresources.com/products/
for more information about TORQUE and to download TORQUE".



%package -n     %{libname}
Summary:        Shared libraries for Torque
Group:          System/Libraries
Provides:       lib%{name} = %{version}-%{release}

%description -n %{libname}
%{summary}.



%package -n     %{devname}
Summary:        Development files for Torque
Group:          Development/Other
Requires:       %{libname} = %{version}-%{release}
Provides:       lib%{name}-devel  = %{version}-%{release}
Provides:       %{name}-devel = %{version}-%{release}

%description -n %{devname}
%{summary}.



%package -n    %{clientname}
Summary:        Command line utilities for Torque
Group:          System/Kernel and hardware
Requires:       %{libname} = %{version}-%{release}
Requires:       %{name} = %{version}-%{release}

%description -n %{clientname}
%{summary}.



%package -n     %{servername}
Summary:        The Torque server
Group:          System/Kernel and hardware
Requires:       %{libname} = %{version}-%{release}
Requires:       %{name} = %{version}-%{release}
Requires:     %{schedname} = %{version}-%{release}
Requires(post): rpm-helper
Requires(preun):rpm-helper

%description -n %{servername}
%{summary}.



%package -n     %{schedname}
Summary:        The scheduler for Torque server
Group:          System/Kernel and hardware
Requires:       %{libname} = %{version}-%{release}
Requires:       %{name} = %{version}-%{release}
Requires:       %{servername} = %{version}-%{release}
Requires(post): rpm-helper
Requires(preun):rpm-helper

%description -n %{schedname}
%{summary}.



%package -n     %{momname}
Summary:        Node manager programs for Torque
Group:          System/Kernel and hardware
Requires:       %{libname} = %{version}-%{release}
Requires:       %{name} = %{version}-%{release}
Requires:       openssh-server
Requires(post): rpm-helper
Requires(preun):rpm-helper

%description -n %{momname}
%{summary}.



%package -n     %{guiname}
Summary:        Graphical clients for Torque
Group:          Monitoring
Requires:       tk
Requires:       tcl
Requires:       %{libname} = %{version}-%{release}
Requires:       %{name} = %{version}-%{release}
Requires:       %{name}-client = %{version}-%{release}
Obsoletes:      torque-xpbs <= 2.5.3

%description -n %{guiname}
%{summary}.


%prep
%setup -q -n %{name}-%{srcversion}
%patch1 -p1


%build
autoreconf -fi
# -fpermissive added to downgrade numerous 'invalid conversion' errors to warnings
export CPPFLAGS="-DUSE_INTERP_RESULT -DUSE_INTERP_ERRORLINE -DHAVE_STDBOOL_H -fpermissive"
%configure \
                --srcdir=%{_builddir}/%{name}-%{srcversion} \
                --includedir=%{_includedir}/%{name} \
                --with-pam=%{_libdir}/security \
                --with-rcp=scp \
                --with-hwloc-path=%{_prefix} \
                --enable-docs \
                --enable-server \
                --enable-mom \
                --enable-client \
                --enable-drmaa \
                --enable-high-availability \
                --enable-syslog \
                --enable-gui \
                --disable-static \
                --with-default-server=MYSERVERNAME \
		--enable-autorun \
                --enable-cpuset \
                --without-debug
#                --enable-nvidia-gpus
#                --enable-numa-support


%make_build all \
                XPBS_DIR=%{_tcllibdir}/xpbs \
                XPBSMON_DIR=%{_tcllibdir}/xpbsmon






%install
%makeinstall_std \
                PBS_SERVER_HOME=%{torquedir} \
                mandir=%_mandir \
                XPBS_DIR=%{_tcllibdir}/xpbs \
                XPBSMON_DIR=%{_tcllibdir}/xpbsmon


find %{buildroot}%{_libdir} -name *.la -delete

#yields various service to fail if relative symlinks
export DONT_RELINK=1

#install starting scripts
mkdir -p %{buildroot}%{_unitdir}
install -p -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/pbs_mom.service
install -p -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/pbs_sched.service
install -p -m 644 %{SOURCE5} %{buildroot}%{_unitdir}/pbs_server.service
install -p -m 644 %{SOURCE6} %{buildroot}%{_unitdir}/trqauthd.service

rm -f %{buildroot}%{_sysconfdir}/init.d/pbs_mom
rm -f %{buildroot}%{_sysconfdir}/init.d/pbs_server
rm -f %{buildroot}%{_sysconfdir}/init.d/trqauthd

#end starting scripts

#install configuration scripts
install -p -m 755 %{SOURCE7} %{buildroot}%{_sbindir}/torque_addport
install -p -m 755 %{SOURCE8} %{buildroot}%{_sbindir}/torque_createdb
#end configuration scripts



#install config files: move them to /etc/torque
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
pushd %{buildroot}%{torquedir}
mv server_name     %{buildroot}%{_sysconfdir}/%{name}
ln -s               %{_sysconfdir}/%{name}/server_name .
popd

pushd %{buildroot}%{torquedir}/server_priv
mv nodes %{buildroot}%{_sysconfdir}/%{name}
ln -s     %{_sysconfdir}/%{name}/nodes .
popd

pushd %{buildroot}%{torquedir}/sched_priv
mv sched_config   %{buildroot}%{_sysconfdir}/%{name}
mv dedicated_time %{buildroot}%{_sysconfdir}/%{name}
mv holidays       %{buildroot}%{_sysconfdir}/%{name}
mv resource_group %{buildroot}%{_sysconfdir}/%{name}
ln -s               %{_sysconfdir}/%{name}/sched_config .
ln -s               %{_sysconfdir}/%{name}/dedicated_time .
ln -s               %{_sysconfdir}/%{name}/holidays .
ln -s               %{_sysconfdir}/%{name}/resource_group .
popd

install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}
pushd %{buildroot}%{torquedir}/mom_priv
ln -s %{_sysconfdir}/%{name}/mom_config config


popd
#end config files


#move drmaa man to the right place and install docs
##__mv #{buildroot}#{_defaultdocdir}/torque-drmaa/man/man3/* #{buildroot}#{_mandir}/man3/.
install -D -m 644 %{SOURCE2} %{buildroot}%{_docdir}/%{name}/README.mga
install -D -m 644 %{SOURCE9} %{buildroot}%{_docdir}/%{name}/openmp.pbs

#make symbolic links for tcl
pushd %{buildroot}%{_libdir}
ln -s %{_tcllibdir}/xpbs    .
ln -s %{_tcllibdir}/xpbsmon .
popd


#clean make install bugs the dirty way...
rm -f %{buildroot}%{_mandir}/man1/basl2c.1*
#__rm -f #{buildroot}#{_mandir}/man3/_*src_drmaa_src_.3*


rm -rf %buildroot/usr/share/doc/torque-drmaa/src

%post
%{_sbindir}/torque_addport
sed -i 's|MYSERVERNAME|'"$HOSTNAME"'|g' %{_sysconfdir}/%{name}/server_name


%post -n %{momname}
%_post_service pbs_mom
sed -i 's|MYSERVERNAME|'"$HOSTNAME"'|g' %{_sysconfdir}/%{name}/mom_config

%preun -n %{momname}
%_preun_service pbs_mom

%post -n %{servername}
%{_sbindir}/torque_createdb %{torquedir} %{_sbindir}/pbs_server
sed -i 's|MYSERVERNAME|'"$HOSTNAME"'|g' %{torquedir}/server_priv/serverdb
%_post_service pbs_server

%preun -n %{servername}
%_preun_service pbs_server

%post -n %{schedname}
%_post_service pbs_sched

%preun -n %{schedname}
%_preun_service pbs_sched

%post -n %{clientname}
%_post_service trqauthd

%preun -n %{clientname}
%_preun_service trqauthd



%files
%doc PBS_License.txt Release_Notes README.torque
%doc README.NUMA README.trqauthd README.array_changes
%{_docdir}/%{name}/README.mga
%{_docdir}/%{name}/openmp.pbs
%dir %{torquedir}
%dir %{torquedir}/checkpoint
%dir %{torquedir}/aux
%dir %{torquedir}/spool
%dir %{torquedir}/undelivered
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/server_name
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/torque.conf
%config(noreplace) %{_sysconfdir}/profile.d/torque.*
%{_sbindir}/torque_addport
%{torquedir}/server_name
%{torquedir}/pbs_environment
%{_libdir}/security/pam*
%{_mandir}/man1/pbs.1*



%files -n %{libname}
%doc CHANGELOG README.coding_notes README.building_40 README.configure
%{_libdir}/*.so.*



%files -n %{devname}
%doc %_docdir/%name
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%{_bindir}/pbs-config
%{_libdir}/*.so
%{_defaultdocdir}/torque-drmaa
%{_mandir}/man3/pbs_*.3*
#_mandir/man3/rpp.3*
%{_mandir}/man3/tm.3*
#_mandir/man3/drmaa.3*
#_mandir/man3/drmaa_*.3*



%files -n %{clientname}
%doc %_docdir/%name
%{_unitdir}/trqauthd.service
%{_sbindir}/trqauthd
%{_bindir}/qa*
%{_bindir}/qc*
%{_bindir}/qdel
%{_bindir}/qg*
%{_bindir}/qh*
%{_bindir}/qm*
%{_bindir}/qo*
%{_bindir}/qrerun
%{_bindir}/qrls
%{_bindir}/qsub
%{_bindir}/qstat
%{_bindir}/qsig
%{_bindir}/qselect
%{_bindir}/chk_tree
%{_bindir}/hostn
%{_bindir}/nqs2pbs
%{_bindir}/pbsnodes
%{_bindir}/qnodes
%{_bindir}/pbsdsh
%{_bindir}/qterm
%{_bindir}/qstop
%{_bindir}/qstart
%{_bindir}/qdisable
%{_bindir}/qenable
%{_bindir}/qrun
%{_mandir}/man1/q*.1*
%{_mandir}/man1/nqs2pbs.1*
%{_mandir}/man1/pbsdsh.1*
#_mandir/man3/jobs.3*
%{_mandir}/man7/pbs_*.7*
%{_mandir}/man8/pbsnodes.8*
%{_mandir}/man8/q*.8*



%files -n %{servername}
%dir %{torquedir}/server_priv
%dir %{torquedir}/server_priv/acl_svr
%dir %{torquedir}/server_priv/acl_groups
%dir %{torquedir}/server_priv/acl_hosts
%dir %{torquedir}/server_priv/acl_users
%dir %{torquedir}/server_priv/accounting
%dir %{torquedir}/server_priv/arrays
%dir %{torquedir}/server_priv/credentials
%dir %{torquedir}/server_priv/disallowed_types
%dir %{torquedir}/server_priv/hostlist
%dir %{torquedir}/server_priv/jobs
%dir %{torquedir}/server_priv/queues
%config(noreplace) %{_sysconfdir}/%{name}/nodes
%{torquedir}/server_priv/nodes
%{_unitdir}/pbs_server.service
%{_sbindir}/torque_createdb
%{_sbindir}/pbs_server
%{_sbindir}/qserverd
%{_bindir}/pbs_track
%{_bindir}/tracejob
%{_bindir}/printjob
%{_bindir}/printserverdb
%{_bindir}/printtracking
%{_mandir}/man8/pbs_server.8*




%files -n %{schedname}
%dir %{torquedir}/sched_priv
%dir %{torquedir}/sched_priv/accounting
%dir %{torquedir}/sched_logs
%config(noreplace) %{_sysconfdir}/%{name}/sched_config 
%config(noreplace) %{_sysconfdir}/%{name}/dedicated_time 
%config(noreplace) %{_sysconfdir}/%{name}/holidays 
%config(noreplace) %{_sysconfdir}/%{name}/resource_group
%{torquedir}/sched_priv/sched_config
%{torquedir}/sched_priv/dedicated_time
%{torquedir}/sched_priv/holidays
%{torquedir}/sched_priv/resource_group
%{_unitdir}/pbs_sched.service
%{_sbindir}/pbs_sched
%{_sbindir}/qschedd
%{_mandir}/man8/pbs_sched*.8*




%files -n %{momname}
%doc %_docdir/%name
%dir %{torquedir}/mom_priv
%dir %{torquedir}/mom_priv/jobs
%dir %{torquedir}/mom_logs
%config(noreplace) %{_sysconfdir}/%{name}/mom_config
%{torquedir}/mom_priv/config
%{_unitdir}/pbs_mom.service
%{_sbindir}/pbs_mom
%{_sbindir}/qnoded
%{_sbindir}/momctl
%{_sbindir}/pbs_demux
%{_mandir}/man8/pbs_mom.8*




%files -n %{guiname}
%{_bindir}/xpbs*
%{_bindir}/pbs_wish
%{_bindir}/pbs_tclsh
%{_tcllibdir}/xpbs
%{_tcllibdir}/xpbsmon
%{_libdir}/xpbs
%{_libdir}/xpbsmon
%{_mandir}/man1/xpbs*.1*



%changelog
* Thu Sep 10 2020 Igor Vlasenko <viy@altlinux.ru> 6.1.2-alt3_5
- don't pack /etc/ld.so.conf.d/torque.conf (closes: #37530)

* Tue Feb 25 2020 Igor Vlasenko <viy@altlinux.ru> 6.1.2-alt2_5
- update

* Sun Jul 21 2019 Igor Vlasenko <viy@altlinux.ru> 6.1.2-alt2_3
- fixed build

* Thu Feb 14 2019 Igor Vlasenko <viy@altlinux.ru> 6.1.2-alt1_3
- new version

* Sat Mar 09 2013 Denis Pynkin <dans@altlinux.org> 4.2.1-alt1
- New version

* Thu Sep 27 2012 Denis Pynkin <dans@altlinux.org> 4.1.2-alt1
- New version

* Sat Apr 30 2011 Denis Pynkin <dans@altlinux.ru> 3.0.1-alt1
- New version
- Added lsb header to init scripts

* Sun Dec 05 2010 Denis Pynkin <dans@altlinux.ru> 2.5.3-alt1
- New version from upstream

* Mon Oct 11 2010 Denis Pynkin <dans@altlinux.ru> 2.5.2-alt1
- New version from upstream

* Fri Feb 19 2010 Denis Pynkin <dans@altlinux.ru> 2.4.5-alt1
- New version from upstream

* Tue Dec 15 2009 Denis Pynkin <dans@altlinux.ru> 2.4.3-alt2
- Changed group name length to 32. request by rider@

* Sat Dec 12 2009 Denis Pynkin <dans@altlinux.ru> 2.4.3-alt1
- New version from upstream

* Mon Aug 24 2009 Denis Pynkin <dans@altlinux.ru> 2.3.7-alt1
- New version from upstream

* Tue Apr 07 2009 Denis Pynkin <dans@altlinux.ru> 2.3.6-alt2
- git repository restructurization

* Sun Feb 08 2009 Denis Pynkin <dans@altlinux.ru> 2.3.6-alt1
- New version from upstream
- removed obsoleted macroses
- added conflict with qstat package

* Mon Oct 20 2008 Denis Pynkin <dans@altlinux.ru> 2.3.3-alt1
- New version from upstream
- pbs_track - experimental version introduced

* Sat Apr 12 2008 Denis Pynkin <dans@altlinux.ru> 2.3.0-alt1
- New version from upstream

* Wed Sep 12 2007 Stanislav Ievlev <inger@altlinux.org> 2.1.9-alt1
- 2.1.9
- fix permisions to shared spool directory, undelivered directory and *_logs directories

* Thu Aug 09 2007 Stanislav Ievlev <inger@altlinux.org> 2.1.8-alt1.1
- add notes about redistribution to License

* Wed Aug 08 2007 Stanislav Ievlev <inger@altlinux.org> 2.1.8-alt1
- Initial release