Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Aug 28, 2025

Commit e435bc6 introduced behavior in creating the source-dist archive that sets the file modification time to the same time as the most recent git commit. This facilitates reproducible builds, but it also has an issue. The code sets TZ=, which means that on systems running in time zones which aren't UTC, the modification time may be in the future (or past). It depends on the system's behavior.

Up until recently, this only resulted in GNU make printing warnings about modification times being in the future. However, with recent changes in how escripts are built, this results in an "infinite make loop" that is described in #14440 and #14443

This solution is to set the TZ=UTC when calculating the time of the most recent git commit, as well as when using touch -t to set the file modification times.

Fixes #14440, #14443


This is an automatic backport of pull request #14444 done by Mergify.

Commit e435bc6 introduced behavior in
creating the source-dist archive that sets the file modification time to
the same time as the most recent `git` commit. This facilitates
reproducible builds, but it also has an issue. The code sets `TZ=`,
which means that on systems running in time zones which aren't UTC, the
modification time may be in the future (or past). It depends on the
system's behavior.

Up until recently, this only resulted in GNU make printing warnings
about modification times being in the future. However, with recent
changes in how escripts are built, this results in an "infinite make
loop" that is described in #14440
and https://github.com/rabbitmq/rabbitmq-server/discussions/14443

This solution is to set the `TZ=UTC` when calculating the time of the
most recent `git` commit, as well as when using `touch -t` to set the
file modification times.

Fixes #14440, #14443

(cherry picked from commit 993322f)
@mergify mergify bot added the make label Aug 28, 2025
@michaelklishin michaelklishin added this to the 4.1.5 milestone Aug 28, 2025
@michaelklishin michaelklishin changed the title Ensure that file modified time is set correctly (backport #14444) For 4.1.5: Ensure that file modified time is set correctly (backport #14444) Aug 28, 2025
@michaelklishin michaelklishin merged commit 1a11579 into v4.1.x Sep 2, 2025
273 of 274 checks passed
@michaelklishin michaelklishin deleted the mergify/bp/v4.1.x/pr-14444 branch September 2, 2025 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants