vagrant/Makefile: drop sudo and depend on buildimg

Closes: #394
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon 2016-07-15 13:37:01 -04:00 committed by Atomic Bot
parent 52b325970d
commit 40a44a561c

View File

@ -1,7 +1,7 @@
all: all:
echo "Targets: buildimg build install ofsinstall check clean" echo "Targets: buildimg build install ofsinstall check clean"
BUILDER_ARGS = sudo /usr/bin/docker run --rm -ti --privileged -v /var/roothome:/root BUILDER_ARGS = /usr/bin/docker run --rm --privileged -v /var/roothome:/root
BUILDER_IMG = rpm-ostree-builder BUILDER_IMG = rpm-ostree-builder
BUILDER_RUN = $(BUILDER_ARGS) $(BUILDER_IMG) BUILDER_RUN = $(BUILDER_ARGS) $(BUILDER_IMG)
@ -24,9 +24,9 @@ dockerwait:
exit 1 exit 1
buildimg: dockerwait buildimg: dockerwait
sudo docker build -t $(BUILDER_IMG) -f Dockerfile.builder . docker build -t $(BUILDER_IMG) -f Dockerfile.builder .
build: dockerwait build: buildimg
if ! test -f ../configure; then \ if ! test -f ../configure; then \
$(BUILDER_RUN) env NOCONFIGURE=1 ./autogen.sh; \ $(BUILDER_RUN) env NOCONFIGURE=1 ./autogen.sh; \
fi fi
@ -37,20 +37,20 @@ build: dockerwait
$(BUILDER_RUN) make -j4 CFLAGS="$(CFLAGS)" $(BUILDER_RUN) make -j4 CFLAGS="$(CFLAGS)"
install: build install: build
sudo sh checkout.sh sh checkout.sh
$(BUILDER_ARGS) -v /etc:/host/etc \ $(BUILDER_ARGS) -v /etc:/host/etc \
-v /ostree/repo/tmp/vmcheck.ro/usr:/host/usr \ -v /ostree/repo/tmp/vmcheck.ro/usr:/host/usr \
$(BUILDER_IMG) sudo make install DESTDIR=/host $(BUILDER_IMG) make install DESTDIR=/host
sudo VERSION=$(VERSION) sh commit_and_deploy.sh VERSION=$(VERSION) sh commit_and_deploy.sh
ofsinstall: build ofsinstall: build
ostree admin unlock || : ostree admin unlock || :
$(BUILDER_ARGS) -v /etc:/host/etc \ $(BUILDER_ARGS) -v /etc:/host/etc \
-v /usr:/host/usr \ -v /usr:/host/usr \
$(BUILDER_IMG) sudo make install DESTDIR=/host $(BUILDER_IMG) make install DESTDIR=/host
check: build check: build
$(BUILDER_RUN) make check $(BUILDER_RUN) make check
clean: clean: buildimg
$(BUILDER_RUN) make clean $(BUILDER_RUN) make clean