summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/consolekit/PKGBUILD16
-rw-r--r--pcr/consolekit/pam-foreground-compat.ck17
2 files changed, 27 insertions, 6 deletions
diff --git a/pcr/consolekit/PKGBUILD b/pcr/consolekit/PKGBUILD
index 87235fa49..7991c49e9 100644
--- a/pcr/consolekit/PKGBUILD
+++ b/pcr/consolekit/PKGBUILD
@@ -4,8 +4,8 @@
_pkgname=ConsoleKit2
pkgname=consolekit
-pkgver=1.0.0
-pkgrel=4
+pkgver=1.0.1
+pkgrel=2
pkgdesc="A framework for defining and tracking users, login sessions, and seats"
arch=('i686' 'x86_64')
url="https://github.com/ConsoleKit2/ConsoleKit2"
@@ -14,15 +14,17 @@ depends=('dbus' 'glib2' 'libx11' 'polkit' 'udev' 'zlib')
optdepends=('consolekit-openrc: consolekit openrc initscript'
'cgmanager-openrc: cgmanager openrc initscript')
makedepends=('xmlto' 'docbook-xsl' 'cgmanager')
-options=('libtool')
+options=('!libtool')
source=("$url/releases/download/$pkgver/$_pkgname-$pkgver.tar.bz2"
'consolekit.tmpfiles.conf'
'75-consolekit.rules'
- 'consolekit.pamd')
-sha256sums=('30b8026e62246593637bacf99ab9cbea18e7fea6ee07c45ae2a351912aacda4b'
+ 'consolekit.pamd'
+ 'pam-foreground-compat.ck')
+sha256sums=('741c53321a0792b165f386c73c668af25615accab6d15983290103348a3ff00c'
'778552dc12b3c235bde200e476d4262da0c135f3f6f8b3e975a87881d1f154d1'
'c5159d9fe8fdd52ad0d6a84af7ba00bac09edaae965896ab0d099a4df1c5ea6b'
- 'f7b88e87f447e2d37c12886f57d932c385f19a8fef238e0f1de7a1746d8be69e')
+ 'f7b88e87f447e2d37c12886f57d932c385f19a8fef238e0f1de7a1746d8be69e'
+ 'ad9b8d7c92e73c5cff7a883724992008b6a0382b2466fd5f69720f112c1eb0f9')
prepare(){
cd $srcdir/$_pkgname-$pkgver
@@ -64,4 +66,6 @@ package() {
install -dm755 $pkgdir/etc/pam.d/
install -Dm755 ${srcdir}/consolekit.pamd $pkgdir/etc/pam.d/consolekit
+
+ install $srcdir/pam-foreground-compat.ck $pkgdir/usr/lib/ConsoleKit/run-session.d
}
diff --git a/pcr/consolekit/pam-foreground-compat.ck b/pcr/consolekit/pam-foreground-compat.ck
new file mode 100644
index 000000000..90b8081e4
--- /dev/null
+++ b/pcr/consolekit/pam-foreground-compat.ck
@@ -0,0 +1,17 @@
+#!/bin/sh
+TAGDIR=/run/console
+
+[ -n "$CK_SESSION_USER_UID" ] || exit 1
+
+TAGFILE="$TAGDIR/`getent passwd $CK_SESSION_USER_UID | cut -f 1 -d:`"
+
+if [ "$1" = "session_added" ]; then
+ mkdir -p "$TAGDIR"
+ echo "$CK_SESSION_ID" >> "$TAGFILE"
+fi
+
+if [ "$1" = "session_removed" ] && [ -e "$TAGFILE" ]; then
+ sed -i "\%^$CK_SESSION_ID\$%d" "$TAGFILE"
+ [ -s "$TAGFILE" ] || rm -f "$TAGFILE"
+fi
+