public inbox for bass@lists.stargrave.org
Atom feed
From: "Sergey Matveev (stargrave=stargrave.org) via" <bass@lists.stargrave.org>
To: bass@lists.stargrave.org
Subject: Improved urls-sort
Date: Sat, 14 Nov 2026 14:55:32 +0300	[thread overview]
Message-ID: <avhMNMnfoJ_jImSU@stargrave.org> (raw)
In-Reply-To: <ab0HuFGSQbGmhsph@stargrave.org>

[-- Attachment #1: Type: text/plain, Size: 2325 bytes --]

Greetings!

*** Sergey Matveev [2026-03-20 11:39]:
>BASS suggests the following rules for setting priorities:
>
>* balancers > mirrors > CDNs > homepage > GitHub
>* all links should use HTTP as higher priority than HTTPS
>
>FETCHER_URLS_SORT() {
>$DISTFILES/lib/urls-sort ru "dk fi nl se" '!ua' '!xf' '!xc' "" c:eu c:na rand
>}

urls-sort utility became more flexible now and BASS'es distfiles
(nearly) do not explicitly prioritise URLs. This is end-user's choice
now of using balancers, CDNs as least or more preferable sources.

Balancers (URLs without location set), CDNs (having "x*" location,
including "xx" generic-CDN one) now have the same priority as ordinary
mirrors. Homepages still have the lower one, unless project does not ask
to use mirrors. HTTP and HTTPS links also have the same priority now.

Default FETCHER_URLS_SORT() is {
    $DISTFILES/lib/urls-sort pri '!c:x' "" proto:http proto:https rand
} now. It randomises all URLs, raises HTTP protocol first, then raises
the balancers/redirectors, lowers all CDNs and sort by priority (placing
fallback sources like distcache.FreeBSD.org to least preferable).

But now you are free to control that. For example my FETCHER_URLS_SORT is:

    '!ua' '!xc' pri '!xf' '!c:x' ru by "dk fi nl se" c:eu c:na '!' ip6 proto:http proto:https rand

* IPv6-reachable locations are more preferable, but still country is
  more important than reachability over the legacy IP protocol
* Russia, Belarus, then Denmark+Finland+Netherlands+Sweden (same
  priority), whole Europe and then North America are preferred sources
* load-balancers are placed below all of them
* CDNs are even lower (meaning, that "xx"-located GitHub is least
  preferable too)
* especially Fastly
* where Cloudflare CDN comes even after fallback least priorities
* and Ukraine-located servers is a dead end to try

Previously there was -6 option, leaving only IPv6-reachable addresses.
It is replaced with "ip6" command which only sorts the URLs. For
example, "ru ip6" means that IPv6 is more preferable, but country is
more important. "ip6 ru" means that protocol reachability is more
important.

Newly added "pri" command also gives ability to sort by priority
whenever you desire.

-- 
 * Origin: Stargrave's homepage http://www.stargrave.org/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 265 bytes --]

      reply	other threads:[~2026-11-14 11:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20  8:39 Improved distfiles subsystem Sergey Matveev
2026-11-14 11:55 ` Sergey Matveev (stargrave=stargrave.org) via [this message]