From 0bd7f620ff0b45b1541bdebf35a34d69ce64952a Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Tue, 17 Jan 2017 13:48:26 +0000 Subject: [PATCH] Do not use tar to make hashes As it includes timestanps in the tarball it does not make a stable hash; use contents of the files instead. Signed-off-by: Justin Cormack --- alpine/base/binfmt/Makefile | 2 +- alpine/base/rngd/Makefile | 2 +- alpine/containers/binfmt/Makefile | 4 ++-- alpine/containers/rng-tools/Makefile | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/alpine/base/binfmt/Makefile b/alpine/base/binfmt/Makefile index 1228cbafb..40267dafe 100644 --- a/alpine/base/binfmt/Makefile +++ b/alpine/base/binfmt/Makefile @@ -33,7 +33,7 @@ container: Dockerfile $(DEPS) tar cf - $^ | docker build --no-cache -t $(IMAGE):build - hash: Dockerfile $(DEPS) - tar cf - $^ | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash + find $^ -type f | xargs cat | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash push: hash container docker pull mobylinux/$(IMAGE):$(shell cat hash) || \ diff --git a/alpine/base/rngd/Makefile b/alpine/base/rngd/Makefile index 55ce72f31..b25e58bb9 100644 --- a/alpine/base/rngd/Makefile +++ b/alpine/base/rngd/Makefile @@ -32,7 +32,7 @@ container: Dockerfile $(DEPS) tar cf - $^ | docker build --no-cache -t $(IMAGE):build - hash: Dockerfile $(DEPS) - tar cf - $^ | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash + find $^ -type f | xargs cat | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash push: hash container docker pull mobylinux/$(IMAGE):$(shell cat hash) || \ diff --git a/alpine/containers/binfmt/Makefile b/alpine/containers/binfmt/Makefile index 126b8115e..278fddb74 100644 --- a/alpine/containers/binfmt/Makefile +++ b/alpine/containers/binfmt/Makefile @@ -1,5 +1,5 @@ -# Tag: 6571d9d0c5c2592848f4f0202d1cd2c4466d9979 -BINFMT_IMAGE=mobylinux/binfmt@sha256:6810b978316198cf4c507b901cfb676acd655955c380d2c98f23f7232ea6381f +# Tag: 8c52d6a837be80b4e0535b5d9e693b604e970f7d +BINFMT_IMAGE=mobylinux/binfmt@sha256:4f1d647bfdd46cf015f7c7b161687fe9557647b4542245d45f714774446730ed default: config.json diff --git a/alpine/containers/rng-tools/Makefile b/alpine/containers/rng-tools/Makefile index faf7d7a6c..e8c290b52 100644 --- a/alpine/containers/rng-tools/Makefile +++ b/alpine/containers/rng-tools/Makefile @@ -1,5 +1,5 @@ -# Tag: 6fb2e0bd1844349222ad57af92b5c627fd73375a -RNGD_IMAGE=mobylinux/rngd@sha256:8370ecd6f5d2092b27b40c2dabe25a2cbeb6469dd6e973c27a5152af6ab8d12a +# Tag: 3dad6dd43270fa632ac031e99d1947f20b22eec9 +RNGD_IMAGE=mobylinux/rngd@sha256:1c93c1db7196f6f71f8e300bc1d15f0376dd18e8891c8789d77c8ff19f3a9a92 default: config.json