From 27cef44af759bbc265391c6ce81106054e4075df Mon Sep 17 00:00:00 2001 From: shirong Date: Tue, 21 Jul 2020 13:23:07 +0000 Subject: [PATCH] rune && shim: Fix make rpm command 1. Copy rpm package in temporary directory to top directory 2. Remove temporary directory Signed-off-by: shirong --- .gitignore | 1 + rune/dist/Makefile | 5 ++++- shim/dist/Makefile | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8b4b864..f971d20 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ build/ _output/ shim/bin/ shim/.idea/ +*.rpm diff --git a/rune/dist/Makefile b/rune/dist/Makefile index 70bb07f..375bb78 100644 --- a/rune/dist/Makefile +++ b/rune/dist/Makefile @@ -1,3 +1,4 @@ +PROJECT_DIR := $(shell cd ../..; pwd) RPMBUILD_DIR := $(shell mktemp -u /tmp/rpmbuild.XXXX) RELEASE_TARBALL_URL := https://github.com/alibaba/inclavare-containers/archive/v$(INCLAVARE_CONTAINERS_VERSION).tar.gz RELEASE_TARBALL_FILE := $(RPMBUILD_DIR)/SOURCES/v$(INCLAVARE_CONTAINERS_VERSION).tar.gz @@ -11,6 +12,8 @@ endif rpm: release-tarball @rpmbuild -D "_topdir $(RPMBUILD_DIR)" -ba centos/rune.spec - @echo "the rpms of rune located in $(RPMBUILD_DIR)/RPMS" + @cp $(RPMBUILD_DIR)/RPMS/x86_64/*.rpm $(PROJECT_DIR) + @rm -rf $(RPMBUILD_DIR) + @echo "the rpms of rune located in $(PROJECT_DIR)" .PHONY: release-tarball rpm diff --git a/shim/dist/Makefile b/shim/dist/Makefile index 2e6ea9a..4d7401b 100644 --- a/shim/dist/Makefile +++ b/shim/dist/Makefile @@ -1,4 +1,5 @@ # Variables for building rpm +PROJECT_DIR := $(shell cd ../..; pwd) RPMBUILD_DIR := $(shell mktemp -u /tmp/rpmbuild.XXXX) RELEASE_TARBALL_URL := https://github.com/alibaba/inclavare-containers/archive/v$(INCLAVARE_CONTAINERS_VERSION).tar.gz RELEASE_TARBALL_FILE := $(RPMBUILD_DIR)/SOURCES/v$(INCLAVARE_CONTAINERS_VERSION).tar.gz @@ -12,6 +13,8 @@ endif rpm: release-tarball @rpmbuild -D "_topdir $(RPMBUILD_DIR)" -ba centos/shim-rune.spec - @echo "the rpms of shim-rune located in $(RPMBUILD_DIR)/RPMS" + @cp $(RPMBUILD_DIR)/RPMS/x86_64/*.rpm $(PROJECT_DIR) + @rm -rf $(RPMBUILD_DIR) + @echo "the rpms of shim-rune located in $(PROJECT_DIR)" .PHONY: release-tarball rpm -- GitLab