-
Notifications
You must be signed in to change notification settings - Fork 0
/
faf.spec.in
2390 lines (2120 loc) · 82.9 KB
/
faf.spec.in
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
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%define faf_version @PACKAGE_VERSION@
%if 0%{?fedora} || 0%{?rhel} > 7
# Use dnf
%bcond_without dnf
%bcond_with yum
%else
# Use yum
%bcond_without yum
%bcond_with dnf
%endif
%if 0%{?fedora} > 28 || 0%{?rhel} > 7
# Enable python3 build by default
%bcond_without python3
%else
%bcond_with python3
%endif
Name: faf
Version: %{faf_version}
Release: 1%{?dist}
Summary: Software Problem Analysis Tool
License: GPLv3+
URL: https://github.com/abrt/faf/
Source0: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
BuildArch: noarch
%if 0%{with python3}
%global satyr_dep python3-satyr >= 0.26
%else
%if 0%{?rhel} == 7
%global satyr_dep satyr-python > 0.13-1
%else
%global satyr_dep satyr-python >= 0.16
%endif
%endif
Requires(pre): shadow-utils
Requires: postgresql
%if %{with python3}
Requires: python3
Requires: python3-setuptools
Requires: python3-psycopg2
Requires: python3-sqlalchemy
Requires: python3-rpm
Requires: python3-pycurl
%else
Requires: python
Requires: python-setuptools
Requires: python-psycopg2 >= 2.5
Requires: python-sqlalchemy >= 0.8
Requires: rpm-python
%endif
# six library to cover Python 3 compatibility
%if %{with python3}
Requires: python3-six
BuildRequires: python3-six
%else
%if 0%{?fedora}
Requires: python2-six
BuildRequires: python2-six
%else
# rhel7
Requires: python-six
BuildRequires: python-six
%endif
%endif
BuildRequires: autoconf
BuildRequires: intltool
BuildRequires: libtool
# requirements for tests
BuildRequires: pg-semver
BuildRequires: postgresql
BuildRequires: postgresql-server
BuildRequires: %{satyr_dep}
%if %{with python3}
BuildRequires: createrepo_c
BuildRequires: python3
BuildRequires: python3-devel
BuildRequires: python3-alembic
BuildRequires: python3-setuptools
BuildRequires: python3-unittest2
BuildRequires: python3-bugzilla >= 2.0
BuildRequires: python3-psycopg2
BuildRequires: python3-testing.postgresql < 1.2
BuildRequires: python3-rpm
BuildRequires: python3-sqlalchemy
BuildRequires: python3-koji
BuildRequires: python3-zeep
BuildRequires: python3-fedora-messaging
BuildRequires: python3-pycurl
BuildRequires: python3-celery >= 3.1
%else
BuildRequires: createrepo
BuildRequires: python
BuildRequires: python-alembic
BuildRequires: python-setuptools
BuildRequires: python-unittest2
BuildRequires: python-bugzilla >= 2.0
BuildRequires: python-psycopg2 >= 2.5
BuildRequires: python-testing.postgresql < 1.2
BuildRequires: rpm-python
BuildRequires: python-sqlalchemy >= 0.8
BuildRequires: python2-koji
BuildRequires: python-suds
BuildRequires: python-celery >= 3.1
BuildRequires: python2-fedora-messaging
%endif
%if %{with dnf}
%if %{with python3}
BuildRequires: python3-dnf
%else
BuildRequires: python2-dnf
%endif
%endif
%if %{with yum}
BuildRequires: yum
%endif
%if %{with python3}
BuildRequires: python3-zeep
%else
BuildRequires: python-suds
%endif
%if 0%{?fedora}
%if %{with python3}
BuildRequires: python3-pylint
%else
BuildRequires: python2-pylint
%endif
%endif
# webui
%if %{with python3}
BuildRequires: python3-flask
BuildRequires: python3-flask-wtf
BuildRequires: python3-flask-openid
BuildRequires: python3-openid-teams
BuildRequires: python3-flask-rstpages
BuildRequires: python3-flask-sqlalchemy
BuildRequires: python3-jinja2
BuildRequires: python3-munch
BuildRequires: python3-dateutil
BuildRequires: python3-ratelimitingfilter
BuildRequires: python3-simplejson
%else
BuildRequires: python-flask >= 0.10
BuildRequires: python-flask-wtf
BuildRequires: python-flask-openid
BuildRequires: python-openid-teams
BuildRequires: python-flask-rstpages
BuildRequires: python-flask-sqlalchemy
BuildRequires: python-jinja2 >= 2.7
BuildRequires: python-munch
BuildRequires: python-dateutil
BuildRequires: python2-ratelimitingfilter
BuildRequires: python-simplejson
%endif
BuildRequires: xstatic-patternfly-common
BuildRequires: nodejs-typeahead.js
BuildRequires: nodejs-moment
BuildRequires: js-jquery
%description
faf is a programmable tool for analysis of packages, packaging
issues, bug reports and other artifacts produced during software
development.
%package webui
Summary: %{name}'s WebUI rewrite
Requires: %{name} = %{faf_version}
Requires: httpd
%if %{with python3}
Requires: python3-mod_wsgi
Requires: python3-flask
Requires: python3-flask-wtf
Requires: python3-flask-rstpages
Requires: python3-flask-sqlalchemy
Requires: python3-flask-openid
Requires: python3-openid-teams
Requires: python3-jinja2
Requires: python3-munch
Requires: python3-dateutil
Requires: python3-ratelimitingfilter
Requires: python3-simplejson
%else
Requires: mod_wsgi
Requires: python-flask >= 0.10
Requires: python-flask-wtf
Requires: python-flask-rstpages
Requires: python-flask-sqlalchemy
Requires: python-flask-openid
Requires: python-openid-teams
Requires: python-jinja2 >= 2.7
Requires: python-munch
Requires: python-dateutil
Requires: python2-ratelimitingfilter
Requires: python-simplejson
%endif
Requires: xstatic-patternfly-common
Requires: nodejs-typeahead.js
Requires: nodejs-moment
Requires: js-jquery
%description webui
A WebUI rewrite
%package problem-coredump
Summary: %{name}'s coredump plugin
Requires: %{name} = %{faf_version}
Requires: %{satyr_dep}
%description problem-coredump
A plugin for %{name} handling user-space binary crashes.
%package problem-java
Summary: %{name}'s java plugin
Requires: %{name} = %{faf_version}
Requires: %{satyr_dep}
%description problem-java
A plugin for %{name} handling java problems.
%package problem-kerneloops
Summary: %{name}'s kerneloops plugin
Requires: %{name} = %{faf_version}
Requires: %{satyr_dep}
%description problem-kerneloops
A plugin for %{name} handling kernel oopses.
%package problem-python
Summary: %{name}'s python plugin
Requires: %{name} = %{faf_version}
Requires: %{satyr_dep}
%description problem-python
A plugin for %{name} handling python scripts problems.
%package problem-ruby
Summary: %{name}'s ruby plugin
Requires: %{name} = %{faf_version}
Requires: %{satyr_dep}
%description problem-ruby
A plugin for %{name} handling ruby scripts problems.
%if %{with dnf}
%package dnf
Summary: %{name}'s dnf plugin
Requires: %{name} = %{faf_version}
%if %{with python3}
Requires: python3-dnf
%else
Requires: python2-dnf
%endif
Obsoletes: %{name}-yum
%description dnf
A plugin for %{name} implementing unified access to dnf repositories.
%endif
%if %{with yum}
%package yum
Summary: %{name}'s yum plugin
Requires: %{name} = %{faf_version}
Requires: yum
Requires: yum-utils
%description yum
A plugin for %{name} implementing unified access to yum repositories.
%endif
%package opsys-centos
Summary: %{name}'s CentOS operating system plugin
Requires: %{name} = %{faf_version}
%if %{with dnf}
Requires: %{name}-dnf = %{faf_version}
%endif
%if %{with yum}
Requires: %{name}-yum = %{faf_version}
%endif
%description opsys-centos
A plugin for %{name} implementing support for CentOS operating system.
%package opsys-fedora
Summary: %{name}'s Fedora operating system plugin
Requires: %{name} = %{faf_version}
Requires: koji
%if %{with python3}
Requires: python3-koji
%else
Requires: python2-koji
%endif
%description opsys-fedora
A plugin for %{name} implementing support for Fedora operating system.
%package schema
Summary: A plugin implementing fedora-messaging Message schema of %{name}.
%if 0%{?rhel} && 0%{?rhel} == 7
Requires: python2-fedora-messaging
%endif
%if 0%{?fedora} || 0%{?rhel} > 7
Requires: python3-fedora-messaging
%endif
%description schema
A plugin implementing fedora-messaging Message schema of %{name}.
%package action-sar
Summary: %{name}'s sar plugin
Requires: %{name} = %{faf_version}
%if %{with python3}
Requires: python3-simplejson
%else
Requires: python-simplejson
%endif
%description action-sar
A plugin for %{name} implementing Subject Access Request (SAR) action
%package action-save-reports
Summary: %{name}'s save-reports plugin
Requires: %{name} = %{faf_version}
%description action-save-reports
A plugin for %{name} implementing save-reports action
%package action-archive-reports
Summary: %{name}'s archive-reports plugin
Requires: %{name} = %{faf_version}
Requires: tar
Requires: xz
%description action-archive-reports
A plugin for %{name} implementing archive-reports action
%package action-create-problems
Summary: %{name}'s create-problems plugin
Requires: %{name} = %{faf_version}
Requires: %{satyr_dep}
%description action-create-problems
A plugin for %{name} implementing create-problems action
%package action-shell
Summary: %{name}'s shell plugin
Requires: %{name} = %{faf_version}
%if %{with python3}
Requires: python3-ipython-console
%else
Requires: python-ipython-console
%endif
%description action-shell
A plugin for %{name} allowing to run IPython shell
%package action-pull-releases
Summary: %{name}'s pull-releases plugin
Requires: %{name} = %{faf_version}
%description action-pull-releases
A plugin for %{name} implementing pull-releases action
%package action-pull-reports
Summary: %{name}'s pull-reports plugin
Requires: %{name} = %{faf_version}
%description action-pull-reports
A plugin for %{name} implementing pull-reports action
%package action-pull-components
Summary: %{name}'s pull-components plugin
Requires: %{name} = %{faf_version}
%description action-pull-components
A plugin for %{name} implementing pull-components action
%package action-pull-associates
Summary: %{name}'s pull-associates plugin
Requires: %{name} = %{faf_version}
%description action-pull-associates
A plugin for %{name} implementing pull-associates action
%package action-find-components
Summary: %{name}'s find-components plugin
Requires: %{name} = %{faf_version}
%description action-find-components
A plugin for %{name} implementing find-components action
%package action-assign-release-to-builds
Summary: %{name}'s assign-release-to-builds plugin
Requires: %{name} = %{faf_version}
%description action-assign-release-to-builds
A plugin for %{name} implementing assign-release-to-builds action
%package action-find-crash-function
Summary: %{name}'s find-crash-function plugin
Requires: %{name} = %{faf_version}
%description action-find-crash-function
A plugin for %{name} implementing find-crash-function action
%package action-find-report-solution
Summary: %{name}'s find-report-solution action
Requires: %{name} = %{faf_version}
%description action-find-report-solution
A plugin for %{name} implementing find-report-solution action
%package action-repo
Summary: %{name}'s repo plugin
Requires: %{name} = %{faf_version}
%description action-repo
A plugin for %{name} implementing repoadd, repolist and reposync actions
%package action-retrace
Summary: %{name}'s retrace plugin
Requires: %{name} = %{faf_version}
Requires: binutils
Requires: elfutils >= 0.155
%description action-retrace
A plugin for %{name} implementing retrace action
%package action-arch
Summary: %{name}'s arch plugin
Requires: %{name} = %{faf_version}
%description action-arch
A plugin for %{name} implementing archadd action
%package action-sf-prefilter
Summary: %{name}'s action-sf-prefilter plugin
Requires: %{name} = %{faf_version}
Requires: %{name}-solutionfinder-prefilter
Obsoletes: %{name}-action-kb < 0.12
Provides: %{name}-action-kb = 0.12
%description action-sf-prefilter
A plugin for %{name} implementing Solution finder Prefilter actions
%package action-c2p
Summary: %{name}'s coredump to packages plugin
Requires: %{name} = %{faf_version}
%description action-c2p
A plugin for %{name} implementing c2p (coredump to packages) action
%package action-bugtracker
Summary: %{name}'s plugins for bugtracker administration
Requires: %{name} = %{faf_version}
Requires: %{name}-bugtracker-bugzilla = %{faf_version}
%description action-bugtracker
A plugin for bugtracker management
%package action-external-faf
Summary: %{name}'s external-faf plugin
Requires: %{name} = %{faf_version}
%description action-external-faf
A plugin for %{name} implementing extfaf* actions
%package action-external-faf-clone-bz
Summary: %{name}'s external-faf-clone-bz plugin
Requires: %{name} = %{faf_version}
Requires: %{name}-action-external-faf = %{faf_version}
%description action-external-faf-clone-bz
A plugin for %{name} implementing extfafclonebz action
%package action-add-compat-hashes
Summary: %{name}'s add-compat-hashes plugin
Requires: %{name} = %{faf_version}
%description action-add-compat-hashes
A plugin for %{name} implementing addcompathashes action
%package action-mark-probably-fixed
Summary: %{name}'s mark-probably-fixed plugin
Requires: %{name} = %{faf_version}
%description action-mark-probably-fixed
A plugin for %{name} implementing mark-probably-fixed action
%package action-stats
Summary: %{name}'s stats plugin
Requires: %{name} = %{faf_version}
%description action-stats
A plugin for %{name} implementing statistics generation
%package action-retrace-remote
Summary: %{name}'s retrace-remote plugin
Requires: %{name} = %{faf_version}
%if %{with python3}
Requires: python3-requests
%else
Requires: python-requests
%endif
%description action-retrace-remote
A plugin for %{name} implementing remote retracing
%package action-attach-centos-bugs
Summary: %{name}'s attach-centos-bugs plugin
Requires: %{name} = %{faf_version}
Requires: %{name}-bugtracker-centos-mantis = %{faf_version}
%description action-attach-centos-bugs
A plugin for %{name} implementing attaching of bugs from CentOS Mantis bugtracker
%package action-fedmsg-notify
Summary: %{name}'s fedmsg-notify plugin
Requires: %{name} = %{faf_version}
Requires: %{name}-fedmsg = %{faf_version}
%description action-fedmsg-notify
A plugin for %{name} implementing notification into Fedora Messaging
%package action-cleanup-packages
Summary: %{name}'s cleanup-packages plugin
Requires: %{name} = %{faf_version}
%description action-cleanup-packages
A plugin for %{name} implementing cleanup of old packages.
%package action-delete-invalid-ureports
Summary: %{name}'s delete-invalid-ureports plugin
Requires: %{name} = %{faf_version}
%description action-delete-invalid-ureports
A plugin for %{name} implementing delete of old invalid ureports.
%package action-cleanup-task-results
Summary: %{name}'s cleanup-task-results plugin
Requires: %{name} = %{faf_version}
%description action-cleanup-task-results
A plugin for %{name} implementing cleanup of old task results.
%package action-cleanup-unassigned
Summary: %{name}'s cleanup-unassigned plugin
Requires: %{name} = %{faf_version}
%description action-cleanup-unassigned
A plugin for %{name} implementing cleanup of unassigned packages
%package action-check-repo
Summary: %{name}'s check repo plugin
Requires: %{name} = %{faf_version}
%description action-check-repo
A plugin for %{name} implementing checking of repositories
%package bugtracker-bugzilla
Summary: %{name}'s bugzilla support
Requires: %{name} = %{faf_version}
%if %{with python3}
Requires: python3-bugzilla >= 2.0
%else
Requires: python-bugzilla >= 2.0
%endif
%description bugtracker-bugzilla
A plugin adding bugzilla support to %{name}
%package bugtracker-fedora-bugzilla
Summary: %{name}'s bugzilla support for Fedora
Requires: %{name} = %{faf_version}
Requires: %{name}-bugtracker-bugzilla = %{faf_version}
%description bugtracker-fedora-bugzilla
A plugin adding support for bugzilla used by Fedora
%package bugtracker-rhel-bugzilla
Summary: %{name}'s bugzilla support for RHEL
Requires: %{name} = %{faf_version}
Requires: %{name}-bugtracker-bugzilla = %{faf_version}
%description bugtracker-rhel-bugzilla
A plugin adding support for bugzilla used by Red Hat Enterprise Linux
%package solutionfinder-prefilter
Summary: %{name}'s solution-finder-prefilter plugin
Requires: %{name} = %{faf_version}
%description solutionfinder-prefilter
A plugin for %{name} implementing the Prefilter solution finder
%package solutionfinder-probable-fix
Summary: %{name}'s solution-finder-probable-fix plugin
Requires: %{name} = %{faf_version}
%description solutionfinder-probable-fix
A plugin for %{name} implementing the Probale Fix solution finder
%package blueprint-symbol-transfer
Summary: %{name}'s symbol transfer blueprint
Requires: faf = %{faf_version}
Requires: %{name} = %{faf_version}
Requires: %{name}-webui = %{faf_version}
%description blueprint-symbol-transfer
A plugin for %{name} implementing symbol transfer plugin.
%package blueprint-celery-tasks
Summary: %{name}'s Celery tasks blueprint
Requires: faf = %{faf_version}
Requires: %{name} = %{faf_version}
Requires: %{name}-webui = %{faf_version}
Requires: %{name}-celery-tasks = %{faf_version}
%if %{with python3}
Requires: python3-munch
Requires: python3-redis
%else
Requires: python-munch
%endif
%description blueprint-celery-tasks
A plugin for %{name} implementing Celery tasks blueprint plugin.
%package migrations
Summary: %{name}'s database migrations
Requires: %{name} = %{faf_version}
%if %{with python3}
Requires: python3-alembic
%else
Requires: python-alembic >= 0.5
%endif
%description migrations
Database migrations using alembic
%package bugtracker-mantis
Summary: %{name}'s mantis support
Requires: %{name} = %{faf_version}
%if %{with python3}
Requires: python3-zeep
%else
Requires: python-suds
%endif
%description bugtracker-mantis
A plugin adding mantis support to %{name}
%package bugtracker-centos-mantis
Summary: %{name}'s Mantis support for CentOS
Requires: %{name} = %{faf_version}
Requires: %{name}-bugtracker-mantis = %{faf_version}
%description bugtracker-centos-mantis
A plugin adding support for Mantis used by CentOS
%package fedmsg
Summary: %{name}'s Fedora Messaging support
Requires: %{name} = %{faf_version}
Requires: %{name}-schema = %{faf_version}
%if %{with python3}
Requires: python3-fedora-messaging
%else
Requires: python2-fedora-messaging
%endif
%description fedmsg
Base for Fedora Messaging support.
%package fedmsg-realtime
Summary: %{name}'s support for realtime Fedora Messaging notification sending
Requires: %{name} = %{faf_version}
Requires: %{name}-fedmsg = %{faf_version}
%description fedmsg-realtime
Support for sending Fedora Messaging notifications as reports are saved.
%package celery-tasks
Summary: %{name}'s task queue based on Celery
Requires: %{name} = %{faf_version}
%if %{with python3}
Requires: python3-celery >= 3.1
%else
Requires: python-celery >= 3.1
%endif
%description celery-tasks
Task queue using Celery.
%package celery-tasks-systemd-services
Summary: %{name}'s Celery task queue systemd services
Requires: %{name} = %{faf_version}
%if 0%{?fedora} > 27 || 0%{?rhel} > 7
%{?systemd_requires}
%else
Requires: systemd-units
%endif
%description celery-tasks-systemd-services
systemd services for the Celery task queue.
%post celery-tasks-systemd-services
%systemd_post faf-celery-beat.service
%systemd_post faf-celery-worker.service
%preun celery-tasks-systemd-services
%systemd_preun faf-celery-beat.service
%systemd_preun faf-celery-worker.service
%postun celery-tasks-systemd-services
%systemd_postun_with_restart faf-celery-beat.service
%systemd_postun_with_restart faf-celery-worker.service
%prep
%setup -q
%if %{with python3}
find ./ -type f -exec sed -i -e 's/\/usr\/bin\/python/\/usr\/bin\/python3/g' {} \;
%endif
./autogen.sh
%build
%configure \
%{?with_dnf:--with-dnf} \
%{!?with_dnf:--without-dnf} \
%{?with_yum:--with-yum} \
%{!?with_yum:--without-yum} \
%{?with_python3:--with-python3} \
%{!?with_python3:--without-python3}
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
# embedded action names
ln -s %{_bindir}/faf %{buildroot}%{_bindir}/faf-c2p
# /etc
mkdir -p %{buildroot}%{_sysconfdir}/faf
mkdir -p %{buildroot}%{_sysconfdir}/faf/plugins
mkdir -p %{buildroot}%{_sysconfdir}/faf/templates
# /usr/share
mkdir -p %{buildroot}%{_datadir}/faf/web/media
mkdir -p %{buildroot}%{_datadir}/faf/web/static
# /var/spool
mkdir -p %{buildroot}%{_localstatedir}/spool/faf/
mkdir -p %{buildroot}%{_localstatedir}/spool/faf/lob
mkdir -p %{buildroot}%{_localstatedir}/spool/faf/reports
mkdir -p %{buildroot}%{_localstatedir}/spool/faf/reports/incoming
mkdir -p %{buildroot}%{_localstatedir}/spool/faf/reports/deferred
mkdir -p %{buildroot}%{_localstatedir}/spool/faf/reports/saved
mkdir -p %{buildroot}%{_localstatedir}/spool/faf/reports/archive
mkdir -p %{buildroot}%{_localstatedir}/spool/faf/attachments/
mkdir -p %{buildroot}%{_localstatedir}/spool/faf/attachments/incoming
mkdir -p %{buildroot}%{_localstatedir}/spool/faf/attachments/deferred
mkdir -p %{buildroot}%{_localstatedir}/spool/faf/attachments/saved
mkdir -p %{buildroot}%{_localstatedir}/spool/faf/attachments/archive
mkdir -p %{buildroot}%{_localstatedir}/spool/faf/dumpdirs
mkdir -p %{buildroot}%{_localstatedir}/spool/faf/openid_store
# /var/log
mkdir -p %{buildroot}%{_localstatedir}/log/faf/
mkdir -p %{buildroot}%{_tmpfilesdir}
mkdir -p %{buildroot}/run/faf-celery
%posttrans
%systemd_post httpd.service
%check
make check || ( cat tests/test-suite.log ; cat tests/webfaf/test-suite.log ; exit 1 )
%if 0%{?fedora}
pushd src
%if %{with python3}
pylint-3 --rcfile=../pylintrc $(find ./ -name *.py) webfaf/hub.wsgi bin/faf-migrate-db bin/faf
%else
pylint-2 --rcfile=../pylintrc $(find ./ -name *.py) webfaf/hub.wsgi bin/faf-migrate-db bin/faf || :
%endif
popd
%endif
%pre
# http://fedoraproject.org/wiki/Packaging:UsersAndGroups
getent group faf >/dev/null || groupadd --system faf
getent passwd faf >/dev/null || useradd --system -g faf -d /etc/faf -s /sbin/nologin faf
exit 0
%post webui
if [ "$1" = 1 ]
then
# alphanumeric string of 50 characters
RANDOM_STR="$( cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 50 )"
sed -i "s#@SECRET_KEY@#$RANDOM_STR#g" %{_sysconfdir}/faf/plugins/web.conf
fi
%files
# /etc
%dir %{_sysconfdir}/faf
%dir %{_sysconfdir}/faf/plugins
%dir %{_sysconfdir}/faf/templates
%config(noreplace) %{_sysconfdir}/faf/faf.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/faf
# /var/spool
%dir %attr(0775, faf, faf) %{_localstatedir}/spool/faf
%dir %attr(0775, faf, faf) %{_localstatedir}/spool/faf/lob
%dir %attr(0775, faf, faf) %{_localstatedir}/spool/faf/reports
%dir %attr(0775, faf, faf) %{_localstatedir}/spool/faf/reports/incoming
%dir %attr(0775, faf, faf) %{_localstatedir}/spool/faf/reports/saved
%dir %attr(0775, faf, faf) %{_localstatedir}/spool/faf/reports/deferred
%dir %attr(0775, faf, faf) %{_localstatedir}/spool/faf/reports/archive
%dir %attr(0775, faf, faf) %{_localstatedir}/spool/faf/attachments
%dir %attr(0775, faf, faf) %{_localstatedir}/spool/faf/attachments/incoming
%dir %attr(0775, faf, faf) %{_localstatedir}/spool/faf/attachments/deferred
%dir %attr(0775, faf, faf) %{_localstatedir}/spool/faf/attachments/saved
%dir %attr(0775, faf, faf) %{_localstatedir}/spool/faf/attachments/archive
# /var/log
%dir %attr(0775, faf, faf) %{_localstatedir}/log/faf
# /usr/bin
%{_bindir}/faf
# /usr/lib/python*/pyfaf
%if %{with python3}
%dir %{python3_sitelib}/pyfaf
%dir %{python3_sitelib}/pyfaf/__pycache__
%{python3_sitelib}/pyfaf/__init__.py
%{python3_sitelib}/pyfaf/checker.py
%{python3_sitelib}/pyfaf/cmdline.py
%{python3_sitelib}/pyfaf/common.py
%{python3_sitelib}/pyfaf/config.py
%{python3_sitelib}/pyfaf/local.py
%{python3_sitelib}/pyfaf/retrace.py
%{python3_sitelib}/pyfaf/rpm.py
%{python3_sitelib}/pyfaf/queries.py
%{python3_sitelib}/pyfaf/ureport.py
%{python3_sitelib}/pyfaf/ureport_compat.py
%{python3_sitelib}/pyfaf/__pycache__/__init__.*.pyc
%{python3_sitelib}/pyfaf/__pycache__/checker.*.pyc
%{python3_sitelib}/pyfaf/__pycache__/cmdline.*.pyc
%{python3_sitelib}/pyfaf/__pycache__/common.*.pyc
%{python3_sitelib}/pyfaf/__pycache__/config.*.pyc
%{python3_sitelib}/pyfaf/__pycache__/local.*.pyc
%{python3_sitelib}/pyfaf/__pycache__/retrace.*.pyc
%{python3_sitelib}/pyfaf/__pycache__/rpm.*.pyc
%{python3_sitelib}/pyfaf/__pycache__/queries.*.pyc
%{python3_sitelib}/pyfaf/__pycache__/ureport.*.pyc
%{python3_sitelib}/pyfaf/__pycache__/ureport_compat.*.pyc
%dir %{python3_sitelib}/pyfaf/actions
%dir %{python3_sitelib}/pyfaf/actions/__pycache__
%{python3_sitelib}/pyfaf/actions/__init__.py
%{python3_sitelib}/pyfaf/actions/init.py
%{python3_sitelib}/pyfaf/actions/componentadd.py
%{python3_sitelib}/pyfaf/actions/hash_paths.py
%{python3_sitelib}/pyfaf/actions/opsysadd.py
%{python3_sitelib}/pyfaf/actions/opsysdel.py
%{python3_sitelib}/pyfaf/actions/opsyslist.py
%{python3_sitelib}/pyfaf/actions/releaseadd.py
%{python3_sitelib}/pyfaf/actions/releaselist.py
%{python3_sitelib}/pyfaf/actions/releasemod.py
%{python3_sitelib}/pyfaf/actions/match_unknown_packages.py
%{python3_sitelib}/pyfaf/actions/__pycache__/__init__.*.pyc
%{python3_sitelib}/pyfaf/actions/__pycache__/init.*.pyc
%{python3_sitelib}/pyfaf/actions/__pycache__/componentadd.*.pyc
%{python3_sitelib}/pyfaf/actions/__pycache__/hash_paths.*.pyc
%{python3_sitelib}/pyfaf/actions/__pycache__/opsysadd.*.pyc
%{python3_sitelib}/pyfaf/actions/__pycache__/opsysdel.*.pyc
%{python3_sitelib}/pyfaf/actions/__pycache__/opsyslist.*.pyc
%{python3_sitelib}/pyfaf/actions/__pycache__/releaseadd.*.pyc
%{python3_sitelib}/pyfaf/actions/__pycache__/releaselist.*.pyc
%{python3_sitelib}/pyfaf/actions/__pycache__/releasemod.*.pyc
%{python3_sitelib}/pyfaf/actions/__pycache__/match_unknown_packages.*.pyc
%dir %{python3_sitelib}/pyfaf/bugtrackers
%dir %{python3_sitelib}/pyfaf/bugtrackers/__pycache__
%{python3_sitelib}/pyfaf/bugtrackers/__init__.py
%{python3_sitelib}/pyfaf/bugtrackers/__pycache__/__init__.*.pyc
%dir %{python3_sitelib}/pyfaf/opsys
%dir %{python3_sitelib}/pyfaf/opsys/__pycache__
%{python3_sitelib}/pyfaf/opsys/__init__.py
%{python3_sitelib}/pyfaf/opsys/__pycache__/__init__.*.pyc
%dir %{python3_sitelib}/pyfaf/problemtypes
%dir %{python3_sitelib}/pyfaf/problemtypes/__pycache__
%{python3_sitelib}/pyfaf/problemtypes/__init__.py
%{python3_sitelib}/pyfaf/problemtypes/__pycache__/__init__.*.pyc
%dir %{python3_sitelib}/pyfaf/repos
%dir %{python3_sitelib}/pyfaf/repos/__pycache__
%{python3_sitelib}/pyfaf/repos/__init__.py
%{python3_sitelib}/pyfaf/repos/rpm_metadata.py
%{python3_sitelib}/pyfaf/repos/__pycache__/__init__.*.pyc
%{python3_sitelib}/pyfaf/repos/__pycache__/rpm_metadata.*.pyc
%dir %{python3_sitelib}/pyfaf/solutionfinders
%dir %{python3_sitelib}/pyfaf/solutionfinders/__pycache__
%{python3_sitelib}/pyfaf/solutionfinders/__init__.py
%{python3_sitelib}/pyfaf/solutionfinders/__pycache__/__init__.*.pyc
%dir %{python3_sitelib}/pyfaf/storage
%dir %{python3_sitelib}/pyfaf/storage/__pycache__
%{python3_sitelib}/pyfaf/storage/__init__.py
%{python3_sitelib}/pyfaf/storage/bugzilla.py
%{python3_sitelib}/pyfaf/storage/bugtracker.py
%{python3_sitelib}/pyfaf/storage/custom_types.py
%{python3_sitelib}/pyfaf/storage/debug.py
%{python3_sitelib}/pyfaf/storage/externalfaf.py
%{python3_sitelib}/pyfaf/storage/events.py
%{python3_sitelib}/pyfaf/storage/sf_prefilter.py
%{python3_sitelib}/pyfaf/storage/llvm.py
%{python3_sitelib}/pyfaf/storage/opsys.py
%{python3_sitelib}/pyfaf/storage/mantisbt.py
%{python3_sitelib}/pyfaf/storage/problem.py
%{python3_sitelib}/pyfaf/storage/project.py
%{python3_sitelib}/pyfaf/storage/report.py
%{python3_sitelib}/pyfaf/storage/symbol.py
%{python3_sitelib}/pyfaf/storage/user.py
%{python3_sitelib}/pyfaf/storage/jsontype.py
%{python3_sitelib}/pyfaf/storage/task.py
%{python3_sitelib}/pyfaf/storage/__pycache__/__init__.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/bugzilla.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/bugtracker.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/custom_types.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/debug.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/externalfaf.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/events.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/sf_prefilter.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/llvm.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/opsys.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/mantisbt.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/problem.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/project.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/report.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/symbol.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/user.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/jsontype.*.pyc
%{python3_sitelib}/pyfaf/storage/__pycache__/task.*.pyc
%dir %{python3_sitelib}/pyfaf/storage/fixtures
%dir %{python3_sitelib}/pyfaf/storage/fixtures/__pycache__
%{python3_sitelib}/pyfaf/storage/fixtures/__init__.py
%{python3_sitelib}/pyfaf/storage/fixtures/data.py
%{python3_sitelib}/pyfaf/storage/fixtures/randutils.py
%{python3_sitelib}/pyfaf/storage/fixtures/__pycache__/__init__.*.pyc
%{python3_sitelib}/pyfaf/storage/fixtures/__pycache__/data.*.pyc
%{python3_sitelib}/pyfaf/storage/fixtures/__pycache__/randutils.*.pyc
%dir %{python3_sitelib}/pyfaf/utils
%dir %{python3_sitelib}/pyfaf/utils/__pycache__
%{python3_sitelib}/pyfaf/utils/__init__.py
%{python3_sitelib}/pyfaf/utils/contextmanager.py
%{python3_sitelib}/pyfaf/utils/date.py
%{python3_sitelib}/pyfaf/utils/decorators.py
%{python3_sitelib}/pyfaf/utils/format.py
%{python3_sitelib}/pyfaf/utils/hash.py
%{python3_sitelib}/pyfaf/utils/parse.py
%{python3_sitelib}/pyfaf/utils/proc.py
%{python3_sitelib}/pyfaf/utils/storage.py
%{python3_sitelib}/pyfaf/utils/user.py
%{python3_sitelib}/pyfaf/utils/web.py
%{python3_sitelib}/pyfaf/utils/__pycache__/__init__.*.pyc
%{python3_sitelib}/pyfaf/utils/__pycache__/contextmanager.*.pyc
%{python3_sitelib}/pyfaf/utils/__pycache__/date.*.pyc
%{python3_sitelib}/pyfaf/utils/__pycache__/decorators.*.pyc
%{python3_sitelib}/pyfaf/utils/__pycache__/format.*.pyc
%{python3_sitelib}/pyfaf/utils/__pycache__/hash.*.pyc
%{python3_sitelib}/pyfaf/utils/__pycache__/parse.*.pyc
%{python3_sitelib}/pyfaf/utils/__pycache__/proc.*.pyc
%{python3_sitelib}/pyfaf/utils/__pycache__/storage.*.pyc
%{python3_sitelib}/pyfaf/utils/__pycache__/user.*.pyc
%{python3_sitelib}/pyfaf/utils/__pycache__/web.*.pyc
%else
%dir %{python_sitelib}/pyfaf