github portgroup release tarball url

Joshua Root jmr at macports.org
Sat Jul 26 13:19:47 PDT 2014


On 2014-7-27 05:54 , Ryan Schmidt wrote:
> On Jul 25, 2014, at 6:41 PM, Jean-Philippe Ouellet <jean-philippe at ouellet.biz> wrote:
> 
>> Hello,
>>
>> In the github portgroup, the urls it uses to fetch releases are:
>> 	${github.homepage}/releases/download/${git.branch}
>> and
>> 	${github.homepage}/tarball/${git.branch}
>>
>> which fetches a tarball that extracts to
>> 	${author}-${project}-${git_hash}/
>> which we then need to fix in post-extract.
>>
>>
>> The tarball for the release linked to from the github web interface is
>> 	${github.homepage}/archive/${version}.tar.gz
>> which extracts to
>> 	${project}-${version}/
>> which I think would be cleaner. (and is used in the majority of brew ports)
> 
> This change has been suggested before:
> 
> https://trac.macports.org/ticket/40518
> 
> I was not aware of the benefit you mention, and that is indeed a helpful change. However, there are also drawbacks I mentioned in the ticket. It would come down to needing to define a new portgroup option for whether or not to use the legacy tarball urls, editing each port using these tarballs to set the value to yes, and remembering to remove that line when updating each of those ports to the next version.

The tarball URLs aren't actually legacy AFAICT, they're still a
documented part of the github API:

<https://developer.github.com/v3/repos/contents/#get-archive-link>

Both the tarball and archive URLs actually redirect somewhere else.

>> I found this issue while wondering why I kept getting checksum
>> mismatches in macports when it worked perfectly in homebrew.
> 
> You shouldn't be getting checksum mismatches...

You do if you try to use the same checksums in brew and macports.

- Josh


More information about the macports-dev mailing list