summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-11-26 18:41:32 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-11-26 18:41:32 +0000
commit80a2e6f8cf710c5db6f5310ed7c5e74dcc885ee2 (patch)
treef8a930fe2c9629b830b081a245726c2d59750a9f
parent918b7b19206927b416bcc13bcb80a8f7d2c78c41 (diff)
downloadabuild-80a2e6f8cf710c5db6f5310ed7c5e74dcc885ee2.tar.bz2
abuild-80a2e6f8cf710c5db6f5310ed7c5e74dcc885ee2.tar.xz
abuild: set SOURCE_DATE_EPOCH from rootpkg
-rw-r--r--abuild.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index 29a87c6..141cc54 100644
--- a/abuild.in
+++ b/abuild.in
@@ -106,7 +106,9 @@ want_check() {
set_source_date() {
# set time stamp for reproducible builds
- export ABUILD_LAST_COMMIT="$(git_last_commit)$(git_dirty)"
+ if [ -z "$ABUILD_LAST_COMMIT" ]; then
+ export ABUILD_LAST_COMMIT="$(git_last_commit)$(git_dirty)"
+ fi
if [ -z "$SOURCE_DATE_EPOCH" ] && [ "${ABUILD_LAST_COMMIT%-dirty}" = "$ABUILD_LAST_COMMIT" ]; then
SOURCE_DATE_EPOCH=$(git_last_commit_epoch $ABUILD_LAST_COMMIT)
fi
@@ -1898,6 +1900,7 @@ check_fakeroot() {
rootpkg() {
cd "$startdir"
rm -rf "$pkgdir"
+ set_source_date
[ -n "$FAKEROOT" ] && msg "Entering fakeroot..."
do_fakeroot "$abuild_path" $forceroot $color_opt $keep_build \