anchor.diff:  		${D}${sysconfdir}/sysconfig \
   		${D}${libdir}/sysctl.d \
   		${D}${localstatedir}/run
  +
  +	# Base on debian/libvirt-daemon-system.dirs
  +	install -d ${D}${localstatedir}/lib/libvirt/boot \
  +	           ${D}${localstatedir}/lib/libvirt/images \
  +	           ${D}${localstatedir}/lib/libvirt/channel/target \
  +	           ${D}${localstatedir}/lib/libvirt/sanlock \
  +	           ${D}${localstatedir}/cache/libvirt/qemu \
  +	           ${D}${localstatedir}/log/libvirt/qemu \
  +	           ${D}${localstatedir}/log/libvirt/uml \
  +	           ${D}${localstatedir}/log/libvirt/lxc \
  +	           ${D}${localstatedir}/lib/polkit-1/localauthority/10-vendor.d/
   }
  +# Base on debian/libvirt-daemon-system.postinst
  +pkg_postinst_${PN}-daemon-system() {
  +    add_statoverrides()
  +    {
  +        ROOT_DIRS="\
  +            $D${localstatedir}/lib/libvirt/images/ \
  +            $D${localstatedir}/lib/libvirt/boot/   \
  +            $D${localstatedir}/cache/libvirt/      \
  +        "
  +
  +        QEMU_DIRS="\
  +             $D${localstatedir}/lib/libvirt/qemu/   \
  +             $D${localstatedir}/cache/libvirt/qemu/ \
  +             $D${localstatedir}/lib/libvirt/qemu/channel/ \
  +             $D${localstatedir}/lib/libvirt/qemu/channel/target/ \
  +        "
  +
  +        SANLOCK_DIR="$D${localstatedir}/lib/libvirt/sanlock"
  +
  +        QEMU_CONF="$D${sysconfdir}/libvirt/qemu.conf"
  +
  +        for dir in ${ROOT_DIRS}; do
  +            [ ! -e "${dir}" ] || chown root:root "${dir}"
  +            [ ! -e "${dir}" ] || chmod 0711 "${dir}"
  +        done
  +
  +        for dir in ${QEMU_DIRS}; do
  +            [ ! -e "${dir}" ] || chown libvirt-qemu:libvirt-qemu "${dir}"
  +            [ ! -e "${dir}" ] || chmod 0750 "${dir}"
  +        done
  +
  +        [ ! -e "${SANLOCK_DIR}" ] || chown root:root "${SANLOCK_DIR}"
  +        [ ! -e "${SANLOCK_DIR}" ] || chmod 0700 "${SANLOCK_DIR}"
  +
  +        [ ! -e "${QEMU_CONF}" ] || chown root:root "${QEMU_CONF}"
  +        [ ! -e "${QEMU_CONF}" ] || chmod 0600 "${QEMU_CONF}"
  +    }
  +    add_statoverrides
  +    # Make sure the directories don't get removed on package removal since
  +    # logrotate chokes otherwise.
  +    for dir in qemu uml lxc; do
  +        touch $D${localstatedir}/log/libvirt/"${dir}"/.placeholder
  +    done
  +
  +    # Force refresh of capabilties (#731815)
  +    rm -f $D${localstatedir}/cache/libvirt/qemu/capabilities/*.xml
  +}
  +USERADD_PACKAGES = "${PN}-daemon-system"
  +GROUPADD_PARAM_${PN}-daemon-system = "-r libvirt; -r kvm; -r libvirt-qemu"
  +USERADD_PARAM_${PN}-daemon-system = "-r -g libvirt-qemu -G kvm --home-dir /var/lib/libvirt \
  +                              --no-create-home libvirt-qemu \
  +                              "
   ALLOW_EMPTY_${PN}-bin = "1"
   PACKAGES =+ "${PN}-bin ${PN}-clients ${PN}-daemon-system ${PN}-daemon"
   FILES_${PN}-bin = ""
  
positive.code: RDEPENDS_${PN}-bin += "${PN}-daemon-system ${PN}-clients"
  RDEPENDS_${PN}-daemon-system += "\
  	adduser ${PN}-clients ${PN}-daemon logrotate gettext-runtime"
  
  PKG_${PN} = "${PN}0"
  
negative.code: #	Remove trailing curly brace in patch without matching closing brace
  SRC_URI += "\
  	file://Disable-failing-virnetsockettest_debian.patch \
  	file://Fix-trailing-curly-brace-from-upstream-patch_debian.patch \
  	"
  
  inherit autotools gettext pkgconfig useradd
  
  EXTRA_OECONF += "\
          --with-storage-rbd \
  