2001-11-03 19:09:32 +00:00
|
|
|
%define use-stable 1
|
|
|
|
%if %{use-stable}
|
2002-04-23 11:15:31 +00:00
|
|
|
%define version 3.2p1
|
2001-11-03 19:09:32 +00:00
|
|
|
%define cvs %{nil}
|
|
|
|
%define release 1
|
|
|
|
%else
|
|
|
|
%define version 3.0p1
|
|
|
|
%define cvs cvs20011102
|
|
|
|
%define release 0r1
|
|
|
|
%endif
|
|
|
|
%define xsa x11-ssh-askpass
|
|
|
|
%define askpass %{xsa}-1.2.4.1
|
2001-04-27 05:50:48 +00:00
|
|
|
|
|
|
|
Name : openssh
|
2001-11-03 19:09:32 +00:00
|
|
|
Version : %{version}%{cvs}
|
|
|
|
Release : %{release}
|
2001-04-27 05:50:48 +00:00
|
|
|
Group : System/Network
|
|
|
|
|
2001-11-03 19:09:32 +00:00
|
|
|
Summary : OpenSSH free Secure Shell (SSH) implementation.
|
2001-04-27 05:50:48 +00:00
|
|
|
|
|
|
|
Copyright : BSD
|
2001-11-03 19:09:32 +00:00
|
|
|
Packager : Raymund Will <ray@caldera.de>
|
2001-04-27 05:50:48 +00:00
|
|
|
URL : http://www.openssh.com/
|
|
|
|
|
|
|
|
Obsoletes : ssh, ssh-clients, openssh-clients
|
|
|
|
|
|
|
|
BuildRoot : /tmp/%{Name}-%{Version}
|
|
|
|
|
2001-11-03 19:09:32 +00:00
|
|
|
# %{use-stable}==1: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable
|
|
|
|
# %{use-stable}==0: :pserver:cvs@bass.directhit.com:/cvs/openssh_cvs
|
|
|
|
Source0: see-above:/.../openssh-%{Version}.tar.gz
|
|
|
|
%if %{use-stable}
|
|
|
|
Source1: see-above:/.../openssh-%{Version}.tar.gz.sig
|
|
|
|
%endif
|
|
|
|
Source2: http://www.ntrnet.net/~jmknoble/software/%{xsa}/%{askpass}.tar.gz
|
|
|
|
Source3: http://www.openssh.com/faq.html
|
2001-04-27 05:50:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
%Package server
|
|
|
|
Group : System/Network
|
|
|
|
Requires : openssh = %{Version}
|
|
|
|
Obsoletes : ssh-server
|
|
|
|
|
|
|
|
Summary : OpenSSH Secure Shell protocol server (sshd).
|
|
|
|
|
|
|
|
|
|
|
|
%Package askpass
|
|
|
|
Group : System/Network
|
|
|
|
Requires : openssh = %{Version}
|
2001-11-03 19:09:32 +00:00
|
|
|
URL : http://www.ntrnet.net/~jmknoble/software/x11-ssh-askpass/
|
2001-04-27 05:50:48 +00:00
|
|
|
Obsoletes : ssh-extras
|
|
|
|
|
|
|
|
Summary : OpenSSH X11 pass-phrase dialog.
|
|
|
|
|
|
|
|
|
|
|
|
%Prep
|
2001-11-03 19:09:32 +00:00
|
|
|
%setup %([ -z "%{cvs}" ] || echo "-n %{Name}_cvs") -a2
|
|
|
|
|
|
|
|
%if ! %{use-stable}
|
|
|
|
autoreconf
|
|
|
|
%endif
|
2001-04-27 05:50:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
%Build
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS" \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc/ssh \
|
|
|
|
--libexecdir=/usr/lib/ssh \
|
|
|
|
--with-pam \
|
|
|
|
--with-tcp-wrappers \
|
|
|
|
--with-ipv4-default \
|
2001-01-04 22:54:50 +00:00
|
|
|
|
|
|
|
make
|
|
|
|
|
2001-11-03 19:09:32 +00:00
|
|
|
cd %{askpass}
|
2001-07-05 00:45:28 +00:00
|
|
|
./configure
|
|
|
|
xmkmf
|
|
|
|
make includes
|
2001-01-04 22:54:50 +00:00
|
|
|
make
|
2001-04-27 05:50:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
%Install
|
|
|
|
%{mkDESTDIR}
|
|
|
|
|
|
|
|
make DESTDIR="$DESTDIR" install
|
|
|
|
|
2001-11-03 19:09:32 +00:00
|
|
|
make -C %{askpass} BINDIR="/usr/lib/ssh" install
|
2001-04-27 05:50:48 +00:00
|
|
|
|
|
|
|
# OpenLinux specific configuration
|
|
|
|
mkdir -p $DESTDIR/{etc/pam.d,%{SVIcdir},%{SVIdir}}
|
|
|
|
|
|
|
|
# enabling X11 forwarding on the server is convenient and okay,
|
2001-11-03 19:09:32 +00:00
|
|
|
# on the client side we consider it a potential security risk!
|
|
|
|
%{fixUP} -vT $DESTDIR/etc/ssh/sshd_config -e '
|
|
|
|
s/X11Forwarding no/X11Forwarding yes/i'
|
2001-07-05 00:45:28 +00:00
|
|
|
|
2001-04-27 05:50:48 +00:00
|
|
|
install -m644 contrib/caldera/sshd.pam $DESTDIR/etc/pam.d/sshd
|
2001-11-03 19:09:32 +00:00
|
|
|
# FIXME: disabled, find out why this doesn't work with NIS
|
|
|
|
%{fixUP} -vT $DESTDIR/etc/pam.d/sshd -e 's/^(.*pam_limits.*)$/#$1/'
|
2001-04-27 05:50:48 +00:00
|
|
|
|
|
|
|
install -m 0755 contrib/caldera/sshd.init $DESTDIR%{SVIdir}/sshd
|
2001-11-03 19:09:32 +00:00
|
|
|
%{fixUP} -vT $DESTDIR/%{SVIdir} -e 's:\@SVIdir\@:%{SVIdir}: +
|
|
|
|
s:\@sysconfdir\@:/etc/ssh:'
|
2001-04-27 05:50:48 +00:00
|
|
|
|
|
|
|
cat <<-EoD > $DESTDIR%{SVIcdir}/sshd
|
|
|
|
IDENT=sshd
|
|
|
|
DESCRIPTIVE="OpenSSH secure shell daemon"
|
|
|
|
# This service will be marked as 'skipped' on boot if there
|
2001-11-03 19:09:32 +00:00
|
|
|
# is no host key. Use ssh-host-keygen to generate one.
|
2001-04-27 05:50:48 +00:00
|
|
|
ONBOOT="yes"
|
|
|
|
OPTIONS=""
|
|
|
|
EoD
|
|
|
|
|
|
|
|
SKG=$DESTDIR/usr/sbin/ssh-host-keygen
|
|
|
|
install -m 0755 contrib/caldera/ssh-host-keygen $SKG
|
2001-11-03 19:09:32 +00:00
|
|
|
%{fixUP} -T $SKG -e 's:\@sysconfdir\@:/etc/ssh: +
|
|
|
|
s:\@sshkeygen\@:/usr/bin/ssh-keygen:'
|
|
|
|
|
|
|
|
|
|
|
|
# install remaining docs
|
|
|
|
DocD="$DESTDIR%{_defaultdocdir}/%{Name}-%{Version}"; mkdir -p $DocD/00-LEGAL
|
|
|
|
cp -a LICENCE $DocD/00-LEGAL
|
|
|
|
cp -a CREDITS ChangeLog OVERVIEW README* TODO $DocD
|
|
|
|
install -p -m 0444 -o 0 -g 0 %{SOURCE3} $DocD/faq.html
|
|
|
|
mkdir -p $DocD/%{askpass}
|
|
|
|
cp -a %{askpass}/{README,ChangeLog,TODO,SshAskpass*.ad} $DocD/%{askpass}
|
|
|
|
|
|
|
|
cp -p %{askpass}/%{xsa}.man $DESTDIR/usr/man/man1/%{xsa}.1
|
|
|
|
ln -s %{xsa}.1 $DESTDIR/usr/man/man1/ssh-askpass.1
|
|
|
|
|
|
|
|
%{fixManPages}
|
2001-04-27 05:50:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
# generate file lists
|
|
|
|
%{mkLists} -c %{Name}
|
|
|
|
%{mkLists} -d %{Name} << 'EOF'
|
|
|
|
/etc/ssh base
|
|
|
|
^/etc/ IGNORED
|
|
|
|
%{_defaultdocdir}/$ IGNORED
|
|
|
|
askpass askpass
|
|
|
|
* default
|
|
|
|
EOF
|
|
|
|
%{mkLists} -a -f %{Name} << 'EOF'
|
|
|
|
^/etc * prefix(%%config)
|
2001-11-03 19:09:32 +00:00
|
|
|
/usr/X11R6/lib/X11/app-defaults IGNORED
|
|
|
|
Ssh.bin IGNORED # for now
|
2001-04-27 05:50:48 +00:00
|
|
|
[Aa]skpass askpass
|
|
|
|
%{_defaultdocdir}/%{Name}-%{Version}/ base
|
|
|
|
ssh-keygen base
|
2001-11-03 19:09:32 +00:00
|
|
|
moduli server
|
2001-04-27 05:50:48 +00:00
|
|
|
sshd server
|
|
|
|
sftp-server server
|
|
|
|
.* base
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
|
|
%Clean
|
|
|
|
%{rmDESTDIR}
|
|
|
|
|
|
|
|
|
|
|
|
%Post
|
|
|
|
# Generate host key when none is present to get up and running,
|
|
|
|
# both client and server require this for host-based auth!
|
|
|
|
# ssh-host-keygen checks for existing keys.
|
|
|
|
/usr/sbin/ssh-host-keygen
|
|
|
|
: # to protect the rpm database
|
|
|
|
|
|
|
|
|
|
|
|
%Post server
|
|
|
|
if [ -x %{LSBinit}-install ]; then
|
|
|
|
%{LSBinit}-install sshd
|
2001-01-04 22:54:50 +00:00
|
|
|
else
|
2001-04-27 05:50:48 +00:00
|
|
|
lisa --SysV-init install sshd S55 3:4:5 K45 0:1:2:6
|
2001-01-04 22:54:50 +00:00
|
|
|
fi
|
|
|
|
|
2001-04-27 05:50:48 +00:00
|
|
|
! %{SVIdir}/sshd status || %{SVIdir}/sshd restart
|
|
|
|
: # to protect the rpm database
|
|
|
|
|
|
|
|
|
|
|
|
%PreUn server
|
|
|
|
[ "$1" = 0 ] || exit 0
|
|
|
|
|
|
|
|
! %{SVIdir}/sshd status || %{SVIdir}/sshd stop
|
|
|
|
: # to protect the rpm database
|
|
|
|
|
|
|
|
|
|
|
|
%PostUn server
|
|
|
|
if [ -x %{LSBinit}-remove ]; then
|
|
|
|
%{LSBinit}-remove sshd
|
|
|
|
else
|
|
|
|
lisa --SysV-init remove sshd $1
|
2001-01-04 22:54:50 +00:00
|
|
|
fi
|
2001-04-27 05:50:48 +00:00
|
|
|
: # to protect the rpm database
|
2001-01-04 22:54:50 +00:00
|
|
|
|
2001-04-27 05:50:48 +00:00
|
|
|
|
|
|
|
%Files -f files-%{Name}-base
|
2001-01-04 22:54:50 +00:00
|
|
|
%defattr(-,root,root)
|
2001-04-27 05:50:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
%Files server -f files-%{Name}-server
|
2001-01-04 22:54:50 +00:00
|
|
|
%defattr(-,root,root)
|
2001-04-27 05:50:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
%Files askpass -f files-%{Name}-askpass
|
2001-01-04 22:54:50 +00:00
|
|
|
%defattr(-,root,root)
|
|
|
|
|
2001-04-27 05:50:48 +00:00
|
|
|
|
2001-11-03 19:09:32 +00:00
|
|
|
%Description
|
|
|
|
OpenSSH (Secure Shell) provides access to a remote system. It replaces
|
|
|
|
telnet, rlogin, rexec, and rsh, and provides secure encrypted
|
|
|
|
communications between two untrusted hosts over an insecure network.
|
|
|
|
X11 connections and arbitrary TCP/IP ports can also be forwarded over
|
|
|
|
the secure channel.
|
|
|
|
|
|
|
|
%Description server
|
|
|
|
This package installs the sshd, the server portion of OpenSSH.
|
|
|
|
|
|
|
|
%Description askpass
|
|
|
|
This package contains an X11-based pass-phrase dialog used per
|
|
|
|
default by ssh-add(1). It is based on %{askpass}
|
|
|
|
by Jim Knoble <jmknoble@pobox.com>.
|
|
|
|
|
2001-04-27 05:50:48 +00:00
|
|
|
%ChangeLog
|
|
|
|
* Mon Jan 01 1998 ...
|
|
|
|
|
2002-04-23 11:15:31 +00:00
|
|
|
$Id: openssh.spec,v 1.28 2002/04/23 11:15:32 djm Exp $
|