- fixed conditions for fedora

- snapshot 20140825
This commit is contained in:
Petr Lautrbach 2014-08-25 10:59:33 +02:00
parent ae736694aa
commit 882868f701
1 changed files with 9 additions and 17 deletions

View File

@ -15,17 +15,18 @@
# rpm -ba|--rebuild --define 'skip_xxx 1'
%{?skip_gnome_askpass:%global no_gnome_askpass 1}
%define openssh_ver 6.6.1p1
%define openssh_rel 1
%define openssh_ver 6.7p1
%define openssh_rel 0
%define snap 20140825
Summary: An open source implementation of SSH protocol versions 1 and 2
Name: openssh
Version: %{openssh_ver}
Release: %{openssh_rel}%{?dist}
Release: %{openssh_rel}.%{snap}%{?dist}
URL: http://www.openssh.com/portable.html
#URL1: http://pamsshagentauth.sourceforge.net
#Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz
Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-6.6p1.tar.gz
Source0: http://www.mindrot.org/openssh_snap/openssh-SNAP-%{snap}.tar.gz
#Source1: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz.asc
Source2: sshd.pam
Source3: sshd.init
@ -38,8 +39,6 @@ Source12: sshd-keygen.service
Source13: sshd-keygen
Source14: sshd_config
Patch1: openssh-5618210618256bbf5f4f71b2887ff186fd451736.patch
License: BSD
Group: Applications/Internet
Requires: /sbin/nologin
@ -143,8 +142,7 @@ into and executing commands on a remote machine. This package contains
an X11 passphrase dialog for OpenSSH.
%prep
%setup -q -n openssh-6.6p1
%patch1 -p1 -b .curve25519-sha256-bug
%setup -q -n openssh
%build
# the -fvisibility=hidden is needed for clean build of the pam_ssh_agent_auth
@ -255,15 +253,13 @@ install -m755 %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
install -m644 %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/sshd
install -m644 %{SOURCE14} $RPM_BUILD_ROOT/etc/ssh/sshd_config
install -m755 %{SOURCE13} $RPM_BUILD_ROOT/%{_sbindir}/sshd-keygen
%if 0%{?fedora}
%if 0%{?rhel} > 6
%if 0%{?fedora} || 0%{?rhel} > 6
install -d -m755 $RPM_BUILD_ROOT/%{_unitdir}
install -m644 %{SOURCE9} $RPM_BUILD_ROOT/%{_unitdir}/sshd@.service
install -m644 %{SOURCE10} $RPM_BUILD_ROOT/%{_unitdir}/sshd.socket
install -m644 %{SOURCE11} $RPM_BUILD_ROOT/%{_unitdir}/sshd.service
install -m644 %{SOURCE12} $RPM_BUILD_ROOT/%{_unitdir}/sshd-keygen.service
%endif
%endif
install -m755 contrib/ssh-copy-id $RPM_BUILD_ROOT%{_bindir}/
install contrib/ssh-copy-id.1 $RPM_BUILD_ROOT%{_mandir}/man1/
@ -296,8 +292,7 @@ getent passwd sshd >/dev/null || \
useradd -c "Privilege-separated SSH" -u %{sshd_uid} -g sshd \
-s /sbin/nologin -r -d /var/empty/sshd sshd 2> /dev/null || :
%if 0%{?fedora}
%if 0%{?rhel} > 6
%if 0%{?fedora} || 0%{?rhel} > 6
%post server
%systemd_post sshd.service sshd.socket
@ -319,7 +314,6 @@ getent passwd sshd >/dev/null || \
%triggerpostun -n openssh-server-sysvinit -- openssh-server < 5.8p2-12
/sbin/chkconfig --add sshd >/dev/null 2>&1 || :
%endif
%endif
%files
%defattr(-,root,root)
@ -368,14 +362,12 @@ getent passwd sshd >/dev/null || \
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config
%attr(0644,root,root) %config(noreplace) /etc/pam.d/sshd
%attr(0640,root,root) %config(noreplace) /etc/sysconfig/sshd
%if 0%{?fedora}
%if 0%{?rhel} > 6
%if 0%{?fedora} || 0%{?rhel} > 6
%attr(0644,root,root) %{_unitdir}/sshd.service
%attr(0644,root,root) %{_unitdir}/sshd@.service
%attr(0644,root,root) %{_unitdir}/sshd.socket
%attr(0644,root,root) %{_unitdir}/sshd-keygen.service
%endif
%endif
%files server-sysvinit
%defattr(-,root,root)