Subject: pkg/23658: "make fetch" fails in graphics/Mesa
To: None <gnats-bugs@gnats.netbsd.org>
From: Aaron J. Grier <agrier@poofygoof.com>
List: netbsd-bugs
Date: 12/04/2003 14:17:48
>Number: 23658
>Category: pkg
>Synopsis: "make fetch" fails in graphics/Mesa
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Dec 04 22:18:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:
>Release: NetBSD 1.5.3
>Organization:
>Environment:
System: NetBSD aragorn 1.5.3 NetBSD 1.5.3 (ARAGORN) #7: Thu Apr 18 23:04:26 PDT 2002 agrier@aragorn:/var/tmp/ARAGORN i386
Architecture: i386
Machine: i386
pkgsrc HEAD as of 2003-12-04
>Description:
the short version:
$ make fetch
===> do-fetch [Mesa-5.0.2nb1] ===> Checking for vulnerabilities in
Mesa-5.0.2nb1
[: !: unexpected operator
the long version:
$ make PKG_DEBUG_LEVEL=3 fetch
set -x; if [ -f /projects/NetBSD/pkgsrc/distfiles/pkg-vulnerabilities ]; then echo "===> Checking for vulnerabilities in Mesa-5.0.2"; vul=`make OPSYS=NetBSD OS_VERSION=1.5.3 LOWER_OPSYS=netbsd OBJMACHINE="1" check-vulnerable`; case "$vul" in "") ;; *) echo "$vul"; echo "or define ALLOW_VULNERABLE_PACKAGES if this package is absolutely essential"; false ;; esac; else echo "===> *** No /projects/NetBSD/pkgsrc/distfiles/pkg-vulnerabilities file found,"; echo "===> *** skipping vulnerability checks. To fix, install"; echo "===> *** the pkgsrc/security/audit-packages package and run"; echo "===> *** '/usr/pkg/sbin/download-vulnerability-list'."; fi
+ [ -f /projects/NetBSD/pkgsrc/distfiles/pkg-vulnerabilities ]
+ echo ===> Checking for vulnerabilities in Mesa-5.0.2
===> Checking for vulnerabilities in Mesa-5.0.2
+ make OPSYS=NetBSD OS_VERSION=1.5.3 LOWER_OPSYS=netbsd OBJMACHINE=1 check-vulnerable
+ vul=
set -x; test -d /usr/projects/NetBSD/pkgsrc/distfiles/Mesa-5.0.2 || /bin/mkdir -p /usr/projects/NetBSD/pkgsrc/distfiles/Mesa-5.0.2
+ test -d /usr/projects/NetBSD/pkgsrc/distfiles/Mesa-5.0.2
set -x; cd /usr/projects/NetBSD/pkgsrc/distfiles/Mesa-5.0.2; file="Mesa-5.0.2/"; bfile=""; unsorted_sites=" ftp://ftp.fi.netbsd.org/pub/NetBSD/packages/distfiles/Mesa-5.0.2/ ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles/Mesa-5.0.2/ ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/Mesa-5.0.2/"; sites=" $unsorted_sites"; if [ "X" != "X" ]; then for d in "" ; do if [ "X$d" = "X" -o "X$d" = "X/usr/projects/NetBSD/pkgsrc/distfiles" ]; then continue; fi; if [ -f $d/Mesa-5.0.2/$bfile ]; then echo "Using $d/Mesa-5.0.2/$bfile"; /bin/rm -f $bfile; /bin/ln -s $d/Mesa-5.0.2/$bfile $bfile; break; fi; done; fi; if [ ! -f $file -a ! -f $bfile -a ! -h $bfile ]; then echo "=> $bfile doesn't seem to exist on this system."; if [ ! -w /usr/projects/NetBSD/pkgsrc/distfiles/Mesa-5.0.2/. ]; then echo "=> Can't download to /usr/projects/NetBSD/pkgsrc/distfiles/Mesa-5.0.2 (permission denied?)."; exit 1; fi; for site!
in $sites; do echo "=> Attempting to fetch $bfile from ${site}."; if [ -f /usr/projects/NetBSD/pkgsrc/graphics/Mesa/distinfo ]; then /usr/bin/awk 'NF == 5 && $1 == "Size" && $2 == "('$bfile')" { printf("=> [%s %s]\n", $4, $5) }' /usr/projects/NetBSD/pkgsrc/graphics/Mesa/distinfo; fi; if /usr/bin/ftp ${site}${bfile} ; then if [ -n "" -a -f /usr/projects/NetBSD/pkgsrc/graphics/Mesa/distinfo -a -f /usr/projects/NetBSD/pkgsrc/distfiles/Mesa-5.0.2/$bfile ]; then alg=`/usr/bin/awk 'NF == 4 && $2 == "('$file')" && $3 == "=" {print $1;}' /usr/projects/NetBSD/pkgsrc/graphics/Mesa/distinfo`; if [ -z "$alg" ]; then alg=SHA1; fi; CKSUM=`/usr/pkg/bin/digest $alg < /usr/projects/NetBSD/pkgsrc/distfiles/Mesa-5.0.2/$bfile`; CKSUM2=`/usr/bin/awk '$1 == "'$alg'" && $2 == "('$file')" {print $4;}' </usr/projects/NetBSD/pkgsrc/graphics/Mesa/distinfo`; if [ "$CKSUM" = "$CKSUM2" -o "$CKSUM2" = "IGNORE" ]; then break; else echo "=> Checksum failure - trying next si!
te."; fi; elif [ ! -f /usr/projects/NetBSD/pkgsrc/di!
stfiles/Mesa-5.0.2/$bfile ]; then echo "=> FTP didn't fetch expected file, trying next site." ; else break; fi; fi done; if [ ! -f /usr/projects/NetBSD/pkgsrc/distfiles/Mesa-5.0.2/$bfile ]; then echo "=> Couldn't fetch $bfile - please try to retrieve this"; echo "=> file manually into /usr/projects/NetBSD/pkgsrc/distfiles/Mesa-5.0.2 and try again."; exit 1; fi; fi;
+ cd /usr/projects/NetBSD/pkgsrc/distfiles/Mesa-5.0.2
+ file=Mesa-5.0.2/
+ bfile=
+ unsorted_sites= ftp://ftp.fi.netbsd.org/pub/NetBSD/packages/distfiles/Mesa-5.0.2/ ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles/Mesa-5.0.2/ ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/Mesa-5.0.2/
+ sites= ftp://ftp.fi.netbsd.org/pub/NetBSD/packages/distfiles/Mesa-5.0.2/ ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles/Mesa-5.0.2/ ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/Mesa-5.0.2/
+ [ X != X ]
+ [ ! -f Mesa-5.0.2/ -a ! -f -a ! -h ]
[: !: unexpected operator
>How-To-Repeat:
cd $PKGSRC/graphics/Mesa && make update
>Fix:
stop _FETCH_LIST in mk/bsd.pkg.mk from iterating over a list with no
actual files in it. _ALLFILES is getting set to "Mesa-5.02/ " so of
course things are getting confused. I'm not sure how to fix it.
a workaround is to avoid doing a make fetch inside Mesa; just do it in
MesaLib and MesaDemos.
>Release-Note:
>Audit-Trail:
>Unformatted: