From b7eab76d3172fa4d9ea09df69fd412cc67ab0cb5 Mon Sep 17 00:00:00 2001 From: Erik Hanson Date: Tue, 10 Dec 2013 09:40:01 +0700 Subject: system/gparted: Updated for version 0.17.0. Use polkit to workaround gksudo not working. Signed-off-by: Willy Sudiarto Raharjo Signed-off-by: dsomero --- system/gparted/README | 1 + system/gparted/com.slackware.pkexec.gparted.policy | 20 ++++++++++++++++++++ system/gparted/gparted.SlackBuild | 11 ++++++++++- system/gparted/gparted.info | 6 +++--- system/gparted/gparted_polkit | 6 ++++++ 5 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 system/gparted/com.slackware.pkexec.gparted.policy create mode 100644 system/gparted/gparted_polkit (limited to 'system') diff --git a/system/gparted/README b/system/gparted/README index 0f91a13021..5f0d40916e 100644 --- a/system/gparted/README +++ b/system/gparted/README @@ -3,3 +3,4 @@ tables. Several (optional) "file system" tools provide support for file systems not included in libparted. These optional packages will be detected at runtime and do not require a rebuild of GParted. GParted is written in C++ and uses gtkmm for it's Graphical User Interface (GUI). + diff --git a/system/gparted/com.slackware.pkexec.gparted.policy b/system/gparted/com.slackware.pkexec.gparted.policy new file mode 100644 index 0000000000..2981762ef8 --- /dev/null +++ b/system/gparted/com.slackware.pkexec.gparted.policy @@ -0,0 +1,20 @@ + + + + + + Authentication is required to run the GParted Partition Editor + gparted + + auth_admin + auth_admin + auth_admin + + /usr/sbin/gparted + true + + + + diff --git a/system/gparted/gparted.SlackBuild b/system/gparted/gparted.SlackBuild index 114f1473e4..70c27cc9cd 100644 --- a/system/gparted/gparted.SlackBuild +++ b/system/gparted/gparted.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=gparted -VERSION=${VERSION:-0.16.0} +VERSION=${VERSION:-0.17.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -65,6 +65,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +sed -i "s:@gksuprog@ @installdir@/gparted %f:@installdir@/gparted_polkit %f:g" \ + gparted.desktop.in.in + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -78,6 +81,12 @@ CXXFLAGS="$SLKCFLAGS" \ make make install-strip DESTDIR=$PKG +install -Dm0644 $CWD/com.slackware.pkexec.gparted.policy \ + $PKG/usr/share/polkit-1/actions/com.slackware.pkexec.gparted.policy + +install -Dm0755 $CWD/gparted_polkit \ + $PKG/usr/sbin/gparted_polkit + gzip -9 $PKG/usr/man/man?/*.? mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/system/gparted/gparted.info b/system/gparted/gparted.info index 89bcff3f2d..f75a09b010 100644 --- a/system/gparted/gparted.info +++ b/system/gparted/gparted.info @@ -1,8 +1,8 @@ PRGNAM="gparted" -VERSION="0.16.0" +VERSION="0.17.0" HOMEPAGE="http://gparted.sourceforge.net/" -DOWNLOAD="http://downloads.sourceforge.net/gparted/gparted-0.16.0.tar.bz2" -MD5SUM="880e58673c9ef195181c0d721717a601" +DOWNLOAD="http://downloads.sourceforge.net/gparted/gparted-0.17.0.tar.bz2" +MD5SUM="ecd66491bb2061c6aa6077cc24823b9e" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="gtkmm" diff --git a/system/gparted/gparted_polkit b/system/gparted/gparted_polkit new file mode 100644 index 0000000000..76bd7b5e64 --- /dev/null +++ b/system/gparted/gparted_polkit @@ -0,0 +1,6 @@ +#!/bin/bash +if [ $(which pkexec) ]; then + pkexec --disable-internal-agent "/usr/sbin/gparted" "$@" +else + /usr/sbin/gparted "$@" +fi -- cgit v1.2.3