Skip to content
Commit 25e78ffa authored by Aaron Puchert's avatar Aaron Puchert
Browse files

Make tar archives reproducible by setting Pax headers

Summary:
When POSIXLY_CORRECT is set, GNU tar will add ctime, atime and the PID
of the tar process that created the archive, as pointed out in [1].
To circumvent this, we set the Pax headers manually as recommended, but
we only do this when SOURCE_DATE_EPOCH is set, i.e. reproducible builds
are desired.

[1] https://salsa.debian.org/reproducible-builds/reproducible-website/merge_requests/50/diffs

Test Plan:
Repeated builds produce the same files now. Changing the input files'
timestamps seems without effect.

Reviewers: kfunk, #kdevelop, kossebau

Reviewed By: #kdevelop, kossebau

Differential Revision: https://phabricator.kde.org/D25494
parent 381aec18
Pipeline #13157 passed with stage
in 48 minutes and 14 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment