| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
This is a fix for the glob command in guestfish which was inadvertently
broken in commit c359347dd42c9f5b875630537ee3641264826b89.
This also appears to fix:
https://bugzilla.redhat.com/show_bug.cgi?id=635969
glob echo mkfs ext2 /dev/vd[b-t]1 prints garbage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This tests a number of things which have caused problems for us:
- resizing PVs and LV content
- handling GPT format disks
- using qcow2 as a target disk format
- shrinking disk images
Note that the disk content is empty (not a real VM), but this is
adequate since all we want to test are the operations and calculations
done by virt-resize. We are not interested here in whether e2fsprogs
and LVM actually works.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we copied the bootloader data directly from the
source disk image to the target disk image using host file
operations (before launching libguestfs). This has two problems:
firstly it has no chance of working with qcow2, and secondly
it didn't behave properly with GPT.
This changes the code so that everything is done through
libguestfs. Block device sizes are now calculated properly
for qcow2 (RHBZ#633096) because this is done using the libguestfs
blockdev_getsize64 call. The partition table is still created
by parted, but to workaround a bug in parted this is done before
copying the bootloader. Finally the bootloader copy is done
using the new APIs pread-device and pwrite-device.
Shrinking now works, at least for simple cases (RHBZ#633766).
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This is the same as the existing 'pwrite' API call, but allows you
to write to a device.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Be more consistent in allowing the user to override use of the
temporary directory by specifying $TMPDIR. Also prefer P_tmpdir
macro (defined in <stdio.h>) if that is defined, rather than
hard-coding "/tmp" for the fallback location.
|
|
|
|
|
|
|
| |
This updates commit 956fc5a3feacc970ea763697bf28fb686c875408 so
that we call udev_settle after rereading the partition table. This
ensures that the devices nodes for the new partitions have been
created.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Instead of testing the installed /usr/bin/guestfish.
This fixes commit ddda0f7bd00a37274dae38f4ce93955b8cfdf7d7.
|
|
|
|
|
|
|
|
|
|
|
|
| |
On fast machines sfdisk has some sort of race where it
fails to re-read the partition table it has just created
(it's not clear if this is a race in sfdisk, the kernel or
some other component).
This commit works around the problem by calling
blockdev --rereadpt after sfdisk operations, which
experience shows is enough to stop the problem from
happening.
|
| |
|
|
|
|
|
| |
Since these options were both broken in released version 1.5.17,
best to have a regression test to catch this in future.
|
| |
|
|
|
|
|
| |
This updates commit 8ea62c8d7f3f7f7e4057b93105cf979271aa13f4
so it doesn't try to free the optarg (stack-allocated) strings.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
These APIs allow you to efficiently write and read parts of
files or devices.
|
|
|
|
|
|
|
|
|
| |
Clear the in-memory history before exiting. This removes
some but not all memory leaks associated with using the GNU
History library. As far as I can tell it is not possible to
free up everything used by GNU History.
(Found by valgrind).
|
|
|
|
|
|
|
|
|
|
| |
Previously the list of -a, -d, -m, -N parameters were leaked. This
change frees them explicitly.
This is not such an important fix since guestfish is a one-shot
program, but it aids in finding other leaks in future.
(Found by valgrind).
|
|
|
|
|
|
|
| |
The compiled PCRE regexps used for inspection were being leaked when
the library was unloaded.
(Found by valgrind).
|
|
|
|
|
|
|
| |
This frees the string containing the name of the appliance
which was previously being leaked during launch.
(Found by valgrind).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The appliance was being completely rebuilt every time guestfsd was updated. This
was because make.sh depended on guestfsd, which it had to do because it
called update.sh to install guestfsd.
This fix removes the call to update.sh in make.sh, and therefore the dependency
on guestfsd. The Makefile already includes a rule to run update.sh when guestfsd
is updated, so this was unnecessary.
|
|
|
|
|
| |
See also:
http://catless.ncl.ac.uk/Risks/26.17.html#subj13.3
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When writing to a RHEV target, virt-v2v launches the libguestfs
appliance with euid:egid = 36:36, which is required to write to
an NFS target using root_squash.
Since we changed to using a cached appliance, this causes an error on
start up, as the cached files are owned by root, but the cache directory
is owned by 36:36. The reason is that bash resets euid to uid and
egid to gid so when febootstrap-supermin-helper is executed, it runs as
root:root. The cache directory was created by libguestfs directly so
it has the correct ownership.
This patch fixes the issue by using explicit fork/exec instead of
system (ie. not going via a shell) and by setting the real UID and
GID to the effective UID and GID before execing.
|
| |
|
|
|
|
|
|
| |
The guestfish-only commands such as 'alloc' and 'edit' are
now generated from one place in the generator instead of being
spread around ad-hoc in the C code.
|
| |
|
|
|
|
|
| |
This corrects commit b5c287bcd456bdb02d8ec0443483df34f4fd6b5d
and commit 639ca1828b167bf59353f0cd3c8c79c6289bbd5d.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This API is a simpler replacement for the guestfish commands
list-devices / list-partitions / lvs, in the case where you are
just examining a guest by hand to see what it contains.
Typical usage and output in guestfish is like this:
$ guestfish --ro -a /dev/vg_trick/F13x64
><fs> run
><fs> list-filesystems
/dev/vda1: ext4
/dev/vg_f13x64/lv_root: ext4
/dev/vg_f13x64/lv_swap: swap
It can also be used to replace programs that try to mount
devices to determine if they are mountable filesystems.
|
|
|
|
|
| |
This adds a formal API for going from a partition to the containing
device, eg. /dev/sda1 -> /dev/sda
|
|
|
|
|
|
| |
This is for testing functions that return a device or partition
name, so that we can compare the return value with the canonical
device name (eg. "/dev/vda1" == "/dev/sda1").
|
| |
|