summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2012-11-26 16:37:47 +0000
committerColin Watson <cjwatson@debian.org>2012-11-26 16:37:47 +0000
commit3c3cee86988f6d3c5aa5acdb8287119bc59129b8 (patch)
tree7e54f85c7dd799861e8dc4d964967830f221c9c4
parent1ea794a34403a618e59bf5993912503fe1f64d11 (diff)
Install apport hooks.
-rw-r--r--debian/changelog1
-rw-r--r--debian/openssh-client.apport32
-rw-r--r--debian/openssh-client.dirs1
-rw-r--r--debian/openssh-server.apport28
-rw-r--r--debian/openssh-server.dirs1
-rwxr-xr-xdebian/rules5
6 files changed, 68 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index a35c39b94..887cf0261 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ openssh (1:6.1p1-2) UNRELEASED; urgency=low
9 need these installed by default nowadays. 9 need these installed by default nowadays.
10 - Add an Upstart job (not currently used by default in Debian). 10 - Add an Upstart job (not currently used by default in Debian).
11 - Add mention of ssh-keygen in ssh connect warning (Scott Moser). 11 - Add mention of ssh-keygen in ssh connect warning (Scott Moser).
12 - Install apport hooks.
12 * Only build with -j if DEB_BUILD_OPTIONS=parallel=* is used (closes: 13 * Only build with -j if DEB_BUILD_OPTIONS=parallel=* is used (closes:
13 #694282). 14 #694282).
14 15
diff --git a/debian/openssh-client.apport b/debian/openssh-client.apport
new file mode 100644
index 000000000..3dbc8e5e6
--- /dev/null
+++ b/debian/openssh-client.apport
@@ -0,0 +1,32 @@
1#!/usr/bin/python
2
3'''apport hook for openssh-client
4
5(c) 2010 Canonical Ltd.
6Author: Chuck Short <chuck.short@canonical.com>
7
8This program is free software; you can redistribute it and/or modify it
9under the terms of the GNU General Public License as published by the
10Free Software Foundation; either version 2 of the License, or (at your
11option) any later version. See http://www.gnu.org/copyleft/gpl.html for
12the full text of the license.
13'''
14
15from apport.hookutils import *
16
17def add_info(report, ui):
18 response = ui.yesno("The contents of your /etc/ssh/ssh_config file "
19 "may help developers diagnose your bug more "
20 "quickly. However, it may contain sensitive "
21 "information. Do you want to include it in your "
22 "bug report?")
23
24 if response == None: # user cancelled
25 raise StopIteration
26
27 elif response == True:
28 attach_conffiles(report, 'openssh-client')
29
30 attach_related_packages(report,
31 ['ssh-askpass', 'libpam-ssh', 'keychain', 'ssh-askpass-gnome'])
32 report['SSHClientVersion'] = command_output(['/usr/bin/ssh', '-V'])
diff --git a/debian/openssh-client.dirs b/debian/openssh-client.dirs
index 1da8fba83..44f9ef061 100644
--- a/debian/openssh-client.dirs
+++ b/debian/openssh-client.dirs
@@ -1 +1,2 @@
1usr/share/apport/package-hooks
1usr/share/lintian/overrides 2usr/share/lintian/overrides
diff --git a/debian/openssh-server.apport b/debian/openssh-server.apport
new file mode 100644
index 000000000..3644bd855
--- /dev/null
+++ b/debian/openssh-server.apport
@@ -0,0 +1,28 @@
1#!/usr/bin/python
2
3'''apport hook for openssh-server
4
5(c) 2010 Canonical Ltd.
6Author: Chuck Short <chuck.short@canonical.com>
7
8This program is free software; you can redistribute it and/or modify it
9under the terms of the GNU General Public License as published by the
10Free Software Foundation; either version 2 of the License, or (at your
11option) any later version. See http://www.gnu.org/copyleft/gpl.html for
12the full text of the license.
13'''
14
15from apport.hookutils import *
16
17def add_info(report, ui):
18 response = ui.yesno("The contents of your /etc/ssh/sshd_config file "
19 "may help developers diagnose your bug more "
20 "quickly. However, it may contain sensitive "
21 "information. Do you want to include it in your "
22 "bug report?")
23
24 if response == None: # user cancelled
25 raise StopIteration
26
27 elif response == True:
28 report['SSHDConfig'] = root_command_output(['/usr/sbin/sshd', '-T'])
diff --git a/debian/openssh-server.dirs b/debian/openssh-server.dirs
index b008fbf2c..0ed9bea44 100644
--- a/debian/openssh-server.dirs
+++ b/debian/openssh-server.dirs
@@ -4,6 +4,7 @@ etc/network/if-up.d
4etc/ufw/applications.d 4etc/ufw/applications.d
5usr/lib/openssh 5usr/lib/openssh
6usr/sbin 6usr/sbin
7usr/share/apport/package-hooks
7usr/share/lintian/overrides 8usr/share/lintian/overrides
8usr/share/man/man5 9usr/share/man/man5
9usr/share/man/man8 10usr/share/man/man8
diff --git a/debian/rules b/debian/rules
index 5cf42b692..5ce29c3ed 100755
--- a/debian/rules
+++ b/debian/rules
@@ -182,6 +182,11 @@ override_dh_install: $(DISTRIBUTOR_REPLACE)
182 debian/openssh-client/etc/ssh/moduli \ 182 debian/openssh-client/etc/ssh/moduli \
183 debian/openssh-client/etc/ssh/ssh_config 183 debian/openssh-client/etc/ssh/ssh_config
184 184
185 # dh_apport would be neater, but at the time of writing it isn't in
186 # unstable yet.
187 install -p -m 644 debian/openssh-client.apport debian/openssh-client/usr/share/apport/package-hooks/openssh-client.py
188 install -p -m 644 debian/openssh-server.apport debian/openssh-server/usr/share/apport/package-hooks/openssh-server.py
189
185override_dh_installdocs: 190override_dh_installdocs:
186 dh_installdocs -Nopenssh-server -Nssh 191 dh_installdocs -Nopenssh-server -Nssh
187 dh_installdocs -popenssh-server -pssh --link-doc=openssh-client 192 dh_installdocs -popenssh-server -pssh --link-doc=openssh-client