blob: 5b64c150f3b52599a70f3a2ebe467e34cc00ebd0 [file] [log] [blame]
Damien Miller88edf622005-10-30 11:55:45 +11001# 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
14Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation
15Name: openssh
Damien Miller80e766f2016-07-24 21:50:13 +100016Version: 7.3p1
Darren Tucker461f50e2016-10-21 06:55:58 +110017URL: https://www.openssh.com/
Damien Miller88edf622005-10-30 11:55:45 +110018Release: 1
19Source0: openssh-%{version}.tar.gz
20Source1: x11-ssh-askpass-%{xversion}.tar.gz
21License: BSD
22Group: Productivity/Networking/SSH
23BuildRoot: %{_tmppath}/openssh-%{version}-buildroot
24PreReq: openssl
25Obsoletes: ssh
26Provides: ssh
Damien Miller294df781999-11-23 10:11:29 +110027#
Damien Miller93168eb1999-12-07 16:20:49 +110028# (Build[ing] Prereq[uisites] only work for RPM 2.95 and newer.)
29# building prerequisites -- stuff for
30# OpenSSL (openssl-devel),
Damien Miller93168eb1999-12-07 16:20:49 +110031# and Gnome (glibdev, gtkdev, and gnlibsd)
Damien Miller294df781999-11-23 10:11:29 +110032#
Damien Miller88edf622005-10-30 11:55:45 +110033BuildPrereq: openssl
Damien Miller2db99772011-08-12 11:02:35 +100034BuildPrereq: zlib-devel
Damien Miller88edf622005-10-30 11:55:45 +110035#BuildPrereq: glibdev
36#BuildPrereq: gtkdev
37#BuildPrereq: gnlibsd
38
39%package askpass
40Summary: A passphrase dialog for OpenSSH and the X window System.
41Group: Productivity/Networking/SSH
42Requires: openssh = %{version}
43Obsoletes: ssh-extras
44Provides: openssh:${_libdir}/ssh/ssh-askpass
45
46%if %{build_x11_askpass}
47BuildPrereq: XFree86-devel
48%endif
Damien Miller36682061999-11-15 17:19:24 +110049
Damien Millerd4a8b7e1999-10-27 13:42:43 +100050%description
Damien Miller88edf622005-10-30 11:55:45 +110051Ssh (Secure Shell) is a program for logging into a remote machine and for
Damien Millerd4a8b7e1999-10-27 13:42:43 +100052executing commands in a remote machine. It is intended to replace
53rlogin and rsh, and provide secure encrypted communications between
54two untrusted hosts over an insecure network. X11 connections and
55arbitrary TCP/IP ports can also be forwarded over the secure channel.
56
57OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
Damien Millera8e06ce2003-11-21 23:48:55 +110058up to date in terms of security and features, as well as removing all
Damien Millerd4a8b7e1999-10-27 13:42:43 +100059patented algorithms to seperate libraries (OpenSSL).
60
Damien Miller2efcd3c2000-09-16 16:30:55 +110061This package includes all files necessary for both the OpenSSH
Damien Miller88edf622005-10-30 11:55:45 +110062client and server.
63
64%description askpass
65Ssh (Secure Shell) is a program for logging into a remote machine and for
66executing commands in a remote machine. It is intended to replace
67rlogin and rsh, and provide secure encrypted communications between
68two untrusted hosts over an insecure network. X11 connections and
69arbitrary TCP/IP ports can also be forwarded over the secure channel.
70
71OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
72up to date in terms of security and features, as well as removing all
73patented algorithms to seperate libraries (OpenSSL).
74
75This package contains an X Window System passphrase dialog for OpenSSH.
Damien Miller3f51bf51999-11-09 14:46:02 +110076
Damien Millerd4a8b7e1999-10-27 13:42:43 +100077%changelog
Damien Miller88edf622005-10-30 11:55:45 +110078* Wed Oct 26 2005 Iain Morgan <imorgan@nas.nasa.gov>
79- Removed accidental inclusion of --without-zlib-version-check
80* Tue Oct 25 2005 Iain Morgan <imorgan@nas.nasa.gov>
81- Overhaul to deal with newer versions of SuSE and OpenSSH
Damien Millere69f18c2000-06-12 16:38:54 +100082* Mon Jun 12 2000 Damien Miller <djm@mindrot.org>
83- Glob manpages to catch compressed files
Damien Millerddaffa42000-03-15 12:31:18 +110084* Wed Mar 15 2000 Damien Miller <djm@ibs.com.au>
85- Updated for new location
86- Updated for new gnome-ssh-askpass build
Damien Miller95c8e5d1999-12-27 16:43:42 +110087* Sun Dec 26 1999 Chris Saia <csaia@wtower.com>
88- Made symlink to gnome-ssh-askpass called ssh-askpass
Damien Miller93168eb1999-12-07 16:20:49 +110089* Wed Nov 24 1999 Chris Saia <csaia@wtower.com>
90- Removed patches that included /etc/pam.d/sshd, /sbin/init.d/rc.sshd, and
91 /var/adm/fillup-templates/rc.config.sshd, since Damien merged these into
92 his released tarfile
93- Changed permissions on ssh_config in the install procedure to 644 from 600
94 even though it was correct in the %files section and thus right in the RPMs
95- Postinstall script for the server now only prints "Generating SSH host
96 key..." if we need to actually do this, in order to eliminate a confusing
97 message if an SSH host key is already in place
98- Marked all manual pages as %doc(umentation)
Damien Miller294df781999-11-23 10:11:29 +110099* Mon Nov 22 1999 Chris Saia <csaia@wtower.com>
100- Added flag to configure daemon with TCP Wrappers support
101- Added building prerequisites (works in RPM 3.0 and newer)
102* Thu Nov 18 1999 Chris Saia <csaia@wtower.com>
103- Made this package correct for SuSE.
104- Changed instances of pam_pwdb.so to pam_unix.so, since it works more properly
105 with SuSE, and lib_pwdb.so isn't installed by default.
Damien Miller36682061999-11-15 17:19:24 +1100106* Mon Nov 15 1999 Damien Miller <djm@mindrot.org>
107- Split subpackages further based on patch from jim knoble <jmknoble@pobox.com>
Damien Miller38c60881999-11-13 13:09:31 +1100108* Sat Nov 13 1999 Damien Miller <djm@mindrot.org>
Damien Millerc6d5ce81999-11-15 16:01:07 +1100109- Added 'Obsoletes' directives
Damien Miller742d2cb1999-11-09 14:28:26 +1100110* Tue Nov 09 1999 Damien Miller <djm@ibs.com.au>
111- Use make install
Damien Miller3f51bf51999-11-09 14:46:02 +1100112- Subpackages
Damien Miller356a0b01999-11-08 15:30:59 +1100113* Mon Nov 08 1999 Damien Miller <djm@ibs.com.au>
114- Added links for slogin
115- Fixed perms on manpages
Damien Miller2bbb9d01999-10-30 09:46:20 +1000116* Sat Oct 30 1999 Damien Miller <djm@ibs.com.au>
117- Renamed init script
Damien Miller070f7a11999-10-29 10:29:29 +1000118* Fri Oct 29 1999 Damien Miller <djm@ibs.com.au>
119- Back to old binary names
Damien Miller06230761999-10-28 14:03:14 +1000120* Thu Oct 28 1999 Damien Miller <djm@ibs.com.au>
121- Use autoconf
122- New binary names
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000123* Wed Oct 27 1999 Damien Miller <djm@ibs.com.au>
124- Initial RPMification, based on Jan "Yenya" Kasprzak's <kas@fi.muni.cz> spec.
125
126%prep
Damien Miller871f3ca1999-12-07 16:32:10 +1100127
Damien Miller88edf622005-10-30 11:55:45 +1100128%if %{build_x11_askpass}
129%setup -q -a 1
130%else
Damien Miller871f3ca1999-12-07 16:32:10 +1100131%setup -q
Damien Miller88edf622005-10-30 11:55:45 +1100132%endif
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000133
134%build
Damien Miller742d2cb1999-11-09 14:28:26 +1100135CFLAGS="$RPM_OPT_FLAGS" \
Damien Miller88edf622005-10-30 11:55:45 +1100136%configure --prefix=/usr \
137 --sysconfdir=%{_sysconfdir}/ssh \
138 --mandir=%{_mandir} \
139 --with-privsep-path=/var/lib/empty \
Damien Miller7948d932001-09-18 15:12:10 +1000140 --with-pam \
Damien Miller88edf622005-10-30 11:55:45 +1100141 --libexecdir=%{_libdir}/ssh
Damien Millercdb8b1d1999-11-09 14:31:49 +1100142make
143
Damien Miller88edf622005-10-30 11:55:45 +1100144%if %{build_x11_askpass}
145cd x11-ssh-askpass-%{xversion}
146%configure --mandir=/usr/X11R6/man \
147 --libexecdir=%{_libdir}/ssh
148xmkmf -a
149make
Damien Millerddaffa42000-03-15 12:31:18 +1100150cd ..
Damien Miller88edf622005-10-30 11:55:45 +1100151%endif
Damien Millerddaffa42000-03-15 12:31:18 +1100152
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000153%install
154rm -rf $RPM_BUILD_ROOT
Damien Miller7d7c60d2000-01-26 14:37:48 +1100155make install DESTDIR=$RPM_BUILD_ROOT/
Damien Miller2b72a4a1999-11-09 14:34:31 +1100156install -d $RPM_BUILD_ROOT/etc/pam.d/
Damien Miller88edf622005-10-30 11:55:45 +1100157install -d $RPM_BUILD_ROOT/etc/init.d/
Damien Miller93168eb1999-12-07 16:20:49 +1100158install -d $RPM_BUILD_ROOT/var/adm/fillup-templates
Damien Miller606f8802000-09-16 15:39:56 +1100159install -m644 contrib/sshd.pam.generic $RPM_BUILD_ROOT/etc/pam.d/sshd
Damien Miller88edf622005-10-30 11:55:45 +1100160install -m744 contrib/suse/rc.sshd $RPM_BUILD_ROOT/etc/init.d/sshd
161install -m744 contrib/suse/sysconfig.ssh \
Damien Miller93168eb1999-12-07 16:20:49 +1100162 $RPM_BUILD_ROOT/var/adm/fillup-templates
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000163
Damien Miller88edf622005-10-30 11:55:45 +1100164%if %{build_x11_askpass}
165cd x11-ssh-askpass-%{xversion}
166make install install.man BINDIR=%{_libdir}/ssh DESTDIR=$RPM_BUILD_ROOT/
167rm -f $RPM_BUILD_ROOT/usr/share/Ssh.bin
168%endif
169
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000170%clean
171rm -rf $RPM_BUILD_ROOT
172
Damien Miller88edf622005-10-30 11:55:45 +1100173%pre
174/usr/sbin/groupadd -g %{sshd_gid} -o -r sshd 2> /dev/null || :
175/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 || :
176
Damien Miller2efcd3c2000-09-16 16:30:55 +1100177%post
Damien Miller2db99772011-08-12 11:02:35 +1000178/usr/bin/ssh-keygen -A
179%{fillup_and_insserv -n -y ssh sshd}
Damien Miller88edf622005-10-30 11:55:45 +1100180%run_permissions
181
182%verifyscript
183%verify_permissions -e /etc/ssh/sshd_config -e /etc/ssh/ssh_config -e /usr/bin/ssh
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000184
Damien Miller2efcd3c2000-09-16 16:30:55 +1100185%preun
Damien Miller88edf622005-10-30 11:55:45 +1100186%stop_on_removal sshd
187
188%postun
189%restart_on_update sshd
190%{insserv_cleanup}
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000191
192%files
193%defattr(-,root,root)
Damien Miller7691e5f2009-02-21 18:03:04 +1100194%doc ChangeLog OVERVIEW README* PROTOCOL*
Damien Miller493f0322008-06-28 16:01:35 +1000195%doc TODO CREDITS LICENCE
Damien Miller88edf622005-10-30 11:55:45 +1100196%attr(0755,root,root) %dir %{_sysconfdir}/ssh
197%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ssh_config
198%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config
199%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/moduli
200%attr(0644,root,root) %config(noreplace) /etc/pam.d/sshd
201%attr(0755,root,root) %config /etc/init.d/sshd
202%attr(0755,root,root) %{_bindir}/ssh-keygen
203%attr(0755,root,root) %{_bindir}/scp
204%attr(0755,root,root) %{_bindir}/ssh
Damien Miller88edf622005-10-30 11:55:45 +1100205%attr(0755,root,root) %{_bindir}/ssh-agent
206%attr(0755,root,root) %{_bindir}/ssh-add
207%attr(0755,root,root) %{_bindir}/ssh-keyscan
208%attr(0755,root,root) %{_bindir}/sftp
209%attr(0755,root,root) %{_sbindir}/sshd
210%attr(0755,root,root) %dir %{_libdir}/ssh
211%attr(0755,root,root) %{_libdir}/ssh/sftp-server
212%attr(4711,root,root) %{_libdir}/ssh/ssh-keysign
Damien Millerd27d85d2010-02-24 18:21:45 +1100213%attr(0755,root,root) %{_libdir}/ssh/ssh-pkcs11-helper
Damien Miller88edf622005-10-30 11:55:45 +1100214%attr(0644,root,root) %doc %{_mandir}/man1/scp.1*
215%attr(0644,root,root) %doc %{_mandir}/man1/sftp.1*
Damien Miller88edf622005-10-30 11:55:45 +1100216%attr(0644,root,root) %doc %{_mandir}/man1/ssh.1*
217%attr(0644,root,root) %doc %{_mandir}/man1/ssh-add.1*
218%attr(0644,root,root) %doc %{_mandir}/man1/ssh-agent.1*
219%attr(0644,root,root) %doc %{_mandir}/man1/ssh-keygen.1*
220%attr(0644,root,root) %doc %{_mandir}/man1/ssh-keyscan.1*
Damien Millerf299ff82008-06-26 16:01:56 +1000221%attr(0644,root,root) %doc %{_mandir}/man5/moduli.5*
Damien Miller88edf622005-10-30 11:55:45 +1100222%attr(0644,root,root) %doc %{_mandir}/man5/ssh_config.5*
223%attr(0644,root,root) %doc %{_mandir}/man5/sshd_config.5*
224%attr(0644,root,root) %doc %{_mandir}/man8/sftp-server.8*
225%attr(0644,root,root) %doc %{_mandir}/man8/ssh-keysign.8*
Damien Millerd27d85d2010-02-24 18:21:45 +1100226%attr(0644,root,root) %doc %{_mandir}/man8/ssh-pkcs11-helper.8*
Damien Miller88edf622005-10-30 11:55:45 +1100227%attr(0644,root,root) %doc %{_mandir}/man8/sshd.8*
228%attr(0644,root,root) /var/adm/fillup-templates/sysconfig.ssh
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000229
Damien Miller88edf622005-10-30 11:55:45 +1100230%if %{build_x11_askpass}
231%files askpass
232%defattr(-,root,root)
233%doc x11-ssh-askpass-%{xversion}/README
234%doc x11-ssh-askpass-%{xversion}/ChangeLog
235%doc x11-ssh-askpass-%{xversion}/SshAskpass*.ad
236%attr(0755,root,root) %{_libdir}/ssh/ssh-askpass
237%attr(0755,root,root) %{_libdir}/ssh/x11-ssh-askpass
238%attr(0644,root,root) %doc /usr/X11R6/man/man1/ssh-askpass.1x*
239%attr(0644,root,root) %doc /usr/X11R6/man/man1/x11-ssh-askpass.1x*
240%attr(0644,root,root) %config /usr/X11R6/lib/X11/app-defaults/SshAskpass
241%endif