Skip to content

ENT-14061: Make the source and package tarballs reproducible#3166

Draft
larsewi wants to merge 1 commit into
cfengine:masterfrom
larsewi:reproducible-tar-package
Draft

ENT-14061: Make the source and package tarballs reproducible#3166
larsewi wants to merge 1 commit into
cfengine:masterfrom
larsewi:reproducible-tar-package

Conversation

@larsewi
Copy link
Copy Markdown
Contributor

@larsewi larsewi commented May 28, 2026

This makes both the make dist source tarball and the make tar-package package tarball reproducible:

  • Add --sort=name to the exported TAR_OPTIONS so $(am__tar) emits members in a stable order for both recipes.
  • In dist-hook, normalize directory permissions to 755 and, when SOURCE_DATE_EPOCH is set, clamp every mtime to it.
  • In tar-package, clamp staged file mtimes to SOURCE_DATE_EPOCH and pass -n to gzip so the gzip header carries no timestamp.

Ticket: ENT-14061
Together: cfengine/buildscripts#2271

@larsewi
Copy link
Copy Markdown
Contributor Author

larsewi commented May 28, 2026

@cf-bottom Jenkins please :)

@larsewi larsewi added the cherry-pick? Fixes which may need to be cherry-picked to LTS branches label May 28, 2026
@cfengine cfengine deleted a comment from cf-bottom May 28, 2026
* Add --sort=name to the exported TAR_OPTIONS so $(am__tar) emits
  members in a stable order for both "make dist" and "make tar-package".
* In dist-hook, normalize directory permissions to 755 and, when
  SOURCE_DATE_EPOCH is set, clamp every mtime to it.
* In tar-package, clamp staged file mtimes to SOURCE_DATE_EPOCH and pass
  -n to gzip so the gzip header carries no timestamp.

Ticket: ENT-14061
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
@larsewi larsewi force-pushed the reproducible-tar-package branch from a549186 to 6437978 Compare May 29, 2026 09:50
@larsewi larsewi changed the title ENT-14061: Make tar-package reproducible via SOURCE_DATE_EPOCH ENT-14061: Make the source and package tarballs reproducible May 29, 2026
@cfengine cfengine deleted a comment from cf-bottom May 29, 2026
@cfengine cfengine deleted a comment from cf-bottom May 29, 2026
@cfengine cfengine deleted a comment from cf-bottom May 29, 2026
@cf-bottom
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick? Fixes which may need to be cherry-picked to LTS branches

Development

Successfully merging this pull request may close these issues.

2 participants