From e25a2b6fc5b01e8ab73b43566af6ea2257860b4a Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 20 Jun 2022 11:52:00 +0200 Subject: [PATCH] abuild: use timestamp of APKBUILD if not in git we normally use the last git commit timestamp for creating reproducible builds. Fall back to APKBUILD timestamp if there are no git commits. --- abuild.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abuild.in b/abuild.in index 7e3dfd0..7aa7825 100755 --- a/abuild.in +++ b/abuild.in @@ -120,7 +120,7 @@ set_source_date() { SOURCE_DATE_EPOCH=$(git_last_commit_epoch $ABUILD_LAST_COMMIT) fi if [ -z "$SOURCE_DATE_EPOCH" ]; then - SOURCE_DATE_EPOCH=$(date -u "+%s") + SOURCE_DATE_EPOCH=$(stat -c "%Y" "$APKBUILD") fi export SOURCE_DATE_EPOCH }