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)
Mon, Apr 8, 12:15 PM
Unknown Object (File)
Fri, Apr 5, 8:08 AM
Unknown Object (File)
Fri, Apr 5, 12:11 AM
Unknown Object (File)
Feb 15 2024, 10:30 AM
Unknown Object (File)
Jan 10 2024, 7:20 PM
Unknown Object (File)
Dec 23 2023, 2:01 AM
Unknown Object (File)
Dec 10 2023, 10:25 PM
Unknown Object (File)
Dec 4 2023, 1:30 PM

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.