Commit Graph

34 Commits

Author SHA1 Message Date
Richard W.M. Jones
c618a51373 virt-edit: If case_sensitive_path returns an error, exit.
The 'windows_path' function was blindly copied from virt-cat.  In
virt-cat, errors are checked by the caller to 'windows_path'.  But
virt-edit lacks this check.  Change the function in virt-edit to add a
check and exit on error.
(cherry picked from commit 55b7c4df78)
(cherry picked from commit dd913ddd0e)
2012-10-01 15:06:56 +01:00
Wanlong Gao
05838c5022 remove the useless "h" option
"h" option is not enabled in virt-cat, remove it.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
(cherry picked from commit f7f746a98e)
(cherry picked from commit 9b45ae5dde)
2012-10-01 15:05:37 +01:00
Richard W.M. Jones
634b87ce90 tests: Attach copyright and license (GPLv2+) notices to various test scripts.
For some reason these tests did not have license notices.
(cherry picked from commit a1d981edea)
2012-09-19 13:40:21 +01:00
Richard W.M. Jones
6243fe1d5d podwrapper: Add --license parameter, which is required.
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.

(cherry picked from commit 2f97bf873b)
2012-08-30 22:39:42 +01:00
Richard W.M. Jones
c9436dcb0a man pages: Ensure consistent copyright/author sections, remove license
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.

(cherry picked from commit f1d98bbc79)
2012-08-30 22:14:11 +01:00
Richard W.M. Jones
23beb95042 fish: Rename fish/virt.c to fish/domain.c
This file handles the -d option for guestfish and other C command line
utilities.  Renaming this file makes it less confusing.
(cherry picked from commit 6054051a9d)
2012-08-05 22:48:51 +01:00
Richard W.M. Jones
f92c331fc5 docs: Use L<...> for links.
Instead of working around bugs, podwrapper has been fixed so that
links work in all output formats.
(cherry picked from commit 4bc110e2bc)
2012-08-05 22:48:50 +01:00
Richard W.M. Jones
930433b194 build: Change calls to podwrapper.sh to use $(PODWRAPPER).
This will allow us to easily change the location of this
script in future.

(cherry picked from commit f2ea617e22)
2012-08-05 22:48:47 +01:00
Richard W.M. Jones
dff126b7c5 New API: guestfs_shutdown: Cleanly shutdown the backend.
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

(cherry picked from commit ffbf1475f7)
2012-07-07 11:32:46 +01:00
Richard W.M. Jones
d157bd3f6b tests: Use qemu-img to create an overlay for testing, instead of copying.
Replace:

  cp tests/guests/fedora.img test.img

with the longer but possibly more space-efficient equivalent:

  qemu-img create -F raw -b tests/guests/fedora.img -f qcow2 test.qcow2
(cherry picked from commit 339f3647f8)
2012-07-07 11:23:31 +01:00
Richard W.M. Jones
5bc3d64acc virt-edit: Document CVE-2012-2690.
(cherry picked from commit d43e3d63de)
2012-06-21 13:10:38 +01:00
Richard W.M. Jones
d7a4f008f9 edit: Preserve file permissions, UID, GID, SELinux context on edited files. (RHBZ#788641)
(cherry picked from commit 24d7889eba)
2012-02-10 15:46:03 +00:00
Hilko Bengen
b6e0552ee5 Do not run appliance-related checks if not building appliance 2012-01-23 09:08:33 +00:00
Hilko Bengen
7004fafc69 Replace setting of environment variables with usage of local run script
(Includes fix by RWMJ)
2012-01-23 09:08:21 +00:00
Richard W.M. Jones
08840bab44 Tempus fugit.
Update all copyright dates to 2012.
2012-01-18 22:05:02 +00:00
Richard W.M. Jones
dd0707be5f fish options parsing: Allow add_drives to be called multiple times.
Ensure that the drv structure is always zeroed on allocation.

Don't leak old drv->device when add_drives is called multiple times.
2012-01-18 16:28:10 +00:00
Richard W.M. Jones
cd077b8229 tests: Split images -> tests/data + tests/guests 2011-12-22 15:48:11 +00:00
Matthew Booth
04ea1375c5 Update FSF address. 2011-11-08 14:43:07 +00:00
Richard W.M. Jones
f0f3e16211 man pages: Add a standard EXIT STATUS section to most pages. 2011-08-27 17:47:10 +01:00
Hilko Bengen
ff101adf7e out-of-tree build: fix documentation generation 2011-08-15 14:50:33 +01:00
Richard W.M. Jones
f7d18c84dd build: Set TMPDIR for local testing.
This avoids conflicts with the globally installed libguestfs
appliance, or lets us build in multiple local directories at the same
time without conflicts.
2011-08-08 12:41:54 +01:00
Richard W.M. Jones
a711777bed docs: Separate out combined =item 's in man pages.
Turn:

 =item B<-a> | B<--all>

into:

 =item B<-a>

 =item B<--all>

This gives a more natural-looking manual page, as well as making it
easier to directly link to these sections.
2011-07-16 15:20:29 +01:00
Richard W.M. Jones
34acb80a28 Enable deprecation warnings on all C programs. 2011-05-17 17:05:12 +01:00
Richard W.M. Jones
ea70f55812 edit: Reorganize options alphabetically. 2011-05-09 14:59:33 +01:00
Richard W.M. Jones
c665d14f29 edit: Fix reference to virt-cat in the documentation.
This updates commit 2b5fbc882a.
2011-05-09 14:40:12 +01:00
Richard W.M. Jones
2b5fbc882a Rewrite virt-edit in C. 2011-05-09 14:23:08 +01:00
Richard Jones
945b6e0a08 Move virt tools (virt-cat, virt-edit etc) into tools/ subdirectory.
This moves the tool programs into a single directory:
  cat/* -> tools/virt-cat
  df/* -> tools/virt-df
  edit/* -> tools/virt-edit
  rescue/* -> tools/virt-rescue

This in itself simplifies the build process because we only need
one Makefile and one copy of 'run-locally'.

'run-*-locally' has become just 'run-locally' and takes an extra
parameter which is the name of the tool, eg:
  run-locally cat [virt-cat params...]

virt-inspector stays in its own directory, because this contains
more than just a single Perl script.
2009-10-19 10:18:46 +01:00
Richard Jones
5d01670e31 run-*-locally: The programs are now virt-[tool], not virt-[tool].pl
This fixes commit b488436cc5.
2009-10-01 15:22:12 +01:00
Richard Jones
406d4aea4d Include virt tools in EXTRA_DIST.
Partially revert b488436cc5.
It turns out that automake doesn't automatically place bin_SCRIPTS
in EXTRA_DIST.
2009-09-23 14:03:05 +01:00
Richard Jones
b488436cc5 Rename virt-[tool].pl as virt-[tool] 2009-09-23 12:37:26 +01:00
Richard Jones
75b6338da3 Check return value from readlink. 2009-09-23 12:09:26 +01:00
Richard Jones
9adddc19e4 Create manpage atomically.
Don't fail with a partial file if disk full, etc.
2009-09-23 12:05:55 +01:00
Richard Jones
154370c0e8 Replace @...@ with $(...) in these common Makefile.am files. 2009-09-23 12:04:25 +01:00
Richard Jones
7801621dc9 New tool: virt-edit
Edit any file in a guest.  This was possibly previously
using guestfish, but having a separate command makes it
simpler.

The usage is simply:

  virt-edit mydomain /some/file

It runs $EDITOR or vi on the file, and if the user changes
it, uploads the result back to the VM.
2009-09-23 11:37:37 +01:00