1 2 # Some of this will need re-evaluation post-LSB. The SVIdir is there 3 # because the link appeared broken. The rest is for easy compilation, 4 # the tradeoff open to discussion. (LC957) 5 6 %define SVIdir /etc/rc.d/init.d 7 %{!?_defaultdocdir:%define _defaultdocdir %{_prefix}/share/doc/packages} 8 %{!?SVIcdir:%define SVIcdir /etc/sysconfig/daemons} 9 10 %define _mandir %{_prefix}/share/man/en 11 %define _sysconfdir /etc/ssh 12 %define _libexecdir %{_libdir}/ssh 13 14 # Do we want to disable root_login? (1=yes 0=no) 15 %define no_root_login 0 16 17 #old cvs stuff. please update before use. may be deprecated. 18 %define use_stable 1 19 %define version 5.9p1 20 %if %{use_stable} 21 %define cvs %{nil} 22 %define release 1 23 %else 24 %define cvs cvs20050315 25 %define release 0r1 26 %endif 27 %define xsa x11-ssh-askpass 28 %define askpass %{xsa}-1.2.4.1 29 30 # OpenSSH privilege separation requires a user & group ID 31 %define sshd_uid 67 32 %define sshd_gid 67 33 34 Name : openssh 35 Version : %{version}%{cvs} 36 Release : %{release} 37 Group : System/Network 38 39 Summary : OpenSSH free Secure Shell (SSH) implementation. 40 Summary(de) : OpenSSH - freie Implementation der Secure Shell (SSH). 41 Summary(es) : OpenSSH implementacin libre de Secure Shell (SSH). 42 Summary(fr) : Implmentation libre du shell scuris OpenSSH (SSH). 43 Summary(it) : Implementazione gratuita OpenSSH della Secure Shell. 44 Summary(pt) : Implementao livre OpenSSH do protocolo 'Secure Shell' (SSH). 45 Summary(pt_BR) : Implementao livre OpenSSH do protocolo Secure Shell (SSH). 46 47 Copyright : BSD 48 Packager : Raymund Will <ray@caldera.de> 49 URL : http://www.openssh.com/ 50 51 Obsoletes : ssh, ssh-clients, openssh-clients 52 53 BuildRoot : /tmp/%{name}-%{version} 54 BuildRequires : XFree86-imake 55 56 # %{use_stable}==1: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable 57 # %{use_stable}==0: :pserver:cvs (at] bass.directhit.com:/cvs/openssh_cvs 58 Source0: see-above:/.../openssh-%{version}.tar.gz 59 %if %{use_stable} 60 Source1: see-above:/.../openssh-%{version}.tar.gz.asc 61 %endif 62 Source2: http://www.jmknoble.net/software/%{xsa}/%{askpass}.tar.gz 63 Source3: http://www.openssh.com/faq.html 64 65 %Package server 66 Group : System/Network 67 Requires : openssh = %{version} 68 Obsoletes : ssh-server 69 70 Summary : OpenSSH Secure Shell protocol server (sshd). 71 Summary(de) : OpenSSH Secure Shell Protocol-Server (sshd). 72 Summary(es) : Servidor del protocolo OpenSSH Secure Shell (sshd). 73 Summary(fr) : Serveur de protocole du shell scuris OpenSSH (sshd). 74 Summary(it) : Server OpenSSH per il protocollo Secure Shell (sshd). 75 Summary(pt) : Servidor do protocolo 'Secure Shell' OpenSSH (sshd). 76 Summary(pt_BR) : Servidor do protocolo Secure Shell OpenSSH (sshd). 77 78 79 %Package askpass 80 Group : System/Network 81 Requires : openssh = %{version} 82 URL : http://www.jmknoble.net/software/x11-ssh-askpass/ 83 Obsoletes : ssh-extras 84 85 Summary : OpenSSH X11 pass-phrase dialog. 86 Summary(de) : OpenSSH X11 Passwort-Dialog. 87 Summary(es) : Aplicacin de peticin de frase clave OpenSSH X11. 88 Summary(fr) : Dialogue pass-phrase X11 d'OpenSSH. 89 Summary(it) : Finestra di dialogo X11 per la frase segreta di OpenSSH. 90 Summary(pt) : Dilogo de pedido de senha para X11 do OpenSSH. 91 Summary(pt_BR) : Dilogo de pedido de senha para X11 do OpenSSH. 92 93 94 %Description 95 OpenSSH (Secure Shell) provides access to a remote system. It replaces 96 telnet, rlogin, rexec, and rsh, and provides secure encrypted 97 communications between two untrusted hosts over an insecure network. 98 X11 connections and arbitrary TCP/IP ports can also be forwarded over 99 the secure channel. 100 101 %Description -l de 102 OpenSSH (Secure Shell) stellt den Zugang zu anderen Rechnern her. Es ersetzt 103 telnet, rlogin, rexec und rsh und stellt eine sichere, verschlsselte 104 Verbindung zwischen zwei nicht vertrauenswrdigen Hosts ber eine unsicheres 105 Netzwerk her. X11 Verbindungen und beliebige andere TCP/IP Ports knnen ebenso 106 ber den sicheren Channel weitergeleitet werden. 107 108 %Description -l es 109 OpenSSH (Secure Shell) proporciona acceso a sistemas remotos. Reemplaza a 110 telnet, rlogin, rexec, y rsh, y proporciona comunicaciones seguras encriptadas 111 entre dos equipos entre los que no se ha establecido confianza a travs de una 112 red insegura. Las conexiones X11 y puertos TCP/IP arbitrarios tambin pueden 113 ser canalizadas sobre el canal seguro. 114 115 %Description -l fr 116 OpenSSH (Secure Shell) fournit un accs un systme distant. Il remplace 117 telnet, rlogin, rexec et rsh, tout en assurant des communications cryptes 118 securises entre deux htes non fiabiliss sur un rseau non scuris. Des 119 connexions X11 et des ports TCP/IP arbitraires peuvent galement tre 120 transmis sur le canal scuris. 121 122 %Description -l it 123 OpenSSH (Secure Shell) fornisce l'accesso ad un sistema remoto. 124 Sostituisce telnet, rlogin, rexec, e rsh, e fornisce comunicazioni sicure 125 e crittate tra due host non fidati su una rete non sicura. Le connessioni 126 X11 ad una porta TCP/IP arbitraria possono essere inoltrate attraverso 127 un canale sicuro. 128 129 %Description -l pt 130 OpenSSH (Secure Shell) fornece acesso a um sistema remoto. Substitui o 131 telnet, rlogin, rexec, e o rsh e fornece comunicaes seguras e cifradas 132 entre duas mquinas sem confiana mtua sobre uma rede insegura. 133 Ligaes X11 e portos TCP/IP arbitrrios tambm poder ser reenviados 134 pelo canal seguro. 135 136 %Description -l pt_BR 137 O OpenSSH (Secure Shell) fornece acesso a um sistema remoto. Substitui o 138 telnet, rlogin, rexec, e o rsh e fornece comunicaes seguras e criptografadas 139 entre duas mquinas sem confiana mtua sobre uma rede insegura. 140 Ligaes X11 e portas TCP/IP arbitrrias tambm podem ser reenviadas 141 pelo canal seguro. 142 143 %Description server 144 This package installs the sshd, the server portion of OpenSSH. 145 146 %Description -l de server 147 Dieses Paket installiert den sshd, den Server-Teil der OpenSSH. 148 149 %Description -l es server 150 Este paquete instala sshd, la parte servidor de OpenSSH. 151 152 %Description -l fr server 153 Ce paquetage installe le 'sshd', partie serveur de OpenSSH. 154 155 %Description -l it server 156 Questo pacchetto installa sshd, il server di OpenSSH. 157 158 %Description -l pt server 159 Este pacote intala o sshd, o servidor do OpenSSH. 160 161 %Description -l pt_BR server 162 Este pacote intala o sshd, o servidor do OpenSSH. 163 164 %Description askpass 165 This package contains an X11-based pass-phrase dialog used per 166 default by ssh-add(1). It is based on %{askpass} 167 by Jim Knoble <jmknoble@pobox.com>. 168 169 170 %Prep 171 %setup %([ -z "%{cvs}" ] || echo "-n %{name}_cvs") -a2 172 %if ! %{use_stable} 173 autoreconf 174 %endif 175 176 177 %Build 178 CFLAGS="$RPM_OPT_FLAGS" \ 179 %configure \ 180 --with-pam \ 181 --with-tcp-wrappers \ 182 --with-privsep-path=%{_var}/empty/sshd \ 183 #leave this line for easy edits. 184 185 %__make 186 187 cd %{askpass} 188 %configure \ 189 #leave this line for easy edits. 190 191 xmkmf 192 %__make includes 193 %__make 194 195 196 %Install 197 [ %{buildroot} != "/" ] && rm -rf %{buildroot} 198 199 make install DESTDIR=%{buildroot} 200 %makeinstall -C %{askpass} \ 201 BINDIR=%{_libexecdir} \ 202 MANPATH=%{_mandir} \ 203 DESTDIR=%{buildroot} 204 205 # OpenLinux specific configuration 206 mkdir -p %{buildroot}{/etc/pam.d,%{SVIcdir},%{SVIdir}} 207 mkdir -p %{buildroot}%{_var}/empty/sshd 208 209 # enabling X11 forwarding on the server is convenient and okay, 210 # on the client side it's a potential security risk! 211 %__perl -pi -e 's:#X11Forwarding no:X11Forwarding yes:g' \ 212 %{buildroot}%{_sysconfdir}/sshd_config 213 214 %if %{no_root_login} 215 %__perl -pi -e 's:#PermitRootLogin yes:PermitRootLogin no:g' \ 216 %{buildroot}%{_sysconfdir}/sshd_config 217 %endif 218 219 install -m644 contrib/caldera/sshd.pam %{buildroot}/etc/pam.d/sshd 220 # FIXME: disabled, find out why this doesn't work with nis 221 %__perl -pi -e 's:(.*pam_limits.*):#$1:' \ 222 %{buildroot}/etc/pam.d/sshd 223 224 install -m 0755 contrib/caldera/sshd.init %{buildroot}%{SVIdir}/sshd 225 226 # the last one is needless, but more future-proof 227 find %{buildroot}%{SVIdir} -type f -exec \ 228 %__perl -pi -e 's:\@SVIdir\@:%{SVIdir}:g;\ 229 s:\@sysconfdir\@:%{_sysconfdir}:g; \ 230 s:/usr/sbin:%{_sbindir}:g'\ 231 \{\} \; 232 233 cat <<-EoD > %{buildroot}%{SVIcdir}/sshd 234 IDENT=sshd 235 DESCRIPTIVE="OpenSSH secure shell daemon" 236 # This service will be marked as 'skipped' on boot if there 237 # is no host key. Use ssh-host-keygen to generate one 238 ONBOOT="yes" 239 OPTIONS="" 240 EoD 241 242 SKG=%{buildroot}%{_sbindir}/ssh-host-keygen 243 install -m 0755 contrib/caldera/ssh-host-keygen $SKG 244 # Fix up some path names in the keygen toy^Hol 245 %__perl -pi -e 's:\@sysconfdir\@:%{_sysconfdir}:g; \ 246 s:\@sshkeygen\@:%{_bindir}/ssh-keygen:g' \ 247 %{buildroot}%{_sbindir}/ssh-host-keygen 248 249 # This looks terrible. Expect it to change. 250 # install remaining docs 251 DocD="%{buildroot}%{_defaultdocdir}/%{name}-%{version}" 252 mkdir -p $DocD/%{askpass} 253 cp -a CREDITS ChangeLog LICENCE OVERVIEW README* TODO PROTOCOL* $DocD 254 install -p -m 0444 %{SOURCE3} $DocD/faq.html 255 cp -a %{askpass}/{README,ChangeLog,TODO,SshAskpass*.ad} $DocD/%{askpass} 256 %if %{use_stable} 257 cp -p %{askpass}/%{xsa}.man $DocD/%{askpass}/%{xsa}.1 258 %else 259 cp -p %{askpass}/%{xsa}.man %{buildroot}%{_mandir}man1/%{xsa}.1 260 ln -s %{xsa}.1 %{buildroot}%{_mandir}man1/ssh-askpass.1 261 %endif 262 263 find %{buildroot}%{_mandir} -type f -not -name '*.gz' -print0 | xargs -0r %__gzip -9nf 264 rm %{buildroot}%{_mandir}/man1/slogin.1 && \ 265 ln -s %{_mandir}/man1/ssh.1.gz \ 266 %{buildroot}%{_mandir}/man1/slogin.1.gz 267 268 269 %Clean 270 #%{rmDESTDIR} 271 [ %{buildroot} != "/" ] && rm -rf %{buildroot} 272 273 %Post 274 # Generate host key when none is present to get up and running, 275 # both client and server require this for host-based auth! 276 # ssh-host-keygen checks for existing keys. 277 /usr/sbin/ssh-host-keygen 278 : # to protect the rpm database 279 280 %pre server 281 %{_sbindir}/groupadd -g %{sshd_gid} sshd 2>/dev/null || : 282 %{_sbindir}/useradd -d /var/empty/sshd -s /bin/false -u %{sshd_uid} \ 283 -c "SSH Daemon virtual user" -g sshd sshd 2>/dev/null || : 284 : # to protect the rpm database 285 286 %Post server 287 if [ -x %{LSBinit}-install ]; then 288 %{LSBinit}-install sshd 289 else 290 lisa --SysV-init install sshd S55 2:3:4:5 K45 0:1:6 291 fi 292 293 ! %{SVIdir}/sshd status || %{SVIdir}/sshd restart 294 : # to protect the rpm database 295 296 297 %PreUn server 298 [ "$1" = 0 ] || exit 0 299 ! %{SVIdir}/sshd status || %{SVIdir}/sshd stop 300 if [ -x %{LSBinit}-remove ]; then 301 %{LSBinit}-remove sshd 302 else 303 lisa --SysV-init remove sshd $1 304 fi 305 : # to protect the rpm database 306 307 %Files 308 %defattr(-,root,root) 309 %dir %{_sysconfdir} 310 %config %{_sysconfdir}/ssh_config 311 %{_bindir}/scp 312 %{_bindir}/sftp 313 %{_bindir}/ssh 314 %{_bindir}/slogin 315 %{_bindir}/ssh-add 316 %attr(2755,root,nobody) %{_bindir}/ssh-agent 317 %{_bindir}/ssh-keygen 318 %{_bindir}/ssh-keyscan 319 %dir %{_libexecdir} 320 %attr(4711,root,root) %{_libexecdir}/ssh-keysign 321 %{_libexecdir}/ssh-pkcs11-helper 322 %{_sbindir}/ssh-host-keygen 323 %dir %{_defaultdocdir}/%{name}-%{version} 324 %{_defaultdocdir}/%{name}-%{version}/CREDITS 325 %{_defaultdocdir}/%{name}-%{version}/ChangeLog 326 %{_defaultdocdir}/%{name}-%{version}/LICENCE 327 %{_defaultdocdir}/%{name}-%{version}/OVERVIEW 328 %{_defaultdocdir}/%{name}-%{version}/README* 329 %{_defaultdocdir}/%{name}-%{version}/TODO 330 %{_defaultdocdir}/%{name}-%{version}/faq.html 331 %{_mandir}/man1/* 332 %{_mandir}/man8/ssh-keysign.8.gz 333 %{_mandir}/man8/ssh-pkcs11-helper.8.gz 334 %{_mandir}/man5/ssh_config.5.gz 335 336 %Files server 337 %defattr(-,root,root) 338 %dir %{_var}/empty/sshd 339 %config %{SVIdir}/sshd 340 %config /etc/pam.d/sshd 341 %config %{_sysconfdir}/moduli 342 %config %{_sysconfdir}/sshd_config 343 %config %{SVIcdir}/sshd 344 %{_libexecdir}/sftp-server 345 %{_sbindir}/sshd 346 %{_mandir}/man5/moduli.5.gz 347 %{_mandir}/man5/sshd_config.5.gz 348 %{_mandir}/man8/sftp-server.8.gz 349 %{_mandir}/man8/sshd.8.gz 350 351 %Files askpass 352 %defattr(-,root,root) 353 %{_libexecdir}/ssh-askpass 354 %{_libexecdir}/x11-ssh-askpass 355 %{_defaultdocdir}/%{name}-%{version}/%{askpass} 356 357 358 %ChangeLog 359 * Tue Jan 18 2011 Tim Rice <tim@multitalents.net> 360 - Use CFLAGS from Makefile instead of RPM so build completes. 361 - Signatures were changed to .asc since 4.1p1. 362 363 * Mon Jan 01 1998 ... 364 Template Version: 1.31 365 366 $Id: openssh.spec,v 1.75.2.1 2011/09/05 00:28:11 djm Exp $ 367