Bug 2949 - bsd.port.mk needs something like FETCH_ENV?
Summary: bsd.port.mk needs something like FETCH_ENV?
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Satoshi Asami
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1997-03-11 22:40 UTC by fenner
Modified: 1999-03-08 07:30 UTC (History)
0 users

See Also:


Attachments
file.diff (2.03 KB, patch)
1997-03-11 22:40 UTC, fenner
no flags Details | Diff
file.diff (374 bytes, patch)
1997-03-11 22:40 UTC, fenner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description fenner 1997-03-11 22:40:02 UTC
	
benchmarks/iozone/Makefile redefines FETCH_CMD to add a variable
to fetch's environment.  However, in order to make sure that fetch
knows how to get through my firewall, I already set FETCH_CMD in
/etc/make.conf.  This means that iozone doesn't work for me.
I suspect that a good solution may be to define FETCH_ENV
and add it to the beginning of ${FETCH_CMD} when running fetch
so that I can have "FETCH_ENV=HTTP_PROXY=wwwproxy:8000" and
iozone can have "FETCH_ENV+=FTP_PASSWORD=president@whitehouse.gov".

Fix: Of course, this doesn't help all the ports who use ${FETCH_CMD} to
fetch a file directly.  I don't know if that means that this idea is
broken or using ${FETCH_CMD} directly is broken.
How-To-Repeat: 
	
"make fetch" in iozone when you have FETCH_CMD redefinied in /etc/make.conf
and see your definition get overridden.
Comment 1 David E. O'Brien freebsd_committer freebsd_triage 1997-10-07 07:32:36 UTC
Responsible Changed
From-To: freebsd-ports->asami
Comment 2 Sheldon Hearn 1999-03-03 17:22:06 UTC
Hi Bill,

Couldn't the we do something like

make.conf:
FETCH_ENV="HTTP_PROXY=perhaps.yet.no:8080"

bsd.port.mk
FETCH_CMD?=	env ${FETCH_ENV} /usr/bin/fetch

I know this has been discussed to death quite recently on CURRENT, but I
don't remember anyone else suggesting this, and it seems sound to me.

Ciao,
Sheldon.
Comment 3 fenner 1999-03-03 18:03:20 UTC
I like the solution in the PR better; what if you redefine FETCH_CMD
to something that still knows what ${HTTP_PROXY} or ${FTP_USERNAME}
means?

  Bill
Comment 4 Satoshi Asami freebsd_committer freebsd_triage 1999-03-04 01:18:16 UTC
 * I like the solution in the PR better; what if you redefine FETCH_CMD
 * to something that still knows what ${HTTP_PROXY} or ${FTP_USERNAME}
 * means?

I agree with you.  It is also more consistent with the way the other
*_ENV variables are used.

I've put it in my copy of bsd.port.mk, it will be committed with the
next batch of changes.

Satoshi
Comment 5 Satoshi Asami freebsd_committer freebsd_triage 1999-03-08 07:30:14 UTC
State Changed
From-To: open->closed

Thanks, committed!