This repository has been archived by the owner on Apr 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
beah.spec
556 lines (465 loc) · 19.3 KB
/
beah.spec
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
%if "%{?rhel}" == "5"
%global _pylint pylint --errors-only --output-format=parseable --include-ids=y --reports=n
%endif
%global _services_restart beah-fakelc beah-beaker-backend beah-fwd-backend
%global _services beah-srv %{_services_restart}
# Got Systemd?
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
%global with_systemd 1
%else
%global with_systemd 0
%endif
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
%global with_selinux_policy 1
%else
%global with_selinux_policy 0
%endif
# We need python-simplejson on RHEL 3-5
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 6
%global with_simplejson 0
%else
%global with_simplejson 1
%endif
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Summary: Test Harness. Offspring of Beaker project
Name: beah
Version: 0.7.13
Release: 3%{?dist}
URL: http://fedorahosted.org/beah
Source0: http://fedorahosted.org/releases/b/e/%{name}-%{version}.tar.gz
License: GPLv2+
Group: Development/Tools
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n)
Prefix: %{_prefix}
BuildArch: noarch
%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-twisted
Requires: python2-setuptools
Requires: python2-twisted
Requires: python2-systemd
%else
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-twisted-web
Requires: python-setuptools
Requires: python-twisted-web
%if %{with_systemd}
%if 0%{?fedora} >= 24
Requires: python2-systemd
%else
Requires: systemd-python
%endif
%endif
%if %{with_simplejson}
BuildRequires: python-simplejson
Requires: python-simplejson
%endif
%if 0%{?rhel} == 4 || 0%{?rhel} == 5
BuildRequires: python-uuid
Requires: python-uuid
%endif
%endif
%if %{with_systemd}
BuildRequires: systemd
Requires(post): systemd
Requires(pre): systemd
Requires(postun): systemd
%else
Requires(post): chkconfig
Requires(preun): chkconfig
# This is for /sbin/service
Requires(preun): initscripts
Requires(postun): initscripts
# /usr/bin/lockfile from procmail is used in initscripts
# (not required when using systemd)
Requires: procmail
%endif
%if "%{?_pylint}" != ""
BuildRequires: pylint
%endif
%if %{with_selinux_policy}
BuildRequires: selinux-policy-devel
%endif
%description
Beah - Test Harness.
Test Harness with goal to serve any tests and any test schedulers.
Harness consist of a server and two kinds of clients - back ends and tasks.
Back ends issue commands to Server and process events from tasks. Back ends
usually communicate with a Scheduler or interact with an User.
Tasks are events producers. Tasks are wrappers for Tests to produce stream of
events.
Powered by Twisted.
%prep
%setup -q
%build
%{__python2} setup.py build
%if %{with_selinux_policy}
if [ -e "selinux/beah%{?dist}.pp" ]; then
# use pre-compiled selinux policy
cp -p selinux/beah%{?dist}.pp selinux/beah.pp
else
make -C selinux -f %{_datadir}/selinux/devel/Makefile
fi
%endif
%install
rm -rf $RPM_BUILD_ROOT
%{__python2} setup.py install --optimize=1 --skip-build --root $RPM_BUILD_ROOT
%if %{with_selinux_policy}
install -p -m 644 -D selinux/beah.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/beah.pp
%endif
%check
%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8
trial-2 beah || exit 1
%else
trial beah || exit 1
%endif
%if "%{?_pylint}" != ""
%_pylint --ignored-classes=twisted.internet.reactor beah; let "$? & 3" && exit 1
%_pylint beahlib; let "$? & 3" && exit 1
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/%{name}*
%if %{with_systemd}
%{_unitdir}/%{name}*
%exclude %{_sysconfdir}/init.d
%if "%{_unitdir}" == "/lib/systemd/system"
%exclude /usr/lib/systemd
%else
%exclude /lib/systemd
%endif
%else
%attr(0755, root, root)%{_sysconfdir}/init.d/%{name}*
%attr(0755, root, root)%{_sysconfdir}/init.d/rhts-compat
%exclude /usr/lib/systemd
%exclude /lib/systemd
%endif
%attr(0755, root, root)%{_bindir}/%{name}*
%attr(0755, root, root)%{_bindir}/tortilla
%attr(0755, root, root)%{_bindir}/rhts-compat-runner.sh
%attr(0755, root, root)%{_bindir}/rhts-flush
%attr(0755, root, root)%{_bindir}/beat_tap_filter
%attr(0755, root, root)%{_bindir}/json-env
%{python2_sitelib}/%{name}-*
%{python2_sitelib}/%{name}/
%{python2_sitelib}/beahlib.py*
%{_datadir}/%{name}
%doc %{_datadir}/%{name}/README
%doc %{_datadir}/%{name}/COPYING
%doc %{_datadir}/%{name}/LICENSE
%{_libexecdir}/%{name}
%attr(0755, root, root)%{_libexecdir}/%{name}/beah-check/*
%{_var}/lib/%{name}
%{_var}/lib/%{name}/tortilla
%attr(0755, root, root)%{_var}/lib/%{name}/tortilla/wrappers.d/*
%{_var}/lib/%{name}/tortilla/order.d/*
%if %{with_selinux_policy}
%{_datadir}/selinux/packages/%{name}
%endif
%post
%if %{with_systemd}
%systemd_post %{_services}
%else
for service in %{_services}; do
/sbin/chkconfig --add $service
done
%endif
%if %{with_selinux_policy}
if [ "$1" -le 1 ] ; then # First install
semodule -i %{_datadir}/selinux/packages/%{name}/beah.pp || :
fi
%endif
%preun
%if %{with_systemd}
%systemd_preun %{_services}
%else
if [ $1 = 0 ]; then
for service in %{_services}; do
/sbin/service $service stop >/dev/null 2>&1
/sbin/chkconfig --del $service
done
fi
%endif
%if %{with_selinux_policy}
if [ "$1" -lt 1 ] ; then # Final removal
semodule -r beah || :
fi
%endif
%postun
%if %{with_systemd}
%systemd_postun_with_restart %{_services_restart}
%else
if [ "$1" -ge "1" ]; then
for service in %{_services_restart}; do
/sbin/service $service condrestart >/dev/null 2>&1 || :
done
fi
%endif
%if %{with_selinux_policy}
if [ "$1" -ge 1 ] ; then # Upgrade
semodule -i %{_datadir}/selinux/packages/%{name}/beah.pp || :
fi
%endif
%changelog
* Wed Aug 29 2018 Dan Callaghan <[email protected]> 0.7.13-3
- Add missing runtime dependency on python-uuid ([email protected])
* Thu Aug 23 2018 Dan Callaghan <[email protected]> 0.7.13-2
- __python is not defined on RHEL <= 6 ([email protected])
* Thu Aug 23 2018 Dan Callaghan <[email protected]> 0.7.13-1
- invoke trial-2 instead of trial on Fedora 29+ ([email protected])
- use python2 versioned macros ([email protected])
- fix python requirements to use python2-* names on Fedora 29+
- remove conditionals for RHEL3 ([email protected])
* Wed Feb 07 2018 Dan Callaghan <[email protected]> 0.7.12-1
- fix service ordering ([email protected])
- clarify log messages ([email protected])
* Fri Jan 13 2017 Dan Callaghan <[email protected]> 0.7.11-1
- support Skip result ([email protected])
- only require python-uuid on RHEL4 and RHEL5 ([email protected])
* Fri Aug 12 2016 Dan Callaghan <[email protected]> 0.7.10-1
- Waiting and Running are not the only states for an incomplete recipe
* Mon Sep 14 2015 Dan Callaghan <[email protected]> 0.7.9-2
- use pre-built selinux policy module ([email protected])
* Wed Aug 26 2015 Dan Callaghan <[email protected]> 0.7.9-1
- make systemd capture output and send it to the console ([email protected])
- handle /dev/console errors ([email protected])
- start services after network-online.target ([email protected])
- systemd unit files should not be executable ([email protected])
- need to BuildRequire systemd, not systemd-units ([email protected])
* Tue Nov 25 2014 Dan Callaghan <[email protected]> 0.7.8-1
- remove readahead ordering hacks ([email protected])
* Thu Oct 16 2014 Dan Callaghan <[email protected]> 0.7.7-1
- use Wants= instead of Requires= for systemd dependencies
- build selinux policy on RHEL7 also ([email protected])
* Tue Jul 08 2014 Amit Saha <[email protected]> 0.7.6-1
- Release note for 0.7.6 ([email protected])
- Add before and conflicts on shutdown.target for beah systemd services
- Handle "rebooting" event generated by rhts-reboot ([email protected])
* Mon Jun 16 2014 Amit Saha <[email protected]> 0.7.5-1
- Pass a valid Exception to errback() ([email protected])
- fix systemd dependencies for beah-srv.service ([email protected])
- don't rely on HOSTNAME env var ([email protected])
- SELinux policy module to allow beah to transition to unconfined
- Discard python-hashlib to enable FIPS mode on RHEL5 ([email protected])
* Wed Apr 16 2014 Dan Callaghan <[email protected]> 0.7.4-1
- Implement a new config option to use IPv4 only ([email protected])
- Start beah services after readahead collection exits ([email protected])
* Mon Feb 24 2014 Dan Callaghan <[email protected]> 0.7.3-1
- RHBZ#1067745 backend needs to listen on all interfaces, not localhost
* Wed Feb 12 2014 Dan Callaghan <[email protected]> 0.7.2-1
- fix typo in start_task ([email protected])
* Wed Feb 12 2014 Dan Callaghan <[email protected]> 0.7.1-1
- Fix missing conversion for RHTS_PORT env.variable ([email protected])
- handle any combination of IPv6 and IPv4 being enabled ([email protected])
- Beah should work when kernel has ipv6.disable=1 ([email protected])
* Thu Jan 30 2014 Amit Saha <[email protected]> 0.7-1
- Release notes for new major release - 0.7.0 ([email protected])
- Admin guide: Documentation for IPv6 functionality ([email protected])
- IPv6 support ([email protected])
- Use 'basestring' instead of str/unicode ([email protected])
- Remove dependency on 'python-simplejson' ([email protected])
* Mon Dec 02 2013 Dan Callaghan <[email protected]> 0.6.48-1
- Add a release note generator ([email protected])
- ControlGroup configuration option no longer valid. ([email protected])
- pass exception instance instead of string to Failure ([email protected])
* Thu Nov 14 2013 Raymond Mancy <[email protected]> 0.6.47-1
- Changes to Documentation ([email protected])
- Add a version string. ([email protected])
- Add a new README and remove build.sh ([email protected])
- Documentation reorganization ([email protected])
- Add an error handler to simple_recipe ([email protected])
- fix RPM conditional on RHEL3 and RHEL4 ([email protected])
* Tue Oct 01 2013 Dan Callaghan <[email protected]> 0.6.46-2
- beah does not require procmail (lockfile) on RHEL7 or Fedora
* Tue Jul 30 2013 Dan Callaghan <[email protected]> 0.6.46-1
- fix service scriptlets for systemd ([email protected])
- Keep a guest recipe's hypervisor fqdn in an env variable ([email protected])
- a bit of extra debug logging to help diagnose bug 977586
* Fri Jun 07 2013 Amit Saha <[email protected]> 0.6.45-1
- Merge "recipe XML is really bytes, even though Beaker returns it in an XML-
RPC string" ([email protected])
- depend on time-sync.target ([email protected])
- recipe XML is really bytes, even though Beaker returns it in an XML-RPC
string ([email protected])
* Fri Apr 05 2013 Dan Callaghan <[email protected]> 0.6.44-1
- fetch roles at the start of every task ([email protected])
* Mon Mar 11 2013 Dan Callaghan <[email protected]> 0.6.43-2
- beah-srv: let systemd kill only the main process ([email protected])
* Mon Jan 14 2013 Nick Coghlan <[email protected]> 0.6.43-1
- Return without abort only when task has completed. ([email protected])
* Mon Dec 03 2012 Dan Callaghan <[email protected]> 0.6.42-2
- fix yum argument order for RHEL3/4 ([email protected])
* Fri Nov 23 2012 Raymond Mancy <[email protected]> 0.6.42-1
- Always enable beaker repos when installing tests ([email protected])
* Tue Nov 06 2012 Dan Callaghan <[email protected]> 0.6.41-1
- allow task RPMs to be installed from any repo ([email protected])
- look up recipes by ID, not hostname ([email protected])
- move harness files from under /tmp to /mnt/testarea ([email protected])
- Change bogus warn result to pass ([email protected])
* Fri Aug 03 2012 Bill Peck <[email protected]> 0.6.40-1
- spec file fix for f16 ([email protected])
* Fri Aug 03 2012 Bill Peck <[email protected]> 0.6.39-1
- tests don't run in root cpu cgroup with systemd ([email protected])
- tito config for releasing in dist-git ([email protected])
* Wed Mar 21 2012 Bill Peck <[email protected]> 0.6.38-1
- fix pylint error ([email protected])
- Fix leaking file-descriptors causing EWD ([email protected])
- Fix incompatibility introduced by Twisted 11.1 ([email protected])
* Tue Mar 20 2012 Bill Peck <[email protected]> 0.6.37-1
- Add tortilla wrappers to beah harness ([email protected])
* Tue Mar 20 2012 Bill Peck <[email protected]> 0.6.36-1
- limit pylint to rhel5 ([email protected])
- bz737540 - missing links to beah-srv in rc.d ([email protected])
* Tue Oct 11 2011 Marian Csontos <[email protected]> 0.6.35-1
- Fix errors reported by pylint
- Mask false positives reported by pylint
- Add pylint to check phase in the spec
- Replace incomprehensible scheduling code
* Sat Oct 01 2011 Marian Csontos <[email protected]> 0.6.34-2
- Fix spec file: %% should be escaped
* Sat Oct 01 2011 Marian Csontos <[email protected]> 0.6.34-1
- Write runtime data on new task
- Bug 737540 - Fix services not added correctly in spec file
- Use trial for testing
- Add %%check to spec file to run tests when building RPM
- Fix some errors found by pylint
- Remove default options from conf.files
- Fix id's reported to beaker by aborts
- Fix beah-check gzip logs.tar.gz not gzipped
* Thu Sep 15 2011 Marian Csontos <[email protected]> 0.6.33-1
- bz737540 - Harness does not restart the task after reboot
- Revert "bz711270 - use non-standard lockfiles"
* Wed Sep 07 2011 Marian Csontos <[email protected]> 0.6.32-1
- Bug 683184 - [Beaker][Harness] External Watchdog killing "finished" recipes
- Added set_timeout and kill events.
- Fixed misplaced false positive warning
* Tue Jul 19 2011 Marian Csontos <[email protected]> 0.6.31-1
- bz722288 - report bytes transferred
- bz722387 - soft limits ignored
* Fri Jul 08 2011 Marian Csontos <[email protected]> 0.6.30-2
- bz719623 - missing dependency (lockfile)
* Thu Jul 07 2011 Marian Csontos <[email protected]> 0.6.30-1
- bz718313 - use recipe_id to query the recipe
* Tue Jun 28 2011 Marian Csontos <[email protected]> 0.6.29-1
- 711270 - improvements in rhts-compat
* Tue Jun 07 2011 Marian Csontos <[email protected]> 0.6.28-1
- 680068 - fail fast - do not repeat yum
- 711270 - system will reboot in a infinite loop
* Wed Jun 01 2011 Marian Csontos <[email protected]> 0.6.27-1
- 705026 - Pending launchers causing EWD
- 706026 - runners: initialize supplementary groups ([email protected])
- fix to allow beakerlib to report results via rhts. ([email protected])
* Tue May 03 2011 Marian Csontos <[email protected]> 0.6.26-1
- Improved logging: redirect to /dev/console
- Fixed missing LICENSE and COPYING breaking sdist
* Tue Apr 05 2011 Marian Csontos <[email protected]> 0.6.25-1
- bz688122 - ks-templates: beah services usage
- Improved fedora packaging guidelines compliancy
- Fixed rhts-compat service may not stop on task start
* Tue Mar 22 2011 Marian Csontos <[email protected]> 0.6.24-1
- bz679824 - start backends after NetworkManager
- Watchdog handling
- Waiting for NetworkManager only if active
- Fixed race condition causing External Watchdog
* Tue Mar 01 2011 Bill Peck <[email protected]> 0.6.23-1
- bz681005 - Recipes not completing as expected ([email protected])
* Wed Feb 23 2011 Marian Csontos <[email protected]> 0.6.22-1
- bz677717 - issue when running in rhts compat mode
- bz601126 - $HOME variable not set
* Tue Jan 25 2011 Marian Csontos <[email protected]> 0.6.21-1
- Fixed: rhts-compat uses login shell and correct PWD
- bz669665 - Run rhts tasks in unconfined context
- bz668854 - Update beah to call uuid.uuid4()
- bz666980 - Use rhts-compat service by default
* Tue Jan 04 2011 Marian Csontos <[email protected]> 0.6.20-1
- dev-env: fakelc handling watchdog better
- Make a difference between finished and completed task
- Fixed: skipping invalid entries in journal
- Fixed: process extend_watchog read from journal
* Wed Nov 24 2010 Marian Csontos <[email protected]> 0.6.19-1
- Added option for stronger AVC checks ([email protected])
* Tue Nov 09 2010 Marian Csontos <[email protected]> 0.6.18-1
- Preserve config files on update
- Fixed corruption on system-crash
- Added flush capability
- Fixed abort not working
- Added /sbin to PATH
- Use RhtsOptions and Environment from metadata
* Wed Oct 27 2010 Marian Csontos <[email protected]> 0.6.17-1
- Added beah-check: harness problem reporting tool
- RHTS compatibility
- Export environment
* Wed Oct 13 2010 Marian Csontos <[email protected]> 0.6.16-1
- Added: caps on file size/count
- beaker-backend broken into smaller pieces
- beahlib: python bindings
- beaker-backend: task_start call must pass.
- RepeatingProxy: per-call on-failure repeating
* Tue Sep 14 2010 Marian Csontos <[email protected]> 0.6.15-1
- Caching recipe and using task_info to get status
- Added Abort-Task
- Added beahsh abort_* sub-commands
* Tue Aug 31 2010 Marian Csontos <[email protected]> 0.6.14-1
- rhts-wrapper: default Fail result if no result is reported by task
- Improved exit-code handling
* Sun Aug 15 2010 Marian Csontos <[email protected]> 0.6.13-1
- beaker: Use no-digest by default ([email protected])
* Tue Aug 10 2010 Marian Csontos <[email protected]> 0.6.12-1
- Added: timeout and repeat RPCs
* Mon Aug 02 2010 Marian Csontos <[email protected]> 0.6.11-1
- Fixed: beaker-backend handling abort recipe-set
* Tue Jul 27 2010 Marian Csontos <[email protected]> 0.6.10-1
- Added defaults for HOME and LANG
* Mon Jul 26 2010 Marian Csontos <[email protected]> 0.6.9.1-1
- reverted XML-RPC timeout
* Tue Jul 20 2010 Marian Csontos <[email protected]> 0.6.9-1
- Fixed bug in factory method used to create events breaking MH jobs
* Mon Jul 19 2010 Marian Csontos <[email protected]> 0.6.8-1
- Environment: RHTS launcher uses login shell
- handle Null/None in responses from LC
- improved robustness
- added timeout to XML-RPC calls to LC
- increased watchdog_time once the test is complete to allow results
submission
- make harness slightly more verbose
* Fri Jul 02 2010 Marian Csontos <[email protected]> 0.6.7-1
- Configurable digest method (BZ 543061)
- Added list variables, persistent sync states (BZ 601471)
- Changed: use 127.0.0.1 instead of localhost (BZ 608684)
* Mon Jun 21 2010 Marian Csontos <[email protected]> 0.6.6-1
- Fixed: use /dev/null for stdin
- Fixed: harness becoming unresponsive
- Fixed: yum will retry getting the task
- Added: Use no digest by default - fixing FIPS issues
* Mon Jun 14 2010 Marian Csontos <[email protected]> 0.6.5-1
- Fixed: task reports start multiple times to beaker
- Fixed: a bug in logging code
* Sat Jun 05 2010 Marian Csontos <[email protected]> 0.6.3-1
- Fixed: clean-up files for unix sockets on start-up
- Added: reasonable default for TERM
- Fixed: typo in beah-data-root definition
- Fixed: an error in beaker-backend error logging
* Mon May 10 2010 Marian Csontos <[email protected]> 0.6.2-2
- Sorted out rpmlint warnings. ([email protected])
* Fri May 07 2010 Marian Csontos <[email protected]> 0.6.2-1
- Fix: Sync version in setup.py with tito ([email protected])
- Added: tito metadata ([email protected])
- Added: proper spec file ([email protected])
- Fix: makedirs in race causing crash ([email protected])
* Tue May 04 2010 Marian Csontos <[email protected]> 0.6.1-2
- Use ReleaseTagger as default on the branch. ([email protected])
* Mon May 03 2010 Bill Peck <[email protected]> 0.6-1
- Initial spec file and use of tito for tagging and building.