Summary(uk.UTF-8): OpenSSH - вільна реалізація протоколу Secure Shell (SSH)
Name: openssh
Version: 6.7p1
-Release: 3
+Release: 4
Epoch: 2
License: BSD
Group: Applications/Networking
Source7: %{name}-lpk.schema
Source9: sshd.service
Source10: sshd-keygen
-Source11: sshd.socket
-Source12: sshd@.service
Patch0: %{name}-no_libnsl.patch
Patch2: %{name}-pam_misc.patch
Patch3: %{name}-sigpipe.patch
Requires(postun): /usr/sbin/userdel
Requires(pre): /bin/id
Requires(pre): /usr/sbin/useradd
-Requires(post,preun,postun): systemd-units >= 38
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: pam >= %{pam_ver}
Requires: rc-scripts >= 0.4.3.0
-Requires: systemd-units >= 38
Requires: util-linux
%{?with_ldap:Suggests: %{name}-server-ldap}
Suggests: /bin/login
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{init,pam.d,rc.d/init.d,sysconfig,security,env.d}} \
- $RPM_BUILD_ROOT{%{_libexecdir}/ssh,%{schemadir},%{systemdunitdir}}
+ $RPM_BUILD_ROOT{%{_libexecdir}/ssh,%{schemadir}}
install -d $RPM_BUILD_ROOT/etc/{profile.d,X11/xinit/xinitrc.d}
%{__make} install \
ln -sf /etc/profile.d/ssh-agent.sh $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/ssh-agent.sh
cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}
cp -p %{SOURCE7} $RPM_BUILD_ROOT%{schemadir}
-cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/init/sshd.conf
-%{__sed} -e 's|@@LIBEXECDIR@@|%{_libexecdir}|g' %{SOURCE9} >$RPM_BUILD_ROOT%{systemdunitdir}/sshd.service
cp -p %{SOURCE10} $RPM_BUILD_ROOT%{_libexecdir}/sshd-keygen
-cp -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}
-cp -p %{SOURCE12} $RPM_BUILD_ROOT%{systemdunitdir}
-
%if %{with gnome}
install -p contrib/gnome-ssh-askpass1 $RPM_BUILD_ROOT%{_libexecdir}/ssh/ssh-askpass
%endif
/sbin/chkconfig --add sshd
%service sshd reload "OpenSSH Daemon"
NORESTART=1
-%systemd_post sshd.service
%preun server
if [ "$1" = "0" ]; then
%service sshd stop
/sbin/chkconfig --del sshd
fi
-%systemd_preun sshd.service
%postun server
if [ "$1" = "0" ]; then
%userremove sshd
fi
-%systemd_reload
%triggerpostun server -- %{name}-server < 6.2p1-1
cp -f %{_sysconfdir}/sshd_config{,.rpmorig}
# Enable new ones, assumes /etc/ldap.conf defaults, see HOWTO.ldap-keys
/UseLPK/iAuthorizedKeysCommand %{_libexecdir}/ssh-ldap-wrapper
' %{_sysconfdir}/sshd_config
- if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
- /bin/systemctl try-restart sshd.service || :
- else
- %service -q sshd reload
- fi
-fi
-%systemd_trigger sshd.service
-if [ -x /bin/systemd_booted ] && /bin/systemd_booted; then
-%banner %{name}-server -e << EOF
-!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!
-! Native systemd support for sshd has been installed. !
-! Restarting sshd.service with systemctl WILL kill all !
-! active ssh sessions (daemon as such will be started). !
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-EOF
+ %service -q sshd reload
fi
%post -n openldap-schema-openssh-lpk
%attr(754,root,root) /etc/rc.d/init.d/sshd
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sshd
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.sshd
-%{systemdunitdir}/sshd.service
-%{systemdunitdir}/sshd.socket
-%{systemdunitdir}/sshd@.service
%if %{with ldap}
%files server-ldap
+++ /dev/null
-
-start on pld.network-started and started SERVICE_syslog=y and started random
-stop on pld.shutdown-started
-
-respawn
-respawn limit 10 5
-console output
-oom never
-
-pre-start script
- test -x /usr/sbin/sshd || { stop; exit 0; }
- test -c /dev/null || { stop; exit 0; }
-
- if [ ! -s /etc/ssh/ssh_host_key \
- -o ! -s /etc/ssh/ssh_host_rsa_key \
- -o ! -s /etc/ssh/ssh_host_dsa_key \
- -o ! -s /etc/ssh/ssh_host_ecdsa_key \
- ]; then
- # call gen keys if any of the files above is missing or empty
- /etc/rc.d/init.d/sshd ssh_gen_keys
- fi
-end script
-
-script
- . /etc/rc.d/init.d/functions
- . /etc/sysconfig/network
-
- if is_yes "$IPV4_NETWORKING" && is_no "$IPV6_NETWORKING"; then
- OPTIONS="$OPTIONS -4"
- fi
- if is_yes "$IPV6_NETWORKING" && is_no "$IPV4_NETWORKING"; then
- OPTIONS="$OPTIONS -6"
- fi
-
- exec /usr/sbin/sshd -D $OPTIONS
-end script