On 29.08.2017 15:10, Philippe Mathieu-Daudé wrote: > Hi Fam, Kamil, > >> On 08/28/2017 02:47 PM, Fam Zheng wrote: > [...] >>> + subprocess.check_call([tar_cmd, >>> + "--exclude-vcs", >>> + "--exclude=tests/vm/*.img", >>> + "--exclude=tests/vm/*.img.*", >>> + "--exclude=*.d", >>> + "--exclude=*.o", >>> + "--exclude=docker-src.*", >>> + "-cf", tarfile, '.'], cwd=data_dir, >> >> I'm not happy with this command :/ >> My distrib uses tmpfs for /tmp and suddently the whole X window became >> irresponsive until this script failing after filling 8G of /tmp and swap: >> >> ... >> DEBUG:root:Creating archive /tmp/qemu-vm-F7CY9O/data-3a52c.tar for >> data dir: . >> tar: /tmp/qemu-vm-F7CY9O/data-3a52c.tar: Wrote only 4096 of 10240 bytes >> tar: Error is not recoverable: exiting now >> Failed to prepare guest environment >> >> Then I figured out my workdir is full of testing stuff, debug images, >> firmwares, coredumps, etc. >> >> I'll think of another way. > > Using: > > (git ls-files; git submodule foreach --recursive "git ls-files | sed > s_^_\$sm_path/_" | sed /^Entering/d) > files.txt > > and: > > subprocess.check_call([tar_cmd, > "-cf", tarfile, > "-v" if self.debug else "", > "-T", "files.txt"], cwd=data_dir, > stdin=self._devnull, stdout=self._stdout) > > Current /master and submodules generated tarball is ~305MB uncompressed. > > Kamil do you mind testing this command on NetBSD? > > (obviously 'files.txt' goes in tmpdir). >
Result: http://www.netbsd.org/~kamil/qemu/files.txt I've tested this command line on a checkout from Jul 17th rev. 77031ee1ce4c > Regards, > > Phil. >
signature.asc
Description: OpenPGP digital signature