[pkg-ntp-maintainers] [pkg-ntp] 01/04: debian/rules, debian/ntp.dirs, debian/source_ntp.py: Add apport hook.
Bernhard Schmidt
berni at moszumanska.debian.org
Sun May 7 21:18:06 UTC 2017
This is an automated email from the git hooks/post-receive script.
berni pushed a commit to branch berni-wip
in repository pkg-ntp.
commit b7235972266d93418d2a2197f01906e0b66c2b30
Author: Christian Ehrhardt <christian.ehrhardt at canonical.com>
Date: Fri Jul 1 10:34:31 2016 +0200
debian/rules, debian/ntp.dirs, debian/source_ntp.py: Add apport hook.
(cherry picked from commit 04302b679bd67dee73de3d87e0d5760a7fe01ec7)
Closes: #861730
---
debian/ntp.dirs | 1 +
debian/rules | 3 +++
debian/source_ntp.py | 22 ++++++++++++++++++++++
3 files changed, 26 insertions(+)
diff --git a/debian/ntp.dirs b/debian/ntp.dirs
index 49d3819..46fe52d 100644
--- a/debian/ntp.dirs
+++ b/debian/ntp.dirs
@@ -1,3 +1,4 @@
usr/sbin
var/lib/ntp
var/log/ntpstats
+usr/share/apport/package-hooks
diff --git a/debian/rules b/debian/rules
index a6df7cf..a74d850 100755
--- a/debian/rules
+++ b/debian/rules
@@ -44,6 +44,9 @@ override_dh_install:
install -D -m 0644 debian/apparmor-profile.tunable debian/ntp/etc/apparmor.d/tunables/ntpd
dh_link -pntp etc/apparmor.d/usr.sbin.ntpd etc/apparmor/init/network-interface-security/usr.sbin.ntpd
+ # install apport hook
+ install -D -m 644 debian/source_ntp.py debian/ntp/usr/share/apport/package-hooks/source_ntp.py
+
# Remove empty directory (/usr/libexec/)
find debian/tmp -type d -empty -delete
diff --git a/debian/source_ntp.py b/debian/source_ntp.py
new file mode 100644
index 0000000..3debc68
--- /dev/null
+++ b/debian/source_ntp.py
@@ -0,0 +1,22 @@
+'''apport package hook for ntp
+
+(c) 2010-2011 Canonical Ltd.
+Author: Chuck Short <zulcss at ubuntu.com>
+'''
+
+from apport.hookutils import *
+from os import path
+import re
+
+def add_info(report):
+ attach_conffiles(report, 'ntp')
+
+ # get apparmor stuff
+ attach_mac_events(report, '/usr/sbin/ntpd')
+ attach_file(report, '/etc/apparmor.d/usr.sbin.ntpd')
+
+ # get syslog stuff
+ recent_syslog(re.compile(r'ntpd\['))
+
+ # Get debug information
+ report['NtpStatus'] = command_output(['ntpq', '-p'])
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ntp/pkg-ntp.git
More information about the pkg-ntp-maintainers
mailing list