]> git.pld-linux.org Git - packages/openssh.git/blobdiff - openssh.spec
- up to 6.1p1
[packages/openssh.git] / openssh.spec
index 66174e3fa1dbff010c93e619b0d7be397b061e4e..46709cb7cf1bcdafa747892cd13eb34a77735c5e 100644 (file)
@@ -1,3 +1,7 @@
+# TODO:
+# - add trigger to enable this:
+#  * sshd(8): This release turns on pre-auth sandboxing sshd by default for
+#   new installs, by setting UsePrivilegeSeparation=sandbox in sshd_config.
 #
 # Conditional build:
 %bcond_without audit           # sshd audit support
@@ -30,13 +34,13 @@ Summary(pt_BR.UTF-8):       Implementação livre do SSH
 Summary(ru.UTF-8):     OpenSSH - свободная реализация протокола Secure Shell (SSH)
 Summary(uk.UTF-8):     OpenSSH - вільна реалізація протоколу Secure Shell (SSH)
 Name:          openssh
-Version:       5.9p1
-Release:       8
+Version:       6.1p1
+Release:       1
 Epoch:         2
 License:       BSD
 Group:         Applications/Networking
 Source0:       ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/%{name}-%{version}.tar.gz
-# Source0-md5: b50a499fa02616a47984b1920848b565
+# Source0-md5: 3345cbf4efe90ffb06a78670ab2d05d5
 Source1:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 # Source1-md5: 66943d481cc422512b537bcc2c7400d1
 Source2:       %{name}d.init
@@ -48,6 +52,8 @@ Source7:      %{name}-lpk.schema
 Source8:       %{name}d.upstart
 Source9:       sshd.service
 Source10:      sshd-keygen
+Source11:      sshd.socket
+Source12:      sshd@.service
 Patch100:      %{name}-heimdal.patch
 Patch0:                %{name}-no_libnsl.patch
 Patch2:                %{name}-pam_misc.patch
@@ -70,6 +76,7 @@ Patch13:      %{name}-kuserok.patch
 Patch14:       %{name}-bind.patch
 URL:           http://www.openssh.com/portable.html
 BuildRequires: %{__perl}
+%{?with_tests:BuildRequires:   %{name}-server}
 %{?with_audit:BuildRequires:   audit-libs-devel}
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
@@ -338,12 +345,13 @@ Requires(post,preun):     /sbin/chkconfig
 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}
 # remove in 6.0, kept for flawless upgrade
 Requires:      %{name}-server-ldap = %{epoch}:%{version}-%{release}
 Requires:      pam >= %{pam_ver}
 Requires:      rc-scripts >= 0.4.3.0
-Requires:      systemd-units >= 37-0.10
+Requires:      systemd-units >= 38
 Requires:      util-linux
 Suggests:      /bin/login
 Provides:      ssh-server
@@ -622,6 +630,9 @@ 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
@@ -678,15 +689,6 @@ if ! grep -qs ssh /etc/security/passwd.conf ; then
        umask 022
        echo "ssh" >> /etc/security/passwd.conf
 fi
-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
-fi
 NORESTART=1
 %systemd_post sshd.service
 
@@ -711,8 +713,8 @@ if grep -qE '^(UseLPK|Lpk)' %{_sysconfdir}/sshd_config; then
        %{__sed} -i -e '
                # disable old configs
                # just UseLPK/LkpLdapConf supported for now
-               s/^UseLPK/## Obsolete &/
-               s/^Lpk/## Obsolete &/
+               s/^\s*UseLPK/## Obsolete &/
+               s/^\s*Lpk/## Obsolete &/
                # Enable new ones, assumes /etc/ldap.conf defaults, see HOWTO.ldap-keys
                /UseLPK/iAuthorizedKeysCommand %{_libexecdir}/ssh-ldap-wrapper
        ' %{_sysconfdir}/sshd_config
@@ -723,6 +725,15 @@ if grep -qE '^(UseLPK|Lpk)' %{_sysconfdir}/sshd_config; then
        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
+fi
 
 %post server-upstart
 %upstart_post sshd
@@ -807,6 +818,8 @@ fi
 %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
This page took 0.049135 seconds and 4 git commands to generate.