All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-virtualization][PATCH] libvirt: Use /run in replace of /var/run in libvirt
@ 2020-09-17 11:38 Xu, Yanfei
  2020-09-21 21:32 ` Bruce Ashfield
  0 siblings, 1 reply; 2+ messages in thread
From: Xu, Yanfei @ 2020-09-17 11:38 UTC (permalink / raw)
  To: meta-virtualization

From: Yanfei Xu <yanfei.xu@windriver.com>

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>
---
 recipes-extended/libvirt/libvirt_6.3.0.bb | 19 ++++++++++---------
 1 file 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 70c6d71..41abb06 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() {
 
 	    # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities.
 	    sed -i -e 's/Type=notify/Type=forking/' \
-	           -e '/Type=forking/a PIDFile=${localstatedir}/run/libvirtd.pid' \
+	           -e '/Type=forking/a PIDFile=/run/libvirtd.pid' \
 		   ${D}/${systemd_unitdir}/system/libvirtd.service
 	fi
 
-	# The /var/run/libvirt directories created by the Makefile
-	# are wiped out in volatile, we need to create these at boot.
-	rm -rf ${D}${localstatedir}/run
+	# The /run/libvirt directories created by the Makefile are 
+	# wiped out in volatile, we need to create these at boot.
+	rm -rf ${D}/run
 	install -d ${D}${sysconfdir}/default/volatiles
-	echo "d root root 0755 ${localstatedir}/run/libvirt none" \
+	echo "d root root 0755 /run/libvirt none" \
 	     > ${D}${sysconfdir}/default/volatiles/99_libvirt
-	echo "d root root 0755 ${localstatedir}/run/libvirt/lockd none" \
+	echo "d root root 0755 /run/libvirt/lockd none" \
 	     >> ${D}${sysconfdir}/default/volatiles/99_libvirt
-	echo "d root root 0755 ${localstatedir}/run/libvirt/lxc none" \
+	echo "d root root 0755 /run/libvirt/lxc none" \
 	     >> ${D}${sysconfdir}/default/volatiles/99_libvirt
-	echo "d root root 0755 ${localstatedir}/run/libvirt/network none" \
+	echo "d root root 0755 /run/libvirt/network none" \
 	     >> ${D}${sysconfdir}/default/volatiles/99_libvirt
-	echo "d root root 0755 ${localstatedir}/run/libvirt/qemu none" \
+	echo "d root root 0755 /run/libvirt/qemu none" \
 	     >> ${D}${sysconfdir}/default/volatiles/99_libvirt
 
 	# Manually set permissions and ownership to match polkit recipe
@@ -379,6 +379,7 @@ do_install_append() {
 EXTRA_OECONF += " \
     --with-init-script=systemd \
     --with-test-suite \
+    --with-runstatedir=/run \
     "
 
 # gcc9 end up mis-compiling qemuxml2argvtest.o with Og which then
-- 
2.18.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [meta-virtualization][PATCH] libvirt: Use /run in replace of /var/run in libvirt
  2020-09-17 11:38 [meta-virtualization][PATCH] libvirt: Use /run in replace of /var/run in libvirt Xu, Yanfei
@ 2020-09-21 21:32 ` Bruce Ashfield
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2020-09-21 21:32 UTC (permalink / raw)
  To: Xu, Yanfei; +Cc: meta-virtualization

merged.

Bruce

In message: [meta-virtualization][PATCH] libvirt: Use /run in replace of /var/run in libvirt
on 17/09/2020 Xu, Yanfei wrote:

> From: Yanfei Xu <yanfei.xu@windriver.com>
> 
> 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>
> ---
>  recipes-extended/libvirt/libvirt_6.3.0.bb | 19 ++++++++++---------
>  1 file 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 70c6d71..41abb06 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() {
>  
>  	    # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities.
>  	    sed -i -e 's/Type=notify/Type=forking/' \
> -	           -e '/Type=forking/a PIDFile=${localstatedir}/run/libvirtd.pid' \
> +	           -e '/Type=forking/a PIDFile=/run/libvirtd.pid' \
>  		   ${D}/${systemd_unitdir}/system/libvirtd.service
>  	fi
>  
> -	# The /var/run/libvirt directories created by the Makefile
> -	# are wiped out in volatile, we need to create these at boot.
> -	rm -rf ${D}${localstatedir}/run
> +	# The /run/libvirt directories created by the Makefile are 
> +	# wiped out in volatile, we need to create these at boot.
> +	rm -rf ${D}/run
>  	install -d ${D}${sysconfdir}/default/volatiles
> -	echo "d root root 0755 ${localstatedir}/run/libvirt none" \
> +	echo "d root root 0755 /run/libvirt none" \
>  	     > ${D}${sysconfdir}/default/volatiles/99_libvirt
> -	echo "d root root 0755 ${localstatedir}/run/libvirt/lockd none" \
> +	echo "d root root 0755 /run/libvirt/lockd none" \
>  	     >> ${D}${sysconfdir}/default/volatiles/99_libvirt
> -	echo "d root root 0755 ${localstatedir}/run/libvirt/lxc none" \
> +	echo "d root root 0755 /run/libvirt/lxc none" \
>  	     >> ${D}${sysconfdir}/default/volatiles/99_libvirt
> -	echo "d root root 0755 ${localstatedir}/run/libvirt/network none" \
> +	echo "d root root 0755 /run/libvirt/network none" \
>  	     >> ${D}${sysconfdir}/default/volatiles/99_libvirt
> -	echo "d root root 0755 ${localstatedir}/run/libvirt/qemu none" \
> +	echo "d root root 0755 /run/libvirt/qemu none" \
>  	     >> ${D}${sysconfdir}/default/volatiles/99_libvirt
>  
>  	# Manually set permissions and ownership to match polkit recipe
> @@ -379,6 +379,7 @@ do_install_append() {
>  EXTRA_OECONF += " \
>      --with-init-script=systemd \
>      --with-test-suite \
> +    --with-runstatedir=/run \
>      "
>  
>  # gcc9 end up mis-compiling qemuxml2argvtest.o with Og which then
> -- 
> 2.18.2
> 

> 
> 
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-21 21:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-17 11:38 [meta-virtualization][PATCH] libvirt: Use /run in replace of /var/run in libvirt Xu, Yanfei
2020-09-21 21:32 ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.