6 Summary: The OpenSSH implementation of SSH protocol versions 1 and 2
7 Url: http://www.openssh.com/portable.html
8 Source0: openssh-%{version}.tar.bz2
9 Source1: openssh-nukeacss.sh
11 Source5: sshd@.service
13 Source7: sshd-keygen.service
15 Source1001: openssh.manifest
17 Patch0: 0001-customize-configuration.patch
18 Patch1: 0002-log-in-chroot.patch
19 Patch2: 0003-rand-clean.patch
20 Patch3: 0004-big-uid.patch
21 Patch4: 0005-client-loop.patch
22 Patch5: 0006-CVE-2010-4478.patch
23 Patch6: 0007-Do-not-put-ssh-keys-in-etc.patch
26 Group: Applications/Internet
28 BuildRequires: autoconf
29 BuildRequires: automake
30 BuildRequires: nss-devel
32 BuildRequires: util-linux
34 BuildRequires: zlib-devel
35 BuildRequires: pkgconfig(ncurses)
36 BuildRequires: pkgconfig(openssl)
39 Summary: The OpenSSH client applications
40 Group: Applications/Internet
41 Requires: openssh = %{version}
44 Summary: The OpenSSH server daemon
46 Requires: openssh = %{version}
50 SSH (Secure SHell) is a program for logging into and executing
51 commands on a remote machine. SSH is intended to replace rlogin and
52 rsh, and to provide secure encrypted communications between two
53 untrusted hosts over an insecure network. X11 connections and
54 arbitrary TCP/IP ports can also be forwarded over the secure channel.
56 OpenSSH is OpenBSD's version of the last free version of SSH, bringing
57 it up to date in terms of security and features, as well as removing
58 all patented algorithms to separate libraries.
60 This package includes the core files necessary for both the OpenSSH
61 client and server. To make this package useful, you should also
62 install openssh-clients, openssh-server, or both.
65 OpenSSH is a free version of SSH (Secure SHell), a program for logging
66 into and executing commands on a remote machine. This package includes
67 the clients necessary to make encrypted connections to SSH servers.
68 You'll also need to install the openssh package on OpenSSH clients.
71 OpenSSH is a free version of SSH (Secure SHell), a program for logging
72 into and executing commands on a remote machine. This package contains
73 the secure shell daemon (sshd). The sshd daemon allows SSH clients to
74 securely connect to your SSH server. You also need to have the openssh
89 CFLAGS="%{optflags}"; export CFLAGS
90 CFLAGS="$CFLAGS -fpie"
92 LDFLAGS="$LDFLAGS -pie"; export LDFLAGS
95 --sysconfdir=%{_sysconfdir}/ssh \
96 --libexecdir=%{_libexecdir}/openssh \
97 --datadir=%{_datadir}/openssh \
98 --with-rsh=%{_bindir}/rsh \
99 --with-default-path=/usr/local/bin:/bin:/usr/bin \
100 --with-superuser-path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin \
101 --with-privsep-path=%{_localstatedir}/empty/sshd \
102 --enable-vendor-patchlevel="FC-%{version}-%{release}" \
104 --without-zlib-version-check \
111 mkdir -p -m755 %{buildroot}%{_sysconfdir}/ssh
112 mkdir -p -m755 %{buildroot}%{_libexecdir}/openssh
113 mkdir -p -m755 %{buildroot}%{_localstatedir}/empty/sshd
116 rm -f %{buildroot}%{_sysconfdir}/ssh/ldap.conf
118 install -d %{buildroot}%{_libexecdir}/openssh
119 install -m755 contrib/ssh-copy-id %{buildroot}%{_bindir}/
121 # systemd integration
122 install -D -m 0644 %{SOURCE4} %{buildroot}/%{_libdir}/systemd/system/sshd.service
123 install -D -m 0644 %{SOURCE5} %{buildroot}/%{_libdir}/systemd/system/sshd@.service
124 install -D -m 0644 %{SOURCE6} %{buildroot}/%{_libdir}/systemd/system/sshd.socket
125 install -D -m 0644 %{SOURCE7} %{buildroot}/%{_libdir}/systemd/system/sshd-keygen.service
126 mkdir -p %{buildroot}/%{_libdir}/systemd/system/multi-user.target.wants
127 ln -s ../sshd.socket %{buildroot}/%{_libdir}/systemd/system/multi-user.target.wants/sshd.socket
128 install -D -m 0755 %{SOURCE8} %{buildroot}%{_sbindir}/sshd-keygen
129 mkdir -p %{buildroot}/%{_libdir}/systemd/system/multi-user.target.wants
130 ln -s ../sshd-keygen.service %{buildroot}/%{_libdir}/systemd/system/multi-user.target.wants/sshd-keygen.service
132 rm -f %{buildroot}%{_sysconfdir}/profile.d/gnome-ssh-askpass.*
134 mkdir -p %{buildroot}/var/empty/sshd
138 rm -rf %{buildroot}%{_datadir}/man
142 if [ $1 -eq 1 ] ; then
143 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
144 /usr//bin/systemctl enable sshd.service >/dev/null 2>&1 || :
145 /usr//bin/systemctl enable sshd-keygen.service >/dev/null 2>&1 || :
149 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
150 if [ $1 -ge 1 ] ; then
151 # Package upgrade, not uninstall
152 /usr//bin/systemctl try-restart sshd.service >/dev/null 2>&1 || :
156 if [ $1 -eq 0 ] ; then
157 # Package removal, not upgrade
158 /usr/bin/systemctl --no-reload disable sshd.service > /dev/null 2>&1 || :
159 /usr//bin/systemctl stop sshd.service > /dev/null 2>&1 || :
164 %manifest openssh.manifest
165 %attr(0755,root,root) %dir %{_sysconfdir}/ssh
166 %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/moduli
168 %attr(0755,root,root) %{_bindir}/ssh-keygen
169 %attr(0755,root,root) %dir %{_libexecdir}/openssh
170 %attr(4755,root,root) %{_libexecdir}/openssh/ssh-keysign
173 %manifest openssh.manifest
174 %attr(0755,root,root) %{_bindir}/ssh
175 %attr(0755,root,root) %{_bindir}/scp
176 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ssh_config
177 %attr(0755,root,root) %{_bindir}/slogin
178 %attr(2755,root,nobody) %{_bindir}/ssh-agent
179 %attr(0755,root,root) %{_bindir}/ssh-add
180 %attr(0755,root,root) %{_bindir}/ssh-keyscan
181 %attr(0755,root,root) %{_bindir}/sftp
182 %attr(0755,root,root) %{_bindir}/ssh-copy-id
183 %attr(0755,root,root) %{_libexecdir}/openssh/ssh-pkcs11-helper
186 %manifest openssh.manifest
187 %dir %attr(0711,root,root)
188 %attr(0750,root,root) /var/empty/sshd
189 %attr(0755,root,root) %{_sbindir}/sshd
190 %attr(0755,root,root) %{_libexecdir}/openssh/sftp-server
191 %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config
192 %{_libdir}/systemd/system/sshd.service
193 %{_libdir}/systemd/system/sshd.socket
194 %{_libdir}/systemd/system/sshd@.service
195 %{_libdir}/systemd/system/sshd-keygen.service
196 %{_libdir}/systemd/system/multi-user.target.wants/sshd.socket
197 %{_libdir}/systemd/system/multi-user.target.wants/sshd-keygen.service
198 %{_sbindir}/sshd-keygen