summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2013-05-22 01:45:40 +0100
committerColin Watson <cjwatson@debian.org>2013-05-22 01:45:40 +0100
commit6e950945da7a2acbb48fa4138208018f09d66991 (patch)
tree1e99c1fb54755277a8c441cf503b71bb2c5be748 /debian/rules
parentafd3292952a9f0bb107046785ddcfad446d69b89 (diff)
Switch to new unified layout for Upstart jobs as documented in
https://wiki.ubuntu.com/UpstartCompatibleInitScripts: the init script checks for a running Upstart, and we now let dh_installinit handle most of the heavy lifting in maintainer scripts. Ubuntu users should be essentially unaffected except that sshd may no longer start automatically in chroots if the running Upstart predates 0.9.0; but the main goal is simply not to break when openssh-server is installed in a chroot.
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules27
1 files changed, 2 insertions, 25 deletions
diff --git a/debian/rules b/debian/rules
index c78653be0..32cda5bc3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -115,16 +115,6 @@ confflags_udeb += --with-ldflags='-Wl,--as-needed'
115%: 115%:
116 dh $@ --with=autoreconf 116 dh $@ --with=autoreconf
117 117
118DISTRIBUTOR_REPLACE := \
119 debian/openssh-server.if-up \
120 debian/openssh-server.ssh.init \
121 debian/openssh-server.postinst \
122 debian/openssh-server.prerm \
123 debian/ssh-krb5.postinst
124
125debian/%: debian/%.in
126 sed 's/@DISTRIBUTOR@/$(DISTRIBUTOR)/g' $< >$@
127
128override_dh_auto_configure: 118override_dh_auto_configure:
129 dh_auto_configure -Bbuild-deb -- $(confflags) 119 dh_auto_configure -Bbuild-deb -- $(confflags)
130 dh_auto_configure -Bbuild-udeb -- $(confflags_udeb) 120 dh_auto_configure -Bbuild-udeb -- $(confflags_udeb)
@@ -157,14 +147,10 @@ endif
157 (cat debian/copyright.head; iconv -f ISO-8859-1 -t UTF-8 LICENCE) \ 147 (cat debian/copyright.head; iconv -f ISO-8859-1 -t UTF-8 LICENCE) \
158 > debian/copyright 148 > debian/copyright
159 149
160override_dh_clean:
161 dh_clean
162 rm -f $(DISTRIBUTOR_REPLACE)
163
164override_dh_auto_install: 150override_dh_auto_install:
165 $(MAKE) -C build-deb DESTDIR=`pwd`/debian/tmp install-nokeys 151 $(MAKE) -C build-deb DESTDIR=`pwd`/debian/tmp install-nokeys
166 152
167override_dh_install: $(DISTRIBUTOR_REPLACE) 153override_dh_install:
168 rm -f debian/tmp/etc/ssh/sshd_config 154 rm -f debian/tmp/etc/ssh/sshd_config
169 155
170 dh_install -Nopenssh-client-udeb -Nopenssh-server-udeb --fail-missing 156 dh_install -Nopenssh-client-udeb -Nopenssh-server-udeb --fail-missing
@@ -197,13 +183,7 @@ override_dh_installdocs:
197 mkdir -p debian/openssh-server/usr/share/doc/openssh-client 183 mkdir -p debian/openssh-server/usr/share/doc/openssh-client
198 184
199override_dh_installinit: 185override_dh_installinit:
200 dh_installinit -n --name ssh 186 dh_installinit -R --name ssh -- start 16 2 3 4 5 .
201ifeq ($(DISTRIBUTOR),Ubuntu)
202 # We need to keep the init script as well as the Upstart job for
203 # now, for the benefit of people running sshd in chroots.
204 install -D -o root -g root debian/openssh-server.ssh.init debian/openssh-server/etc/init.d/ssh
205 install -D -o root -g root -m 644 debian/openssh-server.ssh.default debian/openssh-server/etc/default/ssh
206endif
207 187
208override_dh_installpam: 188override_dh_installpam:
209 dh_installpam --name sshd 189 dh_installpam --name sshd
@@ -217,9 +197,6 @@ override_dh_shlibdeps:
217 dh_shlibdeps 197 dh_shlibdeps
218 debian/adjust-openssl-dependencies 198 debian/adjust-openssl-dependencies
219 199
220override_dh_installdeb: $(DISTRIBUTOR_REPLACE)
221 dh_installdeb
222
223override_dh_gencontrol: 200override_dh_gencontrol:
224 dh_gencontrol -- -V'openssh-server:Recommends=$(server_recommends)' 201 dh_gencontrol -- -V'openssh-server:Recommends=$(server_recommends)'
225 202