github port group
Ryan Schmidt
ryandesign at macports.org
Sun Apr 22 13:55:14 PDT 2012
On Apr 22, 2012, at 12:17, Sean Farley wrote:
>> I didn't think github had automated downloads available except for tags.
>
> They do. Take, for example, the repo
>
> https://github.com/AndreaCrotti/yasnippet-snippets
>
> To get the commit that I pushed, 1441728b488e0883c4ed3ccdfbfd64e82c2b0324,
>
> https://github.com/AndreaCrotti/yasnippet-snippets/tarball/1441728b488e0883c4ed3ccdfbfd64e82c2b0324
Ok, good.
>> If github has automated downloads available for any tag/branch as well, then we would need to verify that they always have the same checksums, and are not generated on the fly. I'm pretty sure that bitbucket, for example, generates them on the fly, meaning different users requesting them at different times will get different checksums, which means they're not suitable for use as master_sites in MacPorts.
>
> You can see that they both generate the same checksums. For the above
> link, the sha1sum reports:
>
> $ sha1sum ~/Downloads/AndreaCrotti-yasnippet-snippets-1441728.tar.gz
> 61df0e33e73940f720d5506520068533f8b28869
> /Users/sean/Downloads/AndreaCrotti-yasnippet-snippets-1441728.tar.gz
Per my previous response in this thread to Craig, now let's wait 24-48 hours and try again and see if we still get the same checksum.
>> What do you mean, "if version exists"? The third parameter of github.setup, which is currently not optional, is the version number you want to assign to this port.
>
> Using the repo above as an example, what version would it get? Now
> that I understand what you meant by git.branch, my guess is that it'd
> be the following:
>
> github.setup AndreaCrotti yasnippet-snippets XXX*
> git.branch a4d27f49d7a4027af0229b7d8298a66e5ce4e504
>
> Internally, for livecheck, this would use the rss to check the version
> (since git.branch is set), correct?
>
> * any unique identifier; perhaps "20120422" to mean the latest commit
> as of this writing
Yes, that's what I meant.
"Any unique identifier" should in addition be something that increases as seen by ver-cmp; a date is probably a good type of number to use there; a hash is probably a bad choice.
And in order for the livecheck to work, it would have to know what format that unique identifier is in, so we'd have to standardize it, for example to YYYYMMDD as we've used in some other ports already.
More information about the macports-dev
mailing list