summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2004-07-31 03:22:20 +0000
committerColin Watson <cjwatson@debian.org>2004-07-31 03:22:20 +0000
commit9749ef7f9b382d743b186bf06c7c2aeb0b9bebee (patch)
treeaadbcc936c4e05d344f3ae856925b62bafc8debb /debian/rules
parentc57fe5be57af965042484e8669767f95e558b0ef (diff)
* Split the ssh binary package into openssh-client and openssh-server
(closes: #39741). openssh-server depends on openssh-client for some common functionality; it didn't seem worth creating yet another package for this. * New transitional ssh package, depending on openssh-client and openssh-server. May be removed once nothing depends on it. * When upgrading from ssh to openssh-{client,server}, it's very difficult for the maintainer scripts to find out what version we're upgrading from without dodgy dpkg hackery. I've therefore taken the opportunity to move a couple of debconf notes into NEWS files, namely ssh/ssh2_keys_merged and ssh/user_environment_tell. * In general, upgrading to this version directly from woody without first upgrading to the version in sarge is not currently guaranteed to work very smoothly due to the aforementioned version discovery problems.
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules95
1 files changed, 68 insertions, 27 deletions
diff --git a/debian/rules b/debian/rules
index 4960ad921..0d9ea2974 100755
--- a/debian/rules
+++ b/debian/rules
@@ -96,7 +96,8 @@ ifeq ($(PO2DEBCONF),yes)
96 # 4.1.16) depends on it), the binary-arch target will generate a 96 # 4.1.16) depends on it), the binary-arch target will generate a
97 # better version for sarge. 97 # better version for sarge.
98 echo 1 > debian/po/output 98 echo 1 > debian/po/output
99 po2debconf debian/templates.master > debian/templates 99 po2debconf debian/openssh-client.templates.master > debian/openssh-client.templates
100 po2debconf debian/openssh-server.templates.master > debian/openssh-server.templates
100 rm -f debian/po/output 101 rm -f debian/po/output
101endif 102endif
102ifeq ($(PAMSUBST),yes) 103ifeq ($(PAMSUBST),yes)
@@ -114,16 +115,22 @@ install: build
114 dh_clean -k 115 dh_clean -k
115 dh_installdirs 116 dh_installdirs
116 117
117 # Add here commands to install the package into debian/ssh. 118 $(MAKE) -C build-deb DESTDIR=`pwd`/debian/openssh-client install-nokeys
118 $(MAKE) -C build-deb DESTDIR=`pwd`/debian/ssh install-nokeys
119 119
120 rm -f debian/ssh/etc/ssh/sshd_config 120 rm -f debian/openssh-client/etc/ssh/sshd_config
121 #Temporary hack: remove /usr/share/Ssh.bin, since we have no smartcard support anyway. 121 #Temporary hack: remove /usr/share/Ssh.bin, since we have no smartcard support anyway.
122 rm -f debian/ssh/usr/share/Ssh.bin 122 rm -f debian/openssh-client/usr/share/Ssh.bin
123 123
124 install -m 755 contrib/ssh-copy-id debian/ssh/usr/bin/ssh-copy-id 124 # Split off the server.
125 install -m 644 -c contrib/ssh-copy-id.1 debian/ssh/usr/share/man/man1/ssh-copy-id.1 125 mv debian/openssh-client/usr/sbin/sshd debian/openssh-server/usr/sbin/
126 install -m 644 debian/moduli.5 debian/ssh/usr/share/man/man5/moduli.5 126 mv debian/openssh-client/usr/lib/sftp-server debian/openssh-server/usr/lib/
127 mv debian/openssh-client/usr/share/man/man8/sshd.8 debian/openssh-server/usr/share/man/man8/
128 mv debian/openssh-client/usr/share/man/man8/sftp-server.8 debian/openssh-server/usr/share/man/man8/
129 rmdir debian/openssh-client/var/run/sshd
130
131 install -m 755 contrib/ssh-copy-id debian/openssh-client/usr/bin/ssh-copy-id
132 install -m 644 -c contrib/ssh-copy-id.1 debian/openssh-client/usr/share/man/man1/ssh-copy-id.1
133 install -m 644 debian/moduli.5 debian/openssh-client/usr/share/man/man5/moduli.5
127 134
128 if [ -f contrib/gnome-ssh-askpass2 ]; then \ 135 if [ -f contrib/gnome-ssh-askpass2 ]; then \
129 install -s -o root -g root -m 755 contrib/gnome-ssh-askpass2 debian/ssh-askpass-gnome/usr/lib/ssh/gnome-ssh-askpass; \ 136 install -s -o root -g root -m 755 contrib/gnome-ssh-askpass2 debian/ssh-askpass-gnome/usr/lib/ssh/gnome-ssh-askpass; \
@@ -134,13 +141,11 @@ install: build
134 install -m 644 debian/ssh-askpass-gnome.desktop debian/ssh-askpass-gnome/usr/share/applications/ssh-askpass-gnome.desktop 141 install -m 644 debian/ssh-askpass-gnome.desktop debian/ssh-askpass-gnome/usr/share/applications/ssh-askpass-gnome.desktop
135 uudecode -o debian/ssh-askpass-gnome/usr/share/pixmaps/ssh-askpass-gnome.png debian/ssh-askpass-gnome.png.uue 142 uudecode -o debian/ssh-askpass-gnome/usr/share/pixmaps/ssh-askpass-gnome.png debian/ssh-askpass-gnome.png.uue
136 143
137 install -m 755 debian/ssh-argv0 debian/ssh/usr/bin/ssh-argv0 144 install -m 755 debian/ssh-argv0 debian/openssh-client/usr/bin/ssh-argv0
138 install -m 644 debian/ssh-argv0.1 debian/ssh/usr/share/man/man1/ssh-argv0.1 145 install -m 644 debian/ssh-argv0.1 debian/openssh-client/usr/share/man/man1/ssh-argv0.1
139
140 install -o root -g root debian/init debian/ssh/etc/init.d/ssh
141 install -o root -g root -m 644 debian/ssh.default debian/ssh/etc/default/ssh
142 146
143 install -o root -g root -m 755 -d debian/ssh/var/run/sshd 147 install -o root -g root debian/openssh-server.init debian/openssh-server/etc/init.d/ssh
148 install -o root -g root -m 644 debian/openssh-server.default debian/openssh-server/etc/default/ssh
144 149
145 install -m 755 build-udeb/ssh debian/openssh-client-udeb/usr/bin/ssh 150 install -m 755 build-udeb/ssh debian/openssh-client-udeb/usr/bin/ssh
146 install -m 755 build-udeb/scp debian/openssh-client-udeb/usr/bin/scp 151 install -m 755 build-udeb/scp debian/openssh-client-udeb/usr/bin/scp
@@ -153,45 +158,79 @@ binary-indep: build install
153 # nothing to do 158 # nothing to do
154 159
155# Build architecture-dependent files here. 160# Build architecture-dependent files here.
156binary-arch: binary-ssh binary-ssh-askpass-gnome 161binary-arch: binary-openssh-client binary-openssh-server binary-ssh
162binary-arch: binary-ssh-askpass-gnome
157binary-arch: binary-openssh-client-udeb binary-openssh-server-udeb 163binary-arch: binary-openssh-client-udeb binary-openssh-server-udeb
158 164
159binary-ssh: DH_OPTIONS=-pssh 165binary-openssh-client: DH_OPTIONS=-popenssh-client
160binary-ssh: build install 166binary-openssh-client: build install
161 dh_testdir 167 dh_testdir
162 dh_testroot 168 dh_testroot
163ifeq ($(PO2DEBCONF),yes) 169ifeq ($(PO2DEBCONF),yes)
164 po2debconf -e utf8 debian/templates.master > debian/templates 170 po2debconf -e utf8 debian/openssh-client.templates.master > debian/openssh-client.templates
165endif 171endif
166 dh_installdebconf 172 dh_installdebconf
167 dh_installdocs OVERVIEW README 173 dh_installdocs OVERVIEW README
168 cat debian/copyright.head LICENCE > debian/ssh/usr/share/doc/ssh/copyright 174 cat debian/copyright.head LICENCE > debian/openssh-client/usr/share/doc/openssh-client/copyright
175 dh_installchangelogs ChangeLog
176 dh_strip
177 dh_compress
178 dh_fixperms
179 dh_installdeb
180 test ! -e debian/ssh/etc/ssh/ssh_prng_cmds \
181 || echo "/etc/ssh/ssh_prng_cmds" >> debian/openssh-client/DEBIAN/conffiles
182 dh_shlibdeps
183 dh_gencontrol -- -V'debconf-depends=debconf (>= $(MINDEBCONFVER))'
184 dh_md5sums
185 dh_builddeb
186
187binary-openssh-server: DH_OPTIONS=-popenssh-server
188binary-openssh-server: build install
189 dh_testdir
190 dh_testroot
191ifeq ($(PO2DEBCONF),yes)
192 po2debconf -e utf8 debian/openssh-server.templates.master > debian/openssh-server.templates
193endif
194 dh_installdebconf
195 dh_installdocs OVERVIEW README
196 cat debian/copyright.head LICENCE > debian/openssh-server/usr/share/doc/openssh-server/copyright
169ifeq ($(PAMSUBST),yes) 197ifeq ($(PAMSUBST),yes)
170 # Clean up if we've done this already, to ensure idempotency. 198 # Clean up if we've done this already, to ensure idempotency.
171 if [ -f debian/ssh.pam.new-style ]; then \ 199 if [ -f debian/openssh-server.ssh.pam.new-style ]; then \
172 mv debian/ssh.pam.new-style debian/ssh.pam; \ 200 mv debian/openssh-server.ssh.pam.new-style debian/openssh-server.ssh.pam; \
173 fi 201 fi
174 cp -a debian/ssh.pam debian/ssh.pam.new-style 202 cp -a debian/openssh-server.ssh.pam debian/openssh-server.ssh.pam.new-style
175 sed -e "s/@include common-auth/auth required pam_unix.so/" \ 203 sed -e "s/@include common-auth/auth required pam_unix.so/" \
176 -e "s/@include common-account/account required pam_unix.so/" \ 204 -e "s/@include common-account/account required pam_unix.so/" \
177 -e "s/@include common-session/session required pam_unix.so/" \ 205 -e "s/@include common-session/session required pam_unix.so/" \
178 -e "s/@include common-password/password required pam_unix.so/" \ 206 -e "s/@include common-password/password required pam_unix.so/" \
179 debian/ssh.pam.new-style > debian/ssh.pam 207 debian/openssh-server.ssh.pam.new-style > debian/openssh-server.ssh.pam
180endif 208endif
181 dh_installpam 209 dh_installpam --name ssh # TODO: breaks woody backports
182 dh_installchangelogs ChangeLog 210 dh_installchangelogs ChangeLog
183 dh_strip 211 dh_strip
184 dh_compress 212 dh_compress
185 dh_fixperms 213 dh_fixperms
186 dh_installdeb 214 dh_installdeb
187 test ! -e debian/ssh/etc/ssh/ssh_prng_cmds \
188 || echo "/etc/ssh/ssh_prng_cmds" >> debian/ssh/DEBIAN/conffiles
189 dh_shlibdeps 215 dh_shlibdeps
190 dh_gencontrol -- -V'debconf-depends=debconf (>= $(MINDEBCONFVER))' \ 216 dh_gencontrol -- -V'debconf-depends=debconf (>= $(MINDEBCONFVER))' \
191 -V'pam-depends=$(PAMDEP)' 217 -V'pam-depends=$(PAMDEP)'
192 dh_md5sums 218 dh_md5sums
193 dh_builddeb 219 dh_builddeb
194 220
221binary-ssh: DH_OPTIONS=-pssh
222binary-ssh: build install
223 dh_testdir
224 dh_testroot
225 dh_installdocs
226 dh_installchangelogs
227 dh_compress
228 dh_fixperms
229 dh_installdeb
230 dh_gencontrol
231 dh_md5sums
232 dh_builddeb
233
195binary-ssh-askpass-gnome: DH_OPTIONS=-pssh-askpass-gnome 234binary-ssh-askpass-gnome: DH_OPTIONS=-pssh-askpass-gnome
196binary-ssh-askpass-gnome: build install 235binary-ssh-askpass-gnome: build install
197 dh_testdir 236 dh_testdir
@@ -237,5 +276,7 @@ binary-openssh-server-udeb: build install
237binary: binary-indep binary-arch 276binary: binary-indep binary-arch
238 277
239.PHONY: build clean binary-indep binary-arch binary install 278.PHONY: build clean binary-indep binary-arch binary install
240.PHONY: build-deb build-udeb binary-ssh binary-ssh-askpass-gnome 279.PHONY: build-deb build-udeb
280.PHONY: binary-openssh-client binary-openssh-server binary-ssh
281.PHONY: binary-ssh-askpass-gnome
241.PHONY: binary-openssh-client-udeb binary-openssh-server-udeb 282.PHONY: binary-openssh-client-udeb binary-openssh-server-udeb