Douglas Schilling Landgraf has uploaded a new change for review.

Change subject: vdsm.spec: vdsm should own vdsm.log
......................................................................

vdsm.spec: vdsm should own vdsm.log

/var/log/vdsm/vdsm.log should be owned by VDSM.

Change-Id: Id12a78f3243138cd95a13cc7c8a8d3d499ceee4a
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1055153
Signed-off-by: Douglas Schilling Landgraf <[email protected]>
---
M vdsm.spec.in
1 file changed, 14 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/96/23696/1

diff --git a/vdsm.spec.in b/vdsm.spec.in
index 1ffbb5b..e11dcd1 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -10,6 +10,10 @@
 %global snlk_group @SNLKGROUP@
 %global snlk_user @SNLKUSER@
 
+# VDSM Log
+%global logdir %{_localstatedir}/log/%{vdsm_name}
+%global vdsm_log %{_localstatedir}/log/%{vdsm_name}/%{vdsm_name}.log
+
 # Fedora official build
 %global fedora_koji_build 0
 
@@ -611,6 +615,12 @@
 rm -rf %{buildroot}
 make DESTDIR=%{buildroot} install
 
+# Avoid rpmbuild complain about vdsm.log doesn't exist during the build
+touch %{buildroot}/%{vdsm_log}
+
+# VDSM Log
+install -dDm 0755 %{buildroot}%{logdir}
+
 # Install the respawn utility
 install -Dm 0755 init/sysvinit/respawn \
                  %{buildroot}%{_datadir}/%{vdsm_name}/respawn
@@ -910,6 +920,8 @@
 %{_datadir}/%{vdsm_name}/vdsm-store-net-config
 %{_datadir}/%{vdsm_name}/vm.py*
 
+%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) %{vdsm_log}
+
 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf
 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf
 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/upgrade.logger.conf
@@ -1093,8 +1105,8 @@
 %dir %{_localstatedir}/run/%{vdsm_name}/sourceRoutes
 %dir %{_localstatedir}/run/%{vdsm_name}/trackedInterfaces
 %ghost %dir %{_localstatedir}/run/%{vdsm_name}/payload
-%dir %{_localstatedir}/log/%{vdsm_name}
-%dir %{_localstatedir}/log/%{vdsm_name}/backup
+%dir %attr(-, %{vdsm_user}, %{vdsm_group}) %{logdir}
+%dir %{logdir}/backup
 
 %files python
 %defattr(-, root, root, -)


-- 
To view, visit http://gerrit.ovirt.org/23696
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id12a78f3243138cd95a13cc7c8a8d3d499ceee4a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to