diff options
Diffstat (limited to 'source/l/polkit/polkit.SlackBuild')
-rwxr-xr-x | source/l/polkit/polkit.SlackBuild | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/source/l/polkit/polkit.SlackBuild b/source/l/polkit/polkit.SlackBuild index 7aa40f5d..a4bb9fc1 100755 --- a/source/l/polkit/polkit.SlackBuild +++ b/source/l/polkit/polkit.SlackBuild @@ -2,7 +2,7 @@ # Copyright 2009, 2011 Robby Workman, Northport, Alabama, USA # Copyright 2010 Eric Hameleers, Eindhoven, NL -# Copyright 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2009, 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # Redistribution and use of this script, with or without modification, is @@ -25,7 +25,7 @@ PKGNAM=polkit VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -72,12 +72,6 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# https://bugzilla.redhat.com/show_bug.cgi?id=692922 -patch -p1 < $CWD/CVE-2011-1485/0001-PolkitUnixProcess-Clarify-that-the-real-uid-is-retur.patch || exit 1 -patch -p1 < $CWD/CVE-2011-1485/0002-Make-PolkitUnixProcess-also-record-the-uid-of-the-pr.patch || exit 1 -patch -p1 < $CWD/CVE-2011-1485/0003-Use-polkit_unix_process_get_uid-to-get-the-owner-of-.patch || exit 1 -patch -p1 < $CWD/CVE-2011-1485/0004-pkexec-Avoid-TOCTTOU-problems-with-parent-process.patch || exit 1 - CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -90,7 +84,7 @@ CXXFLAGS="$SLKCFLAGS" \ --enable-gtk-doc \ --mandir=/usr/man \ --disable-static \ - --disable-introspection \ + --enable-introspection \ --with-authfw=shadow \ --enable-verbose-mode \ --with-os-type=Slackware \ @@ -109,6 +103,10 @@ CXXFLAGS="$SLKCFLAGS" \ make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 +# Add default policy files for udisks2 and NetworkManager events: +cat $CWD/20-plugdev-group-mount-override.pkla > $PKG/etc/polkit-1/localauthority/50-local.d/20-plugdev-group-mount-override.pkla.new +cat $CWD/10-org.freedesktop.NetworkManager.pkla > $PKG/etc/polkit-1/localauthority/50-local.d/10-org.freedesktop.NetworkManager.pkla.new + # Strip binaries: find $PKG | xargs file | grep -e "executable" -e "shared object" \ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null @@ -131,12 +129,20 @@ fi # Add a documentation directory: mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a \ - AUTHORS COPYING ChangeLog HACKING INSTALL NEWS README \ + AUTHORS COPYING HACKING INSTALL NEWS README \ $PKG/usr/doc/$PKGNAM-$VERSION -( cd $PKG/usr/doc/$PKGNAM-$VERSION; ln -s ../../share/gtk-doc/html/polkit-1 html -) +( cd $PKG/usr/doc/$PKGNAM-$VERSION; ln -s ../../share/gtk-doc/html/polkit-1 html ) + +# If there's a ChangeLog, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi mkdir -p $PKG/install +zcat $CWD/doinst.sh > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG |