blob: c26b5d58256f7b91a3257d2d210fc8ba66c27469 [file] [log] [blame]
Damien Miller294df781999-11-23 10:11:29 +11001Summary: OpenSSH, a free Secure Shell (SSH) implementation
Damien Millerd4a8b7e1999-10-27 13:42:43 +10002Name: openssh
Damien Millerefcd54a2000-08-31 11:53:44 +11003Version: 2.2.0p1
Damien Miller11402af2000-05-07 18:05:59 +10004URL: http://www.openssh.com/
Damien Miller297dc421999-11-25 13:24:58 +11005Release: 1
Damien Miller56825a11999-11-11 10:50:04 +11006Source0: openssh-%{version}.tar.gz
Damien Millerd4a8b7e1999-10-27 13:42:43 +10007Copyright: BSD
8Group: Applications/Internet
9BuildRoot: /tmp/openssh-%{version}-buildroot
Damien Miller22977992000-01-16 10:17:52 +110010PreReq: openssl
Damien Millerc6d5ce81999-11-15 16:01:07 +110011Obsoletes: ssh
Damien Miller294df781999-11-23 10:11:29 +110012#
Damien Miller93168eb1999-12-07 16:20:49 +110013# (Build[ing] Prereq[uisites] only work for RPM 2.95 and newer.)
14# building prerequisites -- stuff for
15# OpenSSL (openssl-devel),
16# TCP Wrappers (nkitb),
17# and Gnome (glibdev, gtkdev, and gnlibsd)
Damien Miller294df781999-11-23 10:11:29 +110018#
Damien Miller2efcd3c2000-09-16 16:30:55 +110019BuildPrereq: openssl
Damien Miller93168eb1999-12-07 16:20:49 +110020BuildPrereq: nkitb
21BuildPrereq: glibdev
22BuildPrereq: gtkdev
23BuildPrereq: gnlibsd
Damien Miller36682061999-11-15 17:19:24 +110024
Damien Millerd4a8b7e1999-10-27 13:42:43 +100025%description
26Ssh (Secure Shell) a program for logging into a remote machine and for
27executing commands in a remote machine. It is intended to replace
28rlogin and rsh, and provide secure encrypted communications between
29two untrusted hosts over an insecure network. X11 connections and
30arbitrary TCP/IP ports can also be forwarded over the secure channel.
31
32OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
33up to date in terms of security and features, as well as removing all
34patented algorithms to seperate libraries (OpenSSL).
35
Damien Miller2efcd3c2000-09-16 16:30:55 +110036This package includes all files necessary for both the OpenSSH
37client and server. Additionally, this package contains the GNOME
38passphrase dialog.
Damien Miller3f51bf51999-11-09 14:46:02 +110039
Damien Millerd4a8b7e1999-10-27 13:42:43 +100040%changelog
Damien Millere69f18c2000-06-12 16:38:54 +100041* Mon Jun 12 2000 Damien Miller <djm@mindrot.org>
42- Glob manpages to catch compressed files
Damien Millerddaffa42000-03-15 12:31:18 +110043* Wed Mar 15 2000 Damien Miller <djm@ibs.com.au>
44- Updated for new location
45- Updated for new gnome-ssh-askpass build
Damien Miller95c8e5d1999-12-27 16:43:42 +110046* Sun Dec 26 1999 Chris Saia <csaia@wtower.com>
47- Made symlink to gnome-ssh-askpass called ssh-askpass
Damien Miller93168eb1999-12-07 16:20:49 +110048* Wed Nov 24 1999 Chris Saia <csaia@wtower.com>
49- Removed patches that included /etc/pam.d/sshd, /sbin/init.d/rc.sshd, and
50 /var/adm/fillup-templates/rc.config.sshd, since Damien merged these into
51 his released tarfile
52- Changed permissions on ssh_config in the install procedure to 644 from 600
53 even though it was correct in the %files section and thus right in the RPMs
54- Postinstall script for the server now only prints "Generating SSH host
55 key..." if we need to actually do this, in order to eliminate a confusing
56 message if an SSH host key is already in place
57- Marked all manual pages as %doc(umentation)
Damien Miller294df781999-11-23 10:11:29 +110058* Mon Nov 22 1999 Chris Saia <csaia@wtower.com>
59- Added flag to configure daemon with TCP Wrappers support
60- Added building prerequisites (works in RPM 3.0 and newer)
61* Thu Nov 18 1999 Chris Saia <csaia@wtower.com>
62- Made this package correct for SuSE.
63- Changed instances of pam_pwdb.so to pam_unix.so, since it works more properly
64 with SuSE, and lib_pwdb.so isn't installed by default.
Damien Miller36682061999-11-15 17:19:24 +110065* Mon Nov 15 1999 Damien Miller <djm@mindrot.org>
66- Split subpackages further based on patch from jim knoble <jmknoble@pobox.com>
Damien Miller38c60881999-11-13 13:09:31 +110067* Sat Nov 13 1999 Damien Miller <djm@mindrot.org>
Damien Millerc6d5ce81999-11-15 16:01:07 +110068- Added 'Obsoletes' directives
Damien Miller742d2cb1999-11-09 14:28:26 +110069* Tue Nov 09 1999 Damien Miller <djm@ibs.com.au>
70- Use make install
Damien Miller3f51bf51999-11-09 14:46:02 +110071- Subpackages
Damien Miller356a0b01999-11-08 15:30:59 +110072* Mon Nov 08 1999 Damien Miller <djm@ibs.com.au>
73- Added links for slogin
74- Fixed perms on manpages
Damien Miller2bbb9d01999-10-30 09:46:20 +100075* Sat Oct 30 1999 Damien Miller <djm@ibs.com.au>
76- Renamed init script
Damien Miller070f7a11999-10-29 10:29:29 +100077* Fri Oct 29 1999 Damien Miller <djm@ibs.com.au>
78- Back to old binary names
Damien Miller06230761999-10-28 14:03:14 +100079* Thu Oct 28 1999 Damien Miller <djm@ibs.com.au>
80- Use autoconf
81- New binary names
Damien Millerd4a8b7e1999-10-27 13:42:43 +100082* Wed Oct 27 1999 Damien Miller <djm@ibs.com.au>
83- Initial RPMification, based on Jan "Yenya" Kasprzak's <kas@fi.muni.cz> spec.
84
85%prep
Damien Miller871f3ca1999-12-07 16:32:10 +110086
87%setup -q
Damien Millerd4a8b7e1999-10-27 13:42:43 +100088
89%build
Damien Miller742d2cb1999-11-09 14:28:26 +110090CFLAGS="$RPM_OPT_FLAGS" \
Damien Miller2efcd3c2000-09-16 16:30:55 +110091./configure --prefix=/usr --sysconfdir=/etc/ssh --with-gnome-askpass \
92 --with-tcp-wrappers --with-ipv4-default --libexecdir=/usr/lib/ssh
Damien Millercdb8b1d1999-11-09 14:31:49 +110093make
94
Damien Millerddaffa42000-03-15 12:31:18 +110095cd contrib
Damien Millerbb68c162000-03-15 12:38:13 +110096gcc -O -g `gnome-config --cflags gnome gnomeui` \
Damien Millerddaffa42000-03-15 12:31:18 +110097 gnome-ssh-askpass.c -o gnome-ssh-askpass \
98 `gnome-config --libs gnome gnomeui`
99cd ..
100
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000101%install
102rm -rf $RPM_BUILD_ROOT
Damien Miller7d7c60d2000-01-26 14:37:48 +1100103make install DESTDIR=$RPM_BUILD_ROOT/
Damien Miller294df781999-11-23 10:11:29 +1100104install -d $RPM_BUILD_ROOT/etc/ssh/
Damien Miller2b72a4a1999-11-09 14:34:31 +1100105install -d $RPM_BUILD_ROOT/etc/pam.d/
Damien Miller294df781999-11-23 10:11:29 +1100106install -d $RPM_BUILD_ROOT/sbin/init.d/
Damien Miller93168eb1999-12-07 16:20:49 +1100107install -d $RPM_BUILD_ROOT/var/adm/fillup-templates
Damien Miller2efcd3c2000-09-16 16:30:55 +1100108install -d $RPM_BUILD_ROOT/usr/lib/ssh
Damien Miller606f8802000-09-16 15:39:56 +1100109install -m644 contrib/sshd.pam.generic $RPM_BUILD_ROOT/etc/pam.d/sshd
Damien Millerddaffa42000-03-15 12:31:18 +1100110install -m744 contrib/suse/rc.sshd $RPM_BUILD_ROOT/sbin/init.d/sshd
Damien Miller294df781999-11-23 10:11:29 +1100111ln -s ../../sbin/init.d/sshd $RPM_BUILD_ROOT/usr/sbin/rcsshd
Damien Miller2efcd3c2000-09-16 16:30:55 +1100112install -s contrib/gnome-ssh-askpass $RPM_BUILD_ROOT/usr/lib/ssh/gnome-ssh-askpass
113ln -s gnome-ssh-askpass $RPM_BUILD_ROOT/usr/lib/ssh/ssh-askpass
Damien Millerddaffa42000-03-15 12:31:18 +1100114install -m744 contrib/suse/rc.config.sshd \
Damien Miller93168eb1999-12-07 16:20:49 +1100115 $RPM_BUILD_ROOT/var/adm/fillup-templates
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000116
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000117%clean
118rm -rf $RPM_BUILD_ROOT
119
Damien Miller2efcd3c2000-09-16 16:30:55 +1100120%post
Damien Miller93168eb1999-12-07 16:20:49 +1100121if [ "$1" = 1 ]; then
122 echo "Creating SSH stop/start scripts in the rc directories..."
Damien Miller294df781999-11-23 10:11:29 +1100123 ln -s ../sshd /sbin/init.d/rc2.d/K20sshd
124 ln -s ../sshd /sbin/init.d/rc2.d/S20sshd
125 ln -s ../sshd /sbin/init.d/rc3.d/K20sshd
126 ln -s ../sshd /sbin/init.d/rc3.d/S20sshd
127fi
128echo "Updating /etc/rc.config..."
129if [ -x /bin/fillup ] ; then
130 /bin/fillup -q -d = etc/rc.config var/adm/fillup-templates/rc.config.sshd
131else
132 echo "ERROR: fillup not found. This should NOT happen in SuSE Linux."
133 echo "Update /etc/rc.config by hand from the following template file:"
134 echo " /var/adm/fillup-templates/rc.config.sshd"
135fi
Damien Millera37010e1999-10-29 09:18:29 +1000136if [ ! -f /etc/ssh/ssh_host_key -o ! -s /etc/ssh/ssh_host_key ]; then
Damien Miller93168eb1999-12-07 16:20:49 +1100137 echo "Generating SSH host key..."
Damien Millera37010e1999-10-29 09:18:29 +1000138 /usr/bin/ssh-keygen -b 1024 -f /etc/ssh/ssh_host_key -N '' >&2
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000139fi
Damien Miller58e579b2000-05-08 00:05:31 +1000140if [ ! -f /etc/ssh/ssh_host_dsa_key -o ! -s /etc/ssh/ssh_host_dsa_key ]; then
141 echo "Generating SSH DSA host key..."
142 /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' >&2
143fi
Damien Millera37010e1999-10-29 09:18:29 +1000144if test -r /var/run/sshd.pid
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000145then
Damien Miller93168eb1999-12-07 16:20:49 +1100146 echo "Restarting the running SSH daemon..."
Damien Miller294df781999-11-23 10:11:29 +1100147 /usr/sbin/rcsshd restart >&2
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000148fi
149
Damien Miller2efcd3c2000-09-16 16:30:55 +1100150%preun
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000151if [ "$1" = 0 ]
152then
Damien Miller93168eb1999-12-07 16:20:49 +1100153 echo "Stopping the SSH daemon..."
Damien Miller294df781999-11-23 10:11:29 +1100154 /usr/sbin/rcsshd stop >&2
Damien Miller93168eb1999-12-07 16:20:49 +1100155 echo "Removing SSH stop/start scripts from the rc directories..."
Damien Miller294df781999-11-23 10:11:29 +1100156 rm /sbin/init.d/rc2.d/K20sshd
157 rm /sbin/init.d/rc2.d/S20sshd
158 rm /sbin/init.d/rc3.d/K20sshd
159 rm /sbin/init.d/rc3.d/S20sshd
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000160fi
161
162%files
163%defattr(-,root,root)
Damien Miller71795162000-04-16 12:57:38 +1000164%doc COPYING.Ylonen ChangeLog OVERVIEW README*
Damien Millerc0d73901999-12-27 09:23:58 +1100165%doc RFC.nroff TODO UPGRADING CREDITS
Damien Miller36682061999-11-15 17:19:24 +1100166%attr(0755,root,root) %dir /etc/ssh
Damien Miller93168eb1999-12-07 16:20:49 +1100167%attr(0644,root,root) %config /etc/ssh/ssh_config
Damien Miller93168eb1999-12-07 16:20:49 +1100168%attr(0600,root,root) %config /etc/ssh/sshd_config
169%attr(0644,root,root) %config /etc/pam.d/sshd
Damien Miller294df781999-11-23 10:11:29 +1100170%attr(0755,root,root) %config /sbin/init.d/sshd
Damien Miller2efcd3c2000-09-16 16:30:55 +1100171%attr(0755,root,root) /usr/bin/ssh-keygen
172%attr(0755,root,root) /usr/bin/scp
173%attr(4755,root,root) /usr/bin/ssh
174%attr(-,root,root) /usr/bin/slogin
175%attr(0755,root,root) /usr/bin/ssh-agent
176%attr(0755,root,root) /usr/bin/ssh-add
177%attr(0755,root,root) /usr/sbin/sshd
Damien Miller294df781999-11-23 10:11:29 +1100178%attr(-,root,root) /usr/sbin/rcsshd
Damien Miller2efcd3c2000-09-16 16:30:55 +1100179%attr(0755,root,root) %dir /usr/lib/ssh
180%attr(0755,root,root) /usr/lib/ssh/ssh-askpass
181%attr(0755,root,root) /usr/lib/ssh/gnome-ssh-askpass
182%attr(0644,root,root) %doc /usr/man/man1/scp.1*
183%attr(0644,root,root) %doc /usr/man/man1/ssh.1*
184%attr(-,root,root) %doc /usr/man/man1/slogin.1*
185%attr(0644,root,root) %doc /usr/man/man1/ssh-agent.1*
186%attr(0644,root,root) %doc /usr/man/man1/ssh-add.1*
187%attr(0644,root,root) %doc /usr/man/man1/ssh-keygen.1*
188%attr(0644,root,root) %doc /usr/man/man8/sshd.8*
Damien Miller294df781999-11-23 10:11:29 +1100189%attr(0644,root,root) /var/adm/fillup-templates/rc.config.sshd
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000190