Ship the policykit rules file as an example in the -doc package.

This commit is contained in:
Michael Adam 2015-01-28 21:21:53 +01:00 committed by Michael Adam
parent 4be15b9124
commit 9de1424e17
2 changed files with 13 additions and 5 deletions

View File

@ -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")

View File

@ -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 <madam@redhat.com> - 0.0.24-3
- Ship the polkit rules file as example in the docs package.
* Wed Jan 28 2015 Vít Ondruch <vondruch@redhat.com> - 0.0.24-2
- Do not ship polkit rules for now, since this might have security implications.