From nobody@FreeBSD.ORG  Wed Jun 14 10:54:00 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 6ECE437C548; Wed, 14 Jun 2000 10:54:00 -0700 (PDT)
Message-Id: <20000614175400.6ECE437C548@hub.freebsd.org>
Date: Wed, 14 Jun 2000 10:54:00 -0700 (PDT)
From: pfeifer@dbai.tuwien.ac.at
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: Ports build mechanism doesn't check whether /usr/ports/distfiles is writeable
X-Send-Pr-Version: www-1.0

>Number:         19270
>Category:       ports
>Synopsis:       Ports build mechanism doesn't check whether /usr/ports/distfiles is writeable
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 14 11:00:01 PDT 2000
>Closed-Date:    Wed Sep 18 17:18:26 PDT 2002
>Last-Modified:  Wed Sep 18 17:18:26 PDT 2002
>Originator:     Gerald Pfeifer
>Release:        4.0-RELEASE
>Organization:
Vienna University of Technology
>Environment:
FreeBSD spica.dbai.tuwien.ac.at 4.0-RELEASE FreeBSD 4.0-RELEASE #0: Tue Jun 13 18:09:54 CEST 2000     root@spica.dbai.tuwien.ac.at:/usr/src/sys/compile/DBAI_KERNEL  i386

>Description:
The build mechanism of the ports system does not check whether
/usr/ports/distfiles is writeable before trying to download from
the net.

Accordingly, the user does get several error messages (see below)
instead of a single one which explains the real source of the problem.

A similiar situation will happen when building a port as root, when
/usr/ports/distfiles is NFS-mounted (which may make sense in a multi-
host environment).
>How-To-Repeat:
Try to `make` any port as a regular user:

spica[99]:/sw/test/ports/emulators/wine% make
>Fix:
Add some variation of

  if [ ! -w /usr/ports/distfiles ]; then
   echo "/usr/ports/distfiles is not writable; cannot download..."
  fi

to the build mechanism.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->asami 
Responsible-Changed-By: alex 
Responsible-Changed-When: Tue Jun 27 07:04:39 PDT 2000 
Responsible-Changed-Why:  
This belongs to the PW. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19270 

From: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
To: <freebsd-gnats-submit@freebsd.org>, <freebsd-ports@freebsd.org>
Cc:  
Subject: Re: ports/19270: Ports build mechanism doesn't check whether
 /usr/ports/distfiles is writeable
Date: Sat, 6 Jan 2001 01:28:28 +0100 (CET)

 What about this PR? It's more than half a year old, and I even included
 a patch suggestion: <http://www.FreeBSD.org/cgi/query-pr.cgi?pr=19270>
 
 That shouldn't take more than five minutes for someone familiar with the
 port structure...
 
 Gerald
 -- 
 Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/
 
 

From: Will Andrews <will@physics.purdue.edu>
To: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Cc: freebsd-gnats-submit@FreeBSD.ORG, freebsd-ports@FreeBSD.ORG
Subject: Re: ports/19270: Ports build mechanism doesn't check whether /usr/ports/distfiles is writeable
Date: Fri, 5 Jan 2001 20:13:20 -0500

 On Sat, Jan 06, 2001 at 01:28:28AM +0100, Gerald Pfeifer wrote:
 > What about this PR? It's more than half a year old, and I even included
 > a patch suggestion: <http://www.FreeBSD.org/cgi/query-pr.cgi?pr=19270>
 > 
 > That shouldn't take more than five minutes for someone familiar with the
 > port structure...
 
 I would have fixed this (and others as well) a long time ago, but only
 Satoshi can touch bsd.*.mk.  That's current policy.
 
 -- 
 wca
 
Responsible-Changed-From-To: asami->portmgr 
Responsible-Changed-By: will 
Responsible-Changed-When: Wed Apr 4 01:13:18 PDT 2001 
Responsible-Changed-Why:  
Over to new maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19270 
State-Changed-From-To: open->analyzed 
State-Changed-By: kris 
State-Changed-When: Fri Aug 30 14:59:49 PDT 2002 
State-Changed-Why:  
Patch is being tested on bento.  For future reference, 
actually including a patch instead of just a suggestion 
makes it easier for us to integrate and test it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19270 
State-Changed-From-To: analyzed->closed 
State-Changed-By: kris 
State-Changed-When: Wed Sep 18 17:18:14 PDT 2002 
State-Changed-Why:  
Patch committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19270 
>Unformatted:
 >> Wine-20000526.tar.gz doesn't seem to exist on this system.
 >> Attempting to fetch from ftp://metalab.unc.edu/pub/Linux/ALPHA/wine/development/.
 fetch: Wine-20000526.tar.gz: Permission denied
 >> Attempting to fetch from ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/.
 fetch: ftp.infomagic.com: sunsite: File unavailable (e.g., file not found, no access)
 >> Attempting to fetch from ftp://ftp.freesoftware.com/pub/linux/sunsite/ALPHA/wine/development/.
 fetch: Wine-20000526.tar.gz: Permission denied
 >> Attempting to fetch from ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/.
 fetch: Wine-20000526.tar.gz: Permission denied
 >> Couldn't fetch it - please try to retrieve this
 >> port manually into /usr/ports/distfiles/ and try again.
 *** Error code 1
 
 
