Diff of /trunk/wharfie/tests/QEMUTest/Makefile [000000] .. [r27]  Maximize  Restore

Switch to side-by-side view

--- a
+++ b/trunk/wharfie/tests/QEMUTest/Makefile
@@ -0,0 +1,55 @@
+ifneq (${VERBOSE},y)
+Q=@
+endif
+
+OUTPUT_FILE=result.tar
+
+all: result.tar
+
+# RUN  sed -i 's,main,main non-free,' /etc/apt/sources.list
+A3A7F2A8.piling.tar: debian_armel_stretch.tar
+	${Q}-mkdir rootfs.piling
+	${Q}${MAKE} A3A7F2A8.piling.tar_sub || (${SUDO} fuser -k ./rootfs.piling;[ -d ./rootfs.piling/proc ] && ${SUDO} umount ./rootfs.piling/proc;${SUDO} rm -Rf ./rootfs.piling; false)
+	${Q}-${SUDO} fuser -k ./rootfs.piling;[ -d ./rootfs.piling/proc ] && ${SUDO} umount ./rootfs.piling/proc;${SUDO} rm -Rf ./rootfs.piling
+
+.PHONY: A3A7F2A8.piling.tar_sub
+A3A7F2A8.piling.tar_sub:
+	${Q}${SUDO} rm -f .trg.sh .hst.sh
+	${Q}echo '******************************'
+	${Q}echo 'A3A7F2A8.piling.tar: RUN  sed -i 's,main,main non-free,' /etc/apt/sources.list'
+	${Q}echo '******************************'
+	${Q}(echo -e "#"'!'"/bin/bash\n[ -f ../Wharfile ] && exit 2;\n sed -i 's,main,main non-free,' /etc/apt/sources.list\nexit \$$?\n") | ${SUDO} tee .trg.sh
+	${Q}${SUDO} chmod a+x .trg.sh
+	${Q}${SUDO} bash -c "cd rootfs.piling;[ -f ../debian_armel_stretch.tar.snar ] && tar -g ../debian_armel_stretch.tar.snar -xf ../debian_armel_stretch.tar || tar -xf ../debian_armel_stretch.tar;if [ -d proc ]; then mount -t proc proc proc; fi;if [ -f ../.trg.sh ]; then mv ../.trg.sh .; chroot . ./.trg.sh || exit 1; fi; rm -f ./.trg.sh;if [ -d proc ]; then umount proc || umount -l proc; fi;if [ -f ../.hst.sh ]; then ../.hst.sh || exit 1; fi; rm -f ../.hst.sh;[ ! -f ../debian_armel_stretch.tar.snar ] || cp ../debian_armel_stretch.tar.snar ../A3A7F2A8.piling.tar.snar;tar -cf '../A3A7F2A8.piling.tar' .;"
+
+# RUN  apt-get update && apt-get install -y --no-install-recommends 	systemd-sysv 	dhcpcd5 	wpasupplicant 	kmod 	wireless-tools 	net-tools 	openssh-server 	python 	locales 	python-setuptools 	python-requests 	python-pycurl 	python-crypto 	python-imaging 	python-pyxmpp 	python-jinja2 	python-thrift 	python-feedparser 	python-beautifulsoup 	python-pip 	tesseract-ocr 	python-beaker 	unrar 	gocr 	python-django 	git 	rhino 	&& apt-get clean 	&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 	&& pip install Send2Trash
+A97EFE49.piling.tar: A3A7F2A8.piling.tar
+	${Q}-mkdir rootfs.piling
+	${Q}${MAKE} A97EFE49.piling.tar_sub || (${SUDO} fuser -k ./rootfs.piling;[ -d ./rootfs.piling/proc ] && ${SUDO} umount ./rootfs.piling/proc;${SUDO} rm -Rf ./rootfs.piling; false)
+	${Q}-${SUDO} fuser -k ./rootfs.piling;[ -d ./rootfs.piling/proc ] && ${SUDO} umount ./rootfs.piling/proc;${SUDO} rm -Rf ./rootfs.piling
+
+.PHONY: A97EFE49.piling.tar_sub
+A97EFE49.piling.tar_sub:
+	${Q}${SUDO} rm -f .trg.sh .hst.sh
+	${Q}echo '******************************'
+	${Q}echo 'A97EFE49.piling.tar: RUN  apt-get update && apt-get install -y --no-install-recommends 	systemd-sysv 	dhcpcd5 	wpasupplicant 	kmod 	wireless-tools 	net-tools 	openssh-server 	python 	locales 	python-setuptools 	python-requests 	python-pycurl 	python-crypto 	python-imaging 	python-pyxmpp 	python-jinja2 	python-thrift 	python-feedparser 	python-beautifulsoup 	python-pip 	tesseract-ocr 	python-beaker 	unrar 	gocr 	python-django 	git 	rhino 	&& apt-get clean 	&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 	&& pip install Send2Trash'
+	${Q}echo '******************************'
+	${Q}(echo -e "#"'!'"/bin/bash\n[ -f ../Wharfile ] && exit 2;\n apt-get update && apt-get install -y --no-install-recommends 	systemd-sysv 	dhcpcd5 	wpasupplicant 	kmod 	wireless-tools 	net-tools 	openssh-server 	python 	locales 	python-setuptools 	python-requests 	python-pycurl 	python-crypto 	python-imaging 	python-pyxmpp 	python-jinja2 	python-thrift 	python-feedparser 	python-beautifulsoup 	python-pip 	tesseract-ocr 	python-beaker 	unrar 	gocr 	python-django 	git 	rhino 	&& apt-get clean 	&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 	&& pip install Send2Trash\nexit \$$?\n") | ${SUDO} tee .trg.sh
+	${Q}${SUDO} chmod a+x .trg.sh
+	${Q}${SUDO} bash -c "cd rootfs.piling;[ -f ../A3A7F2A8.piling.tar.snar ] && tar -g ../A3A7F2A8.piling.tar.snar -xf ../A3A7F2A8.piling.tar || tar -xf ../A3A7F2A8.piling.tar;if [ -d proc ]; then mount -t proc proc proc; fi;if [ -f ../.trg.sh ]; then mv ../.trg.sh .; chroot . ./.trg.sh || exit 1; fi; rm -f ./.trg.sh;if [ -d proc ]; then umount proc || umount -l proc; fi;if [ -f ../.hst.sh ]; then ../.hst.sh || exit 1; fi; rm -f ../.hst.sh;[ ! -f ../A3A7F2A8.piling.tar.snar ] || cp ../A3A7F2A8.piling.tar.snar ../A97EFE49.piling.tar.snar;tar -cf '../A97EFE49.piling.tar' .;"
+
+# TO  result.tar
+result.tar: A97EFE49.piling.tar
+	${Q}-mkdir rootfs.piling
+	${Q}${MAKE} result.tar_sub || (${SUDO} fuser -k ./rootfs.piling;[ -d ./rootfs.piling/proc ] && ${SUDO} umount ./rootfs.piling/proc;${SUDO} rm -Rf ./rootfs.piling; false)
+	${Q}-${SUDO} fuser -k ./rootfs.piling;[ -d ./rootfs.piling/proc ] && ${SUDO} umount ./rootfs.piling/proc;${SUDO} rm -Rf ./rootfs.piling
+
+.PHONY: result.tar_sub
+result.tar_sub:
+	${Q}${SUDO} rm -f .trg.sh .hst.sh
+	${Q}${SUDO} bash -c "cd rootfs.piling;[ -f ../A97EFE49.piling.tar.snar ] && tar -g ../A97EFE49.piling.tar.snar -xf ../A97EFE49.piling.tar || tar -xf ../A97EFE49.piling.tar;if [ -d proc ]; then mount -t proc proc proc; fi;if [ -f ../.trg.sh ]; then mv ../.trg.sh .; chroot . ./.trg.sh || exit 1; fi; rm -f ./.trg.sh;if [ -d proc ]; then umount proc || umount -l proc; fi;if [ -f ../.hst.sh ]; then ../.hst.sh || exit 1; fi; rm -f ../.hst.sh;"
+	[ ! -f A97EFE49.piling.tar ] || cp A97EFE49.piling.tar result.tar;	[ ! -f A97EFE49.piling.tar.snar ] || cp A97EFE49.piling.tar.snar result.tar.snar;
+
+WHARFIE_MK ?= ../../wharfie.mk
+include ${WHARFIE_MK}
+