blob: b7c25159d96052881d69f6b05eda8f539bb65b0e [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
Ben Lindstrom379f2052001-02-23 04:55:46 +000025%define exact_openssl_version %(rpm -q openssl | cut -d - -f 2)
26
Damien Millerd4a8b7e1999-10-27 13:42:43 +100027Summary: OpenSSH free Secure Shell (SSH) implementation
28Name: openssh
Damien Miller36884401999-12-26 12:26:21 +110029Version: %{oversion}
Damien Millerd4a8b7e1999-10-27 13:42:43 +100030Release: 1
Damien Millerab8d1922000-08-08 16:53:28 +100031Packager: Damien Miller <djm@mindrot.org>
Damien Miller11402af2000-05-07 18:05:59 +100032URL: http://www.openssh.com/
Damien Millerab8d1922000-08-08 16:53:28 +100033Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{oversion}.tar.gz
Damien Miller969c07e2000-11-06 13:06:43 +110034%if ! %{no_x11_askpass}
Damien Millerf1aa21f2001-01-05 09:30:32 +110035Source1: http://www.jmknoble.cx/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.gz
Damien Miller969c07e2000-11-06 13:06:43 +110036%endif
Damien Millerd4a8b7e1999-10-27 13:42:43 +100037Copyright: BSD
38Group: Applications/Internet
39BuildRoot: /tmp/openssh-%{version}-buildroot
Damien Millerc6d5ce81999-11-15 16:01:07 +110040Obsoletes: ssh
Damien Miller1383bd82000-04-06 12:32:37 +100041PreReq: openssl >= 0.9.5a
Ben Lindstrom379f2052001-02-23 04:55:46 +000042RreReq: openssl = %{exact_openssl_version}
Damien Miller1383bd82000-04-06 12:32:37 +100043Requires: openssl >= 0.9.5a
Damien Miller070ca312001-02-12 09:34:17 +110044Requires: rpm >= 3.0.5
Damien Miller969c07e2000-11-06 13:06:43 +110045BuildPreReq: perl, openssl-devel, tcp_wrappers
Damien Millerff649d82000-10-16 13:35:19 +110046BuildPreReq: /bin/login, /usr/bin/rsh, /usr/include/security/pam_appl.h
Damien Miller070ca312001-02-12 09:34:17 +110047BuildPreReq: rpm >= 3.0.5
Damien Millerab8d1922000-08-08 16:53:28 +100048%if ! %{no_gnome_askpass}
Damien Miller36884401999-12-26 12:26:21 +110049BuildPreReq: gnome-libs-devel
Damien Miller5a119bc2000-07-12 14:34:11 +100050%endif
Damien Miller36682061999-11-15 17:19:24 +110051
52%package clients
53Summary: OpenSSH Secure Shell protocol clients
Damien Millerff649d82000-10-16 13:35:19 +110054Requires: openssh = %{version}-%{release}
Damien Millerab8d1922000-08-08 16:53:28 +100055Group: Applications/Internet
Damien Millerc6d5ce81999-11-15 16:01:07 +110056Obsoletes: ssh-clients
Damien Millerd4a8b7e1999-10-27 13:42:43 +100057
Damien Miller3f51bf51999-11-09 14:46:02 +110058%package server
Damien Miller36682061999-11-15 17:19:24 +110059Summary: OpenSSH Secure Shell protocol server (sshd)
Damien Miller3f51bf51999-11-09 14:46:02 +110060Group: System Environment/Daemons
Damien Millerc6d5ce81999-11-15 16:01:07 +110061Obsoletes: ssh-server
Damien Millerff649d82000-10-16 13:35:19 +110062PreReq: openssh = %{version}-%{release}, chkconfig >= 0.9
Damien Millerb27ef9e2000-09-30 14:29:44 +110063Requires: initscripts >= 4.16
Damien Miller3f51bf51999-11-09 14:46:02 +110064
65%package askpass
Damien Miller36884401999-12-26 12:26:21 +110066Summary: OpenSSH X11 passphrase dialog
67Group: Applications/Internet
Damien Millerff649d82000-10-16 13:35:19 +110068Requires: openssh = %{version}-%{release}
Damien Miller36884401999-12-26 12:26:21 +110069Obsoletes: ssh-extras
Damien Miller36884401999-12-26 12:26:21 +110070
Damien Miller36884401999-12-26 12:26:21 +110071%package askpass-gnome
Damien Miller36682061999-11-15 17:19:24 +110072Summary: OpenSSH GNOME passphrase dialog
Damien Miller3f51bf51999-11-09 14:46:02 +110073Group: Applications/Internet
Damien Millerff649d82000-10-16 13:35:19 +110074Requires: openssh = %{version}-%{release}
Damien Miller36682061999-11-15 17:19:24 +110075Obsoletes: ssh-extras
Damien Miller3f51bf51999-11-09 14:46:02 +110076
Damien Millerd4a8b7e1999-10-27 13:42:43 +100077%description
78Ssh (Secure Shell) a program for logging into a remote machine and for
79executing commands in a remote machine. It is intended to replace
80rlogin and rsh, and provide secure encrypted communications between
81two untrusted hosts over an insecure network. X11 connections and
82arbitrary TCP/IP ports can also be forwarded over the secure channel.
83
84OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
85up to date in terms of security and features, as well as removing all
Damien Millerff649d82000-10-16 13:35:19 +110086patented algorithms to separate libraries (OpenSSL).
Damien Millerd4a8b7e1999-10-27 13:42:43 +100087
Damien Miller36682061999-11-15 17:19:24 +110088This package includes the core files necessary for both the OpenSSH
89client and server. To make this package useful, you should also
90install openssh-clients, openssh-server, or both.
91
92%description clients
93Ssh (Secure Shell) a program for logging into a remote machine and for
94executing commands in a remote machine. It is intended to replace
95rlogin and rsh, and provide secure encrypted communications between
96two untrusted hosts over an insecure network. X11 connections and
97arbitrary TCP/IP ports can also be forwarded over the secure channel.
98
99OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
100up to date in terms of security and features, as well as removing all
Damien Millerff649d82000-10-16 13:35:19 +1100101patented algorithms to separate libraries (OpenSSL).
Damien Miller36682061999-11-15 17:19:24 +1100102
Damien Miller3f51bf51999-11-09 14:46:02 +1100103This package includes the clients necessary to make encrypted connections
104to SSH servers.
105
106%description server
107Ssh (Secure Shell) a program for logging into a remote machine and for
108executing commands in a remote machine. It is intended to replace
109rlogin and rsh, and provide secure encrypted communications between
110two untrusted hosts over an insecure network. X11 connections and
111arbitrary TCP/IP ports can also be forwarded over the secure channel.
112
113OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
114up to date in terms of security and features, as well as removing all
Damien Millerff649d82000-10-16 13:35:19 +1100115patented algorithms to separate libraries (OpenSSL).
Damien Miller3f51bf51999-11-09 14:46:02 +1100116
Damien Miller36682061999-11-15 17:19:24 +1100117This package contains the secure shell daemon. The sshd is the server
118part of the secure shell protocol and allows ssh clients to connect to
119your host.
Damien Miller3f51bf51999-11-09 14:46:02 +1100120
Damien Miller36884401999-12-26 12:26:21 +1100121%description askpass
122Ssh (Secure Shell) a program for logging into a remote machine and for
123executing commands in a remote machine. It is intended to replace
124rlogin and rsh, and provide secure encrypted communications between
125two untrusted hosts over an insecure network. X11 connections and
126arbitrary TCP/IP ports can also be forwarded over the secure channel.
127
128OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
129up to date in terms of security and features, as well as removing all
Damien Millerff649d82000-10-16 13:35:19 +1100130patented algorithms to separate libraries (OpenSSL).
Damien Miller36884401999-12-26 12:26:21 +1100131
Damien Millerf1aa21f2001-01-05 09:30:32 +1100132This package contains Jim Knoble's <jmknoble@jmknoble.cx> X11 passphrase
Damien Miller36884401999-12-26 12:26:21 +1100133dialog.
Damien Miller36884401999-12-26 12:26:21 +1100134
Damien Millerf6adfa91999-12-26 13:08:15 +1100135%description askpass-gnome
Damien Miller3f51bf51999-11-09 14:46:02 +1100136Ssh (Secure Shell) a program for logging into a remote machine and for
137executing commands in a remote machine. It is intended to replace
138rlogin and rsh, and provide secure encrypted communications between
139two untrusted hosts over an insecure network. X11 connections and
140arbitrary TCP/IP ports can also be forwarded over the secure channel.
141
142OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
143up to date in terms of security and features, as well as removing all
Damien Millerff649d82000-10-16 13:35:19 +1100144patented algorithms to separate libraries (OpenSSL).
Damien Miller3f51bf51999-11-09 14:46:02 +1100145
146This package contains the GNOME passphrase dialog.
147
Damien Millerff649d82000-10-16 13:35:19 +1100148%prep
149
Damien Miller969c07e2000-11-06 13:06:43 +1100150%if ! %{no_x11_askpass}
Damien Millerff649d82000-10-16 13:35:19 +1100151%setup -q -a 1
Damien Miller969c07e2000-11-06 13:06:43 +1100152%else
153%setup -q
154%endif
Damien Millerff649d82000-10-16 13:35:19 +1100155
156%build
157
Damien Millerafeaca92000-11-11 09:09:57 +1100158%define _sysconfdir /etc/ssh
159
Damien Millerff649d82000-10-16 13:35:19 +1100160%configure \
Damien Millerff649d82000-10-16 13:35:19 +1100161 --libexecdir=%{_libexecdir}/openssh \
Damien Miller01fa6382001-01-17 11:23:39 +1100162 --with-pam \
Damien Millerff649d82000-10-16 13:35:19 +1100163 --with-tcp-wrappers \
164 --with-ipv4-default \
165 --with-rsh=/usr/bin/rsh \
Damien Miller01fa6382001-01-17 11:23:39 +1100166 --with-default-path=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
Damien Millerff649d82000-10-16 13:35:19 +1100167
168make
169
170%if ! %{no_x11_askpass}
171pushd x11-ssh-askpass-%{aversion}
172xmkmf -a
173make
174popd
175%endif
176
177%if ! %{no_gnome_askpass}
178pushd contrib
179gcc -O -g `gnome-config --cflags gnome gnomeui` \
180 gnome-ssh-askpass.c -o gnome-ssh-askpass \
181 `gnome-config --libs gnome gnomeui`
182popd
183%endif
184
185%install
186rm -rf $RPM_BUILD_ROOT
187%{makeinstall} \
Damien Millerff649d82000-10-16 13:35:19 +1100188 libexecdir=$RPM_BUILD_ROOT%{_libexecdir}/openssh \
189 DESTDIR=/ # Hack to disable key generation
190
191
192install -d $RPM_BUILD_ROOT/etc/pam.d/
193install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
194install -d $RPM_BUILD_ROOT%{_libexecdir}/openssh
Damien Miller070ca312001-02-12 09:34:17 +1100195%if %{redhat7}
Damien Miller070ca312001-02-12 09:34:17 +1100196install -m644 contrib/redhat/sshd.pam-7.x $RPM_BUILD_ROOT/etc/pam.d/sshd
Ben Lindstrom008e2912001-02-23 04:45:15 +0000197%else
198install -m644 contrib/redhat/sshd.pam $RPM_BUILD_ROOT/etc/pam.d/sshd
Damien Miller070ca312001-02-12 09:34:17 +1100199%endif
Damien Millerff649d82000-10-16 13:35:19 +1100200install -m755 contrib/redhat/sshd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
201
202%if ! %{no_x11_askpass}
203install -s x11-ssh-askpass-%{aversion}/x11-ssh-askpass $RPM_BUILD_ROOT/usr/libexec/openssh/x11-ssh-askpass
204ln -s /usr/libexec/openssh/x11-ssh-askpass $RPM_BUILD_ROOT/usr/libexec/openssh/ssh-askpass
205%endif
206
207%if ! %{no_gnome_askpass}
208install -s contrib/gnome-ssh-askpass $RPM_BUILD_ROOT/usr/libexec/openssh/gnome-ssh-askpass
209%endif
210
211perl -pi -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT%{_mandir}/man*/*
212
213%clean
214rm -rf $RPM_BUILD_ROOT
215
216%post server
217/sbin/chkconfig --add sshd
218if test -r /var/run/sshd.pid ; then
219 /etc/rc.d/init.d/sshd restart >&2
220fi
221
222%preun server
223if [ "$1" = 0 ] ; then
224 /etc/rc.d/init.d/sshd stop >&2
225 /sbin/chkconfig --del sshd
226fi
227
228%files
229%defattr(-,root,root)
Damien Miller981eeed2000-12-27 19:06:05 +1100230%doc ChangeLog OVERVIEW README* INSTALL
Damien Millerab360502000-11-06 12:52:25 +1100231%doc CREDITS LICENCE
Damien Millerff649d82000-10-16 13:35:19 +1100232%attr(0755,root,root) %{_bindir}/ssh-keygen
233%attr(0755,root,root) %{_bindir}/scp
Ben Lindstrom4cc90a42000-12-10 22:12:54 +0000234%attr(0755,root,root) %{_bindir}/ssh-keyscan
Damien Millerff649d82000-10-16 13:35:19 +1100235%attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1*
Ben Lindstrom4cc90a42000-12-10 22:12:54 +0000236%attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1*
Damien Millerff649d82000-10-16 13:35:19 +1100237%attr(0644,root,root) %{_mandir}/man1/scp.1*
Damien Milleree188d32000-11-13 23:13:55 +1100238%attr(0755,root,root) %dir %{_sysconfdir}
239%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/primes
Damien Millerff649d82000-10-16 13:35:19 +1100240%attr(0755,root,root) %dir %{_libexecdir}/openssh
241
242%files clients
243%defattr(-,root,root)
244%attr(4755,root,root) %{_bindir}/ssh
245%attr(0755,root,root) %{_bindir}/ssh-agent
246%attr(0755,root,root) %{_bindir}/ssh-add
Damien Miller33804262001-02-04 23:20:18 +1100247%attr(0755,root,root) %{_bindir}/ssh-keyscan
248%attr(0755,root,root) %{_bindir}/sftp
Damien Millerff649d82000-10-16 13:35:19 +1100249%attr(0644,root,root) %{_mandir}/man1/ssh.1*
250%attr(0644,root,root) %{_mandir}/man1/ssh-agent.1*
251%attr(0644,root,root) %{_mandir}/man1/ssh-add.1*
Damien Miller33804262001-02-04 23:20:18 +1100252%attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1*
253%attr(0644,root,root) %{_mandir}/man1/sftp.1*
Damien Milleree188d32000-11-13 23:13:55 +1100254%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh_config
Damien Millerff649d82000-10-16 13:35:19 +1100255%attr(-,root,root) %{_bindir}/slogin
256%attr(-,root,root) %{_mandir}/man1/slogin.1*
257
258%files server
259%defattr(-,root,root)
260%attr(0755,root,root) %{_sbindir}/sshd
261%attr(0755,root,root) %{_libexecdir}/openssh/sftp-server
262%attr(0644,root,root) %{_mandir}/man8/sshd.8*
263%attr(0644,root,root) %{_mandir}/man8/sftp-server.8*
Damien Milleree188d32000-11-13 23:13:55 +1100264%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sshd_config
Damien Millerff649d82000-10-16 13:35:19 +1100265%attr(0600,root,root) %config(noreplace) /etc/pam.d/sshd
266%attr(0755,root,root) %config /etc/rc.d/init.d/sshd
267
268%if ! %{no_x11_askpass}
269%files askpass
270%defattr(-,root,root)
271%doc x11-ssh-askpass-%{aversion}/README
272%doc x11-ssh-askpass-%{aversion}/ChangeLog
273%doc x11-ssh-askpass-%{aversion}/SshAskpass*.ad
274%attr(0755,root,root) %{_libexecdir}/openssh/ssh-askpass
275%attr(0755,root,root) %{_libexecdir}/openssh/x11-ssh-askpass
276%endif
277
278%if ! %{no_gnome_askpass}
279%files askpass-gnome
280%defattr(-,root,root)
281%attr(0755,root,root) %{_libexecdir}/openssh/gnome-ssh-askpass
282%endif
283
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000284%changelog
Damien Millerff649d82000-10-16 13:35:19 +1100285* Mon Oct 18 2000 Damien Miller <djm@mindrot.org>
286- Merge some of Nalin Dahyabhai <nalin@redhat.com> changes from the
287 Redhat 7.0 spec file
Damien Miller676092f2000-09-05 14:16:18 +1100288* Tue Sep 05 2000 Damien Miller <djm@mindrot.org>
289- Use RPM configure macro
Damien Millerab8d1922000-08-08 16:53:28 +1000290* Tue Aug 08 2000 Damien Miller <djm@mindrot.org>
291- Some surgery to sshd.init (generate keys at runtime)
292- Cleanup of groups and removal of keygen calls
Damien Miller5a119bc2000-07-12 14:34:11 +1000293* Wed Jul 12 2000 Damien Miller <djm@mindrot.org>
294- Make building of X11-askpass and gnome-askpass optional
Damien Millere69f18c2000-06-12 16:38:54 +1000295* Mon Jun 12 2000 Damien Miller <djm@mindrot.org>
296- Glob manpages to catch compressed files
Damien Millerddaffa42000-03-15 12:31:18 +1100297* Wed Mar 15 2000 Damien Miller <djm@ibs.com.au>
298- Updated for new location
299- Updated for new gnome-ssh-askpass build
Damien Miller36884401999-12-26 12:26:21 +1100300* Sun Dec 26 1999 Damien Miller <djm@mindrot.org>
301- Added Jim Knoble's <jmknoble@pobox.com> askpass
Damien Miller36682061999-11-15 17:19:24 +1100302* Mon Nov 15 1999 Damien Miller <djm@mindrot.org>
303- Split subpackages further based on patch from jim knoble <jmknoble@pobox.com>
Damien Miller38c60881999-11-13 13:09:31 +1100304* Sat Nov 13 1999 Damien Miller <djm@mindrot.org>
Damien Millerc6d5ce81999-11-15 16:01:07 +1100305- Added 'Obsoletes' directives
Damien Miller742d2cb1999-11-09 14:28:26 +1100306* Tue Nov 09 1999 Damien Miller <djm@ibs.com.au>
307- Use make install
Damien Miller3f51bf51999-11-09 14:46:02 +1100308- Subpackages
Damien Miller356a0b01999-11-08 15:30:59 +1100309* Mon Nov 08 1999 Damien Miller <djm@ibs.com.au>
310- Added links for slogin
311- Fixed perms on manpages
Damien Miller2bbb9d01999-10-30 09:46:20 +1000312* Sat Oct 30 1999 Damien Miller <djm@ibs.com.au>
313- Renamed init script
Damien Miller070f7a11999-10-29 10:29:29 +1000314* Fri Oct 29 1999 Damien Miller <djm@ibs.com.au>
315- Back to old binary names
Damien Miller06230761999-10-28 14:03:14 +1000316* Thu Oct 28 1999 Damien Miller <djm@ibs.com.au>
317- Use autoconf
318- New binary names
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000319* Wed Oct 27 1999 Damien Miller <djm@ibs.com.au>
320- Initial RPMification, based on Jan "Yenya" Kasprzak's <kas@fi.muni.cz> spec.
321