FS#34599 - [gparted] Change dependency on polkit to optdepend

Attached to Project: Arch Linux
Opened by Philipp (hollunder) - Thursday, 04 April 2013, 11:24 GMT
Last edited by Giovanni Scafora (giovanni) - Monday, 27 May 2013, 19:58 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Giovanni Scafora (giovanni)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The dependency on polkit is not necessary, it's the DEs that need polkit to launch gparted from their menu. Gparted works fine without polkit, so it really is an optional dependency.

All the DEs I could think of install polkit (I checked gnome, kde, xfce, e17), so the optdepend won't hurt them, but it would allow non-DE users to keep the system free of polkit.

Additional info:
* package version(s)
gparted 0.15.0-1

* config and/or log files etc.


Steps to reproduce:
This task depends upon

Closed by  Giovanni Scafora (giovanni)
Monday, 27 May 2013, 19:58 GMT
Reason for closing:  Fixed
Comment by Balló György (City-busz) - Monday, 08 April 2013, 22:07 GMT
Make sense, but it requires a more advanced launcher script, e.g.:

#!/bin/sh
if [ $(which pkexec) ]; then
pkexec --disable-internal-agent "/usr/sbin/gparted.elf" "$@"
else
/usr/sbin/gparted.elf "$@"
fi

Or use guisu as launcher script, which falls back to gksu and then command line if no polkit authentication GUI found. It's created by xyproto and me:
https://github.com/xyproto/guisu/blob/master/guisu.sh
Comment by Balló György (City-busz) - Wednesday, 01 May 2013, 12:48 GMT
  • Field changed: Percent Complete (100% → 0%)
This breaks the gparted command on systems without polkit:
/usr/sbin/gparted: line 2: pkexec: command not found
See my last comment.
Comment by Philipp (hollunder) - Wednesday, 01 May 2013, 13:04 GMT
Hi there,
for completeness, here's what I wrote to City-busz and giovanni while I couldn't post here:

I have the following proposition:
At the moment, with version 0.16.1-1, gparted can be started without
polkit by executing polkit.elf as root or via sudo. Just executing
gparted (which is a script that does some polkit stuff) does not work
without polkit, as you mentioned.

The solution I propose is simple:
Name the plain gparted executable gparted, for all the CLI and minimal
GUI users out there.
Name the polkit script gparted_polkit and change the desktop file
accordingly, for all the gnomes and other desktop-file/polkit users.

Done. Everyone's happy!(?)
Comment by Balló György (City-busz) - Wednesday, 01 May 2013, 13:13 GMT
Okay, hollunder's proposal is fine for me. I think we need to create package guidelines in wiki for GUI applications that need to be run as root.
Comment by Giovanni Scafora (giovanni) - Sunday, 19 May 2013, 15:48 GMT
Fixed in gparted-0.16.1-3.
Before closing this bug report, please let me know if it is OK.
Comment by Philipp (hollunder) - Sunday, 19 May 2013, 17:21 GMT
Thanks Giovanni, for me 0.16.1-2 is fine, and so is 0.16.1-3 (I'm just running 'sudo gparted').

I was briefly looking through the files and I have some more minor suggestions. I'm not sure whether the message in gparted.install is still accurate. I personally think the script as file is nicer than the echo-lines.
Anyway, I am happy, thanks a lot :)
Comment by Giovanni Scafora (giovanni) - Sunday, 19 May 2013, 17:41 GMT
gparted-0.16.1-5:

1) added launcher script for polkit users (no echo-lines on PKGBUILD)
2) improved gparted.install file

Before closing this bug report, please if you have other suggestions, let me know.

Loading...