1 |
# (blino) FIXME: switch back to 1 when systemd is installable |
2 |
%define with_systemd 1 |
3 |
|
4 |
%define lib_major 0 |
5 |
%define lib_name %mklibname %{name} %{lib_major} |
6 |
|
7 |
%define lib_name_devel %mklibname %{name} -d |
8 |
%define lib_report_devel %mklibname report -d |
9 |
|
10 |
Summary: Automatic bug detection and reporting tool |
11 |
Name: abrt |
12 |
Version: 2.0.7 |
13 |
Release: %mkrel 1 |
14 |
License: GPLv2+ |
15 |
Group: System/Libraries |
16 |
URL: https://fedorahosted.org/abrt/ |
17 |
Source: https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz |
18 |
Source1: abrt.init |
19 |
Source2: 00abrt.sh |
20 |
Source3: 00abrt.csh |
21 |
Source4: abrt-debuginfo-install |
22 |
Source5: abrt-ccpp.init |
23 |
Source6: abrt-oops.init |
24 |
Patch0: abrt-2.0.7-link.patch |
25 |
# (fc) disable package signature check |
26 |
Patch2: abrt_disable_gpgcheck.diff |
27 |
# (pt) generate stacktrace twice to get missing -debug packages |
28 |
#Patch5: abrt-1.1.14-debug.patch |
29 |
# (fc) disable nspluginwrapper-i386 (Mdv bug #59237) |
30 |
Patch7: abrt-2.0.2-nspluginwrapper.patch |
31 |
# (fc) fix for non UTF-8 locale |
32 |
Patch8: abrt-2.0.2-nonutf8-locale.patch |
33 |
Patch9: abrt-2.0.2-glib-2.32.patch |
34 |
Patch10: abrt-sec.diff |
35 |
# (eugeni): disable kernel oops cron plugin by default (mdv #61986) |
36 |
#Patch12: abrt-1.1.14-disable_oops_scanner.patch |
37 |
|
38 |
# Fedora patches |
39 |
BuildRequires: dbus-devel libdbus-glib-devel |
40 |
BuildRequires: gtk2-devel |
41 |
BuildRequires: curl-devel |
42 |
BuildRequires: rpm-devel |
43 |
BuildRequires: sqlite-devel > 3.0 |
44 |
BuildRequires: desktop-file-utils |
45 |
#BuildRequires: nss-devel |
46 |
BuildRequires: libnotify-devel |
47 |
BuildRequires: xmlrpc-c-devel |
48 |
BuildRequires: xmlrpc-c |
49 |
BuildRequires: file-devel |
50 |
BuildRequires: python-devel |
51 |
BuildRequires: gettext |
52 |
BuildRequires: polkit-1-devel |
53 |
BuildRequires: libzip-devel, libtar-devel, bzip2-devel, zlib-devel |
54 |
BuildRequires: intltool |
55 |
BuildRequires: gnome-common |
56 |
BuildRequires: bison |
57 |
BuildRequires: asciidoc |
58 |
BuildRequires: docbook-style-xsl docbook5-style-xsl |
59 |
BuildRequires: xmlto |
60 |
BuildRequires: libgnome-keyring-devel |
61 |
BuildRequires: gettext-devel |
62 |
%if %{?with_systemd} |
63 |
BuildRequires: systemd-units |
64 |
%endif |
65 |
BuildRequires: btparser-devel |
66 |
BuildRequires: libreport-devel |
67 |
BuildRequires: pkgconfig(libreport-gtk) |
68 |
Requires: %{lib_name} >= %{version}-%{release} |
69 |
Requires(pre): rpm-helper |
70 |
Requires(post): rpm-helper |
71 |
Requires(preun): rpm-helper |
72 |
Requires(postun): rpm-helper |
73 |
Obsoletes: abrt-plugin-catcut < 1.1.13 |
74 |
Obsoletes: abrt-plugin-sqlite3 < 1.1.18 |
75 |
# required for transition from 1.1.13, can be removed after some time |
76 |
Obsoletes: abrt-plugin-runapp < 1.1.18 |
77 |
Obsoletes: abrt-plugin-filetransfer < 1.1.18 |
78 |
Obsoletes: abrt-plugin-sosreport < 1.1.18 |
79 |
|
80 |
%description |
81 |
%{name} is a tool to help users to detect defects in applications and |
82 |
to create a bug report with all informations needed by maintainer to fix it. |
83 |
It uses plugin system to extend its functionality. |
84 |
|
85 |
%pre |
86 |
%_pre_useradd %{name} %{_sysconfdir}/%{name} /bin/nologin |
87 |
%_pre_groupadd %{name} %{name} |
88 |
|
89 |
%post |
90 |
%_post_service %{name}d |
91 |
%if %{?with_systemd} |
92 |
# Enable (but don't start) the units by default |
93 |
/bin/systemctl enable %{name}d.service >/dev/null 2>&1 || : |
94 |
%endif |
95 |
|
96 |
%posttrans |
97 |
service abrtd condrestart >/dev/null 2>&1 || : |
98 |
|
99 |
%preun |
100 |
%_preun_service %{name}d |
101 |
%if %{?with_systemd} |
102 |
if [ "$1" -eq "0" ] ; then |
103 |
/bin/systemctl stop %{name}d.service >/dev/null 2>&1 || : |
104 |
/bin/systemctl disable %{name}d.service >/dev/null 2>&1 || : |
105 |
fi |
106 |
%endif |
107 |
|
108 |
%postun |
109 |
%_postun_userdel %{name} |
110 |
%_postun_groupdel %{name} %{name} |
111 |
%if %{?with_systemd} |
112 |
if [ $1 -ge 1 ] ; then |
113 |
# On upgrade, reload init system configuration if we changed unit files |
114 |
/bin/systemctl daemon-reload >/dev/null 2>&1 || : |
115 |
fi |
116 |
%endif |
117 |
|
118 |
%files -f %{name}.lang |
119 |
%defattr(-,root,root,-) |
120 |
%doc README COPYING |
121 |
#systemd |
122 |
%if %{?with_systemd} |
123 |
%endif |
124 |
%{_sbindir}/%{name}d |
125 |
%{_sbindir}/%{name}-server |
126 |
%{_bindir}/%{name}-debuginfo-install |
127 |
%{_bindir}/%{name}-handle-upload |
128 |
%{_bindir}/%{name}-action-save-package-data |
129 |
%{_bindir}/%{name}-retrace-client |
130 |
%config(noreplace) %{_sysconfdir}/%{name}/abrt.conf |
131 |
%config(noreplace) %{_sysconfdir}/%{name}/abrt-action-save-package-data.conf |
132 |
%config(noreplace) %{_sysconfdir}/%{name}/gpg_keys |
133 |
%config(noreplace) %{_sysconfdir}/libreport/events.d/abrt_event.conf |
134 |
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/dbus-abrt.conf |
135 |
%config(noreplace) %{_sysconfdir}/libreport/events.d/smart_event.conf |
136 |
%config(noreplace) %{_sysconfdir}/libreport/events.d/smolt_event.conf |
137 |
%{_sysconfdir}/libreport/events.d/ccpp_retrace_event.conf |
138 |
%{_sysconfdir}/libreport/events/analyze_RetraceServer.xml |
139 |
%ghost %attr(0666, -, -) %{_localstatedir}/run/%{name}/abrt.socket |
140 |
%ghost %attr(0644, -, -) %{_localstatedir}/run/%{name}d.pid |
141 |
%{_initrddir}/%{name}d |
142 |
#%dir %attr(0755, %{name}, %{name}) %{_localstatedir}/cache/%{name} |
143 |
%dir /var/run/%{name} |
144 |
%dir %{_sysconfdir}/%{name} |
145 |
%dir %{_sysconfdir}/%{name}/plugins |
146 |
%{_mandir}/man8/%{name}d.8.* |
147 |
%{_mandir}/man5/%{name}.conf.5.* |
148 |
%{_datadir}/dbus-1/system-services/com.redhat.%{name}.service |
149 |
|
150 |
#-------------------------------------------------------------------- |
151 |
|
152 |
%package -n %{lib_name} |
153 |
Summary: Libraries for %{name} |
154 |
Group: System/Libraries |
155 |
|
156 |
%description -n %{lib_name} |
157 |
Libraries for %{name}. |
158 |
|
159 |
%files -n %{lib_name} |
160 |
%defattr(-,root,root,-) |
161 |
%{_libdir}/libabrt*.so.* |
162 |
|
163 |
#-------------------------------------------------------------------- |
164 |
|
165 |
%package -n %{lib_name_devel} |
166 |
Summary: Development libraries for %{name} |
167 |
Group: Development/C |
168 |
Requires: %{lib_name} = %{version}-%{release} |
169 |
Requires: abrt = %{version}-%{release} |
170 |
Obsoletes: %{_lib}abrt0-devel |
171 |
|
172 |
%description -n %{lib_name_devel} |
173 |
Development libraries and headers for %{name}. |
174 |
|
175 |
%files -n %{lib_name_devel} |
176 |
%defattr(-,root,root,-) |
177 |
%{_includedir}/abrt/* |
178 |
%{_libdir}/libabrt*.so |
179 |
#FIXME: this should go to libreportgtk-devel package |
180 |
%{_libdir}/pkgconfig/%{name}.pc |
181 |
|
182 |
#-------------------------------------------------------------------- |
183 |
|
184 |
%package gui |
185 |
Summary: %{name}'s gui |
186 |
Group: Graphical desktop/Other |
187 |
Requires: %{name} = %{version}-%{release} |
188 |
Requires: dbus-python, pygtk2.0, pygtk2.0-libglade |
189 |
Requires: python-gobject |
190 |
Requires: gnome-python-desktop |
191 |
|
192 |
%description gui |
193 |
GTK+ wizard for convenient bug reporting. |
194 |
|
195 |
%files gui |
196 |
%defattr(-,root,root,-) |
197 |
%{_bindir}/%{name}-gui |
198 |
%{_datadir}/%{name} |
199 |
%{_datadir}/applications/%{name}.desktop |
200 |
%{_datadir}/icons/hicolor/*/*/*.png |
201 |
%{_bindir}/%{name}-applet |
202 |
%{_sysconfdir}/xdg/autostart/%{name}-applet.desktop |
203 |
|
204 |
#-------------------------------------------------------------------- |
205 |
|
206 |
%package addon-ccpp |
207 |
Summary: %{name}'s C/C++ addon |
208 |
Group: System/Libraries |
209 |
Requires: elfutils |
210 |
Requires: %{name} = %{version}-%{release} |
211 |
|
212 |
%description addon-ccpp |
213 |
This package contains hook for C/C++ crashed programs and %{name}'s C/C++ |
214 |
analyzer plugin. |
215 |
|
216 |
%post addon-ccpp |
217 |
chown -R abrt:abrt %{_localstatedir}/cache/abrt-di |
218 |
#if [ $1 -eq 1 ]; then |
219 |
/sbin/chkconfig --add abrt-ccpp |
220 |
#fi |
221 |
|
222 |
%if %{?with_systemd} |
223 |
if [ "$1" -eq "0" ] ; then |
224 |
/bin/systemctl stop abrt-ccpp.service >/dev/null 2>&1 || : |
225 |
/bin/systemctl disable abrt-ccpp.service >/dev/null 2>&1 || : |
226 |
fi |
227 |
%endif |
228 |
|
229 |
%posttrans addon-ccpp |
230 |
service abrt-ccpp condrestart >/dev/null 2>&1 || : |
231 |
|
232 |
%preun addon-ccpp |
233 |
if [ "$1" -eq "0" ] ; then |
234 |
service abrt-ccpp stop >/dev/null 2>&1 |
235 |
/sbin/chkconfig --del abrt-ccpp |
236 |
fi |
237 |
|
238 |
#systemd (not tested): |
239 |
%if %{?with_systemd} |
240 |
if [ "$1" -eq "0" ] ; then |
241 |
/bin/systemctl stop abrt-ccpp.service >/dev/null 2>&1 || : |
242 |
/bin/systemctl disable abrt-ccpp.service >/dev/null 2>&1 || : |
243 |
fi |
244 |
%endif |
245 |
|
246 |
%files addon-ccpp |
247 |
%defattr(-,root,root,-) |
248 |
%config(noreplace) %{_sysconfdir}/%{name}/plugins/CCpp.conf |
249 |
%{_sysconfdir}/libreport/events.d/ccpp_event.conf |
250 |
%{_sysconfdir}/libreport/events.d/gconf_event.conf |
251 |
%{_sysconfdir}/libreport/events.d/vimrc_event.conf |
252 |
%{_sysconfdir}/libreport/events/analyze_LocalGDB.xml |
253 |
%{_sysconfdir}/libreport/events/collect_xsession_errors.xml |
254 |
%{_sysconfdir}/libreport/events/collect_Smolt.xml |
255 |
%{_sysconfdir}/libreport/events/collect_GConf.xml |
256 |
%{_sysconfdir}/libreport/events/collect_vimrc_user.xml |
257 |
%{_sysconfdir}/libreport/events/collect_vimrc_system.xml |
258 |
%dir %attr(0775, abrt, abrt) %{_localstatedir}/cache/abrt-di |
259 |
%{_initrddir}/abrt-ccpp |
260 |
%{_libdir}/abrt-hook-ccpp |
261 |
%{_sysconfdir}/profile.d/00abrt.* |
262 |
%{_bindir}/abrt-action-analyze-c |
263 |
%{_bindir}/abrt-action-trim-files |
264 |
%attr(2755, abrt, abrt) %{_bindir}/abrt-action-install-debuginfo |
265 |
%{_bindir}/abrt-action-generate-backtrace |
266 |
%{_bindir}/abrt-action-analyze-backtrace |
267 |
%{_mandir}/man*/abrt-action-trim-files.* |
268 |
%{_mandir}/man*/abrt-action-generate-backtrace.* |
269 |
%{_mandir}/man*/abrt-action-analyze-backtrace.* |
270 |
|
271 |
#-------------------------------------------------------------------- |
272 |
|
273 |
%package addon-kerneloops |
274 |
Summary: %{name}'s kerneloops addon |
275 |
Group: System/Libraries |
276 |
Requires: curl |
277 |
Requires: %{name} = %{version}-%{release} |
278 |
#Obsoletes: kerneloops |
279 |
|
280 |
%description addon-kerneloops |
281 |
This package contains plugin for collecting kernel crash information |
282 |
and reporter plugin which sends this information to specified server, |
283 |
usually to kerneloops.org. |
284 |
|
285 |
%post addon-kerneloops |
286 |
if [ $1 -eq 1 ]; then |
287 |
/sbin/chkconfig --add abrt-oops |
288 |
fi |
289 |
|
290 |
%posttrans addon-kerneloops |
291 |
service abrt-oops condrestart >/dev/null 2>&1 || : |
292 |
|
293 |
%preun addon-kerneloops |
294 |
if [ "$1" -eq "0" ] ; then |
295 |
service abrt-oops stop >/dev/null 2>&1 |
296 |
/sbin/chkconfig --del abrt-oops |
297 |
fi |
298 |
#systemd (not tested): |
299 |
%if %{?with_systemd} |
300 |
if [ "$1" -eq "0" ] ; then |
301 |
/bin/systemctl stop abrt-oops.service >/dev/null 2>&1 || : |
302 |
/bin/systemctl disable abrt-oops.service >/dev/null 2>&1 || : |
303 |
fi |
304 |
%endif |
305 |
|
306 |
%files addon-kerneloops |
307 |
%defattr(-,root,root,-) |
308 |
%{_initrddir}/abrt-oops |
309 |
%{_bindir}/abrt-dump-oops |
310 |
%{_bindir}/abrt-action-analyze-oops |
311 |
|
312 |
#-------------------------------------------------------------------- |
313 |
|
314 |
%package addon-python |
315 |
Summary: %{name}'s addon for catching and analyzing Python exceptions |
316 |
Group: System/Libraries |
317 |
Requires: %{name} = %{version}-%{release} |
318 |
|
319 |
%description addon-python |
320 |
This package contains python hook and python analyzer plugin for handling |
321 |
uncaught exception in python programs. |
322 |
|
323 |
%files addon-python |
324 |
%defattr(-,root,root,-) |
325 |
%config(noreplace) %{_sysconfdir}/%{name}/plugins/python.conf |
326 |
%{_sysconfdir}/libreport/events.d/python_event.conf |
327 |
%{_bindir}/abrt-action-analyze-python |
328 |
%{_mandir}/man1/abrt-action-analyze-python.1* |
329 |
%{py_puresitedir}/abrt*.py* |
330 |
%{py_puresitedir}/*.pth |
331 |
|
332 |
#-------------------------------------------------------------------- |
333 |
|
334 |
%package cli |
335 |
Summary: %{name}'s command line interface |
336 |
Group: Graphical desktop/Other |
337 |
Requires: %{name} = %{version}-%{release} |
338 |
Requires: %{name}-addon-kerneloops |
339 |
Requires: %{name}-addon-ccpp, %{name}-addon-python |
340 |
Requires: %{name}-plugin-bugzilla, %{name}-plugin-logger |
341 |
|
342 |
%description cli |
343 |
This package contains simple command line client for controlling abrt |
344 |
daemon over the sockets. |
345 |
|
346 |
%files cli |
347 |
%defattr(-,root,root,-) |
348 |
%{_bindir}/abrt-cli |
349 |
|
350 |
#-------------------------------------------------------------------- |
351 |
|
352 |
%package desktop |
353 |
Summary: Virtual package to install all necessary packages for usage from desktop environment |
354 |
Group: Graphical desktop/Other |
355 |
# This package gets installed when anything requests bug-buddy - |
356 |
# happens when users upgrade Fn to Fn+1; |
357 |
# or if user just wants "typical desktop installation". |
358 |
# Installing abrt-desktop should result in the abrt which works without |
359 |
# any tweaking in abrt.conf (IOW: all plugins mentioned there must be installed) |
360 |
Requires: %{name} = %{version}-%{release} |
361 |
Requires: %{name}-addon-kerneloops |
362 |
Requires: %{name}-addon-ccpp, %{name}-addon-python |
363 |
# Default config of addon-ccpp requires gdb |
364 |
Requires: gdb >= 7.0-3 |
365 |
Requires: %{name}-gui |
366 |
Requires: %{name}-plugin-logger, %{name}-plugin-bugzilla |
367 |
#Obsoletes: bug-buddy |
368 |
#Provides: bug-buddy |
369 |
|
370 |
%description desktop |
371 |
Virtual package to make easy default installation on desktop environments. |
372 |
|
373 |
%files desktop |
374 |
%defattr(-,root,root,-) |
375 |
|
376 |
#-------------------------------------------------------------------- |
377 |
%if 0 |
378 |
%package retrace-server |
379 |
Summary: %{name}'s retrace server using HTTP protocol |
380 |
Group: Graphical desktop/Other |
381 |
Requires: abrt-addon-ccpp |
382 |
Requires: gdb >= 7.0-3 |
383 |
Requires: apache-mod_wsgi, apache-mod_ssl, python-webob |
384 |
Requires: mock, xz, elfutils, createrepo |
385 |
Requires(preun): /sbin/install-info |
386 |
Requires(post): /sbin/install-info |
387 |
|
388 |
%post retrace-server |
389 |
/sbin/install-info %{_infodir}/abrt-retrace-server %{_infodir}/dir 2> /dev/null || : |
390 |
/usr/sbin/usermod -G mock apache 2> /dev/null || : |
391 |
|
392 |
%preun retrace-server |
393 |
if [ "$1" = 0 ]; then |
394 |
/sbin/install-info --delete %{_infodir}/abrt-retrace-server %{_infodir}/dir 2> /dev/null || : |
395 |
fi |
396 |
|
397 |
%description retrace-server |
398 |
The retrace server provides a coredump analysis and backtrace |
399 |
generation service over a network using HTTP protocol. |
400 |
|
401 |
%files retrace-server |
402 |
%defattr(-,root,root,-) |
403 |
%config(noreplace) %{_sysconfdir}/%{name}/retrace.conf |
404 |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/retrace_httpd.conf |
405 |
%config(noreplace) %{_sysconfdir}/yum.repos.d/retrace.repo |
406 |
%dir %attr(0775, apache, abrt) %{_localstatedir}/spool/abrt-retrace |
407 |
%dir %attr(0755, abrt, abrt) %{_localstatedir}/cache/abrt-retrace |
408 |
%dir %attr(0755, abrt, abrt) %{_localstatedir}/log/abrt-retrace |
409 |
%caps(cap_setuid=ep) %{_bindir}/abrt-retrace-worker |
410 |
%{_bindir}/abrt-retrace-cleanup |
411 |
%{_bindir}/abrt-retrace-reposync |
412 |
%{_bindir}/coredump2packages |
413 |
%{py_puresitedir}/retrace.py* |
414 |
%{_datadir}/abrt-retrace/*.py* |
415 |
%{_datadir}/abrt-retrace/*.wsgi |
416 |
%{_datadir}/abrt-retrace/plugins/*.py* |
417 |
%{_infodir}/abrt-retrace-server* |
418 |
%endif |
419 |
#-------------------------------------------------------------------- |
420 |
|
421 |
%prep |
422 |
%setup -q |
423 |
%apply_patches |
424 |
# (tv)) disable -Werror: |
425 |
perl -pi -e 's!-Werror!-Wno-deprecated!' configure{.ac,} */*/Makefile* |
426 |
|
427 |
%build |
428 |
NOCONFIGURE=yes gnome-autogen.sh |
429 |
%configure2_5x \ |
430 |
%if !%{with_systemd} |
431 |
--without-systemdsystemunitdir \ |
432 |
%endif |
433 |
--disable-rpath |
434 |
%make |
435 |
|
436 |
%install |
437 |
%makeinstall_std |
438 |
%find_lang %{name} |
439 |
|
440 |
# remove all .la and .a files |
441 |
find %{buildroot} -name '*.la' -or -name '*.a' | xargs rm -f |
442 |
mkdir -p %{buildroot}/%{_initrddir} |
443 |
install -m 755 %SOURCE1 %{buildroot}/%{_initrddir}/%{name}d |
444 |
install -m 755 %SOURCE5 %{buildroot}/%{_initrddir}/%{name}-ccpp |
445 |
install -m 755 %SOURCE6 %{buildroot}/%{_initrddir}/%{name}-oops |
446 |
mkdir -p %{buildroot}/var/cache/%{name}-di |
447 |
mkdir -p %{buildroot}/var/run/%{name} |
448 |
mkdir -p %{buildroot}/var/spool/%{name} |
449 |
mkdir -p %{buildroot}/var/spool/%{name}-retrace |
450 |
mkdir -p %{buildroot}/var/cache/%{name}-retrace |
451 |
mkdir -p %{buildroot}/var/log/%{name}-retrace |
452 |
mkdir -p %{buildroot}/var/spool/%{name}-upload |
453 |
|
454 |
sed -i 's!@libexec@!%_libdir!' %{buildroot}/%{_initrddir}/%{name}-ccpp |
455 |
|
456 |
# remove fedora gpg key |
457 |
rm -f %{buildroot}%{_sysconfdir}/abrt/gpg_keys |
458 |
touch %{buildroot}%{_sysconfdir}/abrt/gpg_keys |
459 |
|
460 |
# install ulimit disabler |
461 |
mkdir -p %{buildroot}%{_sysconfdir}/profile.d/ |
462 |
install -m755 %SOURCE2 %SOURCE3 %{buildroot}%{_sysconfdir}/profile.d/ |
463 |
|
464 |
desktop-file-install \ |
465 |
--dir %{buildroot}%{_sysconfdir}/xdg/autostart \ |
466 |
src/applet/%{name}-applet.desktop |
467 |
|
468 |
# replace with our own version |
469 |
cat %{SOURCE4} > %{buildroot}/usr/bin/%{name}-debuginfo-install |
470 |
|
471 |
#remove RH specific plugins |
472 |
rm -f %{buildroot}%{_libdir}/%{name}/{RHTSupport.glade,libRHTSupport.so} |
473 |
rm -f %{buildroot}%{_sysconfdir}/%{name}/plugins/RHTSupport.conf |
474 |
rm -f %{buildroot}%{_sysconfdir}/%{name}/events.d/rhtsupport_events.conf |
475 |
rm -f %{buildroot}%{_sysconfdir}/%{name}/events/report_RHTSupport.xml |
476 |
rm -f %{buildroot}%{_bindir}/%{name}-action-rhtsupport |
477 |
|
478 |
# After everything is installed, remove info dir |
479 |
rm -f %{buildroot}%{_infodir}/dir |