Richard Jones [Tue, 8 Jun 2010 17:04:17 +0000 (18:04 +0100)]
TODO: 'file' command should be fixed.
Richard Jones [Tue, 8 Jun 2010 15:44:18 +0000 (16:44 +0100)]
virt-df: Disallow -h and --csv options together (RHBZ#600977).
Before this commit, if you used the -h and --csv options together
you would get these warnings from virt-df:
$ virt-df -h --csv Guest
Virtual Machine,Filesystem,Size,Used,Available,Use%
Argument "13.5G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
Argument "4.7G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
Argument "8.1G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
"/dev/vg_trick/RHEL55x64","/dev/VolGroup00/LogVol00",13,4,8,34.8%
Argument "98.7M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
Argument "18.8M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
Argument "74.9M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
"/dev/vg_trick/RHEL55x64","/dev/vda1",98,18,74,19.0%
We could fix this so that the human-readable numbers get written
into the CSV file. However would probably be wrong for most uses
of the CSV format (databases and spreadsheets) since they would not
be able to interpret these human-readable numbers, or worse could
misinterpret, eg. thinking that "1M" and "1G" are both 1.
Therefore this commit disallows this combination of options.
Richard Jones [Tue, 8 Jun 2010 15:04:01 +0000 (16:04 +0100)]
file: Fix file command on /dev/VG/LV paths (RHBZ#582484).
Previous commit
4df593496e116dfb635731c058b7627e81fc179c broke the
"file" command on logical volume paths, since these are symbolic
links. We *should* follow these (only).
This inadvertantly broke virt-inspector too, which indicates that
we need more regression testing in this area. Since carrying whole
Fedora images around could make the distribution even larger than
now, I'm not sure at the moment how to do this.
Thanks to Matt Booth for diagnosing this bug.
Richard Jones [Mon, 7 Jun 2010 14:29:31 +0000 (15:29 +0100)]
Use the noop scheduler inside the appliance.
In my limited tests, this seems to make a small but noticable
difference, improving the performance of some straightforward
read operations by a little over 10%.
For more information see:
http://kbase.redhat.com/faq/docs/DOC-5428
Richard Jones [Fri, 4 Jun 2010 17:44:49 +0000 (18:44 +0100)]
Add release notes.
To generate the "Bugs fixed" list, run the bugs-in-changelog script
like this:
./bugs-in-changelog 1.0.89..
Richard Jones [Fri, 4 Jun 2010 15:38:55 +0000 (16:38 +0100)]
Version 1.3.19.
Update BUGS and PO files.
Richard Jones [Fri, 4 Jun 2010 10:45:06 +0000 (11:45 +0100)]
file: Restrict to regular files (RHBZ#582484).
The file call can hang if called on char devices (because we are
using the file -s option).
This is hard to solve cleanly without adding another file API.
However this restricts file to regular files, unless called explicitly
with a /dev/ path. For non-regular files, it will now return a
string like "directory".
There is a small semantic change for symbolic links. Previously
it would not have worked at all on absolute links (or rather, the
results would have been undefined). It would have treated relative
symlinks to regular files as the regular file itself. Now it will
return the string "symbolic link" in both cases.
This commit also makes the API safe when called on untrusted
filesystems. Previously a filesystem might have been set up so
that (eg) /etc/redhat-release was a char device, which would have
caused virt-inspector and virt-v2v to hang. Now it will not hang.
Richard Jones [Fri, 4 Jun 2010 10:55:54 +0000 (11:55 +0100)]
touch: Restrict touch to regular files only (RHBZ#582484).
Richard Jones [Fri, 4 Jun 2010 10:23:01 +0000 (11:23 +0100)]
daemon: Rearrange code in 'file' command.
path = path to access file (/sysroot/.. or /dev/..)
display_path = original path, saved so we can display it
buf = optional buffer which is freed along return codepaths
There should be no change to the semantics of the code.
Richard Jones [Fri, 4 Jun 2010 10:21:58 +0000 (11:21 +0100)]
gnulib: Ignore asm-underscore.m4 in the correct place.
Richard Jones [Fri, 4 Jun 2010 08:46:34 +0000 (09:46 +0100)]
Update to latest gnulib.
Richard Jones [Thu, 3 Jun 2010 13:03:08 +0000 (14:03 +0100)]
mkfs-b: Map block size to cluster size for VFAT and NTFS partitions (RHBZ#599464).
This also adds a regression test for VFAT and (conditionally)
NTFS filesystems.
Richard Jones [Thu, 3 Jun 2010 13:01:18 +0000 (14:01 +0100)]
mkfs-b: Check that blocksize parameter is > 0 and a power of 2.
Richard Jones [Thu, 3 Jun 2010 13:31:58 +0000 (14:31 +0100)]
generator: Allow individual tests to depend on daemon features.
Using IfAvailable "featurename" we allow individual tests to
only run if the feature is available in the daemon.
This will allow us to extend testing to a lot more optional
features such as NTFS.
Richard Jones [Thu, 3 Jun 2010 13:30:36 +0000 (14:30 +0100)]
tests: Factor out common code into 'is_available' function.
This commit is just code motion.
Richard Jones [Thu, 3 Jun 2010 10:49:38 +0000 (11:49 +0100)]
grub-install: Enable grub-install tests and create explicit device.map file.
Richard Jones [Thu, 3 Jun 2010 10:48:41 +0000 (11:48 +0100)]
grub-install: In docs suggest manually creating device.map (RHBZ#484986).
Richard Jones [Wed, 2 Jun 2010 17:47:30 +0000 (18:47 +0100)]
Version 1.3.18.
Update BUGS and PO files.
Richard Jones [Wed, 2 Jun 2010 16:12:59 +0000 (17:12 +0100)]
RHEL 6: sr_mod.ko is needed for RHEL 6 to see CD-ROM devices (RHBZ#598807).
Richard Jones [Wed, 2 Jun 2010 14:35:58 +0000 (15:35 +0100)]
parted: Check partition number >= 1 in several calls.
Richard Jones [Wed, 2 Jun 2010 11:32:33 +0000 (12:32 +0100)]
daemon: Parse output of old parted which didn't support -m option (RHBZ#598309).
This fixes the following commands when run with RHEL 5-era parted:
get-bootable
get-parttype
part-list
Richard Jones [Wed, 2 Jun 2010 11:31:40 +0000 (12:31 +0100)]
daemon: count_strings function returns size_t
Richard Jones [Wed, 2 Jun 2010 14:10:38 +0000 (15:10 +0100)]
base64-in: Ignore garbage characters in input.
On RHEL 5 you have to specify the -i option to get the
external 'base64' command to ignore \n characters. (The
Fedora version seems to ignore these characters anyway).
Add this option so the tests can pass on RHEL 5.
Richard Jones [Wed, 2 Jun 2010 12:27:19 +0000 (13:27 +0100)]
resize2fs: Document this command also works with ext4 (thanks Yufang Zhang).
Richard Jones [Tue, 1 Jun 2010 15:27:33 +0000 (16:27 +0100)]
fish: help command return error for non-existent commands (RHBZ#597145).
With this change, the exit status indicates error for non-existent
commands.
$ guestfish -h foo
foo: command not known, use -h to list all commands
$ echo $?
1
$ guestfish help foo
foo: command not known, use -h to list all commands
$ echo $?
1
Richard Jones [Tue, 1 Jun 2010 15:18:53 +0000 (16:18 +0100)]
daemon: write-file: Check range of size parameter (RHBZ#597135).
This also adds a regression test.
Richard Jones [Tue, 1 Jun 2010 14:50:14 +0000 (15:50 +0100)]
daemon: Limit label lengths (RHBZ#597118).
Richard Jones [Wed, 2 Jun 2010 12:36:19 +0000 (13:36 +0100)]
Update BUGS and PO files.
Richard Jones [Tue, 1 Jun 2010 13:04:51 +0000 (14:04 +0100)]
Fix and deprecate get_e2label and get_e2uuid (RHBZ#597112).
Fix these calls (see description in RHBZ#597112), but also
deprecate them since the new calls vfs_label and vfs_uuid can
work on any filesystem type.
This also adds a regression test for the original bug reported
in RHBZ#597112.
Richard Jones [Tue, 1 Jun 2010 12:57:12 +0000 (13:57 +0100)]
New APIs: vfs-label and vfs-uuid return label and uuid for many fs types.
These APIs generalize the existing 'get-e2label' and 'get-e2uuid'
calls, to provide calls which should be able to get the label
and UUID for most filesystem types. These use 'blkid' to do the
work.
I have tested that the blkid commands themselves work on RHEL 5.
(Suggested by Yufang Zhang).
Richard Jones [Tue, 1 Jun 2010 14:27:57 +0000 (15:27 +0100)]
daemon: Kill blkid cache to improve reliability of blkid commands.
By killing the cache file, we make blkid work in situations such
as a just-created filesystem.
Richard Jones [Tue, 1 Jun 2010 12:39:25 +0000 (13:39 +0100)]
daemon: Generalize the implementation of vfs-type.
Note that there is no change to the semantics of the code.
Richard Jones [Fri, 28 May 2010 19:08:01 +0000 (20:08 +0100)]
todo: Should generate -N option.
Richard Jones [Fri, 28 May 2010 19:05:56 +0000 (20:05 +0100)]
todo: Remove implemented resize functions from TODO file.
Matthew Booth [Thu, 27 May 2010 14:47:51 +0000 (15:47 +0100)]
Make the supermin appliance include local augeas lenses
Matthew Booth [Thu, 27 May 2010 14:47:50 +0000 (15:47 +0100)]
Rely on new augeas lens for modules.conf and conf.modules
Latest augeas includes a lens for /etc/modules.conf. If this new lens is
present, the code to force the Modprobe lens to try to match /etc/modules.conf
as well results in /etc/modules.conf not being parsed at all. This results in
modprobe_aliases in virt-inspector output being empty.
This change is equivalent to change
cfd28d1140393667913689b7b9bcf21c8bfe592c
from virt-v2v.
An effect of this change is that the Modules_conf augeas lens is now required
for correct operation on guests which use /etc/modules.conf.
Fixes RHBZ#596776
Daniel Cabrera [Thu, 27 May 2010 14:20:37 +0000 (15:20 +0100)]
Updates to Spanish translation (RHBZ#596763).
Richard Jones [Thu, 27 May 2010 11:03:43 +0000 (12:03 +0100)]
Version 1.3.17.
Richard Jones [Thu, 27 May 2010 09:37:43 +0000 (10:37 +0100)]
Fix documentation for vfs-type to reflect reality.
Richard Jones [Thu, 27 May 2010 09:32:51 +0000 (10:32 +0100)]
Clarify documentation on distro backports in version command.
Richard Jones [Thu, 27 May 2010 09:31:07 +0000 (10:31 +0100)]
Add reference to version number documentation to version command.
Richard Jones [Thu, 27 May 2010 09:25:18 +0000 (10:25 +0100)]
Clarify sparse behaviour of truncate-size command.
Richard Jones [Thu, 27 May 2010 09:03:47 +0000 (10:03 +0100)]
Fix typo in documentation of guestfs_readlinklist.
Richard Jones [Thu, 27 May 2010 09:01:25 +0000 (10:01 +0100)]
Fix missing word in docuentation of guestfs_readdir.
Richard Jones [Thu, 27 May 2010 08:49:28 +0000 (09:49 +0100)]
Revise documentation on creating files.
Richard Jones [Thu, 27 May 2010 08:48:22 +0000 (09:48 +0100)]
New API: fallocate64 (replaces fallocate).
guestfs_fallocate takes an integer for the length, effectively
limiting it to creating 1GB files. This new call takes an int64_t
for the length, but is otherwise identical.
Richard Jones [Wed, 26 May 2010 22:42:43 +0000 (23:42 +0100)]
Fix typo in description of echo-daemon command.
Richard Jones [Tue, 25 May 2010 22:17:58 +0000 (23:17 +0100)]
Version 1.3.16.
Richard Jones [Tue, 25 May 2010 22:16:23 +0000 (23:16 +0100)]
Add bash complation script to EXTRA_DIST.
Richard Jones [Tue, 25 May 2010 21:45:45 +0000 (22:45 +0100)]
Version 1.3.15.
Richard Jones [Tue, 25 May 2010 21:24:12 +0000 (22:24 +0100)]
Add tests for available-all-groups command.
Richard Jones [Tue, 25 May 2010 19:13:55 +0000 (20:13 +0100)]
fish: First pass at guestfish bash completion script.
Richard Jones [Tue, 25 May 2010 12:54:11 +0000 (13:54 +0100)]
fish: Don't eat words when completing case-insensitive paths (RHBZ#582993).
Richard Jones [Tue, 25 May 2010 12:52:53 +0000 (13:52 +0100)]
fish: Sort returned paths so the list is stable across multiple calls.
Richard Jones [Tue, 25 May 2010 12:52:17 +0000 (13:52 +0100)]
fish: Document test1.img, test2.img etc used by -N option in FILES section.
Richard Jones [Tue, 25 May 2010 12:51:58 +0000 (13:51 +0100)]
fish: Create a separate FILES section in the manpage.
Richard Jones [Tue, 25 May 2010 12:41:39 +0000 (13:41 +0100)]
fish: Move 'EXIT CODE' section to a more logical place in the documentation.
Richard Jones [Tue, 25 May 2010 10:45:23 +0000 (11:45 +0100)]
resize: Refresh the examples in the documentation.
The documentation was previously very intimidating. Bring some
common, simple examples up to the top of the page in a separate
section.
Richard Jones [Tue, 25 May 2010 10:44:43 +0000 (11:44 +0100)]
fish: Make the read/write warning more prominent.
Follow the example on other manual pages by making the warning
more prominent.
Richard Jones [Tue, 25 May 2010 10:28:09 +0000 (11:28 +0100)]
fish: New command: 'supported'
This checks all available optional groups and prints out which
ones are supported by the daemon. Note you must launch the appliance
first.
Example:
><fs> supported
augeas yes
inotify yes
linuxfsuuid yes
linuxmodules yes
linuxxattrs yes
lvm2 yes
mknod yes
ntfs3g yes
ntfsprogs yes
realpath yes
scrub yes
selinux yes
xz yes
zerofree yes
Richard Jones [Tue, 25 May 2010 10:27:49 +0000 (11:27 +0100)]
New API: available-all-groups to return list of all optional groups.
Richard Jones [Tue, 25 May 2010 10:25:12 +0000 (11:25 +0100)]
perl: Rerun configure if MAX_PROC_NR changes.
If MAX_PROC_NR changes (because a new API has been added to the
generator) then we need to rerun configure in order to set the
Makefile's ${MAX_PROC_NR} variable, in order to rebuild Makefile.PL.
Piotr Drąg [Tue, 25 May 2010 08:41:20 +0000 (09:41 +0100)]
Update Polish translations (RHBZ#502533).
Richard Jones [Mon, 24 May 2010 12:35:31 +0000 (13:35 +0100)]
Version 1.3.14.
Richard Jones [Mon, 24 May 2010 12:34:33 +0000 (13:34 +0100)]
build: Remove install_kernel from EXTRA_DIST.
This updates commit
a34fadf900625f1f7359ecf3ca760820ffa20815,
removing this now non-existent script from EXTRA_DIST.
Richard Jones [Mon, 24 May 2010 11:09:38 +0000 (12:09 +0100)]
build: For development releases, print a notice.
Richard Jones [Sat, 22 May 2010 17:51:57 +0000 (18:51 +0100)]
guestfs_version: Correct documentation.
Remove reference to 'ELF weak linking tricks' and replace
with suggestion to use dl* functions.
Richard W.M. Jones [Fri, 21 May 2010 17:20:28 +0000 (18:20 +0100)]
Build workaround for Python 2.4.x in RHEL 5.
See:
http://www.python.org/dev/peps/pep-0353/#conversion-guidelines
Richard W.M. Jones [Fri, 21 May 2010 15:14:07 +0000 (16:14 +0100)]
C99 compatible build fix for RHEL 5.
Richard Jones [Fri, 21 May 2010 13:14:59 +0000 (14:14 +0100)]
New API: ntfsresize-size to allow shrinking NTFS (RHBZ#585223).
Richard Jones [Fri, 21 May 2010 13:14:25 +0000 (14:14 +0100)]
New API: pvresize-size to allow shrinking PVs (RHBZ#585222).
Richard Jones [Fri, 21 May 2010 13:13:24 +0000 (14:13 +0100)]
New API: resize2fs-size to allow shrinking ext2 filesystems (RHBZ#585221).
Richard Jones [Fri, 21 May 2010 12:07:05 +0000 (13:07 +0100)]
fish: Allow suffixes on number parameters (eg. 1M)
This small change uses the gnulib xstrtoll functionality to
enable suffixes on integer parameters in guestfish. For example:
truncate-size /file 1G
(previously you would have had to given the full number).
This also applies to the 'alloc' and 'sparse' commands (and
indirectly to the -N option). The specification for these commands
has changed slightly, in that 'alloc foo 1MB' would now use SI
units, allocating 1000000 bytes instead of a true megabyte. All
existing uses would use 'alloc foo 1M' which still allocates true
megabytes.
Richard Jones [Fri, 21 May 2010 13:51:29 +0000 (14:51 +0100)]
fish: Fix '-N part' disk partition type sub-option.
Richard Jones [Fri, 21 May 2010 10:25:36 +0000 (11:25 +0100)]
TODO: Suggest including undelete utility.
Richard Jones [Fri, 21 May 2010 10:25:19 +0000 (11:25 +0100)]
Fix name of update-bugs script in output file BUGS.
Richard Jones [Thu, 20 May 2010 17:53:10 +0000 (18:53 +0100)]
ubuntu: Use direct udevd method to start udev on Ubuntu.
On Ubuntu, /etc/init.d/udev is a symlink to an upstart file,
but running that causes the appliance to hang.
Therefore detect if this is a symlink and fall through to the
direct start of udevd. This shouldn't affect Debian because the
file is not a symlink on standard Debian.
Richard Jones [Thu, 20 May 2010 12:54:13 +0000 (13:54 +0100)]
ubuntu: Remove two FUSE packages from the default list.
fuse-utils (a dependency of these) cannot be installed under
debirf because it does something with the system udevd which is
not permitted. Seems to be a bug either in fakeroot or in the
post install scripts for fuse-utils.
Richard Jones [Thu, 20 May 2010 10:04:30 +0000 (11:04 +0100)]
ubuntu: Ignore packages in packagelist.in which are missing.
For distros using 'yum', packages which cannot be found are just
ignored. This allows us to include for example 'e4fsprogs' on the
list even though that only exists on RHEL 5.
However for Debian-derived distros, missing packages would cause
apt to fail. This was particularly a problem when building Ubuntu
since it doesn't have as complete a list of packages, and the list
changed a lot between releases.
This commit adds a check first for missing packages, ignoring those
and thus acting more like 'yum'.
Richard Jones [Mon, 21 Dec 2009 15:52:36 +0000 (15:52 +0000)]
Ubuntu: Use apt-get instead of aptitude when installing guestfsd.
Richard Jones [Mon, 21 Dec 2009 15:50:59 +0000 (15:50 +0000)]
Ubuntu: Revert install-kernel to debirf default script.
Richard Jones [Thu, 20 May 2010 09:39:44 +0000 (10:39 +0100)]
generator: Make 'xz' into an optional group.
On Ubuntu <= Karmic, xz-utils was not packaged, and therefore
any xz-related tests would fail. Thus make this an optional
group so that we can test for this and avoid running the tests
if xz utils are not present.
Richard Jones [Wed, 19 May 2010 11:27:00 +0000 (12:27 +0100)]
generator: Check parameters are not NULL (RHBZ#501893).
This adds additional tests to check that several types of parameter
including String are not NULL when passed to the C functions.
Previously this would cause a segfault inside libguestfs. With
this change, you get an error message / exception.
Of the possible pointer parameters, only OptString is now permitted
to be NULL.
This change does not affect the Perl bindings. This is because Perl
XS code was already adding similar checks if you passed undef into
a parameter expecting a string.
Richard Jones [Wed, 19 May 2010 11:25:03 +0000 (12:25 +0100)]
generator: Some String parameters should be OptString (RHBZ#501894).
I haven't checked the list of functions exhaustively, but
these are the obvious ones.
Richard Jones [Tue, 18 May 2010 22:49:43 +0000 (23:49 +0100)]
fuse: Implement write syscall (RHBZ#592883).
Richard Jones [Tue, 18 May 2010 22:20:30 +0000 (23:20 +0100)]
New API: Implement pwrite system call (partial fix for RHBZ#592883).
Richard Jones [Tue, 18 May 2010 20:51:05 +0000 (21:51 +0100)]
New API: write for creating files with fixed content (RHBZ#501889).
The guestfs_write call can be used to create small files with
arbitrary 8 bit content, including \0 bytes.
This replaces and deprecates write-file, which cannot be modified
to use BufferIn because of an unfortunate choice in the ABI: the
size parameter to write-file, if zero, means that the daemon tries
to calculate the length of the buffer using strlen. However this
fails if we pass a zero-length buffer using BufferIn because then
the daemon tries to do strlen on a (really) zero length buffer, not
even containing a terminating \0 character, thus segfaulting.
Richard Jones [Tue, 18 May 2010 20:47:19 +0000 (21:47 +0100)]
generator: Implement BufferIn parameter type (RHBZ#501889).
The BufferIn argument turns into various things:
in C const char *, size_t parameter pair
in XDR an opaque<> type (instead of string) which allows \0 chars
in other bindings
mostly just a string, since most languages except for C
permit strings to contain any 8 bit data
Richard Jones [Thu, 20 May 2010 09:11:18 +0000 (10:11 +0100)]
fish: Fix build error if built without readline.
fish.c:1447: error: 'add_history_line' defined but not used [-Wunused-function]
(Reported by Matt Booth)
Richard Jones [Tue, 18 May 2010 22:18:35 +0000 (23:18 +0100)]
appliance: Fix /etc/resolv.conf
Since changing to use link local address
(commit
fbf29976b33a69c64dc7847c54454bf2cfa5fde6)
we have included an incorrect resolv.conf file in the appliance
which points to the old (qemu) DNS server. This commit changes
to use the new DNS server.
Richard Jones [Tue, 18 May 2010 20:54:17 +0000 (21:54 +0100)]
Update BUGS.
Daniel Cabrera [Tue, 18 May 2010 13:38:57 +0000 (14:38 +0100)]
Update Spanish translations (RHBZ#593292).
Richard Jones [Tue, 18 May 2010 09:02:02 +0000 (10:02 +0100)]
appliance: Ignore utempter unreadable binaries (for RHEL 6).
Richard Jones [Tue, 18 May 2010 09:01:45 +0000 (10:01 +0100)]
appliance: Change comment about unreadable binaries.
Richard Jones [Sat, 15 May 2010 19:54:26 +0000 (20:54 +0100)]
Version 1.3.13.
Richard Jones [Sat, 15 May 2010 12:49:55 +0000 (13:49 +0100)]
Update BUGS
Richard Jones [Sat, 15 May 2010 07:44:04 +0000 (08:44 +0100)]
Update PO files.
Richard Jones [Sat, 15 May 2010 07:43:02 +0000 (08:43 +0100)]
Generate BUGS file from Red Hat Bugzilla database.
Add a script which generates the 'BUGS' file from Red Hat Bugzilla.
This is run whenever we do 'make dist' and deliberately stored in git.
Richard Jones [Fri, 14 May 2010 18:42:48 +0000 (19:42 +0100)]
virt-df: Display domains in sorted order.
Richard Jones [Fri, 14 May 2010 16:41:39 +0000 (17:41 +0100)]
Updated Spanish translations (RHBZ#592360).