2007-01-07 17:26:05 +01:00
|
|
|
#
|
2011-02-01 15:14:14 +01:00
|
|
|
# spec file for package openssh
|
2007-01-07 17:26:05 +01:00
|
|
|
#
|
2011-01-14 01:30:34 +01:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-07 17:26:05 +01:00
|
|
|
#
|
2008-08-23 01:32:08 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-07 17:26:05 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-04-09 22:21:23 +02:00
|
|
|
|
2007-01-07 17:26:05 +01:00
|
|
|
Name: openssh
|
2007-03-05 15:28:13 +01:00
|
|
|
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
|
2007-01-07 17:26:05 +01:00
|
|
|
%define _appdefdir %{_prefix}/share/X11/app-defaults
|
2011-01-14 01:30:23 +01:00
|
|
|
BuildRequires: audit-devel krb5-devel openssl-devel pam-devel tcpd-devel xorg-x11-devel
|
2008-08-23 01:32:08 +02:00
|
|
|
BuildRequires: libselinux-devel
|
2009-12-26 13:41:05 +01:00
|
|
|
License: BSD3c(or similar) ; MIT License (or similar)
|
2007-01-07 17:26:05 +01:00
|
|
|
Group: Productivity/Networking/SSH
|
|
|
|
Requires: /bin/netstat
|
2010-11-20 11:18:22 +01:00
|
|
|
PreReq: pwdutils %insserv_prereq %fillup_prereq coreutils
|
2007-01-07 17:26:05 +01:00
|
|
|
Conflicts: nonfreessh
|
2007-10-08 16:50:28 +02:00
|
|
|
AutoReqProv: on
|
2011-02-04 14:58:22 +01:00
|
|
|
Version: 5.8p1
|
2011-02-07 22:10:44 +01:00
|
|
|
Release: 1
|
2007-01-07 17:26:05 +01:00
|
|
|
%define xversion 1.2.4.1
|
|
|
|
Summary: Secure Shell Client and Server (Remote Login Program)
|
2007-10-08 16:50:28 +02:00
|
|
|
Url: http://www.openssh.com/
|
2007-01-07 17:26:05 +01:00
|
|
|
Source: %{name}-%{version}.tar.bz2
|
|
|
|
Source1: %{name}-SuSE.tar.bz2
|
|
|
|
Source2: sshd.pamd
|
|
|
|
Source3: x11-ssh-askpass-%{xversion}.tar.bz2
|
|
|
|
Source4: README.SuSE
|
|
|
|
Source5: converter.tar.bz2
|
|
|
|
Source6: README.kerberos
|
|
|
|
Source7: ssh.reg
|
|
|
|
Source8: ssh-askpass
|
2007-02-22 14:37:20 +01:00
|
|
|
Source9: sshd.fw
|
2011-02-04 11:44:51 +01:00
|
|
|
Patch: %{name}-%{version}-sshd_config.diff
|
2010-03-26 16:29:14 +01:00
|
|
|
Patch1: %{name}-%{version}-askpass-fix.diff
|
|
|
|
Patch2: %{name}-%{version}-pam-fix2.diff
|
|
|
|
Patch3: %{name}-%{version}-saveargv-fix.diff
|
|
|
|
Patch4: %{name}-%{version}-pam-fix3.diff
|
|
|
|
Patch5: %{name}-%{version}-gssapimitm.patch
|
|
|
|
Patch6: %{name}-%{version}-eal3.diff
|
|
|
|
Patch7: %{name}-%{version}-engines.diff
|
|
|
|
Patch8: %{name}-%{version}-blocksigalrm.diff
|
|
|
|
Patch9: %{name}-%{version}-send_locale.diff
|
|
|
|
Patch10: %{name}-%{version}-xauthlocalhostname.diff
|
|
|
|
Patch12: %{name}-%{version}-xauth.diff
|
|
|
|
Patch14: %{name}-%{version}-default-protocol.diff
|
|
|
|
Patch15: %{name}-%{version}-audit.patch
|
|
|
|
Patch16: %{name}-%{version}-pts.diff
|
2010-08-24 17:31:11 +02:00
|
|
|
Patch17: %{name}-%{version}-homechroot.patch
|
|
|
|
Patch18: %{name}-%{version}-sshconfig-knownhostschanges.diff
|
|
|
|
Patch19: %{name}-%{version}-host_ident.diff
|
2011-02-04 14:58:22 +01:00
|
|
|
Patch20: %{name}-%{version}-syntax-error.diff
|
2007-01-07 17:26:05 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2007-10-08 16:50:28 +02:00
|
|
|
|
2011-02-04 11:44:51 +01:00
|
|
|
%package askpass
|
2009-12-26 13:41:05 +01:00
|
|
|
License: BSD3c(or similar) ; MIT License (or similar)
|
2007-01-07 17:26:05 +01:00
|
|
|
Summary: A passphrase dialog for OpenSSH and the X Window System
|
|
|
|
Requires: openssh = %{version}
|
|
|
|
Provides: openssh:/usr/%_lib/ssh/ssh-askpass
|
|
|
|
Group: Productivity/Networking/SSH
|
|
|
|
|
|
|
|
%description
|
|
|
|
SSH (Secure Shell) is a program for logging into and executing commands
|
2007-07-27 02:01:43 +02:00
|
|
|
on a remote machine. It is intended to replace rsh (rlogin and rsh) and
|
|
|
|
provides openssl (secure encrypted communication) between two untrusted
|
|
|
|
hosts over an insecure network.
|
|
|
|
|
|
|
|
xorg-x11 (X Window System) connections and arbitrary TCP/IP ports can
|
|
|
|
also be forwarded over the secure channel.
|
2007-01-07 17:26:05 +01:00
|
|
|
|
|
|
|
%description askpass
|
|
|
|
Ssh (Secure Shell) is a program for logging into a remote machine and
|
|
|
|
for executing commands on a remote machine. This package contains an X
|
|
|
|
Window System passphrase dialog for OpenSSH.
|
|
|
|
|
|
|
|
%define prefix /usr
|
2007-12-06 16:29:46 +01:00
|
|
|
|
2007-01-07 17:26:05 +01:00
|
|
|
%prep
|
|
|
|
%setup -q -b 3 -a 1 -a 5
|
|
|
|
%patch
|
2010-03-26 16:29:14 +01:00
|
|
|
%patch2
|
|
|
|
%patch3
|
|
|
|
%patch4
|
|
|
|
%patch5
|
|
|
|
%patch6 -p1
|
|
|
|
%patch7 -p1
|
|
|
|
%patch8
|
|
|
|
%patch9
|
|
|
|
%patch10
|
|
|
|
%patch12
|
|
|
|
%patch14
|
|
|
|
%patch15 -p1
|
|
|
|
%patch16
|
|
|
|
%patch17
|
2007-01-07 17:26:05 +01:00
|
|
|
%patch18
|
2010-08-24 17:31:11 +02:00
|
|
|
%patch19 -p1
|
2011-02-04 14:58:22 +01:00
|
|
|
%patch20 -p1
|
2007-01-07 17:26:05 +01:00
|
|
|
cp -v %{SOURCE4} .
|
|
|
|
cp -v %{SOURCE6} .
|
|
|
|
cd ../x11-ssh-askpass-%{xversion}
|
2010-03-26 16:29:14 +01:00
|
|
|
%patch1
|
2007-01-07 17:26:05 +01:00
|
|
|
|
|
|
|
%build
|
2009-06-20 02:04:30 +02:00
|
|
|
# This package failed when testing with -Wl,-as-needed being default.
|
|
|
|
# So we disable it here, if you want to retest, just delete this comment and the line below.
|
|
|
|
export SUSE_ASNEEDED=0
|
2007-01-07 17:26:05 +01:00
|
|
|
%{?suse_update_config:%{suse_update_config}}
|
|
|
|
aclocal
|
|
|
|
autoheader
|
|
|
|
autoconf
|
2009-12-26 13:41:05 +01:00
|
|
|
%ifarch s390 s390x %sparc
|
2007-01-07 17:26:05 +01:00
|
|
|
PIEFLAGS="-fPIE"
|
|
|
|
%else
|
|
|
|
PIEFLAGS="-fpie"
|
|
|
|
%endif
|
|
|
|
#Obsoleted CFLAGS="-DUSE_POSIX_THREADS $RPM_OPT_FLAGS" CXXFLAGS="-DUSE_POSIX_THREADS $RPM_O \
|
|
|
|
#Obsoleted LDFLAGS="-lpthread" \
|
|
|
|
LDFLAGS="-pie" CFLAGS="$RPM_OPT_FLAGS $PIEFLAGS -fstack-protector" CXXFLAGS="$RPM_OPT_FLAGS $PIEFLAGS -fstack-protector" \
|
2010-05-25 11:02:50 +02:00
|
|
|
./configure --with-ssl-engine \
|
2011-02-04 11:44:51 +01:00
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--prefix=%{prefix} \
|
|
|
|
--infodir=%{_infodir} \
|
|
|
|
--sysconfdir=/etc/ssh \
|
|
|
|
--libexecdir=%{prefix}/%_lib/ssh \
|
|
|
|
--with-tcp-wrappers \
|
|
|
|
--with-selinux \
|
|
|
|
--with-pam \
|
|
|
|
--with-kerberos5=/usr \
|
|
|
|
--with-privsep-path=/var/lib/empty \
|
|
|
|
--disable-strip \
|
|
|
|
--with-linux-audit \
|
|
|
|
--with-xauth=%{_prefix}/bin/xauth \
|
|
|
|
--target=%{_target_cpu}-suse-linux
|
|
|
|
# --with-afs=/usr \
|
2010-11-02 11:02:35 +01:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
(cd converter; make %{?_smp_mflags})
|
2007-01-07 17:26:05 +01:00
|
|
|
cd contrib
|
|
|
|
cd ../../x11-ssh-askpass-%{xversion}
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
./configure \
|
2011-02-04 11:44:51 +01:00
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--libexecdir=%{prefix}/%_lib/ssh
|
2007-01-07 17:26:05 +01:00
|
|
|
xmkmf
|
|
|
|
make includes USRLIBDIR=%_prefix/%_lib
|
2010-11-02 11:02:35 +01:00
|
|
|
make %{?_smp_mflags} USRLIBDIR=%_prefix/%_lib CCOPTIONS="$RPM_OPT_FLAGS"
|
2007-01-07 17:26:05 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT/ install
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/etc/pam.d
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/var/lib/sshd
|
|
|
|
install -m 644 %{S:2} $RPM_BUILD_ROOT/etc/pam.d/sshd
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/etc/slp.reg.d/
|
|
|
|
install -m 644 %{S:7} $RPM_BUILD_ROOT/etc/slp.reg.d/
|
|
|
|
cp -a SuSE/* $RPM_BUILD_ROOT
|
|
|
|
# install shell script to automate the process of adding your public key to a remote machine
|
|
|
|
install -m 755 contrib/ssh-copy-id $RPM_BUILD_ROOT/usr/bin
|
|
|
|
install -m 644 contrib/ssh-copy-id.1 $RPM_BUILD_ROOT/%{_mandir}/man1
|
|
|
|
(cd converter; make install DESTDIR=$RPM_BUILD_ROOT/)
|
|
|
|
cd ../x11-ssh-askpass-%{xversion}
|
|
|
|
make BINDIR=/usr/%_lib/ssh DESTDIR=$RPM_BUILD_ROOT install install.man
|
|
|
|
rm -rf $RPM_BUILD_ROOT/usr/%_lib/ssh/ssh-askpass
|
|
|
|
sed -e "s@usr/lib/ssh@usr/%_lib/ssh@" < %{S:8} > $RPM_BUILD_ROOT/usr/%_lib/ssh/ssh-askpass
|
|
|
|
rm -f $RPM_BUILD_ROOT/usr/share/Ssh.bin
|
|
|
|
sed -i -e s@/usr/libexec@/usr/%{_lib}@g $RPM_BUILD_ROOT/etc/ssh/sshd_config
|
2007-02-22 14:37:20 +01:00
|
|
|
#install firewall definitions format is described here:
|
|
|
|
#/usr/share/SuSEfirewall2/services/TEMPLATE
|
2007-03-05 15:28:13 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir}
|
2008-01-07 02:53:19 +01:00
|
|
|
install -m 644 %{S:9} $RPM_BUILD_ROOT/%{_fwdefdir}/sshd
|
2007-01-07 17:26:05 +01:00
|
|
|
|
|
|
|
%pre
|
2010-03-01 01:45:43 +01:00
|
|
|
getent group sshd >/dev/null || /usr/sbin/groupadd -o -r sshd
|
|
|
|
getent passwd sshd >/dev/null || /usr/sbin/useradd -r -g sshd -d /var/lib/sshd -s /bin/false -c "SSH daemon" sshd
|
2007-01-07 17:26:05 +01:00
|
|
|
|
|
|
|
%post
|
2009-06-10 15:25:29 +02:00
|
|
|
%{fillup_and_insserv -n ssh sshd}
|
2007-01-07 17:26:05 +01:00
|
|
|
|
|
|
|
%preun
|
|
|
|
%stop_on_removal sshd
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%restart_on_update sshd
|
|
|
|
%{insserv_cleanup}
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %attr(755,root,root) /var/lib/sshd
|
2008-07-25 04:29:14 +02:00
|
|
|
%doc README.SuSE README.kerberos ChangeLog OVERVIEW README TODO LICENCE CREDITS
|
2007-01-07 17:26:05 +01:00
|
|
|
%attr(0755,root,root) %dir /etc/ssh
|
|
|
|
%attr(0600,root,root) %config(noreplace) /etc/ssh/moduli
|
2010-11-20 11:18:22 +01:00
|
|
|
%attr(0644,root,root) %config(noreplace) /etc/ssh/ssh_config
|
|
|
|
%attr(0640,root,root) %config(noreplace) /etc/ssh/sshd_config
|
2007-01-07 17:26:05 +01:00
|
|
|
%attr(0644,root,root) %config /etc/pam.d/sshd
|
|
|
|
%attr(0755,root,root) %config /etc/init.d/sshd
|
|
|
|
%attr(0755,root,root) /usr/bin/ssh
|
|
|
|
/usr/bin/scp
|
|
|
|
/usr/bin/sftp
|
|
|
|
/usr/bin/slogin
|
|
|
|
/usr/bin/ssh-*
|
|
|
|
/usr/sbin/*
|
|
|
|
%attr(444,root,root) %doc %{_mandir}/man1/scp.1.gz
|
|
|
|
%attr(444,root,root) %doc %{_mandir}/man1/ssh-keygen.1.gz
|
|
|
|
%attr(444,root,root) %doc /usr/share/man/man1/ssh-keyconverter.1.gz
|
|
|
|
%attr(444,root,root) %doc %{_mandir}/man1/ssh.1.gz
|
|
|
|
%attr(444,root,root) %doc %{_mandir}/man1/slogin.1.gz
|
|
|
|
%attr(444,root,root) %doc %{_mandir}/man1/ssh-agent.1*
|
|
|
|
%attr(444,root,root) %doc %{_mandir}/man1/ssh-add.1*
|
|
|
|
%attr(444,root,root) %doc %{_mandir}/man1/ssh-keyscan.1*
|
|
|
|
%attr(444,root,root) %doc %{_mandir}/man1/sftp.1*
|
|
|
|
%attr(444,root,root) %doc %{_mandir}/man1/ssh-copy-id.1*
|
|
|
|
%attr(444,root,root) %doc %{_mandir}/man5/*
|
|
|
|
%attr(444,root,root) %doc %{_mandir}/man8/*
|
|
|
|
%attr(0755,root,root) %dir /usr/%_lib/ssh
|
|
|
|
%attr(0755,root,root) /usr/%_lib/ssh/sftp-server
|
|
|
|
%attr(0755,root,root) /usr/%_lib/ssh/ssh-keysign
|
2010-03-26 16:29:14 +01:00
|
|
|
%attr(0755,root,root) /usr/%_lib/ssh/ssh-pkcs11-helper
|
2007-01-07 17:26:05 +01:00
|
|
|
%dir /etc/slp.reg.d
|
2009-03-03 22:42:45 +01:00
|
|
|
%config /etc/slp.reg.d/ssh.reg
|
2007-01-07 17:26:05 +01:00
|
|
|
/var/adm/fillup-templates/sysconfig.ssh
|
2007-03-15 01:56:27 +01:00
|
|
|
%config %{_fwdefdir}/sshd
|
2007-01-07 17:26:05 +01:00
|
|
|
|
|
|
|
%files askpass
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%attr(0755,root,root) /usr/%_lib/ssh/ssh-askpass
|
|
|
|
%attr(0755,root,root) /usr/%_lib/ssh/x11-ssh-askpass
|
|
|
|
%doc %_mandir/man1/ssh-askpass.1x.gz
|
|
|
|
%doc %_mandir/man1/x11-ssh-askpass.1x.gz
|
2009-03-03 22:42:45 +01:00
|
|
|
%_appdefdir/SshAskpass
|
2007-12-06 16:29:46 +01:00
|
|
|
|
2007-02-22 14:37:20 +01:00
|
|
|
%changelog
|