8 %define cvs cvs20020515
11 %define xsa x11-ssh-askpass
12 %define askpass %{xsa}-1.2.4.1
15 Version : %{version}%{cvs}
17 Group : System/Network
19 Summary : OpenSSH free Secure Shell (SSH) implementation.
22 Packager : Raymund Will <ray@caldera.de>
23 URL : http://www.openssh.com/
25 Obsoletes : ssh, ssh-clients, openssh-clients
27 BuildRoot : /tmp/%{Name}-%{Version}
29 # %{use-stable}==1: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable
30 # %{use-stable}==0: :pserver:cvs@bass.directhit.com:/cvs/openssh_cvs
31 Source0: see-above:/.../openssh-%{Version}.tar.gz
33 Source1: see-above:/.../openssh-%{Version}.tar.gz.sig
35 Source2: http://www.ntrnet.net/~jmknoble/software/%{xsa}/%{askpass}.tar.gz
36 Source3: http://www.openssh.com/faq.html
40 Group : System/Network
41 Requires : openssh = %{Version}
42 Obsoletes : ssh-server
44 Summary : OpenSSH Secure Shell protocol server (sshd).
48 Group : System/Network
49 Requires : openssh = %{Version}
50 URL : http://www.ntrnet.net/~jmknoble/software/x11-ssh-askpass/
51 Obsoletes : ssh-extras
53 Summary : OpenSSH X11 pass-phrase dialog.
57 %setup %([ -z "%{cvs}" ] || echo "-n %{Name}_cvs") -a2
65 CFLAGS="$RPM_OPT_FLAGS" \
68 --sysconfdir=/etc/ssh \
69 --libexecdir=/usr/lib/ssh \
86 make DESTDIR="$DESTDIR" install
88 make -C %{askpass} BINDIR="/usr/lib/ssh" install
90 # OpenLinux specific configuration
91 mkdir -p $DESTDIR/{etc/pam.d,%{SVIcdir},%{SVIdir}}
93 # enabling X11 forwarding on the server is convenient and okay,
94 # on the client side we consider it a potential security risk!
95 %{fixUP} -vT $DESTDIR/etc/ssh/sshd_config -e '
96 s/#X11Forwarding no/X11Forwarding yes/i'
98 install -m644 contrib/caldera/sshd.pam $DESTDIR/etc/pam.d/sshd
99 # FIXME: disabled, find out why this doesn't work with NIS
100 %{fixUP} -vT $DESTDIR/etc/pam.d/sshd -e 's/^(.*pam_limits.*)$/#$1/'
102 install -m 0755 contrib/caldera/sshd.init $DESTDIR%{SVIdir}/sshd
103 %{fixUP} -vT $DESTDIR/%{SVIdir} -e 's:\@SVIdir\@:%{SVIdir}: +
104 s:\@sysconfdir\@:/etc/ssh:'
106 cat <<-EoD > $DESTDIR%{SVIcdir}/sshd
108 DESCRIPTIVE="OpenSSH secure shell daemon"
109 # This service will be marked as 'skipped' on boot if there
110 # is no host key. Use ssh-host-keygen to generate one.
115 SKG=$DESTDIR/usr/sbin/ssh-host-keygen
116 install -m 0755 contrib/caldera/ssh-host-keygen $SKG
117 %{fixUP} -T $SKG -e 's:\@sysconfdir\@:/etc/ssh: +
118 s:\@sshkeygen\@:/usr/bin/ssh-keygen:'
121 # install remaining docs
122 DocD="$DESTDIR%{_defaultdocdir}/%{Name}-%{Version}"; mkdir -p $DocD/00-LEGAL
123 cp -a LICENCE $DocD/00-LEGAL
124 cp -a CREDITS ChangeLog OVERVIEW README* TODO $DocD
125 install -p -m 0444 -o 0 -g 0 %{SOURCE3} $DocD/faq.html
126 mkdir -p $DocD/%{askpass}
127 cp -a %{askpass}/{README,ChangeLog,TODO,SshAskpass*.ad} $DocD/%{askpass}
129 cp -p %{askpass}/%{xsa}.man $DESTDIR/usr/man/man1/%{xsa}.1
130 ln -s %{xsa}.1 $DESTDIR/usr/man/man1/ssh-askpass.1
135 # generate file lists
136 %{mkLists} -c %{Name}
137 %{mkLists} -d %{Name} << 'EOF'
140 %{_defaultdocdir}/$ IGNORED
144 %{mkLists} -a -f %{Name} << 'EOF'
145 ^/etc * prefix(%%config)
146 /usr/X11R6/lib/X11/app-defaults IGNORED
147 Ssh.bin IGNORED # for now
149 %{_defaultdocdir}/%{Name}-%{Version}/ base
163 # Generate host key when none is present to get up and running,
164 # both client and server require this for host-based auth!
165 # ssh-host-keygen checks for existing keys.
166 /usr/sbin/ssh-host-keygen
167 : # to protect the rpm database
171 if [ -x %{LSBinit}-install ]; then
172 %{LSBinit}-install sshd
174 lisa --SysV-init install sshd S55 2:3:4:5 K45 0:1:6
177 ! %{SVIdir}/sshd status || %{SVIdir}/sshd restart
178 : # to protect the rpm database
182 [ "$1" = 0 ] || exit 0
184 ! %{SVIdir}/sshd status || %{SVIdir}/sshd stop
185 : # to protect the rpm database
189 if [ -x %{LSBinit}-remove ]; then
190 %{LSBinit}-remove sshd
192 lisa --SysV-init remove sshd $1
194 : # to protect the rpm database
197 %Files -f files-%{Name}-base
198 %defattr(-,root,root)
201 %Files server -f files-%{Name}-server
202 %defattr(-,root,root)
205 %Files askpass -f files-%{Name}-askpass
206 %defattr(-,root,root)
210 OpenSSH (Secure Shell) provides access to a remote system. It replaces
211 telnet, rlogin, rexec, and rsh, and provides secure encrypted
212 communications between two untrusted hosts over an insecure network.
213 X11 connections and arbitrary TCP/IP ports can also be forwarded over
217 This package installs the sshd, the server portion of OpenSSH.
220 This package contains an X11-based pass-phrase dialog used per
221 default by ssh-add(1). It is based on %{askpass}
222 by Jim Knoble <jmknoble@pobox.com>.
225 * Mon Jan 01 1998 ...