summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog2
-rw-r--r--debian/control3
-rw-r--r--debian/openssh-server.maintscript1
-rw-r--r--debian/openssh-server.postinst.in15
-rw-r--r--debian/openssh-server.postrm27
-rw-r--r--debian/openssh-server.preinst19
6 files changed, 7 insertions, 60 deletions
diff --git a/debian/changelog b/debian/changelog
index ecc89d021..9db3f5648 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ openssh (1:6.2p2-2) UNRELEASED; urgency=low
19 pre-etch (three releases before current stable). 19 pre-etch (three releases before current stable).
20 * Add #DEBHELPER# tokens to openssh-client.postinst and 20 * Add #DEBHELPER# tokens to openssh-client.postinst and
21 openssh-server.postinst. 21 openssh-server.postinst.
22 * Replace old manual conffile handling code with dpkg-maintscript-helper,
23 via dh_installdeb.
22 24
23 -- Colin Watson <cjwatson@debian.org> Tue, 21 May 2013 17:49:35 +0100 25 -- Colin Watson <cjwatson@debian.org> Tue, 21 May 2013 17:49:35 +0100
24 26
diff --git a/debian/control b/debian/control
index a56e12e9f..a9ef496f6 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: openssh
2Section: net 2Section: net
3Priority: standard 3Priority: standard
4Maintainer: Debian OpenSSH Maintainers <debian-ssh@lists.debian.org> 4Maintainer: Debian OpenSSH Maintainers <debian-ssh@lists.debian.org>
5Build-Depends: libwrap0-dev | libwrap-dev, zlib1g-dev (>= 1:1.2.3-1), libssl-dev (>= 0.9.8g), libpam0g-dev | libpam-dev, libgtk2.0-dev, libedit-dev, debhelper (>= 7.4.2~), libselinux1-dev [linux-any], libkrb5-dev | heimdal-dev, dpkg (>= 1.16.1~), libck-connector-dev, dh-autoreconf 5Build-Depends: libwrap0-dev | libwrap-dev, zlib1g-dev (>= 1:1.2.3-1), libssl-dev (>= 0.9.8g), libpam0g-dev | libpam-dev, libgtk2.0-dev, libedit-dev, debhelper (>= 8.1.0~), libselinux1-dev [linux-any], libkrb5-dev | heimdal-dev, dpkg (>= 1.16.1~), libck-connector-dev, dh-autoreconf
6Standards-Version: 3.8.4 6Standards-Version: 3.8.4
7Uploaders: Colin Watson <cjwatson@debian.org>, Matthew Vernon <matthew@debian.org> 7Uploaders: Colin Watson <cjwatson@debian.org>, Matthew Vernon <matthew@debian.org>
8Homepage: http://www.openssh.org/ 8Homepage: http://www.openssh.org/
@@ -44,6 +44,7 @@ Description: secure shell (SSH) client, for secure access to remote machines
44Package: openssh-server 44Package: openssh-server
45Priority: optional 45Priority: optional
46Architecture: any 46Architecture: any
47Pre-Depends: ${misc:Pre-Depends}
47Depends: ${shlibs:Depends}, ${misc:Depends}, debconf (>= 1.2.0) | debconf-2.0, libpam-runtime (>= 0.76-14), libpam-modules (>= 0.72-9), adduser (>= 3.9), dpkg (>= 1.9.0), openssh-client (= ${binary:Version}), lsb-base (>= 3.2-13), procps, debianutils (>= 4) 48Depends: ${shlibs:Depends}, ${misc:Depends}, debconf (>= 1.2.0) | debconf-2.0, libpam-runtime (>= 0.76-14), libpam-modules (>= 0.72-9), adduser (>= 3.9), dpkg (>= 1.9.0), openssh-client (= ${binary:Version}), lsb-base (>= 3.2-13), procps, debianutils (>= 4)
48Recommends: xauth, ncurses-term, ${openssh-server:Recommends} 49Recommends: xauth, ncurses-term, ${openssh-server:Recommends}
49Conflicts: ssh (<< 1:3.8.1p1-9), ssh-nonfree (<<2), ssh-socks, ssh2, sftp, rsh-client (<<0.16.1-1), ssh-krb5 (<< 1:4.3p2-7) 50Conflicts: ssh (<< 1:3.8.1p1-9), ssh-nonfree (<<2), ssh-socks, ssh2, sftp, rsh-client (<<0.16.1-1), ssh-krb5 (<< 1:4.3p2-7)
diff --git a/debian/openssh-server.maintscript b/debian/openssh-server.maintscript
new file mode 100644
index 000000000..f9e3c4d53
--- /dev/null
+++ b/debian/openssh-server.maintscript
@@ -0,0 +1 @@
mv_conffile /etc/pam.d/ssh /etc/pam.d/sshd 1:4.7p1-4~
diff --git a/debian/openssh-server.postinst.in b/debian/openssh-server.postinst.in
index a91ec082a..ce1165ac9 100644
--- a/debian/openssh-server.postinst.in
+++ b/debian/openssh-server.postinst.in
@@ -320,20 +320,6 @@ setup_init() {
320 esac 320 esac
321} 321}
322 322
323commit_mv_conffile () {
324 OLDCONFFILE="$1"
325 NEWCONFFILE="$2"
326
327 if [ -e "$OLDCONFFILE.moving" ]; then
328 echo "Preserving user changes to $NEWCONFFILE ..."
329 mv -f "$NEWCONFFILE" "$NEWCONFFILE.dpkg-new"
330 mv -f "$OLDCONFFILE.moving" "$NEWCONFFILE"
331 elif [ -e "$OLDCONFFILE.dpkg-old" ]; then
332 rm -f "$OLDCONFFILE.dpkg-old"
333 fi
334}
335
336
337if [ "$action" = configure ]; then 323if [ "$action" = configure ]; then
338 create_sshdconfig 324 create_sshdconfig
339 create_keys 325 create_keys
@@ -344,7 +330,6 @@ if [ "$action" = configure ]; then
344 remove_old_init_links 330 remove_old_init_links
345 fi 331 fi
346 setup_init 332 setup_init
347 commit_mv_conffile /etc/pam.d/ssh /etc/pam.d/sshd
348 # Renamed to /etc/ssh/moduli in 2.9.9 (!) 333 # Renamed to /etc/ssh/moduli in 2.9.9 (!)
349 if dpkg --compare-versions "$2" lt 1:4.7p1-1; then 334 if dpkg --compare-versions "$2" lt 1:4.7p1-1; then
350 rm -f /etc/ssh/primes 335 rm -f /etc/ssh/primes
diff --git a/debian/openssh-server.postrm b/debian/openssh-server.postrm
index bc55df118..9bb9f1839 100644
--- a/debian/openssh-server.postrm
+++ b/debian/openssh-server.postrm
@@ -2,32 +2,7 @@
2 2
3#DEBHELPER# 3#DEBHELPER#
4 4
5abort_mv_conffile () {
6 CONFFILE="$1"
7
8 if [ ! -e "$CONFFILE" ]; then
9 if [ -e "$CONFFILE.dpkg-old" ]; then
10 mv -f "$CONFFILE.dpkg-old" "$CONFFILE"
11 elif [ -e "$CONFFILE.moving" ]; then
12 mv -f "$CONFFILE.moving" "$CONFFILE"
13 fi
14 fi
15}
16
17finish_mv_conffile () {
18 CONFFILE="$1"
19
20 if [ -e "$CONFFILE.dpkg-old" ]; then
21 rm -f "$CONFFILE.dpkg-old"
22 fi
23}
24
25case $1 in 5case $1 in
26 abort-install|abort-upgrade)
27 if dpkg --compare-versions "$2" lt 1:4.7p1-4; then
28 abort_mv_conffile /etc/pam.d/ssh
29 fi
30 ;;
31 purge) 6 purge)
32 # Remove all non-conffiles that ssh might create, so that we 7 # Remove all non-conffiles that ssh might create, so that we
33 # can smoothly remove /etc/ssh if and only if the user 8 # can smoothly remove /etc/ssh if and only if the user
@@ -46,8 +21,6 @@ case $1 in
46 if which deluser >/dev/null 2>&1; then 21 if which deluser >/dev/null 2>&1; then
47 deluser --quiet sshd > /dev/null || true 22 deluser --quiet sshd > /dev/null || true
48 fi 23 fi
49
50 finish_mv_conffile /etc/pam.d/ssh
51 ;; 24 ;;
52esac 25esac
53 26
diff --git a/debian/openssh-server.preinst b/debian/openssh-server.preinst
index 8bb2d6f1a..559693f7b 100644
--- a/debian/openssh-server.preinst
+++ b/debian/openssh-server.preinst
@@ -3,25 +3,8 @@
3action=$1 3action=$1
4version=$2 4version=$2
5 5
6prepare_mv_conffile () {
7 CONFFILE="$1"
8 [ -e "$CONFFILE" ] || return 0
9
10 md5sum="$(md5sum "$CONFFILE" | sed -e 's/ .*//')"
11 old_md5sum="$(dpkg-query -W -f '${Conffiles}\n' openssh-server 2>/dev/null | sed 's/^ *//' | awk '$1 == "'"$CONFFILE"'" { print $2 }')"
12 if [ "$md5sum" = "$old_md5sum" ]; then
13 mv -f "$CONFFILE" "$CONFFILE.dpkg-old"
14 else
15 mv -f "$CONFFILE" "$CONFFILE.moving"
16 fi
17}
18
19if [ "$action" = upgrade ] || [ "$action" = install ] 6if [ "$action" = upgrade ] || [ "$action" = install ]
20then 7then
21 if dpkg --compare-versions "$version" lt 1:4.7p1-4; then
22 prepare_mv_conffile /etc/pam.d/ssh
23 fi
24
25 if dpkg --compare-versions "$version" lt 1:5.5p1-6 && \ 8 if dpkg --compare-versions "$version" lt 1:5.5p1-6 && \
26 [ -d /var/run/sshd ]; then 9 [ -d /var/run/sshd ]; then
27 # make sure /var/run/sshd is not removed on upgrades 10 # make sure /var/run/sshd is not removed on upgrades
@@ -30,3 +13,5 @@ then
30fi 13fi
31 14
32#DEBHELPER# 15#DEBHELPER#
16
17exit 0