Make tar archives reproducible by setting Pax headers

Authored by aaronpuchert on Jan 12 2020, 9:19 PM.

Description

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

Details

Committed
aaronpuchertJan 12 2020, 9:22 PM
Reviewer
KDevelop
Differential Revision
D25494: Make tar archives reproducible by setting Pax headers
Parents
R32:381aec18ce77: kdevplatform: remove About data feature
Branches
Unknown
Tags
Unknown