Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pam.git;a=commitdiff;h=6dc728a8ddf3261aff1c2a036393c14de39ed10f
commit 6dc728a8ddf3261aff1c2a036393c14de39ed10f Author: bouleetbil <bouleet...@frogdev.info> Date: Sun Oct 4 16:43:27 2009 +0200 policykit-0.9-1-i686 *new package diff --git a/source/apps/policykit/FrugalBuild b/source/apps/policykit/FrugalBuild new file mode 100644 index 0000000..949e58a --- /dev/null +++ b/source/apps/policykit/FrugalBuild @@ -0,0 +1,32 @@ +# Compiling Time: 0.14 SBU +# Maintainer: bouleetbil <bouleet...@frogdev.info> + +pkgname=policykit +_F_archive_name=PolicyKit +pkgver=0.9 +pkgrel=1 +pkgdesc="Policy framework for controlling privileges for system-wide services" +url="http://hal.freedesktop.org/docs/PolicyKit" +depends=('pam' 'dbus-glib') +makedepends=('intltool') +groups=('apps') +archs=('i686' 'x86_64' 'ppc') +up2date="Flasttar http://hal.freedesktop.org/releases/" +source=(http://hal.freedesktop.org/releases/$_F_archive_name-$pkgver.tar.gz \ + policykit-0.9-consolekit03.patch \ + policykit-0.9-dbus-auth.patch \ + PolicyKit.conf) +sha1sums=('ac99c580eff72f6d5df261c155fb047306439f85' \ + 'cfba9d4fb2a18b711dd4133654ad9a2faba27c12' \ + 'a0b7d1ebbc0f269facab712978eaeed6a1bc8617' \ + 'c79e0f782f703a7091ce6ade5b5b504d33011392') + +build() { + Fbuild authdb=--with-authdb=default --with-authfw=pam --with-os-type=FrugalWare \ + --disable-selinux --disable-man-pages + Fmkdir etc/PolicyKit + Fcp PolicyKit.conf etc/PolicyKit + +} + +# optimization OK diff --git a/source/apps/policykit/PolicyKit.conf b/source/apps/policykit/PolicyKit.conf new file mode 100644 index 0000000..687ce97 --- /dev/null +++ b/source/apps/policykit/PolicyKit.conf @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- --> + +<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN" +"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd"> + +<!-- See the manual page PolicyKit.conf(5) for file format --> + +<config version="0.1"> +<define_admin_auth group="wheel"/> +<match user="root"> + <return result="yes"/> +</match> +</config> diff --git a/source/apps/policykit/policykit-0.9-consolekit03.patch b/source/apps/policykit/policykit-0.9-consolekit03.patch new file mode 100644 index 0000000..fe0abd8 --- /dev/null +++ b/source/apps/policykit/policykit-0.9-consolekit03.patch @@ -0,0 +1,86 @@ +# Description: Make PolicyKit work with ConsoleKit 0.3 API as well +# Ubuntu: https://bugs.launchpad.net/273711 +# Upstream: http://cvs.fedoraproject.org/viewvc/rpms/PolicyKit/devel/pk-ck-api-change.patch?view=markup +--- policykit-0.9/src/polkit-dbus/polkit-dbus.c 2008-05-30 23:24:44.000000000 +0200 ++++ policykit-0.9.new/src/polkit-dbus/polkit-dbus.c 2008-09-24 13:40:37.000000000 +0200 +@@ -214,11 +214,17 @@ + dbus_message_unref (reply); + goto out; + } ++ /* GetUnixUser API Changed in CK 0.3.0 */ + if (!dbus_message_get_args (reply, NULL, +- DBUS_TYPE_INT32, &uid, ++ DBUS_TYPE_UINT32, &uid, + DBUS_TYPE_INVALID)) { +- kit_warning ("Invalid GetUnixUser reply from CK"); +- goto out; ++ /* try the older API */ ++ if (!dbus_message_get_args (reply, NULL, ++ DBUS_TYPE_INT32, &uid, ++ DBUS_TYPE_INVALID)) { ++ kit_warning ("Invalid GetUnixUser reply from CK"); ++ goto out; ++ } + } + dbus_message_unref (message); + dbus_message_unref (reply); +@@ -1326,16 +1332,21 @@ + + dbus_error_init (&error); + seat_objpath = dbus_message_get_path (message); +- if (!dbus_message_get_args (message, &error, +- DBUS_TYPE_STRING, &session_objpath, ++ /* API fixed in CK 0.3 to match spec */ ++ if (!dbus_message_get_args (message, &error, ++ DBUS_TYPE_OBJECT_PATH, &session_objpath, + DBUS_TYPE_INVALID)) { ++ if (!dbus_message_get_args (message, &error, ++ DBUS_TYPE_STRING, &session_objpath, ++ DBUS_TYPE_INVALID)) { ++ ++ /* TODO: should be _pk_critical */ ++ kit_warning ("The SessionAdded signal on the org.freedesktop.ConsoleKit.Seat " ++ "interface for object %s has the wrong signature! " ++ "Your system is misconfigured.", seat_objpath); + +- /* TODO: should be _pk_critical */ +- kit_warning ("The SessionAdded signal on the org.freedesktop.ConsoleKit.Seat " +- "interface for object %s has the wrong signature! " +- "Your system is misconfigured.", seat_objpath); +- +- goto out; ++ goto out; ++ } + } + + /* TODO: add to sessions - see polkit_tracker_is_authorization_relevant() */ +@@ -1353,16 +1364,21 @@ + + dbus_error_init (&error); + seat_objpath = dbus_message_get_path (message); +- if (!dbus_message_get_args (message, &error, +- DBUS_TYPE_STRING, &session_objpath, ++ /* API fixed in CK 0.3 to match spec */ ++ if (!dbus_message_get_args (message, &error, ++ DBUS_TYPE_OBJECT_PATH, &session_objpath, + DBUS_TYPE_INVALID)) { ++ if (!dbus_message_get_args (message, &error, ++ DBUS_TYPE_STRING, &session_objpath, ++ DBUS_TYPE_INVALID)) { ++ ++ /* TODO: should be _pk_critical */ ++ kit_warning ("The SessionRemoved signal on the org.freedesktop.ConsoleKit.Seat " ++ "interface for object %s has the wrong signature! " ++ "Your system is misconfigured.", seat_objpath); + +- /* TODO: should be _pk_critical */ +- kit_warning ("The SessionRemoved signal on the org.freedesktop.ConsoleKit.Seat " +- "interface for object %s has the wrong signature! " +- "Your system is misconfigured.", seat_objpath); +- +- goto out; ++ goto out; ++ } + } + + _remove_caller_by_session (pk_tracker, session_objpath); diff --git a/source/apps/policykit/policykit-0.9-dbus-auth.patch b/source/apps/policykit/policykit-0.9-dbus-auth.patch new file mode 100644 index 0000000..16d1f52 --- /dev/null +++ b/source/apps/policykit/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/source/apps/policykit/policykit.install b/source/apps/policykit/policykit.install new file mode 100644 index 0000000..f0ab7c2 --- /dev/null +++ b/source/apps/policykit/policykit.install @@ -0,0 +1,31 @@ +post_install() { + if ! grep -q 'polkituser' /etc/group; then + echo "added polkituser" + #create group + /usr/sbin/groupadd -g 67 polkituser 2>/dev/null + #create user + /usr/sbin/useradd -s /bin/false -c "polkituser" -u 67 -g polkituser polkituser 2>/dev/null + fi + #create directory + mkdir -p /var/run/PolicyKit 2>/dev/null + mkdir -p /var/lib/PolicyKit 2>/dev/null + touch /var/lib/misc/PolicyKit.reload 2>/dev/null + +} + +post_upgrade() +{ + post_install + +} + +pre_remove() +{ + rm -Rf /var/run/PolicyKit 2>/dev/null + rm -Rf /var/lib/PolicyKit 2>/dev/null + rm -f /var/lib/misc/PolicyKit.reload 2>/dev/null +} + +op=$1 +shift +$op $* _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git