diff options
author | Colin Watson <cjwatson@debian.org> | 2005-07-03 13:02:22 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2005-07-03 13:02:22 +0000 |
commit | dcf02dd84f1d624336c0505ba572080fe536ee5b (patch) | |
tree | ef4edbc64164bd1bf4148b8526f477161095c21a | |
parent | 7daa7dc83f249819ccdce683031deaa2d4bae4ea (diff) |
Make /usr/share/doc/openssh-server and /usr/share/doc/ssh symlinks to
/usr/share/doc/openssh-client.
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/openssh-server.links | 1 | ||||
-rw-r--r-- | debian/openssh-server.postinst | 9 | ||||
-rw-r--r-- | debian/openssh-server.prerm | 5 | ||||
-rwxr-xr-x | debian/rules | 11 | ||||
-rw-r--r-- | debian/ssh.links | 1 | ||||
-rw-r--r-- | debian/ssh.postinst | 18 | ||||
-rw-r--r-- | debian/ssh.prerm | 14 |
8 files changed, 56 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog index 0a7a28377..4c81d1486 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -2,6 +2,8 @@ openssh (1:4.1p1-5) UNRELEASED; urgency=low | |||
2 | 2 | ||
3 | * Build-depend on libselinux1-dev on ppc64 too (closes: #314625). | 3 | * Build-depend on libselinux1-dev on ppc64 too (closes: #314625). |
4 | * Drop priority of ssh to extra to match the override file. | 4 | * Drop priority of ssh to extra to match the override file. |
5 | * Make /usr/share/doc/openssh-server and /usr/share/doc/ssh symlinks to | ||
6 | /usr/share/doc/openssh-client. | ||
5 | * debconf template translations: | 7 | * debconf template translations: |
6 | - Update Brazilian Portuguese (thanks, André Luís Lopes; | 8 | - Update Brazilian Portuguese (thanks, André Luís Lopes; |
7 | closes: #315477). | 9 | closes: #315477). |
diff --git a/debian/openssh-server.links b/debian/openssh-server.links index 2d98b1dcb..d9bb08420 100644 --- a/debian/openssh-server.links +++ b/debian/openssh-server.links | |||
@@ -1 +1,2 @@ | |||
1 | usr/lib/openssh/sftp-server usr/lib/sftp-server | 1 | usr/lib/openssh/sftp-server usr/lib/sftp-server |
2 | usr/share/doc/openssh-client usr/share/doc/openssh-server | ||
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst index e6fe65ffa..cf30a181c 100644 --- a/debian/openssh-server.postinst +++ b/debian/openssh-server.postinst | |||
@@ -14,6 +14,14 @@ if [ "$action" != configure ] | |||
14 | fi | 14 | fi |
15 | 15 | ||
16 | 16 | ||
17 | fix_doc_symlink() { | ||
18 | if [ ! -L /usr/share/doc/openssh-server ] && \ | ||
19 | dpkg --compare-versions "$oldversion" lt-nl 1:4.1p1-5; then | ||
20 | rm -rf /usr/share/doc/openssh-server | ||
21 | ln -s openssh-client /usr/share/doc/openssh-server | ||
22 | fi | ||
23 | } | ||
24 | |||
17 | check_idea_key() { | 25 | check_idea_key() { |
18 | #check for old host_key files using IDEA, which openssh does not support | 26 | #check for old host_key files using IDEA, which openssh does not support |
19 | if [ -f /etc/ssh/ssh_host_key ] ; then | 27 | if [ -f /etc/ssh/ssh_host_key ] ; then |
@@ -302,6 +310,7 @@ setup_init() { | |||
302 | } | 310 | } |
303 | 311 | ||
304 | 312 | ||
313 | fix_doc_symlink | ||
305 | create_sshdconfig | 314 | create_sshdconfig |
306 | check_idea_key | 315 | check_idea_key |
307 | create_keys | 316 | create_keys |
diff --git a/debian/openssh-server.prerm b/debian/openssh-server.prerm index 7bc080b9d..9c3313aac 100644 --- a/debian/openssh-server.prerm +++ b/debian/openssh-server.prerm | |||
@@ -26,6 +26,11 @@ case "$1" in | |||
26 | fi | 26 | fi |
27 | ;; | 27 | ;; |
28 | upgrade) | 28 | upgrade) |
29 | # remove symlink on downgrade to when it was a directory | ||
30 | if [ -L /usr/share/doc/openssh-server ] && \ | ||
31 | dpkg --compare-versions "$2" lt-nl 1:4.1p1-5; then | ||
32 | rm -f /usr/share/doc/openssh-server | ||
33 | fi | ||
29 | ;; | 34 | ;; |
30 | failed-upgrade) | 35 | failed-upgrade) |
31 | ;; | 36 | ;; |
diff --git a/debian/rules b/debian/rules index f5365c022..2f5c83c1d 100755 --- a/debian/rules +++ b/debian/rules | |||
@@ -206,8 +206,9 @@ ifeq ($(PO2DEBCONF),yes) | |||
206 | po2debconf -e utf8 debian/openssh-server.templates.master > debian/openssh-server.templates | 206 | po2debconf -e utf8 debian/openssh-server.templates.master > debian/openssh-server.templates |
207 | endif | 207 | endif |
208 | dh_installdebconf | 208 | dh_installdebconf |
209 | dh_installdocs OVERVIEW README | 209 | dh_installdocs |
210 | cat debian/copyright.head LICENCE > debian/openssh-server/usr/share/doc/openssh-server/copyright | 210 | mv debian/openssh-server/usr/share/doc/openssh-server debian/openssh-server/usr/share/doc/openssh-client |
211 | rm -f debian/openssh-server/usr/share/doc/openssh-client/copyright | ||
211 | ifeq ($(PAMSUBST),yes) | 212 | ifeq ($(PAMSUBST),yes) |
212 | # Clean up if we've done this already, to ensure idempotency. | 213 | # Clean up if we've done this already, to ensure idempotency. |
213 | if [ -f debian/openssh-server.ssh.pam.new-style ]; then \ | 214 | if [ -f debian/openssh-server.ssh.pam.new-style ]; then \ |
@@ -221,7 +222,6 @@ ifeq ($(PAMSUBST),yes) | |||
221 | debian/openssh-server.ssh.pam.new-style > debian/openssh-server.ssh.pam | 222 | debian/openssh-server.ssh.pam.new-style > debian/openssh-server.ssh.pam |
222 | endif | 223 | endif |
223 | dh_installpam --name ssh # TODO: breaks woody backports | 224 | dh_installpam --name ssh # TODO: breaks woody backports |
224 | dh_installchangelogs ChangeLog | ||
225 | dh_link | 225 | dh_link |
226 | dh_strip | 226 | dh_strip |
227 | dh_compress | 227 | dh_compress |
@@ -238,8 +238,9 @@ binary-ssh: build install | |||
238 | dh_testdir | 238 | dh_testdir |
239 | dh_testroot | 239 | dh_testroot |
240 | dh_installdocs | 240 | dh_installdocs |
241 | cat debian/copyright.head LICENCE > debian/ssh/usr/share/doc/ssh/copyright | 241 | mv debian/ssh/usr/share/doc/ssh debian/ssh/usr/share/doc/openssh-client |
242 | dh_installchangelogs | 242 | rm -f debian/ssh/usr/share/doc/openssh-client/copyright |
243 | dh_link | ||
243 | dh_compress | 244 | dh_compress |
244 | dh_fixperms | 245 | dh_fixperms |
245 | dh_installdeb | 246 | dh_installdeb |
diff --git a/debian/ssh.links b/debian/ssh.links new file mode 100644 index 000000000..bc454b326 --- /dev/null +++ b/debian/ssh.links | |||
@@ -0,0 +1 @@ | |||
usr/share/doc/openssh-client usr/share/doc/ssh | |||
diff --git a/debian/ssh.postinst b/debian/ssh.postinst new file mode 100644 index 000000000..cb1278033 --- /dev/null +++ b/debian/ssh.postinst | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/bin/sh -e | ||
2 | |||
3 | action="$1" | ||
4 | oldversion="$2" | ||
5 | |||
6 | if [ "$action" != configure ]; then | ||
7 | exit 0 | ||
8 | fi | ||
9 | |||
10 | if [ ! -L /usr/share/doc/ssh ] && \ | ||
11 | dpkg --compare-versions "$oldversion" lt-nl 1:4.1p1-5; then | ||
12 | rm -rf /usr/share/doc/ssh | ||
13 | ln -s openssh-client /usr/share/doc/ssh | ||
14 | fi | ||
15 | |||
16 | #DEBHELPER# | ||
17 | |||
18 | exit 0 | ||
diff --git a/debian/ssh.prerm b/debian/ssh.prerm new file mode 100644 index 000000000..400c92bed --- /dev/null +++ b/debian/ssh.prerm | |||
@@ -0,0 +1,14 @@ | |||
1 | #!/bin/sh -e | ||
2 | |||
3 | case $1 in | ||
4 | upgrade) | ||
5 | if [ -L /usr/share/doc/ssh ] && \ | ||
6 | dpkg --compare-versions "$2" lt-nl 1:4.1p1-5; then | ||
7 | rm -f /usr/share/doc/ssh | ||
8 | fi | ||
9 | ;; | ||
10 | esac | ||
11 | |||
12 | #DEBHELPER# | ||
13 | |||
14 | exit 0 | ||