summaryrefslogtreecommitdiff
path: root/repo/polkit/polkit.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-08-10 09:16:34 +0100
committerdavidovski <david@davidovski.xyz>2022-08-10 09:16:34 +0100
commitc1d3da9ca87c414100b1cb969e36b8d7d05b9a74 (patch)
tree1cd983a42e1a221991d09783e08c6c162d4be5cf /repo/polkit/polkit.xibuild
parent9a26d3fdc7fca2df6f824b56034ab9a823e898d8 (diff)
added ovmf, lolcat, spice, and squashfstools
Diffstat (limited to 'repo/polkit/polkit.xibuild')
-rw-r--r--repo/polkit/polkit.xibuild68
1 files changed, 38 insertions, 30 deletions
diff --git a/repo/polkit/polkit.xibuild b/repo/polkit/polkit.xibuild
index eb236bc..e8286dd 100644
--- a/repo/polkit/polkit.xibuild
+++ b/repo/polkit/polkit.xibuild
@@ -1,30 +1,30 @@
#!/bin/sh
-MAKEDEPS="git gobject-introspection meson libxslt patch elogind gtk-doc autoconf-archive"
-DEPS="expat glib js78 pam"
+NAME="polkit"
+DESC="Application development toolkit for controlling system-wide privileges"
-PKG_VER=0.120
-SOURCE=https://www.freedesktop.org/software/polkit/releases/polkit-$PKG_VER.tar.gz
+MAKEDEPS="autoconf automake bash dbus-glib elogind expat glib gobject-introspection gtk2 intltool libtool pam js78"
-DESC="Application development toolkit for controlling system-wide privileges"
+PKG_VER=0.120
+SOURCE="https://www.freedesktop.org/software/polkit/releases/polkit-$PKG_VER.tar.gz"
ADDITIONAL="
- files/polkit-1
- patches/CVE-2021-4034.patch
- patches/make-innetgr-optional.patch
+CVE-2021-4034.patch
+alpine-polkit.pam
+make-innetgr-optional.patch
+polkit-common.pre-install
+polkit-common.pre-upgrade
+polkit.initd
"
-prepare () {
- apply_patches
-
- autoreconf -fi
+prepare() {
+ apply_patches
+ autoreconf -fi
}
-build () {
- mkdir build &&
- cd build &&
-
- ../configure \
+build() {
+ ./configure \
+ --disable-libsystemd-login \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
@@ -39,20 +39,28 @@ build () {
--disable-gtk-doc-html \
--disable-gtk-doc-pdf \
--disable-libelogind \
- --disable-systemd \
- --enable-libsystemd-login
- make
+ --disable-systemd
+ make
}
-package () {
- make DESTDIR=$PKG_DEST install &&
- cd .. &&
- install -m644 polkit-1 $PKG_DEST/etc/pam.d/polkit-1
-}
+package() {
+ provider_priority=100 # highest
+
+ make DESTDIR="$PKG_DEST" \
+ dbusconfdir=/usr/share/dbus-1/system.d \
+ rulesdir=/usr/share/polkit-1/rules.d \
+ install
+ cd "$PKG_DEST"
+
+ # Use our own polkit rules, upstream may change them
+ install -m644 "$BUILD_ROOT"/alpine-polkit.pam etc/pam.d/polkit-1
-postinstall() {
- /usr/sbin/groupadd -fg 27 polkitd &&
- /usr/sbin/useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
- -g polkitd -s /bin/false polkitd
- true
+ # See polkit's configure script which tells us what permissions to set
+ chown -R polkitd:polkitd etc/polkit-1/rules.d usr/share/polkit-1/rules.d
+ chmod -R 700 etc/polkit-1/rules.d usr/share/polkit-1/rules.d
+ chmod 4755 usr/lib/polkit-1/polkit-agent-helper-1
+ chmod 4755 usr/bin/pkexec
+
+ install -Dm755 "$BUILD_ROOT"/polkit.initd etc/init.d/polkit
}
+