From conrads@cox.net  Thu Jul 15 15:09:07 2004
Return-Path: <conrads@cox.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 760E016A4CE; Thu, 15 Jul 2004 15:09:07 +0000 (GMT)
Received: from lakermmtao01.cox.net (lakermmtao01.cox.net [68.230.240.38])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id D7A5143D31; Thu, 15 Jul 2004 15:09:06 +0000 (GMT)
	(envelope-from conrads@cox.net)
Received: from dolphin.local.net ([68.11.71.51]) by lakermmtao01.cox.net
          (InterMail vM.6.01.03.02 201-2131-111-104-20040324) with ESMTP
          id <20040715150906.MRDA21566.lakermmtao01.cox.net@dolphin.local.net>;
          Thu, 15 Jul 2004 11:09:06 -0400
Received: from dolphin.local.net (localhost.local.net [127.0.0.1])
	by dolphin.local.net (8.12.11/8.12.11) with ESMTP id i6FF95FG007579;
	Thu, 15 Jul 2004 10:09:05 -0500 (CDT)
	(envelope-from conrads@dolphin.local.net)
Received: (from conrads@localhost)
	by dolphin.local.net (8.12.11/8.12.11/Submit) id i6FF95o7007578;
	Thu, 15 Jul 2004 10:09:05 -0500 (CDT)
	(envelope-from conrads)
Message-Id: <200407151509.i6FF95o7007578@dolphin.local.net>
Date: Thu, 15 Jul 2004 10:09:05 -0500 (CDT)
From: "Conrad J. Sabatier" <conrads@cox.net>
Reply-To: "Conrad J. Sabatier" <conrads@cox.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: portmgr@freebsd.org
Subject: bsd.port.mk assumes "fetch" as FETCH_CMD
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         69104
>Category:       ports
>Synopsis:       bsd.port.mk assumes "fetch" as FETCH_CMD
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 15 15:10:20 GMT 2004
>Closed-Date:    Wed Jun 01 19:28:55 GMT 2005
>Last-Modified:  Wed Jun 01 19:28:55 GMT 2005
>Originator:     Conrad J. Sabatier
>Release:        FreeBSD 5.2-CURRENT amd64
>Organization:
>Environment:

System: FreeBSD dolphin.local.net 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Mon Jul 12 12:24:32 CDT 2004 root@:/usr/obj/usr/src/sys/CUSTOM amd64

>Description:
	The following section in bsd.port.mk's do-fetch: target renders using any
	FETCH_CMD other than the default "fetch" impossible.
	
	The case statement's "args" assignments are the chief problem.

            for site in `eval $$SORTED_MASTER_SITES_CMD_TMP ${_RANDOMIZE_SITES}`; do \
                ${ECHO_MSG} ">> Attempting to fetch from $${site}."; \
                DIR=${DIST_SUBDIR}; \
                CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \
                case $${file} in \
                */*)    ${MKDIR} $${file%/*}; \
                        args="-o $${file} $${site}$${file}";; \
                *)      args=$${site}$${file};; \
                esac; \
                if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} ${FETCH_AFTER_ARGS}; then \
                    continue 2; \
                fi \
            done; \

>How-To-Repeat:
	Try using "wget" as the FETCH_CMD and watch the breakage.
>Fix:
	Remove the assumption of "fetch" as the FETCH_CMD (and the concommitant assumption
	re: correct FETCH_CMD syntax).

	The case statement's "args" assignments need to be wrapped in yet another conditional,
	based on the setting of FETCH_CMD.  The simplest approach would be simply to set args
	to the target filename if [ $FETCH_CMD != fetch ] and let the user's FETCH_BEFORE_ARGS
	and FETCH_AFTER_ARGS take care of whatever other options/syntax is needed.
>Release-Note:
>Audit-Trail:


From pending/69129 by Kris Kennaway:

 That's pretty much as intended..other download clients aren't
 supported.  I don't think we should bend over backwards to do so
 either.  At any rate, someone would need to propose a patch to take
 this PR further.
 
 Kris
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: pav 
Responsible-Changed-When: Thu Jul 15 22:52:57 GMT 2004 
Responsible-Changed-Why:  
bsd.port.mk is portmgr's sphere of power 

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

From: Oliver Eikemeier <eikemeier@fillmore-labs.com>
To: "Conrad J. Sabatier" <conrads@cox.net>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/69104: bsd.port.mk assumes "fetch" as FETCH_CMD
Date: Fri, 16 Jul 2004 01:17:31 +0200

 Conrad J. Sabatier wrote:
 
 >> Number:         69104
 >> Category:       ports
 >> Synopsis:       bsd.port.mk assumes "fetch" as FETCH_CMD
 >> []...
 >> Description:
 > 	The following section in bsd.port.mk's do-fetch: target renders 
 > using any
 > 	FETCH_CMD other than the default "fetch" impossible.
 
 FWIIW, devel/portmk supports wget and curl via FETCH_USE_CURL and 
 FETCH_USE_WGET. This should at least help people that are behind a proxy 
 that needs password authentication.
 
 -Oliver
 

From: Kris Kennaway <kris@obsecurity.org>
To: Oliver Eikemeier <eikemeier@fillmore-labs.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/69104: bsd.port.mk assumes "fetch" as FETCH_CMD
Date: Thu, 15 Jul 2004 16:28:39 -0700

 On Thu, Jul 15, 2004 at 11:20:26PM +0000, Oliver Eikemeier wrote:
 > The following reply was made to PR ports/69104; it has been noted by GNATS.
 > 
 > From: Oliver Eikemeier <eikemeier@fillmore-labs.com>
 > To: "Conrad J. Sabatier" <conrads@cox.net>
 > Cc: FreeBSD-gnats-submit@FreeBSD.org
 > Subject: Re: ports/69104: bsd.port.mk assumes "fetch" as FETCH_CMD
 > Date: Fri, 16 Jul 2004 01:17:31 +0200
 > 
 >  Conrad J. Sabatier wrote:
 >  
 >  >> Number:         69104
 >  >> Category:       ports
 >  >> Synopsis:       bsd.port.mk assumes "fetch" as FETCH_CMD
 >  >> []...
 >  >> Description:
 >  > 	The following section in bsd.port.mk's do-fetch: target renders 
 >  > using any
 >  > 	FETCH_CMD other than the default "fetch" impossible.
 >  
 >  FWIIW, devel/portmk supports wget and curl via FETCH_USE_CURL and 
 >  FETCH_USE_WGET. This should at least help people that are behind a proxy 
 >  that needs password authentication.
 
 Doesn't HTTP_PROXY_AUTH DTRT with fetch?
 
 Kris

Adding to audit trail from misfiled PR 69136:
 
 Hmm.  There was a time when it was possible to use, say, wget as the
 FETCH_CMD, but not anymore.
 
 The name seems to imply that you should be able to substitute whatever
 fetch command you like.  If not, what is the point in even having it?
 
 -- 
 Conrad J. Sabatier <conrads@cox.net> -- "In Unix veritas"

Adding to audit trail from misfiled PR 69137:

 AFAIK, so you can use fetch in a different patch or use different args
 to fetch:
 
 # FETCH_CMD             - Full path to ftp/http fetch command if not in $PATH
 #                                 (default: "/usr/bin/fetch -ARr").
 
 Kris
From: Kris Kennaway <kris@obsecurity.org>
To: Kris Kennaway <kris@obsecurity.org>
Cc: "Conrad J. Sabatier" <conrads@cox.net>, portmgr@freebsd.org,
	FreeBSD-gnats-submit@freebsd.org
Subject: Re: ports/69104: bsd.port.mk assumes "fetch" as FETCH_CMD
Date: Thu, 15 Jul 2004 20:14:18 -0700

 On Thu, Jul 15, 2004 at 08:12:30PM -0700, Kris Kennaway wrote:
 
 > > The name seems to imply that you should be able to substitute whatever
 > > fetch command you like.  If not, what is the point in even having it?
 > 
 > AFAIK, so you can use fetch in a different patch or use different args
                                              ^^^^^ path
 > to fetch:
 > 
 > # FETCH_CMD             - Full path to ftp/http fetch command if not in $PATH
 > #                                 (default: "/usr/bin/fetch -ARr").
 > 
 > Kris
 > 

From: Oliver Eikemeier <eikemeier@fillmore-labs.com>
To: Kris Kennaway <kris@obsecurity.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/69104: bsd.port.mk assumes "fetch" as FETCH_CMD
Date: Fri, 16 Jul 2004 08:33:41 +0200

 Kris Kennaway wrote:
 
 > On Thu, Jul 15, 2004 at 11:20:26PM +0000, Oliver Eikemeier wrote:
 >>
 >>  FWIIW, devel/portmk supports wget and curl via FETCH_USE_CURL and
 >>  FETCH_USE_WGET. This should at least help people that are behind a 
 >> proxy
 >>  that needs password authentication.
 >
 > Doesn't HTTP_PROXY_AUTH DTRT with fetch?
 
 Ah, you are right, I've completetly overlooked that point in fetch(3). 
 curl(1) is the only of these supporting digest (and NTLM) proxy 
 authorization where you don't have to send your password over the wire 
 in clear, but this seems to be rarely needed.
 
 -Oliver
 
State-Changed-From-To: open->closed 
State-Changed-By: kris 
State-Changed-When: Wed Jun 1 19:28:00 GMT 2005 
State-Changed-Why:  
This behaviour is currently deliberate. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69104 
>Unformatted:
