From 9de1424e175f5f31edb73aedc7256b0ab0fc223b Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 28 Jan 2015 21:21:53 +0100 Subject: [PATCH] Ship the policykit rules file as an example in the -doc package. --- 10-vagrant-libvirt.rules | 5 ++++- vagrant-libvirt.spec | 13 +++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/10-vagrant-libvirt.rules b/10-vagrant-libvirt.rules index c833f43..0e2f77d 100644 --- a/10-vagrant-libvirt.rules +++ b/10-vagrant-libvirt.rules @@ -1,4 +1,7 @@ -/* Allow users in vagrant group to manage libvirt without authentication */ +/* + * Allow users in vagrant group to manage libvirt without authentication. + * Copy this file to /usr/share/polkit-1/rules.d/ to activate. + */ polkit.addRule(function(action, subject) { if ((action.id == "org.libvirt.unix.manage" || action.id == "org.libvirt.unix.monitor") diff --git a/vagrant-libvirt.spec b/vagrant-libvirt.spec index 0aa7364..435fcf7 100644 --- a/vagrant-libvirt.spec +++ b/vagrant-libvirt.spec @@ -2,7 +2,7 @@ Name: %{vagrant_plugin_name} Version: 0.0.24 -Release: 2%{?dist} +Release: 3%{?dist} Summary: libvirt provider for Vagrant Group: Development/Languages License: MIT @@ -72,8 +72,10 @@ cp -a .%{vagrant_plugin_dir}/* \ %{buildroot}%{vagrant_plugin_dir}/ # polkit rule for vagrant group. -mkdir -p %{buildroot}%{_datadir}/polkit-1/rules.d -install -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/polkit-1/rules.d/ +#mkdir -p %{buildroot}%{_datadir}/polkit-1/rules.d +#install -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/polkit-1/rules.d/ +mkdir -p %{buildroot}%{vagrant_plugin_docdir}/polkit +install -m 0644 %{SOURCE1} %{buildroot}%{vagrant_plugin_docdir}/polkit %check pushd .%{vagrant_plugin_instdir} @@ -104,7 +106,7 @@ getent group vagrant >/dev/null || groupadd -r vagrant %{vagrant_plugin_spec} # polkit # TODO: Disabled for now, since this might have security implications. -%exclude %{_datadir}/polkit-1/rules.d/10-vagrant-libvirt.rules +#%exclude %{_datadir}/polkit-1/rules.d/10-vagrant-libvirt.rules %files doc %doc %{vagrant_plugin_docdir} @@ -117,6 +119,9 @@ getent group vagrant >/dev/null || groupadd -r vagrant %changelog +* Wed Jan 28 2015 Michael Adam - 0.0.24-3 +- Ship the polkit rules file as example in the docs package. + * Wed Jan 28 2015 Vít Ondruch - 0.0.24-2 - Do not ship polkit rules for now, since this might have security implications.