Difference between revisions of "PolicyKit"

From CBLFS
Jump to navigationJump to search
(Fixed build wrt gobject-introspection)
(Reverted to 0.9 page status. Versions labeled "polkit" are incompatible with HAL. See Polkit page.)
Line 2: Line 2:
 
|-valign="top"
 
|-valign="top"
 
!Download Source:
 
!Download Source:
| http://hal.freedesktop.org/releases/polkit-{{PolicyKit-Version}}.tar.gz
+
| http://hal.freedesktop.org/releases/PolicyKit-{{PolicyKit-Version}}.tar.gz
 
|}
 
|}
  
 
----
 
----
  
{{Package-Introduction|PolicyKit is a framework for defining policy for system-wide components and for desktop pieces to configure it. It is used by [[HAL]].}}
+
{{Package-Introduction|PolicyKit is a framework for defining policy for system-wide components and for desktop pieces to configure it. It is used by [[HAL]]. Note that this is not compatible with later versions; see [[Polkit]] if you need such a version.}}
  
 
== Dependencies ==
 
== Dependencies ==
Line 13: Line 13:
 
=== Required ===
 
=== Required ===
 
* [[D-BUS Glib]]
 
* [[D-BUS Glib]]
* [[Eggdbus]]
 
 
* [[Glib2]]
 
* [[Glib2]]
 
* [[Linux-PAM]]
 
* [[Linux-PAM]]
 
* [[xmlto]]
 
* [[xmlto]]
* [[Gobject-introspection]]
 
  
 
=== Optional ===
 
=== Optional ===
Line 36: Line 34:
 
  ./configure --prefix=/usr --sysconfdir=/etc \
 
  ./configure --prefix=/usr --sysconfdir=/etc \
 
     --libexecdir=/usr/lib/PolicyKit --localstatedir=/var \
 
     --libexecdir=/usr/lib/PolicyKit --localstatedir=/var \
     --with-polkit-user=polkit &&
+
     --with-polkit-user=polkit --with-polkit-group=polkit &&
 
  make
 
  make
  
Line 49: Line 47:
 
Compile the package:
 
Compile the package:
  
  export CC="gcc ${BUILD32}"
+
  CC="gcc ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}"
 
export USE_ARCH=32
 
 
  ./configure --prefix=/usr --sysconfdir=/etc \
 
  ./configure --prefix=/usr --sysconfdir=/etc \
 
     --libexecdir=/usr/lib/PolicyKit --localstatedir=/var \
 
     --libexecdir=/usr/lib/PolicyKit --localstatedir=/var \
     --with-polkit-user=polkit &&
+
     --with-polkit-user=polkit --with-polkit-group=polkit &&
 
  make
 
  make
  
Line 60: Line 56:
  
 
  make install
 
  make install
unset CC
 
unset PKG_CONFIG_PATH
 
unset USE_ARCH
 
  
 
=== N32 ===
 
=== N32 ===
Line 68: Line 61:
 
Compile the package:
 
Compile the package:
  
  export CC="gcc ${BUILDN32}"
+
  CC="gcc ${BUILDN32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \
export PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}"
 
export USE_ARCH=n32
 
 
  ./configure --prefix=/usr --sysconfdir=/etc \
 
  ./configure --prefix=/usr --sysconfdir=/etc \
 
     --libexecdir=/usr/lib32/PolicyKit --localstatedir=/var \
 
     --libexecdir=/usr/lib32/PolicyKit --localstatedir=/var \
 
     --libdir=/usr/lib32 --with-pam-module-dir=/lib32/security \
 
     --libdir=/usr/lib32 --with-pam-module-dir=/lib32/security \
     --with-polkit-user=polkit &&
+
     --with-polkit-user=polkit --with-polkit-group=polkit &&
 
  make
 
  make
  
Line 80: Line 71:
  
 
  make install
 
  make install
unset CC
 
unset PKG_CONFIG_PATH
 
unset USE_ARCH
 
  
 
=== 64Bit ===
 
=== 64Bit ===
Line 88: Line 76:
 
Compile the package:
 
Compile the package:
  
  export CC="gcc ${BUILD64}"
+
  CC="gcc ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}"
 
export USE_ARCH=64
 
 
  ./configure --prefix=/usr --sysconfdir=/etc \
 
  ./configure --prefix=/usr --sysconfdir=/etc \
 
     --libexecdir=/usr/lib64/PolicyKit --localstatedir=/var \
 
     --libexecdir=/usr/lib64/PolicyKit --localstatedir=/var \
 
     --libdir=/usr/lib64 --with-pam-module-dir=/lib64/security \
 
     --libdir=/usr/lib64 --with-pam-module-dir=/lib64/security \
     --with-polkit-user=polkit &&
+
     --with-polkit-user=polkit --with-polkit-group=polkit &&
 
  make
 
  make
  
Line 100: Line 86:
  
 
  make install
 
  make install
unset CC
 
unset PKG_CONFIG_PATH
 
unset USE_ARCH
 
  
 
== Configuration ==
 
== Configuration ==
Line 122: Line 105:
 
|-valign="top"
 
|-valign="top"
 
! Installed Programs:
 
! Installed Programs:
| pkexec pkcheck pkaction pk-example-frobnicate
+
| polkit-grant-privilege polkit-is-rivileged polkit-list-privileges polkit-revoke-privilege polkitd
 
|-valign="top"
 
|-valign="top"
 
! Installed Libraries:
 
! Installed Libraries:
| libpolkit-gobject-1.{a,la,so} libpolkit-backend-1.{a,la,so} libpolkit-agent-1.{a,la,so} libnullbackend.{a,la,so}
+
| libpolkit.{so,a,la} libpolkit-grant.{so,a,la} /lib/security/pam_polkit_console.{so,a,la}
 
|-valign="top"
 
|-valign="top"
 
! Installed Directories:
 
! Installed Directories:
| /usr/share/polkit-1 /usr/include/polkit-1 /var/lib/polkit-1 /usr/lib/polkit-1 /etc/polkit-1 /usr/lib/PolicyKit
+
| /etc/PolicyKit/privilege.d /var/run/polkit-console
 
|}
 
|}
  
 
[[Category:General Utilities]]
 
[[Category:General Utilities]]

Revision as of 12:42, 4 January 2010

Download Source: http://hal.freedesktop.org/releases/PolicyKit-0.9.tar.gz

Introduction to PolicyKit

PolicyKit is a framework for defining policy for system-wide components and for desktop pieces to configure it. It is used by HAL. Note that this is not compatible with later versions; see Polkit if you need such a version.

Project Homepage: Unknown

Dependencies

Required

Optional

PolKit User/Group

groupadd -g 26 polkit &&
useradd -c "Policy Kit Daemon User" -d /dev/null \
        -u 26 -g polkit -s /bin/false polkit

Non-Multilib

Compile the package:

./configure --prefix=/usr --sysconfdir=/etc \
    --libexecdir=/usr/lib/PolicyKit --localstatedir=/var \
    --with-polkit-user=polkit --with-polkit-group=polkit &&
make

Install the package

make install

Multilib

32Bit

Compile the package:

CC="gcc ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
./configure --prefix=/usr --sysconfdir=/etc \
    --libexecdir=/usr/lib/PolicyKit --localstatedir=/var \
    --with-polkit-user=polkit --with-polkit-group=polkit &&
make

Install the package

make install

N32

Compile the package:

CC="gcc ${BUILDN32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \
./configure --prefix=/usr --sysconfdir=/etc \
    --libexecdir=/usr/lib32/PolicyKit --localstatedir=/var \
    --libdir=/usr/lib32 --with-pam-module-dir=/lib32/security \
    --with-polkit-user=polkit --with-polkit-group=polkit &&
make

Install the package

make install

64Bit

Compile the package:

CC="gcc ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
./configure --prefix=/usr --sysconfdir=/etc \
    --libexecdir=/usr/lib64/PolicyKit --localstatedir=/var \
    --libdir=/usr/lib64 --with-pam-module-dir=/lib64/security \
    --with-polkit-user=polkit --with-polkit-group=polkit &&
make

Install the package

make install

Configuration

To allow HAL to automount removable drives such a thumbdrives, edit /etc/PolicyKit/PolicyKit.conf and add the following between the <config></config> tags:

<match action="org.freedesktop.hal.storage.mount-removable">
    <return result="yes" />
</match>

Without this you will receive an error similar to org.freedesktop.Hal.Device.PermissionDeniedByPolicy: org.freedesktop.hal.storage.mount-removable no <--(action,result) when you "plug in" your thumb drive.

You then must upgrade your util-linux to the latest version or HAL automounting will fail with the following error FAT: Unrecognized mount option "uhelper=hal" or missing value. Instructions for building the latest version of util-linux can be found the development CLFS books.

Contents

Installed Programs: polkit-grant-privilege polkit-is-rivileged polkit-list-privileges polkit-revoke-privilege polkitd
Installed Libraries: libpolkit.{so,a,la} libpolkit-grant.{so,a,la} /lib/security/pam_polkit_console.{so,a,la}
Installed Directories: /etc/PolicyKit/privilege.d /var/run/polkit-console