From owner-freebsd-ports@freebsd.org Tue Jan 5 16:09:58 2021 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5A3554C156B for ; Tue, 5 Jan 2021 16:09:58 +0000 (UTC) (envelope-from portmaster@bsdforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "ultimatedns.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D9HWp12Mmz4gLR; Tue, 5 Jan 2021 16:09:57 +0000 (UTC) (envelope-from portmaster@bsdforge.com) Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.16.1/8.16.1) with ESMTP id 105G9tkd020977; Tue, 5 Jan 2021 08:10:02 -0800 (PST) (envelope-from portmaster@bsdforge.com) MIME-Version: 1.0 Date: Tue, 05 Jan 2021 08:09:55 -0800 From: Chris To: freebsd-ports Cc: Mathieu Arnold Subject: Re: GitHub: size of remote file is not known In-Reply-To: <20210105114854.zl66zzuwooghxaoz@aching.in.mat.cc> References: <20210105114854.zl66zzuwooghxaoz@aching.in.mat.cc> User-Agent: UDNSMS/17.0 Message-ID: <1e42b247805ac6714e7232c7194688cd@bsdforge.com> X-Sender: portmaster@bsdforge.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4D9HWp12Mmz4gLR X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2021 16:09:58 -0000 On 2021-01-05 03:49, Mathieu Arnold wrote: > On Mon, Jan 04, 2021 at 08:04:32PM -0800, Chris wrote: >> I don't use Github. So I'm not familiar with their service(s). >> But ports using source fetched from them always return: >> size of remote file is not known >> Is it that their servers simply refuse to return size/content-length >> or is this something else? >> I can see where this might turn into a problem for those attempting >> to build ports on a system with limited resources -- especially >> during a meta-port build, and even more so for newcomers. >> >> Is anyone familiar with why this is so? I'd like to change this. > > USE_GITHUB is using a GitHub (and a git) feature to have git-archive(1) > files generated and served on the fly. Feature? ;-) > So, the server has no idea how > small or large the file will be, as it does not exist yet, so it cannot > report the size to the http client. > > Once one is generated it gets cached for a while, so if the file has > been requested not too far back, the server will have it cached and will > know the size, but it only happens for files that are requested > frequently. Ahh. Then it looks grim for making any changes in that regard. Thank you very much for the insight, Mathieu. --Chris