Re: [Libguestfs] [libguestfs] remove non-portable chmod from libtool-kill-dependency_libs.sh (#10)

2014-01-21 Thread Richard W.M. Jones
On Tue, Jan 21, 2014 at 08:23:08PM +, Richard W.M. Jones wrote: > > Attaching the patch to the mailing list. > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones > Read my programming blog: http://rwmj.wordpress.com > Fedora now supports 80 OCaml

Re: [Libguestfs] [libguestfs] remove non-portable chmod from libtool-kill-dependency_libs.sh (#10)

2014-01-21 Thread Richard W.M. Jones
Attaching the patch to the mailing list. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) >From 08e271bc0f08814165425306b9a9265e37a06e63 M

Re: [Libguestfs] virt-builder & virt-sysprep: Avoiding SELinux relabelling

2014-01-21 Thread Richard W.M. Jones
On Tue, Jan 21, 2014 at 01:31:05PM -0500, R P Herrold wrote: > On Tue, 21 Jan 2014, Richard W.M. Jones wrote: > > > This could be because the kernel of the libguestfs appliance doesn't > > match the kernel of the guest. > > We also encounter such problems when re-labelling images not > matching

Re: [Libguestfs] virt-builder & virt-sysprep: Avoiding SELinux relabelling

2014-01-21 Thread R P Herrold
On Tue, 21 Jan 2014, Richard W.M. Jones wrote: > This could be because the kernel of the libguestfs appliance doesn't > match the kernel of the guest. We also encounter such problems when re-labelling images not matching the dom0 kernel distribution, and just accept the relabel delay (slow and

Re: [Libguestfs] [PATCH] builder: proper consider subkeys in index files

2014-01-21 Thread Richard W.M. Jones
On Tue, Jan 21, 2014 at 07:06:57PM +0100, Pino Toscano wrote: > The index files already allowed the 'key[subkey]=...' syntax for keys, > but considering such string as whole key. Proper split the parsing and > the handling of the subkeys, so they can be searched a bit easier. > > This causes no ac

[Libguestfs] [PATCH] builder: proper consider subkeys in index files

2014-01-21 Thread Pino Toscano
The index files already allowed the 'key[subkey]=...' syntax for keys, but considering such string as whole key. Proper split the parsing and the handling of the subkeys, so they can be searched a bit easier. This causes no actual behaviour changes, it is just internal micro-refactoring. (Thanks R

Re: [Libguestfs] [PATCH] builder: proper consider subkeys in index files

2014-01-21 Thread Pino Toscano
On Tuesday 21 January 2014 16:37:20 Richard W.M. Jones wrote: > On Tue, Jan 21, 2014 at 05:18:27PM +0100, Pino Toscano wrote: > > + sv = caml_copy_string (fields->subkey ? fields->subkey : ""); > > > >Store_field (v, 1, sv); > > Heh, sure would be nice if this was an option type :-)

Re: [Libguestfs] virt-builder & virt-sysprep: Avoiding SELinux relabelling

2014-01-21 Thread Richard W.M. Jones
On Tue, Jan 21, 2014 at 12:01:45PM -0500, R P Herrold wrote: > (5) it can do an additional step at very end of the post > install: > restorecon -R / This doesn't work on its own. I suspect this would work: load_policy && restorecon -R / except it gives an error for me: SELinux: Co

[Libguestfs] virt-builder & virt-sysprep: Avoiding SELinux relabelling

2014-01-21 Thread R P Herrold
On Tue, 21 Jan 2014, Richard W.M. Jones wrote: > A common problem that people have with virt-builder and virt-sysprep > is which guests that use SELinux, like Fedora and RHEL. In both cases > we touch /.autorelabel in the guest, which means the guest has to > reboot once during its first boot. .

Re: [Libguestfs] [PATCH] builder: allow more empty lines in index files

2014-01-21 Thread Richard W.M. Jones
On Tue, Jan 21, 2014 at 05:18:28PM +0100, Pino Toscano wrote: > Improve the index grammar tp allow more than one empty line between > sections, and to allow any number of empty lines at the end of the file > (after the last section). > --- > builder/index-parse.y | 12 +--- > 1 file change

Re: [Libguestfs] [PATCH] builder: proper consider subkeys in index files

2014-01-21 Thread Richard W.M. Jones
On Tue, Jan 21, 2014 at 05:18:27PM +0100, Pino Toscano wrote: > let entries = >List.map ( > fun (n, fields) -> > + let find_elem key subkey fields = > +match List.filter ( > +fun (iterkey, itersubkey, itervalue) -> > + iter

Re: [Libguestfs] [PATCH] builder: proper consider subkeys in index files

2014-01-21 Thread Richard W.M. Jones
On Tue, Jan 21, 2014 at 05:18:27PM +0100, Pino Toscano wrote: > + sv = caml_copy_string (fields->subkey ? fields->subkey : ""); >Store_field (v, 1, sv); Heh, sure would be nice if this was an option type :-) I believe the following should work: (1) Change CAMLlocal4 (..) at the top

[Libguestfs] [PATCH] builder: proper consider subkeys in index files

2014-01-21 Thread Pino Toscano
The index files already allowed the 'key[subkey]=...' syntax for keys, but considering such string as whole key. Proper split the parsing and the handling of the subkeys, so they can be searched a bit easier. This causes no actual behaviour changes, it is just internal micro-refactoring. --- buil

[Libguestfs] [PATCH] builder: allow more empty lines in index files

2014-01-21 Thread Pino Toscano
Improve the index grammar tp allow more than one empty line between sections, and to allow any number of empty lines at the end of the file (after the last section). --- builder/index-parse.y | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/builder/index-parse.y b/b

[Libguestfs] virt-builder & virt-sysprep: Avoiding SELinux relabelling

2014-01-21 Thread Richard W.M. Jones
A common problem that people have with virt-builder and virt-sysprep is which guests that use SELinux, like Fedora and RHEL. In both cases we touch /.autorelabel in the guest, which means the guest has to reboot once during its first boot. Recap: SELinux file labels -- SE

Re: [Libguestfs] Double fault panic in L2 upon v2v conversion

2014-01-21 Thread Rom Freiman
Hi, We all agree that it's not specific to virt-v2v. I managed to reproduce the same double fault on "normal" L2 boot - without libguestfs interference. And as Paolo wrote already, he will take a look at it. Thanks, Rom On Tue, Jan 21, 2014 at 3:05 PM, Richard W.M. Jones wrote: > On Tue, Jan

Re: [Libguestfs] Double fault panic in L2 upon v2v conversion

2014-01-21 Thread Richard W.M. Jones
On Tue, Jan 21, 2014 at 04:38:30PM +0100, Kashyap Chamarthy wrote: > On 01/17/2014 04:06 PM, Rom Freiman wrote: > > Kashyap, just to be sure - it happens to you during the v2v > > conversion? on L2? > > I haven't done any v2v conversions in L2 (or at any other level). I'm highly doubtful this pr

[Libguestfs] [PATCH 2/2] sysprep: Replace flags list with side_effects object.

2014-01-21 Thread Richard W.M. Jones
Previously callbacks would return a list of flags, such as [] or [`Created_files]. In this commit we introduce two new objects, filesystem_side_effects and device_side_effects (the latter is not used yet). The callbacks that create files now need to call side_effects#created_file () instead o

Re: [Libguestfs] [PATCH] builder: add index-struct.h as dependency for index-parser-c.c

2014-01-21 Thread Richard W.M. Jones
On Tue, Jan 21, 2014 at 10:56:32AM +0100, Pino Toscano wrote: > Just like with index-parse.h, also index-struct.h is a dependency of > index-parser-c.c which automake cannot generate correctly. > Thus, add it manually. > --- > builder/Makefile.am | 2 +- > 1 file changed, 1 insertion(+), 1 deletio

[Libguestfs] [PATCH 1/2] sysprep: Update comments.

2014-01-21 Thread Richard W.M. Jones
--- sysprep/sysprep_operation.mli | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysprep/sysprep_operation.mli b/sysprep/sysprep_operation.mli index 61dde72..eb89db4 100644 --- a/sysprep/sysprep_operation.mli +++ b/sysprep/sysprep_operation.mli @@ -16,14 +16,16 @@ * 51 Fr

Re: [Libguestfs] Libguestfs can't launch with one of the disk images in the RHEV cluster

2014-01-21 Thread Исаев Виталий Анатольевич
-Original Message- From: Federico Simoncelli [mailto:fsimo...@redhat.com] Sent: Friday, January 17, 2014 9:04 PM To: libguestfs@redhat.com Cc: Исаев Виталий Анатольевич Subject: Re: [Libguestfs] Libguestfs can't launch with one of the disk images in the RHEV cluster - Original Mes

Re: [Libguestfs] Double fault panic in L2 upon v2v conversion

2014-01-21 Thread Kashyap Chamarthy
On 01/17/2014 04:06 PM, Rom Freiman wrote: > Kashyap, just to be sure - it happens to you during the v2v > conversion? on L2? I haven't done any v2v conversions in L2 (or at any other level). PS: Sorry, I didn't notice my previous 2 emails didn't go to the list, that wasn't intended. Rich, you

[Libguestfs] [PATCH] builder: add index-struct.h as dependency for index-parser-c.c

2014-01-21 Thread Pino Toscano
Just like with index-parse.h, also index-struct.h is a dependency of index-parser-c.c which automake cannot generate correctly. Thus, add it manually. --- builder/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/Makefile.am b/builder/Makefile.am index fc4c552

Re: [Libguestfs] Double fault panic in L2 upon v2v conversion

2014-01-21 Thread Rom Freiman
Thanks Paolo, I'll be happy to help if needed. Rom On Mon, Jan 20, 2014 at 12:45 PM, Paolo Bonzini wrote: > Il 18/01/2014 23:01, Rom Freiman ha scritto: > > Hey everybody, > > Richard, you were right. I managed to reproduce the same crash without > > dealing with v2v (and libguestfs). > > Actu