Matthew Booth
2010-May-27 14:47 UTC
[Libguestfs] [PATCH 1/2] 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 --- perl/lib/Sys/Guestfs/Lib.pm | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index 2c5c837..128f7c9 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -1820,13 +1820,6 @@ sub _find_modprobe_aliases # Initialise augeas $g->aug_init("/", 16); - # Register additional paths to the Modprobe lens - $g->aug_set("/augeas/load/Modprobe/incl[last()+1]", "/etc/modules.conf"); - $g->aug_set("/augeas/load/Modprobe/incl[last()+1]", "/etc/conf.modules"); - - # Make augeas reload - $g->aug_load(); - my %modprobe_aliases; for my $pattern qw(/files/etc/conf.modules/alias -- 1.7.0.1
Matthew Booth
2010-May-27 14:47 UTC
[Libguestfs] [PATCH 2/2] Make the supermin appliance include local augeas lenses
--- appliance/Makefile.am | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/appliance/Makefile.am b/appliance/Makefile.am index 72dfc71..655bd2f 100644 --- a/appliance/Makefile.am +++ b/appliance/Makefile.am @@ -91,6 +91,9 @@ stamp-supermin: $(INITRAMFSIMG) mkdir -p supermin.d rm -f $@ supermin.d/base.img supermin.d/hostfiles febootstrap-to-supermin $(top_builddir)/initramfs supermin.d/base.img supermin.d/hostfiles + if grep -q /usr/share/augeas/lenses supermin.d/hostfiles; then \ + echo "./usr/share/augeas/lenses/*.aug" >> supermin.d/hostfiles; \ + fi touch $@ supermin.d/daemon.img: $(INITRAMFSIMG) -- 1.7.0.1
Richard W.M. Jones
2010-May-27 15:32 UTC
[Libguestfs] [PATCH 1/2] Rely on new augeas lens for modules.conf and conf.modules
ACK to both, and both now upstream. 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