From: Simon Josefsson via Gnulib discussion list <bug-gnulib@gnu.org>
To: Bruno Haible <bruno@clisp.org>
Cc: bug-gnulib@gnu.org
Subject: Re: RFC: git-commit based mtime-reproducible tarballs
Date: Mon, 16 Jan 2023 09:28:45 +0100 [thread overview]
Message-ID: <87cz7edgsi.fsf@josefsson.org> (raw)
In-Reply-To: <5459006.YCjZZlMYnJ@nimes> (Bruno Haible's message of "Sun, 15 Jan 2023 14:21:01 +0100")
[-- Attachment #1: Type: text/plain, Size: 3180 bytes --]
Hi Bruno,
> Hi Simon,
>
>> > This attempts to make
>> > reproducible tarballs by sorting the files and passing the
>> > "--mtime=<date>" option to tar. ...
>> Having the same mtime on all files in a tarball
>
> First question: What is the point of doing that?
Good question, I don't know the motivation for the binutils people. For
me, the motivation would be to get rid of arbitrary/random differences
in non-source artifacts. Those makes auditing non-source for
reproducibility more difficult and error prone, and even a source for
side-channels. I think the exact motivations are still not fully
understood and that this is an evolving space -- articulating the goals
is useful to measure if we will actually meet them.
To me this is similar to including a build timestamp in a binary. In
theory it would not cause any problems for anyone, but in practice it
will be one more source of differences that may hide or complicate
finding other more important differences. Thus from a helicopter
perspective it does make sense to fix that particular non-reproducible
behaviour even though it is difficult to argue that the timestamp by
itself is a serious bug that is important to fix.
> Reproducibility is about verifying that an artifact A was generated
> from a source S.
Right, and I think the proponents of reproducability suggest that an
even stronger verification should be possible: that there is a
one-to-one correspondence between source S and artifact A [for a
particular environment where A is relevant].
If different artifacts A can be generated from the same source S this
will be a source of unreproducability and non-deterministic behaviour,
which ultimately can be a security/safety/reliability problem.
> When I, as a GNU maintainer or uploader, create a tarball and upload it
> to ftp.gnu.org, that tarball is the source S. Because that's what I sign
> with my GPG key. The commits in the git repo aren't the source, and even
> the git checkout on my disk aren't the source — because I am free to
> unpack and repack the tarball as I like, before I upload it to ftp.gnu.org.
Yeah, and I think this is what is being challenged recently -- some
people don't consider tarballs the only relevant source code any more.
To me this makes some sense: we all have tried to fix a small bug in a
package by making changes to some source code, and then see the build
fail catastrophically and sometimes in ways that can't even be resolved
because the necessary tools or source codes were forgotten from the
released tarball.
I think it is good practice to verify that our tarballs can be
regenerated reproducibly from version controlled sources and free tools.
>> 1) Having the same mtime on all files in a tarball may cause problems
>
> Definitely. HP-UX 'make' attempts to rebuilds a file Y that depends on
> a file X, if Y and X have the same timestamp (mtime). It is long known
> that you have to have actually different timestamps for some files.
Interesting -- I wonder if supporting HP-UX [without GNU make] is worth
more than the benefits from reproducible tarballs.
/Simon
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]
prev parent reply other threads:[~2023-01-16 8:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87h6wtgmhy.fsf__22556.7857896507$1673713908$gmane$org@redhat.com>
2023-01-15 11:01 ` RFC: git-commit based mtime-reproducible tarballs Simon Josefsson via Gnulib discussion list
2023-01-15 13:21 ` Bruno Haible
2023-01-15 16:03 ` Paul Eggert
2023-01-15 22:25 ` Bruno Haible
2023-01-16 8:40 ` Simon Josefsson via Gnulib discussion list
2023-01-16 8:51 ` Jim Meyering
2023-01-16 9:45 ` Vivien Kraus
2023-01-16 11:48 ` Bruno Haible
2023-01-16 23:00 ` Simon Josefsson via Gnulib discussion list
2023-01-16 8:28 ` Simon Josefsson via Gnulib discussion list [this message]
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
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87cz7edgsi.fsf@josefsson.org \
--to=bug-gnulib@gnu.org \
--cc=bruno@clisp.org \
--cc=simon@josefsson.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).