]> git.pld-linux.org Git - packages/openssh.git/blobdiff - openssh.spec
- updated config files (removed obsolete entries, added comments about new ones)
[packages/openssh.git] / openssh.spec
index de5f1ce45a72ad688b4b2a5c869a66fabb4bbc42..e1ef5bc2bab7be063851a8c4be5a578d3fc83565 100644 (file)
@@ -9,8 +9,8 @@ Summary(pt_BR): Implementa
 Summary(ru):   OpenSSH - Ó×ÏÂÏÄÎÁÑ ÒÅÁÌÉÚÁÃÉÑ ÐÒÏÔÏËÏÌÁ Secure Shell (SSH)
 Summary(uk):   OpenSSH - ×¦ÌØÎÁ ÒÅÁ̦ÚÁæѠÐÒÏÔÏËÏÌÕ Secure Shell (SSH)
 Name:          openssh
-Version:       3.3p1
-Release:       1
+Version:       3.4p1
+Release:       3
 License:       BSD
 Group:         Applications/Networking
 Source0:       ftp://ftp.ca.openbsd.org/pub/OpenBSD/OpenSSH/portable/%{name}-%{version}.tar.gz
@@ -23,22 +23,25 @@ Source6:    passwd.pamd
 Patch0:                %{name}-no_libnsl.patch
 Patch1:                %{name}-set_12.patch
 Patch2:                %{name}-linux-ipv6.patch
+Patch3:                %{name}-pseudo-mmap.patch
 URL:           http://www.openssh.com/
 BuildRequires: XFree86-devel
 BuildRequires: autoconf
 BuildRequires: automake
 %{!?_without_gnome:BuildRequires: gnome-libs-devel}
+BuildRequires: libwrap-devel
 BuildRequires: openssl-devel >= 0.9.6a
 BuildRequires: pam-devel
-BuildRequires: zlib-devel
-BuildRequires: libwrap-devel
 BuildRequires: perl
+BuildRequires: zlib-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Prereq:                openssl
+Requires:      FHS >= 2.1-24
 Obsoletes:     ssh
 
 %define                _sysconfdir     /etc/ssh
 %define                _libexecdir     %{_libdir}/%{name}
+%define                _privsepdir     /usr/share/empty
 
 %description
 Ssh (Secure Shell) a program for logging into a remote machine and for
@@ -132,10 +135,9 @@ Summary(pl):       Klienci protoko
 Summary(pt_BR):        Clientes do OpenSSH
 Summary(ru):   OpenSSH - ËÌÉÅÎÔÙ ÐÒÏÔÏËÏÌÁ Secure Shell
 Summary(uk):   OpenSSH - Ë̦¤ÎÔÉ ÐÒÏÔÏËÏÌÕ Secure Shell
-Requires:      openssh
 Group:         Applications/Networking
-Obsoletes:     ssh-clients
 Requires:      %{name} = %{version}
+Obsoletes:     ssh-clients
 
 %description clients
 Ssh (Secure Shell) a program for logging into a remote machine and for
@@ -188,15 +190,17 @@ Summary(pl):      Serwer protoko
 Summary(pt_BR):        Servidor OpenSSH para comunicações encriptadas
 Summary(ru):   OpenSSH - ÓÅÒ×ÅÒ ÐÒÏÔÏËÏÌÁ Secure Shell (sshd)
 Summary(uk):   OpenSSH - ÓÅÒ×ÅÒ ÐÒÏÔÏËÏÌÕ Secure Shell (sshd)
-Requires:      openssh
-Requires:      chkconfig >= 0.9
 Group:         Networking/Daemons
-Obsoletes:     ssh-server
+PreReq:                %{name} = %{version}
+PreReq:                rc-scripts >= 0.3.1-3
+Requires(pre): /bin/id
+Requires(pre): /usr/sbin/useradd
+Requires(post):        /sbin/chkconfig
+Requires(post):        chkconfig >= 0.9
+Requires(postun):      /usr/sbin/userdel
 Requires:      /bin/login
 Requires:      util-linux
-Prereq:                rc-scripts
-Prereq:                /sbin/chkconfig
-Prereq:                %{name} = %{version}
+Obsoletes:     ssh-server
 
 %description server
 Ssh (Secure Shell) a program for logging into a remote machine and for
@@ -309,6 +313,7 @@ GNOME.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 aclocal
@@ -323,7 +328,7 @@ aclocal
        --with-4in6 \
        --disable-suid-ssh \
        --with-tcp-wrappers \
-       --with-privsep-path=%{_var}/empty/sshd \
+       --with-privsep-path=%{_privsepdir} \
        --with-pid-dir=%{_localstatedir}/run
 
 echo '#define LOGIN_PROGRAM           "/bin/login"' >>config.h
@@ -346,7 +351,6 @@ install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/sshd
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/ssh_config
 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sshd_config
-install -d -m755 %{SOURCE7} $RPM_BUILD_ROOT%%{_var}/empty/sshd
 install -d $RPM_BUILD_ROOT%{_libexecdir}/ssh
 %{!?_without_gnome:install contrib/gnome-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/ssh/ssh-askpass}
 
@@ -359,9 +363,14 @@ touch $RPM_BUILD_ROOT/etc/security/blacklist.sshd
 rm -rf $RPM_BUILD_ROOT
 
 %pre server
-%{_sbindir}/groupadd -r -g %{sshd_gid} sshd 2>/dev/null || :
-%{_sbindir}/useradd -d /var/empty/sshd -s /bin/false -u %{sshd_uid} \
-        -g sshd -M -r sshd 2>/dev/null || :
+if [ -n "`id -u sshd 2>/dev/null`" ]; then
+       if [ "`id -u sshd`" != "40" ]; then
+               echo "Error: user sshd doesn't have uid=40. Correct this before installing ssh server." 1>&2
+               exit 1
+       fi
+else
+       /usr/sbin/useradd -u 40 -d %{_privsepdir} -s /bin/false -M -r -c "OpenSSH PrivSep User" -g nobody sshd 1>&2
+fi
        
 %post server
 /sbin/chkconfig --add sshd
@@ -382,6 +391,11 @@ if [ "$1" = "0" ]; then
        /sbin/chkconfig --del sshd
 fi
 
+%postun server
+if [ "$1" = "0" ]; then
+       /usr/sbin/userdel sshd
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc *.RNG TODO README OVERVIEW CREDITS Change*
@@ -410,7 +424,6 @@ fi
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_sbindir}/sshd
 %attr(755,root,root) %{_libexecdir}/sftp-server
-%dir %attr(0111,root,root) %{_var}/empty/sshd
 %dir %{_libexecdir}
 %{_mandir}/man8/sshd.8*
 %{_mandir}/man8/sftp-server.8*
This page took 0.066057 seconds and 4 git commands to generate.