From owner-freebsd-stable Thu Mar 29 18:27:20 2001 Delivered-To: freebsd-stable@freebsd.org Received: from mail.noos.fr (racine.noos.net [212.198.2.71]) by hub.freebsd.org (Postfix) with ESMTP id D844037B71B for ; Thu, 29 Mar 2001 18:27:14 -0800 (PST) (envelope-from clefevre@poboxes.com) Received: (qmail 2647171 invoked by uid 0); 30 Mar 2001 03:27:08 -0000 Received: from d165.dhcp212-198-231.noos.fr (HELO gits.dyndns.org) ([212.198.231.165]) (envelope-sender ) by racine.noos.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 30 Mar 2001 03:27:08 -0000 Received: (from root@localhost) by gits.dyndns.org (8.11.3/8.11.3) id f2U2R6o58677; Fri, 30 Mar 2001 04:27:07 +0200 (CEST) (envelope-from clefevre@poboxes.com) To: "Mario Sergio Fujikawa Ferreira" Cc: clefevre@poboxes.com, freebsd-stable@FreeBSD.org Subject: libfetch problem (was Re: commit request) References: <20010328233750.C3385@Fedaykin.here> <200103291128.f2TBSWV26178@gits.dyndns.org> <20010329133906.A12131@Fedaykin.here> X-Face: V|+c;4!|B?E%BE^{E6);aI.[<97Zd*>^#%Y5Cxv;%Y[PT-LW3;A:fRrJ8+^k"e7@+30g0YD0*^^3jgyShN7o?a]C la*Zv'5NA,=963bM%J^o]C Reply-To: Cyrille Lefevre In-Reply-To: <20010329133906.A12131@Fedaykin.here> From: Cyrille Lefevre Date: 30 Mar 2001 04:27:00 +0200 Message-ID: <7l18yosr.fsf_-_@gits.dyndns.org> Lines: 82 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Mario Sergio Fujikawa Ferreira" 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