4 find . -type f -a '!' '(' -name '*.x86' -o -name '*.x86_64' ')' | egrep -v '/\.(svn|git)/' | xargs $(ETAGS)
9 # make sync is a little more convoluted than the other variants
10 # so we call it make bootcdsync for that reason
12 # it expects the following env variables
14 # export BUILD=2015.03.05--f21
15 # export PLCHOSTLXC=deathvegas.pl.sophia.inria.fr
16 # export GUESTNAME=2015.03.05--f21-1-vplc12
17 # export GUESTHOSTNAME=vplc12.pl.sophia.inria.fr
18 # export KVMHOST=boxtops.pl.sophia.inria.fr
19 # export NODE=vnode03.pl.sophia.inria.fr
21 # and it also expects there is a reference iso file
23 KVMDIR=/vservers/$(BUILD)/qemu-$(NODE)
24 KVMSSH=$(KVMHOST):$(KVMDIR)
26 # initialize the workdir on the KVM side
27 # mount iso file, and unwrap .img files into bootcd/ and overlay/
29 ssh root@$(KVMHOST) "(cd $(KVMDIR); [ -f $(NODE).iso.ref ] && exit 0; \
30 cp $(NODE).iso $(NODE).iso.ref; \
31 mkdir iso.ref; mount -o ro,loop $(NODE).iso.ref iso.ref; \
32 rsync -ad iso.ref/ iso/; \
33 mkdir bootcd.ref; ( cd bootcd.ref; gzip -dc ../iso/bootcd.img | cpio -diu); \
34 mkdir overlay.ref; ( cd overlay.ref; gzip -dc ../iso/overlay.img | cpio -diu); \
35 rsync -a bootcd.ref/ bootcd/ ; rsync -a overlay.ref/ overlay/; \
39 ssh root@$(KVMHOST) "(cd $(KVMDIR); [ -f $(NODE).iso.ref ] || exit 0; \
41 rm -rf iso.ref iso bootcd overlay bootcd.ref overlay.ref; \
42 mv -f $(NODE).iso.ref $(NODE).iso; \
45 # once sync-mount is OK you can start tweaking the contents of bootcd/ and overlay/ manually
47 # and then use this to rebuild a new .iso
50 MKISOFS_OPTS="-R -J -r -f -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table"
53 ssh root@$(KVMHOST) "(cd $(KVMDIR); \
54 echo "Rewrapping overlay.img"; \
55 (cd overlay && find . | cpio --quiet -c -o) | gzip -1 > iso/overlay.img; \
56 echo "Rewrapping bootcd.img"; \
57 (cd bootcd && find . | cpio --quiet -c -o) | gzip -1 > iso/bootcd.img; \
58 mkisofs -o $(NODE).iso $(MKISOFS_OPTS) iso/; \