diff options
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | 99-default.rules | 19 | ||||
-rw-r--r-- | PKGBUILD | 45 | ||||
-rw-r--r-- | polkit.conf | 2 | ||||
-rw-r--r-- | polkit.install | 18 | ||||
-rw-r--r-- | polkit.pam | 7 |
6 files changed, 54 insertions, 58 deletions
@@ -1,26 +1,27 @@ pkgbase = polkit-consolekit pkgdesc = PolicyKit with ConsoleKit support for non-systemd systems - pkgver = 0.118 + pkgver = 121 pkgrel = 1 - url = http://www.freedesktop.org/wiki/Software/polkit - install = polkit.install + url = https://gitlab.freedesktop.org/polkit/polkit arch = i686 arch = x86_64 license = LGPL - makedepends = intltool + makedepends = meson makedepends = gtk-doc makedepends = gobject-introspection depends = glib2 depends = pam depends = expat depends = js78 - provides = polkit=0.118 + depends = duktape + provides = polkit=121 conflicts = polkit options = !libtool - source = http://www.freedesktop.org/software/polkit/releases/polkit-0.118.tar.gz - source = polkit.pam - md5sums = ae3f2a742740069922589ad20ffd54d2 - md5sums = 6564f95878297b954f0572bc1610dd15 + source = http://www.freedesktop.org/software/polkit/releases/polkit-121.tar.gz + source = polkit.conf + source = 99-default.rules + sha256sums = 9dc7ae341a797c994a5a36da21963f0c5c8e3e5a1780ccc2a5f52e7be01affaa + sha256sums = f12f590cf5ad621710f75a40b5af88e186d3a0a17d682a8bbe03b833525a3a39 + sha256sums = c7f887e1a8429106b43e8e81849c731e18b3055ef5e9ce0d44706ec23e9ef99e pkgname = polkit-consolekit - diff --git a/99-default.rules b/99-default.rules new file mode 100644 index 000000000000..cb5807aeb3a1 --- /dev/null +++ b/99-default.rules @@ -0,0 +1,19 @@ +polkit.addRule(function(action, subject) { + if (action.id.indexOf("org.freedesktop.udisks2.") == 0 && subject.isInGroup("storage")) { + return polkit.Result.YES; + } +}); +polkit.addRule(function(action, subject) { + if (action.id == "org.freedesktop.login1.power-off" || + action.id == "org.freedesktop.login1.reboot" || + action.id == "org.freedesktop.login1.hibernate" || + action.id == "org.freedesktop.login1.suspend") { + return polkit.Result.YES; + } +}); +polkit.addRule(function(action, subject) { + if (action.id == "org.freedesktop.upower.hibernate" || + action.id == "org.freedesktop.upower.suspend") { + return polkit.Result.YES; + } +}); @@ -1,44 +1,43 @@ -# Maintainer: William Vigolo da Silva <william@williamvds.me> +# Maintainer: picokan <todaysoracle@protonmail.com> +# Contributor: Nathan Owens <ndowens@artixlinux.org> +# Contributor: William Vigolo da Silva <william@williamvds.me> # Contributor: kozec <kozec at kozec.com> # Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com> # Contributor: Jan de Groot <jgc@archlinux.org> pkgname=polkit-consolekit -pkgver=0.118 +pkgver=121 pkgrel=1 pkgdesc="PolicyKit with ConsoleKit support for non-systemd systems" arch=('i686' 'x86_64') license=('LGPL') -url="http://www.freedesktop.org/wiki/Software/polkit" -depends=('glib2' 'pam' 'expat' 'js78') -makedepends=('intltool' 'gtk-doc' 'gobject-introspection') +url="https://gitlab.freedesktop.org/polkit/polkit" +depends=('glib2' 'pam' 'expat' 'js78' 'duktape') +makedepends=('meson' 'gtk-doc' 'gobject-introspection') provides=("polkit=$pkgver") conflicts=('polkit') options=('!libtool') -install=polkit.install source=(http://www.freedesktop.org/software/polkit/releases/polkit-$pkgver.tar.gz - polkit.pam) -md5sums=('ae3f2a742740069922589ad20ffd54d2' - '6564f95878297b954f0572bc1610dd15') + polkit.conf + 99-default.rules) +sha256sums=('9dc7ae341a797c994a5a36da21963f0c5c8e3e5a1780ccc2a5f52e7be01affaa' + 'f12f590cf5ad621710f75a40b5af88e186d3a0a17d682a8bbe03b833525a3a39' + 'c7f887e1a8429106b43e8e81849c731e18b3055ef5e9ce0d44706ec23e9ef99e') build() { - cd "$srcdir/polkit-$pkgver" - - ./configure --prefix=/usr --sysconfdir=/etc \ - --localstatedir=/var --libexecdir=/usr/lib/polkit-1 \ - --with-systemdsystemunitdir=/usr/lib/systemd/system \ - --enable-libsystemd-login=no \ - --enable-libelogind=no \ - --disable-static --enable-gtk-doc - make + meson polkit-v.$pkgver build -D systemdsystemunitdir=foo \ + -D session_tracking=ConsoleKit + meson compile -C build } package() { - cd "$srcdir/polkit-$pkgver" - make DESTDIR="$pkgdir" install + meson install -C build --destdir "$pkgdir" - chown 102 "$pkgdir/etc/polkit-1/rules.d" - chown 102 "$pkgdir/usr/share/polkit-1/rules.d" + install -d -o root -g 102 -m 750 "$pkgdir"/{etc,usr/share}/polkit-1/rules.d + mv "$pkgdir"/{etc,usr/share}/polkit-1/rules.d/50-default.rules - install -m644 "$srcdir/polkit.pam" "$pkgdir/etc/pam.d/polkit-1" + install -Dm644 "${srcdir}"/polkit.conf "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" + install -m0644 "${srcdir}"/99-default.rules "${pkgdir}"/etc/polkit-1/rules.d + # workaround the unit enforcement, atm can't be disabled, needs patching + rm -rf "${pkgdir}"/usr/foo } diff --git a/polkit.conf b/polkit.conf new file mode 100644 index 000000000000..27ea0bfa9d80 --- /dev/null +++ b/polkit.conf @@ -0,0 +1,2 @@ +u polkitd 102 "PolicyKit daemon" +m polkitd proc diff --git a/polkit.install b/polkit.install deleted file mode 100644 index fbb98919ed25..000000000000 --- a/polkit.install +++ /dev/null @@ -1,18 +0,0 @@ -post_install() { - getent group polkitd >/dev/null || groupadd -g 102 polkitd - getent passwd polkitd >/dev/null || useradd -c 'Policy Kit Daemon' -u 102 -g polkitd -d '/' -s /bin/false polkitd - passwd -l polkitd &>/dev/null -} - -post_upgrade() { - post_install -} - -post_remove() { - if getent passwd polkitd >/dev/null; then - userdel polkitd - fi - if getent group polkitd >/dev/null; then - groupdel polkitd - fi -} diff --git a/polkit.pam b/polkit.pam deleted file mode 100644 index 04f53e0dbc13..000000000000 --- a/polkit.pam +++ /dev/null @@ -1,7 +0,0 @@ -auth requisite pam_nologin.so -auth required pam_env.so -auth required pam_unix.so -account required pam_unix.so -session required pam_limits.so -session required pam_unix.so -password required pam_unix.so |