Debian libguestfs packages updated
by Guido Günther
Hi,
I finally updated the Debian libguestfs packages:
http://honk.sigxcpu.org/con/Libguestfs__Virtual_Machine_Image_Swiss_Army_...
Sine we can't run the fuse tests easily in a chroot (since we might be
unable to load the module) I'm using the attached patch to skip the
tests if /dev/fuse doesn't exist. This probably isn't clean enough to go
upstream though.
The other patch adjusts the test output of rhbz557655. xstrtol seems to
be behaving differently here. I didn't investigate why yet.
As a last point: is there a simple way to disable the appliance build
altogether? I'd like to ship the Debian package without it so we stay
out of the security update trouble and provide them via http.
Cheers and thanks for that great tool,
-- Guido
14 years, 9 months
[PATCH] Non-working support for GObject Introspection.
by Richard W.M. Jones
Read the README file at the top of this patch first.
Problems I see with GObject Introspection:
(1) Requires that your code uses GObject; obvious in hindsight given
the name. In this case, it seems that we'd have to "register" the
guestfs_h structure with GObject (whatever that means).
(2) Cannot convert C error codes into exceptions automatically. So
all your high level code has to check return values -- ugh.
(3) Poor type system (although at least it does have a concept of
non-nullable types). For example, you cannot express 31 bit ints, or
range types, dependent types, constructed types, etc etc etc.
So I think it's OK if your code depends on glib, but for general C
interfaces I cannot see this catching on at the moment.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
14 years, 9 months
[PATCH] ExecHelper: Use tmpfile() instead of File::Temp->new()
by Matthew Booth
Building on EL-5 fails when the result of File::Temp->new() is passed to
open3(). tmpfile() works consistently.
---
lib/Sys/VirtV2V/ExecHelper.pm | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/Sys/VirtV2V/ExecHelper.pm b/lib/Sys/VirtV2V/ExecHelper.pm
index 110ae9f..f577ff6 100644
--- a/lib/Sys/VirtV2V/ExecHelper.pm
+++ b/lib/Sys/VirtV2V/ExecHelper.pm
@@ -20,7 +20,7 @@ package Sys::VirtV2V::ExecHelper;
use strict;
use warnings;
-use File::Temp;
+use File::Temp qw(:POSIX);
use IPC::Open3;
use POSIX ":sys_wait_h";
@@ -71,7 +71,7 @@ sub run
my $null;
open($null, '<', '/dev/null') or die("Failed to open /dev/null: $!");
- my $output = File::Temp->new();
+ my $output = tmpfile();
my $pid = open3($null, $output, $output, @command);
waitpid($pid, 0);
--
1.6.6.1
14 years, 9 months
[PATCH] ExecHelper: Code cleanup
by Matthew Booth
---
lib/Sys/VirtV2V/ExecHelper.pm | 18 +++++-------------
1 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/lib/Sys/VirtV2V/ExecHelper.pm b/lib/Sys/VirtV2V/ExecHelper.pm
index 87f6d06..110ae9f 100644
--- a/lib/Sys/VirtV2V/ExecHelper.pm
+++ b/lib/Sys/VirtV2V/ExecHelper.pm
@@ -68,25 +68,17 @@ sub run
my $self = {};
bless($self, $class);
- $self->{output} = File::Temp->new();
- $self->{status} = $self->_run(@command);
-
- return $self;
-}
-
-sub _run
-{
- my $self = shift;
- my @command = @_;
-
- my $output = $self->{output};
-
my $null;
open($null, '<', '/dev/null') or die("Failed to open /dev/null: $!");
+ my $output = File::Temp->new();
my $pid = open3($null, $output, $output, @command);
waitpid($pid, 0);
+
$self->{status} = $? >> 8;
+ $self->{output} = $output;
+
+ return $self;
}
=item status
--
1.6.6.1
14 years, 9 months