[Pkg-libvirt-commits] [libvirt] 01/01: Use upstreams polkit rule
Guido Guenther
agx at moszumanska.debian.org
Fri Jun 5 13:20:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
agx pushed a commit to branch debian/sid
in repository libvirt.
commit 9135e2e8f1ab7d30b171f3d453c69aaef936ecd3
Author: Guido Günther <agx at sigxcpu.org>
Date: Fri Jun 5 13:15:56 2015 +0200
Use upstreams polkit rule
As of 1.2.16 upstream ships a Polkit rule like Debian does.
---
debian/patches/Use-upstreams-polkit-rule.patch | 50 ++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/polkit/60-libvirt.rules | 13 -------
debian/rules | 2 --
4 files changed, 51 insertions(+), 15 deletions(-)
diff --git a/debian/patches/Use-upstreams-polkit-rule.patch b/debian/patches/Use-upstreams-polkit-rule.patch
new file mode 100644
index 0000000..45827c8
--- /dev/null
+++ b/debian/patches/Use-upstreams-polkit-rule.patch
@@ -0,0 +1,50 @@
+From: =?utf-8?q?Guido_G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Fri, 5 Jun 2015 13:13:44 +0200
+Subject: Use upstreams polkit rule
+
+As of 1.2.16 upstream ships a Polkit rule like Debian does.
+---
+ daemon/Makefile.am | 4 ++--
+ daemon/Makefile.in | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/daemon/Makefile.am b/daemon/Makefile.am
+index 42dec5d..24b8026 100644
+--- a/daemon/Makefile.am
++++ b/daemon/Makefile.am
+@@ -269,14 +269,14 @@ install-data-polkit::
+ $(INSTALL_DATA) libvirtd.policy $(DESTDIR)$(policydir)/org.libvirt.unix.policy
+ if ! WITH_POLKIT0
+ $(MKDIR_P) $(DESTDIR)$(rulesdir)
+- $(INSTALL_DATA) $(srcdir)/$(rulesfile) $(DESTDIR)$(rulesdir)/50-libvirt.rules
++ $(INSTALL_DATA) $(srcdir)/$(rulesfile) $(DESTDIR)$(rulesdir)/60-libvirt.rules
+ endif ! WITH_POLKIT0
+
+ uninstall-data-polkit::
+ rm -f $(DESTDIR)$(policydir)/org.libvirt.unix.policy
+ rmdir $(DESTDIR)$(policydir) || :
+ if ! WITH_POLKIT0
+- rm -f $(DESTDIR)$(rulesdir)/50-libvirt.rules
++ rm -f $(DESTDIR)$(rulesdir)/60-libvirt.rules
+ rmdir $(DESTDIR)$(rulesdir) || :
+ endif ! WITH_POLKIT0
+
+diff --git a/daemon/Makefile.in b/daemon/Makefile.in
+index 3d7f810..0673723 100644
+--- a/daemon/Makefile.in
++++ b/daemon/Makefile.in
+@@ -2580,12 +2580,12 @@ qemu_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \
+ @WITH_LIBVIRTD_TRUE@@WITH_POLKIT_TRUE@ $(MKDIR_P) $(DESTDIR)$(policydir)
+ @WITH_LIBVIRTD_TRUE@@WITH_POLKIT_TRUE@ $(INSTALL_DATA) libvirtd.policy $(DESTDIR)$(policydir)/org.libvirt.unix.policy
+ @WITH_LIBVIRTD_TRUE@@WITH_POLKIT0_FALSE@@WITH_POLKIT_TRUE@ $(MKDIR_P) $(DESTDIR)$(rulesdir)
+- at WITH_LIBVIRTD_TRUE@@WITH_POLKIT0_FALSE@@WITH_POLKIT_TRUE@ $(INSTALL_DATA) $(srcdir)/$(rulesfile) $(DESTDIR)$(rulesdir)/50-libvirt.rules
++ at WITH_LIBVIRTD_TRUE@@WITH_POLKIT0_FALSE@@WITH_POLKIT_TRUE@ $(INSTALL_DATA) $(srcdir)/$(rulesfile) $(DESTDIR)$(rulesdir)/60-libvirt.rules
+
+ @WITH_LIBVIRTD_TRUE@@WITH_POLKIT_TRUE at uninstall-data-polkit::
+ @WITH_LIBVIRTD_TRUE@@WITH_POLKIT_TRUE@ rm -f $(DESTDIR)$(policydir)/org.libvirt.unix.policy
+ @WITH_LIBVIRTD_TRUE@@WITH_POLKIT_TRUE@ rmdir $(DESTDIR)$(policydir) || :
+- at WITH_LIBVIRTD_TRUE@@WITH_POLKIT0_FALSE@@WITH_POLKIT_TRUE@ rm -f $(DESTDIR)$(rulesdir)/50-libvirt.rules
++ at WITH_LIBVIRTD_TRUE@@WITH_POLKIT0_FALSE@@WITH_POLKIT_TRUE@ rm -f $(DESTDIR)$(rulesdir)/60-libvirt.rules
+ @WITH_LIBVIRTD_TRUE@@WITH_POLKIT0_FALSE@@WITH_POLKIT_TRUE@ rmdir $(DESTDIR)$(rulesdir) || :
+
+ @WITH_LIBVIRTD_TRUE@@WITH_POLKIT_FALSE at install-data-polkit::
diff --git a/debian/patches/series b/debian/patches/series
index 86e77c7..bbae972 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ debian/Debianize-systemd-service-files.patch
Allow-xen-toolstack-to-find-it-s-binaries.patch
Skip-vircgrouptest.patch
debian/Debianize-virtlockd.patch
+Use-upstreams-polkit-rule.patch
diff --git a/debian/polkit/60-libvirt.rules b/debian/polkit/60-libvirt.rules
deleted file mode 100644
index df9d940..0000000
--- a/debian/polkit/60-libvirt.rules
+++ /dev/null
@@ -1,13 +0,0 @@
-/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */
-
-// Mimic behaviour of group libvirt owning libvirt's rw socket
-//
-// See the polkit(8) man page for more information
-// about configuring polkit.
-
-polkit.addRule(function(action, subject) {
- if (action.id == "org.libvirt.unix.manage" &&
- subject.isInGroup("libvirt")) {
- return polkit.Result.YES;
- }
-});
diff --git a/debian/rules b/debian/rules
index 13deb35..0b2946f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -150,8 +150,6 @@ override_dh_install:
cp tools/libvirt-guests.sysconf \
debian/libvirt-daemon-system.libvirt-guests.default
# Add our backward compat polkit rule
- cp debian/polkit/60-libvirt.rules \
- debian/libvirt-daemon-system/usr/share/polkit-1/rules.d/
cp debian/polkit/60-libvirt.pkla \
debian/libvirt-daemon-system/var/lib/polkit-1/localauthority/10-vendor.d/
ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libvirt.git
More information about the Pkg-libvirt-commits
mailing list