2 %define oversion 2.9.9p1
4 # Version of ssh-askpass
7 # Do we want to disable building of x11-askpass? (1=yes 0=no)
8 %define no_x11_askpass 0
10 # Do we want to disable building of gnome-askpass? (1=yes 0=no)
11 %define no_gnome_askpass 0
13 # Do we want to link against a static libcrypto? (1=yes 0=no)
14 %define static_libcrypto 0
16 # Do we want smartcard support (1=yes 0=no)
19 # Use Redhat 7.0 pam control file
22 # Reserve options to override askpass settings with:
23 # rpm -ba|--rebuild --define 'skip_xxx 1'
24 %{?skip_x11_askpass:%define no_x11_askpass 1}
25 %{?skip_gnome_askpass:%define no_gnome_askpass 1}
27 # Options for Redhat version:
28 # rpm -ba|--rebuild --define "rh7 1"
29 %{?rh7:%define redhat7 1}
31 # Options for static OpenSSL link:
32 # rpm -ba|--rebuild --define "static_openssl 1"
33 %{?static_openssl:%define static_libcrypto 1}
35 # Options for Smartcard support: (needs libsectok and openssl-engine)
36 # rpm -ba|--rebuild --define "smartcard 1"
37 %{?smartcard:%define scard 1}
39 %define exact_openssl_version %(rpm -q openssl | cut -d - -f 2)
41 Summary: The OpenSSH implementation of SSH.
45 Packager: Damien Miller <djm@mindrot.org>
46 URL: http://www.openssh.com/portable.html
47 Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{oversion}.tar.gz
48 %if ! %{no_x11_askpass}
49 Source1: http://www.pobox.com/~jmknoble/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.gz
52 Group: Applications/Internet
53 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
55 BuildPreReq: perl, openssl-devel, tcp_wrappers
56 BuildPreReq: /bin/login, /usr/include/security/pam_appl.h
57 BuildPreReq: rpm >= 3.0.5
58 %if ! %{no_x11_askpass}
59 BuildPreReq: XFree86-devel
61 %if ! %{no_gnome_askpass}
62 BuildPreReq: gnome-libs-devel
64 %if ! %{static_libcrypto}
65 PreReq: openssl >= 0.9.5a
66 PreReq: openssl = %{exact_openssl_version}
67 Requires: openssl >= 0.9.5a
69 Requires: rpm >= 3.0.5
72 Summary: OpenSSH clients.
73 Requires: openssh = %{version}-%{release}
74 Group: Applications/Internet
75 Obsoletes: ssh-clients
78 Summary: The OpenSSH server daemon.
79 Group: System Environment/Daemons
81 PreReq: openssh = %{version}-%{release}, chkconfig >= 0.9
83 Requires: /etc/pam.d/system-auth
87 Summary: A passphrase dialog for OpenSSH and X.
88 Group: Applications/Internet
89 Requires: openssh = %{version}-%{release}
92 %package askpass-gnome
93 Summary: A passphrase dialog for OpenSSH, X, and GNOME.
94 Group: Applications/Internet
95 Requires: openssh = %{version}-%{release}
99 OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation. SSH
100 replaces rlogin and rsh, to provide secure encrypted communications
101 between two untrusted hosts over an insecure network. X11 connections
102 and arbitrary TCP/IP ports can also be forwarded over the secure
103 channel. Public key authentication may be used for "passwordless"
106 This package includes the core files necessary for both the OpenSSH
107 client and server. To make this package useful, you should also
108 install openssh-clients, openssh-server, or both.
111 OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation.
113 This package includes the clients necessary to make encrypted
114 connections to SSH protocol servers. You'll also need to install the
115 openssh package on OpenSSH clients.
118 OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation.
120 This package contains the secure shell daemon (sshd). The sshd daemon
121 allows SSH clients to securely connect to your SSH server. You also
122 need to have the openssh package installed.
125 OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation.
127 This package contains an X11 passphrase dialog for OpenSSH.
129 %description askpass-gnome
130 OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation.
132 This package contains an X11 passphrase dialog for OpenSSH and the
133 GNOME GUI desktop environment.
137 %if ! %{no_x11_askpass}
145 %define _sysconfdir /etc/ssh
150 EXTRA_OPTS="$EXTRA_OPTS --with-smartcard"
154 --libexecdir=%{_libexecdir}/openssh \
155 --datadir=%{_datadir}/openssh \
157 --with-tcp-wrappers \
158 --with-ipv4-default \
159 --with-rsh=/usr/bin/rsh \
160 --with-default-path=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin \
163 %if %{static_libcrypto}
164 perl -pi -e "s|-lcrypto|/usr/lib/libcrypto.a|g" Makefile
169 %if ! %{no_x11_askpass}
170 pushd x11-ssh-askpass-%{aversion}
172 --libexecdir=%{_libexecdir}/openssh
178 %if ! %{no_gnome_askpass}
180 gcc -O -g `gnome-config --cflags gnome gnomeui` \
181 gnome-ssh-askpass.c -o gnome-ssh-askpass \
182 `gnome-config --libs gnome gnomeui`
187 rm -rf $RPM_BUILD_ROOT
189 libexecdir=$RPM_BUILD_ROOT%{_libexecdir}/openssh \
190 datadir=$RPM_BUILD_ROOT%{_datadir}/openssh \
191 DESTDIR=/ # Hack to disable key generation
194 install -d $RPM_BUILD_ROOT/etc/pam.d/
195 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
196 install -d $RPM_BUILD_ROOT%{_libexecdir}/openssh
198 install -m644 contrib/redhat/sshd.pam-7.x $RPM_BUILD_ROOT/etc/pam.d/sshd
200 install -m644 contrib/redhat/sshd.pam $RPM_BUILD_ROOT/etc/pam.d/sshd
202 install -m755 contrib/redhat/sshd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
204 %if ! %{no_x11_askpass}
205 install -s x11-ssh-askpass-%{aversion}/x11-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/x11-ssh-askpass
206 ln -s /usr/libexec/openssh/x11-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/ssh-askpass
209 %if ! %{no_gnome_askpass}
210 install -s contrib/gnome-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/gnome-ssh-askpass
213 perl -pi -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT%{_mandir}/man*/*
216 rm -rf $RPM_BUILD_ROOT
219 /sbin/chkconfig --add sshd
220 if test -r /var/run/sshd.pid ; then
221 /etc/rc.d/init.d/sshd restart >&2
225 if [ "$1" = 0 ] ; then
226 /etc/rc.d/init.d/sshd stop >&2
227 /sbin/chkconfig --del sshd
231 %defattr(-,root,root)
232 %doc CREDITS ChangeLog INSTALL LICENCE OVERVIEW README* RFC* TODO WARNING*
233 %attr(0755,root,root) %{_bindir}/ssh-keygen
234 %attr(0755,root,root) %{_bindir}/scp
235 %attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1*
236 %attr(0644,root,root) %{_mandir}/man1/scp.1*
237 %attr(0755,root,root) %dir %{_sysconfdir}
238 %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/moduli
239 %attr(0755,root,root) %dir %{_libexecdir}/openssh
241 %attr(0755,root,root) %dir %{_datadir}/openssh
242 %attr(0644,root,root) %{_datadir}/openssh/Ssh.bin
246 %defattr(-,root,root)
247 %attr(4755,root,root) %{_bindir}/ssh
248 %attr(0755,root,root) %{_bindir}/ssh-agent
249 %attr(0755,root,root) %{_bindir}/ssh-add
250 %attr(0755,root,root) %{_bindir}/ssh-keyscan
251 %attr(0755,root,root) %{_bindir}/sftp
252 %attr(0644,root,root) %{_mandir}/man1/ssh.1*
253 %attr(0644,root,root) %{_mandir}/man1/ssh-agent.1*
254 %attr(0644,root,root) %{_mandir}/man1/ssh-add.1*
255 %attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1*
256 %attr(0644,root,root) %{_mandir}/man1/sftp.1*
257 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh_config
258 %attr(-,root,root) %{_bindir}/slogin
259 %attr(-,root,root) %{_mandir}/man1/slogin.1*
262 %defattr(-,root,root)
263 %attr(0755,root,root) %{_sbindir}/sshd
264 %attr(0755,root,root) %{_libexecdir}/openssh/sftp-server
265 %attr(0644,root,root) %{_mandir}/man8/sshd.8*
266 %attr(0644,root,root) %{_mandir}/man8/sftp-server.8*
267 #%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sshd_config
268 %attr(0600,root,root) %config %{_sysconfdir}/sshd_config
269 %attr(0600,root,root) %config(noreplace) /etc/pam.d/sshd
270 %attr(0755,root,root) %config /etc/rc.d/init.d/sshd
272 %if ! %{no_x11_askpass}
274 %defattr(-,root,root)
275 %doc x11-ssh-askpass-%{aversion}/README
276 %doc x11-ssh-askpass-%{aversion}/ChangeLog
277 %doc x11-ssh-askpass-%{aversion}/SshAskpass*.ad
278 %attr(0755,root,root) %{_libexecdir}/openssh/ssh-askpass
279 %attr(0755,root,root) %{_libexecdir}/openssh/x11-ssh-askpass
282 %if ! %{no_gnome_askpass}
284 %defattr(-,root,root)
285 %attr(0755,root,root) %{_libexecdir}/openssh/gnome-ssh-askpass
289 * Mon Oct 18 2000 Damien Miller <djm@mindrot.org>
290 - Merge some of Nalin Dahyabhai <nalin@redhat.com> changes from the
292 * Tue Sep 05 2000 Damien Miller <djm@mindrot.org>
293 - Use RPM configure macro
294 * Tue Aug 08 2000 Damien Miller <djm@mindrot.org>
295 - Some surgery to sshd.init (generate keys at runtime)
296 - Cleanup of groups and removal of keygen calls
297 * Wed Jul 12 2000 Damien Miller <djm@mindrot.org>
298 - Make building of X11-askpass and gnome-askpass optional
299 * Mon Jun 12 2000 Damien Miller <djm@mindrot.org>
300 - Glob manpages to catch compressed files
301 * Wed Mar 15 2000 Damien Miller <djm@ibs.com.au>
302 - Updated for new location
303 - Updated for new gnome-ssh-askpass build
304 * Sun Dec 26 1999 Damien Miller <djm@mindrot.org>
305 - Added Jim Knoble's <jmknoble@pobox.com> askpass
306 * Mon Nov 15 1999 Damien Miller <djm@mindrot.org>
307 - Split subpackages further based on patch from jim knoble <jmknoble@pobox.com>
308 * Sat Nov 13 1999 Damien Miller <djm@mindrot.org>
309 - Added 'Obsoletes' directives
310 * Tue Nov 09 1999 Damien Miller <djm@ibs.com.au>
313 * Mon Nov 08 1999 Damien Miller <djm@ibs.com.au>
314 - Added links for slogin
315 - Fixed perms on manpages
316 * Sat Oct 30 1999 Damien Miller <djm@ibs.com.au>
317 - Renamed init script
318 * Fri Oct 29 1999 Damien Miller <djm@ibs.com.au>
319 - Back to old binary names
320 * Thu Oct 28 1999 Damien Miller <djm@ibs.com.au>
323 * Wed Oct 27 1999 Damien Miller <djm@ibs.com.au>
324 - Initial RPMification, based on Jan "Yenya" Kasprzak's <kas@fi.muni.cz> spec.