[PATCH 1/2] logd: Install the admin sockets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit id '85d45ff0' added support for the logd admin socket, but
forgot to add the socket to the make and spec files for installation
purposes.

NB: Includes breaking up the long %systemd_ lists across multiple lines
    for ease of reading
Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 libvirt.spec.in | 16 ++++++++++++----
 src/Makefile.am | 20 ++++++++++++++++----
 2 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 1879e1f8b..d94031067 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1520,13 +1520,16 @@ exit 0
 
 %if %{with_systemd}
     %if %{with_systemd_macros}
-        %systemd_post virtlockd.socket virtlogd.socket libvirtd.service
+        %systemd_post virtlockd.socket \
+            virtlogd.socket virtlogd-admin.socket \
+            libvirtd.service
     %else
 if [ $1 -eq 1 ] ; then
     # Initial installation
     /bin/systemctl enable \
         virtlockd.socket \
         virtlogd.socket \
+        virtlogd-admin.socket \
         libvirtd.service >/dev/null 2>&1 || :
 fi
     %endif
@@ -1553,19 +1556,23 @@ touch %{_localstatedir}/lib/rpm-state/libvirt/restart || :
 %preun daemon
 %if %{with_systemd}
     %if %{with_systemd_macros}
-        %systemd_preun libvirtd.service virtlogd.socket virtlogd.service virtlockd.socket virtlockd.service
+        %systemd_preun libvirtd.service \
+            virtlogd.socket virtlogd-admin.socket virtlogd.service \
+            virtlockd.socket virtlockd.service
     %else
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
     /bin/systemctl --no-reload disable \
         libvirtd.service \
         virtlogd.socket \
+        virtlogd-admin.socket \
         virtlogd.service \
         virtlockd.socket \
         virtlockd.service > /dev/null 2>&1 || :
     /bin/systemctl stop \
         libvirtd.service \
         virtlogd.socket \
+        virtlogd-admin.socket \
         virtlogd.service \
         virtlockd.socket \
         virtlockd.service > /dev/null 2>&1 || :
@@ -1613,9 +1620,9 @@ fi
 if [ $1 -ge 1 ] ; then
 %if %{with_systemd}
         /bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 &&
-            /bin/systemctl enable virtlogd.socket || :
+            /bin/systemctl enable virtlogd.socket virtlogd-admin.socket || :
         /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 &&
-            /bin/systemctl start virtlogd.socket || :
+            /bin/systemctl start virtlogd.socket virtlogd-admin.socket || :
 %else
         /sbin/chkconfig libvirtd 1>/dev/null 2>&1 &&
             /sbin/chkconfig virtlogd on || :
@@ -1820,6 +1827,7 @@ exit 0
 %{_unitdir}/virt-guest-shutdown.target
 %{_unitdir}/virtlogd.service
 %{_unitdir}/virtlogd.socket
+%{_unitdir}/virtlogd-admin.socket
 %{_unitdir}/virtlockd.service
 %{_unitdir}/virtlockd.socket
 %else
diff --git a/src/Makefile.am b/src/Makefile.am
index 79adc9ba5..3d7b8f7c3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2810,6 +2810,7 @@ EXTRA_DIST += \
         locking/test_virtlockd.aug.in \
         logging/virtlogd.service.in \
         logging/virtlogd.socket.in \
+        logging/virtlogd-admin.socket.in \
         logging/virtlogd.aug \
         logging/virtlogd.conf \
         logging/test_virtlogd.aug.in \
@@ -2824,12 +2825,13 @@ if LIBVIRT_INIT_SCRIPT_SYSTEMD
 SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
 
 BUILT_SOURCES += virtlockd.service virtlockd.socket \
-		 virtlogd.service virtlogd.socket
+		 virtlogd.service virtlogd.socket virtlogd-admin.socket
 DISTCLEANFILES += virtlockd.service virtlockd.socket \
-		  virtlogd.service virtlogd.socket
+		  virtlogd.service virtlogd.socket virtlogd-admin.socket
 
 install-systemd: virtlockd.service virtlockd.socket \
-                 virtlogd.service virtlogd.socket install-sysconfig
+                 virtlogd.service virtlogd.socket virtlogd-admin.socket \
+		 install-sysconfig
 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
 	$(INSTALL_DATA) virtlockd.service \
 	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
@@ -2839,12 +2841,15 @@ install-systemd: virtlockd.service virtlockd.socket \
 	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
 	$(INSTALL_DATA) virtlogd.socket \
 	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
+	$(INSTALL_DATA) virtlogd-admin.socket \
+	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
 
 uninstall-systemd: uninstall-sysconfig
 	rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.service \
 	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.socket
 	rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlogd.service \
-	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlogd.socket
+	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlogd.socket \
+	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlogd-admin.socket
 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
 else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
 install-systemd:
@@ -2879,6 +2884,13 @@ virtlogd.socket: logging/virtlogd.socket.in $(top_builddir)/config.status
 	    < $< > $@-t && \
 	    mv $@-t $@
 
+virtlogd-admin.socket: logging/virtlogd-admin.socket.in \
+                       $(top_builddir)/config.status
+	$(AM_V_GEN)sed \
+	    -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
+	    < $< > $@-t && \
+	    mv $@-t $@
+
 
 if WITH_SANLOCK
 lockdriver_LTLIBRARIES += sanlock.la
-- 
2.13.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux