-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabrt.spec.in
1861 lines (1666 loc) · 65 KB
/
abrt.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
# http://fedoraproject.org/wiki/Packaging:Guidelines#PIE
# http://fedoraproject.org/wiki/Hardened_Packages
%global _hardened_build 1
%if 0%{?fedora} || 0%{?rhel} > 7
# Enable python3 build by default
%bcond_without python3
%else
%bcond_with python3
%endif
%if 0%{?rhel} > 7 || 0%{?fedora} > 28
# Disable python2 build by default
%bcond_with python2
%else
%bcond_without python2
%endif
%if 0%{?rhel}%{?suse_version}
%bcond_with bodhi
%else
%bcond_without bodhi
%endif
# build abrt-atomic subpackage
%bcond_without atomic
%ifarch aarch64
%define have_kexec_tools 0
%else
%define have_kexec_tools 1
%endif
# rpmbuild --define 'desktopvendor mystring'
%if "x%{desktopvendor}" == "x"
%define desktopvendor %(source /etc/os-release; echo ${ID})
%endif
%if 0%{?suse_version}
%define dbus_devel dbus-1-devel
%define libjson_devel libjson-devel
%define nss_devel mozilla-nss-devel
%define shadow_utils pwdutils
%else
%define dbus_devel dbus-devel
%define libjson_devel json-c-devel
%define nss_devel nss-devel
%define shadow_utils shadow-utils
%endif
# do not append package version to doc directory of subpackages in F20 and later; rhbz#993656
%if "%{_pkgdocdir}" == "%{_docdir}/%{name}"
%define docdirversion %{nil}
%else
%define docdirversion -%{version}
%endif
%define libreport_ver 2.9.3
%define satyr_ver 0.24
Summary: Automatic bug detection and reporting tool
Name: abrt
Version: @PACKAGE_VERSION@
Release: 1%{?dist}
License: GPLv2+
URL: https://abrt.readthedocs.org/
Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: %{dbus_devel}
BuildRequires: gtk3-devel
BuildRequires: glib2-devel >= 2.43
BuildRequires: rpm-devel >= 4.6
BuildRequires: desktop-file-utils
BuildRequires: libnotify-devel
#why? BuildRequires: file-devel
BuildRequires: gettext
BuildRequires: libxml2-devel
BuildRequires: intltool
BuildRequires: libtool
BuildRequires: %{nss_devel}
BuildRequires: asciidoc
BuildRequires: doxygen
BuildRequires: xmlto
BuildRequires: libreport-devel >= %{libreport_ver}
BuildRequires: satyr-devel >= %{satyr_ver}
BuildRequires: augeas
BuildRequires: libselinux-devel
%if %{with python2}
BuildRequires: python2-devel
BuildRequires: python2-systemd
BuildRequires: python2-argcomplete
BuildRequires: python2-argh
BuildRequires: python2-humanize
%endif # with python2
%if %{with python3}
BuildRequires: python3-devel
BuildRequires: python3-systemd
BuildRequires: python3-argcomplete
BuildRequires: python3-argh
BuildRequires: python3-humanize
BuildRequires: python3-devel
%endif # with python3
Requires: libreport >= %{libreport_ver}
Requires: satyr >= %{satyr_ver}
# these only exist on suse
%if 0%{?suse_version}
BuildRequires: dbus-1-glib-devel
Requires: dbus-1-glib
%endif
%{?systemd_requires}
Requires: systemd
Requires: %{name}-libs = %{version}-%{release}
Requires: python3-%{name} = %{version}-%{release}
Requires(pre): %{shadow_utils}
%if %{with python3}
Requires: python3-augeas
Requires: python3-dbus
%else
%if %{with python2}
Requires: python2-augeas
Requires: python2-dbus
%endif # with python2
%endif # with python3
%ifarch aarch64 i686 x86_64
Requires: dmidecode
%endif
Requires: libreport-plugin-ureport
%if 0%{?rhel}
Requires: libreport-plugin-rhtsupport
%endif
%if 0%{?fedora}
Requires: libreport-plugin-systemd-journal
%endif
#gui
BuildRequires: libreport-gtk-devel >= %{libreport_ver}
BuildRequires: gsettings-desktop-schemas-devel >= 3.15
#addon-ccpp
BuildRequires: gdb-headless
BuildRequires: libcap-devel
#addon-kerneloops
BuildRequires: systemd-devel
BuildRequires: %{libjson_devel}
%if %{with bodhi}
# plugin-bodhi
BuildRequires: libreport-web-devel >= %{libreport_ver}
%endif
#desktop
#Default config of addon-ccpp requires gdb
BuildRequires: gdb-headless
#dbus
BuildRequires: polkit-devel
%if %{with python2}
#python2-abrt
BuildRequires: python2-sphinx
BuildRequires: python2-libreport
#python2-abrt-doc
BuildRequires: python2-devel
%endif # with python2
%if %{with python3}
#python3-abrt
BuildRequires: python3-nose
BuildRequires: python3-sphinx
BuildRequires: python3-libreport
#python3-abrt-doc
BuildRequires: python3-devel
%endif # with python3
%description
%{name} is a tool to help users to detect defects in applications and
to create a bug report with all information needed by maintainer to fix it.
It uses plugin system to extend its functionality.
%package libs
Summary: Libraries for %{name}
%description libs
Libraries for %{name}.
%package devel
Summary: Development libraries for %{name}
Requires: abrt-libs = %{version}-%{release}
%description devel
Development libraries and headers for %{name}.
%package gui-libs
Summary: Libraries for %{name}-gui
%description gui-libs
Libraries for %{name}-gui.
%package gui-devel
Summary: Development libraries for %{name}-gui
Requires: abrt-gui-libs = %{version}-%{release}
%description gui-devel
Development libraries and headers for %{name}-gui.
%package gui
Summary: %{name}'s gui
Requires: %{name} = %{version}-%{release}
Requires: %{name}-dbus = %{version}-%{release}
Requires: gnome-abrt
Requires: gsettings-desktop-schemas >= 3.15
# we used to have abrt-applet, now abrt-gui includes it:
Provides: abrt-applet = %{version}-%{release}
Obsoletes: abrt-applet < 0.0.5
Conflicts: abrt-applet < 0.0.5
Requires: abrt-libs = %{version}-%{release}
Requires: abrt-gui-libs = %{version}-%{release}
%description gui
GTK+ wizard for convenient bug reporting.
%package addon-coredump-helper
Summary: %{name}'s /proc/sys/kernel/core_pattern helper
Requires: abrt-libs = %{version}-%{release}
%description addon-coredump-helper
This package contains hook for C/C++ crashed programs.
%package addon-ccpp
Summary: %{name}'s C/C++ addon
Requires: cpio
Requires: gdb-headless
Requires: elfutils
%if 0%{!?rhel:1}
# abrt-action-perform-ccpp-analysis wants to run analyze_RetraceServer:
Requires: %{name}-retrace-client
%endif
Requires: %{name} = %{version}-%{release}
Requires: %{name}-addon-coredump-helper = %{version}-%{release}
Requires: abrt-libs = %{version}-%{release}
%if %{with python3}
Requires: python3-libreport
%else
%if %{with python2}
Requires: python2-libreport
%endif # with python2
%endif # with python3
%description addon-ccpp
This package contains %{name}'s C/C++ analyzer plugin.
%package addon-upload-watch
Summary: %{name}'s upload addon
Requires: %{name} = %{version}-%{release}
Requires: abrt-libs = %{version}-%{release}
%description addon-upload-watch
This package contains hook for uploaded problems.
%package retrace-client
Summary: %{name}'s retrace client
Requires: %{name} = %{version}-%{release}
Requires: xz
Requires: tar
Requires: nss-pem
%description retrace-client
This package contains the client application for Retrace server
which is able to analyze C/C++ crashes remotely.
%package addon-kerneloops
Summary: %{name}'s kerneloops addon
Requires: curl
Requires: %{name} = %{version}-%{release}
%if 0%{!?rhel:1}
Requires: libreport-plugin-kerneloops >= %{libreport_ver}
%endif
Requires: abrt-libs = %{version}-%{release}
%description addon-kerneloops
This package contains plugin for collecting kernel crash information from
system log.
%package addon-xorg
Summary: %{name}'s Xorg addon
Requires: curl
Requires: %{name} = %{version}-%{release}
Requires: abrt-libs = %{version}-%{release}
%description addon-xorg
This package contains plugin for collecting Xorg crash information from Xorg
log.
%if %{?have_kexec_tools} == 1
%package addon-vmcore
Summary: %{name}'s vmcore addon
Requires: %{name} = %{version}-%{release}
Requires: abrt-addon-kerneloops
Requires: kexec-tools
%if %{with python3}
Requires: python3-abrt
Requires: python3-augeas
%else
%if %{with python2}
Requires: python2-abrt
Requires: python2-augeas
%endif # with python2
%endif # with python3
Requires: util-linux
%description addon-vmcore
This package contains plugin for collecting kernel crash information from
vmcore files.
%endif
%package addon-pstoreoops
Summary: %{name}'s pstore oops addon
Requires: %{name} = %{version}-%{release}
Requires: abrt-libs = %{version}-%{release}
Requires: abrt-addon-kerneloops
Obsoletes: abrt-addon-uefioops
%description addon-pstoreoops
This package contains plugin for collecting kernel oopses from pstore storage.
%if %{with bodhi}
%package plugin-bodhi
Summary: %{name}'s bodhi plugin
Requires: %{name} = %{version}-%{release}
Obsoletes: libreport-plugin-bodhi > 0.0.1
Provides: libreport-plugin-bodhi = %{version}-%{release}
%description plugin-bodhi
Search for a new updates in bodhi server.
%endif
%if %{with python2}
%package -n python2-abrt-addon
Summary: %{name}'s addon for catching and analyzing Python exceptions
Requires: %{name} = %{version}-%{release}
Requires: python2-systemd
Requires: python2-abrt
# Remove before F30
Provides: abrt-addon-python = %{version}-%{release}
Provides: abrt-addon-python%{?_isa} = %{version}-%{release}
Obsoletes: abrt-addon-python < 2.10.4
%description -n python2-abrt-addon
This package contains python hook and python analyzer plugin for handling
uncaught exception in python programs.
%package -n python2-abrt-container-addon
Summary: %{name}'s container addon for catching Python 2 exceptions
Conflicts: python2-abrt-addon
Requires: container-exception-logger
%description -n python2-abrt-container-addon
This package contains python 2 hook and handling uncaught exception in python 2
programs in container.
%endif # with python2
%if %{with python3}
%package -n python3-abrt-addon
Summary: %{name}'s addon for catching and analyzing Python 3 exceptions
Requires: %{name} = %{version}-%{release}
Requires: python3-systemd
Requires: python3-abrt
# Remove before F30
Provides: abrt-addon-python3 = %{version}-%{release}
Provides: abrt-addon-python3%{?_isa} = %{version}-%{release}
Obsoletes: abrt-addon-python3 < 2.10.4
%description -n python3-abrt-addon
This package contains python 3 hook and python analyzer plugin for handling
uncaught exception in python 3 programs.
%package -n python3-abrt-container-addon
Summary: %{name}'s container addon for catching Python 3 exceptions
Conflicts: python3-abrt-addon
Requires: container-exception-logger
%description -n python3-abrt-container-addon
This package contains python 3 hook and handling uncaught exception in python 3
programs in container.
%endif # with python3
%package plugin-sosreport
Summary: %{name}'s plugin for building automatic sosreports
Requires: sos
Requires: %{name} = %{version}-%{release}
%description plugin-sosreport
This package contains a configuration snippet to enable automatic generation
of sosreports for abrt events.
%package plugin-machine-id
Summary: %{name}'s plugin to generate machine_id based off dmidecode
Requires: %{name} = %{version}-%{release}
%description plugin-machine-id
This package contains a configuration snippet to enable automatic generation
of machine_id for abrt events.
%package tui
Summary: %{name}'s command line interface
Requires: %{name} = %{version}-%{release}
Requires: libreport-cli >= %{libreport_ver}
Requires: abrt-libs = %{version}-%{release}
Requires: abrt-dbus
%description tui
This package contains a simple command line client for processing abrt reports
in command line environment.
%if %{with python3}
%package cli-ng
Summary: %{name}'s improved command line interface
Requires: %{name} = %{version}-%{release}
Requires: libreport-cli >= %{libreport_ver}
Requires: abrt-libs = %{version}-%{release}
Requires: abrt-dbus
Requires: python3-abrt
Requires: abrt-addon-ccpp
Requires: python3-argh
Requires: python3-argcomplete
Requires: python3-humanize
%description cli-ng
New generation command line interface for ABRT
%endif # with python3
%package cli
Summary: Virtual package to make easy default installation on non-graphical environments
Requires: %{name} = %{version}-%{release}
Requires: abrt-tui
Requires: abrt-addon-kerneloops
Requires: abrt-addon-pstoreoops
%if %{?have_kexec_tools} == 1
Requires: abrt-addon-vmcore
%endif
Requires: abrt-addon-ccpp
%if %{with python3}
Requires: python3-abrt-addon
%endif # with python3
Requires: abrt-addon-xorg
%if 0%{?rhel}
Requires: libreport-rhel >= %{libreport_ver}
Requires: libreport-plugin-rhtsupport >= %{libreport_ver}
%else
Requires: abrt-retrace-client
%if %{with bodhi}
Requires: abrt-plugin-bodhi
%endif
%if 0%{!?suse_version:1}
Requires: libreport-plugin-bugzilla >= %{libreport_ver}
%endif
Requires: libreport-plugin-logger >= %{libreport_ver}
Requires: libreport-plugin-ureport >= %{libreport_ver}
%if 0%{?fedora}
Requires: libreport-fedora >= %{libreport_ver}
%endif
%endif
%description cli
Virtual package to install all necessary packages for usage from command line
environment.
%package desktop
Summary: Virtual package to make easy default installation on desktop environments
# This package gets installed when anything requests bug-buddy -
# happens when users upgrade Fn to Fn+1;
# or if user just wants "typical desktop installation".
# Installing abrt-desktop should result in the abrt which works without
# any tweaking in abrt.conf (IOW: all plugins mentioned there must be installed)
Requires: %{name} = %{version}-%{release}
Requires: abrt-addon-kerneloops
Requires: abrt-addon-pstoreoops
%if %{?have_kexec_tools} == 1
Requires: abrt-addon-vmcore
%endif
Requires: abrt-addon-ccpp
%if %{with python3}
Requires: python3-abrt-addon
%endif # with python3
Requires: abrt-addon-xorg
Requires: gdb-headless
Requires: abrt-gui
Requires: gnome-abrt
%if 0%{?rhel}
Requires: libreport-rhel >= %{libreport_ver}
Requires: libreport-plugin-rhtsupport >= %{libreport_ver}
%else
Requires: abrt-retrace-client
%if %{with bodhi}
Requires: abrt-plugin-bodhi
%endif
%if 0%{!?suse_version:1}
Requires: libreport-plugin-bugzilla >= %{libreport_ver}
%endif
Requires: libreport-plugin-logger >= %{libreport_ver}
Requires: libreport-plugin-ureport >= %{libreport_ver}
%if 0%{?fedora}
Requires: libreport-fedora >= %{libreport_ver}
%endif
%endif
#Requires: abrt-plugin-firefox
Provides: bug-buddy = %{version}-%{release}
%description desktop
Virtual package to install all necessary packages for usage from desktop
environment.
%if %{with atomic}
%package atomic
Summary: Package to make easy default installation on Atomic hosts.
Requires: %{name}-addon-coredump-helper = %{version}-%{release}
Conflicts: %{name}-addon-ccpp
%description atomic
Package to install all necessary packages for usage from Atomic
hosts.
%endif
%package dbus
Summary: ABRT DBus service
Requires: %{name} = %{version}-%{release}
Requires: abrt-libs = %{version}-%{release}
%description dbus
ABRT DBus service which provides org.freedesktop.problems API on dbus and
uses PolicyKit to authorize to access the problem data.
%if %{with python2}
%package -n python2-abrt
Summary: ABRT Python API
Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-dbus = %{version}-%{release}
Requires: python2-dbus
Requires: python2-libreport
%if 0%{?rhel:%{rhel} == 7}
Requires: python-gobject-base
%else
Requires: python2-gobject-base
%endif
%{?python_provide:%python_provide python2-abrt}
# Remove before F30
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < 2.10.4
%description -n python2-abrt
High-level API for querying, creating and manipulating
problems handled by ABRT in Python.
%package -n python2-abrt-doc
Summary: ABRT Python API Documentation
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
Requires: python2-abrt = %{version}-%{release}
# Remove before F30
Provides: %{name}-python-doc = %{version}-%{release}
Obsoletes: %{name}-python-doc < 2.10.4
%description -n python2-abrt-doc
Examples and documentation for ABRT Python API.
%endif # with python2
%if %{with python3}
%package -n python3-abrt
Summary: ABRT Python 3 API
Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-dbus = %{version}-%{release}
Requires: python3-dbus
Requires: python3-libreport
%{?python_provide:%python_provide python3-abrt}
# Remove before F30
Provides: %{name}-python3 = %{version}-%{release}
Provides: %{name}-python3%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python3 < 2.10.4
Requires: python3-gobject-base
%description -n python3-abrt
High-level API for querying, creating and manipulating
problems handled by ABRT in Python 3.
%package -n python3-abrt-doc
Summary: ABRT Python API Documentation
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
Requires: python3-%{name} = %{version}-%{release}
# Remove before F30
Provides: %{name}-python3-doc = %{version}-%{release}
Obsoletes: %{name}-python3-doc < 2.10.4
%description -n python3-abrt-doc
Examples and documentation for ABRT Python 3 API.
%endif # with python3
%package console-notification
Summary: ABRT console notification script
Requires: %{name} = %{version}-%{release}
Requires: %{name}-cli = %{version}-%{release}
%description console-notification
A small script which prints a count of detected problems when someone logs in
to the shell
%prep
%setup -q
%build
autoconf
%define var_base_dir spool
CFLAGS="%{optflags} -Werror" %configure \
%if %{without python2}
--without-python2 \
%endif # with python2
%if %{without python3}
--without-python3 \
%endif # with python3
%if %{without bodhi}
--without-bodhi \
%endif
%if %{without atomic}
--without-atomic \
%endif
%if 0%{?rhel}
--enable-suggest-autoreporting \
--enable-authenticated-autoreporting \
%endif
%ifnarch arm armhfp armv7hl armv7l aarch64
--enable-native-unwinder \
%endif
%if %{?have_kexec_tools} == 0
--disable-addon-vmcore \
%endif
--with-defaultdumplocation=/var/%{var_base_dir}/abrt \
--enable-doxygen-docs \
--enable-dump-time-unwind \
--disable-silent-rules
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT \
mandir=%{_mandir} \
dbusabrtdocdir=%{_defaultdocdir}/%{name}-dbus%{docdirversion}/html/
%find_lang %{name}
# Remove byte-compiled python files generated by automake.
# automake uses system's python for all *.py files, even
# for those which needs to be byte-compiled with different
# version (python2/python3).
# rpm can do this work and use the appropriate python version.
find $RPM_BUILD_ROOT -name "*.py[co]" -delete
# remove all .la and .a files
find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f
mkdir -p $RPM_BUILD_ROOT/var/cache/abrt-di
mkdir -p $RPM_BUILD_ROOT/var/run/abrt
mkdir -p $RPM_BUILD_ROOT/var/%{var_base_dir}/abrt
mkdir -p $RPM_BUILD_ROOT/var/spool/abrt-upload
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/abrt
desktop-file-install \
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
src/applet/abrt-applet.desktop
ln -sf %{_datadir}/applications/abrt-applet.desktop ${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart/
# After everything is installed, remove info dir
rm -f %{buildroot}%{_infodir}/dir
%check
make check|| {
# find and print the logs of failed test
# do not cat tests/testsuite.log because it contains a lot of bloat
find tests/testsuite.dir -name "testsuite.log" -print -exec cat '{}' \;
exit 1
}
%pre
#uidgid pair 173:173 reserved in setup rhbz#670231
%define abrt_gid_uid 173
getent group abrt >/dev/null || groupadd -f -g %{abrt_gid_uid} --system abrt
getent passwd abrt >/dev/null || useradd --system -g abrt -u %{abrt_gid_uid} -d /etc/abrt -s /sbin/nologin abrt
exit 0
%post
# $1 == 1 if install; 2 if upgrade
%systemd_post abrtd.service
%post addon-ccpp
# this is required for transition from 1.1.x to 2.x
# because /cache/abrt-di/* was created under root with root:root
# so 2.x fails when it tries to extract debuginfo there..
chown -R abrt:abrt %{_localstatedir}/cache/abrt-di
%systemd_post abrt-ccpp.service
%systemd_post abrt-journal-core.service
%journal_catalog_update
%post addon-kerneloops
%systemd_post abrt-oops.service
%journal_catalog_update
%post addon-xorg
%systemd_post abrt-xorg.service
%journal_catalog_update
%if %{with python2}
%post -n python2-abrt-addon
%journal_catalog_update
%endif # with python2
%if %{with python3}
%post -n python3-abrt-addon
%journal_catalog_update
%endif # with python3
%if %{?have_kexec_tools} == 1
%post addon-vmcore
%systemd_post abrt-vmcore.service
%journal_catalog_update
%endif
%post addon-pstoreoops
%systemd_post abrt-pstoreoops.service
%post addon-upload-watch
%systemd_post abrt-upload-watch.service
%preun
%systemd_preun abrtd.service
%preun addon-ccpp
%systemd_preun abrt-ccpp.service
%systemd_preun abrt-journal-core.service
%preun addon-kerneloops
%systemd_preun abrt-oops.service
%preun addon-xorg
%systemd_preun abrt-xorg.service
%if %{?have_kexec_tools} == 1
%preun addon-vmcore
%systemd_preun abrt-vmcore.service
%endif
%preun addon-pstoreoops
%systemd_preun abrt-pstoreoops.service
%preun addon-upload-watch
%systemd_preun abrt-upload-watch.service
%postun
%systemd_postun_with_restart abrtd.service
%postun addon-ccpp
%systemd_postun_with_restart abrt-ccpp.service
%systemd_postun_with_restart abrt-journal-core.service
%postun addon-kerneloops
%systemd_postun_with_restart abrt-oops.service
%postun addon-xorg
%systemd_postun_with_restart abrt-xorg.service
%if %{?have_kexec_tools} == 1
%postun addon-vmcore
%systemd_postun_with_restart abrt-vmcore.service
%endif
%postun addon-pstoreoops
%systemd_postun_with_restart abrt-pstoreoops.service
%postun addon-upload-watch
%systemd_postun_with_restart abrt-upload-watch.service
%post gui
# update icon cache
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%if %{with atomic}
%post atomic
if [ -f /etc/abrt/plugins/CCpp.conf ]; then
mv /etc/abrt/plugins/CCpp.conf /etc/abrt/plugins/CCpp.conf.rpmsave.atomic || exit 1;
fi
ln -sf /etc/abrt/plugins/CCpp_Atomic.conf /etc/abrt/plugins/CCpp.conf
if [ -f /usr/share/abrt/conf.d/plugins/CCpp.conf ]; then
mv /usr/share/abrt/conf.d/plugins/CCpp.conf /usr/share/abrt/conf.d/plugins/CCpp.conf.rpmsave.atomic || exit 1;
fi
ln -sf /usr/share/abrt/conf.d/plugins/CCpp_Atomic.conf /usr/share/abrt/conf.d/plugins/CCpp.conf
%systemd_post abrt-coredump-helper.service
%preun atomic
if [ -L /etc/abrt/plugins/CCpp.conf ]; then
rm /etc/abrt/plugins/CCpp.conf
fi
if [ -L /usr/share/abrt/conf.d/plugins/CCpp.conf ]; then
rm /usr/share/abrt/conf.d/plugins/CCpp.conf
fi
if [ -f /etc/abrt/plugins/CCpp.conf.rpmsave.atomic ]; then
mv /etc/abrt/plugins/CCpp.conf.rpmsave.atomic /etc/abrt/plugins/CCpp.conf || exit 1
fi
if [ -f /usr/share/abrt/conf.d/plugins/CCpp.conf.rpmsave.atomic ]; then
mv /usr/share/abrt/conf.d/plugins/CCpp.conf.rpmsave.atomic /usr/share/abrt/conf.d/plugins/CCpp.conf || exit 1
fi
%postun atomic
%systemd_postun_with_restart abrt-coredump-helper.service
%endif # with atomic
%if 0%{?fedora} > 27 || 0%{?rhel} > 7
# ldconfigi and gtk-update-icon-cache is not needed
%else
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%post gui-libs -p /sbin/ldconfig
%postun gui-libs -p /sbin/ldconfig
%postun gui
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%endif
%posttrans
# update the old problem dirs to contain "type" element
service abrtd condrestart >/dev/null 2>&1 || :
%posttrans addon-ccpp
# Migrate from abrt-ccpp.service to abrt-journal-core.service
# 'systemctl preset abrt-ccpp.service abrt-journal-core.service'
# is done only for installation by %systemd_post macro but not for package
# upgrade. Following lines affect changes in Fedora preset files in case of
# package upgrade and also starts abrt-journal-core.service and stops
# abrt-ccpp.service if abrt-ccpp.service is running.
# All this has to be done only once because some users want to use
# abrt-ccpp.service instead of the default abrt-journal-core.service.
# Hence we introduced a %{_localstatedir}/lib/abrt/abrt-migrated file to
# mark the migration was done.
if test ! -f %{_localstatedir}/lib/abrt/abrt-migrated ; then
systemctl --no-reload preset abrt-ccpp.service >/dev/null 2>&1 || :
systemctl --no-reload preset abrt-journal-core.service >/dev/null 2>&1 || :
if service abrt-ccpp status >/dev/null 2>&1 ; then
systemctl stop abrt-ccpp >/dev/null 2>&1 || :
systemctl start abrt-journal-core >/dev/null 2>&1 || :
fi
touch %{_localstatedir}/lib/abrt/abrt-migrated
fi
systemctl try-restart abrt-journal-core >/dev/null 2>&1 || :
systemctl try-restart abrt-ccpp >/dev/null 2>&1 || :
# Regenerate core_bactraces because of missing crash threads
abrtdir=$(grep "DumpLocation" /etc/abrt/abrt.conf | cut -d'=' -f2 | tr -d ' ')
if test -d "$abrtdir"; then
for DD in `find "$abrtdir" -mindepth 1 -maxdepth 1 -type d`
do
if test -f "$DD/analyzer" && grep -q "^CCpp$" "$DD/analyzer"; then
/usr/bin/abrt-action-generate-core-backtrace -d "$DD" -- >/dev/null 2>&1 || :
test -f "$DD/core_backtrace" && chown `stat --format=%U:abrt $DD` "$DD/core_backtrace" || :
fi
done
fi
%posttrans addon-kerneloops
service abrt-oops condrestart >/dev/null 2>&1 || :
%posttrans addon-xorg
service abrt-xorg condrestart >/dev/null 2>&1 || :
%if %{?have_kexec_tools} == 1
%posttrans addon-vmcore
service abrt-vmcore condrestart >/dev/null 2>&1 || :
# Copy the configuration file to plugin's directory
test -f /etc/abrt/abrt-harvest-vmcore.conf && {
echo "Moving /etc/abrt/abrt-harvest-vmcore.conf to /etc/abrt/plugins/vmcore.conf"
mv -b /etc/abrt/abrt-harvest-vmcore.conf /etc/abrt/plugins/vmcore.conf
}
exit 0
%endif
%posttrans addon-pstoreoops
service abrt-pstoreoops condrestart >/dev/null 2>&1 || :
%if 0%{?fedora} > 27
# gtk-update-icon-cache is not needed
%else
%posttrans gui
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif
%posttrans dbus
# Force abrt-dbus to restart like we do with the other services
killall abrt-dbus >/dev/null 2>&1 || :
%files -f %{name}.lang
%doc README.md COPYING
%{_unitdir}/abrtd.service
%{_tmpfilesdir}/abrt.conf
%{_sbindir}/abrtd
%{_sbindir}/abrt-server
%{_sbindir}/abrt-auto-reporting
%{_libexecdir}/abrt-handle-event
%{_libexecdir}/abrt-action-ureport
%{_libexecdir}/abrt-action-save-container-data
%{_bindir}/abrt-handle-upload
%{_bindir}/abrt-action-notify
%{_mandir}/man1/abrt-action-notify.1*
%{_bindir}/abrt-action-save-package-data
%{_bindir}/abrt-watch-log
%{_bindir}/abrt-action-analyze-python
%{_bindir}/abrt-action-analyze-xorg
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.problems.daemon.conf
%config(noreplace) %{_sysconfdir}/%{name}/abrt-action-save-package-data.conf
%{_datadir}/%{name}/conf.d/abrt-action-save-package-data.conf
%config(noreplace) %{_sysconfdir}/%{name}/plugins/xorg.conf
%{_datadir}/%{name}/conf.d/plugins/xorg.conf
%{_mandir}/man5/abrt-xorg.conf.5*
%config(noreplace) %{_sysconfdir}/%{name}/gpg_keys.conf
%{_datadir}/%{name}/conf.d/gpg_keys.conf
%{_mandir}/man5/gpg_keys.conf.5*
%config(noreplace) %{_sysconfdir}/libreport/events.d/abrt_event.conf
%{_mandir}/man5/abrt_event.conf.5*
%config(noreplace) %{_sysconfdir}/libreport/events.d/smart_event.conf
%{_mandir}/man5/smart_event.conf.5*
%dir %attr(@DEFAULT_DUMP_LOCATION_MODE@, root, abrt) %{_localstatedir}/%{var_base_dir}/%{name}
%dir %attr(0700, abrt, abrt) %{_localstatedir}/spool/%{name}-upload
# abrtd runs as root
%dir %attr(0755, root, root) %{_localstatedir}/run/%{name}
%ghost %attr(0666, -, -) %{_localstatedir}/run/%{name}/abrt.socket
%ghost %attr(0644, -, -) %{_localstatedir}/run/%{name}/abrtd.pid
%{_mandir}/man1/abrt-handle-upload.1*
%{_mandir}/man1/abrt-server.1*
%{_mandir}/man1/abrt-action-save-package-data.1*
%{_mandir}/man1/abrt-watch-log.1*
%{_mandir}/man1/abrt-action-analyze-python.1*
%{_mandir}/man1/abrt-action-analyze-xorg.1*
%{_mandir}/man1/abrt-auto-reporting.1*
%{_mandir}/man8/abrtd.8*
%{_mandir}/man5/abrt-action-save-package-data.conf.5*
# {_mandir}/man5/pyhook.conf.5*
%files libs
%{_libdir}/libabrt.so.*
%config(noreplace) %{_sysconfdir}/%{name}/abrt.conf
%{_datadir}/%{name}/conf.d/abrt.conf
%{_mandir}/man5/abrt.conf.5*
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/plugins
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/conf.d
%dir %{_datadir}/%{name}/conf.d/plugins
# filesystem package should own /usr/share/augeas/lenses directory
%{_datadir}/augeas/lenses/abrt.aug
%files devel
# The complex pattern below (instead of simlpy *) excludes Makefile{.am,.in}:
%doc apidoc/html/*.{html,png,css,js}
%{_includedir}/abrt/abrt-dbus.h
%{_includedir}/abrt/hooklib.h
%{_includedir}/abrt/libabrt.h
%{_includedir}/abrt/problem_api.h
%{_libdir}/libabrt.so
%{_libdir}/pkgconfig/abrt.pc
%files gui-libs
%{_libdir}/libabrt_gui.so.*
%files gui-devel
%{_includedir}/abrt/abrt-config-widget.h
%{_includedir}/abrt/system-config-abrt.h
%{_libdir}/libabrt_gui.so
%{_libdir}/pkgconfig/abrt_gui.pc
%files gui
%dir %{_datadir}/%{name}
# all glade, gtkbuilder and py files for gui
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/icons/hicolor/*/status/*
%{_datadir}/%{name}/icons/hicolor/*/status/*
%{_datadir}/%{name}/ui/*
%{_bindir}/abrt-applet
%{_bindir}/system-config-abrt
#%%{_bindir}/test-report
%{_datadir}/applications/abrt-applet.desktop
%config(noreplace) %{_sysconfdir}/xdg/autostart/abrt-applet.desktop
%{_mandir}/man1/abrt-applet.1*
%{_mandir}/man1/system-config-abrt.1*
%files addon-coredump-helper
%{_libexecdir}/abrt-hook-ccpp
%{_sbindir}/abrt-install-ccpp-hook