File 839a0608-virtlogd-lifecycle1.patch of Package libvirt

commit 839a060890d8b2408c0ea20e3c5997c7b2a4a079
Author: Andrea Bolognani <abologna@redhat.com>
Date:   Tue Sep 6 15:16:24 2016 +0200

    virtlogd.socket: Tie lifecycle to libvirtd.service
    
    We already guarantee that virtlogd.socket is enabled/disabled
    along with libvirtd.service, but if libvirtd.service has just
    been installed and is started before rebooting, then
    virtlogd.socket will not be running and guest startup will
    fail.
    
    Add Requires=virtlogd.socket to libvirtd.service to make sure
    virtlogd.socket is always started along with libvirtd.service,
    and add Before=libvirtd.service to both virtlogd.socket and
    virtlogd.service so that virtlogd never disappears before
    libvirtd has exited.
    
    Also add PartOf=libvirtd.service to both virtlogd.socket and
    virtlogd.service, so that virtlogd can be shut down when not
    needed.
    
    Resolves: https://bugzilla.redhat.com/1372576

Index: libvirt-2.0.0/daemon/libvirtd.service.in
===================================================================
--- libvirt-2.0.0.orig/daemon/libvirtd.service.in
+++ libvirt-2.0.0/daemon/libvirtd.service.in
@@ -5,6 +5,7 @@
 
 [Unit]
 Description=Virtualization daemon
+Requires=virtlogd.socket
 Before=libvirt-guests.service
 After=network.target
 After=dbus.service
Index: libvirt-2.0.0/src/logging/virtlogd.service.in
===================================================================
--- libvirt-2.0.0.orig/src/logging/virtlogd.service.in
+++ libvirt-2.0.0/src/logging/virtlogd.service.in
@@ -1,6 +1,8 @@
 [Unit]
 Description=Virtual machine log manager
 Requires=virtlogd.socket
+Before=libvirtd.service
+PartOf=libvirtd.service
 Documentation=man:virtlogd(8)
 Documentation=http://libvirt.org
 
Index: libvirt-2.0.0/src/logging/virtlogd.socket.in
===================================================================
--- libvirt-2.0.0.orig/src/logging/virtlogd.socket.in
+++ libvirt-2.0.0/src/logging/virtlogd.socket.in
@@ -1,5 +1,7 @@
 [Unit]
 Description=Virtual machine log manager socket
+Before=libvirtd.service
+PartOf=libvirtd.service
 
 [Socket]
 ListenStream=@localstatedir@/run/libvirt/virtlogd-sock