rpm-ostree/tests/vmcheck/Makefile
Jonathan Lebon be3a677125 vmcheck: create a new deployment instead
In order for vmcheck to be useful for testing, we need the machine to be
in a "clean" state. That is, sitting on a commit, ready for being
manipulated.

This is a small step towards this goal. Instead of overwriting the
files, we use rofiles-fuse to safely install and create a new
deployment.

Closes: #321
Approved by: cgwalters
2016-06-15 13:38:34 +00:00

25 lines
765 B
Makefile

all:
echo "Targets: buildimg build install"
BUILDER_ARGS = sudo /usr/bin/docker run --rm -ti --privileged -v /var/home:/home
BUILDER_IMG = rpm-ostree-builder
BUILDER_RUN = $(BUILDER_ARGS) $(BUILDER_IMG)
buildimg:
sudo docker build -t $(BUILDER_IMG) -f Dockerfile.builder .
build:
$(BUILDER_RUN) /bin/sh -c \
'if ! test -f configure; then env NOCONFIGURE=1 ./autogen.sh; fi'
$(BUILDER_RUN) /bin/sh -c \
'if ! test -f Makefile; then ./configure --prefix=/usr --libdir=/usr/lib64; fi'
$(BUILDER_RUN) /bin/sh -c make -j 4
install: build
sudo sh checkout.sh
$(BUILDER_ARGS) -v /etc:/host/etc \
-v /ostree/repo/tmp/vmcheck.ro/usr:/host/usr \
$(BUILDER_IMG) sudo make install DESTDIR=/host
sudo sh commit_and_deploy.sh