summaryrefslogtreecommitdiffstats
path: root/sparsify
Commit message (Collapse)AuthorAgeFilesLines
* sparsify: Better error when user specifies --compress + raw output ↵Richard W.M. Jones2012-11-151-16/+21
| | | | (RHBZ#852194).
* tests: Replace 'make extra-tests' with individual tests.Richard W.M. Jones2012-11-132-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 'make extra-tests' was a monolithic set of tests that did all sorts of things: valgrind, tests over local guests, tests with upstream qemu, tests with upstream libvirt, tests with the appliance attach method. This made it hard to perform individual tests, eg. just valgrind testing. It was also hard to maintain because the tests were not located in the same directories as the programs and sometimes duplicated tests that were run elsewhere. This commit splits up 'make extra-tests' into 5 separate targets: make check-valgrind # run a subset of tests under valgrind make check-valgrind-local-guests # test under valgrind with local guests make check-with-appliance # test with attach-method == appliance make check-with-upstream-qemu # test with an alternate/upstream qemu make check-with-upstream-libvirt # test with an alternate/upstream libvirt (You can also still run 'make extra-tests' which is now simply a rule that runs the above 5 targets in order). This replaces everything that was in the tests/extra directory, so that has now gone.
* sparsify: Fix dependencies so they include resize/progress.*Richard W.M. Jones2012-10-151-1/+1
| | | | This fixes commit 91b2238fc8e462c02f697f0c053043a55f43c13d.
* sparsify: Re-use progress bar wrapper code from virt-resize.Richard W.M. Jones2012-10-116-187/+6
| | | | | | | | | | | The code was identical -- just copied with s/resize/sparsify/. Instead of duplicating identical code, cause the Makefile.am to use the code from the ../resize/ directory. Unfortunately because there are two Utils modules (which are different), this means we had to rename those modules to Resize_utils and Sparsify_utils respectively. So this is a rather larger change than intended. However it's just code motion.
* sparsify: Fix use of closed handle (thanks Olaf Hering).Richard W.M. Jones2012-09-042-2/+2
| | | | | | | This fixes commit faaedeb3432253847107ca2c4530f681c6a1e385. Also contains an update to the test which tests the format auto-detect path.
* sparsify: Use guestfs_disk_format to autodetect input format (RHBZ#853762).Richard W.M. Jones2012-09-031-19/+4
|
* podwrapper: Add --license parameter, which is required.Richard W.M. Jones2012-08-211-0/+1
| | | | | | | | | | This adds standard LICENSE and BUGS sections to all of the man pages that are processed by podwrapper. Modify all the calls to $(PODWRAPPER) to add the right --license parameter according to the content. Note that this relaxes the license on some code example pages, making them effectively BSD-style licensed.
* man pages: Ensure consistent copyright/author sections, remove licenseRichard W.M. Jones2012-08-211-15/+1
| | | | | | | | | | section. Ensure each man page contains consistent COPYRIGHT and AUTHOR sections. Remove the LICENSE section. We will add that back in podwrapper in a later commit.
* FAQ: virt-sparsify and raw sparse output.Richard W.M. Jones2012-08-191-0/+13
|
* Replace mount-options with mount where appropriate.Richard W.M. Jones2012-08-182-3/+3
| | | | | | Since our minimum supported version is now 1.16 and mount was fixed in 1.13.16, it is now safe to replace mount-options + empty options with mount wherever it occurs.
* sparsify: Detect qemu-img version and use qcow2 v3 for overlay if available.Richard W.M. Jones2012-07-251-1/+41
| | | | | | | | | qcow2 v3 is generally more efficient, although unfortunately it doesn't support automatically sparsifying zero writes. Note this *only* uses qcow2 v3 for the intermediate overlay file, not for the final output (since we want the output to be broadly compatible with old hypervisors).
* sparsify: Change code that generates qemu-img -o argument.Richard W.M. Jones2012-07-251-7/+9
| | | | This is just code motion.
* build: Rename most C files that contain underscore with dash.Richard W.M. Jones2012-07-192-2/+2
| | | | | | | This is just code motion. Some files cannot be renamed. Notably rpcgen input and output files must not contain dash characters, else rpcgen breaks.
* build: Change calls to podwrapper.sh to use $(PODWRAPPER).Richard W.M. Jones2012-07-161-1/+1
| | | | | This will allow us to easily change the location of this script in future.
* generator: Rename 'add_drive_opts' API to 'add_drive'.Richard W.M. Jones2012-07-141-2/+2
| | | | | | By using the once_had_no_optargs flag, this change is backwards compatible for callers (except Haskell, PHP and GObject as discussed in earlier commit).
* New API: guestfs_shutdown: Cleanly shutdown the backend.Richard W.M. Jones2012-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The new API splits orderly close into a two-step process: if (guestfs_shutdown (g) == -1) { /* handle the error, eg. qemu error */ } guestfs_close (g); Note that the explicit shutdown step is only necessary in the case where you have made changes to the disk image and want to handle write errors. Read the documentation for further information. This change also: - deprecates guestfs_kill_subprocess - turns guestfs_kill_subprocess into the same as guestfs_shutdown - changes guestfish and other tools to call shutdown + close where necessary (not for read-only tools) - updates documentation - updates examples
* run: Set MALLOC_PERTURB_ to a random value.Richard W.M. Jones2012-06-281-5/+1
| | | | | | | | | | | | | | | | | MALLOC_PERTURB_ is a glibc feature which causes malloc to wipe memory before and after it is used, allowing both use-after-free and uninitialized reads to be detected with relatively little performance penalty: http://udrepper.livejournal.com/11429.html?nojs=1 Modify the ./run script so that it always sets this. We were already using MALLOC_PERTURB_ in most tests. Since ./run is now setting this, we can remove it from individual Makefiles. Most TESTS_ENVIRONMENT will now simply look like this: TESTS_ENVIRONMENT = $(top_builddir)/run --test
* tests: Add ./run --test option.Richard W.M. Jones2012-06-261-1/+1
| | | | | | | This option, when added via TESTS_ENVIRONMENT = [...] $(top_builddir)/run --test allows us to run the tests and only print the full output (including debugging etc) when the test fails.
* build: Define builddir and abs_srcdir when they are missing.Richard W.M. Jones2012-06-181-0/+6
| | | | | | | | | | | | | | | | | | | | | RHEL 5-era autoconf did not define these, so define them manually when they are missing. Define builddir as '.' The scripts require this. It won't work in the srcdir != builddir case, but we don't care about that for RHEL 5. This commit also moves the builddir / abs_srcdir variable setting above the include of subdir-rules.mk, in case that include uses these variables. Useful script: for f in $(find -name Makefile.am | xargs fgrep '$(abs_srcdir)' -l) ; do if ! grep -q '^abs_srcdir' $f; then echo missing in $f fi done
* ocaml: Use OCAMLOPTFLAGS when compiling .cmx (ie. native code) files.Richard W.M. Jones2012-06-181-1/+1
|
* New API: guestfs_canonical_device_name.Richard W.M. Jones2012-06-132-16/+2
| | | | This API makes device names canonical, eg. /dev/vda1 -> /dev/sda1.
* Add gettext support for OCaml tools (virt-resize, virt-sparsify, virt-sysprep).Richard W.M. Jones2012-05-013-32/+41
| | | | | | | | Note that this support is optional: To enable it, install the ocaml-gettext library from http://forge.ocamlcore.org/projects/ocaml-gettext . If this library is not installed, then configure detects this and inserts dummy gettext functions that do nothing.
* sparsify: Add a note about sparsify on tmpfs.Richard W.M. Jones2012-04-181-0/+8
|
* resize, sparsify: Add a simple-minded check to stop indisk = outdisk.Richard W.M. Jones2012-04-171-0/+6
|
* sparsify: Fix comma/colon and quoting in qemu-img command.Richard W.M. Jones2012-04-172-12/+27
| | | | | | | | | | Colon characters are not allowed in qemu/qemu-img filenames. There's no way to quote them. Comma characters CAN be used. However they must be quoted (by doubling) when used in the '-o' option. Fix general quoting problems in the external command.
* Ensure that SOURCES are always in EXTRA_DIST, even if OCaml not available.Richard W.M. Jones2012-03-311-5/+3
|
* sparsify: Implement --zero option.Richard W.M. Jones2012-03-152-28/+47
| | | | This unconditionally zeroes the named partition or filesystem.
* sparsify: Add a note about encrypted disks to the man page.Richard W.M. Jones2012-03-151-1/+2
|
* sparsify: Unlink temporary overlay file if user presses ^C.Richard W.M. Jones2012-03-151-1/+5
| | | | | Add a signal handler so this potentially large temporary file is removed when the user hits ^C.
* sparsify: Support sparsifying Linux swap partitions.Richard W.M. Jones2012-03-152-7/+28
|
* sparsify: Use zero-device instead of dd if=/dev/zero to zero device.Richard W.M. Jones2012-03-151-5/+3
| | | | | zero-device is more efficient in general, and avoids writing to blocks which are already zero.
* Use the new lvcreate-free API to create largest possible LVs.Richard W.M. Jones2012-03-151-4/+1
|
* sparsify: Use new zero_free_space API.Richard W.M. Jones2012-03-151-14/+2
|
* sparsify: Only print qemu-img command if verbose.Richard W.M. Jones2012-03-151-1/+1
|
* resize, sparsify: find progress mini-library in out-of-tree builds (2)Hilko Bengen2012-01-231-2/+2
|
* Do not run appliance-related checks if not building applianceHilko Bengen2012-01-231-0/+2
|
* Replace setting of environment variables with usage of local run scriptHilko Bengen2012-01-231-3/+1
| | | | (Includes fix by RWMJ)
* resize, sparsify: find progress mini-library in out-of-tree buildsHilko Bengen2012-01-201-1/+1
|
* Fixed out-of-tree compilation of OCaml code after .depend files removalHilko Bengen2012-01-201-2/+3
|
* Tempus fugit.Richard W.M. Jones2012-01-183-3/+3
| | | | Update all copyright dates to 2012.
* build: Remove .depend files from gitMatthew Booth2012-01-112-8/+1
| | | | | Remove generated .depend files from source control, and don't barf when they don't exist while bootstrapping.
* build: Fix automake warningsMatthew Booth2012-01-041-3/+5
|
* extra tests: Test virt-sparsify.Richard W.M. Jones2011-11-293-4/+18
| | | | | | | | This adds the virt-sparsify --debug-gc option which causes virt-sparsify to call Gc.compact before exiting, allowing GC and memory problems to be tested. Add an extratest which runs virt-sparsify under valgrind.
* sparsify: Add -o option for passing qemu-img output format options.Richard W.M. Jones2011-11-222-5/+23
|
* sparsify: Add --compress option.Richard W.M. Jones2011-11-222-5/+16
| | | | This adds the -c option to the final qemu-img command.
* sparsify: Add auto-detection of .vdi files.Richard W.M. Jones2011-11-223-3/+23
| | | | | | Note that for this to work properly, it requires a patch to the 'file' command. See: https://www.redhat.com/archives/libguestfs/2011-November/msg00120.html
* Update FSF address.Matthew Booth2011-11-084-4/+4
|
* test-virt-sparsify: Relax size_after constraint (for Debian).Richard W.M. Jones2011-10-271-1/+1
| | | | | | | size_after on Debian was 10136K. The host filesystem was ext3 (vs ext4 for Fedora where we did the original testing). Probably indirect blocks (vs more efficient extents on ext4) causes the difference, although I did not look at it in detail.
* ocaml: Make sure virt-resize, virt-sparsify are rebuilt if Guestfs API changes.Richard W.M. Jones2011-10-252-8/+8
| | | | | | | | Add a dependency so these tools are rebuilt from scratch if the Guestfs API changes. This prevents the error: "[...] make inconsistent assumptions over interface Guestfs". This commit includes the generated changes to .depend files.
* sparsify: Fix --ignore option to work on canonical device names.Richard W.M. Jones2011-10-041-2/+7
|