| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libguestfs-supermin-helper was previously a shell script. Although
we had steadily optimized it, there were a number of intractable
hot spots:
(1) cpio still reads input files in 512 byte chunks; this is *very*
pessimal behaviour, particularly when SELinux is enabled.
(2) the hostfiles globbing was done very inefficiently by the shell,
with the shell rereading the same directory over and over again.
This is a rewrite of this shell script in C. It is approximately
3 times faster without SELinux, and has an even greater speed difference
with SELinux.
The main features are:
(a) It never frees memory, making it simpler. The program is designed
to run and exit in sub-second times, so this is acceptable.
(b) It caches directory reads, making the globbing of host files much
faster (measured this as ~ 4 x speed up).
(c) It doesn't use external cpio, but instead contains code to write
newc format cpio files, which is all that the kernel can read. Unlike
cpio, this code uses large buffers for reads and writes.
(d) Ignores missing or unreadable hostfiles, whereas cpio gave a
warning.
(e) Checks all return values from system calls.
(f) With --verbose flag, it will print messages timing itself.
This passes all tests.
Updated with feedback from Jim Meyering.
|
|
|
|
|
|
| |
Change guestfish so it uses xstrtoll to parse Int (31 bit)
parameters. This fixes two bugs on 32 bit platforms which
failed when long = 32 bits. long long = 64 bits on both.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ntfs-3g project keeps bumping their soname, and this causes
dependency problems for the Fedora package. The root of the problem
is we depend on /lib/libntfs-3g.so.<N>, but if <N> keeps bumping,
the dependency keeps breaking.
This commit changes the hostfiles (and hence dependency) to be on
/lib/libntfs-3g.so.* instead. The downside to this is we could end
up pulling more files into the appliance than are strictly required,
but it will fix the Fedora packaging problems being felt by the
Fedora maintainer of ntfs-3g.
After applying this commit, the change to hostfiles looks like this:
@@ -1489,7 +1489,7 @@
./lib/libpam_misc.so.0
./lib/libdmraid.so
./lib/libidn.so.11
-./lib/libntfs-3g.so.74
+./lib/libntfs-3g.so.*
./lib/libext2fs.so.2.*
./lib/libpam.so.0
./lib/libsepol.so.1
@@ -1520,7 +1520,6 @@
./lib/libnss_files-*.so
./lib/libgio-2.0.so.0
./lib/libpam_misc.so.0.*
-./lib/libntfs-3g.so.74.*
./lib/libanl.so.1
./lib/libdevmapper-event-lvm2.so.2.*
./lib/libpthread.so.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes substantially the way that we get information
about Windows guests. We now use the Windows Registry to get
information such as the version, product name and much else.
This uses Win::Hivex (ie. the hivex library). 'reged' is no longer
needed or used.
As an incidental change, this also tries harder to search for
%systemroot%, in the case when we cannot find boot.ini (ie.
Windows Vista and more recent). This ensures we can get more
detail from those versions of Windows.
|
|
|
|
|
|
| |
This is a free text string containing the "product name" of
the OS. It's mainly useful for Windows guests, and a forthcoming
patch will get this field from the Windows Registry.
|
|
|
|
| |
ie. on Windows.
|
|
|
|
| |
This ensures the list of applications is stable.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 457fccae1b665347 was not a complete fix, in that it
didn't work properly on RHEL 5 era bash (3.2.x). For example:
file=libntfs-3g.so.74
[[ "$file" =~ ^lib(.*)\.so\.([0-9]+)\. ]] && \
echo "lib${BASH_REMATCH[1]}.so.${BASH_REMATCH[2]}.*"
would on those old shells print:
libntfs-3g.so.7.*
It seems the final \. was being treated as a plain period (ie.
match anything).
The only way to work around this incompatibility is to assign the
patterns to variables and match on those, ie:
p='^lib(.*)\.so\.([0-9]+)\.'
[[ "$file" =~ $p ]] && ...
This works in both old and new shells.
|
|
|
|
| |
Update PO files.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Bash changed how the =~ operator worked, see bash FAQ question
E14 http://tiswww.case.edu/php/chet/bash/FAQ and
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487387#25
(RHBZ#566511).
This also stops stray "builddir" (yum database) files being
incorporated into supermin hostfiles in Koji (RHBZ#566512).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hi,
attached patch adds the code to list applications installed in Debian
based vm images.
Cheers,
-- Guido
>From 9427a14725b33415058a0713923c62bd231504ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Tue, 23 Feb 2010 21:05:02 +0100
Subject: [PATCH 2/2] Add application listing for Debian
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hi,
Minor nitpick: the Debian folks usually refer to deb as the package format not dpkg.
Cheers,
-- Guido
>From 7a9665d40e0a3109833de10f17831ae06fc8885a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Tue, 23 Feb 2010 21:04:37 +0100
Subject: [PATCH 1/2] Debina package format is called 'deb' not 'dpkg'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Tue, Feb 23, 2010 at 08:07:14PM +0100, Guido Günther wrote:
> On Tue, Feb 23, 2010 at 07:52:43PM +0100, Guido Günther wrote:
> > Hi,
> > attached patch makes virt-inspector find the kernels on Debian systems.
> > Since there is no /etc/grub.conf it falls back to
> > $grubpartition/grub/menu.lst.
> Patch got somehow broken. New version fortchcoming. Sorry for the noise.
Attached now. No idea where the 'if' went in the first version ;)
-- Guido
>From d30b4946f017ff8bde9d4ff62f93c418a707d9e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Tue, 23 Feb 2010 19:50:40 +0100
Subject: [PATCH] Check for grub/menu.lst if /etc/grub.conf can't be found
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hi,
attached patch should make:
http://git.debian.org/?p=pkg-libvirt/libguestfs.git;a=blob;f=debian/patches/0003-appliance-Use-service-udev-start-instead-of-running-.patch;h=c9e6b8489807d4fb1247cb6a8b6f9799bad2a09e;hb=d3a21b5b6850fc3c6e7903d0f5cafa3eb4197d49
http://git.debian.org/?p=pkg-libvirt/libguestfs.git;a=blob;f=debian/patches/0004-Ubuntu-Prefer-starting-udev-by-hand-instead-of-using.patch;h=64b65a971b186e6ab1c9351e94b46d6f5aa242e0;hb=d3a21b5b6850fc3c6e7903d0f5cafa3eb4197d49
superflous. If there's an init script it uses 'service' or falls back to
calling the init script directly if it isn't there, otherwise it starts
udev directly. Tested on Debian only so far. The patch is based on
Rich's above two patches.
Cheers,
-- Guido
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Tue, 23 Feb 2010 18:49:34 +0100
Subject: [PATCH] Check for service and use it if it's there
Based on Richard's two patches for the Ubuntu build.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit makes the semi-independent hivex library into a
separate upstream project. The git repo for hivex is now:
http://git.annexia.org/?p=hivex.git;a=summary
Downloads of hivex are available here:
http://libguestfs.org/download/
All questions, patches, bugs etc should be sent to the libguestfs
mailing list and bug tracker.
|
| |
|
|
|
|
|
| |
These were being interpreted as signed chars, and thus printed
as "ffffff80" etc.
|
|
|
|
| |
These were 'use'd but not actually used.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
We originally intended to implement an FTP server (and before
than, an NFS server). But we didn't implement either. We
did however implement a FUSE service (guestmount) which takes
the place of both.
|
|
|
|
|
|
| |
Since we have to compile with -Wno-unused-variables, we don't
spot unused variables in code. I found these by compiling the
code in Ubuntu.
|
|
|
|
|
| |
These are useful for Debian since they keep the tarball unpacked
in git.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The RPC stubs already prefix the command name to error messages.
The daemon doesn't have to do this. As a (small) benefit this also
makes the daemon slightly smaller.
Code in the daemon such as:
if (argv[0] == NULL) {
reply_with_error ("passed an empty list");
return NULL;
}
now results in error messages like this:
><fs> command ""
libguestfs: error: command: passed an empty list
(whereas previously you would have seen ..command: command:..)
|
|
|
|
|
|
|
| |
The command name is already being added by the RPC stubs, so
adding it again in Perl and C# just results in doubled error messages
like:
foo: foo: the error
|
|
|
|
| |
This allows you to override the default QEMU block device emulation.
|
|
|
|
|
|
|
|
|
| |
Remove the ability to pass freeform parameters to Sys::Virt->new.
We don't use it, it makes the code more complex to modify, and
indeed there are no other args that Sys::Virt->new supports so
this would never be used.
Also change $readwrite to $rw to match parameter name.
|
|
|
|
|
|
|
|
|
|
|
| |
The default if=... comes from configure time (currently it
defaults to if=virtio).
This change allows you to set the QEMU block emulation.
We don't think this will be used very often, but virt-v2v
requires it in order to work around a subtle problem with
running 'mkinitrd' in an appliance attached to a guest.
|
| |
|
|
|
|
| |
See also RHBZ#563450 (NB: This commit does not fix the bug).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
guestfs_mount adds -o sync implicitly. This causes a very large
performance problem for write-intensive programs (eg. virt-v2v).
Document this as a "gotcha".
Change the tests, guestfish, Sys::Guestfs::Lib, guestmount to use
mount-options instead.
(Note that this gotcha does not affect mount-ro).
The source of the performance problem was first identified by
Matthew Booth.
|
|
|
|
|
|
|
|
| |
If the version of qemu being used supports -enable-kvm option,
then check if /dev/kvm is openable and add this option.
I have found this option makes no difference, although it is
*supposed* to enable KVM (hardware virtualization) support.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Previously this caused a serious performance regression,
but we believe this is now fixed:
https://bugzilla.redhat.com/show_bug.cgi?id=509383
|
| |
|