1 |
# (blino) FIXME: switch back to 1 when systemd is installable |
2 |
%define with_systemd 0 |
3 |
|
4 |
%define lib_major 0 |
5 |
%define lib_name %mklibname %{name} %{lib_major} |
6 |
%define lib_name_devel %mklibname %{name} -d |
7 |
|
8 |
Summary: Automatic bug detection and reporting tool |
9 |
Name: abrt |
10 |
Version: 1.1.14 |
11 |
Release: %mkrel 9 |
12 |
License: GPLv2+ |
13 |
Group: System/Base |
14 |
URL: https://fedorahosted.org/abrt/ |
15 |
Source: https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz |
16 |
Source1: abrt.init |
17 |
Source2: 00abrt.sh |
18 |
Source3: 00abrt.csh |
19 |
Source4: abrt-debuginfo-install |
20 |
# (fc) fix format security error |
21 |
# (misc) sent upstream https://fedorahosted.org/abrt/attachment/ticket/120 |
22 |
Patch0: abrt-1.1.14-format_security.patch |
23 |
# (fc) fix build with rpm 4.6 |
24 |
Patch1: abrt-1.0.8-rpm46.patch |
25 |
# (fc) disable package signature check |
26 |
Patch2: abrt_disable_gpgcheck.diff |
27 |
# (blino) use Mageia bugzilla (adapted from Mandriva patch from fcrozat) |
28 |
# FIXME: check the query is still correct when bugzilla is deployed |
29 |
Patch3: abrt-mageiabugzilla.patch |
30 |
# (pt) generate stacktrace twice to get missing -debug packages |
31 |
Patch5: abrt-1.1.14-debug.patch |
32 |
# (blino) parse /etc/release (adapted from Mandriva patch from fcrozat) |
33 |
# FIXME: check the parsing is ok |
34 |
Patch6: abrt-1.1.13-mageia-release.patch |
35 |
# (fc) disable nspluginwrapper-i386 (Mdv bug #59237) |
36 |
Patch7: abrt-1.1.13-nspluginwrapper.patch |
37 |
# (fc) fix for non UTF-8 locale |
38 |
Patch8: abrt-1.1.1-nonutf8-locale.patch |
39 |
Patch10: abrt-1.1.14-link.patch |
40 |
# (proyvind): port to rpm5 api |
41 |
Patch11: abrt-1.1.14-rpm5.patch |
42 |
# (eugeni): disable kernel oops cron plugin by default (mdv #61986) |
43 |
Patch12: abrt-1.1.14-disable_oops_scanner.patch |
44 |
BuildRequires: dbus-devel |
45 |
BuildRequires: gtk2-devel |
46 |
BuildRequires: curl-devel |
47 |
BuildRequires: rpm-devel |
48 |
BuildRequires: sqlite-devel > 3.0 |
49 |
BuildRequires: desktop-file-utils |
50 |
#BuildRequires: nss-devel |
51 |
BuildRequires: libnotify-devel |
52 |
BuildRequires: xmlrpc-c-devel |
53 |
BuildRequires: xmlrpc-c |
54 |
BuildRequires: file-devel |
55 |
BuildRequires: python-devel |
56 |
BuildRequires: gettext |
57 |
BuildRequires: polkit-1-devel |
58 |
BuildRequires: libzip-devel, libtar-devel, bzip2-devel, zlib-devel |
59 |
BuildRequires: intltool |
60 |
BuildRequires: gnome-common |
61 |
BuildRequires: bison |
62 |
%if %{?with_systemd} |
63 |
Requires: systemd-units |
64 |
BuildRequires: systemd-units |
65 |
%endif |
66 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
67 |
Requires: %{lib_name} >= %{version}-%{release} |
68 |
Requires(pre): rpm-helper |
69 |
Requires(post): rpm-helper |
70 |
Requires(preun): rpm-helper |
71 |
Requires(postun): rpm-helper |
72 |
Obsoletes: plugin-catcut < 1.1.13 |
73 |
|
74 |
%description |
75 |
%{name} is a tool to help users to detect defects in applications and |
76 |
to create a bug report with all informations needed by maintainer to fix it. |
77 |
It uses plugin system to extend its functionality. |
78 |
|
79 |
%package -n %{lib_name} |
80 |
Summary: Libraries for %{name} |
81 |
Group: System/Libraries |
82 |
|
83 |
%description -n %{lib_name} |
84 |
Libraries for %{name}. |
85 |
|
86 |
%package -n %{lib_name_devel} |
87 |
Summary: Development libraries for %{name} |
88 |
Group: Development/C |
89 |
Requires: %{lib_name} = %{version}-%{release} |
90 |
Requires: abrt = %{version}-%{release} |
91 |
Obsoletes: %{_lib}abrt0-devel |
92 |
|
93 |
%description -n %{lib_name_devel} |
94 |
Development libraries and headers for %{name}. |
95 |
|
96 |
%package gui |
97 |
Summary: %{name}'s gui |
98 |
Group: Graphical desktop/Other |
99 |
Requires: %{name} = %{version}-%{release} |
100 |
Requires: dbus-python, pygtk2.0, pygtk2.0-libglade |
101 |
Requires: python-gobject |
102 |
Requires: gnome-python-desktop |
103 |
|
104 |
%description gui |
105 |
GTK+ wizard for convenient bug reporting. |
106 |
|
107 |
%package addon-ccpp |
108 |
Summary: %{name}'s C/C++ addon |
109 |
Group: System/Libraries |
110 |
Requires: elfutils |
111 |
Requires: %{name} = %{version}-%{release} |
112 |
|
113 |
%description addon-ccpp |
114 |
This package contains hook for C/C++ crashed programs and %{name}'s C/C++ |
115 |
analyzer plugin. |
116 |
|
117 |
%package addon-kerneloops |
118 |
Summary: %{name}'s kerneloops addon |
119 |
Group: System/Libraries |
120 |
Requires: curl |
121 |
Requires: %{name} = %{version}-%{release} |
122 |
#Obsoletes: kerneloops |
123 |
|
124 |
%description addon-kerneloops |
125 |
This package contains plugin for collecting kernel crash information |
126 |
and reporter plugin which sends this information to specified server, |
127 |
usually to kerneloops.org. |
128 |
|
129 |
%package plugin-logger |
130 |
Summary: %{name}'s logger reporter plugin |
131 |
Group: System/Libraries |
132 |
Requires: %{name} = %{version}-%{release} |
133 |
|
134 |
%description plugin-logger |
135 |
The simple reporter plugin which writes a report to a specified file. |
136 |
|
137 |
%package plugin-mailx |
138 |
Summary: %{name}'s mailx reporter plugin |
139 |
Group: System/Libraries |
140 |
Requires: %{name} = %{version}-%{release} |
141 |
Requires: mailx |
142 |
|
143 |
%description plugin-mailx |
144 |
The simple reporter plugin which sends a report via mailx to a specified |
145 |
email address. |
146 |
|
147 |
%package plugin-runapp |
148 |
Summary: %{name}'s runapp plugin |
149 |
Group: System/Libraries |
150 |
Requires: %{name} = %{version}-%{release} |
151 |
|
152 |
%description plugin-runapp |
153 |
Plugin to run external programs. |
154 |
|
155 |
%package plugin-sosreport |
156 |
Summary: %{name}'s sosreport plugin |
157 |
Group: System/Libraries |
158 |
Requires: sos |
159 |
Requires: %{name} = %{version}-%{release} |
160 |
|
161 |
%description plugin-sosreport |
162 |
Plugin to include an sosreport in an abrt report. |
163 |
|
164 |
%package plugin-bugzilla |
165 |
Summary: %{name}'s bugzilla plugin |
166 |
Group: System/Libraries |
167 |
Requires: %{name} = %{version}-%{release} |
168 |
|
169 |
%description plugin-bugzilla |
170 |
Plugin to report bugs into the bugzilla. |
171 |
|
172 |
##%package plugin-catcut |
173 |
#Summary: %{name}'s catcut plugin |
174 |
#Group: System/Libraries |
175 |
#Requires: %{name} = %{version}-%{release} |
176 |
|
177 |
##%description plugin-catcut |
178 |
#Plugin to report bugs into the catcut. |
179 |
|
180 |
%package plugin-reportuploader |
181 |
Summary: %{name}'s ticketuploader plugin |
182 |
Group: System/Libraries |
183 |
Requires: %{name} = %{version}-%{release} |
184 |
Obsoletes: plugin-ticketuploader < 1.1.13 |
185 |
Provides: plugin-ticketuploader = %{version}-%{release} |
186 |
|
187 |
%description plugin-reportuploader |
188 |
Plugin to report bugs into anonymous FTP site associated with ticketing system. |
189 |
|
190 |
%package plugin-filetransfer |
191 |
Summary: %{name}'s File Transfer plugin |
192 |
Group: System/Libraries |
193 |
Requires: %{name} = %{version}-%{release} |
194 |
|
195 |
%description plugin-filetransfer |
196 |
Plugin to uploading files to a server. |
197 |
|
198 |
%package addon-python |
199 |
Summary: %{name}'s addon for catching and analyzing Python exceptions |
200 |
Group: System/Libraries |
201 |
Requires: %{name} = %{version}-%{release} |
202 |
|
203 |
%description addon-python |
204 |
This package contains python hook and python analyzer plugin for handling |
205 |
uncaught exception in python programs. |
206 |
|
207 |
%package cli |
208 |
Summary: %{name}'s command line interface |
209 |
Group: Graphical desktop/Other |
210 |
Requires: %{name} = %{version}-%{release} |
211 |
Requires: %{name}-addon-kerneloops |
212 |
Requires: %{name}-addon-ccpp, %{name}-addon-python |
213 |
Requires: %{name}-plugin-bugzilla, %{name}-plugin-logger, %{name}-plugin-runapp |
214 |
|
215 |
%description cli |
216 |
This package contains simple command line client for controlling abrt |
217 |
daemon over the sockets. |
218 |
|
219 |
%package desktop |
220 |
Summary: Virtual package to install all necessary packages for usage from desktop environment |
221 |
Group: Graphical desktop/Other |
222 |
# This package gets installed when anything requests bug-buddy - |
223 |
# happens when users upgrade Fn to Fn+1; |
224 |
# or if user just wants "typical desktop installation". |
225 |
# Installing abrt-desktop should result in the abrt which works without |
226 |
# any tweaking in abrt.conf (IOW: all plugins mentioned there must be installed) |
227 |
Requires: %{name} = %{version}-%{release} |
228 |
Requires: %{name}-addon-kerneloops |
229 |
Requires: %{name}-addon-ccpp, %{name}-addon-python |
230 |
# Default config of addon-ccpp requires gdb |
231 |
Requires: gdb >= 7.0-3 |
232 |
Requires: %{name}-gui |
233 |
Requires: %{name}-plugin-logger, %{name}-plugin-bugzilla, %{name}-plugin-runapp |
234 |
#Obsoletes: bug-buddy |
235 |
#Provides: bug-buddy |
236 |
|
237 |
%description desktop |
238 |
Virtual package to make easy default installation on desktop environments. |
239 |
|
240 |
%prep |
241 |
%setup -q |
242 |
%patch0 -p1 -b .format_security |
243 |
%patch1 -p1 -b .rpm46 |
244 |
%patch2 -p1 -b .disable_signature_check |
245 |
%patch3 -p0 -b .mgabugzilla |
246 |
%patch5 -p0 -b .debug |
247 |
%patch6 -p0 -b .mageia-release |
248 |
%patch7 -p0 -b .nspluginwrapper |
249 |
%patch8 -p1 -b .nonutf8-locale |
250 |
%patch10 -p0 -b .link |
251 |
#patch11 -p1 -b .rpm5~ |
252 |
%patch12 -p1 -b .disable_oops_scanner |
253 |
|
254 |
%build |
255 |
NOCONFIGURE=yes gnome-autogen.sh |
256 |
%configure2_5x --disable-rpath |
257 |
%make |
258 |
|
259 |
%install |
260 |
rm -rf %{buildroot} |
261 |
%makeinstall_std |
262 |
%find_lang %{name} |
263 |
|
264 |
#rm -rf %{buildroot}/%{_libdir}/lib*.la |
265 |
#rm -rf %{buildroot}/%{_libdir}/%{name}/lib*.la |
266 |
# remove all .la and .a files |
267 |
find %{buildroot} -name '*.la' -or -name '*.a' | xargs rm -f |
268 |
mkdir -p %{buildroot}/%{_initrddir} |
269 |
install -m 755 %SOURCE1 %{buildroot}/%{_initrddir}/abrtd |
270 |
mkdir -p %{buildroot}/var/cache/%{name} |
271 |
mkdir -p %{buildroot}/var/cache/%{name}-di |
272 |
mkdir -p %{buildroot}/var/run/%{name} |
273 |
# remove fedora gpg key |
274 |
rm -f %{buildroot}%{_sysconfdir}/abrt/gpg_keys |
275 |
touch %{buildroot}%{_sysconfdir}/abrt/gpg_keys |
276 |
|
277 |
# install ulimit disabler |
278 |
mkdir -p %{buildroot}%{_sysconfdir}/profile.d/ |
279 |
install -m755 %SOURCE2 %SOURCE3 %{buildroot}%{_sysconfdir}/profile.d/ |
280 |
|
281 |
desktop-file-install \ |
282 |
--dir %{buildroot}%{_sysconfdir}/xdg/autostart \ |
283 |
src/Applet/%{name}-applet.desktop |
284 |
|
285 |
# replace with our own version |
286 |
cat %{SOURCE4} > %{buildroot}/usr/bin/%{name}-debuginfo-install |
287 |
|
288 |
#remove RH specific plugins |
289 |
rm -f %{buildroot}%{_libdir}/%{name}/{RHTSupport.glade,libRHTSupport.so} |
290 |
rm -f %{buildroot}%{_sysconfdir}/%{name}/plugins/RHTSupport.conf |
291 |
|
292 |
|
293 |
%clean |
294 |
rm -rf %{buildroot} |
295 |
|
296 |
%pre |
297 |
%_pre_useradd %{name} %{_sysconfdir}/%{name} /bin/nologin |
298 |
%_pre_groupadd %{name} %{name} |
299 |
|
300 |
%post |
301 |
%_post_service %{name}d |
302 |
%if %{?with_systemd} |
303 |
# Enable (but don't start) the units by default |
304 |
/bin/systemctl enable %{name}d.service >/dev/null 2>&1 || : |
305 |
%endif |
306 |
|
307 |
|
308 |
%preun |
309 |
%_preun_service %{name}d |
310 |
%if %{?with_systemd} |
311 |
if [ "$1" -eq "0" ] ; then |
312 |
/bin/systemctl stop %{name}d.service >/dev/null 2>&1 || : |
313 |
/bin/systemctl disable %{name}d.service >/dev/null 2>&1 || : |
314 |
fi |
315 |
%endif |
316 |
|
317 |
|
318 |
%postun |
319 |
%_postun_userdel %{name} |
320 |
%_postun_groupdel %{name} %{name} |
321 |
%if %{?with_systemd} |
322 |
if [ $1 -ge 1 ] ; then |
323 |
# On upgrade, reload init system configuration if we changed unit files |
324 |
/bin/systemctl daemon-reload >/dev/null 2>&1 || : |
325 |
fi |
326 |
%endif |
327 |
|
328 |
|
329 |
%files -f %{name}.lang |
330 |
%defattr(-,root,root,-) |
331 |
%doc README COPYING |
332 |
#systemd |
333 |
%if %{?with_systemd} |
334 |
/lib/systemd/system/%{name}d.service |
335 |
%endif |
336 |
%{_sbindir}/%{name}d |
337 |
%{_bindir}/%{name}-debuginfo-install |
338 |
%{_bindir}/%{name}-backtrace |
339 |
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf |
340 |
%config(noreplace) %{_sysconfdir}/%{name}/gpg_keys |
341 |
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/dbus-%{name}.conf |
342 |
%{_initrddir}/%{name}d |
343 |
%dir %attr(0755, %{name}, %{name}) %{_localstatedir}/cache/%{name} |
344 |
%dir /var/run/%{name} |
345 |
%dir %{_sysconfdir}/%{name} |
346 |
%dir %{_sysconfdir}/%{name}/plugins |
347 |
%dir %{_libdir}/%{name} |
348 |
%{_mandir}/man1/%{name}-backtrace.1.* |
349 |
%{_mandir}/man8/abrtd.8.* |
350 |
%{_mandir}/man5/%{name}.conf.5.* |
351 |
#%{_mandir}/man5/pyhook.conf.5.* |
352 |
%{_mandir}/man7/%{name}-plugins.7.* |
353 |
%{_datadir}/polkit-1/actions/org.fedoraproject.abrt.policy |
354 |
%{_datadir}/dbus-1/system-services/com.redhat.abrt.service |
355 |
%config(noreplace) %{_sysconfdir}/%{name}/plugins/SQLite3.conf |
356 |
%{_libdir}/%{name}/libSQLite3.so* |
357 |
%{_mandir}/man7/%{name}-SQLite3.7.* |
358 |
|
359 |
%files -n %{lib_name} |
360 |
%defattr(-,root,root,-) |
361 |
%{_libdir}/lib*.so.* |
362 |
|
363 |
%files -n %{lib_name_devel} |
364 |
%defattr(-,root,root,-) |
365 |
%{_libdir}/lib*.so |
366 |
%{_includedir}/%{name}/*.h |
367 |
%{_libdir}/pkgconfig/%{name}.pc |
368 |
|
369 |
%files gui |
370 |
%defattr(-,root,root,-) |
371 |
%{_bindir}/%{name}-gui |
372 |
%{_datadir}/%{name} |
373 |
%{_datadir}/applications/%{name}.desktop |
374 |
%{_datadir}/icons/hicolor/*/*/*.png |
375 |
%{_bindir}/%{name}-applet |
376 |
%{_sysconfdir}/xdg/autostart/%{name}-applet.desktop |
377 |
|
378 |
%files addon-ccpp |
379 |
%defattr(-,root,root,-) |
380 |
%config(noreplace) %{_sysconfdir}/%{name}/plugins/CCpp.conf |
381 |
%dir %{_localstatedir}/cache/%{name}-di |
382 |
%{_libdir}/%{name}/libCCpp.so* |
383 |
%{_libexecdir}/abrt-hook-ccpp |
384 |
%{_sysconfdir}/profile.d/00abrt.* |
385 |
|
386 |
%files addon-kerneloops |
387 |
%defattr(-,root,root,-) |
388 |
%config(noreplace) %{_sysconfdir}/%{name}/plugins/Kerneloops.conf |
389 |
%{_bindir}/dumpoops |
390 |
%{_libdir}/%{name}/libKerneloops.so* |
391 |
%{_libdir}/%{name}/libKerneloopsScanner.so* |
392 |
%{_mandir}/man7/%{name}-KerneloopsScanner.7.* |
393 |
%{_libdir}/%{name}/libKerneloopsReporter.so* |
394 |
%{_libdir}/%{name}/KerneloopsReporter.glade |
395 |
%{_mandir}/man7/%{name}-KerneloopsReporter.7.* |
396 |
|
397 |
%files plugin-logger |
398 |
%defattr(-,root,root,-) |
399 |
%config(noreplace) %{_sysconfdir}/%{name}/plugins/Logger.conf |
400 |
%{_libdir}/%{name}/libLogger.so* |
401 |
%{_libdir}/%{name}/Logger.glade |
402 |
%{_mandir}/man7/%{name}-Logger.7.* |
403 |
|
404 |
%files plugin-mailx |
405 |
%defattr(-,root,root,-) |
406 |
%config(noreplace) %{_sysconfdir}/%{name}/plugins/Mailx.conf |
407 |
%{_libdir}/%{name}/libMailx.so* |
408 |
%{_libdir}/%{name}/Mailx.glade |
409 |
%{_mandir}/man7/%{name}-Mailx.7.* |
410 |
|
411 |
%files plugin-runapp |
412 |
%defattr(-,root,root,-) |
413 |
%{_libdir}/%{name}/libRunApp.so* |
414 |
%{_mandir}/man7/%{name}-RunApp.7.* |
415 |
|
416 |
%files plugin-sosreport |
417 |
%defattr(-,root,root,-) |
418 |
%config(noreplace) %{_sysconfdir}/%{name}/plugins/SOSreport.conf |
419 |
%{_libdir}/%{name}/libSOSreport.so* |
420 |
|
421 |
|
422 |
%files plugin-bugzilla |
423 |
%defattr(-,root,root,-) |
424 |
%config(noreplace) %{_sysconfdir}/%{name}/plugins/Bugzilla.conf |
425 |
%{_libdir}/%{name}/libBugzilla.so* |
426 |
%{_libdir}/%{name}/Bugzilla.glade |
427 |
%{_mandir}/man7/%{name}-Bugzilla.7.* |
428 |
|
429 |
##%files plugin-catcut |
430 |
#%defattr(-,root,root,-) |
431 |
#%config(noreplace) %{_sysconfdir}/%{name}/plugins/Catcut.conf |
432 |
#%{_libdir}/%{name}/libCatcut.so* |
433 |
#%{_libdir}/%{name}/Catcut.GTKBuilder |
434 |
#%{_mandir}/man7/%{name}-Catcut.7.* |
435 |
|
436 |
%files plugin-reportuploader |
437 |
%defattr(-,root,root,-) |
438 |
%config(noreplace) %{_sysconfdir}/%{name}/plugins/ReportUploader.conf |
439 |
%{_bindir}/%{name}-handle-upload |
440 |
%{_libdir}/%{name}/libReportUploader.so* |
441 |
%{_libdir}/%{name}/ReportUploader.glade |
442 |
%{_mandir}/man7/%{name}-ReportUploader.7.* |
443 |
|
444 |
%files plugin-filetransfer |
445 |
%defattr(-,root,root,-) |
446 |
%config(noreplace) %{_sysconfdir}/%{name}/plugins/FileTransfer.conf |
447 |
%{_libdir}/%{name}/libFileTransfer.so* |
448 |
%{_mandir}/man7/%{name}-FileTransfer.7.* |
449 |
|
450 |
%files addon-python |
451 |
%defattr(-,root,root,-) |
452 |
%config(noreplace) %{_sysconfdir}/%{name}/plugins/Python.conf |
453 |
#%attr(4755, abrt, abrt) %{_libexecdir}/abrt-hook-python |
454 |
%{_libdir}/%{name}/libPython.so* |
455 |
%{py_puresitedir}/*.py* |
456 |
%{py_puresitedir}/*.pth |
457 |
|
458 |
|
459 |
%files cli |
460 |
%defattr(-,root,root,-) |
461 |
%{_bindir}/abrt-cli |
462 |
%{_mandir}/man1/abrt-cli.1.* |
463 |
%{_sysconfdir}/bash_completion.d/abrt-cli.bash |
464 |
|
465 |
%files desktop |
466 |
%defattr(-,root,root,-) |
467 |
|
468 |
|
469 |
|