summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gryniewicz <dang@gentoo.org>2009-04-25 02:42:17 +0000
committerDaniel Gryniewicz <dang@gentoo.org>2009-04-25 02:42:17 +0000
commit45711de7472a2295e675bd8f7964bd5a39c5bc53 (patch)
tree9bea678c0856e0065ecce6d9c8073cc9b71338cf /sys-auth
parentBump to policykit-gnome-0.9.2-r1 (diff)
downloadgentoo-2-45711de7472a2295e675bd8f7964bd5a39c5bc53.tar.gz
gentoo-2-45711de7472a2295e675bd8f7964bd5a39c5bc53.tar.bz2
gentoo-2-45711de7472a2295e675bd8f7964bd5a39c5bc53.zip
Fix policykit with new deny default in dbus
(Portage version: 2.2_rc31/cvs/Linux x86_64)
Diffstat (limited to 'sys-auth')
-rw-r--r--sys-auth/policykit/ChangeLog8
-rw-r--r--sys-auth/policykit/files/policykit-0.9-dbus-auth.patch13
-rw-r--r--sys-auth/policykit/policykit-0.9-r1.ebuild129
3 files changed, 149 insertions, 1 deletions
diff --git a/sys-auth/policykit/ChangeLog b/sys-auth/policykit/ChangeLog
index 01d7ce69221b..25b67d0480c5 100644
--- a/sys-auth/policykit/ChangeLog
+++ b/sys-auth/policykit/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-auth/policykit
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/policykit/ChangeLog,v 1.14 2009/04/23 15:38:23 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/policykit/ChangeLog,v 1.15 2009/04/25 02:42:16 dang Exp $
+
+*policykit-0.9-r1 (25 Apr 2009)
+
+ 25 Apr 2009; Daniel Gryniewicz <dang@gentoo.org>
+ +files/policykit-0.9-dbus-auth.patch, +policykit-0.9-r1.ebuild:
+ Fix policykit with new deny default in dbus
23 Apr 2009; Raúl Porcel <armin76@gentoo.org> policykit-0.9.ebuild:
Add ~arm/~s390/~sh
diff --git a/sys-auth/policykit/files/policykit-0.9-dbus-auth.patch b/sys-auth/policykit/files/policykit-0.9-dbus-auth.patch
new file mode 100644
index 000000000000..16d1f523c5d5
--- /dev/null
+++ b/sys-auth/policykit/files/policykit-0.9-dbus-auth.patch
@@ -0,0 +1,13 @@
+diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN PolicyKit-0.9.orig/polkitd/org.freedesktop.PolicyKit.conf.in PolicyKit-0.9/polkitd/org.freedesktop.PolicyKit.conf.in
+--- PolicyKit-0.9.orig/polkitd/org.freedesktop.PolicyKit.conf.in 2008-05-30 17:24:44.000000000 -0400
++++ PolicyKit-0.9/polkitd/org.freedesktop.PolicyKit.conf.in 2009-04-24 22:14:57.000000000 -0400
+@@ -8,4 +8,9 @@
+ <policy user="@polkituser@">
+ <allow own="org.freedesktop.PolicyKit"/>
+ </policy>
++
++ <!-- any user can talk to the service (fd.o #18948) -->
++ <policy context="default">
++ <allow send_destination="org.freedesktop.PolicyKit"/>
++ </policy>
+ </busconfig>
diff --git a/sys-auth/policykit/policykit-0.9-r1.ebuild b/sys-auth/policykit/policykit-0.9-r1.ebuild
new file mode 100644
index 000000000000..72d31297493c
--- /dev/null
+++ b/sys-auth/policykit/policykit-0.9-r1.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/policykit/policykit-0.9-r1.ebuild,v 1.1 2009/04/25 02:42:16 dang Exp $
+
+inherit autotools bash-completion eutils multilib pam
+
+MY_PN="PolicyKit"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Policy framework for controlling privileges for system-wide services"
+HOMEPAGE="http://hal.freedesktop.org/docs/PolicyKit"
+SRC_URI="http://hal.freedesktop.org/releases/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="bash-completion doc pam selinux zsh-completion"
+
+RDEPEND=">=dev-libs/glib-2.6
+ >=dev-libs/dbus-glib-0.73
+ dev-libs/expat
+ pam? ( virtual/pam )
+ selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ >=dev-util/pkgconfig-0.18
+ >=dev-util/intltool-0.36
+ >=dev-util/gtk-doc-am-1.10-r1
+ doc? ( >=dev-util/gtk-doc-1.10 )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup polkituser
+ enewuser polkituser -1 "-1" /dev/null polkituser
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Add zsh/bash completion
+ epatch "${FILESDIR}/${PN}-0.7-completions.patch"
+
+ # Fix use of undefined _pk_debug, bug #239573
+ epatch "${FILESDIR}/${P}-pk-debug.patch"
+
+ # Fix useless pam header inclusion, bug #239554
+ epatch "${FILESDIR}/${P}-pam-headers.patch"
+
+ # Fix API change in consolekit 0.3
+ epatch "${FILESDIR}/${P}-consolekit03.patch"
+
+ # Fix dbus auth for new deny default
+ epatch "${FILESDIR}"/${P}-dbus-auth.patch
+ eautoreconf
+}
+
+src_compile() {
+ local authdb=
+
+ if use pam ; then
+ authdb="--with-authdb=default --with-authfw=pam --with-pam-module-dir=$(getpam_mod_dir)"
+ else
+ authdb="--with-authdb=dummy --with-authfw=none"
+ fi
+
+ econf ${authdb} \
+ --without-bash-completion \
+ --without-zsh-completion \
+ --enable-man-pages \
+ --with-os-type=gentoo \
+ --with-polkit-user=polkituser \
+ --with-polkit-group=polkituser \
+ $(use_enable doc gtk-doc) \
+ $(use_enable selinux) \
+ --localstatedir=/var
+ # won't install with tests
+ # $(use_enable test tests) \
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ dodoc NEWS README AUTHORS ChangeLog
+
+ if use bash-completion; then
+ dobashcompletion "${S}/tools/polkit-bash-completion.sh"
+ fi
+
+ if use zsh-completion ; then
+ insinto /usr/share/zsh/site-functions
+ doins "${S}/tools/_polkit" || die "zsh completion died"
+ doins "${S}/tools/_polkit_auth" || die "zsh completion died"
+ doins "${S}/tools/_polkit_action" || die "zsh completion died"
+ fi
+
+ einfo "Installing basic PolicyKit.conf"
+ insinto /etc/PolicyKit
+ doins "${FILESDIR}"/PolicyKit.conf || die "doins failed"
+ # Need to keep a few directories around...
+
+ diropts -m0770 -o root -g polkituser
+ keepdir /var/run/PolicyKit
+ keepdir /var/lib/PolicyKit
+}
+
+pkg_preinst() {
+ # Stolen from vixie-cron ebuilds
+ has_version "<${CATEGORY}/${PN}-0.9"
+ fix_var_dir_perms=$?
+}
+
+pkg_postinst() {
+ # bug #239231
+ if [[ $fix_var_dir_perms = 0 ]] ; then
+ echo
+ ewarn "Previous version of PolicyKit handled /var/run and /var/lib"
+ ewarn "with different permissions. Proper permissions are"
+ ewarn "now being set on ${ROOT}var/lib/PolicyKit and ${ROOT}var/lib/PolicyKit"
+ ewarn "Look at these directories if you have a specific configuration"
+ ewarn "that needs special ownerships or permissions."
+ echo
+ chmod 0770 "${ROOT}"var/{lib,run}/PolicyKit || die "chmod failed"
+ chgrp -R polkituser "${ROOT}"var/{lib,run}/PolicyKit || die "chgrp failed"
+ fi
+}