[arch-commits] Commit in cage/trunk (PKGBUILD cage.install)

Brett Cornwall ainola at gemini.archlinux.org
Fri May 20 18:55:47 UTC 2022


    Date: Friday, May 20, 2022 @ 18:55:46
  Author: ainola
Revision: 1209451

Remove polkit as dependency

We can leverage seatd to also obtain elevated system privileges instead of
polkit. As such, we cannot require polkit since there is an alternative.

Note that using seatd instead of polkit means that a user must be a part of the
"seat" group: Otherwise, the user will not be able to achieve the appropriate
privileged actions.

Added:
  cage/trunk/cage.install
Modified:
  cage/trunk/PKGBUILD

--------------+
 PKGBUILD     |   10 +++++++---
 cage.install |   33 +++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-05-20 18:39:04 UTC (rev 1209450)
+++ PKGBUILD	2022-05-20 18:55:46 UTC (rev 1209451)
@@ -3,16 +3,20 @@
 
 pkgname=cage
 pkgver=0.1.4
-pkgrel=6
+pkgrel=7
 pkgdesc="A kiosk compositor for Wayland"
 arch=(x86_64)
 url="https://www.hjdskes.nl/projects/cage/"
 license=(MIT)
-depends=(glibc polkit ttf-font wayland)
+depends=(glibc ttf-font wayland)
 makedepends=(git libxkbcommon meson pixman scdoc wayland-protocols
 wlroots xorg-server-xwayland)
-optdepends=('xorg-server-xwayland: X11 support')
+optdepends=(
+  'polkit: System privilege control. Required if not using seatd service'
+  'xorg-server-xwayland: X11 support'
+)
 source=("${pkgname}::git+https://github.com/Hjdskes/${pkgname}.git#tag=v${pkgver}?signed")
+install=cage.install
 sha512sums=('SKIP')
 validpgpkeys=('13B6A35E9FD677D02CD68DBE37C445296EBC43B1') # Jente Hidskes <dev at hjdskes.nl>
 options=(debug)

Added: cage.install
===================================================================
--- cage.install	                        (rev 0)
+++ cage.install	2022-05-20 18:55:46 UTC (rev 1209451)
@@ -0,0 +1,33 @@
+post_install() {
+cat << EOD
+Cage requires additional setup for privilege escalation. Without this setup,
+Cage will fail to start with session activation permission failures. Choose one
+of the two available options (In alphabetical, not recommended, order):
+
+1. polkit: This will make Cage "just work" right after installation but may be
+           a weightier solution than desired.
+
+2. seatd: Already required as a cage dependency, this is a lighter-weight
+          solution but requires some user configuration: Enable the service,
+          add your user to the "seat" group, then log out/in again.
+
+Either option should provide the same functionality/stability. For more
+information, refer to the Sway wiki page, which requires a similar setup (both
+are based on wlroots).
+EOD
+}
+
+post_upgrade() {
+cat << EOD
+Cage's necessary privileges can now be obtained through seatd as well as the
+incumbent polkit package. As such, polkit has been relegated to an optional
+dependency.
+
+Note that using seatd instead of polkit means that a user must be a part of the
+"seat" group: Otherwise, the user will not be able to achieve the appropriate
+privileged actions.
+
+For more information, refer to the Sway wiki page, which requires a similar
+setup (both are based on wlroots).
+EOD
+}



More information about the arch-commits mailing list