Merge lp:~andreserl/ubuntu/lucid/net-snmp/net-snmp-apport-533603 into lp:ubuntu/lucid/net-snmp

Proposed by Andres Rodriguez
Status: Merged
Merged at revision: not available
Proposed branch: lp:~andreserl/ubuntu/lucid/net-snmp/net-snmp-apport-533603
Merge into: lp:ubuntu/lucid/net-snmp
Diff against target: 96 lines (+53/-2)
4 files modified
debian/changelog (+11/-0)
debian/control (+1/-1)
debian/rules (+5/-1)
debian/source.apport (+36/-0)
To merge this branch: bzr merge lp:~andreserl/ubuntu/lucid/net-snmp/net-snmp-apport-533603
Reviewer Review Type Date Requested Status
Ubuntu Sponsors Pending
Review via email: mp+22315@code.launchpad.net

Description of the change

Add apport hook.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2009-12-12 08:05:50 +0000
3+++ debian/changelog 2010-03-28 04:37:18 +0000
4@@ -1,3 +1,14 @@
5+net-snmp (5.4.2.1~dfsg0ubuntu1-0ubuntu2) lucid; urgency=low
6+
7+ * Add apport hook (LP: #533603):
8+ - debian/{snmp,snmpd}.apport: Added.
9+ - debian/control: Build-depends on dh-apport.
10+ - debian/rules:
11+ + Add --with apport.
12+ + override_dh_apport to install hook on snmpd package only.
13+
14+ -- Andres Rodriguez <andreserl@ubuntu.com> Sun, 28 Mar 2010 00:25:13 -0400
15+
16 net-snmp (5.4.2.1~dfsg0ubuntu1-0ubuntu1) lucid; urgency=low
17
18 * Repackage upstream tarball to re-add the MIBs: even if they are not
19
20=== modified file 'debian/control'
21--- debian/control 2009-11-26 01:27:00 +0000
22+++ debian/control 2010-03-28 04:37:18 +0000
23@@ -3,7 +3,7 @@
24 Priority: optional
25 Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
26 XSBC-Original-Maintainer: Net-SNMP Packaging Team <pkg-net-snmp-devel@lists.alioth.debian.org>
27-Build-Depends: debhelper (>= 7.0.50~), libtool, libwrap0-dev, libssl-dev (>> 0.9.8), perl (>=5.8), libperl-dev, python-all-dev, python-central (>=0.5.6), python (>=2.3.5-7), python-setuptools (>=0.6b3), autoconf, automake1.9, autotools-dev, debianutils (>=1.13.1), bash (>=2.05), findutils (>=4.1.20), procps, quilt, libkvm-dev [kfreebsd-i386 kfreebsd-amd64], libsensors4-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64]
28+Build-Depends: debhelper (>= 7.0.50~), libtool, libwrap0-dev, libssl-dev (>> 0.9.8), perl (>=5.8), libperl-dev, python-all-dev, python-central (>=0.5.6), python (>=2.3.5-7), python-setuptools (>=0.6b3), autoconf, automake1.9, autotools-dev, debianutils (>=1.13.1), bash (>=2.05), findutils (>=4.1.20), procps, quilt, libkvm-dev [kfreebsd-i386 kfreebsd-amd64], libsensors4-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], dh-apport
29 Standards-Version: 3.8.3
30 Vcs-Svn: svn://svn.debian.org/pkg-net-snmp/
31 Vcs-Browser: http://svn.debian.org/wsvn/pkg-net-snmp/
32
33=== modified file 'debian/rules'
34--- debian/rules 2009-12-12 08:05:27 +0000
35+++ debian/rules 2010-03-28 04:37:18 +0000
36@@ -23,7 +23,7 @@
37 endif
38
39 %:
40- dh --with quilt,python-central $@
41+ dh --with quilt,python-central,apport $@
42
43 .PHONY: override_dh_auto_configure
44 override_dh_auto_configure:
45@@ -118,6 +118,10 @@
46 override_dh_installinit:
47 dh_installinit -u"start 20 2 3 4 5 . stop 20 1 ."
48
49+.PHONY: override_dh_apport
50+override_dh_apport:
51+ dh_apport -psnmpd
52+
53 debian/python-build-stamp-%:
54 # Build python modules manually as the net-snmp Makefile is too limited.
55 cd python; python$* setup.py build --basedir=$(CURDIR)
56
57=== added file 'debian/source.apport'
58--- debian/source.apport 1970-01-01 00:00:00 +0000
59+++ debian/source.apport 2010-03-28 04:37:18 +0000
60@@ -0,0 +1,36 @@
61+#!/usr/bin/python
62+
63+'''apport hook for net-snmp
64+
65+(c) 2010 Andres Rodriguez
66+Author: Andres Rodriguez <andreserl@ubuntu.com>
67+
68+This program is free software; you can redistribute it and/or modify it
69+under the terms of the GNU General Public License as published by the
70+Free Software Foundation; either version 2 of the License, or (at your
71+option) any later version. See http://www.gnu.org/copyleft/gpl.html for
72+the full text of the license.
73+'''
74+
75+from apport.hookutils import *
76+import re
77+
78+def add_info(report, ui):
79+ response = ui.yesno("The contents of your /etc/snmp/snmpd.conf and "
80+ "your /etc/snmp/snmptrapd.conf files may help "
81+ "developers diagnose your bug more quickly. "
82+ "However, it may contain sensitive information. "
83+ "Do you want to include it in your bug report?")
84+
85+ if response == None: # user cancelled
86+ raise StopIteration
87+
88+ elif response == True:
89+ attach_conffiles(report, 'snmpd')
90+
91+ # get version
92+ report['SNMPVersion'] = root_command_output(['/usr/sbin/snmpd', '-v'])
93+
94+ # get syslog stuff
95+ report['SyslogSnmpd'] = recent_syslog(re.compile('snmpd\['))
96+ report['SyslogSnmptrapd'] = recent_syslog(re.compile('snmptrapd\['))

Subscribers

People subscribed via source and target branches

to all changes: