http://www.berklix.com/~jhs/src/bsd/fixes/freebsd/ports/gen/Mk/bsd.port.mk.send-pr.no_customise Date: Wed, 14 Jul 1999 01:10:02 +0200 To: jhs@ From: gnats-admin@FreeBSD.org Subject: Re: ports/12635: Mk/bsd.port.mk failure to detect fail to extract Thank you very much for your problem report. It has the internal identification `ports/12635'. The individual assigned to look at your report is: freebsd-ports. >Category: ports >Responsible: freebsd-ports >Synopsis: Mk/bsd.port.mk fails to detect gzip fail to extract >Arrival-Date: Tue Jul 13 16:10:01 PDT 1999 SEND-PR: -*- send-pr -*- SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as SEND-PR: will all comments (text enclosed in `<' and `>'). SEND-PR: SEND-PR: Please consult the send-pr man page `send-pr(1)' or the Texinfo SEND-PR: manual if you are not sure how to fill out a problem report. SEND-PR: SEND-PR: Note that the Synopsis field is mandatory. The Subject (for SEND-PR: the mail) will be made the same as Synopsis unless explicitly SEND-PR: changed. SEND-PR: SEND-PR: Choose from the following categories: SEND-PR: SEND-PR: bin conf docs gnu i386 kern misc ports SEND-PR: To: FreeBSD-gnats-submit@freebsd.org Subject: Mk/bsd.port.mk failure to detect fail to extract From: jhs@ Reply-To: jhs@ X-send-pr-version: 3.2 >Submitter-Id: current-users >Originator: Julian H. Stacey jhs@ >Confidential: no >Synopsis: Mk/bsd.port.mk fails to detect gzip fail to extract >Severity: non-critical >Priority: low >Category: ports >Release: FreeBSD 3.2-RELEASE i386 >Class: sw-bug >Environment: A multi hosted NFS site, with ports & distfiles & directories accessed via Lots of sequential symbolic links, to various CD-ROM directories & newer-than-cd directories etc. A network where I hit the limit: sys/sys/param.h:171 #define MAXSYMLINKS 32 with this wc /usr/ports/distfiles//gv-3.5.8.tar.gz open: Too many levels of symbolic links but where, (curiously), this still works: cp /usr/ports/distfiles//gv-3.5.8.tar.gz /tmp/t wc /tmp/t 1386 8212 369609 /tmp/t >Description: Mk/bsd.port.mk fails to catch error code from gzip (fail to extract), As shown: make ===> Extracting for gv-3.5.8 >> Checksum OK for gv-3.5.8.tar.gz. /bin/rm -rf /a/park/usr/ports/print/gv/work /bin/mkdir -p /a/park/usr/ports/print/gv/work for file in gv-3.5.8.tar.gz; do if ! \ (cd /a/park/usr/ports/print/gv/work && /usr/bin/gzip \ -nf --best -dc /usr/ports/distfiles//$file | \ /usr/bin/tar -xf -); \ then exit 1; fi done /usr/ports/distfiles//gv-3.5.8.tar.gz: \ Too many levels of symbolic links ===> Patching for gv-3.5.8 The failure is in Mk/bsd.port.mk, not gzip, as this simple makefile, xx: /usr/bin/gzip -nf --best -dc \ /usr/ports/distfiles/gv-3.5.8.tar.gz > /tmp/t echo This line is not echoed as gzip errors OK shows gzip returning an error code: /usr/ports/distfiles/gv-3.5.8.tar.gz: Too many levels of symbolic links *** Error code 1 Stop. So Mk/bsd.port.mk should also catch the error & stop, but it fails to. >How-To-Repeat: Create EG a /usr/ports/distfiles//gv-3.5.8.tar.gz that goes through 35 sym links In Mk/bsd.port.mk remove the ERASE in a few lines after line 1467 (do-extract:) go to some arbitrary port, make clean make extract See that despite the Too many levels of symbolic links we now also wrongly have a work/.extract_done >Fix: Mk/bsd.port.mk is ports-master domain _ so I leave fixing it to the ports master(s). (but I am preparing a send-pr for src/ that will double MAXSYMLINKS etc; this will hide (but not fix) the failure in Mk/bsd.port.mk, however even with this, if for some other reason gzip fails to return data to Mk/bsd.port.mk, Mk/bsd.port.mk might still not notice, so a fix is needed for Mk/bsd.port.mk )