|
a |
|
b/trunk/wharfie/tests/QEMUTest/Makefile |
|
|
1 |
ifneq (${VERBOSE},y) |
|
|
2 |
Q=@ |
|
|
3 |
endif |
|
|
4 |
|
|
|
5 |
OUTPUT_FILE=result.tar |
|
|
6 |
|
|
|
7 |
all: result.tar |
|
|
8 |
|
|
|
9 |
# RUN sed -i 's,main,main non-free,' /etc/apt/sources.list |
|
|
10 |
A3A7F2A8.piling.tar: debian_armel_stretch.tar |
|
|
11 |
${Q}-mkdir rootfs.piling |
|
|
12 |
${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) |
|
|
13 |
${Q}-${SUDO} fuser -k ./rootfs.piling;[ -d ./rootfs.piling/proc ] && ${SUDO} umount ./rootfs.piling/proc;${SUDO} rm -Rf ./rootfs.piling |
|
|
14 |
|
|
|
15 |
.PHONY: A3A7F2A8.piling.tar_sub |
|
|
16 |
A3A7F2A8.piling.tar_sub: |
|
|
17 |
${Q}${SUDO} rm -f .trg.sh .hst.sh |
|
|
18 |
${Q}echo '******************************' |
|
|
19 |
${Q}echo 'A3A7F2A8.piling.tar: RUN sed -i 's,main,main non-free,' /etc/apt/sources.list' |
|
|
20 |
${Q}echo '******************************' |
|
|
21 |
${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 |
|
|
22 |
${Q}${SUDO} chmod a+x .trg.sh |
|
|
23 |
${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' .;" |
|
|
24 |
|
|
|
25 |
# 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 |
|
|
26 |
A97EFE49.piling.tar: A3A7F2A8.piling.tar |
|
|
27 |
${Q}-mkdir rootfs.piling |
|
|
28 |
${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) |
|
|
29 |
${Q}-${SUDO} fuser -k ./rootfs.piling;[ -d ./rootfs.piling/proc ] && ${SUDO} umount ./rootfs.piling/proc;${SUDO} rm -Rf ./rootfs.piling |
|
|
30 |
|
|
|
31 |
.PHONY: A97EFE49.piling.tar_sub |
|
|
32 |
A97EFE49.piling.tar_sub: |
|
|
33 |
${Q}${SUDO} rm -f .trg.sh .hst.sh |
|
|
34 |
${Q}echo '******************************' |
|
|
35 |
${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' |
|
|
36 |
${Q}echo '******************************' |
|
|
37 |
${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 |
|
|
38 |
${Q}${SUDO} chmod a+x .trg.sh |
|
|
39 |
${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' .;" |
|
|
40 |
|
|
|
41 |
# TO result.tar |
|
|
42 |
result.tar: A97EFE49.piling.tar |
|
|
43 |
${Q}-mkdir rootfs.piling |
|
|
44 |
${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) |
|
|
45 |
${Q}-${SUDO} fuser -k ./rootfs.piling;[ -d ./rootfs.piling/proc ] && ${SUDO} umount ./rootfs.piling/proc;${SUDO} rm -Rf ./rootfs.piling |
|
|
46 |
|
|
|
47 |
.PHONY: result.tar_sub |
|
|
48 |
result.tar_sub: |
|
|
49 |
${Q}${SUDO} rm -f .trg.sh .hst.sh |
|
|
50 |
${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;" |
|
|
51 |
[ ! -f A97EFE49.piling.tar ] || cp A97EFE49.piling.tar result.tar; [ ! -f A97EFE49.piling.tar.snar ] || cp A97EFE49.piling.tar.snar result.tar.snar; |
|
|
52 |
|
|
|
53 |
WHARFIE_MK ?= ../../wharfie.mk |
|
|
54 |
include ${WHARFIE_MK} |
|
|
55 |
|