aboutsummaryrefslogtreecommitdiff
path: root/libraries/libvirt
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2017-06-09 23:53:49 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-06-15 18:36:06 +0700
commit2e3f7f0d784fabf43c5e130f670951206dd7cfc1 (patch)
tree0276ccc93ca55a529dc3e1323fd9cbfa36b69e5a /libraries/libvirt
parentb60faa8c2136670468233d0193ced9c51d32d5b9 (diff)
libraries/libvirt: Fix VIRTGROUP in default polkit rules
This commit also adds the example polkit acl rules to the package documentation. Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'libraries/libvirt')
-rw-r--r--libraries/libvirt/libvirt.SlackBuild7
-rw-r--r--libraries/libvirt/use-virtgroup-in-polkit-rules.diff15
2 files changed, 20 insertions, 2 deletions
diff --git a/libraries/libvirt/libvirt.SlackBuild b/libraries/libvirt/libvirt.SlackBuild
index 03ac5394877f5..12dac8bf95885 100644
--- a/libraries/libvirt/libvirt.SlackBuild
+++ b/libraries/libvirt/libvirt.SlackBuild
@@ -6,7 +6,7 @@
PRGNAM=libvirt
VERSION=${VERSION:-3.4.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -53,6 +53,9 @@ find -L . \
# we have sysctld files in /etc/sysctl.d
sed -i "s|(prefix)/lib/sysctl|(sysconfdir)/sysctl|" daemon/Makefile.in
+patch -p1 < $CWD/use-virtgroup-in-polkit-rules.diff
+sed -i -e "s,@VIRTGROUP@,$VIRTGROUP,g" daemon/libvirt.rules
+
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
@@ -103,7 +106,7 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- AUTHORS ChangeLog COPYING* INSTALL README NEWS TODO \
+ AUTHORS ChangeLog COPYING* INSTALL README NEWS TODO examples/polkit/* \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
diff --git a/libraries/libvirt/use-virtgroup-in-polkit-rules.diff b/libraries/libvirt/use-virtgroup-in-polkit-rules.diff
new file mode 100644
index 0000000000000..f4610f9a93fa1
--- /dev/null
+++ b/libraries/libvirt/use-virtgroup-in-polkit-rules.diff
@@ -0,0 +1,15 @@
+diff -Nur libvirt-3.4.0.orig/daemon/libvirt.rules libvirt-3.4.0/daemon/libvirt.rules
+--- libvirt-3.4.0.orig/daemon/libvirt.rules 2015-05-23 07:56:12.046331092 -0500
++++ libvirt-3.4.0/daemon/libvirt.rules 2017-06-09 23:35:50.490172300 -0500
+@@ -1,9 +1,9 @@
+-// Allow any user in the 'libvirt' group to connect to system libvirtd
++// Allow any user in the '@VIRTGROUP@' group to connect to system libvirtd
+ // without entering a password.
+
+ polkit.addRule(function(action, subject) {
+ if (action.id == "org.libvirt.unix.manage" &&
+- subject.isInGroup("libvirt")) {
++ subject.isInGroup("@VIRTGROUP@")) {
+ return polkit.Result.YES;
+ }
+ });