From 00ef8b90e696b7a518a45886d0db57d8c640d12d Mon Sep 17 00:00:00 2001 From: Jose Bigio Date: Thu, 6 Sep 2018 11:33:33 -0700 Subject: [PATCH] Call the engine-.tar target Also cleans up the target in rpm and deb Makfiles because the tar target already output a tar. Signed-off-by: Jose Bigio (cherry picked from commit 8a4744f48aa13bea0b4e9174165be4add0a5a42f) Signed-off-by: Jose Bigio Upstream-commit: 8e4a92dc667e2143b6d5707e19c5564b7da46ba1 Component: packaging --- components/packaging/deb/Makefile | 6 +++--- components/packaging/image/Makefile | 2 +- components/packaging/rpm/Makefile | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/packaging/deb/Makefile b/components/packaging/deb/Makefile index fd4b049598..9e0c2d4e10 100644 --- a/components/packaging/deb/Makefile +++ b/components/packaging/deb/Makefile @@ -157,6 +157,6 @@ sources/dockerd.json: ../common/dockerd.json $< > $@ # offline bundle -sources/engine.tar: $(DOCKER2OCI) - $(MAKE) -C ../image ENGINE_IMAGE=$(ENGINE_IMAGE) ENGINE_SCOPE=$(ENGINE_SCOPE) engine-$(ARCH) - tar c -C ../engine-$(ARCH) . > $@ +sources/engine.tar: + $(MAKE) -C ../image ENGINE_IMAGE=$(ENGINE_IMAGE) ENGINE_SCOPE=$(ENGINE_SCOPE) engine-$(ARCH).tar + mv ../image/engine-$(ARCH).tar $@ diff --git a/components/packaging/image/Makefile b/components/packaging/image/Makefile index 71ffa63864..2f5b2f825b 100644 --- a/components/packaging/image/Makefile +++ b/components/packaging/image/Makefile @@ -46,7 +46,7 @@ image-linux: $(ENGINE_DIR)/Dockerfile.engine DOCKER2OCI=artifacts/docker2oci $(DOCKER2OCI): -$(CHOWN) -R $(shell id -u):$(shell id -g) $(@D) - docker run --name docker2oci $(GO_IMAGE) sh -c 'go get github.com/coolljt0725/docker2oci' + docker run --name docker2oci $(ENGINE_GO_IMAGE) sh -c 'go get github.com/coolljt0725/docker2oci' mkdir -p $(@D) docker cp docker2oci:/go/bin/docker2oci "$@" docker rm -f docker2oci diff --git a/components/packaging/rpm/Makefile b/components/packaging/rpm/Makefile index bcd07fa53f..e9b44ec8b3 100644 --- a/components/packaging/rpm/Makefile +++ b/components/packaging/rpm/Makefile @@ -124,6 +124,6 @@ rpmbuild/SOURCES/dockerd.json: ../common/dockerd.json $< > $@ # offline bundle -rpmbuild/SOURCES/engine.tar: $(DOCKER2OCI) - $(MAKE) -C ../image ENGINE_IMAGE=$(ENGINE_IMAGE) ENGINE_SCOPE=$(ENGINE_SCOPE) engine-$(ARCH) - tar c -C ../image/engine-$(ARCH) . > $@ +rpmbuild/SOURCES/engine.tar: + $(MAKE) -C ../image ENGINE_IMAGE=$(ENGINE_IMAGE) ENGINE_SCOPE=$(ENGINE_SCOPE) engine-$(ARCH).tar + mv ../image/engine-$(ARCH).tar $@