search for: _init_selinux

Displaying 12 results from an estimated 12 matches for "_init_selinux".

2010 May 14
1
[PATCH] Rely on new augeas lens for modules.conf and conf.modules
...d, 8 insertions(+), 12 deletions(-) diff --git a/lib/Sys/VirtV2V/GuestOS/RedHat.pm b/lib/Sys/VirtV2V/GuestOS/RedHat.pm index 77f0f3a..1a7afbd 100644 --- a/lib/Sys/VirtV2V/GuestOS/RedHat.pm +++ b/lib/Sys/VirtV2V/GuestOS/RedHat.pm @@ -87,6 +87,7 @@ sub new bless($self, $class); $self->_init_selinux(); + $self->_init_modules(); $self->_init_augeas(); return $self; @@ -168,10 +169,9 @@ sub _init_selinux $g->touch('/.autorelabel'); } -sub _init_augeas +sub _init_modules { my $self = shift; - my $g = $self->{g}; # Check how new modules...
2010 Apr 29
1
[PATCH] GuestOS: Fix augeas grub configuration
...d, 17 insertions(+), 8 deletions(-) diff --git a/lib/Sys/VirtV2V/GuestOS/RedHat.pm b/lib/Sys/VirtV2V/GuestOS/RedHat.pm index 6dc4c95..a4680c5 100644 --- a/lib/Sys/VirtV2V/GuestOS/RedHat.pm +++ b/lib/Sys/VirtV2V/GuestOS/RedHat.pm @@ -87,7 +87,7 @@ sub new bless($self, $class); $self->_init_selinux(); - $self->_init_augeas_modprobe(); + $self->_init_augeas(); return $self; } @@ -107,7 +107,7 @@ sub _init_selinux $g->touch('/.autorelabel'); } -sub _init_augeas_modprobe +sub _init_augeas { my $self = shift; @@ -158,15 +158,24 @@ sub _init_augeas_mo...
2011 Apr 26
7
[PATCH 1/7] Push $desc creation into Sys::VirtConvert::Converter->convert
This change is part of an ongoing effort to remove use of $desc and inspect the OS directly as required during conversion. --- lib/Sys/VirtConvert/Connection/LibVirtTarget.pm | 4 +- lib/Sys/VirtConvert/Connection/RHEVTarget.pm | 41 +++++++++--------- lib/Sys/VirtConvert/Converter.pm | 35 ++++++++++++---- lib/Sys/VirtConvert/Converter/RedHat.pm | 45
2010 May 13
1
[PATCH] Improve augeas error reporting
...ned($detail{lens})) { + $msg .= __x("augeas lens: {lens}", + lens => $detail{lens})."\n"; + } + } + + chomp($msg); + + die(user_message($msg)) if (length($msg) > 0); + die($err); +} + # Handle SELinux for the guest sub _init_selinux { @@ -185,7 +238,7 @@ sub _init_augeas }; # The augeas calls will die() on any error. - die($@) if($@); + $self->_augeas_error($@) if ($@); } =item enable_kernel_module(device, module) @@ -209,7 +262,7 @@ sub enable_kernel_module }; # Propagate augeas errors -...
2013 Sep 24
0
[PATCH 3/4] Add SUSE converter
...nfig + +An initialised Sys::VirtConvert::Config + +=item meta + +Guest metadata. + +=item options + +A hashref of options which can influence the conversion + +=back + +=cut + +sub convert +{ + my $class = shift; + + my ($g, $root, $config, $meta, $options) = @_; + + _clean_rpmdb($g); + _init_selinux($g); + _init_augeas($g); + + my $grub; + $grub = eval + { Sys::VirtConvert::Converter::SUSE::Grub2->new($g, $root, $config) }; + $grub = eval + { Sys::VirtConvert::Converter::SUSE::GrubLegacy->new($g, $root) } + unless defined($grub); + v2vdie __('No gr...
2010 Jul 28
3
Create new Sys::VirtV2V::Util
These 2 patches are mostly code motion. They were prompted by an apparent augeas error in BZ 613967 which didn't display useful error message. The error seems to happen in Converter::Linux. GuestOS::RedHat had a handy function which displayed verbose augeas error messages. This function moves into the new module where it can be used by both modules. The second patch is an consequential tidy
2013 Sep 24
5
[PATCH 0/4] Add SUSE guest converter to virt-v2v
This is a new conversion module to convert SUSE Linux and openSUSE guests. The converter is based on the RedHat module, and should offer the same functionality on both SUSE and RedHat hosts. There are a few additional messages in this module, such as reporting of packages when installing through zypper or the local virt-v2v repo. These messages don't necessarily flow unless verbose switches
2013 Oct 03
2
[PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...nfig + +An initialised Sys::VirtConvert::Config + +=item meta + +Guest metadata. + +=item options + +A hashref of options which can influence the conversion + +=back + +=cut + +sub convert +{ + my $class = shift; + + my ($g, $root, $config, $meta, $options) = @_; + + _clean_rpmdb($g); + _init_selinux($g); + _init_augeas($g); + + my $grub; + $grub = eval + { Sys::VirtConvert::Converter::Linux::Grub2->new($g, $root, $config) }; + $grub = eval + { Sys::VirtConvert::Converter::Linux::GrubLegacy->new($g, $root) } + unless defined($grub); + v2vdie __('No gr...
2013 Sep 25
5
Re: [PATCH 3/4] Add SUSE converter
...It removes the call to aug_save(). In fact, I have a sneaking suspicion I may have fixed this in RedHat.pm since you forked RedHat.pm. > +sub convert > +{ > + my $class = shift; > + > + my ($g, $root, $config, $meta, $options) = @_; > + > + _clean_rpmdb($g); > + _init_selinux($g); > + _init_augeas($g); > + > + my $grub; > + $grub = eval > + { Sys::VirtConvert::Converter::SUSE::Grub2->new($g, $root, $config) }; > + $grub = eval > + { Sys::VirtConvert::Converter::SUSE::GrubLegacy->new($g, $root) } > + unless d...
2013 Oct 07
3
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
On Friday, October 04, 2013 09:38:58 AM Matthew Booth wrote: > It's specifically an error if we're attempting to configure virtio, and > there's no detected virtio kernel. It shouldn't have been possible to > get here in that state, hence it's a programmer error. The code below > attempts to install *any* kernel in the case that we aren't configuring >
2011 Mar 11
2
[PATCH 1/2] Allow reading more data than the reported size of a volume
If a volume is not an exact multiple of 512 bytes, qemu-img will report its size rounded down to a 512 byte boundary. However, when copying, the file is still read until EOF, which will return more data than was expected. This change prevents that causing a failure in itself. The situation is still not resolved, however, as there are still situations where this will cause a failure. For example,
2013 Oct 11
2
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...= _get_display_driver($g, $root); + _configure_display_driver($g, $root, $config, $meta, $grub, $driver); + _remap_block_devices($meta, $virtio, $g, $root, $grub); _configure_kernel_modules($g, $virtio); _configure_boot($kernel, $virtio, $g, $root, $grub); @@ -647,8 +749,9 @@ sub _init_selinux # Assume SELinux isn't in use if load_policy isn't available return if(!$g->exists('/usr/sbin/load_policy')); - # Actually loading the policy has proven to be problematic. We make whatever - # changes are necessary, and make the guest relabel on the next boot....