Date: 30 Mar 2001 04:27:00 +0200 From: Cyrille Lefevre <clefevre@poboxes.com> To: "Mario Sergio Fujikawa Ferreira" <lioux@uol.com.br> Cc: clefevre@poboxes.com, freebsd-stable@FreeBSD.org Subject: libfetch problem (was Re: commit request) Message-ID: <7l18yosr.fsf_-_@gits.dyndns.org> In-Reply-To: <20010329133906.A12131@Fedaykin.here> References: <20010328233750.C3385@Fedaykin.here> <200103291128.f2TBSWV26178@gits.dyndns.org> <20010329133906.A12131@Fedaykin.here>
next in thread | previous in thread | raw e-mail | index | archive | help
"Mario Sergio Fujikawa Ferreira" <lioux@uol.com.br> writes: this answer is CC'ed to -stable. > On Thu, Mar 29, 2001 at 01:28:09PM +0200, Cyrille Lefevre wrote: > > Mario Sergio Fujikawa Ferreira wrote: > > > On Mon, Mar 26, 2001 at 09:08:30PM +0200, Cyrille Lefevre wrote: > [snip] > > no, it is not fixed, but I've found why. you probably have > > FTP_PASSWORD in your environment. w/o this variable, fetch fallback to > > $USER@localhost which is somewhat wrong. in this case, at least. > > > > try w/ env - fetch ..., should kaboum :) > > Nope. It works. grrr. see below... > [Fedaykin:lioux:1]make -V FETCH_CMD > /usr/bin/env - /usr/bin/fetch > [Fedaykin:lioux:2]make -V FETCH_BEFORE_ARGS > > [Fedaykin:lioux:3]make -V FETCH_AFTER_ARGS > > [Fedaykin:lioux:4]make fetch > >> op-1.11.tar.gz doesn't seem to exist in /usr/ports/distfiles/. > >> Attempting to fetch from ftp://coast.cs.purdue.edu/pub/tools/unix/sysutils/op/. > 49217 bytes transferred in 2.9 seconds (16.71 kBps) > [Fedaykin:lioux:5]make checksum > >> Checksum OK for op-1.11.tar.gz. # uname -a FreeBSD gits 4.3-BETA FreeBSD 4.3-BETA #18: Sat Mar 17 02:17:40 CET 2001 # ident /usr/ports/Mk/bsd.port.mk /usr/ports/Mk/bsd.port.mk: $FreeBSD: ports/Mk/bsd.port.mk,v 1.363 2001/03/24 21:35:22 asami Exp $ # make -V FETCH_CMD -V FETCH_ENV -V FETCH_BEFORE_ARGS -V FETCH_AFTER_ARGS /usr/bin/fetch -A # make fetch >> op-1.11.tar.gz doesn't seem to exist in /usr/ports/distfiles/. >> Attempting to fetch from ftp://coast.cs.purdue.edu/pub/tools/unix/sysutils/op/. fetch: op-1.11.tar.gz: Not logged in ... using the FETCH_ENV hack : # make -V FETCH_CMD -V FETCH_ENV -V FETCH_BEFORE_ARGS -V FETCH_AFTER_ARGS /usr/bin/fetch -A FTP_PASSWORD=root@`ifconfig | awk '/inet /{print $2; exit}'` # make fetch >> op-1.11.tar.gz doesn't seem to exist in /usr/ports/distfiles/. >> Attempting to fetch from ftp://coast.cs.purdue.edu/pub/tools/unix/sysutils/op/. Receiving op-1.11.tar.gz (49217 bytes): 100% 49217 bytes transferred in 1.0 seconds (47.70 kBps) > Just check revision 1.35 of http://www.FreeBSD.org/cgi/cvsweb.cgi/src/lib/libfetch/fetch.3 > and revision 1.58 of http://www.FreeBSD.org/cgi/cvsweb.cgi/src/lib/libfetch/ftp.c > It uses anonymous@ per default. Therefore, we can consider it fixed. the code in _ftp_connect is the same between -stable and HEAD. I compile and debug fetch and libfetch. I've found the problem. it is at line 784 : gethostname(localhost, sizeof localhost); which in my case doesn't resolve in a valid FQDN since my ISP doesn't assign me a FQDN, so, it resolve to the hostname I give to my machine. a better way would be to use the IP address instead which is the hack do. the question is : why libfetch is not using the .netrc ? Cyrille. -- home: mailto:clefevre@poboxes.com UNIX is user-friendly; it's just particular work: mailto:Cyrille.Lefevre@edf.fr about who it chooses to be friends with. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7l18yosr.fsf_-_>