git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Commit SHA1 == SHA1 checksum?

From
Philip Oakley <philipoakley@iee.email>
Date
Feb 6, 2022, 21:33 UTC
Message-ID
<13f21a57-1519-5ace-30e8-def598fad38b@iee.email>
In-Reply-To
<xmqqee4fix0l.fsf@gitster.g>
On 06/02/2022 20:02, Junio C Hamano wrote:
Show 33 quoted lines
> Philip Oakley <philipoakley@iee.email> writes:
>
>> I think part of Todd's question was how the tag and uncompressed archive
>> 'checksums' (e.g. hashes) relate to each other and where those
>> guarantees come from.
> There is no such linkage, and there are no guarantees.  The trust
> you may or may not have on the PGP key that signs the tag and the
> checksums of the tarball is the only source of such assurance.
>
> More importantly, I do not think there can be any such linkage
> between the Git tree and release tarball for a few fundamental
> reasons:
>
>  * We add generated files to "git archive" output when creating the
>    release tarball for builder's convenience, so if you did
>
>        rm -fr temp && git init temp
>        tar Cxf temp git-$VERSION.tar
>        git -C temp add . && git -C temp write-tree
>
>    the tree object name that you get out of the last step will not
>    match the tree object of the version from my archive (interested
>    parties can study "make dist" for more details).
>
>  * Even if we did not add any files to "git archive" output when
>    creating a release tarball, a tarball that contains all the
>    directories and files from a given git revision is *NOT* unique.
>    We do not add randomness to the "git archive" output, just to
>    make them unstable, but we have made fixes and improvements to
>    the archive generation logic in the past, and we do reserve the
>    rights to do so in the future.  And it is not just limited to
>    "git archive" binary, but how it is driven, e.g. "tar.umask"
>    settings can affect the mode bits.
Thanks for the clarification.

Thus what trust their is, is via the two PGP signatures, rather than directly between the tarball and the git repo. -- Philip

Previous: Junio C HamanoNext: Gamblin, Todd
Message 8 of 19 in “Commit SHA1 == SHA1 checksum?”
  1. Gamblin, ToddFeb 5, 2022
  2. Philip OakleyFeb 6, 2022
  3. Gamblin, ToddFeb 6, 2022
  4. Johannes SixtFeb 6, 2022
  5. Junio C HamanoFeb 6, 2022
  6. Philip OakleyFeb 6, 2022
  7. Junio C HamanoFeb 6, 2022
  8. Philip OakleyFeb 6, 2022
  9. Gamblin, ToddFeb 7, 2022
  10. Konstantin RyabitsevFeb 7, 2022
  11. Gamblin, ToddFeb 7, 2022
  12. Konstantin RyabitsevFeb 7, 2022
  13. Junio C HamanoFeb 7, 2022
  14. Konstantin RyabitsevFeb 7, 2022
  15. Gamblin, ToddFeb 7, 2022
  16. Konstantin RyabitsevFeb 7, 2022
  17. Gamblin, ToddFeb 8, 2022
  18. Junio C HamanoFeb 7, 2022
  19. Konstantin RyabitsevFeb 7, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.