diff -Nru gdebi-0.9.5.7+nmu1ubuntu1/data/gdebi.desktop.in gdebi-0.9.5.7+nmu1ubuntu2~ppa1/data/gdebi.desktop.in --- gdebi-0.9.5.7+nmu1ubuntu1/data/gdebi.desktop.in 2017-08-18 20:44:05.000000000 +0000 +++ gdebi-0.9.5.7+nmu1ubuntu2~ppa1/data/gdebi.desktop.in 2017-08-22 06:43:39.000000000 +0000 @@ -2,7 +2,7 @@ _Name=GDebi Package Installer _GenericName=Package Installer _Comment=Install and view software packages -Exec=gdebi-gtk-pkexec %f +Exec=gdebi-gtk %f Icon=gnome-mime-application-x-deb Terminal=false Type=Application diff -Nru gdebi-0.9.5.7+nmu1ubuntu1/debian/changelog gdebi-0.9.5.7+nmu1ubuntu2~ppa1/debian/changelog --- gdebi-0.9.5.7+nmu1ubuntu1/debian/changelog 2017-08-18 20:45:38.000000000 +0000 +++ gdebi-0.9.5.7+nmu1ubuntu2~ppa1/debian/changelog 2017-08-22 07:03:21.000000000 +0000 @@ -1,3 +1,15 @@ +gdebi (0.9.5.7+nmu1ubuntu2~ppa1) artful; urgency=medium + + * Finish the policykit port: + - gdebi-gtk-pkexec isn't needed, root access is only needed for the + package installation and removal. + - Install the policykit file (create debian/gdebi-gtk.install). + - Modify the gksu commands in GDebi/GDebiGtk.py to call pksu instead. + - Drop the dependency on gksu and only depend on policykit-1. + - Thanks for the initial work, Julien! + + -- Simon Quigley Tue, 22 Aug 2017 02:03:21 -0500 + gdebi (0.9.5.7+nmu1ubuntu1) artful; urgency=medium * Add a gdebi-gtk-pkexec executable to launch without gksu (LP: #189617). diff -Nru gdebi-0.9.5.7+nmu1ubuntu1/debian/control gdebi-0.9.5.7+nmu1ubuntu2~ppa1/debian/control --- gdebi-0.9.5.7+nmu1ubuntu1/debian/control 2017-08-18 20:44:05.000000000 +0000 +++ gdebi-0.9.5.7+nmu1ubuntu2~ppa1/debian/control 2017-08-22 06:44:10.000000000 +0000 @@ -47,7 +47,7 @@ gir1.2-gtk-3.0, gir1.2-vte-2.91, python3-gi, - policykit-1 | gksu, + policykit-1, gnome-icon-theme Recommends: libgtk2-perl, shared-mime-info, lintian Description: simple tool to view and install deb files - GNOME GUI diff -Nru gdebi-0.9.5.7+nmu1ubuntu1/debian/gdebi-gtk.install gdebi-0.9.5.7+nmu1ubuntu2~ppa1/debian/gdebi-gtk.install --- gdebi-0.9.5.7+nmu1ubuntu1/debian/gdebi-gtk.install 1970-01-01 00:00:00.000000000 +0000 +++ gdebi-0.9.5.7+nmu1ubuntu2~ppa1/debian/gdebi-gtk.install 2017-08-22 07:03:21.000000000 +0000 @@ -0,0 +1 @@ +/usr/share/polkit-1/actions/com.ubuntu.pkexec.gdebi-gtk.policy diff -Nru gdebi-0.9.5.7+nmu1ubuntu1/GDebi/GDebiGtk.py gdebi-0.9.5.7+nmu1ubuntu2~ppa1/GDebi/GDebiGtk.py --- gdebi-0.9.5.7+nmu1ubuntu1/GDebi/GDebiGtk.py 2015-07-08 13:29:23.000000000 +0000 +++ gdebi-0.9.5.7+nmu1ubuntu2~ppa1/GDebi/GDebiGtk.py 2017-08-22 07:03:21.000000000 +0000 @@ -609,33 +609,14 @@ if res != Gtk.ResponseType.YES: return - if install: - msg_hdr = _("You need to grant administrative rights to install software") - msg_bdy = _(""" -It is a possible security risk to install packages files manually. -Install software from trustworthy software distributors only. -""") - else: - msg_hdr = _("You need to grant administrative rights to remove software") - msg_bdy = _("It is a possible risk to remove packages.") if os.getuid() != 0: - - # build command and argument lists - gksu_cmd = "/usr/bin/gksu" - gksu_args = ["gksu", "--desktop", - "/usr/share/applications/gdebi.desktop", - "--message", - "%s\n\n%s" % (msg_hdr,msg_bdy)] - gdebi_args = ["--", "gdebi-gtk", "--non-interactive", + pkexec_cmd = "/usr/bin/pkexec" + pkexec_args = ["pkexec"] + gdebi_args = ["gdebi-gtk", "--non-interactive", self._deb.filename] if not install: gdebi_args.append("--remove") - # check if we run on ubuntu and always ask for the password - # there - we would like to do that on debian too, but this - # gksu patch is only available on ubuntu currently unfortunately - if UBUNTU: - gksu_args.append("--always-ask-pass") - os.execv(gksu_cmd, gksu_args+gdebi_args) + os.execv(pkexec_cmd, pkexec_args+gdebi_args) if not self.try_acquire_lock(): if install: diff -Nru gdebi-0.9.5.7+nmu1ubuntu1/gdebi-gtk-pkexec gdebi-0.9.5.7+nmu1ubuntu2~ppa1/gdebi-gtk-pkexec --- gdebi-0.9.5.7+nmu1ubuntu1/gdebi-gtk-pkexec 2017-08-18 20:44:05.000000000 +0000 +++ gdebi-0.9.5.7+nmu1ubuntu2~ppa1/gdebi-gtk-pkexec 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -#!/bin/sh -pkexec "/usr/bin/gdebi-gtk" "$@" \ No newline at end of file