blob: 0a2f69ebea925be7a3486efcb1859c1a10cdd2db [file] [log] [blame]
Damien Miller36884401999-12-26 12:26:21 +11001# Version of OpenSSH
2%define oversion 1.2.1pre21
3
4# Version of ssh-askpass
5%define aversion 0.99
6
7# Define if you want to build x11-ssh-askpass
8#%define BUILD_X11_ASKPASS
9
10# Define if you want to build gnome-askpass
11#%define BUILD_GNOME_ASKPASS
12
Damien Millerd4a8b7e1999-10-27 13:42:43 +100013Summary: OpenSSH free Secure Shell (SSH) implementation
14Name: openssh
Damien Miller36884401999-12-26 12:26:21 +110015Version: %{oversion}
Damien Millerd4a8b7e1999-10-27 13:42:43 +100016Release: 1
17Packager: Damien Miller <djm@ibs.com.au>
Damien Miller36884401999-12-26 12:26:21 +110018Source0: http://violet.ibs.com.au/openssh/files/openssh-%{oversion}.tar.gz
19%ifdef BUILD_X11_ASKPASS
20Source1: http://www.pobox.com/~jmknoble/jmk/x11-ssh-askpass-%{aversion}.tar.gz
21%endif
Damien Millerd4a8b7e1999-10-27 13:42:43 +100022Copyright: BSD
23Group: Applications/Internet
24BuildRoot: /tmp/openssh-%{version}-buildroot
Damien Millerc6d5ce81999-11-15 16:01:07 +110025Obsoletes: ssh
Damien Miller36884401999-12-26 12:26:21 +110026Requires: openssl
27PreReq: openssl
28BuildPreReq: openssl-devel
Damien Milleraca55fe1999-12-07 16:31:18 +110029BuildPreReq: tcp_wrappers
Damien Miller36884401999-12-26 12:26:21 +110030
31%ifdef BUILD_GNOME_ASKPASS
32BuildPreReq: gnome-libs-devel
33%endif
Damien Miller36682061999-11-15 17:19:24 +110034
35%package clients
36Summary: OpenSSH Secure Shell protocol clients
37Requires: openssh
38Group: System Environment/Daemons
Damien Millerc6d5ce81999-11-15 16:01:07 +110039Obsoletes: ssh-clients
Damien Millerd4a8b7e1999-10-27 13:42:43 +100040
Damien Miller3f51bf51999-11-09 14:46:02 +110041%package server
Damien Miller36682061999-11-15 17:19:24 +110042Summary: OpenSSH Secure Shell protocol server (sshd)
Damien Miller3f51bf51999-11-09 14:46:02 +110043Requires: openssh chkconfig >= 0.9
44Group: System Environment/Daemons
Damien Millerc6d5ce81999-11-15 16:01:07 +110045Obsoletes: ssh-server
Damien Miller3f51bf51999-11-09 14:46:02 +110046
Damien Miller36884401999-12-26 12:26:21 +110047%ifdef BUILD_X11_ASKPASS
Damien Miller3f51bf51999-11-09 14:46:02 +110048%package askpass
Damien Miller36884401999-12-26 12:26:21 +110049Summary: OpenSSH X11 passphrase dialog
50Group: Applications/Internet
51Requires: openssh
52Obsoletes: ssh-extras
53%endif
54
55%ifdef BUILD_GNOME_ASKPASS
56%package askpass-gnome
Damien Miller36682061999-11-15 17:19:24 +110057Summary: OpenSSH GNOME passphrase dialog
Damien Miller3f51bf51999-11-09 14:46:02 +110058Group: Applications/Internet
59Requires: openssh
Damien Miller36682061999-11-15 17:19:24 +110060Obsoletes: ssh-extras
Damien Miller36884401999-12-26 12:26:21 +110061%endif
Damien Miller3f51bf51999-11-09 14:46:02 +110062
Damien Millerd4a8b7e1999-10-27 13:42:43 +100063%description
64Ssh (Secure Shell) a program for logging into a remote machine and for
65executing commands in a remote machine. It is intended to replace
66rlogin and rsh, and provide secure encrypted communications between
67two untrusted hosts over an insecure network. X11 connections and
68arbitrary TCP/IP ports can also be forwarded over the secure channel.
69
70OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
71up to date in terms of security and features, as well as removing all
72patented algorithms to seperate libraries (OpenSSL).
73
Damien Miller36682061999-11-15 17:19:24 +110074This package includes the core files necessary for both the OpenSSH
75client and server. To make this package useful, you should also
76install openssh-clients, openssh-server, or both.
77
78%description clients
79Ssh (Secure Shell) a program for logging into a remote machine and for
80executing commands in a remote machine. It is intended to replace
81rlogin and rsh, and provide secure encrypted communications between
82two untrusted hosts over an insecure network. X11 connections and
83arbitrary TCP/IP ports can also be forwarded over the secure channel.
84
85OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
86up to date in terms of security and features, as well as removing all
87patented algorithms to seperate libraries (OpenSSL).
88
Damien Miller3f51bf51999-11-09 14:46:02 +110089This package includes the clients necessary to make encrypted connections
90to SSH servers.
91
92%description server
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
101patented algorithms to seperate libraries (OpenSSL).
102
Damien Miller36682061999-11-15 17:19:24 +1100103This package contains the secure shell daemon. The sshd is the server
104part of the secure shell protocol and allows ssh clients to connect to
105your host.
Damien Miller3f51bf51999-11-09 14:46:02 +1100106
Damien Miller36884401999-12-26 12:26:21 +1100107%ifdef BUILD_X11_ASKPASS
108%package askpass-gnome
109%description askpass
110Ssh (Secure Shell) a program for logging into a remote machine and for
111executing commands in a remote machine. It is intended to replace
112rlogin and rsh, and provide secure encrypted communications between
113two untrusted hosts over an insecure network. X11 connections and
114arbitrary TCP/IP ports can also be forwarded over the secure channel.
115
116OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
117up to date in terms of security and features, as well as removing all
118patented algorithms to seperate libraries (OpenSSL).
119
120This package contains Jim Knoble's <jmknoble@pobox.com> X11 passphrase
121dialog.
122%endif
123
124%ifdef BUILD_GNOME_ASKPASS
125%package askpass-gnome
Damien Miller3f51bf51999-11-09 14:46:02 +1100126%description askpass
127Ssh (Secure Shell) a program for logging into a remote machine and for
128executing commands in a remote machine. It is intended to replace
129rlogin and rsh, and provide secure encrypted communications between
130two untrusted hosts over an insecure network. X11 connections and
131arbitrary TCP/IP ports can also be forwarded over the secure channel.
132
133OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
134up to date in terms of security and features, as well as removing all
135patented algorithms to seperate libraries (OpenSSL).
136
137This package contains the GNOME passphrase dialog.
Damien Miller36884401999-12-26 12:26:21 +1100138%endif
Damien Miller3f51bf51999-11-09 14:46:02 +1100139
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000140%changelog
Damien Miller36884401999-12-26 12:26:21 +1100141* Sun Dec 26 1999 Damien Miller <djm@mindrot.org>
142- Added Jim Knoble's <jmknoble@pobox.com> askpass
143- Made subpackage building conditional
Damien Miller36682061999-11-15 17:19:24 +1100144* Mon Nov 15 1999 Damien Miller <djm@mindrot.org>
145- Split subpackages further based on patch from jim knoble <jmknoble@pobox.com>
Damien Miller38c60881999-11-13 13:09:31 +1100146* Sat Nov 13 1999 Damien Miller <djm@mindrot.org>
Damien Millerc6d5ce81999-11-15 16:01:07 +1100147- Added 'Obsoletes' directives
Damien Miller742d2cb1999-11-09 14:28:26 +1100148* Tue Nov 09 1999 Damien Miller <djm@ibs.com.au>
149- Use make install
Damien Miller3f51bf51999-11-09 14:46:02 +1100150- Subpackages
Damien Miller356a0b01999-11-08 15:30:59 +1100151* Mon Nov 08 1999 Damien Miller <djm@ibs.com.au>
152- Added links for slogin
153- Fixed perms on manpages
Damien Miller2bbb9d01999-10-30 09:46:20 +1000154* Sat Oct 30 1999 Damien Miller <djm@ibs.com.au>
155- Renamed init script
Damien Miller070f7a11999-10-29 10:29:29 +1000156* Fri Oct 29 1999 Damien Miller <djm@ibs.com.au>
157- Back to old binary names
Damien Miller06230761999-10-28 14:03:14 +1000158* Thu Oct 28 1999 Damien Miller <djm@ibs.com.au>
159- Use autoconf
160- New binary names
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000161* Wed Oct 27 1999 Damien Miller <djm@ibs.com.au>
162- Initial RPMification, based on Jan "Yenya" Kasprzak's <kas@fi.muni.cz> spec.
163
164%prep
165
Damien Miller36884401999-12-26 12:26:21 +1100166%ifdef BUILD_X11_ASKPASS
167%setup -a 1
168%else
169%setup
170%endif
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000171
172%build
173
Damien Miller36884401999-12-26 12:26:21 +1100174%ifdef BUILD_GNOME_ASKPASS
Damien Miller742d2cb1999-11-09 14:28:26 +1100175CFLAGS="$RPM_OPT_FLAGS" \
Damien Milleraca55fe1999-12-07 16:31:18 +1100176 ./configure --prefix=/usr --sysconfdir=/etc/ssh \
177 --with-gnome-askpass --with-tcp-wrappers
Damien Miller36884401999-12-26 12:26:21 +1100178%else
179CFLAGS="$RPM_OPT_FLAGS" \
180 ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-tcp-wrappers
181%endif
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000182
Damien Millercdb8b1d1999-11-09 14:31:49 +1100183make
184
Damien Miller36884401999-12-26 12:26:21 +1100185%ifdef BUILD_X11_ASKPASS
186cd x11-ssh-askpass-%{aversion}
187xmkmf -a
188make
189cd ..
190%endif
191
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000192%install
193rm -rf $RPM_BUILD_ROOT
Damien Miller742d2cb1999-11-09 14:28:26 +1100194make install prefix="$RPM_BUILD_ROOT/usr"
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000195
Damien Miller2b72a4a1999-11-09 14:34:31 +1100196install -d $RPM_BUILD_ROOT/etc/ssh
197install -d $RPM_BUILD_ROOT/etc/pam.d/
198install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
Damien Miller294df781999-11-23 10:11:29 +1100199install -m644 packages/redhat/sshd.pam $RPM_BUILD_ROOT/etc/pam.d/sshd
200install -m755 packages/redhat/sshd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
Damien Millera37010e1999-10-29 09:18:29 +1000201install -m600 ssh_config $RPM_BUILD_ROOT/etc/ssh/ssh_config
202install -m600 sshd_config $RPM_BUILD_ROOT/etc/ssh/sshd_config
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000203
Damien Miller36884401999-12-26 12:26:21 +1100204%ifdef BUILD_X11_ASKPASS
205install -s x11-ssh-askpass-%{aversion}/ssh-askpass $RPM_BUILD_ROOT/usr/libexec/ssh/x11-ssh-askpass
206ln -s /usr/libexec/ssh/x11-ssh-askpass $RPM_BUILD_ROOT/usr/libexec/ssh/ssh-askpass
207%endif
208
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000209%clean
210rm -rf $RPM_BUILD_ROOT
211
Damien Miller3f51bf51999-11-09 14:46:02 +1100212%post server
Damien Millera37010e1999-10-29 09:18:29 +1000213/sbin/chkconfig --add sshd
214if [ ! -f /etc/ssh/ssh_host_key -o ! -s /etc/ssh/ssh_host_key ]; then
215 /usr/bin/ssh-keygen -b 1024 -f /etc/ssh/ssh_host_key -N '' >&2
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000216fi
Damien Millera37010e1999-10-29 09:18:29 +1000217if test -r /var/run/sshd.pid
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000218then
Damien Millera37010e1999-10-29 09:18:29 +1000219 /etc/rc.d/init.d/sshd restart >&2
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000220fi
221
Damien Miller3f51bf51999-11-09 14:46:02 +1100222%preun server
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000223if [ "$1" = 0 ]
224then
Damien Millera37010e1999-10-29 09:18:29 +1000225 /etc/rc.d/init.d/sshd stop >&2
226 /sbin/chkconfig --del sshd
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000227fi
228
229%files
230%defattr(-,root,root)
Damien Miller01c114c1999-11-19 17:25:16 +1100231%doc ChangeLog OVERVIEW COPYING.Ylonen README README.Ylonen INSTALL UPGRADING
Damien Miller36682061999-11-15 17:19:24 +1100232%attr(0755,root,root) /usr/bin/ssh-keygen
233%attr(0755,root,root) /usr/bin/scp
234%attr(0644,root,root) /usr/man/man1/ssh-keygen.1
235%attr(0644,root,root) /usr/man/man1/scp.1
236%attr(0755,root,root) %dir /etc/ssh
237
238%files clients
239%defattr(-,root,root)
Damien Millerb77870f1999-11-10 12:48:08 +1100240%attr(4755,root,root) /usr/bin/ssh
Damien Miller29d68521999-10-28 14:34:49 +1000241%attr(0755,root,root) /usr/bin/ssh-agent
Damien Miller29d68521999-10-28 14:34:49 +1000242%attr(0755,root,root) /usr/bin/ssh-add
Damien Miller356a0b01999-11-08 15:30:59 +1100243%attr(0644,root,root) /usr/man/man1/ssh.1
244%attr(0644,root,root) /usr/man/man1/ssh-agent.1
Damien Miller356a0b01999-11-08 15:30:59 +1100245%attr(0644,root,root) /usr/man/man1/ssh-add.1
Damien Miller294df781999-11-23 10:11:29 +1100246%attr(0644,root,root) %config(noreplace) /etc/ssh/ssh_config
Damien Miller36682061999-11-15 17:19:24 +1100247%attr(-,root,root) /usr/bin/slogin
248%attr(-,root,root) /usr/man/man1/slogin.1
Damien Miller36884401999-12-26 12:26:21 +1100249%attr(0755,root,root) %dir /usr/libexec/ssh
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000250
Damien Miller3f51bf51999-11-09 14:46:02 +1100251%files server
252%defattr(-,root,root)
253%attr(0755,root,root) /usr/sbin/sshd
254%attr(0644,root,root) /usr/man/man8/sshd.8
Damien Miller294df781999-11-23 10:11:29 +1100255%attr(0600,root,root) %config(noreplace) /etc/ssh/sshd_config
256%attr(0600,root,root) %config(noreplace) /etc/pam.d/sshd
Damien Millera37010e1999-10-29 09:18:29 +1000257%attr(0755,root,root) %config /etc/rc.d/init.d/sshd
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000258
Damien Miller36884401999-12-26 12:26:21 +1100259%ifdef BUILD_X11_ASKPASS
Damien Miller3f51bf51999-11-09 14:46:02 +1100260%files askpass
261%defattr(-,root,root)
Damien Miller18ac1711999-11-19 12:43:19 +1100262%attr(0755,root,root) /usr/libexec/ssh/ssh-askpass
Damien Miller36884401999-12-26 12:26:21 +1100263%attr(0755,root,root) /usr/libexec/ssh/x11-ssh-askpass
264%endif
Damien Miller36682061999-11-15 17:19:24 +1100265
Damien Miller36884401999-12-26 12:26:21 +1100266%ifdef BUILD_GNOME_ASKPASS
267%files askpass-gnome
268%defattr(-,root,root)
269%attr(0755,root,root) /usr/libexec/ssh/gnome-ssh-askpass
270%endif