blob: 1e18aa9e10e32092ce6a08c53cb02235a168aa97 [file] [log] [blame]
Damien Miller36884401999-12-26 12:26:21 +11001# Version of OpenSSH
Damien Miller7387fdb2001-02-19 21:51:49 +11002%define oversion 2.5.1p1
Damien Miller36884401999-12-26 12:26:21 +11003
4# Version of ssh-askpass
Damien Miller09214542001-02-15 15:33:17 +11005%define aversion 1.2.0
Damien Miller36884401999-12-26 12:26:21 +11006
Damien Miller5a119bc2000-07-12 14:34:11 +10007# Do we want to disable building of x11-askpass? (1=yes 0=no)
8%define no_x11_askpass 0
9
10# Do we want to disable building of gnome-askpass? (1=yes 0=no)
11%define no_gnome_askpass 0
12
Damien Miller070ca312001-02-12 09:34:17 +110013# Use Redhat 7.0 pam control file
14%define redhat7 0
15
16# Reserve options to override askpass settings with:
17# rpm -ba|--rebuild --define 'skip_xxx 1'
18%{?skip_x11_askpass:%define no_x11_askpass 1}
19%{?skip_gnome_askpass:%define no_gnome_askpass 1}
20
21# Options for Redhat version:
22# rpm -ba|--rebuild --define "rh7 1"
23%{?rh7:%define redhat7 1}
24
Damien Millerd4a8b7e1999-10-27 13:42:43 +100025Summary: OpenSSH free Secure Shell (SSH) implementation
26Name: openssh
Damien Miller36884401999-12-26 12:26:21 +110027Version: %{oversion}
Damien Millerd4a8b7e1999-10-27 13:42:43 +100028Release: 1
Damien Millerab8d1922000-08-08 16:53:28 +100029Packager: Damien Miller <djm@mindrot.org>
Damien Miller11402af2000-05-07 18:05:59 +100030URL: http://www.openssh.com/
Damien Millerab8d1922000-08-08 16:53:28 +100031Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{oversion}.tar.gz
Damien Miller969c07e2000-11-06 13:06:43 +110032%if ! %{no_x11_askpass}
Damien Millerf1aa21f2001-01-05 09:30:32 +110033Source1: http://www.jmknoble.cx/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.gz
Damien Miller969c07e2000-11-06 13:06:43 +110034%endif
Damien Millerd4a8b7e1999-10-27 13:42:43 +100035Copyright: BSD
36Group: Applications/Internet
37BuildRoot: /tmp/openssh-%{version}-buildroot
Damien Millerc6d5ce81999-11-15 16:01:07 +110038Obsoletes: ssh
Damien Miller1383bd82000-04-06 12:32:37 +100039PreReq: openssl >= 0.9.5a
40Requires: openssl >= 0.9.5a
Damien Miller070ca312001-02-12 09:34:17 +110041Requires: rpm >= 3.0.5
Damien Miller969c07e2000-11-06 13:06:43 +110042BuildPreReq: perl, openssl-devel, tcp_wrappers
Damien Millerff649d82000-10-16 13:35:19 +110043BuildPreReq: /bin/login, /usr/bin/rsh, /usr/include/security/pam_appl.h
Damien Miller070ca312001-02-12 09:34:17 +110044BuildPreReq: rpm >= 3.0.5
Damien Millerab8d1922000-08-08 16:53:28 +100045%if ! %{no_gnome_askpass}
Damien Miller36884401999-12-26 12:26:21 +110046BuildPreReq: gnome-libs-devel
Damien Miller5a119bc2000-07-12 14:34:11 +100047%endif
Damien Miller36682061999-11-15 17:19:24 +110048
49%package clients
50Summary: OpenSSH Secure Shell protocol clients
Damien Millerff649d82000-10-16 13:35:19 +110051Requires: openssh = %{version}-%{release}
Damien Millerab8d1922000-08-08 16:53:28 +100052Group: Applications/Internet
Damien Millerc6d5ce81999-11-15 16:01:07 +110053Obsoletes: ssh-clients
Damien Millerd4a8b7e1999-10-27 13:42:43 +100054
Damien Miller3f51bf51999-11-09 14:46:02 +110055%package server
Damien Miller36682061999-11-15 17:19:24 +110056Summary: OpenSSH Secure Shell protocol server (sshd)
Damien Miller3f51bf51999-11-09 14:46:02 +110057Group: System Environment/Daemons
Damien Millerc6d5ce81999-11-15 16:01:07 +110058Obsoletes: ssh-server
Damien Millerff649d82000-10-16 13:35:19 +110059PreReq: openssh = %{version}-%{release}, chkconfig >= 0.9
Damien Millerb27ef9e2000-09-30 14:29:44 +110060Requires: initscripts >= 4.16
Damien Miller3f51bf51999-11-09 14:46:02 +110061
62%package askpass
Damien Miller36884401999-12-26 12:26:21 +110063Summary: OpenSSH X11 passphrase dialog
64Group: Applications/Internet
Damien Millerff649d82000-10-16 13:35:19 +110065Requires: openssh = %{version}-%{release}
Damien Miller36884401999-12-26 12:26:21 +110066Obsoletes: ssh-extras
Damien Miller36884401999-12-26 12:26:21 +110067
Damien Miller36884401999-12-26 12:26:21 +110068%package askpass-gnome
Damien Miller36682061999-11-15 17:19:24 +110069Summary: OpenSSH GNOME passphrase dialog
Damien Miller3f51bf51999-11-09 14:46:02 +110070Group: Applications/Internet
Damien Millerff649d82000-10-16 13:35:19 +110071Requires: openssh = %{version}-%{release}
Damien Miller36682061999-11-15 17:19:24 +110072Obsoletes: ssh-extras
Damien Miller3f51bf51999-11-09 14:46:02 +110073
Damien Millerd4a8b7e1999-10-27 13:42:43 +100074%description
75Ssh (Secure Shell) a program for logging into a remote machine and for
76executing commands in a remote machine. It is intended to replace
77rlogin and rsh, and provide secure encrypted communications between
78two untrusted hosts over an insecure network. X11 connections and
79arbitrary TCP/IP ports can also be forwarded over the secure channel.
80
81OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
82up to date in terms of security and features, as well as removing all
Damien Millerff649d82000-10-16 13:35:19 +110083patented algorithms to separate libraries (OpenSSL).
Damien Millerd4a8b7e1999-10-27 13:42:43 +100084
Damien Miller36682061999-11-15 17:19:24 +110085This package includes the core files necessary for both the OpenSSH
86client and server. To make this package useful, you should also
87install openssh-clients, openssh-server, or both.
88
89%description clients
90Ssh (Secure Shell) a program for logging into a remote machine and for
91executing commands in a remote machine. It is intended to replace
92rlogin and rsh, and provide secure encrypted communications between
93two untrusted hosts over an insecure network. X11 connections and
94arbitrary TCP/IP ports can also be forwarded over the secure channel.
95
96OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
97up to date in terms of security and features, as well as removing all
Damien Millerff649d82000-10-16 13:35:19 +110098patented algorithms to separate libraries (OpenSSL).
Damien Miller36682061999-11-15 17:19:24 +110099
Damien Miller3f51bf51999-11-09 14:46:02 +1100100This package includes the clients necessary to make encrypted connections
101to SSH servers.
102
103%description server
104Ssh (Secure Shell) a program for logging into a remote machine and for
105executing commands in a remote machine. It is intended to replace
106rlogin and rsh, and provide secure encrypted communications between
107two untrusted hosts over an insecure network. X11 connections and
108arbitrary TCP/IP ports can also be forwarded over the secure channel.
109
110OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
111up to date in terms of security and features, as well as removing all
Damien Millerff649d82000-10-16 13:35:19 +1100112patented algorithms to separate libraries (OpenSSL).
Damien Miller3f51bf51999-11-09 14:46:02 +1100113
Damien Miller36682061999-11-15 17:19:24 +1100114This package contains the secure shell daemon. The sshd is the server
115part of the secure shell protocol and allows ssh clients to connect to
116your host.
Damien Miller3f51bf51999-11-09 14:46:02 +1100117
Damien Miller36884401999-12-26 12:26:21 +1100118%description askpass
119Ssh (Secure Shell) a program for logging into a remote machine and for
120executing commands in a remote machine. It is intended to replace
121rlogin and rsh, and provide secure encrypted communications between
122two untrusted hosts over an insecure network. X11 connections and
123arbitrary TCP/IP ports can also be forwarded over the secure channel.
124
125OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
126up to date in terms of security and features, as well as removing all
Damien Millerff649d82000-10-16 13:35:19 +1100127patented algorithms to separate libraries (OpenSSL).
Damien Miller36884401999-12-26 12:26:21 +1100128
Damien Millerf1aa21f2001-01-05 09:30:32 +1100129This package contains Jim Knoble's <jmknoble@jmknoble.cx> X11 passphrase
Damien Miller36884401999-12-26 12:26:21 +1100130dialog.
Damien Miller36884401999-12-26 12:26:21 +1100131
Damien Millerf6adfa91999-12-26 13:08:15 +1100132%description askpass-gnome
Damien Miller3f51bf51999-11-09 14:46:02 +1100133Ssh (Secure Shell) a program for logging into a remote machine and for
134executing commands in a remote machine. It is intended to replace
135rlogin and rsh, and provide secure encrypted communications between
136two untrusted hosts over an insecure network. X11 connections and
137arbitrary TCP/IP ports can also be forwarded over the secure channel.
138
139OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
140up to date in terms of security and features, as well as removing all
Damien Millerff649d82000-10-16 13:35:19 +1100141patented algorithms to separate libraries (OpenSSL).
Damien Miller3f51bf51999-11-09 14:46:02 +1100142
143This package contains the GNOME passphrase dialog.
144
Damien Millerff649d82000-10-16 13:35:19 +1100145%prep
146
Damien Miller969c07e2000-11-06 13:06:43 +1100147%if ! %{no_x11_askpass}
Damien Millerff649d82000-10-16 13:35:19 +1100148%setup -q -a 1
Damien Miller969c07e2000-11-06 13:06:43 +1100149%else
150%setup -q
151%endif
Damien Millerff649d82000-10-16 13:35:19 +1100152
153%build
154
Damien Millerafeaca92000-11-11 09:09:57 +1100155%define _sysconfdir /etc/ssh
156
Damien Millerff649d82000-10-16 13:35:19 +1100157%configure \
Damien Millerff649d82000-10-16 13:35:19 +1100158 --libexecdir=%{_libexecdir}/openssh \
Damien Miller01fa6382001-01-17 11:23:39 +1100159 --with-pam \
Damien Millerff649d82000-10-16 13:35:19 +1100160 --with-tcp-wrappers \
161 --with-ipv4-default \
162 --with-rsh=/usr/bin/rsh \
Damien Miller01fa6382001-01-17 11:23:39 +1100163 --with-default-path=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
Damien Millerff649d82000-10-16 13:35:19 +1100164
165make
166
167%if ! %{no_x11_askpass}
168pushd x11-ssh-askpass-%{aversion}
169xmkmf -a
170make
171popd
172%endif
173
174%if ! %{no_gnome_askpass}
175pushd contrib
176gcc -O -g `gnome-config --cflags gnome gnomeui` \
177 gnome-ssh-askpass.c -o gnome-ssh-askpass \
178 `gnome-config --libs gnome gnomeui`
179popd
180%endif
181
182%install
183rm -rf $RPM_BUILD_ROOT
184%{makeinstall} \
Damien Millerff649d82000-10-16 13:35:19 +1100185 libexecdir=$RPM_BUILD_ROOT%{_libexecdir}/openssh \
186 DESTDIR=/ # Hack to disable key generation
187
188
189install -d $RPM_BUILD_ROOT/etc/pam.d/
190install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
191install -d $RPM_BUILD_ROOT%{_libexecdir}/openssh
Damien Miller070ca312001-02-12 09:34:17 +1100192%if %{redhat7}
Damien Miller070ca312001-02-12 09:34:17 +1100193install -m644 contrib/redhat/sshd.pam-7.x $RPM_BUILD_ROOT/etc/pam.d/sshd
Ben Lindstrom008e2912001-02-23 04:45:15 +0000194%else
195install -m644 contrib/redhat/sshd.pam $RPM_BUILD_ROOT/etc/pam.d/sshd
Damien Miller070ca312001-02-12 09:34:17 +1100196%endif
Damien Millerff649d82000-10-16 13:35:19 +1100197install -m755 contrib/redhat/sshd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
198
199%if ! %{no_x11_askpass}
200install -s x11-ssh-askpass-%{aversion}/x11-ssh-askpass $RPM_BUILD_ROOT/usr/libexec/openssh/x11-ssh-askpass
201ln -s /usr/libexec/openssh/x11-ssh-askpass $RPM_BUILD_ROOT/usr/libexec/openssh/ssh-askpass
202%endif
203
204%if ! %{no_gnome_askpass}
205install -s contrib/gnome-ssh-askpass $RPM_BUILD_ROOT/usr/libexec/openssh/gnome-ssh-askpass
206%endif
207
208perl -pi -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT%{_mandir}/man*/*
209
210%clean
211rm -rf $RPM_BUILD_ROOT
212
213%post server
214/sbin/chkconfig --add sshd
215if test -r /var/run/sshd.pid ; then
216 /etc/rc.d/init.d/sshd restart >&2
217fi
218
219%preun server
220if [ "$1" = 0 ] ; then
221 /etc/rc.d/init.d/sshd stop >&2
222 /sbin/chkconfig --del sshd
223fi
224
225%files
226%defattr(-,root,root)
Damien Miller981eeed2000-12-27 19:06:05 +1100227%doc ChangeLog OVERVIEW README* INSTALL
Damien Millerab360502000-11-06 12:52:25 +1100228%doc CREDITS LICENCE
Damien Millerff649d82000-10-16 13:35:19 +1100229%attr(0755,root,root) %{_bindir}/ssh-keygen
230%attr(0755,root,root) %{_bindir}/scp
Ben Lindstrom4cc90a42000-12-10 22:12:54 +0000231%attr(0755,root,root) %{_bindir}/ssh-keyscan
Damien Millerff649d82000-10-16 13:35:19 +1100232%attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1*
Ben Lindstrom4cc90a42000-12-10 22:12:54 +0000233%attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1*
Damien Millerff649d82000-10-16 13:35:19 +1100234%attr(0644,root,root) %{_mandir}/man1/scp.1*
Damien Milleree188d32000-11-13 23:13:55 +1100235%attr(0755,root,root) %dir %{_sysconfdir}
236%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/primes
Damien Millerff649d82000-10-16 13:35:19 +1100237%attr(0755,root,root) %dir %{_libexecdir}/openssh
238
239%files clients
240%defattr(-,root,root)
241%attr(4755,root,root) %{_bindir}/ssh
242%attr(0755,root,root) %{_bindir}/ssh-agent
243%attr(0755,root,root) %{_bindir}/ssh-add
Damien Miller33804262001-02-04 23:20:18 +1100244%attr(0755,root,root) %{_bindir}/ssh-keyscan
245%attr(0755,root,root) %{_bindir}/sftp
Damien Millerff649d82000-10-16 13:35:19 +1100246%attr(0644,root,root) %{_mandir}/man1/ssh.1*
247%attr(0644,root,root) %{_mandir}/man1/ssh-agent.1*
248%attr(0644,root,root) %{_mandir}/man1/ssh-add.1*
Damien Miller33804262001-02-04 23:20:18 +1100249%attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1*
250%attr(0644,root,root) %{_mandir}/man1/sftp.1*
Damien Milleree188d32000-11-13 23:13:55 +1100251%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh_config
Damien Millerff649d82000-10-16 13:35:19 +1100252%attr(-,root,root) %{_bindir}/slogin
253%attr(-,root,root) %{_mandir}/man1/slogin.1*
254
255%files server
256%defattr(-,root,root)
257%attr(0755,root,root) %{_sbindir}/sshd
258%attr(0755,root,root) %{_libexecdir}/openssh/sftp-server
259%attr(0644,root,root) %{_mandir}/man8/sshd.8*
260%attr(0644,root,root) %{_mandir}/man8/sftp-server.8*
Damien Milleree188d32000-11-13 23:13:55 +1100261%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sshd_config
Damien Millerff649d82000-10-16 13:35:19 +1100262%attr(0600,root,root) %config(noreplace) /etc/pam.d/sshd
263%attr(0755,root,root) %config /etc/rc.d/init.d/sshd
264
265%if ! %{no_x11_askpass}
266%files askpass
267%defattr(-,root,root)
268%doc x11-ssh-askpass-%{aversion}/README
269%doc x11-ssh-askpass-%{aversion}/ChangeLog
270%doc x11-ssh-askpass-%{aversion}/SshAskpass*.ad
271%attr(0755,root,root) %{_libexecdir}/openssh/ssh-askpass
272%attr(0755,root,root) %{_libexecdir}/openssh/x11-ssh-askpass
273%endif
274
275%if ! %{no_gnome_askpass}
276%files askpass-gnome
277%defattr(-,root,root)
278%attr(0755,root,root) %{_libexecdir}/openssh/gnome-ssh-askpass
279%endif
280
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000281%changelog
Damien Millerff649d82000-10-16 13:35:19 +1100282* Mon Oct 18 2000 Damien Miller <djm@mindrot.org>
283- Merge some of Nalin Dahyabhai <nalin@redhat.com> changes from the
284 Redhat 7.0 spec file
Damien Miller676092f2000-09-05 14:16:18 +1100285* Tue Sep 05 2000 Damien Miller <djm@mindrot.org>
286- Use RPM configure macro
Damien Millerab8d1922000-08-08 16:53:28 +1000287* Tue Aug 08 2000 Damien Miller <djm@mindrot.org>
288- Some surgery to sshd.init (generate keys at runtime)
289- Cleanup of groups and removal of keygen calls
Damien Miller5a119bc2000-07-12 14:34:11 +1000290* Wed Jul 12 2000 Damien Miller <djm@mindrot.org>
291- Make building of X11-askpass and gnome-askpass optional
Damien Millere69f18c2000-06-12 16:38:54 +1000292* Mon Jun 12 2000 Damien Miller <djm@mindrot.org>
293- Glob manpages to catch compressed files
Damien Millerddaffa42000-03-15 12:31:18 +1100294* Wed Mar 15 2000 Damien Miller <djm@ibs.com.au>
295- Updated for new location
296- Updated for new gnome-ssh-askpass build
Damien Miller36884401999-12-26 12:26:21 +1100297* Sun Dec 26 1999 Damien Miller <djm@mindrot.org>
298- Added Jim Knoble's <jmknoble@pobox.com> askpass
Damien Miller36682061999-11-15 17:19:24 +1100299* Mon Nov 15 1999 Damien Miller <djm@mindrot.org>
300- Split subpackages further based on patch from jim knoble <jmknoble@pobox.com>
Damien Miller38c60881999-11-13 13:09:31 +1100301* Sat Nov 13 1999 Damien Miller <djm@mindrot.org>
Damien Millerc6d5ce81999-11-15 16:01:07 +1100302- Added 'Obsoletes' directives
Damien Miller742d2cb1999-11-09 14:28:26 +1100303* Tue Nov 09 1999 Damien Miller <djm@ibs.com.au>
304- Use make install
Damien Miller3f51bf51999-11-09 14:46:02 +1100305- Subpackages
Damien Miller356a0b01999-11-08 15:30:59 +1100306* Mon Nov 08 1999 Damien Miller <djm@ibs.com.au>
307- Added links for slogin
308- Fixed perms on manpages
Damien Miller2bbb9d01999-10-30 09:46:20 +1000309* Sat Oct 30 1999 Damien Miller <djm@ibs.com.au>
310- Renamed init script
Damien Miller070f7a11999-10-29 10:29:29 +1000311* Fri Oct 29 1999 Damien Miller <djm@ibs.com.au>
312- Back to old binary names
Damien Miller06230761999-10-28 14:03:14 +1000313* Thu Oct 28 1999 Damien Miller <djm@ibs.com.au>
314- Use autoconf
315- New binary names
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000316* Wed Oct 27 1999 Damien Miller <djm@ibs.com.au>
317- Initial RPMification, based on Jan "Yenya" Kasprzak's <kas@fi.muni.cz> spec.
318