[arch-commits] Commit in gparted/trunk (PKGBUILD org.archlinux.pkexec.gparted.policy)

Giovanni Scafora giovanni at archlinux.org
Sat Oct 8 07:31:01 UTC 2011


    Date: Saturday, October 8, 2011 @ 03:31:00
  Author: giovanni
Revision: 140161

upgpkg: gparted 0.9.1-3

Fixed FS26268

Added:
  gparted/trunk/org.archlinux.pkexec.gparted.policy
Modified:
  gparted/trunk/PKGBUILD

-------------------------------------+
 PKGBUILD                            |   26 ++++++++++++++++++++------
 org.archlinux.pkexec.gparted.policy |   20 ++++++++++++++++++++
 2 files changed, 40 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-10-08 05:52:53 UTC (rev 140160)
+++ PKGBUILD	2011-10-08 07:31:00 UTC (rev 140161)
@@ -1,27 +1,30 @@
 # $Id$
 # Maintainer: Giovanni Scafora <giovanni at archlinux.org>
 # Contributor: Andrew Simmons <andrew.simmons at gmail.com>
+# Contributor: György Balló <ballogy at freestart.hu>
 
 pkgname=gparted
 pkgver=0.9.1
-pkgrel=2
+pkgrel=3
 pkgdesc="A Partition Magic clone, frontend to GNU Parted"
 arch=('i686' 'x86_64')
 url="http://gparted.sourceforge.net"
 license=('GPL')
 depends=('parted' 'gtkmm' 'libsigc++')
-makedepends=('intltool' 'pkgconfig' 'gnome-doc-utils')
+makedepends=('intltool' 'pkg-config' 'gnome-doc-utils')
 optdepends=('dosfstools: for FAT16 and FAT32 partitions'
             'jfsutils: for jfs partitions'
             'ntfsprogs: for ntfs partitions'
             'reiserfsprogs: for reiser partitions'
             'xfsprogs: for xfs partitions'
-            'gksu: to run gparted directly from menu'
+            'polkit: to run gparted directly from menu'
             'gpart: for recovering corrupt partition tables'
             'mtools')
 install=gparted.install
-source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.bz2")
-md5sums=('f35785099994c7c9b7b2e842840f8b72')
+source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.bz2"
+        'org.archlinux.pkexec.gparted.policy')
+md5sums=('f35785099994c7c9b7b2e842840f8b72'
+         '27c264cfad8fa413d75954dda7a2dd50')
 
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
@@ -34,5 +37,16 @@
   cd "${srcdir}/${pkgname}-${pkgver}"
 
   make DESTDIR="${pkgdir}" install
-  sed -i -e "s:Exec= /usr/sbin:Exec=gksu /usr/sbin:g" ${pkgdir}/usr/share/applications/gparted.desktop
+
+  # Install policy file
+  install -Dm644 "${srcdir}/org.archlinux.pkexec.gparted.policy" "${pkgdir}/usr/share/polkit-1/actions/org.archlinux.pkexec.gparted.policy"
+
+  # Install launcher script
+  mkdir -p ${pkgdir}/usr/bin
+  echo '#!/bin/sh' > ${pkgdir}/usr/bin/gparted-pkexec
+  echo 'pkexec "/usr/sbin/gparted" "$@"' >> ${pkgdir}/usr/bin/gparted-pkexec
+  chmod 755 ${pkgdir}/usr/bin/gparted-pkexec
+
+  # Modify desktop file
+  sed -i -e "s/Exec=.*/Exec=gparted-pkexec/" ${pkgdir}/usr/share/applications/gparted.desktop
 }

Added: org.archlinux.pkexec.gparted.policy
===================================================================
--- org.archlinux.pkexec.gparted.policy	                        (rev 0)
+++ org.archlinux.pkexec.gparted.policy	2011-10-08 07:31:00 UTC (rev 140161)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<policyconfig>
+
+  <action id="org.archlinux.pkexec.gparted">
+    <message>Authentication is required to run the GParted Partition Editor</message>
+    <icon_name>gparted</icon_name>
+    <defaults>
+      <allow_any>auth_admin</allow_any>
+      <allow_inactive>auth_admin</allow_inactive>
+      <allow_active>auth_admin</allow_active>
+    </defaults>
+    <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/gparted</annotate>
+    <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+  </action>
+
+</policyconfig>
+




More information about the arch-commits mailing list