makepkg: Unify source time for reproducible source tarballs
This commit is contained in:
parent
ea79eac19f
commit
af68f192af
1 changed files with 9 additions and 0 deletions
|
@ -683,6 +683,9 @@ create_srcpackage() {
|
|||
if [[ "$file" = "$(get_filename "$file")" ]] || (( SOURCEONLY == 2 )); then
|
||||
local absfile
|
||||
absfile=$(get_filepath "$file") || missing_source_file "$file"
|
||||
if (( REPRODUCIBLE )); then
|
||||
touch -d @$SOURCE_DATE_EPOCH "$absfile"
|
||||
fi
|
||||
msg2 "$(gettext "Adding %s...")" "${absfile##*/}"
|
||||
ln -s "$absfile" "$srclinks/$pkgbase"
|
||||
fi
|
||||
|
@ -724,6 +727,12 @@ create_srcpackage() {
|
|||
local fullver=$(get_full_version)
|
||||
local pkg_file="$SRCPKGDEST/${pkgbase}-${fullver}${SRCEXT}"
|
||||
|
||||
if (( REPRODUCIBLE )); then
|
||||
# We have activated reproducible builds, so unify source times before
|
||||
# building
|
||||
find "${srclinks}/${pkgbase}" -exec touch -h -d @$SOURCE_DATE_EPOCH {} +
|
||||
fi
|
||||
|
||||
# tar it up
|
||||
msg2 "$(gettext "Compressing source package...")"
|
||||
cd_safe "${srclinks}"
|
||||
|
|
Loading…
Add table
Reference in a new issue