Commit 40f4630b authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Ben Walker
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/363292


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarPawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 108c00bd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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