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)
Fri, Jun 14, 3:40 AM
Unknown Object (File)
Tue, May 21, 12:47 PM
Unknown Object (File)
May 19 2024, 10:03 AM
Unknown Object (File)
Apr 30 2024, 4:24 AM
Unknown Object (File)
Apr 30 2024, 4:18 AM
Unknown Object (File)
Apr 29 2024, 8:42 PM
Unknown Object (File)
Apr 8 2024, 12:15 PM
Unknown Object (File)
Apr 5 2024, 8:08 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.