Fixes for make_ext4fs / mkfs.ext4(mke2fs)
Alex Zakharov
uglym8 at gmail.com
Tue Oct 17 13:33:29 UTC 2023
Hey Roland and list,
> Would you need to clamp the timestamps, to ensure that that maximum will
> be at most E2FSPROGS_FAKE_TIME? That way, the older timestamps of the
> files could be preserved.
I am not sure about explicit timestamp clamping (i.e. guarantee that no
timestamp could be newer that provided fixed timestamp) happening there but
one can argue that if the FS creation is reproducible it means that we have
implicit time clamping (i.e. fixed timestamps). Though, in theory, it's
still possible to have something like this in the code:
some_timestamp = input_fixed_timestamp + 1;
but IMHO it's highly unlikely.
Beg your pardon, if I got the timestamp clamping idea wrong.
For my use case what I really care about here is the reproducibility and
nothing else so I might not be the best person to discuss this matter with.
> I was wondering why the environment variable is called
> E2FSPROGS_FAKE_TIME instead of SOURCE_DATE_EPOCH.
> (SOURCE_DATE_EPOCH is used in util/gen-tarball.in, so it's not unknown
> to the project)
Good question.
I think we can ask the author of
https://github.com/tytso/e2fsprogs/commit/e1f7100643a46456be107b33098f6034b0835e6d
Meanwhile what I can also suggest is to add the retrieval of the
SOURCE_DATE_EPOCH from the environment but still allow it to be overwritten
with the contents of E2FSPROGS_FAKE_TIME (in order not to break the
existing code that might depend on this env var to be present and used).
Best,
Alex.
On Mon, Oct 16, 2023 at 6:03 PM Roland Clobus <rclobus at rclobus.nl> wrote:
> Hello Alex, list,
>
> On 16/10/2023 13:03, Alex Zakharov wrote:
> > I think we can mention (after verification, see below please) that now
> > we can also use mkfs.ext4 (mke2fs)
> > https://github.com/tytso/e2fsprogs/pull/164
>
> Would you need to clamp the timestamps, to ensure that that maximum will
> be at most E2FSPROGS_FAKE_TIME? That way, the older timestamps of the
> files could be preserved.
>
> I was wondering why the environment variable is called
> E2FSPROGS_FAKE_TIME instead of SOURCE_DATE_EPOCH.
> (SOURCE_DATE_EPOCH is used in util/gen-tarball.in, so it's not unknown
> to the project)
>
> With kind regards,
> Roland Clobus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-general/attachments/20231017/a8a1fa05/attachment.htm>
More information about the rb-general
mailing list