summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergii Golovatiuk <sgolovatiuk@mirantis.com>2016-06-06 17:56:28 +0200
committerSergii Golovatiuk <sgolovatiuk@mirantis.com>2016-06-06 17:56:28 +0200
commit33af46be827919cd6e20dd8a7b8b86ffb00ce144 (patch)
tree641c1283c414d3a3729fc59d9b4a0b483724559d
parent108b66bc2c49314f3eecdb3f4b38159ee6d0c26a (diff)
Minor changes to run 'make iso' on xenial host.
- Running chroot without 'sh -c' doesn't set environment variables. This patch wraps command in 'sh -c' - add force to mv command as xenial is more strict for changing permissions Change-Id: I83122397c2a8c457abb9687909352179831a46f3 Implements: mos-xenial
Notes
Notes (review): Code-Review+1: Maksim Malchuk <mmalchuk@mirantis.com> Code-Review+1: Dmitry Teselkin <dteselkin@mirantis.com> Code-Review+2: Vladimir Kozhukalov <vkozhukalov@mirantis.com> Workflow+1: Vladimir Kozhukalov <vkozhukalov@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 20 Jun 2016 15:24:09 +0000 Reviewed-on: https://review.openstack.org/326014 Project: openstack/fuel-main Branch: refs/heads/master
-rw-r--r--packages/rpm/module.mk10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/rpm/module.mk b/packages/rpm/module.mk
index b235f1d..fc71d88 100644
--- a/packages/rpm/module.mk
+++ b/packages/rpm/module.mk
@@ -17,11 +17,11 @@ $(BUILD_DIR)/packages/rpm/buildd.tar.gz: SANDBOX:=$(BUILD_DIR)/packages/rpm/SAND
17$(BUILD_DIR)/packages/rpm/buildd.tar.gz: export SANDBOX_UP:=$(SANDBOX_UP) 17$(BUILD_DIR)/packages/rpm/buildd.tar.gz: export SANDBOX_UP:=$(SANDBOX_UP)
18$(BUILD_DIR)/packages/rpm/buildd.tar.gz: export SANDBOX_DOWN:=$(SANDBOX_DOWN) 18$(BUILD_DIR)/packages/rpm/buildd.tar.gz: export SANDBOX_DOWN:=$(SANDBOX_DOWN)
19$(BUILD_DIR)/packages/rpm/buildd.tar.gz: $(BUILD_DIR)/mirror/centos/repo.done \ 19$(BUILD_DIR)/packages/rpm/buildd.tar.gz: $(BUILD_DIR)/mirror/centos/repo.done \
20 $(BUILD_DIR)/mirror/centos/mos-repo.done 20$(BUILD_DIR)/mirror/centos/mos-repo.done
21 sh -c "$${SANDBOX_UP}" 21 sh -c "$${SANDBOX_UP}"
22 sh -c "$${SANDBOX_DOWN}" 22 sh -c "$${SANDBOX_DOWN}"
23 sudo tar czf $@.tmp -C $(SANDBOX) . 23 sudo tar czf $@.tmp -C $(SANDBOX) .
24 mv $@.tmp $@ 24 mv -f $@.tmp $@
25 25
26 26
27# Usage: 27# Usage:
@@ -60,10 +60,10 @@ $(BUILD_DIR)/packages/rpm/$1.done:
60 sudo cp -r $(BUILD_DIR)/packages/sources/$1/* $$(SANDBOX)/tmp/SOURCES 60 sudo cp -r $(BUILD_DIR)/packages/sources/$1/* $$(SANDBOX)/tmp/SOURCES
61 -test -f $(BUILD_DIR)/packages/sources/$1/changelog && cat $(BUILD_DIR)/packages/sources/$1/changelog >> $$(SPECFILE) 61 -test -f $(BUILD_DIR)/packages/sources/$1/changelog && cat $(BUILD_DIR)/packages/sources/$1/changelog >> $$(SPECFILE)
62 sudo cp $$(SPECFILE) $$(SANDBOX)/tmp && \ 62 sudo cp $$(SPECFILE) $$(SANDBOX)/tmp && \
63 sudo chroot $$(SANDBOX) yum-builddep -y /tmp/$1.spec 63 sudo chroot $$(SANDBOX) sh -c 'yum-builddep -y /tmp/$1.spec'
64 test -f $$(SANDBOX)/tmp/SOURCES/version && \ 64 test -f $$(SANDBOX)/tmp/SOURCES/version && \
65 sudo chroot $$(SANDBOX) rpmbuild --nodeps --define "_topdir /tmp" --define "release `awk -F'=' '/RPMRELEASE/ {print $$$$2}' $$(SANDBOX)/tmp/SOURCES/version`" -ba /tmp/$1.spec || \ 65 sudo chroot $$(SANDBOX) sh -c 'rpmbuild --nodeps --define "_topdir /tmp" --define "release `awk -F"=" "/RPMRELEASE/ {print $$$$2}" $$(SANDBOX)/tmp/SOURCES/version`" -ba /tmp/$1.spec' || \
66 sudo chroot $$(SANDBOX) rpmbuild --nodeps --define "_topdir /tmp" -ba /tmp/$1.spec 66 sudo chroot $$(SANDBOX) sh -c 'rpmbuild --nodeps --define "_topdir /tmp" -ba /tmp/$1.spec'
67 cp $$(SANDBOX)/tmp/RPMS/*/*.rpm $(BUILD_DIR)/packages/rpm/RPMS/x86_64 67 cp $$(SANDBOX)/tmp/RPMS/*/*.rpm $(BUILD_DIR)/packages/rpm/RPMS/x86_64
68 sudo sh -c "$$$${SANDBOX_DOWN}" 68 sudo sh -c "$$$${SANDBOX_DOWN}"
69 $$(ACTION.TOUCH) 69 $$(ACTION.TOUCH)