~ubuntu-core-dev/ubuntu/maverick/apport/ubuntu

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
#
# spec file for package apport
#
# Copyright (c) 2007-2008 Nikolay Derkach <nderkach@gmail.com>
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:    apport
Version: 0.114
Release: 0
License: GPL
URL:     http://opensuse.org/Interactive_Crash_Analysis
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel intltool texlive-latex
# Need the ability to use pipes in /proc/sys/kernel/core_pattern
Requires: kernel-default >= 2.6.24
# FIXME there's probably scads more requires here, need to do some testing
# on a minimal system
Requires: rpm-python cron
#probably we can remove it later
Requires: lsb
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Requires(postun): /sbin/service
Source0: %{name}-%{version}.tar.bz2
Group: System/Monitoring
Summary: Automatic crash handler

%description
Apport automatically collects data from crashed processes and compiles a
problem report in /var/crash/.

See http://opensuse.org/Interactive_Crash_Analysis for more information.

%package gtk
Summary: GTK frontend for the apport crash report system
Group: Applications/System
Requires: python-gtk procps
%description gtk
apport automatically collects data from crashed processes and compiles a
problem report in /var/crash/. 

This package provides a GTK frontend for browsing and handling the
crash reports.

%package qt
Summary: Qt4 frontend for the apport crash report system
Group: Applications/System
Requires: python-qt4 procps
%description qt
apport automatically collects data from crashed processes and compiles a
problem report in /var/crash/.

This package provides a Qt4 frontend for browsing and handling the
crash reports.

%prep
%setup -n apport-%{version}

%build
python setup.py build
make -C po
make -C gtk
make -C qt4
make -C doc
# set up the packaging backend
cp backends/packaging_rpm.py apport
cp backends/packaging_opensuse.py apport/packaging_impl.py

%install
python setup.py install --root=%{buildroot} --prefix=/usr
%find_lang %{name}

# install init script 
%__install -d -m755 %{buildroot}/etc/init.d 
%__install -m755 apport.init.opensuse %{buildroot}/etc/init.d/apport

# install man pages
%__install -d -m755 %{buildroot}%{_mandir}/man1
%__install -m644 man/apport-{cli,unpack}.1 %{buildroot}%{_mandir}/man1

# cron job
%__install -d -m755 %{buildroot}/etc/cron.daily
%__install -m755 debian/apport.cron.daily %{buildroot}/etc/cron.daily/apport

# make soft links so that apport Qt and GTK reports tools are in $PATH
ln -s %{buildroot}/usr/share/apport/apport-gtk %{buildroot}/usr/bin/apport-gtk
ln -s %{buildroot}/usr/share/apport/apport-qt %{buildroot}/usr/bin/apport-qt

# rm unneeded files
%__rm -f %{buildroot}/usr/bin/{apport-chroot,apport-retrace}
%__rm -f %{buildroot}/usr/share/apport/general-hooks/automatix.py
%__rm -rf %{buildroot}/usr/share/apport/testsuite/
%__rm -f %{buildroot}/usr/bin/*_hook
# We'll handle the docs in the %files section
%__rm -rf %{buildroot}/usr/share/doc/apport                      

%clean
%__rm -rf %{buildroot}

%post
# Add proper symlinks in /etc/init.d/rc*.d
/sbin/chkconfig --add apport
# start apport service
/sbin/service apport start

%preun
# Really uninstalling? Stop the service and remove its links
if [ "$1" == "0" ]; then
    %stop_on_removal apport
    /sbin/chkconfig --del apport
fi

%postun
# Upgrading? Restart the service, if it's running
if [ "$1" -ge "1" ]; then
    %restart_on_update apport
    %insserv_cleanup
fi

%files -f %{name}.lang
%defattr(-,root,root)
/usr/share/apport/apport
/usr/bin/dupdb-admin
/usr/bin/apport-cli
/usr/bin/apport-checkreports
/usr/bin/apport-unpack
%doc %{_mandir}/man1/apport-cli.1.gz
%doc %{_mandir}/man1/apport-unpack.1.gz
%doc doc/*
/etc/cron.daily/apport
/etc/init.d/apport
# data files
/usr/share/apport/apport-gtk.glade
/usr/share/apport/*.ui
/usr/share/apport/general-hooks/*
/usr/share/apport/package-hooks/*
/usr/share/icons/hicolor/scalable/apps/apport.svg
/usr/share/mime/packages/apport.xml
# python modules
%py_sitedir/apport/*
%py_sitedir/problem_report.py*
%py_sitedir/apport_python_hook.py*
%py_sitedir/*egg-info
%config /etc/apport/crashdb.conf
/etc/apport/blacklist.d/README.blacklist

%files gtk
%defattr(-,root,root)
/usr/bin/apport-gtk
/usr/share/apport/apport-gtk

%files qt
%defattr(-,root,root)
/usr/bin/apport-qt
/usr/share/apport/apport-qt

%changelog
* Thu Sep 04 2008 - Nikolay Derkach <nderkach@gmail.com>
- update to 0.114
- removed some unneeded files from the package

* Sun Aug 31 2008 - Nikolay Derkach <nderkach@gmail.com>
- and back again to automatic installation

* Sat Aug 30 2008 - Nikolay Derkach <nderkach@gmail.com>
- some code cleanup for adapting the branch to upstream

* Wed Aug 20 2008 - Nikolay Derkach <nderkach@gmail.com>
- switched to manual installtion of files
- removed /var/crash directory installation
- merged python libraries spec

* Wed Aug 13 2008 - Nikolay Derkach <nderkach@gmail.com>
- 0.112: version changed to correspond with the upstream versioning

* Thu Aug 07 2008 - Nikolay Derkach <nderkach@gmail.com>
- 1.0.1: fixes for the developer mode

* Sun Aug 03 2008 - Nikolay Derkach <nderkach@gmail.com>
- removed pynotify dependency, python apport monitor is not used anymore

* Tue Jul 08 2008 - Nikolay Derkach <nderkach@gmail.com>
- complete rewrite of package search methods
- packaging backend code cleanup
- initial implementation of a monitoring daemon 

* Sun Jul 06 2008 - Nikolay Derkach <nderkach@gmail.com>
- add_package_info() now works with just package names
- some packaging backend cleanups
- fixes for init script

* Sat Jul 05 2008 - Nikolay Derkach <nderkach@gmail.com>
- Introduced developer mode

* Fri Jul 04 2008 - Nikolay Derkach <nderkach@gmail.com>
- Added python-apport to the requirements, some spec clean-up

* Wed Jul 02 2008 - Nikolay Derkach <nderkach@gmail.com>
- Added opensuse packaging backend, improved general rpm backend

* Thu May 22 2008 - Nikolay Derkach <nderkach@gmail.com>
- Added lsb to requirements

* Thu May 22 2008 - Nikolay Derkach <nderkach@gmail.com>
- Initial test package

* Mon Jul 2 2007 - Will Woods <wwoods@redhat.com> - 0.87
- Update to 0.87 from upstream

* Thu Jun 28 2007 - Will Woods <wwoods@redhat.com> - 0.86
- Update to 0.86 from upstream, and add fedora changes as a single patch
- Fix packaging problems - actually install packaging implementation
- change setup.py invocation to move scripts to /usr/share/apport
- Add initscript for Fedora and derivatives, chkconfig --add/--del as needed
- condrestart on upgrade
- stub get_available_version() so reports work

* Thu Jun 28 2007 - Will Woods <wwoods@redhat.com> - 0.85
- Changelog begins. Updated to 0.85 from upstream.