diff -u bind9-9.7.2.dfsg.P2/debian/rules bind9-9.7.2.dfsg.P2/debian/rules --- bind9-9.7.2.dfsg.P2/debian/rules +++ bind9-9.7.2.dfsg.P2/debian/rules @@ -155,6 +155,10 @@ dh_install --sourcedir=debian/bind9 -a (cd debian/bind9/ && rm -rf $$(cat ../*.install) ) rm -f debian/bind9/usr/share/man/man1/query-loc.1 + # install apport hook on Ubuntu + if dpkg-vendor --is ubuntu; then \ + install -m 644 -D debian/bind9.apport debian/bind9/usr/share/apport/package-hooks/bind9.py; \ + fi dh_link -a dh_strip -a dh_compress -a diff -u bind9-9.7.2.dfsg.P2/debian/changelog bind9-9.7.2.dfsg.P2/debian/changelog --- bind9-9.7.2.dfsg.P2/debian/changelog +++ bind9-9.7.2.dfsg.P2/debian/changelog @@ -1,3 +1,14 @@ +bind9 (1:9.7.2.dfsg.P2-2ubuntu1) natty; urgency=low + + [ Andres Rodriguez ] + * Add apport hook (LP: #533601): + - debian/bind9.apport: Added. + + [ Martin Pitt ] + * debian/rules: Install Apport hook when building on Ubuntu. + + -- Martin Pitt Fri, 26 Nov 2010 10:50:17 +0100 + bind9 (1:9.7.2.dfsg.P2-2) unstable; urgency=low [Roy Jamison] only in patch2: unchanged: --- bind9-9.7.2.dfsg.P2.orig/debian/bind9.apport +++ bind9-9.7.2.dfsg.P2/debian/bind9.apport @@ -0,0 +1,34 @@ +#!/usr/bin/python + +'''apport hook for bind9 + +(c) 2010 Andres Rodriguez. +Author: Andres Rodriguez + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2 of the License, or (at your +option) any later version. See http://www.gnu.org/copyleft/gpl.html for +the full text of the license. +''' + +from apport.hookutils import * +import re + +def add_info(report, ui): + response = ui.yesno("The contents of your /etc/bind/named.conf file " + "may help developers diagnose your bug more " + "quickly. However, it may contain sensitive " + "information. Do you want to include it in your " + "bug report?") + + if response == None: # user cancelled + raise StopIteration + elif response == True: + attach_conffiles(report,'bind9') + + # getting syslog stuff + report['SyslogBind9'] = recent_syslog(re.compile(r'named\[')) + + # Attaching related packages info + attach_related_packages(report, ['bind9utils', 'apparmor'])