Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 1 | # Default values for additional components |
| 2 | %define build_x11_askpass 1 |
| 3 | |
| 4 | # Define the UID/GID to use for privilege separation |
| 5 | %define sshd_gid 65 |
| 6 | %define sshd_uid 71 |
| 7 | |
| 8 | # The version of x11-ssh-askpass to use |
| 9 | %define xversion 1.2.4.1 |
| 10 | |
| 11 | # Allow the ability to override defaults with -D skip_xxx=1 |
| 12 | %{?skip_x11_askpass:%define build_x11_askpass 0} |
| 13 | |
| 14 | Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation |
| 15 | Name: openssh |
Damien Miller | b086d4a | 2010-03-22 06:11:55 +1100 | [diff] [blame^] | 16 | Version: 5.5p1 |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 17 | URL: http://www.openssh.com/ |
| 18 | Release: 1 |
| 19 | Source0: openssh-%{version}.tar.gz |
| 20 | Source1: x11-ssh-askpass-%{xversion}.tar.gz |
| 21 | License: BSD |
| 22 | Group: Productivity/Networking/SSH |
| 23 | BuildRoot: %{_tmppath}/openssh-%{version}-buildroot |
| 24 | PreReq: openssl |
| 25 | Obsoletes: ssh |
| 26 | Provides: ssh |
Damien Miller | 294df78 | 1999-11-23 10:11:29 +1100 | [diff] [blame] | 27 | # |
Damien Miller | 93168eb | 1999-12-07 16:20:49 +1100 | [diff] [blame] | 28 | # (Build[ing] Prereq[uisites] only work for RPM 2.95 and newer.) |
| 29 | # building prerequisites -- stuff for |
| 30 | # OpenSSL (openssl-devel), |
| 31 | # TCP Wrappers (nkitb), |
| 32 | # and Gnome (glibdev, gtkdev, and gnlibsd) |
Damien Miller | 294df78 | 1999-11-23 10:11:29 +1100 | [diff] [blame] | 33 | # |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 34 | BuildPrereq: openssl |
| 35 | BuildPrereq: nkitb |
| 36 | #BuildPrereq: glibdev |
| 37 | #BuildPrereq: gtkdev |
| 38 | #BuildPrereq: gnlibsd |
| 39 | |
| 40 | %package askpass |
| 41 | Summary: A passphrase dialog for OpenSSH and the X window System. |
| 42 | Group: Productivity/Networking/SSH |
| 43 | Requires: openssh = %{version} |
| 44 | Obsoletes: ssh-extras |
| 45 | Provides: openssh:${_libdir}/ssh/ssh-askpass |
| 46 | |
| 47 | %if %{build_x11_askpass} |
| 48 | BuildPrereq: XFree86-devel |
| 49 | %endif |
Damien Miller | 3668206 | 1999-11-15 17:19:24 +1100 | [diff] [blame] | 50 | |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 51 | %description |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 52 | Ssh (Secure Shell) is a program for logging into a remote machine and for |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 53 | executing commands in a remote machine. It is intended to replace |
| 54 | rlogin and rsh, and provide secure encrypted communications between |
| 55 | two untrusted hosts over an insecure network. X11 connections and |
| 56 | arbitrary TCP/IP ports can also be forwarded over the secure channel. |
| 57 | |
| 58 | OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 59 | up to date in terms of security and features, as well as removing all |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 60 | patented algorithms to seperate libraries (OpenSSL). |
| 61 | |
Damien Miller | 2efcd3c | 2000-09-16 16:30:55 +1100 | [diff] [blame] | 62 | This package includes all files necessary for both the OpenSSH |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 63 | client and server. |
| 64 | |
| 65 | %description askpass |
| 66 | Ssh (Secure Shell) is a program for logging into a remote machine and for |
| 67 | executing commands in a remote machine. It is intended to replace |
| 68 | rlogin and rsh, and provide secure encrypted communications between |
| 69 | two untrusted hosts over an insecure network. X11 connections and |
| 70 | arbitrary TCP/IP ports can also be forwarded over the secure channel. |
| 71 | |
| 72 | OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it |
| 73 | up to date in terms of security and features, as well as removing all |
| 74 | patented algorithms to seperate libraries (OpenSSL). |
| 75 | |
| 76 | This package contains an X Window System passphrase dialog for OpenSSH. |
Damien Miller | 3f51bf5 | 1999-11-09 14:46:02 +1100 | [diff] [blame] | 77 | |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 78 | %changelog |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 79 | * Wed Oct 26 2005 Iain Morgan <imorgan@nas.nasa.gov> |
| 80 | - Removed accidental inclusion of --without-zlib-version-check |
| 81 | * Tue Oct 25 2005 Iain Morgan <imorgan@nas.nasa.gov> |
| 82 | - Overhaul to deal with newer versions of SuSE and OpenSSH |
Damien Miller | e69f18c | 2000-06-12 16:38:54 +1000 | [diff] [blame] | 83 | * Mon Jun 12 2000 Damien Miller <djm@mindrot.org> |
| 84 | - Glob manpages to catch compressed files |
Damien Miller | ddaffa4 | 2000-03-15 12:31:18 +1100 | [diff] [blame] | 85 | * Wed Mar 15 2000 Damien Miller <djm@ibs.com.au> |
| 86 | - Updated for new location |
| 87 | - Updated for new gnome-ssh-askpass build |
Damien Miller | 95c8e5d | 1999-12-27 16:43:42 +1100 | [diff] [blame] | 88 | * Sun Dec 26 1999 Chris Saia <csaia@wtower.com> |
| 89 | - Made symlink to gnome-ssh-askpass called ssh-askpass |
Damien Miller | 93168eb | 1999-12-07 16:20:49 +1100 | [diff] [blame] | 90 | * Wed Nov 24 1999 Chris Saia <csaia@wtower.com> |
| 91 | - Removed patches that included /etc/pam.d/sshd, /sbin/init.d/rc.sshd, and |
| 92 | /var/adm/fillup-templates/rc.config.sshd, since Damien merged these into |
| 93 | his released tarfile |
| 94 | - Changed permissions on ssh_config in the install procedure to 644 from 600 |
| 95 | even though it was correct in the %files section and thus right in the RPMs |
| 96 | - Postinstall script for the server now only prints "Generating SSH host |
| 97 | key..." if we need to actually do this, in order to eliminate a confusing |
| 98 | message if an SSH host key is already in place |
| 99 | - Marked all manual pages as %doc(umentation) |
Damien Miller | 294df78 | 1999-11-23 10:11:29 +1100 | [diff] [blame] | 100 | * Mon Nov 22 1999 Chris Saia <csaia@wtower.com> |
| 101 | - Added flag to configure daemon with TCP Wrappers support |
| 102 | - Added building prerequisites (works in RPM 3.0 and newer) |
| 103 | * Thu Nov 18 1999 Chris Saia <csaia@wtower.com> |
| 104 | - Made this package correct for SuSE. |
| 105 | - Changed instances of pam_pwdb.so to pam_unix.so, since it works more properly |
| 106 | with SuSE, and lib_pwdb.so isn't installed by default. |
Damien Miller | 3668206 | 1999-11-15 17:19:24 +1100 | [diff] [blame] | 107 | * Mon Nov 15 1999 Damien Miller <djm@mindrot.org> |
| 108 | - Split subpackages further based on patch from jim knoble <jmknoble@pobox.com> |
Damien Miller | 38c6088 | 1999-11-13 13:09:31 +1100 | [diff] [blame] | 109 | * Sat Nov 13 1999 Damien Miller <djm@mindrot.org> |
Damien Miller | c6d5ce8 | 1999-11-15 16:01:07 +1100 | [diff] [blame] | 110 | - Added 'Obsoletes' directives |
Damien Miller | 742d2cb | 1999-11-09 14:28:26 +1100 | [diff] [blame] | 111 | * Tue Nov 09 1999 Damien Miller <djm@ibs.com.au> |
| 112 | - Use make install |
Damien Miller | 3f51bf5 | 1999-11-09 14:46:02 +1100 | [diff] [blame] | 113 | - Subpackages |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 114 | * Mon Nov 08 1999 Damien Miller <djm@ibs.com.au> |
| 115 | - Added links for slogin |
| 116 | - Fixed perms on manpages |
Damien Miller | 2bbb9d0 | 1999-10-30 09:46:20 +1000 | [diff] [blame] | 117 | * Sat Oct 30 1999 Damien Miller <djm@ibs.com.au> |
| 118 | - Renamed init script |
Damien Miller | 070f7a1 | 1999-10-29 10:29:29 +1000 | [diff] [blame] | 119 | * Fri Oct 29 1999 Damien Miller <djm@ibs.com.au> |
| 120 | - Back to old binary names |
Damien Miller | 0623076 | 1999-10-28 14:03:14 +1000 | [diff] [blame] | 121 | * Thu Oct 28 1999 Damien Miller <djm@ibs.com.au> |
| 122 | - Use autoconf |
| 123 | - New binary names |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 124 | * Wed Oct 27 1999 Damien Miller <djm@ibs.com.au> |
| 125 | - Initial RPMification, based on Jan "Yenya" Kasprzak's <kas@fi.muni.cz> spec. |
| 126 | |
| 127 | %prep |
Damien Miller | 871f3ca | 1999-12-07 16:32:10 +1100 | [diff] [blame] | 128 | |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 129 | %if %{build_x11_askpass} |
| 130 | %setup -q -a 1 |
| 131 | %else |
Damien Miller | 871f3ca | 1999-12-07 16:32:10 +1100 | [diff] [blame] | 132 | %setup -q |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 133 | %endif |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 134 | |
| 135 | %build |
Damien Miller | 742d2cb | 1999-11-09 14:28:26 +1100 | [diff] [blame] | 136 | CFLAGS="$RPM_OPT_FLAGS" \ |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 137 | %configure --prefix=/usr \ |
| 138 | --sysconfdir=%{_sysconfdir}/ssh \ |
| 139 | --mandir=%{_mandir} \ |
| 140 | --with-privsep-path=/var/lib/empty \ |
Damien Miller | 7948d93 | 2001-09-18 15:12:10 +1000 | [diff] [blame] | 141 | --with-pam \ |
Damien Miller | 7948d93 | 2001-09-18 15:12:10 +1000 | [diff] [blame] | 142 | --with-tcp-wrappers \ |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 143 | --libexecdir=%{_libdir}/ssh |
Damien Miller | cdb8b1d | 1999-11-09 14:31:49 +1100 | [diff] [blame] | 144 | make |
| 145 | |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 146 | %if %{build_x11_askpass} |
| 147 | cd x11-ssh-askpass-%{xversion} |
| 148 | %configure --mandir=/usr/X11R6/man \ |
| 149 | --libexecdir=%{_libdir}/ssh |
| 150 | xmkmf -a |
| 151 | make |
Damien Miller | ddaffa4 | 2000-03-15 12:31:18 +1100 | [diff] [blame] | 152 | cd .. |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 153 | %endif |
Damien Miller | ddaffa4 | 2000-03-15 12:31:18 +1100 | [diff] [blame] | 154 | |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 155 | %install |
| 156 | rm -rf $RPM_BUILD_ROOT |
Damien Miller | 7d7c60d | 2000-01-26 14:37:48 +1100 | [diff] [blame] | 157 | make install DESTDIR=$RPM_BUILD_ROOT/ |
Damien Miller | 2b72a4a | 1999-11-09 14:34:31 +1100 | [diff] [blame] | 158 | install -d $RPM_BUILD_ROOT/etc/pam.d/ |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 159 | install -d $RPM_BUILD_ROOT/etc/init.d/ |
Damien Miller | 93168eb | 1999-12-07 16:20:49 +1100 | [diff] [blame] | 160 | install -d $RPM_BUILD_ROOT/var/adm/fillup-templates |
Damien Miller | 606f880 | 2000-09-16 15:39:56 +1100 | [diff] [blame] | 161 | install -m644 contrib/sshd.pam.generic $RPM_BUILD_ROOT/etc/pam.d/sshd |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 162 | install -m744 contrib/suse/rc.sshd $RPM_BUILD_ROOT/etc/init.d/sshd |
| 163 | install -m744 contrib/suse/sysconfig.ssh \ |
Damien Miller | 93168eb | 1999-12-07 16:20:49 +1100 | [diff] [blame] | 164 | $RPM_BUILD_ROOT/var/adm/fillup-templates |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 165 | |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 166 | %if %{build_x11_askpass} |
| 167 | cd x11-ssh-askpass-%{xversion} |
| 168 | make install install.man BINDIR=%{_libdir}/ssh DESTDIR=$RPM_BUILD_ROOT/ |
| 169 | rm -f $RPM_BUILD_ROOT/usr/share/Ssh.bin |
| 170 | %endif |
| 171 | |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 172 | %clean |
| 173 | rm -rf $RPM_BUILD_ROOT |
| 174 | |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 175 | %pre |
| 176 | /usr/sbin/groupadd -g %{sshd_gid} -o -r sshd 2> /dev/null || : |
| 177 | /usr/sbin/useradd -r -o -g sshd -u %{sshd_uid} -s /bin/false -c "SSH Privilege Separation User" -d /var/lib/sshd sshd 2> /dev/null || : |
| 178 | |
Damien Miller | 2efcd3c | 2000-09-16 16:30:55 +1100 | [diff] [blame] | 179 | %post |
Damien Miller | a37010e | 1999-10-29 09:18:29 +1000 | [diff] [blame] | 180 | if [ ! -f /etc/ssh/ssh_host_key -o ! -s /etc/ssh/ssh_host_key ]; then |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 181 | echo "Generating SSH RSA host key..." |
| 182 | /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' >&2 |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 183 | fi |
Damien Miller | 58e579b | 2000-05-08 00:05:31 +1000 | [diff] [blame] | 184 | if [ ! -f /etc/ssh/ssh_host_dsa_key -o ! -s /etc/ssh/ssh_host_dsa_key ]; then |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 185 | echo "Generating SSH DSA host key..." |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 186 | /usr/bin/ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N '' >&2 |
Damien Miller | 58e579b | 2000-05-08 00:05:31 +1000 | [diff] [blame] | 187 | fi |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 188 | %{fillup_and_insserv -n -s -y ssh sshd START_SSHD} |
| 189 | %run_permissions |
| 190 | |
| 191 | %verifyscript |
| 192 | %verify_permissions -e /etc/ssh/sshd_config -e /etc/ssh/ssh_config -e /usr/bin/ssh |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 193 | |
Damien Miller | 2efcd3c | 2000-09-16 16:30:55 +1100 | [diff] [blame] | 194 | %preun |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 195 | %stop_on_removal sshd |
| 196 | |
| 197 | %postun |
| 198 | %restart_on_update sshd |
| 199 | %{insserv_cleanup} |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 200 | |
| 201 | %files |
| 202 | %defattr(-,root,root) |
Damien Miller | 7691e5f | 2009-02-21 18:03:04 +1100 | [diff] [blame] | 203 | %doc ChangeLog OVERVIEW README* PROTOCOL* |
Damien Miller | 493f032 | 2008-06-28 16:01:35 +1000 | [diff] [blame] | 204 | %doc TODO CREDITS LICENCE |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 205 | %attr(0755,root,root) %dir %{_sysconfdir}/ssh |
| 206 | %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ssh_config |
| 207 | %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config |
| 208 | %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/moduli |
| 209 | %attr(0644,root,root) %config(noreplace) /etc/pam.d/sshd |
| 210 | %attr(0755,root,root) %config /etc/init.d/sshd |
| 211 | %attr(0755,root,root) %{_bindir}/ssh-keygen |
| 212 | %attr(0755,root,root) %{_bindir}/scp |
| 213 | %attr(0755,root,root) %{_bindir}/ssh |
| 214 | %attr(-,root,root) %{_bindir}/slogin |
| 215 | %attr(0755,root,root) %{_bindir}/ssh-agent |
| 216 | %attr(0755,root,root) %{_bindir}/ssh-add |
| 217 | %attr(0755,root,root) %{_bindir}/ssh-keyscan |
| 218 | %attr(0755,root,root) %{_bindir}/sftp |
| 219 | %attr(0755,root,root) %{_sbindir}/sshd |
| 220 | %attr(0755,root,root) %dir %{_libdir}/ssh |
| 221 | %attr(0755,root,root) %{_libdir}/ssh/sftp-server |
| 222 | %attr(4711,root,root) %{_libdir}/ssh/ssh-keysign |
Damien Miller | d27d85d | 2010-02-24 18:21:45 +1100 | [diff] [blame] | 223 | %attr(0755,root,root) %{_libdir}/ssh/ssh-pkcs11-helper |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 224 | %attr(0644,root,root) %doc %{_mandir}/man1/scp.1* |
| 225 | %attr(0644,root,root) %doc %{_mandir}/man1/sftp.1* |
| 226 | %attr(-,root,root) %doc %{_mandir}/man1/slogin.1* |
| 227 | %attr(0644,root,root) %doc %{_mandir}/man1/ssh.1* |
| 228 | %attr(0644,root,root) %doc %{_mandir}/man1/ssh-add.1* |
| 229 | %attr(0644,root,root) %doc %{_mandir}/man1/ssh-agent.1* |
| 230 | %attr(0644,root,root) %doc %{_mandir}/man1/ssh-keygen.1* |
| 231 | %attr(0644,root,root) %doc %{_mandir}/man1/ssh-keyscan.1* |
Damien Miller | f299ff8 | 2008-06-26 16:01:56 +1000 | [diff] [blame] | 232 | %attr(0644,root,root) %doc %{_mandir}/man5/moduli.5* |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 233 | %attr(0644,root,root) %doc %{_mandir}/man5/ssh_config.5* |
| 234 | %attr(0644,root,root) %doc %{_mandir}/man5/sshd_config.5* |
| 235 | %attr(0644,root,root) %doc %{_mandir}/man8/sftp-server.8* |
| 236 | %attr(0644,root,root) %doc %{_mandir}/man8/ssh-keysign.8* |
Damien Miller | d27d85d | 2010-02-24 18:21:45 +1100 | [diff] [blame] | 237 | %attr(0644,root,root) %doc %{_mandir}/man8/ssh-pkcs11-helper.8* |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 238 | %attr(0644,root,root) %doc %{_mandir}/man8/sshd.8* |
| 239 | %attr(0644,root,root) /var/adm/fillup-templates/sysconfig.ssh |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 240 | |
Damien Miller | 88edf62 | 2005-10-30 11:55:45 +1100 | [diff] [blame] | 241 | %if %{build_x11_askpass} |
| 242 | %files askpass |
| 243 | %defattr(-,root,root) |
| 244 | %doc x11-ssh-askpass-%{xversion}/README |
| 245 | %doc x11-ssh-askpass-%{xversion}/ChangeLog |
| 246 | %doc x11-ssh-askpass-%{xversion}/SshAskpass*.ad |
| 247 | %attr(0755,root,root) %{_libdir}/ssh/ssh-askpass |
| 248 | %attr(0755,root,root) %{_libdir}/ssh/x11-ssh-askpass |
| 249 | %attr(0644,root,root) %doc /usr/X11R6/man/man1/ssh-askpass.1x* |
| 250 | %attr(0644,root,root) %doc /usr/X11R6/man/man1/x11-ssh-askpass.1x* |
| 251 | %attr(0644,root,root) %config /usr/X11R6/lib/X11/app-defaults/SshAskpass |
| 252 | %endif |