From vd@datamax.bg  Tue Feb  3 00:29:52 2004
Return-Path: <vd@datamax.bg>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id DB46A16A4CE; Tue,  3 Feb 2004 00:29:52 -0800 (PST)
Received: from gw-bj2.datamax.bg (datamax.wl.bitex.com [195.34.115.67])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 4C92F43D46; Tue,  3 Feb 2004 00:29:50 -0800 (PST)
	(envelope-from vd@datamax.bg)
Received: from sinanica.lg2a.datamax (sinanica.lg2a.datamax [192.168.10.1])
	by gw-bj2.datamax.bg (Postfix) with QMQP
	id 3701787FD; Tue,  3 Feb 2004 10:29:46 +0200 (EET)
Received: (nullmailer pid 22321 invoked by uid 1001);
	Tue, 03 Feb 2004 08:29:45 -0000
Message-Id: <1075796985.964405.22320.nullmailer@sinanica.lg2a.datamax>
Date: Tue, 03 Feb 2004 10:29:45 +0200
From: Vasil Dimov <vd@datamax.bg>
Reply-To: Vasil Dimov <vd@datamax.bg>
To: FreeBSD-gnats-submit@freebsd.org
Cc: freebsd-ports@freebsd.org
Subject: SIZE in distinfos causes failure with FETCH_CMD=wget
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         62302
>Category:       ports
>Synopsis:       SIZE in distinfos causes failure with FETCH_CMD=wget
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 03 00:30:20 PST 2004
>Closed-Date:    Tue Feb 17 20:01:40 PST 2004
>Last-Modified:  Tue Feb 17 20:01:40 PST 2004
>Originator:     Vasil Dimov
>Release:        FreeBSD 5.2-RELEASE i386
>Organization:
DataMax
>Environment:
System: FreeBSD sinanica.lg2a.datamax 5.2-RELEASE FreeBSD 5.2-RELEASE #1: Tue Jan 20 10:22:51 EET 2004 root@sinanica.lg2a.datamax:/usr/obj/usr/src/sys/SINANICA i386
>Description:
As I see there is a new feature in ports - SIZE in distinfo files. (/usr/ports/CHANGES 20040129)
Existence of the SIZE line causes `-S bytes' to be passed to the fetch command
(according to FETCH_CMD). As it appears wget does not support this feature.

sinanica:/usr/ports/devel/gettext# cat distinfo
MD5 (gettext-0.13.1.tar.gz) = b3477289185e7781527345c14a4565de
SIZE (gettext-0.13.1.tar.gz) = 6458256
sinanica:/usr/ports/devel/gettext# make FETCH_CMD=wget fetch
 >> gettext-0.13.1.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
 >> Attempting to fetch from http://kutelo1.lg2a.datamax/pub/FreeBSD/ports/distfiles//.
 wget: unknown option --
 Usage: wget [OPTION]... [URL]...
 
 Try `wget --help' for more options.
sinanica:/usr/ports/devel/gettext# make FETCH_CMD=echo fetch
 >> gettext-0.13.1.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
 >> Attempting to fetch from http://kutelo1.lg2a.datamax/pub/FreeBSD/ports/distfiles//.
 -S 6458256 http://kutelo1.lg2a.datamax/pub/FreeBSD/ports/distfiles//gettext-0.13.1.tar.gz
sinanica:/usr/ports/devel/gettext#
>How-To-Repeat:
 cd /usr/ports/devel/gettext
 make FETCH_CMD=wget fetch
>Fix:
Workarounds:
1. Remove SIZE lines from distinfo file
2. Do not use FETCH_CMD=wget. Heh. Do not use FETCH_CMD at all.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: eik 
State-Changed-When: Tue Feb 3 12:04:29 CET 2004 
State-Changed-Why:  
asked for feedback: do we have a reason for supporting wget 

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

From: Oliver Eikemeier <eikemeier@fillmore-labs.com>
To: Vasil Dimov <vd@datamax.bg.dot>
Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports@FreeBSD.org
Subject: Re: ports/62302: SIZE in distinfos causes failure with FETCH_CMD=wget
Date: Tue, 03 Feb 2004 12:04:08 +0100

 Vasil Dimov wrote:
 
 > [...]
 > Existence of the SIZE line causes `-S bytes' to be passed to the fetch command
 > (according to FETCH_CMD). As it appears wget does not support this feature.
 
 You run into a similar problem if you have distfiles in /cdrom/ports/distfiles
 and do `make FETCH_CMD=wget FETCH_SYMLINK_DISTFILES=yes fetch'. The problem gets
 worse if you do `make FETCH_CMD=curl fetch'. Either:
 
 - only `fetch' is supported, and you can use FETCH_CMD only to specify a different
   path to the binary
 
 or
 
 - we have a reason to support other file transfer utilities (e.g. they support
   distributed downloading or special firewall protocols) and have to fix this.
 
 So, what do you think?

From: Joe Marcus Clarke <marcus@marcuscom.com>
To: Oliver Eikemeier <eikemeier@fillmore-labs.com>
Cc: Vasil Dimov <vd@datamax.bg.dot>,
	FreeBSD-gnats-submit@freebsd.org, freebsd-ports@freebsd.org
Subject: Re: ports/62302: SIZE in distinfos causes failure with
	FETCH_CMD=wget
Date: Tue, 03 Feb 2004 12:00:19 -0500

 --=-oivmxOq4DKqDbu64O/Jc
 Content-Type: text/plain
 Content-Transfer-Encoding: quoted-printable
 
 On Tue, 2004-02-03 at 06:04, Oliver Eikemeier wrote:
 > Vasil Dimov wrote:
 >=20
 > > [...]
 > > Existence of the SIZE line causes `-S bytes' to be passed to the fetch =
 command
 > > (according to FETCH_CMD). As it appears wget does not support this feat=
 ure.
 >=20
 > You run into a similar problem if you have distfiles in /cdrom/ports/dist=
 files
 > and do `make FETCH_CMD=3Dwget FETCH_SYMLINK_DISTFILES=3Dyes fetch'. The p=
 roblem gets
 > worse if you do `make FETCH_CMD=3Dcurl fetch'. Either:
 >=20
 > - only `fetch' is supported, and you can use FETCH_CMD only to specify a =
 different
 >   path to the binary
 >=20
 > or
 >=20
 > - we have a reason to support other file transfer utilities (e.g. they su=
 pport
 >   distributed downloading or special firewall protocols) and have to fix =
 this.
 >=20
 > So, what do you think?
 
 This is fixed in the current bento run as a DISABLE_SIZE macro has been
 added.  Defining this in /etc/make.conf will disable the -S argument.=20
 As well, SIZE attributes are now recorded by default unless NO_SIZE is
 defined.
 
 Joe
 
 > _______________________________________________
 > freebsd-ports@freebsd.org mailing list
 > http://lists.freebsd.org/mailman/listinfo/freebsd-ports
 > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"
 --=20
 PGP Key : http://www.marcuscom.com/pgp.asc
 
 
 
 --=-oivmxOq4DKqDbu64O/Jc
 Content-Type: application/pgp-signature; name=signature.asc
 Content-Description: This is a digitally signed message part
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.4 (FreeBSD)
 
 iD8DBQBAH9Ojb2iPiv4Uz4cRAjXCAJ0bFupIMDM0nk9aT08VD3DKF/DQEgCgrW87
 vdAuiygNq3pFxM1paKtgRqY=
 =RRM5
 -----END PGP SIGNATURE-----
 
 --=-oivmxOq4DKqDbu64O/Jc--
 

From: "Gerard O'Donnell" <gerard@serizon.com>
To: <vd@datamax.bg>, <freebsd-gnats-submit@FreeBSD.org>
Cc:  
Subject: RE: Re: ports/62302: SIZE in distinfos causes failure with FETCH_CMD=wget
Date: Sat, 7 Feb 2004 17:14:32 +1030

 This is a multi-part message in MIME format.
 
 ------=_NextPart_000_0000_01C3ED9D.DDFB7B00
 Content-Type: text/plain;
 	charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 
 Further to email previously, attached is a perl script if anyone wants
 to use to traverse the ports tree to strip SIZE information from the
 distinfo files so that wget works.
 
 Usage is stripSIZE.pl <wherever the ports tree is located>
 
 e.g:
 
 stripSIZE.pl /usr/ports
 
 ------=_NextPart_000_0000_01C3ED9D.DDFB7B00
 Content-Type: application/octet-stream;
 	name="stripSIZE.pl"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment;
 	filename="stripSIZE.pl"
 
 #!/usr/bin/perl -w
 
 use integer;
 use strict;
 
 use Cwd;
 use Digest::MD5;
 
 # -------------------------------------------------------------------
 my($hashRef) =3D {};
 my $increment =3D "0000";
 
 my($dirName) =3D join(' ', @ARGV) || die("Usage: $0 <dirName>\n");
 $hashRef =3D &process($hashRef, $dirName);
 
 print "All done!\n";
 
 # -------------------------------------------------------------------
 
 sub process {
   my($hashRef, $dirName) =3D @_;
   $dirName =3D~ tr|\\|/|;
   my($cwd) =3D cwd();
 
   chdir($dirName) || die("Can't chdir($dirName): $!");
 
   opendir(INX, '.') || die("Can't open($dirName): $!");
   my(@fileName) =3D readdir(INX);
   closedir(INX);
 
   my($fileName);
  =20
  =20
 
   for $fileName (@fileName) {
     #print "Got $fileName.\n";
     if ($fileName =3D~ /distinfo/i && $fileName !~ /^distinfo.*bak$/i) {
       print "Got $dirName/$fileName.\n";
       open(INX, $fileName) || croak("Can't open($fileName): $!");
       my(@line) =3D <INX>;
       my $linee;
       my $hasSize =3D 0;
       foreach $linee( @line) {
 	if ($linee =3D~ /^SIZE.*=3D.*[0-9]+/) {
 	  $hasSize =3D 1;
 	  print "HAS SIZE.\n";
 	}
 	#print "$linee";
       }
       close(INX);
      =20
       if ($hasSize) {
 	my $old =3D $fileName;
 	my $new =3D "$fileName.tmp";
 	my $bak =3D "$fileName.bak";
 	open(OLD, "< $old")         or die "can't open $old: $!";
 	open(NEW, "> $new")         or die "can't open $new: $!";
 	# Correct typos, preserving case
 	while (<OLD>) {
 	  chomp if /^SIZE.*=3D.*[0-9]+/;
 	  s/^SIZE.*=3D.*[0-9]+//g;
 	  (print NEW $_)          or die "can't write to $new: $!";
 	}
 	close(OLD)                  or die "can't close $old: $!";
 	close(NEW)                  or die "can't close $new: $!";
 	rename($old, $bak)          or die "can't rename $old to $bak: $!";
 	rename($new, $old)          or die "can't rename $new to $old: $!";
 	$hasSize =3D 0;
       }
     }
 
     # Skip ., ..
     next if ($fileName =3D~ /(^\.\.?)$/i);
 
     # Recurse on directories.
     ($hashRef =3D &process($hashRef, "$dirName/$fileName") ), next if =
 (-d $fileName);
 
 
     $increment++;
 
     if (! defined($$hashRef{$dirName}) ) {
       $$hashRef{$dirName}				=3D {};
       $$hashRef{$dirName}{$fileName}	=3D {};
     }
 
   }
 
   chdir($cwd) || die("Can't chdir($cwd): $!");
 
   $hashRef;
 
 }				# End of process.
 
 #--------------------------------------------------------------------
 # Read a file. Pass in $chomp =3D=3D 0 to stop chomping.
 
 sub readFile
   {
     my($fileName, $chomp) =3D @_;
     $chomp =3D 1 if ($#_ =3D=3D 0);
 
     open(INX, $fileName) || croak("Can't open($fileName): $!");
     my(@line) =3D <INX>;
     close(INX);
     chomp(@line) if ($chomp !=3D 0);
 
     \@line;
 
   }				# End of readFile.
 
 #--------------------------------------------------------------------
 
 
 
 ------=_NextPart_000_0000_01C3ED9D.DDFB7B00--
 

From: "Gerard O'Donnell" <gerard@serizon.com>
To: <freebsd-gnats-submit@FreeBSD.org>, <vd@datamax.bg>
Cc:  
Subject: Re: ports/62302: SIZE in distinfos causes failure with FETCH_CMD=wget
Date: Sat, 7 Feb 2004 13:17:22 +1030

 This is a multi-part message in MIME format.
 
 ------=_NextPart_000_0000_01C3ED7C.BC445BB0
 Content-Type: text/plain;
 	charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 
 >State-Changed-From-To: open->feedback 
 >State-Changed-By: eik 
 >State-Changed-When: Tue Feb 3 12:04:29 CET 2004 
 >State-Changed-Why:  
 >asked for feedback: do we have a reason for supporting wget 
  
 Yes, we do have a reason for supporting wget - it offers proxy
 authentication that fetch does not for people behind corporate firewalls
 to download files.
  
  
  
  
 
 ------=_NextPart_000_0000_01C3ED7C.BC445BB0
 Content-Type: text/html;
 	charset="us-ascii"
 Content-Transfer-Encoding: quoted-printable
 
 <html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
 xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
 xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
 xmlns=3D"http://www.w3.org/TR/REC-html40">
 
 <head>
 <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
 charset=3Dus-ascii">
 
 
 <meta name=3DProgId content=3DWord.Document>
 <meta name=3DGenerator content=3D"Microsoft Word 10">
 <meta name=3DOriginator content=3D"Microsoft Word 10">
 <link rel=3DFile-List href=3D"cid:filelist.xml@01C3ED7C.91C4D770">
 <o:SmartTagType =
 namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
  name=3D"time"/>
 <!--[if gte mso 9]><xml>
  <o:OfficeDocumentSettings>
   <o:DoNotRelyOnCSS/>
  </o:OfficeDocumentSettings>
 </xml><![endif]--><!--[if gte mso 9]><xml>
  <w:WordDocument>
   <w:SpellingState>Clean</w:SpellingState>
   <w:GrammarState>Clean</w:GrammarState>
   <w:DocumentKind>DocumentEmail</w:DocumentKind>
   <w:EnvelopeVis/>
   <w:Compatibility>
    <w:BreakWrappedTables/>
    <w:SnapToGridInCell/>
    <w:WrapTextWithPunct/>
    <w:UseAsianBreakRules/>
   </w:Compatibility>
   <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
  </w:WordDocument>
 </xml><![endif]--><!--[if !mso]>
 <style>
 st1\:*{behavior:url(#default#ieooui) }
 </style>
 <![endif]-->
 <style>
 <!--
  /* Style Definitions */
  p.MsoNormal, li.MsoNormal, div.MsoNormal
 	{mso-style-parent:"";
 	margin:0in;
 	margin-bottom:.0001pt;
 	mso-pagination:widow-orphan;
 	font-size:12.0pt;
 	font-family:"Times New Roman";
 	mso-fareast-font-family:"Times New Roman";}
 a:link, span.MsoHyperlink
 	{color:blue;
 	text-decoration:underline;
 	text-underline:single;}
 a:visited, span.MsoHyperlinkFollowed
 	{color:purple;
 	text-decoration:underline;
 	text-underline:single;}
 pre
 	{margin:0in;
 	margin-bottom:.0001pt;
 	mso-pagination:widow-orphan;
 	font-size:10.0pt;
 	font-family:"Courier New";
 	mso-fareast-font-family:"Times New Roman";
 	color:black;}
 span.EmailStyle17
 	{mso-style-type:personal-compose;
 	mso-style-noshow:yes;
 	mso-ansi-font-size:10.0pt;
 	mso-bidi-font-size:10.0pt;
 	font-family:Arial;
 	mso-ascii-font-family:Arial;
 	mso-hansi-font-family:Arial;
 	mso-bidi-font-family:Arial;
 	color:windowtext;}
 span.SpellE
 	{mso-style-name:"";
 	mso-spl-e:yes;}
 @page Section1
 	{size:8.5in 11.0in;
 	margin:1.0in 1.25in 1.0in 1.25in;
 	mso-header-margin:.5in;
 	mso-footer-margin:.5in;
 	mso-paper-source:0;}
 div.Section1
 	{page:Section1;}
 -->
 </style>
 <!--[if gte mso 10]>
 <style>
  /* Style Definitions */=20
  table.MsoNormalTable
 	{mso-style-name:"Table Normal";
 	mso-tstyle-rowband-size:0;
 	mso-tstyle-colband-size:0;
 	mso-style-noshow:yes;
 	mso-style-parent:"";
 	mso-padding-alt:0in 5.4pt 0in 5.4pt;
 	mso-para-margin:0in;
 	mso-para-margin-bottom:.0001pt;
 	mso-pagination:widow-orphan;
 	font-size:10.0pt;
 	font-family:"Times New Roman";}
 </style>
 <![endif]-->
 </head>
 
 <body lang=3DEN-US link=3Dblue vlink=3Dpurple =
 style=3D'tab-interval:.5in'>
 
 <div class=3DSection1><pre><font size=3D2 color=3Dblack face=3D"Courier =
 New"><span
 style=3D'font-size:10.0pt'>&gt;State-Changed-From-To: open-&gt;feedback =
 <o:p></o:p></span></font></pre><pre><font
 size=3D2 color=3Dblack face=3D"Courier New"><span =
 style=3D'font-size:10.0pt'>&gt;State-Changed-By: <span
 class=3DSpellE>eik</span> <o:p></o:p></span></font></pre><pre><font =
 size=3D2
 color=3Dblack face=3D"Courier New"><span =
 style=3D'font-size:10.0pt'>&gt;State-Changed-When: Tue Feb 3 =
 </span></font><st1:time
 Hour=3D"12" Minute=3D"4">12:04:29</st1:time> CET 2004 =
 <o:p></o:p></pre><pre><font
 size=3D2 color=3Dblack face=3D"Courier New"><span =
 style=3D'font-size:10.0pt'>&gt;State-Changed-Why:<span =
 style=3D'mso-spacerun:yes'>&nbsp; =
 </span><o:p></o:p></span></font></pre><pre><font
 size=3D2 color=3Dblack face=3D"Courier New"><span =
 style=3D'font-size:10.0pt'>&gt;asked for feedback: do we have a reason =
 for supporting <span
 class=3DSpellE>wget</span> <o:p></o:p></span></font></pre><pre><font =
 size=3D2
 color=3Dblack face=3D"Courier New"><span =
 style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre><fon=
 t
 size=3D2 color=3Dblack face=3D"Courier New"><span =
 style=3D'font-size:10.0pt'>Yes, we do have a reason for supporting <span
 class=3DSpellE>wget</span> &#8211; it offers proxy authentication that =
 fetch does not for people behind corporate firewalls to download =
 files.<o:p></o:p></span></font></pre><pre><font
 size=3D2 color=3Dblack face=3D"Courier New"><span =
 style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre
 style=3D'margin-left:.5in'><font size=3D2 color=3Dblack face=3D"Courier =
 New"><span
 style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre
 style=3D'margin-left:.5in'><font size=3D2 color=3Dblack face=3D"Courier =
 New"><span
 style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 style=3D'font-size:10.0pt;
 font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
 
 </div>
 
 </body>
 
 </html>
 
 ------=_NextPart_000_0000_01C3ED7C.BC445BB0--
 
State-Changed-From-To: feedback->closed 
State-Changed-By: trevor 
State-Changed-When: Tue Feb 17 20:01:04 PST 2004 
State-Changed-Why:  
fixed in bsd.port.mk 1.484 

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