Change in vdsm[ovirt-3.4]: Install vdsm.conf.example during build

ybronhei at redhat.com ybronhei at redhat.com
Thu Mar 6 07:17:06 UTC 2014


Hello Douglas Schilling Landgraf, Dan Kenigsberg,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/25450

to review the following change.

Change subject: Install vdsm.conf.example during build
......................................................................

Install vdsm.conf.example during build

The sample conf is installed by spec under vdsm docs. Docs files are not part
of RHEV-H installation to keep rhev-h env small as possible.
Although, the sample file was delivered only on Fedora which is the
standard for package delivering (to publish sample conf with the
package installation).
The sample file was requested also in rhev-h by users for reference.
This patch moves the file installation from spec to create it during
make.

Change-Id: I2606c571cd6de06eee811bbd340a790f98d11907
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1023941
Signed-off-by: Yaniv Bronhaim <ybronhei at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/24945
Reviewed-by: Douglas Schilling Landgraf <dougsland at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M lib/vdsm/Makefile.am
M vdsm.spec.in
2 files changed, 19 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/50/25450/1

diff --git a/lib/vdsm/Makefile.am b/lib/vdsm/Makefile.am
index 416e1e6..8575887 100644
--- a/lib/vdsm/Makefile.am
+++ b/lib/vdsm/Makefile.am
@@ -47,6 +47,7 @@
 
 CLEANFILES = \
 	$(nodist_vdsmpylib_PYTHON) \
+	$(nodist_noinst_DATA) \
 	$(NULL)
 
 
@@ -54,10 +55,26 @@
 	config.py.in \
 	constants.py.in \
 	vdscli.py.in \
+	vdsm.conf.sample \
 	$(NULL)
 
 vdsm.conf.sample: Makefile config.py
 	@echo "  CONFIG $@"; $(PYTHON) $(builddir)/config.py > $@
 
+install-data-local: \
+	install-data-sample-vdsm-conf
+
+uninstall-local: \
+	uninstall-data-sample-vdsm-conf
+
+install-data-sample-vdsm-conf:
+	$(MKDIR_P) $(DESTDIR)$(vdsmconfdir)
+	$(INSTALL_DATA) vdsm.conf.sample \
+		$(DESTDIR)$(vdsmconfdir)/vdsm.conf
+
+uninstall-data-sample-vdsm-conf:
+	$(RM) $(DESTDIR)$(vdsmconfdir)/vdsm.conf
+
 all-local: \
-	$(nodist_vdsmpylib_PYTHON)
+	$(nodist_vdsmpylib_PYTHON) \
+	$(nodist_noinst_DATA)
diff --git a/vdsm.spec.in b/vdsm.spec.in
index a90d1a4..91b9590 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -658,12 +658,6 @@
 install -dDm 1777 %{buildroot}%{_localstatedir}/log/core
 %endif
 
-%if !0%{?rhel}
-# Install the configuration sample
-install -Dm 0644 lib/vdsm/vdsm.conf.sample \
-                 %{buildroot}%{_sysconfdir}/%{vdsm_name}/vdsm.conf
-%endif
-
 # Install the polkit for libvirt
 %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
 install -Dm 0644 vdsm/vdsm-libvirt-access.rules \
@@ -930,6 +924,7 @@
 %{_datadir}/%{vdsm_name}/vdsm-store-net-config
 %{_datadir}/%{vdsm_name}/vm.py*
 
+%config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf
 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf
 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf
 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/upgrade.logger.conf
@@ -1118,9 +1113,6 @@
 %files python
 %defattr(-, root, root, -)
 %{_bindir}/vdsm-tool
-%if !0%{?rhel}
-%config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf
-%endif
 %dir %{python_sitearch}/%{vdsm_name}
 %dir %{python_sitearch}/%{vdsm_name}/tool
 %{python_sitearch}/%{vdsm_name}/__init__.py*


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2606c571cd6de06eee811bbd340a790f98d11907
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>


More information about the vdsm-patches mailing list