1

While enabling libvirt in yocto, I am seeing below data file clash issue while building yocto image,

Below are the packages I am trying to append install to my yocto image

IMAGE_INSTALL_append = " \     
       packagegroup-core-boot \     
       qemu \     
       libvirt \     
       libvirt-libvirtd \     
       libvirt-virsh \     
       kernel-module-kvm \     
       kernel-module-kvm-intel \    
    " 

But I see below issue, when I build image enabling above packages,

`Collected errors:

  • check_data_file_clashes: Package iptables wants to install file /-/-/-/rootfs/etc/ethertypes But that file is already provided by package * ebtables`

FYI: I see that libvirt has both iptables and ebtables dependency.

can someone help on understanding this and how to resolve?

I tried to remove ebtables with PACKAGECONFIG_remove = "ebtables" and image is built but I when starting libvirtd service it is always in dead mode and I see some issue related to socket.

1 Answers1

1

Actually, this is a problem that has no solution except:

  1. Remove one of the packages (ebtables or iptables)

  2. Remove the file ethertypes from one of the recipes

libvirt depends on iptables on compile time only, so I did not know why iptables is present in the image ?

Anyways, it has a config on ebtables and from your comment when you removed it from PACKAGECONFIG it failed to work. So:

I suggest check if iptables is required by other package at run time, if not remove it.

If both are required in your case, then go for the second solution which is removing the file from one of the recipes, using a bbappend file for one of them:

The block that you may need to add is:

do_install_append() {
    rm ${D}/etc/ethertypes
}

either to:

  • meta-custom/recipes-filter/ebtables/ebtables_%.bbappend

or to:

  • meta-custom/recipes-extended/iptables/iptables_%.bbappend

NOTE

If you go for the second solution, you need to make sure that the file is not present in the FILES variable of the recipe that you will remove the file from, FILES_ebtables or FILES_iptables.

Talel BELHADJSALEM
  • 3,199
  • 1
  • 10
  • 30
  • Thank you for detailed answer, build is success now. I removed ethertypes file from iptables but still see some socket issue, when livirtd is getting started, libvirtd is always dead or inactive # virsh list error: failed to connect to the hypervisor error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory #ls /var/run/libvirt/ interface network virtlockd-sock virtlogd-sock – Deekshith Reddy Mar 24 '22 at 05:59
  • If my solution solved your problem, kindly accept it as correct one, otherwise your new issue should be in a separate question. – Talel BELHADJSALEM Mar 24 '22 at 10:00