From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: spec: move polkit rules location logic to automake
......................................................................
spec: move polkit rules location logic to automake
Change-Id: Ia16538d01fb5763095ce429238ca9489dd5eefdf
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M configure.ac
M static/Makefile.am
R static/usr/share/polkit-1/rules.d/10-vdsm-libvirt-access.rules
M vdsm.spec.in
M vdsm/Makefile.am
5 files changed, 12 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/51/78551/1
diff --git a/configure.ac b/configure.ac
index 3cd046b..e99d311 100644
--- a/configure.ac
+++ b/configure.ac
@@ -247,6 +247,14 @@
[with_data_center="/rhev/data-center"])
AC_SUBST([vdsmrepo], [${with_data_center}])
+AC_ARG_WITH(
+ [polkitdir],
+ [AS_HELP_STRING([--with-polkitdir=FILE],
+ [where to place polkit rules,
@<:@default=/usr/share/polkit-1/rules.d@:>@])],
+ [with_polkitdir="${withval}"],
+ [with_polkitdir="/usr/share/polkit-1/rules.d"])
+AC_SUBST([polkitdir], [${with_polkitdir}])
+
# Users and groups
AC_SUBST([VDSMUSER], [vdsm])
AC_SUBST([VDSMGROUP], [kvm])
diff --git a/static/Makefile.am b/static/Makefile.am
index 85414e5..bd82a60 100644
--- a/static/Makefile.am
+++ b/static/Makefile.am
@@ -111,6 +111,8 @@
libvirtpassworddir = $(vdsmtsdir)/keys
libvirtpassword_DATA = ./$(libvirtpassworddir)/libvirt_password
+dist_polkit_SCRIPTS = \
+ ./usr/share/polkit-1/rules.d/10-vdsm-libvirt-access.rules
cronhourlydir = $(sysconfdir)/cron.hourly
dist_cronhourly_SCRIPTS = \
diff --git a/vdsm/vdsm-libvirt-access.rules
b/static/usr/share/polkit-1/rules.d/10-vdsm-libvirt-access.rules
similarity index 100%
rename from vdsm/vdsm-libvirt-access.rules
rename to static/usr/share/polkit-1/rules.d/10-vdsm-libvirt-access.rules
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 368dc59..fc18c57 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -709,7 +709,8 @@
%if 0%{?with_containers}
--enable-containers \
%endif
- --with-data-center='@VDSMREPO@'
+ --with-data-center='@VDSMREPO@' \
+ --with-polkitdir=%{_polkitdir}
make
# Setting software_version and software_revision in dsaversion.py
@@ -751,10 +752,6 @@
# dropbox for core dumps
install -dDm 1777 %{buildroot}%{_localstatedir}/log/core
%endif
-
-# Install the polkit for libvirt
-install -Dm 0644 vdsm/vdsm-libvirt-access.rules \
- %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.rules
# Install the libvirt hook for cleaning up the XML
install -Dm 0755 vdsm/virt/libvirt-hook.sh \
diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am
index 3675e3b..b36f56e 100644
--- a/vdsm/Makefile.am
+++ b/vdsm/Makefile.am
@@ -53,7 +53,6 @@
mk_sysprep_floppy.in \
vdsm-gencerts.sh.in \
vdsm-libvirt-access.pkla \
- vdsm-libvirt-access.rules \
$(NULL)
all-local: \
--
To view, visit
https://gerrit.ovirt.org/78551
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia16538d01fb5763095ce429238ca9489dd5eefdf
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>