void-linux / void-linux/void-packages

Rewrite mtime of files in packages to the distfile's mtime

Open
#40,963 2 comments 0 reactions 1 assignee View on GitHub

@paper42 is already working on this.

Since Mar 13, 2023.

enhancement xbps-src
Dominant language
Shell
Stars
3.4k
Forks
2.8k
Avg merge
2d 5h
Merged PRs (30d)
299

Description

Previously in 2016, mtime was always set to the date of the last commit in the package: 16050ad3f292306b0421ee6133b174db3f1b227d
Then in 2018 this mtime was changed to always be set to the date of HEAD because getting the time of the last package change from history was taking too long: a4a229cf6428ecca04d50369d010e028414590e5

This approach doesn't really work well for reproducibility because when HEAD moves, even that commit is unrelated, the whole package gets different timestamps which results in a seemingly random difference when someone merged an old commit to master. This way the mtime can also go backwards on user's systems which can be confusing.

I propose to change this mtime to the mtime of the first distfile and encourage packagers to make sure the first distfile is from the main project if there is more than one. That way the files in the resulting package have a predictable mtime that is also the date of the upstream release.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.