On Apr 22, 2012, at 19:27, Craig Treleaven wrote:
> At 4:43 PM -0500 4/22/12, Ryan Schmidt wrote:
>> On Apr 22, 2012, at 16:35, Joshua Root wrote:
>> 
>>> Do your two input files also have identical timestamps?
>> 
>> Ah, you're right, they did not. Now I get the same sums, if both files have 
>> not only the same name but also the same timestamp.
>> 
>> So I guess what a service like bitbucket would have to do when it generates 
>> a tarball is to set its timestamp to the timestamp of the requested revision 
>> before gzipping it.
>> 
> 
> Regarding timestamps, the man for git archive says:
> 
>       git archive behaves differently when given a tree ID versus when given 
> a commit ID or tag ID. In the first case the current time is used as the 
> modification time of each file in the archive. In the latter case the commit 
> time as recorded in the referenced commit object is used instead. 
> Additionally the commit ID is stored in a global extended pax header if the 
> tar format is used; it can be extracted using git get-tar-commit-id. In ZIP 
> files it is stored as a file comment.
> 
> So archiving a tree at different times would give different timestamps.  
> Archiving a commit always gets the same timestamp.

The specifics of the "git archive" command aren't relevant here. There are two 
possibilities that MacPorts offers for a port to fetch the source it needs:

1. from a distfile
2. from a version control system

Fetching from a version control system should only be done as a last resort, 
since we cannot set checksums to verify the downloads, cannot mirror the 
downloads on our network of servers, and every time the user reinstalls a port 
the source is fetched again instead of being cached locally on their computer.

So we always want to look for ways of being able to fetch from a distfile 
instead of fetching from a vcs.

In this thread we're exploring among other things whether we can make the 
github portgroup (and a hypothetical bitbucket portgroup) fetch from a distfile 
even in the case of an arbitrary commit. I concluded that for github we can. We 
may be able to for bitbucket as well; it may require some changes to the 
bitbucket infrastructure by their administrators, or perhaps they've already 
made those changes since last we checked.

In the event that we are not able to get bitbucket into a suitable state to 
have its auto-generated tarballs usable by MacPorts, or in the case of hosting 
systems like sourceforge, googlecode, etc. that do not offer tarball downloads 
for an arbitrary commit, ideally the port author would create a tarball and 
upload it to our distfiles mirror, and make the port fetch that instead. If the 
vcs is git, then perhaps this "git archive" command you mention would be an 
easy way to create that, but that's outside the scope of what's being discussed 
in this thread.


_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to