Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: Serialize tarballs reproducibly #588

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

cgwalters
Copy link
Collaborator

This ensures that when we rerun the container build without changing the source, we get the same thing. Which then further ensures we don't invalidate any cached disk images, etc.

@@ -1,5 +1,9 @@
prefix ?= /usr

SOURCE_DATE_EPOCH ?= $(shell git log -1 --pretty=%ct)
# https://reproducible-builds.org/docs/archives/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

This was a good read, I especially like this bit, given our recent discussions:

Care must be taken to ensure that sort is called in the context of the C locale to avoid any surprises related to collation order.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right; the doc mentions that GNU tar's --sort=name is always locale insensitive.

This ensures that when we rerun the container build without
changing the source, we get the same thing.  Which then
further ensures we don't invalidate any cached disk images,
etc.

Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters
Copy link
Collaborator Author

Test was a generic timeout issue.

@cgwalters cgwalters merged commit 6d3c89d into containers:main Jun 6, 2024
11 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants