[ubuntu-dev] Bug#822596: gdebi: depends on gksu which is deprecated (patch attached)

Julien Lavergne gilir at ubuntu.com
Tue Aug 2 05:51:11 UTC 2016


Hi,

Attached is a patch proposal for moving gdebi from gksu to polycikit.

Let me know if it needs adjustments.

Thanks in advance for considering it.

Regards,
Julien Lavergne
-------------- next part --------------
diff -Nru gdebi-0.9.5.7/data/com.ubuntu.pkexec.gdebi-gtk.policy gdebi-0.9.5.7ubuntu1/data/com.ubuntu.pkexec.gdebi-gtk.policy
--- gdebi-0.9.5.7/data/com.ubuntu.pkexec.gdebi-gtk.policy	1970-01-01 01:00:00.000000000 +0100
+++ gdebi-0.9.5.7ubuntu1/data/com.ubuntu.pkexec.gdebi-gtk.policy	2015-09-18 14:11:37.000000000 +0200
@@ -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="com.ubuntu.pkexec.gdebi.gtk">
+    <message>Authentication is required to run GDebi</message>
+    <message xml:lang="fr">Authentification requise pour lancer GDebi</message>
+    <icon_name>gdebi</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/gdebi-gtk</annotate>
+    <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+  </action>
+
+</policyconfig>
diff -Nru gdebi-0.9.5.7/data/gdebi.desktop.in gdebi-0.9.5.7ubuntu1/data/gdebi.desktop.in
--- gdebi-0.9.5.7/data/gdebi.desktop.in	2015-07-02 09:14:35.000000000 +0200
+++ gdebi-0.9.5.7ubuntu1/data/gdebi.desktop.in	2015-09-18 14:21:15.000000000 +0200
@@ -2,7 +2,7 @@
 _Name=GDebi Package Installer
 _GenericName=Package Installer
 _Comment=Install and view software packages
-Exec=gdebi-gtk %f
+Exec=gdebi-gtk-pkexec %f
 Icon=gnome-mime-application-x-deb
 Terminal=false
 Type=Application
diff -Nru gdebi-0.9.5.7/debian/control gdebi-0.9.5.7ubuntu1/debian/control
--- gdebi-0.9.5.7/debian/control	2015-01-29 15:00:39.000000000 +0100
+++ gdebi-0.9.5.7ubuntu1/debian/control	2016-02-28 11:06:25.000000000 +0100
@@ -46,7 +46,7 @@
          gir1.2-gtk-3.0,
          gir1.2-vte-2.91,
          python3-gi,
-         gksu,
+         policykit-1 | gksu,
          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/gdebi-gtk-pkexec gdebi-0.9.5.7ubuntu1/gdebi-gtk-pkexec
--- gdebi-0.9.5.7/gdebi-gtk-pkexec	1970-01-01 01:00:00.000000000 +0100
+++ gdebi-0.9.5.7ubuntu1/gdebi-gtk-pkexec	2015-09-18 14:18:52.000000000 +0200
@@ -0,0 +1,2 @@
+#!/bin/sh
+pkexec "/usr/bin/gdebi-gtk" "$@"
\ Pas de fin de ligne à la fin du fichier
diff -Nru gdebi-0.9.5.7/setup.py gdebi-0.9.5.7ubuntu1/setup.py
--- gdebi-0.9.5.7/setup.py	2014-04-14 09:16:37.000000000 +0200
+++ gdebi-0.9.5.7ubuntu1/setup.py	2015-09-18 14:17:45.000000000 +0200
@@ -39,7 +39,9 @@
                       ('share/application-registry',
                        ['data/gdebi.applications']),
                       ('share/gdebi/',
-                       ['data/gdebi.png'])] + I18NFILES)
+                       ['data/gdebi.png']),
+                      ('share/polkit-1/actions/',
+                       ['data/com.ubuntu.pkexec.gdebi-gtk.policy'])] + I18NFILES)
 
 # Make sure that the mo files are generated and up-to-date
 if 'build' in s.commands:


More information about the ubuntu-dev-team mailing list