freebsd-ports/security/openssh/Makefile

123 lines
3.7 KiB
Makefile
Raw Normal View History

# New ports collection makefile for: OpenSSH
# Date created: 7 October 1999
# Whom: green
#
# $FreeBSD$
#
PORTNAME= openssh
Update to OpenSSH 3.0 and OpenSSH-portable 3.0p1 Extracted from Changelog (not complete): 20011012 - markus@cvs.openbsd.org 2001/10/10 22:18:47 [channels.c channels.h clientloop.c nchan.c serverloop.c] [session.c session.h] try to keep channels open until an exit-status message is sent. don't kill the login shells if the shells stdin/out/err is closed. this should now work: ssh -2n localhost 'exec > /dev/null 2>&1; sleep 10; exit 5'; echo ? - markus@cvs.openbsd.org 2001/10/11 13:45:21 [session.c] delay detach of session if a channel gets closed but the child is still alive. however, release pty, since the fd's to the child are already closed. - markus@cvs.openbsd.org 2001/10/11 15:24:00 [clientloop.c] clear select masks if we return before calling select(). 20011010 - markus@cvs.openbsd.org 2001/10/04 14:34:16 [key.c] call OPENSSL_free() for memory allocated by openssl; from chombier@mac.com - markus@cvs.openbsd.org 2001/10/04 15:05:40 [channels.c serverloop.c] comment out bogus conditions for selecting on connection_in - markus@cvs.openbsd.org 2001/10/04 15:12:37 [serverloop.c] client_alive_check cleanup - markus@cvs.openbsd.org 2001/10/06 00:14:50 [sshconnect.c] remove unused argument - markus@cvs.openbsd.org 2001/10/06 00:36:42 [session.c] fix typo in error message, sync with do_exec_nopty - markus@cvs.openbsd.org 2001/10/06 11:18:19 [sshconnect1.c sshconnect2.c sshconnect.c] unify hostkey check error messages, simplify prompt. - markus@cvs.openbsd.org 2001/10/07 10:29:52 [authfile.c] grammer; Matthew_Clarke@mindlink.bc.ca - markus@cvs.openbsd.org 2001/10/07 17:49:40 [channels.c channels.h] avoid possible FD_ISSET overflow for channels established during channnel_after_select() (used for dynamic channels). - markus@cvs.openbsd.org 2001/10/08 11:48:57 [channels.c] better debug - markus@cvs.openbsd.org 2001/10/08 16:15:47 [sshconnect.c] use correct family for -b option - markus@cvs.openbsd.org 2001/10/08 19:05:05 [ssh.c sshconnect.c sshconnect.h ssh-keyscan.c] some more IPv4or6 cleanup - markus@cvs.openbsd.org 2001/10/09 10:12:08 [session.c] chdir $HOME after krb_afslog(); from bbense@networking.stanford.edu - markus@cvs.openbsd.org 2001/10/09 19:32:49 [session.c] stat subsystem command before calling do_exec, and return error to client. - markus@cvs.openbsd.org 2001/10/09 19:51:18 [serverloop.c] close all channels if the connection to the remote host has been closed, should fix sshd's hanging with WCHAN==wait - markus@cvs.openbsd.org 2001/10/09 21:59:41 [channels.c channels.h serverloop.c session.c session.h] simplify session close: no more delayed session_close, no more blocking wait() calls. - (bal) seed_init() and seed_rng() required in ssh-keyscan.c 20011003 - markus@cvs.openbsd.org 2001/09/27 11:58:16 [compress.c] mem leak; chombier@mac.com - markus@cvs.openbsd.org 2001/09/27 11:59:37 [packet.c] missing called=1; chombier@mac.com - markus@cvs.openbsd.org 2001/09/27 15:31:17 [auth2.c auth2-chall.c sshconnect1.c] typos; from solar - camield@cvs.openbsd.org 2001/09/27 17:53:24 [sshd.8] don't talk about compile-time options ok markus@ - djm@cvs.openbsd.org 2001/09/28 12:07:09 [ssh-keygen.c] bzero private key after loading to smartcard; ok markus@ - markus@cvs.openbsd.org 2001/09/28 15:46:29 [ssh.c] bug: read user config first; report kaukasoi@elektroni.ee.tut.fi - markus@cvs.openbsd.org 2001/10/01 08:06:28 [scp.c] skip filenames containing \n; report jdamery@chiark.greenend.org.uk and matthew@debian.org - markus@cvs.openbsd.org 2001/10/01 21:38:53 [channels.c channels.h ssh.c sshd.c] remove ugliness; vp@drexel.edu via angelos - markus@cvs.openbsd.org 2001/10/01 21:51:16 [readconf.c readconf.h ssh.1 sshconnect.c] add NoHostAuthenticationForLocalhost; note that the hostkey is now check for localhost, too. - djm@cvs.openbsd.org 2001/10/02 08:38:50 [ssh-add.c] return non-zero exit code on error; ok markus@ - stevesk@cvs.openbsd.org 2001/10/02 22:56:09 [sshd.c] #include "channels.h" for channel_set_af() - markus@cvs.openbsd.org 2001/10/03 10:01:20 [auth.c] use realpath() for homedir, too. from jinmei@isl.rdc.toshiba.co.jp 20011001 - (stevesk) loginrec.c: fix type conversion problems exposed when using 64-bit off_t. 20010928 - djm@cvs.openbsd.org 2001/09/28 09:49:31 [scard.c] Fix segv when smartcard communication error occurs during key load. ok markus@ - (djm) Update spec files for new x11-askpass 20010927 - (stevesk) session.c: declare do_pre_login() before use wayned@users.sourceforge.net 20010925 - (djm) Pull in auth-krb5.c from OpenBSD CVS. NB. it is not currently used. - (djm) Sync $sysconfdir/moduli - (djm) Avoid bad and unportable sprintf usage in compat code
2001-11-07 14:47:51 +01:00
PORTVERSION= 3.0
CATEGORIES= security
MASTER_SITES= ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/ \
ftp://ftp.usa.openbsd.org/pub/OpenBSD/OpenSSH/ \
ftp://ftp1.se.openbsd.org/pub/OpenBSD/OpenSSH/
DISTNAME= openssh-${PORTVERSION}
EXTRACT_SUFX= .tgz
MAINTAINER= dinoex@FreeBSD.org
USE_OPENSSL= YES
MAN1= scp.1 slogin.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 \
ssh-keyscan.1 sftp.1
MAN8= sshd.8 sftp-server.8
MANCOMPRESSED= yes
FIXME= lib/Makefile scp/Makefile sftp/Makefile sftp-server/Makefile \
ssh/Makefile ssh-add/Makefile ssh-agent/Makefile \
ssh-keygen/Makefile ssh-keyscan/Makefile sshd/Makefile
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 430000
OPENSSLBASE= /usr/local
OPENSSLDIR= ${OPENSSLBASE}/openssl
LIB_DEPENDS+= crypto.2:${PORTSDIR}/security/openssl
OPENSSLLIB= ${OPENSSLBASE}/lib
OPENSSLINC= ${OPENSSLBASE}/include
MAKE_ENV+= OPENSSLLIB=${OPENSSLLIB} OPENSSLINC=${OPENSSLINC} \
OPENSSLBASE=${OPENSSLBASE} OPENSSLDIR=${OPENSSLDIR}
.endif
CRYPTOLIBS= -L${OPENSSLLIB} -lcrypto
# Here, MANDIR is concetenated to DESTDIR which all forms the man install dir...
MAKE_ENV+= DESTDIR=${PREFIX} MANDIR=/man/man CRYPTOLIBS="${CRYPTOLIBS}"
.if ${OSVERSION} < 400014
MAKE_ENV+= COMPAT_GETADDRINFO=yes
.else
MAKE_ENV+= INET6FLAGS=-DINET6
.endif
.if !exists(/usr/include/tcpd.h)
MAKE_ENV+= TCP_WRAPPERS=no
.endif
.if defined(AFS) && ${AFS} == YES
MAKE_ENV+= AFS=yes
.endif
.if defined(KERBEROS) && ${KERBEROS} == YES
MAKE_ENV+= KERBEROS=yes
.endif
.if exists(/usr/include/security/pam_modules.h)
PAM?= yes
.else
PAM= no
.endif
MAKE_ENV+= PAM=${PAM}
.if defined(SKEY) && ${SKEY} == YES
MAKE_ENV+= SKEY=yes
.endif
WRKSRC= ${WRKDIR}/ssh
post-extract:
@${PERL5} -pi -e "s=/etc/ssh=${PREFIX}/etc/ssh=" ${WRKSRC}/sshd_config
@${PERL5} -pi -e "s=/usr/libex=${PREFIX}/libex=" ${WRKSRC}/sshd_config
@${CP} ${FILESDIR}/strlcat.c ${FILESDIR}/strlcpy.c ${WRKSRC}/lib/
@${CP} ${FILESDIR}/sshd.sh ${WRKSRC}/
.if ${OSVERSION} < 400014
@${CP} ${FILESDIR}/getaddrinfo.c ${FILESDIR}/name6.c ${WRKSRC}/lib/
@${CP} ${FILESDIR}/bindresvport.c ${FILESDIR}/rcmd.c ${WRKSRC}/lib/
@${CP} ${FILESDIR}/getnameinfo.c ${WRKSRC}/lib/
@${CP} ${FILESDIR}/netdb.h ${WRKSRC}/
.endif
post-patch:
@${PERL} -pi -e 's:__PREFIX__:${PREFIX}:g' ${WRKSRC}/ssh.h \
${WRKSRC}/sshd_config ${WRKSRC}/sshd.sh \
${WRKSRC}/pathnames.h
.if ${OSVERSION} < 430000
post-configure:
.for i in ${FIXME}
@${PERL5} -pi -e "s=KERBEROS[:]L=KERBEROS=" ${WRKSRC}/${i}
@${PERL5} -pi -e "s=KERBEROS5[:]L=KERBEROS5=" ${WRKSRC}/${i}
@${PERL5} -pi -e "s=AFS[:]L=AFS=" ${WRKSRC}/${i}
@${PERL5} -pi -e "s=TCP_WRAPPERS[:]L=TCP_WRAPPERS=" ${WRKSRC}/${i}
@${PERL5} -pi -e "s=SKEY[:]L=SKEY=" ${WRKSRC}/${i}
.endfor
.endif
pre-install:
${MKDIR} ${PREFIX}/libdata/ssh
post-install:
.if !defined(BATCH)
.if !exists(${PREFIX}/etc/ssh_host_key)
@${ECHO_MSG} ">> Generating an RSA secret host key."
${PREFIX}/bin/ssh-keygen -N "" -f ${PREFIX}/etc/ssh_host_key
.endif
.if !exists(${PREFIX}/etc/ssh_host_dsa_key)
@${ECHO_MSG} ">> Generating a DSA secret host key."
${PREFIX}/bin/ssh-keygen -d -N "" -f ${PREFIX}/etc/ssh_host_dsa_key
.endif
.endif
.if !exists(${PREFIX}/etc/rc.d/sshd.sh)
@${INSTALL_SCRIPT} ${WRKSRC}/sshd.sh ${PREFIX}/etc/rc.d/
.endif
.if !exists(${PREFIX}/etc/ssh_config) && !exists(${PREFIX}/etc/sshd_config)
@cd ${WRKSRC}; \
${MAKE} DESTDIR=${PREFIX} distribution
.else
@${ECHO_MSG} ">> ${PREFIX}/etc/ssh{,d}_config exists, not being replaced!"
@${ECHO_MSG} ">> If this is left over from another version of SSH, you will"
@${ECHO_MSG} ">> need to update it to work with OpenSSH."
.endif
.include <bsd.port.post.mk>