FS#34168 - [gparted] Use --disable-internal-agent option, remove helper script

Attached to Project: Arch Linux
Opened by Balló György (City-busz) - Wednesday, 06 March 2013, 07:43 GMT
Last edited by Giovanni Scafora (giovanni) - Monday, 11 March 2013, 17:40 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

I would like to propose the following changes in gparted packaging (see the attachment):

- Use --disable-internal-agent option on pkexec to avoid X freeze in case of no graphical authentication agent available. (This fixes the problem reported in  FS#31912 )

- Remove the launcher helper script, because gnome-panel is fixed now, and able to run pkexec from the .desktop files directly (Upstream report: https://bugzilla.gnome.org/show_bug.cgi?id=686059 )
This task depends upon

Closed by  Giovanni Scafora (giovanni)
Monday, 11 March 2013, 17:40 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in gparted-0.14.1-5
Comment by Giovanni Scafora (giovanni) - Friday, 08 March 2013, 20:36 GMT
Fixed in gparted-0.14.1-2
Let me know.
Comment by Balló György (City-busz) - Saturday, 09 March 2013, 10:17 GMT
Sorry, it was my mistake. Even if it was fixed in GNOME Shell and GNOME Panel, many other launchers unable to run pkexec directly, so we need to keep the wrapper script. See my comment here:
https://bugs.archlinux.org/task/34166#comment106918

We need consistent naming for these scripts, e.g. unetbootin renames the original binary to unetbootin.elf, and replaces it with the wrapper script. It make sense to use the same naming schema for gparted.
Comment by Giovanni Scafora (giovanni) - Saturday, 09 March 2013, 16:49 GMT
Just fixed again in gparted-0.14.1-4
Please, let me know.
Comment by Balló György (City-busz) - Sunday, 10 March 2013, 05:03 GMT
Thanks for your patience. It still needs some adjustments:

- The .destkop file should launch the script instead of pkexec. This is the main reason why we need the wrapper script.

- Add --disable-internal-agent option to the wrapper script to avoid X freeze, when no graphical authentication agent available.

- polkit-gnome dependency should be optional. GNOME Shell and KDE users don't need to install it, and command line users are still able to run gparted with sudo. Keeping polkit in dependencies should be enough.

I attached a diff file for the current PKGBUILD. I tested this package with various DEs and file managers, and it works fine.
Comment by Giovanni Scafora (giovanni) - Sunday, 10 March 2013, 09:57 GMT
Just fixed in gparted-0.14.1-5
Please, let me know, so I can finally close this bug report.
Comment by Philipp (hollunder) - Sunday, 10 March 2013, 10:18 GMT
Is polkit (and it's weird dependency on js) even strictly needed? It works fine on my non-DE system by just running it thorugh sudo.
I think Desktops that use polkit should pull in polkit, not the programs that don't strictly need it.
Comment by Giovanni Scafora (giovanni) - Sunday, 10 March 2013, 13:41 GMT
Perhaps polkit is not strictly needed.
City-busz what do you think about? Maybe I should remove polkit from depends field?
Please, let me know.
Comment by Balló György (City-busz) - Monday, 11 March 2013, 03:11 GMT
I think that polkit dependency should be kept, since we renamed the original script to 'gparted.efi'. If we remove polkit, the users would get the following error when they are trying to run 'gparted':
/usr/sbin/gparted: line 2: pkexec: command not found

Of course, it's still possible to run gparted without polkit with 'sudo gparted.efi', but I think the majority of users launch gparted from desktop menu, destkop launcher or file manager, and polkit is needed in all cases.
Comment by Philipp (hollunder) - Monday, 11 March 2013, 13:38 GMT
So a call to gparted will run
'pkexec --disable-internal-agent "/usr/sbin/gparted.elf" "$@"'.

The actual binary will be renamed to gparted.elf.

Since gparted will still run without polkit installed (by running 'sudo gparted.elf') I vote for keeping polkit as an optdepend.
As far as I know, the major desktop environments will have polkit installed anyway. Anyone else knows how to use tab completion.

Loading...