1 |
kharec |
8803 |
# Version of ssh-askpass |
2 |
|
|
%define aversion 1.2.4.1 |
3 |
|
|
# Version of watchdog patch |
4 |
|
|
%define wversion 4.4p1 |
5 |
|
|
|
6 |
|
|
# Version of the hpn patch |
7 |
|
|
%define hpnver 13v6 |
8 |
|
|
|
9 |
|
|
# overrides |
10 |
|
|
%define build_skey 0 |
11 |
|
|
%define build_krb5 1 |
12 |
|
|
%define build_watchdog 0 |
13 |
|
|
%define build_x11askpass 1 |
14 |
|
|
%define build_gnomeaskpass 1 |
15 |
|
|
%define build_ldap 0 |
16 |
|
|
%define build_sftpcontrol 0 |
17 |
|
|
%define build_hpn 0 |
18 |
|
|
%define build_audit 0 |
19 |
|
|
%define build_libedit 1 |
20 |
|
|
|
21 |
|
|
%{?_with_skey: %{expand: %%global build_skey 1}} |
22 |
|
|
%{?_without_skey: %{expand: %%global build_skey 0}} |
23 |
|
|
%{?_with_krb5: %{expand: %%global build_krb5 1}} |
24 |
|
|
%{?_without_krb5: %{expand: %%global build_krb5 0}} |
25 |
|
|
%{?_with_watchdog: %{expand: %%global build_watchdog 1}} |
26 |
|
|
%{?_without_watchdog: %{expand: %%global build_watchdog 0}} |
27 |
|
|
%{?_with_x11askpass: %{expand: %%global build_x11askpass 1}} |
28 |
|
|
%{?_without_x11askpass: %{expand: %%global build_x11askpass 0}} |
29 |
|
|
%{?_with_gnomeaskpass: %{expand: %%global build_gnomeaskpass 1}} |
30 |
|
|
%{?_without_gnomeaskpass: %{expand: %%global build_gnomeaskpass 0}} |
31 |
|
|
%{?_with_ldap: %{expand: %%global build_ldap 1}} |
32 |
|
|
%{?_without_ldap: %{expand: %%global build_ldap 0}} |
33 |
|
|
%{?_with_sftpcontrol: %{expand: %%global build_sftpcontrol 1}} |
34 |
|
|
%{?_without_sftpcontrol: %{expand: %%global build_sftpcontrol 0}} |
35 |
|
|
%{?_with_hpn: %{expand: %%global build_hpn 1}} |
36 |
|
|
%{?_without_hpn: %{expand: %%global build_hpn 0}} |
37 |
|
|
%{?_with_audit: %{expand: %%global build_audit 1}} |
38 |
|
|
%{?_without_audit: %{expand: %%global build_audit 0}} |
39 |
|
|
%{?_with_libedit: %{expand: %%global build_libedit 1}} |
40 |
|
|
%{?_without_libedit: %{expand: %%global build_libedit 0}} |
41 |
|
|
|
42 |
|
|
%define OPENSSH_PATH "/usr/local/bin:/bin:%{_bindir}" |
43 |
|
|
%define XAUTH %{_bindir}/xauth |
44 |
|
|
|
45 |
|
|
Summary: OpenSSH free Secure Shell (SSH) implementation |
46 |
|
|
Name: openssh |
47 |
pterjan |
139290 |
Version: 5.9p1 |
48 |
colin |
227672 |
Release: %mkrel 2 |
49 |
kharec |
8803 |
License: BSD |
50 |
|
|
Group: Networking/Remote access |
51 |
|
|
URL: http://www.openssh.com/ |
52 |
|
|
Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz |
53 |
|
|
Source1: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz.asc |
54 |
|
|
Source2: http://www.ntrnet.net/~jmknoble/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.bz2 |
55 |
|
|
# ssh-copy-id taken from debian, with "usage" added |
56 |
|
|
Source3: ssh-copy-id |
57 |
|
|
Source7: openssh-xinetd |
58 |
|
|
Source9: README.sftpfilecontrol |
59 |
|
|
# this is never to be applied by default |
60 |
|
|
# http://www.sc.isc.tohoku.ac.jp/~hgot/sources/openssh-watchdog.html |
61 |
|
|
Source10: openssh-%{wversion}-watchdog.patch.tgz |
62 |
|
|
Source12: ssh_ldap_key.pl |
63 |
|
|
Source15: ssh-avahi-integration |
64 |
|
|
Source17: sshd.pam |
65 |
|
|
Source18: sshd.init |
66 |
|
|
Source21: README.hpn |
67 |
colin |
227672 |
Source22: sshd-keygen.service |
68 |
|
|
Source23: sshd.service |
69 |
|
|
Source24: sshd.socket |
70 |
misc |
86237 |
# patch to set some default configuration |
71 |
blino |
18288 |
Patch1: openssh-distro_conf.diff |
72 |
kharec |
8803 |
# authorized by Damien Miller <djm@openbsd.com> |
73 |
misc |
86237 |
# patch to lower the check on openssl version, should likely be removed |
74 |
kharec |
8803 |
Patch3: openssh-3.1p1-check-only-ssl-version.patch |
75 |
misc |
86237 |
|
76 |
kharec |
8803 |
# rediffed from openssh-4.4p1-watchdog.patch.tgz |
77 |
|
|
Patch4: openssh-4.4p1-watchdog.diff |
78 |
|
|
# optional ldap support |
79 |
|
|
# http://dev.inversepath.com/trac/openssh-lpk |
80 |
|
|
#Patch6: http://dev.inversepath.com/openssh-lpk/openssh-lpk-4.6p1-0.3.9.patch |
81 |
|
|
# new location for the lpk patch. |
82 |
|
|
# rediffed from "svn checkout http://openssh-lpk.googlecode.com/svn/trunk/ openssh-lpk-read-only" |
83 |
|
|
Patch6: openssh-lpk-5.4p1-0.3.10.diff |
84 |
|
|
# http://sftpfilecontrol.sourceforge.net |
85 |
|
|
# Not applied by default |
86 |
|
|
# P7 is rediffed and slightly adjusted from http://sftplogging.sourceforge.net/download/v1.5/openssh-4.4p1.sftplogging-v1.5.patch |
87 |
|
|
Patch7: openssh-4.9p1.sftplogging-v1.5.diff |
88 |
|
|
# (tpg) http://www.psc.edu/networking/projects/hpn-ssh/ |
89 |
|
|
Patch11: http://www.psc.edu/networking/projects/hpn-ssh/openssh-5.2p1-hpn%{hpnver}.diff |
90 |
|
|
Patch12: http://www.psc.edu/networking/projects/hpn-ssh/openssh5.1-peaktput.diff |
91 |
|
|
#gw: from Fedora: |
92 |
|
|
#fix round-robin DNS with GSSAPI authentification |
93 |
|
|
Patch13: openssh-4.3p2-gssapi-canohost.patch |
94 |
|
|
Patch14: openssh-4.7p1-audit.patch |
95 |
|
|
Patch17: openssh-5.1p1-askpass-progress.patch |
96 |
|
|
Patch18: openssh-4.3p2-askpass-grab-info.patch |
97 |
|
|
Patch19: openssh-4.0p1-exit-deadlock.patch |
98 |
|
|
Patch21: openssh_tcp_wrappers.patch |
99 |
colin |
227672 |
Patch22: openssh-5.9p1-log-usepam-no.patch |
100 |
kharec |
8803 |
Provides: ssh |
101 |
|
|
Requires(post): openssl >= 0.9.7 |
102 |
|
|
Requires(post): makedev |
103 |
|
|
Requires(preun): openssl >= 0.9.7 |
104 |
|
|
Requires: tcp_wrappers |
105 |
|
|
BuildRequires: groff-for-man |
106 |
|
|
BuildRequires: openssl-devel >= 0.9.7 |
107 |
|
|
BuildRequires: pam-devel |
108 |
|
|
BuildRequires: tcp_wrappers-devel |
109 |
|
|
BuildRequires: zlib-devel |
110 |
|
|
%if %{build_skey} |
111 |
|
|
BuildRequires: skey-devel |
112 |
|
|
%endif |
113 |
|
|
%if %{build_krb5} |
114 |
|
|
BuildRequires: krb5-devel |
115 |
|
|
%endif |
116 |
|
|
%if %{build_x11askpass} |
117 |
|
|
BuildRequires: imake |
118 |
|
|
BuildRequires: rman |
119 |
|
|
# http://qa.mandriva.com/show_bug.cgi?id=22736 |
120 |
|
|
BuildRequires: x11-util-cf-files >= 1.0.2 |
121 |
|
|
BuildRequires: gccmakedep |
122 |
|
|
BuildRequires: libx11-devel |
123 |
|
|
BuildRequires: libxt-devel |
124 |
|
|
%endif |
125 |
|
|
%if %{build_gnomeaskpass} |
126 |
|
|
BuildRequires: gtk+2-devel |
127 |
|
|
%endif |
128 |
|
|
%if %{build_ldap} |
129 |
|
|
BuildRequires: openldap-devel >= 2.0 |
130 |
|
|
%endif |
131 |
|
|
%if %{build_audit} |
132 |
|
|
BuildRequires: audit-devel |
133 |
|
|
%endif |
134 |
|
|
%if %{build_libedit} |
135 |
|
|
BuildRequires: edit-devel ncurses-devel |
136 |
|
|
%endif |
137 |
|
|
BuildConflicts: libgssapi-devel |
138 |
|
|
|
139 |
|
|
%description |
140 |
|
|
Ssh (Secure Shell) is a program for logging into a remote machine and for |
141 |
|
|
executing commands in a remote machine. It is intended to replace |
142 |
|
|
rlogin and rsh, and provide secure encrypted communications between |
143 |
|
|
two untrusted hosts over an insecure network. X11 connections and |
144 |
|
|
arbitrary TCP/IP ports can also be forwarded over the secure channel. |
145 |
|
|
|
146 |
|
|
OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it |
147 |
|
|
up to date in terms of security and features, as well as removing all |
148 |
|
|
patented algorithms to separate libraries (OpenSSL). |
149 |
|
|
|
150 |
|
|
This package includes the core files necessary for both the OpenSSH |
151 |
|
|
client and server. To make this package useful, you should also |
152 |
|
|
install openssh-clients, openssh-server, or both. |
153 |
|
|
|
154 |
|
|
You can build %{name} with some conditional build swithes; |
155 |
|
|
|
156 |
|
|
(ie. use with rpm --rebuild): |
157 |
|
|
|
158 |
|
|
--with[out] skey smartcard support (disabled) |
159 |
|
|
--with[out] krb5 kerberos support (enabled) |
160 |
|
|
--with[out] watchdog watchdog support (disabled) |
161 |
|
|
--with[out] x11askpass X11 ask pass support (enabled) |
162 |
|
|
--with[out] gnomeaskpass Gnome ask pass support (enabled) |
163 |
|
|
--with[out] ldap OpenLDAP support (disabled) |
164 |
|
|
--with[out] sftpcontrol sftp file control support (disabled) |
165 |
|
|
--with[out] hpn HPN ssh/scp support (disabled) |
166 |
|
|
--with[out] audit audit support (disabled) |
167 |
|
|
--with[out] libedit libedit support in sftp (enabled) |
168 |
|
|
|
169 |
|
|
%package clients |
170 |
|
|
Summary: OpenSSH Secure Shell protocol clients |
171 |
|
|
Group: Networking/Remote access |
172 |
|
|
Requires: %{name} = %{version}-%{release} |
173 |
|
|
Provides: ssh-clients, sftp, ssh |
174 |
|
|
|
175 |
|
|
%description clients |
176 |
|
|
Ssh (Secure Shell) is a program for logging into a remote machine and for |
177 |
|
|
executing commands in a remote machine. It is intended to replace |
178 |
|
|
rlogin and rsh, and provide secure encrypted communications between |
179 |
|
|
two untrusted hosts over an insecure network. X11 connections and |
180 |
|
|
arbitrary TCP/IP ports can also be forwarded over the secure channel. |
181 |
|
|
|
182 |
|
|
OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it |
183 |
|
|
up to date in terms of security and features, as well as removing all |
184 |
|
|
patented algorithms to separate libraries (OpenSSL). |
185 |
|
|
|
186 |
|
|
This package includes the clients necessary to make encrypted connections |
187 |
|
|
to SSH servers. |
188 |
|
|
|
189 |
|
|
%package server |
190 |
|
|
Summary: OpenSSH Secure Shell protocol server (sshd) |
191 |
|
|
Group: System/Servers |
192 |
|
|
Requires(pre): %{name} = %{version}-%{release} chkconfig >= 0.9 |
193 |
|
|
Requires(pre): pam >= 0.74 |
194 |
|
|
Requires(pre): rpm-helper |
195 |
|
|
Requires(post): rpm-helper |
196 |
|
|
Requires(preun): rpm-helper |
197 |
|
|
Requires(postun): rpm-helper |
198 |
|
|
Requires(post): openssl >= 0.9.7 |
199 |
|
|
Requires(post): makedev |
200 |
|
|
Requires: %{name}-clients = %{version}-%{release} |
201 |
|
|
%if %{build_skey} |
202 |
|
|
Requires: skey |
203 |
|
|
%endif |
204 |
|
|
%if %{build_audit} |
205 |
|
|
BuildRequires: audit |
206 |
|
|
%endif |
207 |
|
|
Provides: ssh-server, sshd |
208 |
|
|
|
209 |
|
|
%description server |
210 |
|
|
Ssh (Secure Shell) is a program for logging into a remote machine and for |
211 |
|
|
executing commands in a remote machine. It is intended to replace |
212 |
|
|
rlogin and rsh, and provide secure encrypted communications between |
213 |
|
|
two untrusted hosts over an insecure network. X11 connections and |
214 |
|
|
arbitrary TCP/IP ports can also be forwarded over the secure channel. |
215 |
|
|
|
216 |
|
|
OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it |
217 |
|
|
up to date in terms of security and features, as well as removing all |
218 |
|
|
patented algorithms to separate libraries (OpenSSL). |
219 |
|
|
|
220 |
|
|
This package contains the secure shell daemon. The sshd is the server |
221 |
|
|
part of the secure shell protocol and allows ssh clients to connect to |
222 |
|
|
your host. |
223 |
|
|
|
224 |
|
|
%package askpass-common |
225 |
|
|
Summary: OpenSSH X11 passphrase common scripts |
226 |
|
|
Group: Networking/Remote access |
227 |
|
|
|
228 |
|
|
%description askpass-common |
229 |
|
|
OpenSSH X11 passphrase common scripts |
230 |
|
|
|
231 |
|
|
%if %{build_x11askpass} |
232 |
|
|
%package askpass |
233 |
|
|
Summary: OpenSSH X11 passphrase dialog |
234 |
|
|
Group: Networking/Remote access |
235 |
|
|
Requires: %{name} = %{version}-%{release} |
236 |
|
|
Requires: %{name}-askpass-common |
237 |
|
|
Provides: ssh-extras, ssh-askpass |
238 |
|
|
Requires(pre): update-alternatives |
239 |
|
|
|
240 |
|
|
%description askpass |
241 |
|
|
Ssh (Secure Shell) is a program for logging into a remote machine and for |
242 |
|
|
executing commands in a remote machine. It is intended to replace |
243 |
|
|
rlogin and rsh, and provide secure encrypted communications between |
244 |
|
|
two untrusted hosts over an insecure network. X11 connections and |
245 |
|
|
arbitrary TCP/IP ports can also be forwarded over the secure channel. |
246 |
|
|
|
247 |
|
|
OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it |
248 |
|
|
up to date in terms of security and features, as well as removing all |
249 |
|
|
patented algorithms to separate libraries (OpenSSL). |
250 |
|
|
|
251 |
|
|
This package contains Jim Knoble's <jmknoble@pobox.com> X11 passphrase |
252 |
|
|
dialog. |
253 |
|
|
%endif |
254 |
|
|
|
255 |
|
|
%if %{build_gnomeaskpass} |
256 |
|
|
%package askpass-gnome |
257 |
|
|
Summary: OpenSSH GNOME passphrase dialog |
258 |
|
|
Group: Networking/Remote access |
259 |
|
|
Requires: %{name} = %{version}-%{release} |
260 |
|
|
Requires: %{name}-askpass-common |
261 |
|
|
Requires(pre): update-alternatives |
262 |
|
|
Provides: %{name}-askpass, ssh-askpass, ssh-extras |
263 |
|
|
|
264 |
|
|
%description askpass-gnome |
265 |
|
|
Ssh (Secure Shell) is a program for logging into a remote machine and for |
266 |
|
|
executing commands in a remote machine. It is intended to replace |
267 |
|
|
rlogin and rsh, and provide secure encrypted communications between |
268 |
|
|
two untrusted hosts over an insecure network. X11 connections and |
269 |
|
|
arbitrary TCP/IP ports can also be forwarded over the secure channel. |
270 |
|
|
|
271 |
|
|
OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it |
272 |
|
|
up to date in terms of security and features, as well as removing all |
273 |
|
|
patented algorithms to separate libraries (OpenSSL). |
274 |
|
|
|
275 |
|
|
This package contains the GNOME passphrase dialog. |
276 |
|
|
%endif |
277 |
|
|
|
278 |
|
|
%prep |
279 |
|
|
%if %{build_x11askpass} |
280 |
|
|
echo "Building with x11 askpass..." |
281 |
|
|
%endif |
282 |
|
|
%if %{build_gnomeaskpass} |
283 |
|
|
echo "Building with GNOME askpass..." |
284 |
|
|
%endif |
285 |
|
|
%if %{build_krb5} |
286 |
|
|
echo "Building with Kerberos5 support..." |
287 |
|
|
%endif |
288 |
|
|
%if %{build_skey} |
289 |
|
|
echo "Building with S/KEY support..." |
290 |
|
|
%endif |
291 |
|
|
%if %{build_watchdog} |
292 |
|
|
echo "Building with watchdog support..." |
293 |
|
|
%endif |
294 |
|
|
%if %{build_ldap} |
295 |
|
|
echo "Buiding with support for authenticating to public keys in ldap" |
296 |
|
|
%endif |
297 |
|
|
%if %{build_sftpcontrol} |
298 |
|
|
echo "Buiding with support for sftp file control" |
299 |
|
|
%endif |
300 |
|
|
%if %{build_hpn} |
301 |
|
|
echo "Buiding with support for High Performance Network SSH/SCP" |
302 |
|
|
%endif |
303 |
|
|
%if %{build_audit} |
304 |
|
|
echo "Buiding with audit support" |
305 |
|
|
%endif |
306 |
|
|
|
307 |
|
|
%setup -q -a2 -a10 |
308 |
|
|
|
309 |
blino |
18288 |
%patch1 -p1 -b .distro_conf |
310 |
kharec |
8803 |
%patch3 -p1 -b .ssl_ver |
311 |
|
|
%if %{build_watchdog} |
312 |
|
|
#patch -p0 -s -z .wdog < %{name}-%{wversion}-watchdog.patch |
313 |
|
|
%patch4 -p1 -b .watchdog |
314 |
|
|
%endif |
315 |
|
|
%if %{build_ldap} |
316 |
|
|
sed -i 's|UsePrivilegeSeparation yes|#UsePrivilegeSeparation yes|' sshd_config |
317 |
|
|
%patch6 -p1 -b .lpk |
318 |
|
|
rm -f README.lpk.lpk |
319 |
|
|
%define _default_patch_fuzz 3 |
320 |
|
|
%else |
321 |
|
|
%define _default_patch_fuzz 2 |
322 |
|
|
%endif |
323 |
|
|
%if %{build_sftpcontrol} |
324 |
|
|
#cat %{SOURCE8} | patch -p1 -s -z .sftpcontrol |
325 |
|
|
echo "This patch is broken or needs to be updated/rediffed"; exit 1 |
326 |
|
|
%patch7 -p1 -b .sftplogging-v1.5 |
327 |
|
|
# README with license terms for this patch |
328 |
|
|
install -m 0644 %{SOURCE9} . |
329 |
|
|
%endif |
330 |
|
|
%if %{build_hpn} |
331 |
|
|
echo "This patch is broken or needs to be updated/rediffed"; exit 1 |
332 |
|
|
%patch11 -p1 -b .hpn |
333 |
|
|
%patch12 -p1 -b .peak |
334 |
|
|
install %{SOURCE21} . |
335 |
|
|
%endif |
336 |
|
|
%patch13 -p1 -b .canohost |
337 |
|
|
%if %{build_audit} |
338 |
|
|
%patch14 -p1 -b .audit |
339 |
|
|
%endif |
340 |
|
|
%patch17 -p1 -b .progress |
341 |
|
|
%patch18 -p1 -b .grab-info |
342 |
|
|
%patch19 -p1 -b .exit-deadlock |
343 |
|
|
%patch21 -p1 -b .tcp_wrappers_mips |
344 |
colin |
227672 |
%patch22 -p1 -b .pam |
345 |
kharec |
8803 |
|
346 |
blino |
18287 |
install %{SOURCE12} . |
347 |
kharec |
8803 |
|
348 |
|
|
install -m 0644 %{SOURCE17} sshd.pam |
349 |
|
|
install -m 0755 %{SOURCE18} sshd.init |
350 |
|
|
|
351 |
|
|
# fix attribs |
352 |
|
|
chmod 644 ChangeLog OVERVIEW README* INSTALL CREDITS LICENCE TODO ssh_ldap_key.pl |
353 |
|
|
|
354 |
|
|
# http://qa.mandriva.com/show_bug.cgi?id=22957 |
355 |
|
|
perl -pi -e "s|_OPENSSH_PATH_|%{OPENSSH_PATH}|g" sshd_config |
356 |
|
|
|
357 |
|
|
%build |
358 |
|
|
autoreconf |
359 |
|
|
|
360 |
|
|
%serverbuild |
361 |
|
|
|
362 |
|
|
%if %{build_x11askpass} |
363 |
|
|
pushd x11-ssh-askpass-%{aversion} |
364 |
|
|
%configure2_5x \ |
365 |
|
|
--prefix=%{_prefix} --libdir=%{_libdir} \ |
366 |
|
|
--mandir=%{_mandir} --libexecdir=%{_libdir}/ssh \ |
367 |
|
|
--with-app-defaults-dir=%{_sysconfdir}/X11/app-defaults \ |
368 |
|
|
%if %{build_libedit} |
369 |
|
|
--with-libedit \ |
370 |
|
|
%else |
371 |
|
|
--without-libedit \ |
372 |
|
|
%endif |
373 |
|
|
|
374 |
|
|
xmkmf -a |
375 |
|
|
|
376 |
|
|
%ifarch x86_64 |
377 |
|
|
perl -pi -e "s|/usr/lib\b|%{_libdir}|g" Makefile |
378 |
blino |
18289 |
perl -pi -e "s|i586-%{_vendor}-linux-gnu|x86_64-%{_vendor}-linux-gnu|g" Makefile |
379 |
kharec |
8803 |
perl -pi -e "s|%{_libdir}/gcc/|/usr/lib/gcc/|g" Makefile |
380 |
|
|
perl -pi -e "s|-m32|-m64|g" Makefile |
381 |
|
|
perl -pi -e "s|__i386__|__x86_64__|g" Makefile |
382 |
|
|
%endif |
383 |
|
|
|
384 |
|
|
make \ |
385 |
|
|
BINDIR=%{_libdir}/ssh \ |
386 |
|
|
CDEBUGFLAGS="$RPM_OPT_FLAGS" \ |
387 |
|
|
CXXDEBUGFLAGS="$RPM_OPT_FLAGS" |
388 |
|
|
|
389 |
|
|
# For some reason the x11-ssh-askpass.1.html file is not created on 10.0/10.1 |
390 |
|
|
# x86_64, so we just do it manually here... (oden) |
391 |
|
|
rm -f x11-ssh-askpass.1x.html x11-ssh-askpass.1x-html |
392 |
|
|
rman -f HTML < x11-ssh-askpass._man > x11-ssh-askpass.1x-html && \ |
393 |
|
|
mv -f x11-ssh-askpass.1x-html x11-ssh-askpass.1.html |
394 |
|
|
popd |
395 |
|
|
%endif |
396 |
|
|
|
397 |
|
|
%if %{build_gnomeaskpass} |
398 |
|
|
pushd contrib |
399 |
|
|
make gnome-ssh-askpass2 CC="%__cc %optflags %ldflags" |
400 |
|
|
mv gnome-ssh-askpass2 gnome-ssh-askpass |
401 |
|
|
popd |
402 |
|
|
%endif |
403 |
|
|
|
404 |
|
|
%configure2_5x \ |
405 |
|
|
--prefix=%{_prefix} \ |
406 |
|
|
--sysconfdir=%{_sysconfdir}/ssh \ |
407 |
|
|
--mandir=%{_mandir} \ |
408 |
|
|
--libdir=%{_libdir} \ |
409 |
|
|
--libexecdir=%{_libdir}/ssh \ |
410 |
|
|
--datadir=%{_datadir}/ssh \ |
411 |
|
|
--disable-strip \ |
412 |
|
|
--with-tcp-wrappers \ |
413 |
|
|
--with-pam \ |
414 |
|
|
--with-default-path=%{OPENSSH_PATH} \ |
415 |
|
|
--with-xauth=%{XAUTH} \ |
416 |
|
|
--with-privsep-path=/var/empty \ |
417 |
|
|
--without-zlib-version-check \ |
418 |
|
|
%if %{build_krb5} |
419 |
|
|
--with-kerberos5=%{_prefix} \ |
420 |
|
|
%endif |
421 |
|
|
%if %{build_skey} |
422 |
|
|
--with-skey \ |
423 |
|
|
%endif |
424 |
|
|
%if %{build_ldap} |
425 |
|
|
--with-libs="-lldap -llber" \ |
426 |
|
|
--with-cppflags="-DWITH_LDAP_PUBKEY -DLDAP_DEPRECATED" \ |
427 |
|
|
%endif |
428 |
|
|
--with-superuser-path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:%{_sbindir}:%{_bindir} \ |
429 |
|
|
%if %{build_libedit} |
430 |
|
|
--with-libedit \ |
431 |
|
|
%else |
432 |
|
|
--without-libedit \ |
433 |
|
|
%endif |
434 |
|
|
%if %{build_audit} |
435 |
|
|
--with-linux-audit \ |
436 |
|
|
%endif |
437 |
|
|
|
438 |
|
|
%make |
439 |
|
|
|
440 |
|
|
%install |
441 |
|
|
rm -rf %{buildroot} |
442 |
|
|
|
443 |
|
|
%makeinstall_std |
444 |
|
|
|
445 |
|
|
install -d %{buildroot}%{_sysconfdir}/ssh |
446 |
|
|
install -d %{buildroot}%{_sysconfdir}/pam.d/ |
447 |
|
|
install -d %{buildroot}%{_sysconfdir}/sysconfig |
448 |
|
|
install -d %{buildroot}%{_initrddir} |
449 |
guillomovitch |
152967 |
install -m 644 sshd.pam %{buildroot}%{_sysconfdir}/pam.d/sshd |
450 |
|
|
install -m 755 sshd.init %{buildroot}%{_initrddir}/sshd |
451 |
kharec |
8803 |
|
452 |
guillomovitch |
152967 |
if [ -f sshd_config.out ]; then |
453 |
|
|
install -m 600 sshd_config.out %{buildroot}%{_sysconfdir}/ssh/sshd_config |
454 |
kharec |
8803 |
else |
455 |
guillomovitch |
152967 |
install -m 600 sshd_config %{buildroot}%{_sysconfdir}/ssh/sshd_config |
456 |
kharec |
8803 |
fi |
457 |
|
|
echo "root" > %{buildroot}%{_sysconfdir}/ssh/denyusers |
458 |
|
|
|
459 |
guillomovitch |
152967 |
if [ -f ssh_config.out ]; then |
460 |
|
|
install -m 644 ssh_config.out %{buildroot}%{_sysconfdir}/ssh/ssh_config |
461 |
kharec |
8803 |
else |
462 |
guillomovitch |
152967 |
install -m 644 ssh_config %{buildroot}%{_sysconfdir}/ssh/ssh_config |
463 |
kharec |
8803 |
fi |
464 |
|
|
echo " StrictHostKeyChecking no" >> %{buildroot}%{_sysconfdir}/ssh/ssh_config |
465 |
|
|
|
466 |
|
|
mkdir -p %{buildroot}%{_libdir}/ssh |
467 |
|
|
%if %{build_x11askpass} |
468 |
|
|
pushd x11-ssh-askpass-%{aversion} |
469 |
|
|
#make DESTDIR=%{buildroot} install |
470 |
|
|
#make DESTDIR=%{buildroot} install.man |
471 |
|
|
#install -d %{buildroot}%{_prefix}/X11R6/lib/X11/doc/html |
472 |
|
|
#install -m0644 x11-ssh-askpass.1.html %{buildroot}%{_prefix}/X11R6/lib/X11/doc/html/ |
473 |
|
|
install -d %{buildroot}%{_libdir}/ssh |
474 |
|
|
install -d %{buildroot}%{_sysconfdir}/X11/app-defaults |
475 |
guillomovitch |
152967 |
install -m 644 SshAskpass.ad %{buildroot}%{_sysconfdir}/X11/app-defaults/SshAskpass |
476 |
|
|
install -m 755 x11-ssh-askpass %{buildroot}%{_libdir}/ssh/ |
477 |
|
|
install -m 644 x11-ssh-askpass.man %{buildroot}%{_mandir}/man1/x11-ssh-askpass.1 |
478 |
kharec |
8803 |
popd |
479 |
|
|
%endif |
480 |
|
|
|
481 |
|
|
install -d %{buildroot}%{_sysconfdir}/profile.d/ |
482 |
|
|
%if %{build_gnomeaskpass} |
483 |
|
|
install -m 755 contrib/gnome-ssh-askpass %{buildroot}%{_libdir}/ssh/gnome-ssh-askpass |
484 |
|
|
%endif |
485 |
|
|
|
486 |
|
|
cat > %{buildroot}%{_sysconfdir}/profile.d/90ssh-askpass.csh <<EOF |
487 |
|
|
setenv SSH_ASKPASS %{_libdir}/ssh/ssh-askpass |
488 |
|
|
EOF |
489 |
|
|
|
490 |
|
|
cat > %{buildroot}%{_sysconfdir}/profile.d/90ssh-askpass.sh <<EOF |
491 |
|
|
export SSH_ASKPASS=%{_libdir}/ssh/ssh-askpass |
492 |
|
|
EOF |
493 |
|
|
|
494 |
|
|
cat > %{buildroot}%{_sysconfdir}/profile.d/90ssh-client.sh <<'EOF' |
495 |
|
|
# fix hanging ssh clients on exit |
496 |
|
|
if [ -n "$BASH_VERSION" ]; then |
497 |
|
|
shopt -s huponexit |
498 |
|
|
elif [ -n "$ZSH_VERSION" ]; then |
499 |
|
|
setopt hup |
500 |
|
|
fi |
501 |
|
|
EOF |
502 |
|
|
|
503 |
guillomovitch |
152967 |
install -m 755 %{SOURCE3} %{buildroot}/%{_bindir}/ssh-copy-id |
504 |
kharec |
8803 |
chmod a+x %{buildroot}/%{_bindir}/ssh-copy-id |
505 |
|
|
install -m 644 contrib/ssh-copy-id.1 %{buildroot}/%{_mandir}/man1/ |
506 |
|
|
|
507 |
|
|
# create pre-authentication directory |
508 |
guillomovitch |
152967 |
install -d -m 755 %{buildroot}/var/empty |
509 |
kharec |
8803 |
|
510 |
|
|
# remove unwanted files |
511 |
|
|
rm -f %{buildroot}%{_libdir}/ssh/ssh-askpass |
512 |
|
|
|
513 |
|
|
# xinetd support (tv) |
514 |
guillomovitch |
152967 |
install -d -m 755 %{buildroot}%{_sysconfdir}/xinetd.d/ |
515 |
|
|
install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/xinetd.d/sshd-xinetd |
516 |
kharec |
8803 |
|
517 |
|
|
cat > %{buildroot}%{_sysconfdir}/sysconfig/sshd << EOF |
518 |
|
|
#OPTIONS="" |
519 |
|
|
EOF |
520 |
|
|
|
521 |
|
|
# avahi integration support (misc) |
522 |
|
|
mkdir -p %{buildroot}%{_sysconfdir}/avahi/services/ |
523 |
|
|
install -m 0644 %{SOURCE15} %{buildroot}%{_sysconfdir}/avahi/services/%{name}.service |
524 |
|
|
|
525 |
guillomovitch |
152967 |
install -d -m 755 %{buildroot}%{_unitdir} |
526 |
|
|
install -m 644 %{SOURCE22} %{buildroot}%{_unitdir}/sshd-keygen.service |
527 |
|
|
install -m 644 %{SOURCE23} %{buildroot}%{_unitdir}/sshd.service |
528 |
colin |
227672 |
install -m 644 %{SOURCE24} %{buildroot}%{_unitdir}/sshd.socket |
529 |
guillomovitch |
152967 |
|
530 |
kharec |
8803 |
# make sure strip can touch it |
531 |
|
|
chmod 755 %{buildroot}%{_libdir}/ssh/ssh-keysign |
532 |
|
|
|
533 |
|
|
%pre server |
534 |
|
|
%_pre_useradd sshd /var/empty /bin/true |
535 |
|
|
|
536 |
|
|
%post server |
537 |
|
|
# do some key management; taken from the initscript |
538 |
|
|
|
539 |
|
|
KEYGEN=/usr/bin/ssh-keygen |
540 |
|
|
RSA1_KEY=/etc/ssh/ssh_host_key |
541 |
|
|
RSA_KEY=/etc/ssh/ssh_host_rsa_key |
542 |
|
|
DSA_KEY=/etc/ssh/ssh_host_dsa_key |
543 |
|
|
|
544 |
|
|
do_rsa1_keygen() { |
545 |
|
|
if [ ! -s $RSA1_KEY ]; then |
546 |
|
|
echo -n "Generating SSH1 RSA host key... " |
547 |
|
|
if $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then |
548 |
|
|
chmod 600 $RSA1_KEY |
549 |
|
|
chmod 644 $RSA1_KEY.pub |
550 |
|
|
echo "done" |
551 |
|
|
echo |
552 |
|
|
else |
553 |
|
|
echo "failed" |
554 |
|
|
echo |
555 |
|
|
exit 1 |
556 |
|
|
fi |
557 |
|
|
fi |
558 |
|
|
} |
559 |
|
|
|
560 |
|
|
do_rsa_keygen() { |
561 |
|
|
if [ ! -s $RSA_KEY ]; then |
562 |
|
|
echo "Generating SSH2 RSA host key... " |
563 |
|
|
if $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then |
564 |
|
|
chmod 600 $RSA_KEY |
565 |
|
|
chmod 644 $RSA_KEY.pub |
566 |
|
|
echo "done" |
567 |
|
|
echo |
568 |
|
|
else |
569 |
|
|
echo "failed" |
570 |
|
|
echo |
571 |
|
|
exit 1 |
572 |
|
|
fi |
573 |
|
|
fi |
574 |
|
|
} |
575 |
|
|
|
576 |
|
|
do_dsa_keygen() { |
577 |
|
|
if [ ! -s $DSA_KEY ]; then |
578 |
|
|
echo "Generating SSH2 DSA host key... " |
579 |
|
|
if $KEYGEN -q -t dsa -f $DSA_KEY -C '' -N '' >&/dev/null; then |
580 |
|
|
chmod 600 $DSA_KEY |
581 |
|
|
chmod 644 $DSA_KEY.pub |
582 |
|
|
echo "done" |
583 |
|
|
echo |
584 |
|
|
else |
585 |
|
|
echo "failed" |
586 |
|
|
echo |
587 |
|
|
exit 1 |
588 |
|
|
fi |
589 |
|
|
fi |
590 |
|
|
} |
591 |
|
|
|
592 |
|
|
do_rsa1_keygen |
593 |
|
|
do_rsa_keygen |
594 |
|
|
do_dsa_keygen |
595 |
|
|
%_post_service sshd |
596 |
|
|
|
597 |
|
|
%preun server |
598 |
|
|
%_preun_service sshd |
599 |
|
|
|
600 |
|
|
%postun server |
601 |
|
|
%_postun_userdel sshd |
602 |
|
|
|
603 |
|
|
%if %{build_x11askpass} |
604 |
|
|
%post askpass |
605 |
|
|
update-alternatives --install %{_libdir}/ssh/ssh-askpass ssh-askpass %{_libdir}/ssh/x11-ssh-askpass 10 |
606 |
|
|
update-alternatives --install %{_bindir}/ssh-askpass bssh-askpass %{_libdir}/ssh/x11-ssh-askpass 10 |
607 |
|
|
|
608 |
|
|
%postun askpass |
609 |
|
|
[ $1 = 0 ] || exit 0 |
610 |
|
|
update-alternatives --remove ssh-askpass %{_libdir}/ssh/x11-ssh-askpass |
611 |
|
|
update-alternatives --remove bssh-askpass %{_libdir}/ssh/x11-ssh-askpass |
612 |
|
|
%endif |
613 |
|
|
|
614 |
|
|
%if %{build_gnomeaskpass} |
615 |
|
|
%post askpass-gnome |
616 |
|
|
update-alternatives --install %{_libdir}/ssh/ssh-askpass ssh-askpass %{_libdir}/ssh/gnome-ssh-askpass 20 |
617 |
|
|
update-alternatives --install %{_bindir}/ssh-askpass bssh-askpass %{_libdir}/ssh/gnome-ssh-askpass 20 |
618 |
|
|
|
619 |
|
|
%postun askpass-gnome |
620 |
|
|
[ $1 = 0 ] || exit 0 |
621 |
|
|
update-alternatives --remove ssh-askpass %{_libdir}/ssh/gnome-ssh-askpass |
622 |
|
|
update-alternatives --remove bssh-askpass %{_libdir}/ssh/gnome-ssh-askpass |
623 |
|
|
%endif |
624 |
|
|
|
625 |
|
|
%triggerpostun server -- openssh-server < 3.8p1 |
626 |
|
|
if grep -qE "^\W*auth\W+\w+\W+.*pam_(ldap|winbind|mysql)" /etc/pam.d/system-auth /etc/pam.d/sshd; then |
627 |
|
|
perl -pi -e 's|^#UsePAM no|UsePAM yes|' /etc/ssh/sshd_config |
628 |
|
|
fi |
629 |
|
|
|
630 |
|
|
%files |
631 |
|
|
%doc ChangeLog OVERVIEW README* INSTALL CREDITS LICENCE TODO ssh_ldap_key.pl |
632 |
|
|
%if %{build_ldap} |
633 |
|
|
%doc *.schema |
634 |
|
|
%endif |
635 |
|
|
%if %{build_watchdog} |
636 |
|
|
%doc CHANGES-openssh-watchdog openssh-watchdog.html |
637 |
|
|
%endif |
638 |
|
|
%if %{build_sftpcontrol} |
639 |
|
|
%doc README.sftpfilecontrol |
640 |
|
|
%endif |
641 |
|
|
%{_bindir}/ssh-keygen |
642 |
|
|
%dir %{_sysconfdir}/ssh |
643 |
|
|
%{_bindir}/ssh-keyscan |
644 |
|
|
%attr(4711,root,root) %{_libdir}/ssh/ssh-keysign |
645 |
|
|
%{_libdir}/ssh/ssh-pkcs11-helper |
646 |
|
|
%{_mandir}/man1/ssh-keygen.1* |
647 |
|
|
%{_mandir}/man1/ssh-keyscan.1* |
648 |
|
|
%{_mandir}/man8/ssh-keysign.8* |
649 |
|
|
%{_mandir}/man8/ssh-pkcs11-helper.8* |
650 |
|
|
|
651 |
|
|
%files clients |
652 |
|
|
%{_bindir}/scp |
653 |
|
|
%{_bindir}/ssh |
654 |
|
|
%{_bindir}/ssh-agent |
655 |
|
|
%{_bindir}/ssh-add |
656 |
|
|
%{_bindir}/ssh-copy-id |
657 |
|
|
%{_bindir}/slogin |
658 |
|
|
%{_bindir}/sftp |
659 |
|
|
%{_mandir}/man1/scp.1* |
660 |
|
|
%{_mandir}/man1/ssh-copy-id.1* |
661 |
|
|
%{_mandir}/man1/slogin.1* |
662 |
|
|
%{_mandir}/man1/ssh.1* |
663 |
|
|
%{_mandir}/man1/ssh-agent.1* |
664 |
|
|
%{_mandir}/man1/ssh-add.1* |
665 |
|
|
%{_mandir}/man1/sftp.1* |
666 |
|
|
%{_mandir}/man5/ssh_config.5* |
667 |
|
|
%config(noreplace) %{_sysconfdir}/ssh/ssh_config |
668 |
|
|
%{_sysconfdir}/profile.d/90ssh-client.sh |
669 |
|
|
|
670 |
|
|
%files server |
671 |
guillomovitch |
152967 |
%config(noreplace) %{_sysconfdir}/sysconfig/sshd |
672 |
kharec |
8803 |
%{_sbindir}/sshd |
673 |
|
|
%dir %{_libdir}/ssh |
674 |
|
|
%{_libdir}/ssh/sftp-server |
675 |
|
|
%{_mandir}/man5/sshd_config.5* |
676 |
|
|
%{_mandir}/man5/moduli.5* |
677 |
|
|
%{_mandir}/man8/sshd.8* |
678 |
|
|
%{_mandir}/man8/sftp-server.8* |
679 |
|
|
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config |
680 |
|
|
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/denyusers |
681 |
|
|
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/pam.d/sshd |
682 |
|
|
%config(noreplace) %_sysconfdir/xinetd.d/sshd-xinetd |
683 |
|
|
%config(noreplace) %{_sysconfdir}/avahi/services/%{name}.service |
684 |
|
|
%config(noreplace) %{_sysconfdir}/ssh/moduli |
685 |
guillomovitch |
152967 |
%{_initrddir}/sshd |
686 |
|
|
%{_unitdir}/sshd-keygen.service |
687 |
|
|
%{_unitdir}/sshd.service |
688 |
colin |
227672 |
%{_unitdir}/sshd.socket |
689 |
guillomovitch |
152967 |
%dir /var/empty |
690 |
kharec |
8803 |
|
691 |
|
|
%files askpass-common |
692 |
|
|
%{_sysconfdir}/profile.d/90ssh-askpass.* |
693 |
|
|
|
694 |
|
|
%if %{build_x11askpass} |
695 |
|
|
%files askpass |
696 |
|
|
%doc x11-ssh-askpass-%{aversion}/README |
697 |
|
|
%doc x11-ssh-askpass-%{aversion}/ChangeLog |
698 |
|
|
%doc x11-ssh-askpass-%{aversion}/SshAskpass*.ad |
699 |
|
|
%doc x11-ssh-askpass-%{aversion}/x11-ssh-askpass.1.html |
700 |
|
|
%{_libdir}/ssh/x11-ssh-askpass |
701 |
|
|
%{_sysconfdir}/X11/app-defaults/SshAskpass |
702 |
|
|
%{_mandir}/man1/x11-ssh-askpass.1* |
703 |
|
|
%endif |
704 |
|
|
|
705 |
|
|
%if %{build_gnomeaskpass} |
706 |
|
|
%files askpass-gnome |
707 |
|
|
%{_libdir}/ssh/gnome-ssh-askpass |
708 |
|
|
%endif |