Bug 255006 - devel/fossil: Change URL to work around libfetch bug in FreeBSD 12
Summary: devel/fossil: Change URL to work around libfetch bug in FreeBSD 12
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Pietro Cerutti
Depends on:
Reported: 2021-04-12 13:48 UTC by Christian Ullrich
Modified: 2021-04-13 05:58 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (gahr)

Patch. (1010 bytes, text/plain)
2021-04-12 13:48 UTC, Christian Ullrich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ullrich 2021-04-12 13:48:57 UTC
Created attachment 224052 [details]

There is a bug in libfetch that manifests when an HTTP URL returns a
redirect to an HTTPS URL and the latter is accessed through a proxy.
In this situation, libfetch uses the proxy syntax (GET https://...)
in the request to the origin server. Some servers, including the one
that hosts fossil source tarballs, cannot deal with this.

The bug was fixed in -CURRENT in 2018 (git commit a768df3e91) and MFC'd
to 13, but is still present in 12 (stable and releases), and presumably
earlier versions.

The attached patch changes the MASTER_SITES to use HTTPS to avoid the bug.

I think perhaps I should report this as a bug against libfetch to get
the fix into 12, but don't know whether this is even possible, and it is procedurally easier to work around in the port by making sure the
original URL is HTTPS.
Comment 1 commit-hook freebsd_committer 2021-04-13 05:57:29 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d3427a37f428f4b423afe40842b9777253ad9fbc

commit d3427a37f428f4b423afe40842b9777253ad9fbc
Author:     Pietro Cerutti <gahr@FreeBSD.org>
AuthorDate: 2021-04-13 05:54:21 +0000
Commit:     Pietro Cerutti <gahr@FreeBSD.org>
CommitDate: 2021-04-13 05:57:01 +0000

    devel/fossil: fetch from https

    PR:             255006
    Submitted by:   Christian Ullrich <chris@chrullrich.net>

 devel/fossil/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)