From 40f4630b9179376b5b7644c47feb5fa00d053b39 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Wed, 31 May 2017 15:14:50 -0700 Subject: [PATCH] autopackage: avoid timezone issues with git archive Use the "HEAD^{tree}" syntax to indicate a tree-ish object instead of a commit-ish one; this makes git archive use the current time instead of the timestamps from the commit, avoiding issues when the build machine timezone doesn't match the committer's timezone. Change-Id: Ia5033b220b9b86166aa18db5b6850ac97abb5dbc Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/363292 Tested-by: SPDK Automated Test System Reviewed-by: Pawel Wodkowski Reviewed-by: Ben Walker --- autopackage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autopackage.sh b/autopackage.sh index 1c27f8931..35d82a35c 100755 --- a/autopackage.sh +++ b/autopackage.sh @@ -26,7 +26,7 @@ dpdk_pv=dpdk-$(date +%Y_%m_%d) dpdk_tarball=${dpdk_pv}.tar find . -iname "spdk-*.tar* dpdk-*.tar*" -delete -git archive HEAD --prefix=${spdk_pv}/ -o ${spdk_tarball} +git archive HEAD^{tree} --prefix=${spdk_pv}/ -o ${spdk_tarball} # Build from packaged source tmpdir=$(mktemp -d) @@ -35,7 +35,7 @@ tar -C "$tmpdir" -xf $spdk_tarball if [ -z "$WITH_DPDK_DIR" ]; then cd dpdk - git archive HEAD --prefix=dpdk/ -o ../${dpdk_tarball} + git archive HEAD^{tree} --prefix=dpdk/ -o ../${dpdk_tarball} cd .. tar -C "$tmpdir/${spdk_pv}" -xf $dpdk_tarball fi