From owner-freebsd-ports-bugs Tue Mar 18 7:30:20 2003 Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CE3D37B401 for ; Tue, 18 Mar 2003 07:30:09 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBE4743FB1 for ; Tue, 18 Mar 2003 07:30:07 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h2IFU7NS013957 for ; Tue, 18 Mar 2003 07:30:07 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h2IFU7O2013956; Tue, 18 Mar 2003 07:30:07 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC31A37B401 for ; Tue, 18 Mar 2003 07:20:58 -0800 (PST) Received: from heathers.stdio.com (heathers.stdio.com [199.89.192.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 99A0843FAF for ; Tue, 18 Mar 2003 07:20:56 -0800 (PST) (envelope-from risner@heathers.stdio.com) Received: (from risner@localhost) by heathers.stdio.com (8.11.6/8.11.6) id h2IFKtg19768; Tue, 18 Mar 2003 10:20:55 -0500 (EST) (envelope-from risner) Message-Id: <200303181520.h2IFKtg19768@heathers.stdio.com> Date: Tue, 18 Mar 2003 10:20:55 -0500 (EST) From: risner@stdio.com Reply-To: risner@stdio.com To: FreeBSD-gnats-submit@FreeBSD.org Cc: risner@stdio.com X-Send-Pr-Version: 3.113 Subject: ports/50097: New port: 2.11BSD version of diff/diffh, can work w/files that GNU Diff failes "memory exhausted" Sender: owner-freebsd-ports-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 50097 >Category: ports >Synopsis: New port: 2.11BSD version of diff/diffh, can work w/files that GNU Diff failes "memory exhausted" >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Mar 18 07:30:07 PST 2003 >Closed-Date: >Last-Modified: >Originator: risner@stdio.com >Release: FreeBSD 5.0-RELEASE i386 >Organization: OpenWorld, Inc. >Environment: System: FreeBSD akira.stdio.com 5.0-RELEASE FreeBSD 5.0-RELEASE #0: Thu Jan 16 22:16:53 GMT 2003 root@hollin.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC i386 >Description: Diff program from 2.11BSD unix ported to FreeBSD. This program can process large files with less memory. GNU Diff often can not work with files larger than 33 % of datasize (from limit) due to memory exhaustion. If you work with files that large or larger, you will need this version of diff. >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # textproc/2bsd-diff # textproc/2bsd-diff/Makefile # textproc/2bsd-diff/distinfo # textproc/2bsd-diff/scripts # textproc/2bsd-diff/scripts/post-extract # textproc/2bsd-diff/files # textproc/2bsd-diff/files/patch-aa # textproc/2bsd-diff/files/patch-ab # textproc/2bsd-diff/pkg-plist # textproc/2bsd-diff/pkg-descr # echo c - textproc/2bsd-diff mkdir -p textproc/2bsd-diff > /dev/null 2>&1 echo x - textproc/2bsd-diff/Makefile sed 's/^X//' >textproc/2bsd-diff/Makefile << 'END-of-textproc/2bsd-diff/Makefile' X# New ports collection makefile for: 2bsd-diff X# Date created: Mon Mar 17 20:54:03 EST 2003 X# Whom: risner@stdio.com X# X# $FreeBSD: ports/textproc/2bsd-diff/Makefile,v 1.10 2003/02/22 13:24:09 risner Exp $ X# X XPORTNAME= diff XPORTVERSION= 2.11 XPORTREVISION= 0 XCATEGORIES= textproc XMASTER_SITES= http://www.tribug.org/pub/tuhs/PDP-11/Distributions/ucb/2.11BSD/ XPKGNAMEPREFIX= 2bsd- XDISTNAME= file8 X XMAINTAINER= risner@stdio.com XCOMMENT= 2.11BSD diff utility X XEXTRACT_AFTER_ARGS= | ${TAR} -xf - bin/diff man/man1/diff.1 XWRKSRC= ${WRKDIR}/bin/diff X Xdo-install: X @${INSTALL_PROGRAM} ${WRKSRC}/diff ${PREFIX}/bin X @${INSTALL_PROGRAM} ${WRKSRC}/diffh ${PREFIX}/libexec X Xpost-install: X.if !defined(NOPORTDOCS) X @${INSTALL_MAN} ${WRKSRC}/diff.1 ${PREFIX}/man/man1 X.endif X X.include END-of-textproc/2bsd-diff/Makefile echo x - textproc/2bsd-diff/distinfo sed 's/^X//' >textproc/2bsd-diff/distinfo << 'END-of-textproc/2bsd-diff/distinfo' XMD5 (file8.tar.gz) = 77397e6d554361c127592b1fea2d776f END-of-textproc/2bsd-diff/distinfo echo c - textproc/2bsd-diff/scripts mkdir -p textproc/2bsd-diff/scripts > /dev/null 2>&1 echo x - textproc/2bsd-diff/scripts/post-extract sed 's/^X//' >textproc/2bsd-diff/scripts/post-extract << 'END-of-textproc/2bsd-diff/scripts/post-extract' X#!/bin/sh X Xcp ${WRKDIR}/man/man1/diff.1 ${WRKSRC}/diff.1 END-of-textproc/2bsd-diff/scripts/post-extract echo c - textproc/2bsd-diff/files mkdir -p textproc/2bsd-diff/files > /dev/null 2>&1 echo x - textproc/2bsd-diff/files/patch-aa sed 's/^X//' >textproc/2bsd-diff/files/patch-aa << 'END-of-textproc/2bsd-diff/files/patch-aa' Xdiff -c -r Makefile Makefile X*** Makefile Tue Oct 22 00:29:46 1996 X--- Makefile Mon Mar 17 21:54:08 2003 X*************** X*** 1,7 **** X # @(#)Makefile 4.1.1 1996/10/21 X # X! DIFF= /bin/diff X! DIFFH= /usr/libexec/diffh X PR= /bin/pr X CFLAGS= -O -DDIFF='"${DIFF}"' -DDIFFH='"${DIFFH}"' -DPR='"${PR}"' X SEPFLAG=-i X--- 1,7 ---- X # @(#)Makefile 4.1.1 1996/10/21 X # X! DIFF= /usr/local/bin/diff X! DIFFH= /usr/local/libexec/diffh X PR= /bin/pr X CFLAGS= -O -DDIFF='"${DIFF}"' -DDIFFH='"${DIFFH}"' -DPR='"${PR}"' X SEPFLAG=-i X*************** X*** 5,11 **** X PR= /bin/pr X CFLAGS= -O -DDIFF='"${DIFF}"' -DDIFFH='"${DIFFH}"' -DPR='"${PR}"' X SEPFLAG=-i X! DESTDIR= X X SRCS= diff.c diffdir.c diffreg.c X HDRS= diff.h X--- 5,11 ---- X PR= /bin/pr X CFLAGS= -O -DDIFF='"${DIFF}"' -DDIFFH='"${DIFFH}"' -DPR='"${PR}"' X SEPFLAG=-i X! DESTDIR=/usr/local X X SRCS= diff.c diffdir.c diffreg.c X HDRS= diff.h X*************** X*** 24,27 **** X X install: all X install -s diff ${DESTDIR}/bin/diff X! install -s diffh ${DESTDIR}/usr/libexec/diffh X--- 24,27 ---- X X install: all X install -s diff ${DESTDIR}/bin/diff X! install -s diffh ${DESTDIR}/libexec/diffh Xdiff -c -r diff.c diff.c X*** diff.c Tue Nov 12 15:31:26 1991 X--- diff.c Mon Mar 17 21:54:08 2003 X*************** X*** 176,184 **** X return (a > b ? a : b); X } X X done() X { X! if (tempfile) X unlink(tempfile); X exit(status); X } X--- 176,185 ---- X return (a > b ? a : b); X } X X+ sig_t X done() X { X! if (tempfile[0]) X unlink(tempfile); X exit(status); X } X*************** X*** 198,204 **** X char *p; X { X register char *q; X- char *realloc(); X X if ((q = realloc(p, (unsigned)n)) == NULL) X noroom(); X--- 199,204 ---- Xdiff -c -r diff.h diff.h X*** diff.h Wed Aug 28 17:44:35 1985 X--- diff.h Mon Mar 17 21:54:08 2003 X*************** X*** 5,14 **** X */ X X #include X #include X #include X #include X! #include X #include X X /* X--- 5,15 ---- X */ X X #include X+ #include X #include X #include X #include X! #include X #include X X /* X*************** X*** 61,67 **** X */ X int status; X int anychange; X! char *tempfile; /* used when comparing against std input */ X X /* X * Variables for diffdir. X--- 62,68 ---- X */ X int status; X int anychange; X! char tempfile[128]; /* used when comparing against std input */ X X /* X * Variables for diffdir. X*************** X*** 77,85 **** X char *file1, *file2, *efile1, *efile2; X struct stat stb1, stb2; X X! char *malloc(), *talloc(), *ralloc(); X char *savestr(), *splice(), *splicen(); X! char *mktemp(), *copytemp(), *rindex(); X! int done(); X X extern char diffh[], diff[], pr[]; X--- 78,86 ---- X char *file1, *file2, *efile1, *efile2; X struct stat stb1, stb2; X X! char *talloc(), *ralloc(); X char *savestr(), *splice(), *splicen(); X! char *copytemp(); X! sig_t done(); X X extern char diffh[], diff[], pr[]; Xdiff -c -r diffdir.c diffdir.c X*** diffdir.c Tue Nov 12 15:31:29 1991 X--- diffdir.c Mon Mar 17 21:54:08 2003 X*************** X*** 172,178 **** X char *cp; X { X register struct dir *dp = 0, *ep; X! register struct direct *rp; X register int nitems, n; X DIR *dirp; X X--- 172,178 ---- X char *cp; X { X register struct dir *dp = 0, *ep; X! register struct dirent *rp; X register int nitems, n; X DIR *dirp; X Xdiff -c -r diffreg.c diffreg.c X*** diffreg.c Tue Jan 11 00:39:33 1994 X--- diffreg.c Mon Mar 17 21:54:08 2003 X*************** X*** 270,281 **** X char buf[BUFSIZ]; X register int i, f; X X! signal(SIGHUP,done); X! signal(SIGINT,done); X! signal(SIGPIPE,done); X! signal(SIGTERM,done); X! tempfile = mktemp("/tmp/dXXXXX"); X! f = creat(tempfile,0600); X if (f < 0) { X fprintf(stderr, "diff: "); X perror(tempfile); X--- 270,281 ---- X char buf[BUFSIZ]; X register int i, f; X X! signal(SIGHUP, (sig_t) done); X! signal(SIGINT, (sig_t) done); X! signal(SIGPIPE, (sig_t) done); X! signal(SIGTERM, (sig_t) done); X! strcpy(tempfile, "/tmp/dXXXXX"); X! f = mkstemp(tempfile); X if (f < 0) { X fprintf(stderr, "diff: "); X perror(tempfile); END-of-textproc/2bsd-diff/files/patch-aa echo x - textproc/2bsd-diff/files/patch-ab sed 's/^X//' >textproc/2bsd-diff/files/patch-ab << 'END-of-textproc/2bsd-diff/files/patch-ab' X*** diff.1.orig Mon Mar 17 23:04:45 2003 X--- diff.1 Mon Mar 17 23:06:54 2003 X*************** X*** 7,13 **** X .TH DIFF 1 "October 21, 1996" X .UC 4 X .SH NAME X! diff \- differential file and directory comparator X .SH SYNOPSIS X .B diff X [ X--- 7,13 ---- X .TH DIFF 1 "October 21, 1996" X .UC 4 X .SH NAME X! diff \- 2.11BSD differential file and directory comparator X .SH SYNOPSIS X .B diff X [ X*************** X*** 260,269 **** X .SH FILES X /tmp/d????? X .br X! /usr/libexec/diffh for X .B \-h X .br X! /bin/diff for directory diffs X .br X /bin/pr X .SH "SEE ALSO" X--- 260,269 ---- X .SH FILES X /tmp/d????? X .br X! /usr/local/libexec/diffh for X .B \-h X .br X! /usr/local/bin/diff for directory diffs X .br X /bin/pr X .SH "SEE ALSO" END-of-textproc/2bsd-diff/files/patch-ab echo x - textproc/2bsd-diff/pkg-plist sed 's/^X//' >textproc/2bsd-diff/pkg-plist << 'END-of-textproc/2bsd-diff/pkg-plist' Xbin/diff Xlibexec/diffh Xman/man1/diff.1 END-of-textproc/2bsd-diff/pkg-plist echo x - textproc/2bsd-diff/pkg-descr sed 's/^X//' >textproc/2bsd-diff/pkg-descr << 'END-of-textproc/2bsd-diff/pkg-descr' XThis is the original diff program from 2.11BSD. It works better Xwith very large files on systems with datasize limits. X XDefault FreeBSD limits datasize to 524288 kbytes. This means that XGNU diff processes that require more than this much ram will fail. XThe 2.11BSD diff did not load the files in core and could operate Xon considerably less ram. END-of-textproc/2bsd-diff/pkg-descr exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports-bugs" in the body of the message