[VirtualBox] Use systemd-detect-virt to detect if we can install

Sérgio Basto sergio at serjux.com
Tue Nov 29 19:41:58 CET 2016


Hi,

On Ter, 2016-11-29 at 14:17 +0100, Dominik 'Rathann' Mierzejewski
wrote:
> Hi Sérgio,
> could you explain the idea here? Why was there an explicit Conflicts:
> before and why is it better to fail the transaction if you're not
> running inside VirtualBox or KVM?

It is a long story, bug reports about this [2]. With this solution
(which took sometime to figure out), we can install VirtualBox-guest
and VirtualBox in a vm guest [1] I think in middle of bug 3425 , I
realize that the root of the problem is we can't install VirtualBox-
guest-additions in master (host) system because breaks X11, etc . 
So instead use an artificial rpm conflicts, BTW the solution was made
my me, it was already there when I arrived, I check in %pre if 

   $(systemd-detect-virt | grep -iP "oracle|kvm" -c) -eq 0

if systemd-detect-virt doesn't say that is in one oracle or kvm vm , I
don't let package (VirtualBox-guest-additions) be installed .

I also check kvm because in epel7 vbox vm, systemd-detect-virt says
that is in kvm instead oracle ...
 


More information about the rpmfusion-developers mailing list