Use of GH_ACCOUNT variable

Marcel Bischoff marcel at herrbischoff.com
Tue Jul 28 11:34:11 UTC 2020


Hi all,

I was initially involved in updating a port without maintainer 
(multimedia/ffmpegthumbnailer), which was taken over by someone else. 
I'm just starting out with porting and have updated several outdated 
ones already. So that's fine.

What irritates me however, is the conflicting information I got and the 
differing styles of how GitHub downloads of source code are supposed to 
be implemented. The Porter's Handbook is not completely clear on that as 
well.

In 
https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-distfiles.html, 
section 5.4.3, there's this: "If the distribution file comes from a 
specific commit or tag on GitHub for which there is no officially 
released file, there is an easy way to set the right DISTNAME and 
MASTER_SITES automatically." This got interpreted in 
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248095#c5 as having to 
use the officially released file — which I understand.

Grepping for examples in the ports tree, I came up with a solution as 
follows:

MASTER_SITES=	https://github.com/${GH_ACCOUNT}/${PORTNAME}/releases/download/${PORTVERSION}/
GH_ACCOUNT=	dirkvdb

In the latest proposed patch the GH_ACCOUNT variable was removed and 
MASTER_SITES changed to:

MASTER_SITES=	https://github.com/dirkvdb/${PORTNAME}/releases/download/${PORTVERSION}/

Also, there's a magic GH for MASTER_SITES that does not download a 
separate release but a specific tag, which somewhat contradicts the 
interpretation of 5.4.3 to use a release file if available. Grepping the 
ports tree surfaces several differing strategies, which all work but are 
all in different style.

I'd like to know if I missed something, if there is some unwritten 
understanding on how to do this properly or if this is simply such a 
small stylistic choice that it's up to whoever maintains or updates the 
port. In case neither of the before apply, I'd like to encourage 
agreeing on an official style that gets documented with an example.

Thanks,

Marcel


More information about the freebsd-ports mailing list