summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2003-11-15 15:55:19 +0000
committerColin Watson <cjwatson@debian.org>2003-11-15 15:55:19 +0000
commitac444049e27aa772e57d38b889ceee46e7331a50 (patch)
tree6f21f16b19de3ef8ba1812eb77c657b28c4b6a4e /debian/rules
parent72db1a31fddd41571369eecb058e78e9ac3f6c78 (diff)
Implement New World Order for PAM configuration, including
/etc/pam.d/common-* from /etc/pam.d/ssh (closes: #212959). Add more commentary to /etc/pam.d/ssh.
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules31
1 files changed, 30 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index ec594ecb0..0bb40da4e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -25,6 +25,20 @@ PO2DEBCONF := yes
25MINDEBCONFVER := 1.2.0 25MINDEBCONFVER := 1.2.0
26endif 26endif
27 27
28# We need a new libpam-runtime for sane PAM handling
29# (http://lists.debian.org/debian-devel-announce-0308/msg00012.html).
30# Unfortunately it's hard to detect during the build whether this is
31# appropriate, so woody-compatibility is a pain. I've had to punt and go for
32# a DEB_BUILD_SSH_WOODY environment variable. We can remove this hack once
33# we no longer care about woody.
34ifeq ($(DEB_BUILD_SSH_WOODY),)
35PAMSUBST := no
36PAMDEP := libpam-runtime (>= 0.76-14)
37else
38PAMSUBST := yes
39PAMDEP := libpam-runtime
40endif
41
28# Change the version string to include the Debian version 42# Change the version string to include the Debian version
29SSH_VERSION := $(shell sed -e '/define/!d; s/.*\"\(.*\)\".*/\1/; q' <version.h) Debian $(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p') 43SSH_VERSION := $(shell sed -e '/define/!d; s/.*\"\(.*\)\".*/\1/; q' <version.h) Debian $(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p')
30 44
@@ -61,6 +75,11 @@ ifeq ($(PO2DEBCONF),yes)
61 po2debconf debian/templates.master > debian/templates 75 po2debconf debian/templates.master > debian/templates
62 rm -f debian/po/output 76 rm -f debian/po/output
63endif 77endif
78ifeq ($(PAMSUBST),yes)
79 if [ -f debian/ssh.pam.new-style ]; then \
80 mv debian/ssh.pam.new-style debian/ssh.pam; \
81 fi
82endif
64 dh_clean 83 dh_clean
65 84
66install: DH_OPTIONS= 85install: DH_OPTIONS=
@@ -113,6 +132,15 @@ endif
113 nroff RFC.nroff > debian/tmp/usr/share/doc/ssh/RFC 132 nroff RFC.nroff > debian/tmp/usr/share/doc/ssh/RFC
114 gzip -9 debian/tmp/usr/share/doc/ssh/RFC 133 gzip -9 debian/tmp/usr/share/doc/ssh/RFC
115 rm -rf debian/tmp/usr/share/doc/ssh/RFC.nroff.gz 134 rm -rf debian/tmp/usr/share/doc/ssh/RFC.nroff.gz
135ifeq ($(PAMSUBST),yes)
136 cp -a debian/ssh.pam debian/ssh.pam.new-style
137 trailer='required pam_unix.so' \
138 sed -e "s/@include common-auth/auth $$trailer" \
139 -e "s/@include common-account/account $$trailer" \
140 -e "s/@include common-session/session $$trailer" \
141 -e "s/@include common-password/password $$trailer" \
142 debian/ssh.pam.new-style > debian/ssh.pam
143endif
116 dh_installpam 144 dh_installpam
117 dh_installchangelogs ChangeLog 145 dh_installchangelogs ChangeLog
118 dh_strip 146 dh_strip
@@ -122,7 +150,8 @@ endif
122 test ! -e debian/tmp/etc/ssh/ssh_prng_cmds \ 150 test ! -e debian/tmp/etc/ssh/ssh_prng_cmds \
123 || echo "/etc/ssh/ssh_prng_cmds" >> debian/tmp/DEBIAN/conffiles 151 || echo "/etc/ssh/ssh_prng_cmds" >> debian/tmp/DEBIAN/conffiles
124 dh_shlibdeps 152 dh_shlibdeps
125 dh_gencontrol -- -V'debconf-depends=debconf (>= $(MINDEBCONFVER))' 153 dh_gencontrol -- -V'debconf-depends=debconf (>= $(MINDEBCONFVER))' \
154 -V'pam-depends=$(PAMDEP)'
126 dh_md5sums 155 dh_md5sums
127 dh_builddeb 156 dh_builddeb
128 157