Git development
 help / color / mirror / Atom feed
From: "Theodore Tso" <tytso@mit.edu>
To: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Simon Richter <Simon.Richter@hogyros.de>,
	git <git@vger.kernel.org>,
	Ian Jackson <ijackson@chiark.greenend.org.uk>
Subject: Re: Git generated tarballs and Debian
Date: Tue, 28 Apr 2026 07:50:17 -0400	[thread overview]
Message-ID: <20260428115017.GA71700@macsyma-wired.lan> (raw)
In-Reply-To: <afCLFJX86yEPKKfk@fruit.crustytoothpaste.net>

On Tue, Apr 28, 2026 at 10:25:24AM +0000, brian m. carlson wrote:
> 
> I'll just note that we don't make any guarantees that `git archive`
> produces identical output across versions.  Incorrectly making that
> assumption broke kernel.org when we changed the format in the past.
> 
> Also, if you use `export-subst`, then it's possible to emit short object
> IDs, which can differ in length depending on how many objects are in the
> repository.  It's also possible to use zlib or pigz instead of gzip to
> produce tarballs, in which case the compressed data will also differ.

This is what I've been using to try get reproducible tarballs for
e2fprogs:

git archive --prefix=e2fsprogs-${ver}/ ${commit} | gzip -9n > $fn

,,, where $commit is a signed git tag.

I know that in the past, using --format=tgz has broken based on
different compression parameters used by git (and whether it used an
external or internal compressor).  I also know that if $commit is a
tree-id, this can result in the timestamps being not reproduible.  I
also don't use export-subst.

There is also the difference in the prefix used by github and gitlab,
but that's arguably not git's fault.

What other gotchas are there?  How is this likely to be inconsistent
in the future?  How much work is there to provide that guarantee in
the future?

   	    	    	 	      	  - Ted

P.S.  Although I use pristine-tar in Debian because I didn't want to
count on git-archive being reproducible.  But it would be lovely if I
could make that guarantee starting on a particular git version.

  parent reply	other threads:[~2026-04-28 11:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-28  8:40 Git generated tarballs and Debian Simon Richter
2026-04-28 10:25 ` brian m. carlson
2026-04-28 11:32   ` Simon Richter
2026-04-28 11:50   ` Theodore Tso [this message]
2026-04-28 21:20     ` brian m. carlson
2026-04-29  7:30     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260428115017.GA71700@macsyma-wired.lan \
    --to=tytso@mit.edu \
    --cc=Simon.Richter@hogyros.de \
    --cc=git@vger.kernel.org \
    --cc=ijackson@chiark.greenend.org.uk \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox