| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
These are relatively complete, although only lightly tested. Missing:
- events
- last_errno
- user_cancel
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't assume that if guestfs_case_sensitive_path returns NULL, that it
means the file does not exist.
The (previously undefined) behaviour of case_sensitive_path was that a
NULL return meant "either the file doesn't exist or some other error".
However in commit 973581780d8a006f336684fef6762801402d775d this was
changed so that if the last element of the path didn't exist, it was
assumed to be a new file and the (non-NULL) path of the new file is
returned.
This change breaks code (including in libguestfs) which tries to use
case_sensitive_path as a dual-purpose call to fix-up a path for
Windows and test if the file exists. Such code should be rewritten so
that it explicitly tests for file existence after calling
case_sensitive_path.
I examined all the calls to case_sensitive_path in libguestfs and
modified them where necessary.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
In libguestfs 1.20, you will be able to use 'add_drive'
instead of 'add_drive_opts' (except in the C bindings).
However until libguestfs 1.20 is the minimum stable version
people will still be using old versions where you have to use
'add_drive_opts'. This makes the examples confusing.
Therefore continue to use 'add_drive_opts' in the examples
for now.
|
| |
|
|
|
|
| |
$g is the "standard" name for libguestfs handles.
|
|
|
|
|
| |
This will allow us to easily change the location of this
script in future.
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
The internal_* prefix is reserved for internal functions
such as these tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Make the comments consistent.
Also make the Perl example call $g->close explicitly so it is
consistent with the other examples.
|
|
|
|
|
| |
This is now set by default in all supported versions of libguestfs.
It's just confusing if the examples refer to it.
|
|
|
|
| |
No functional change.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Old KVM can't add /dev/null readonly. Treat /dev/null as a special
case.
We also fix a few tests where /dev/null was being used with
format=qcow2. This was always incorrect behaviour, but qemu appears
to tolerate it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(RHBZ#701814).
Old versions of libvirt allowed you to define disks like this:
<disk type='file' device='disk'>
<driver name='qemu'/>
...
Since the <driver> element does not have a 'type' attribute (which
defines the format), we are supposed to do autodetection, so the
format should be undefined.
However what actually happened was that the code in
Sys::Guestfs::Lib::open_guest received format as an empty string from
the xpath query, causing libguestfs to give an error.
If the xpath query returns the format as an empty string, undefine it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Originally this state was intended so that in some way you could find
out if the appliance was running a command. However there was never a
thread-safe way to access the state of the handle, so in effect you
could never do anything useful safely with this information.
This commit completely removes the BUSY state.
The only visible change is to the guestfs_is_busy API. Previously you
could never call this safely from another thread. If you called it
from the same thread it would always return false (since the current
thread can't be running a libguestfs command at that point by
definition). Now it always returns false.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I noticed some uses of ${srcdir} in shell scripts.
That is almost always better written as $srcdir.
The patch below converts most such variable references.
Here are the few remaining candidates:
$ git grep -i -E '\$\{[a-zA-Z_0-9]+\}'|grep -v Makefile.in.in
configure.ac: JAR_INSTALL_DIR=\${prefix}/share/java
configure.ac: JNI_INSTALL_DIR=\${libdir}
debian/rules: for TEST in ${DEBIAN_SKIP_TEST}; do \
debian/rules:# mv $${mod} $$(dirname $${mod})/libguestfsmod.so; \
java/Makefile.am:libguestfs_jar_DATA = libguestfs-${VERSION}.jar
java/Makefile.am:libguestfs-${VERSION}.jar: $(libguestfs_jar_class_files)
perl/lib/Sys/Guestfs/Lib.pm: "-f", '${Package} ${Version} ${Architecture} ${Status}\n',
perl/typemap: croak (\"${Package}::$func_name(): called on a closed handle\");
perl/typemap: croak (\"${Package}::$func_name(): $var is not a blessed HV reference\");
tests/data/Makefile.am: echo "$${i}abcdefghijklmnopqrstuvwxyz"; \
We could change all of those, too, except the ones in configure.ac
and Makefile.am, since they refer to Make variables. Even those
should be changed, but to use the preferred Makefile notation:
$(prefix), $(libdir), $(VERSION).
>From a86770ecd45666232a94d76c8725c8f9b1c76e3a Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Mon, 23 Jan 2012 11:15:12 +0100
Subject: [PATCH libguestfs] maint: use $var notation rather than ${var} when
possible
The only case to avoid in a shell script is when the byte after the
"}" is word-constituent, and concatenating it would thus change the
name of the variable.
These changes were induced by running this command:
git grep -l -i -E '\$\{(srcdir|md)' \
|xargs perl -pi -e 's/\$\{(srcdir|md)\}($|\w)/\$$1$2/gi'
The "g" was needed because there was one line with two instances.
The "i" is to handle ${SRCDIR}. The ($|\w) ensures that concatenating
whatever follows the "}" won't change semantics.
* gobject/run-bindtests: Use "$srcdir", not "${srcdir}".
* haskell/run-bindtests: Likewise.
* java/run-bindtests: Likewise.
* ocaml/run-bindtests: Likewise.
* perl/run-bindtests: Likewise.
* python/run-bindtests: Likewise.
* ruby/run-bindtests: Likewise.
* tests/guests/guest-aux/make-debian-img.sh: Likewise, but $SRCDIR.
* tests/guests/guest-aux/make-ubuntu-img.sh: Likewise.
* tests/guests/guest-aux/make-windows-img.sh: Likewise.
* tests/md/test-mdadm.sh: Likewise, but $md.
|
| |
|
|
|
|
| |
(Includes fix by RWMJ)
|
|
|
|
| |
Update all copyright dates to 2012.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Because this is a useful introspection API, it is a candidate for
being backported into older stable branches.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
RHBZ#666578).
This is a comprehensive fix for the warnings from the old (and
obsolete) Perl inspection code. For a full description and
reproducer, see:
https://bugzilla.redhat.com/show_bug.cgi?id=678231#c5
|
|
|
|
|
|
| |
This avoids conflicts with the globally installed libguestfs
appliance, or lets us build in multiple local directories at the same
time without conflicts.
|
|
|
|
|
|
| |
This is a fix for Perl 5.14.
See previous commit 5c3c7e8825341e18c9449976f8a321a04cc78d79.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A change to ExtUtils::CBuilder in Perl 5.14 causes CCFLAGS to
completely replace, rather than appending, the C flags.
The unfortunate consequence of this is that vital flags such as
-D_FILE_OFFSET_BITS=64 are missing. For 32 bit code, this means you
get binary-incompatible code that completely fails to load.
For further analysis see:
http://www.nntp.perl.org/group/perl.perl5.porters/2011/04/msg171535.html
This commit changes CCFLAGS so that it appends to the existing
$Config{ccflags} instead of replacing it. On earlier versions of Perl
this means we get two copies of the flags, which is unfortunate but
should be safe.
|
| |
|
|
|
|
| |
This reverts commit 5cab0d6c807d8a3bf9690375c663d11a10e21656.
|
|
|
|
|
|
| |
In Perl 5.14:
Use of qw(...) as parentheses is deprecated at perl/blib/lib/Sys/Guestfs/Lib.pm line 1111.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The methods $h->set_progress_callback and $h->clear_progress_callback
have been removed, and replaced with a complete mechanism for setting
and deleting general-purpose events.
This also updates virt-resize to use the new API.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
/etc/redhat-release on Red Hat Desktop contains the following
string:
Red Hat Desktop release 4 (Nahant Update 8)
Previously we matched against the string "Red Hat Enterprise Linux"
but since this does not contain that string, this distro wasn't being
detected correctly.
Note this also changes the obsolete Perl code, for the benefit of
virt-v2v.
|
|
|
|
| |
This updates commit 477eebc83dcd33d00d34398692692dae6af04f22.
|
| |
|
|
|
|
| |
This updates commit 1d999540bddd7aea7c2d0fef8b15223d4acc645f.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This a purpose patch to avoid the message "unknown filesystem /dev/hdc".
Where /dev/hdc is an entry in fstab for CDROM.
Example of fstab:
/dev/hdc /media/cdrom auto
pamconsole,exec,noauto,managed 0 0
https://bugzilla.redhat.com/show_bug.cgi?id=666577
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
|