Page MenuHomeFreeBSD

Mk/bsd.sites.mk: Add GH_ASSET to download a release asset on GitHub
Needs ReviewPublic

Authored by hrs on Jan 2 2023, 8:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 2, 10:25 PM
Unknown Object (File)
Wed, Oct 2, 11:27 AM
Unknown Object (File)
Tue, Oct 1, 4:16 AM
Unknown Object (File)
Mon, Sep 30, 7:26 PM
Unknown Object (File)
Sat, Sep 28, 4:10 AM
Unknown Object (File)
Fri, Sep 27, 2:50 AM
Unknown Object (File)
Mon, Sep 23, 5:14 PM
Unknown Object (File)
Sep 8 2024, 3:13 AM

Details

Reviewers
None
Group Reviewers
portmgr
Summary

This change is to add GH_ASSET to support "releases/download" URL
to download GitHub release assets, instead of using a raw URL
in MASTER_SITES.

When USE_GITHUB=yes and GH_ASSET is defined, the following variables
will be set:

MASTER_SITES+= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/releases/download/${GH_TAGNAME}/
DISTFILES+= ${GH_ASSET}

The GH_ASSET variable is typically ${DISTNAME}${EXTRACT_SUFX}.

Examples of rewriting the existing ports using releases/download
URLs have been attached to this review:

accessibility/speech-dispatcher: Use GH_ASSET instead of a raw URL of GitHub
archivers/advancecomp: Use GH_ASSET instead of a raw URL of GitHub
archivers/laszip: Use GH_ASSET instead of a raw URL of GitHub
archivers/libarchive: Use GH_ASSET instead of a raw URL of GitHub
archivers/libzip: Use GH_ASSET instead of a raw URL of GitHub
archivers/makeself: Use GH_ASSET instead of a raw URL of GitHub
archivers/peazip: Use GH_ASSET instead of a raw URL of GitHub
archivers/upx: Use GH_ASSET instead of a raw URL of GitHub
archivers/zstd: Use GH_ASSET instead of a raw URL of GitHub
astro/erfa: Use GH_ASSET instead of a raw URL of GitHub
astro/osmosis: Use GH_ASSET instead of a raw URL of GitHub
astro/pal: Use GH_ASSET instead of a raw URL of GitHub
astro/starfetch: Use GH_ASSET instead of a raw URL of GitHub
astro/stellarium: Use GH_ASSET instead of a raw URL of GitHub

The total number of ports using raw URLs is ~650.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 48936
Build 45825: arc lint + arc unit

Event Timeline

hrs held this revision as a draft.
hrs published this revision for review.Jan 2 2023, 8:50 PM

This is especially important after https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273514.

Porter's Handbook section 4.2. suggests using bsd.sites.mk, but section 5.4.3. asks to defeat bsd.sites.mk purpose since it doesn't have release assets support.