From owner-freebsd-ports Sat Nov 20 15:49: 7 1999 Delivered-To: freebsd-ports@freebsd.org Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 8CA4E14A2A for ; Sat, 20 Nov 1999 15:48:30 -0800 (PST) (envelope-from green@FreeBSD.org) Received: from localhost (green@localhost [127.0.0.1]) by hub.freebsd.org (8.9.3/8.9.3) with ESMTP id SAA11101; Sat, 20 Nov 1999 18:46:53 -0500 (EST) (envelope-from green@FreeBSD.org) Date: Sat, 20 Nov 1999 18:46:53 -0500 (EST) From: Brian Fundakowski Feldman X-Sender: green@green.myip.org To: charon@freethought.org Cc: ports@FreeBSD.org Subject: Re: getting OpenSSH In-Reply-To: <3.0.5.32.19991120162715.00966210@nsit-popmail.uchicago.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sat, 20 Nov 1999 charon@freethought.org wrote: > >From what I can tell from the message archives and the makefile, it seems > like OpenSSH is fetched by CVS (I don't pretend to understand CVS; I use > CTM for system sources). This means that I must have a connection to the > internet through FreeBSD to get the port, correct? Is there any chance > this situation will be remedied soon? (My network card isn't supported > under FreeBSD yet, so I have to use WinNT to fetch ports. This usually > never poses a problem, but then usually the ports exist as gzipped files > somewhere.) > What network card? WRT CVS itself, you can get it for NT pretty easily, so that shouldn't be a problem. If OpenBSD ever starts releasing snapshots of the OpenSSH source, it would be easy to switch the port to that. In the beginning, I mirrored the source snapshot on freefall, but that's not very good to do. Come to think of it, I do have something you may find interesting, even if pretty outdated... I'll attach it. > > -David > -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------' Index: Makefile =================================================================== RCS file: /usr2/ncvs/ports/security/openssh/Makefile,v retrieving revision 1.10 diff -u -r1.10 Makefile --- Makefile 1999/11/17 00:55:54 1.10 +++ Makefile 1999/11/17 18:45:40 @@ -9,6 +9,7 @@ DISTNAME= src/usr.bin/ssh PKGNAME= OpenSSH-1.2 CATEGORIES= security net +MASTER_SITES= http://localhost/~green/ MAINTAINER= green@FreeBSD.org @@ -46,7 +47,16 @@ do-fetch: @if [ ! -e ${STAMPFILE} ] || \ - [ "X${CVS_DATE}" != "X$$(${CAT} ${STAMPFILE})" ]; then \ + [ X$$(${ECHO} -n ${CVS_DATE} | ${MD5}) != \ + X$$(${CAT} ${STAMPFILE}) ]; then \ + if [ -e ${DISTDIR}/${PKGNAME}.$$(${ECHO} -n ${CVS_DATE} | \ + ${MD5}).tar.gz ]; then \ + cd ${DISTDIR} || exit; \ + ${TAR} xfz ${PKGNAME}.$$(${ECHO} -n ${CVS_DATE} | \ + ${MD5}).tar.gz ${DISTFILES} || exit; \ + ${ECHO} -n ${CVS_DATE} | ${MD5} > ${STAMPFILE}; \ + exit; \ + fi; \ unset CVS_RSH CVS_SERVER || ${TRUE}; \ if [ -n "${PORTS_CVS_RSH}" ]; then \ export CVS_RSH="${PORTS_CVS_RSH}"; \ @@ -54,19 +64,50 @@ ${MKDIR} ${DISTDIR}/${PKGNAME} && \ cd ${DISTDIR}/${PKGNAME} && \ ${CVS_CMD} -d ${CVS_SITE} co -D "${CVS_DATE}" ${DISTNAME} && \ - ${ECHO} -n ${CVS_DATE} > ${STAMPFILE}; \ + ${ECHO} -n ${CVS_DATE} | ${MD5} > ${STAMPFILE} || { \ + ${ECHO_MSG} ">> Couldn't retrieve ${PKGNAME} via CVS. \ + Use \"make fetchsrctarball\" to get a"; \ + ${ECHO_MSG} " snapshot of the source, then try the\ + port build again."; \ + exit 1; \ + }; \ fi +makesrctarball: fetch + @cd ${DISTDIR} && ${TAR} cfz \ + ${PKGNAME}.$$(${ECHO} -n ${CVS_DATE} | ${MD5}).tar.gz ${PKGNAME} + +fetchsrctarball: + @cd ${DISTDIR} || exit; \ + file=${PKGNAME}.$$(${ECHO} -n ${CVS_DATE} | ${MD5}).tar.gz; \ + if [ -e $$file ]; then \ + exit; \ + fi; \ + ${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \ + for site in ${MASTER_SITES}; do \ + ${ECHO_MSG} ">> Attempting to fetch from $${site}."; \ + if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} \ + $${site}$${file}; then \ + exit; \ + fi; \ + done; \ + ${ECHO_MSG} ">> Couldn't fetch it - please try to retrieve this"; \ + ${ECHO_MSG} ">> file manually into ${_DISTDIR} and try again."; \ + exit 1 + do-extract: @${MKDIR} ${WRKDIR} @${CP} -r ${DISTDIR}/${PKGNAME}/${DISTNAME} ${WRKDIR} @${CP} ${FILESDIR}/strlcpy.c ${WRKSRC}/lib/ post-patch: - @${PERL} -pi.orig -e 's:_PATH_STDPATH:_PATH_STDPATH "${PREFIX}/bin":' \ + @${PERL} -pi.orig -e 's:(_PATH_STDPATH):$$1 "${PREFIX}/bin":g' \ ${WRKSRC}/sshd.c - @${PERL} -pi.orig -e 's:__PREFIX__:${PREFIX}:g' ${WRKSRC}/ssh.h - @${PERL} -pi.orig -e 's:__PREFIX__:${PREFIX}:g' ${WRKSRC}/sshd_config + @${PERL} -pi.orig -e 's:__PREFIX__:${PREFIX}:g' ${WRKSRC}/ssh.h \ + ${WRKSRC}/sshd_config + @${PERL} -pi.openssl -e \ + 's:^(\s*#\s*include\s+<)ssl(/\w+\.h>\s*)$$:$$1openssl$$2:g' \ + ${WRKSRC}/*.[ch] pre-install: @cd ${WRKSRC} && ${MAKE} DESTDIR=${PREFIX} distribution To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message