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