Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [RFC] runit-void: add polkit policy for zzz
@ 2020-09-13 21:27 sirikid
  2020-09-13 23:25 ` ericonr
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sirikid @ 2020-09-13 21:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 437 bytes --]

There is a new pull request by sirikid against master on the void-packages repository

https://github.com/sirikid/void-packages feature/zzz-polkit-support
https://github.com/void-linux/void-packages/pull/24891

[RFC] runit-void: add polkit policy for zzz
I think it might be useful, but I'm not sure which package the action should be placed in.

A patch file from https://github.com/void-linux/void-packages/pull/24891.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-feature/zzz-polkit-support-24891.patch --]
[-- Type: text/x-diff, Size: 2147 bytes --]

From 70585746d102bb19414321dbb97654363e48887a Mon Sep 17 00:00:00 2001
From: Ivan Sokolov <ivan-p-sokolov@ya.ru>
Date: Sun, 13 Sep 2020 14:22:54 +0000
Subject: [PATCH] runit-void: add polkit policy for zzz

---
 .../runit-void/files/org.voidlinux.zzz.policy    | 16 ++++++++++++++++
 srcpkgs/runit-void/template                      |  3 ++-
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/runit-void/files/org.voidlinux.zzz.policy

diff --git a/srcpkgs/runit-void/files/org.voidlinux.zzz.policy b/srcpkgs/runit-void/files/org.voidlinux.zzz.policy
new file mode 100644
index 00000000000..1e425686e1a
--- /dev/null
+++ b/srcpkgs/runit-void/files/org.voidlinux.zzz.policy
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "https://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
+<policyconfig>
+  <vendor>org.voidlinux</vendor>
+  <vendor_url>https://voidlinux.org</vendor_url>
+  <action id="org.voidlinux.pkexec.zzz">
+    <description>Suspend or hibernate your computer</description>
+    <defaults>
+      <allow_any>no</allow_any>
+      <allow_inactive>no</allow_inactive>
+      <allow_active>yes</allow_active>
+    </defaults>
+    <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/zzz</annotate>
+    <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/ZZZ</annotate>
+  </action>
+</policyconfig>
diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template
index c495a45a3de..4466a076cfa 100644
--- a/srcpkgs/runit-void/template
+++ b/srcpkgs/runit-void/template
@@ -1,7 +1,7 @@
 # Template file for 'runit-void'
 pkgname=runit-void
 version=20200720
-revision=1
+revision=2
 wrksrc="void-runit-${version}"
 build_style=gnu-makefile
 short_desc="Void Linux runit scripts"
@@ -41,6 +41,7 @@ post_install() {
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/default
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/single
 	ln -s runit-init ${DESTDIR}/usr/bin/init
+	vinstall ${FILESDIR}/org.voidlinux.zzz.policy 644 /usr/share/polkit-1/actions/
 }
 
 runit-void-apparmor_package() {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] runit-void: add polkit policy for zzz
  2020-09-13 21:27 [PR PATCH] [RFC] runit-void: add polkit policy for zzz sirikid
@ 2020-09-13 23:25 ` ericonr
  2020-09-17  4:53 ` sirikid
  2020-09-17  4:53 ` [PR PATCH] [Closed]: " sirikid
  2 siblings, 0 replies; 4+ messages in thread
From: ericonr @ 2020-09-13 23:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 306 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/24891#issuecomment-691740789

Comment:
I guess this would enable `pkexec zzz` ?

Also, this should go in the void-runit repo if added to `runit-void` package, or in the `policykit` package instead, IMO.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] runit-void: add polkit policy for zzz
  2020-09-13 21:27 [PR PATCH] [RFC] runit-void: add polkit policy for zzz sirikid
  2020-09-13 23:25 ` ericonr
@ 2020-09-17  4:53 ` sirikid
  2020-09-17  4:53 ` [PR PATCH] [Closed]: " sirikid
  2 siblings, 0 replies; 4+ messages in thread
From: sirikid @ 2020-09-17  4:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 196 bytes --]

New comment by sirikid on void-packages repository

https://github.com/void-linux/void-packages/pull/24891#issuecomment-693844250

Comment:
I guess I will wait for a reply in the void-runit repo.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Closed]: [RFC] runit-void: add polkit policy for zzz
  2020-09-13 21:27 [PR PATCH] [RFC] runit-void: add polkit policy for zzz sirikid
  2020-09-13 23:25 ` ericonr
  2020-09-17  4:53 ` sirikid
@ 2020-09-17  4:53 ` sirikid
  2 siblings, 0 replies; 4+ messages in thread
From: sirikid @ 2020-09-17  4:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 267 bytes --]

There's a closed pull request on the void-packages repository

[RFC] runit-void: add polkit policy for zzz
https://github.com/void-linux/void-packages/pull/24891

Description:
I think it might be useful, but I'm not sure which package the action should be placed in.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-17  4:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-13 21:27 [PR PATCH] [RFC] runit-void: add polkit policy for zzz sirikid
2020-09-13 23:25 ` ericonr
2020-09-17  4:53 ` sirikid
2020-09-17  4:53 ` [PR PATCH] [Closed]: " sirikid

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).