blob: a17399e331ff093fa13098889a2fa580afc067e2 [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 Miller82e7ae52001-03-20 09:30:50 +11003Version: 2.5.2p1
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 Miller01fa6382001-01-17 11:23:39 +110091./configure --prefix=/usr \
92 --sysconfdir=/etc/ssh \
93 --with-pam \
94 --with-gnome-askpass \
95 --with-tcp-wrappers \
96 --with-ipv4-default \
97 --libexecdir=/usr/lib/ssh
Damien Millercdb8b1d1999-11-09 14:31:49 +110098make
99
Damien Millerddaffa42000-03-15 12:31:18 +1100100cd contrib
Damien Millerbb68c162000-03-15 12:38:13 +1100101gcc -O -g `gnome-config --cflags gnome gnomeui` \
Damien Millerddaffa42000-03-15 12:31:18 +1100102 gnome-ssh-askpass.c -o gnome-ssh-askpass \
103 `gnome-config --libs gnome gnomeui`
104cd ..
105
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000106%install
107rm -rf $RPM_BUILD_ROOT
Damien Miller7d7c60d2000-01-26 14:37:48 +1100108make install DESTDIR=$RPM_BUILD_ROOT/
Damien Miller294df781999-11-23 10:11:29 +1100109install -d $RPM_BUILD_ROOT/etc/ssh/
Damien Miller2b72a4a1999-11-09 14:34:31 +1100110install -d $RPM_BUILD_ROOT/etc/pam.d/
Damien Miller294df781999-11-23 10:11:29 +1100111install -d $RPM_BUILD_ROOT/sbin/init.d/
Damien Miller93168eb1999-12-07 16:20:49 +1100112install -d $RPM_BUILD_ROOT/var/adm/fillup-templates
Damien Miller2efcd3c2000-09-16 16:30:55 +1100113install -d $RPM_BUILD_ROOT/usr/lib/ssh
Damien Miller606f8802000-09-16 15:39:56 +1100114install -m644 contrib/sshd.pam.generic $RPM_BUILD_ROOT/etc/pam.d/sshd
Damien Millerddaffa42000-03-15 12:31:18 +1100115install -m744 contrib/suse/rc.sshd $RPM_BUILD_ROOT/sbin/init.d/sshd
Damien Miller294df781999-11-23 10:11:29 +1100116ln -s ../../sbin/init.d/sshd $RPM_BUILD_ROOT/usr/sbin/rcsshd
Damien Miller2efcd3c2000-09-16 16:30:55 +1100117install -s contrib/gnome-ssh-askpass $RPM_BUILD_ROOT/usr/lib/ssh/gnome-ssh-askpass
118ln -s gnome-ssh-askpass $RPM_BUILD_ROOT/usr/lib/ssh/ssh-askpass
Damien Millerddaffa42000-03-15 12:31:18 +1100119install -m744 contrib/suse/rc.config.sshd \
Damien Miller93168eb1999-12-07 16:20:49 +1100120 $RPM_BUILD_ROOT/var/adm/fillup-templates
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000121
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000122%clean
123rm -rf $RPM_BUILD_ROOT
124
Damien Miller2efcd3c2000-09-16 16:30:55 +1100125%post
Damien Miller93168eb1999-12-07 16:20:49 +1100126if [ "$1" = 1 ]; then
127 echo "Creating SSH stop/start scripts in the rc directories..."
Damien Miller294df781999-11-23 10:11:29 +1100128 ln -s ../sshd /sbin/init.d/rc2.d/K20sshd
129 ln -s ../sshd /sbin/init.d/rc2.d/S20sshd
130 ln -s ../sshd /sbin/init.d/rc3.d/K20sshd
131 ln -s ../sshd /sbin/init.d/rc3.d/S20sshd
132fi
133echo "Updating /etc/rc.config..."
134if [ -x /bin/fillup ] ; then
135 /bin/fillup -q -d = etc/rc.config var/adm/fillup-templates/rc.config.sshd
136else
137 echo "ERROR: fillup not found. This should NOT happen in SuSE Linux."
138 echo "Update /etc/rc.config by hand from the following template file:"
139 echo " /var/adm/fillup-templates/rc.config.sshd"
140fi
Damien Millera37010e1999-10-29 09:18:29 +1000141if [ ! -f /etc/ssh/ssh_host_key -o ! -s /etc/ssh/ssh_host_key ]; then
Damien Miller93168eb1999-12-07 16:20:49 +1100142 echo "Generating SSH host key..."
Damien Millera37010e1999-10-29 09:18:29 +1000143 /usr/bin/ssh-keygen -b 1024 -f /etc/ssh/ssh_host_key -N '' >&2
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000144fi
Damien Miller58e579b2000-05-08 00:05:31 +1000145if [ ! -f /etc/ssh/ssh_host_dsa_key -o ! -s /etc/ssh/ssh_host_dsa_key ]; then
146 echo "Generating SSH DSA host key..."
147 /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' >&2
148fi
Damien Millera37010e1999-10-29 09:18:29 +1000149if test -r /var/run/sshd.pid
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000150then
Damien Miller93168eb1999-12-07 16:20:49 +1100151 echo "Restarting the running SSH daemon..."
Damien Miller294df781999-11-23 10:11:29 +1100152 /usr/sbin/rcsshd restart >&2
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000153fi
154
Damien Miller2efcd3c2000-09-16 16:30:55 +1100155%preun
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000156if [ "$1" = 0 ]
157then
Damien Miller93168eb1999-12-07 16:20:49 +1100158 echo "Stopping the SSH daemon..."
Damien Miller294df781999-11-23 10:11:29 +1100159 /usr/sbin/rcsshd stop >&2
Damien Miller93168eb1999-12-07 16:20:49 +1100160 echo "Removing SSH stop/start scripts from the rc directories..."
Damien Miller294df781999-11-23 10:11:29 +1100161 rm /sbin/init.d/rc2.d/K20sshd
162 rm /sbin/init.d/rc2.d/S20sshd
163 rm /sbin/init.d/rc3.d/K20sshd
164 rm /sbin/init.d/rc3.d/S20sshd
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000165fi
166
167%files
168%defattr(-,root,root)
Damien Miller981eeed2000-12-27 19:06:05 +1100169%doc ChangeLog OVERVIEW README*
Damien Millerab360502000-11-06 12:52:25 +1100170%doc RFC.nroff TODO CREDITS LICENSE
Damien Miller36682061999-11-15 17:19:24 +1100171%attr(0755,root,root) %dir /etc/ssh
Damien Miller93168eb1999-12-07 16:20:49 +1100172%attr(0644,root,root) %config /etc/ssh/ssh_config
Damien Miller93168eb1999-12-07 16:20:49 +1100173%attr(0600,root,root) %config /etc/ssh/sshd_config
Damien Miller0986b552000-11-11 08:36:38 +1100174%attr(0600,root,root) %config /etc/ssh/primes
Damien Miller93168eb1999-12-07 16:20:49 +1100175%attr(0644,root,root) %config /etc/pam.d/sshd
Damien Miller294df781999-11-23 10:11:29 +1100176%attr(0755,root,root) %config /sbin/init.d/sshd
Damien Miller2efcd3c2000-09-16 16:30:55 +1100177%attr(0755,root,root) /usr/bin/ssh-keygen
178%attr(0755,root,root) /usr/bin/scp
179%attr(4755,root,root) /usr/bin/ssh
180%attr(-,root,root) /usr/bin/slogin
181%attr(0755,root,root) /usr/bin/ssh-agent
182%attr(0755,root,root) /usr/bin/ssh-add
Damien Miller33804262001-02-04 23:20:18 +1100183%attr(0755,root,root) /usr/bin/ssh-keyscan
184%attr(0755,root,root) /usr/bin/sftp
Damien Miller2efcd3c2000-09-16 16:30:55 +1100185%attr(0755,root,root) /usr/sbin/sshd
Damien Miller294df781999-11-23 10:11:29 +1100186%attr(-,root,root) /usr/sbin/rcsshd
Damien Miller2efcd3c2000-09-16 16:30:55 +1100187%attr(0755,root,root) %dir /usr/lib/ssh
188%attr(0755,root,root) /usr/lib/ssh/ssh-askpass
189%attr(0755,root,root) /usr/lib/ssh/gnome-ssh-askpass
190%attr(0644,root,root) %doc /usr/man/man1/scp.1*
191%attr(0644,root,root) %doc /usr/man/man1/ssh.1*
192%attr(-,root,root) %doc /usr/man/man1/slogin.1*
193%attr(0644,root,root) %doc /usr/man/man1/ssh-agent.1*
194%attr(0644,root,root) %doc /usr/man/man1/ssh-add.1*
195%attr(0644,root,root) %doc /usr/man/man1/ssh-keygen.1*
196%attr(0644,root,root) %doc /usr/man/man8/sshd.8*
Damien Miller294df781999-11-23 10:11:29 +1100197%attr(0644,root,root) /var/adm/fillup-templates/rc.config.sshd
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000198