diff options
author | Yanfei Xu <yanfei.xu@windriver.com> | 2020-09-17 19:38:53 +0800 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2020-09-21 17:32:39 -0400 |
commit | 58765bd2c99458d4cbb71a1745aeb28718f195f6 (patch) | |
tree | 61b2ea459644fbadd11f54517791445dde77da19 | |
parent | 80058c0bee61f90278ea5790e66e2e554ba2efeb (diff) | |
download | meta-virtualization-58765bd2c99458d4cbb71a1745aeb28718f195f6.tar.gz |
libvirt: Use /run in replace of /var/run in libvirt
To avoid systemd complains that the libvirt unit files use legacy
directory, we configure the libvirt with '--with-runstatedir=/run'
and do some minor changes.
------------------cut here----------------------
014: systemd[1]: /lib/systemd/system/virtlogd.socket:6: ListenStream=
references a path below legacy directory /var/run/, updating
/var/run/libvirt/virtlogd-sock → /run/libvirt/virtlogd-sock; please
update the unit file accordingly.
014: systemd[1]: /lib/systemd/system/virtlogd-admin.socket:8:
ListenStream= references a path below legacy directory /var/run/,
updating /var/run/libvirt/virtlogd-admin-sock →
/run/libvirt/virtlogd-admin-sock; please update the unit file
accordingly.
014: systemd[1]: /lib/systemd/system/virtlockd.socket:6: ListenStream=
references a path below legacy directory /var/run/, updating
/var/run/libvirt/virtlockd-sock → /run/libvirt/virtlockd-sock; please
update the unit file accordingly.
014: systemd[1]: /lib/systemd/system/virtlockd-admin.socket:8:
ListenStream= references a path below legacy directory /var/run/,
updating /var/run/libvirt/virtlockd-admin-sock →
/run/libvirt/virtlockd-admin-sock; please update the unit file
accordingly.
014: systemd[1]: /lib/systemd/system/libvirtd.socket:9: ListenStream=
references a path below legacy directory /var/run/, updating
/var/run/libvirt/libvirt-sock → /run/libvirt/libvirt-sock; please update
the unit file accordingly.
014: systemd[1]: /lib/systemd/system/libvirtd-ro.socket:11:
ListenStream= references a path below legacy directory /var/run/,
updating /var/run/libvirt/libvirt-sock-ro →
/run/libvirt/libvirt-sock-ro; please update the unit file accordingly.
......
Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | recipes-extended/libvirt/libvirt_6.3.0.bb | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/recipes-extended/libvirt/libvirt_6.3.0.bb b/recipes-extended/libvirt/libvirt_6.3.0.bb index 08e2961c..eeb1bf8a 100644 --- a/recipes-extended/libvirt/libvirt_6.3.0.bb +++ b/recipes-extended/libvirt/libvirt_6.3.0.bb | |||
@@ -283,23 +283,23 @@ do_install_append() { | |||
283 | 283 | ||
284 | # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities. | 284 | # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities. |
285 | sed -i -e 's/Type=notify/Type=forking/' \ | 285 | sed -i -e 's/Type=notify/Type=forking/' \ |
286 | -e '/Type=forking/a PIDFile=${localstatedir}/run/libvirtd.pid' \ | 286 | -e '/Type=forking/a PIDFile=/run/libvirtd.pid' \ |
287 | ${D}/${systemd_unitdir}/system/libvirtd.service | 287 | ${D}/${systemd_unitdir}/system/libvirtd.service |
288 | fi | 288 | fi |
289 | 289 | ||
290 | # The /var/run/libvirt directories created by the Makefile | 290 | # The /run/libvirt directories created by the Makefile are |
291 | # are wiped out in volatile, we need to create these at boot. | 291 | # wiped out in volatile, we need to create these at boot. |
292 | rm -rf ${D}${localstatedir}/run | 292 | rm -rf ${D}/run |
293 | install -d ${D}${sysconfdir}/default/volatiles | 293 | install -d ${D}${sysconfdir}/default/volatiles |
294 | echo "d root root 0755 ${localstatedir}/run/libvirt none" \ | 294 | echo "d root root 0755 /run/libvirt none" \ |
295 | > ${D}${sysconfdir}/default/volatiles/99_libvirt | 295 | > ${D}${sysconfdir}/default/volatiles/99_libvirt |
296 | echo "d root root 0755 ${localstatedir}/run/libvirt/lockd none" \ | 296 | echo "d root root 0755 /run/libvirt/lockd none" \ |
297 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt | 297 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt |
298 | echo "d root root 0755 ${localstatedir}/run/libvirt/lxc none" \ | 298 | echo "d root root 0755 /run/libvirt/lxc none" \ |
299 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt | 299 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt |
300 | echo "d root root 0755 ${localstatedir}/run/libvirt/network none" \ | 300 | echo "d root root 0755 /run/libvirt/network none" \ |
301 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt | 301 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt |
302 | echo "d root root 0755 ${localstatedir}/run/libvirt/qemu none" \ | 302 | echo "d root root 0755 /run/libvirt/qemu none" \ |
303 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt | 303 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt |
304 | 304 | ||
305 | # Manually set permissions and ownership to match polkit recipe | 305 | # Manually set permissions and ownership to match polkit recipe |
@@ -379,6 +379,7 @@ do_install_append() { | |||
379 | EXTRA_OECONF += " \ | 379 | EXTRA_OECONF += " \ |
380 | --with-init-script=systemd \ | 380 | --with-init-script=systemd \ |
381 | --with-test-suite \ | 381 | --with-test-suite \ |
382 | --with-runstatedir=/run \ | ||
382 | " | 383 | " |
383 | 384 | ||
384 | # gcc9 end up mis-compiling qemuxml2argvtest.o with Og which then | 385 | # gcc9 end up mis-compiling qemuxml2argvtest.o with Og which then |