diff -Nru gnome-system-tools-3.0.0/debian/changelog gnome-system-tools-3.0.0/debian/changelog --- gnome-system-tools-3.0.0/debian/changelog 2015-01-09 10:27:55.000000000 +0000 +++ gnome-system-tools-3.0.0/debian/changelog 2015-02-28 02:41:24.000000000 +0000 @@ -1,3 +1,15 @@ +gnome-system-tools (3.0.0-4ubuntu2) vivid; urgency=medium + + * debian/patches/80_gst-packages-common.patch: rework to use PackageKit + to download any required packages; since there is neither gksudo nor + synaptic available anymore on default installs. Thanks to Alistair Buxton + for the patch. (LP: #1270090) + * debian/control: Recommends python3-aptdaemon.pkcompat | packagekit, so that + we make sure some form of packagekit API is available to get the package + installation requests if possible. + + -- Mathieu Trudel-Lapierre Fri, 27 Feb 2015 21:41:22 -0500 + gnome-system-tools (3.0.0-4ubuntu1) vivid; urgency=medium * Merge from Debian, remaining changes: diff -Nru gnome-system-tools-3.0.0/debian/control gnome-system-tools-3.0.0/debian/control --- gnome-system-tools-3.0.0/debian/control 2015-01-09 10:27:55.000000000 +0000 +++ gnome-system-tools-3.0.0/debian/control 2015-02-28 02:41:33.000000000 +0000 @@ -7,7 +7,7 @@ Priority: optional Maintainer: Ubuntu Desktop Team XSBC-Original-Maintainer: Andriy Grytsenko -Uploaders: Andreas Henriksson , Debian GNOME Maintainers , Emilio Pozuelo Monfort , Michael Biebl , Sebastian Dröge , +Uploaders: Andreas Henriksson , Debian GNOME Maintainers , Jose Carlos Garcia Sogo , Niv Sardi Build-Depends: cdbs (>= 0.4.41), @@ -39,6 +39,7 @@ Replaces: ximian-setup-tools, gnome-network-admin (<< 3.0.0-3ubuntu1), gnome-time-admin (<< 3.0.0-3ubuntu1) Breaks: gnome-network-admin (<< 3.0.0-3ubuntu1), gnome-time-admin (<< 3.0.0-3ubuntu1) Provides: gnome-network-admin, gnome-time-admin +Recommends: python3-aptdaemon.pkcompat | packagekit Description: Cross-platform configuration utilities for GNOME The GNOME System Tools are a fully integrated set of tools aimed to make easy the job that means the computer administration on an UNIX or Linux system. @@ -93,4 +94,4 @@ This package provides time-admin, a program to specify the time and date of your system. . - This is a transitional package \ No newline at end of file + This is a transitional package diff -Nru gnome-system-tools-3.0.0/debian/control.in gnome-system-tools-3.0.0/debian/control.in --- gnome-system-tools-3.0.0/debian/control.in 2015-01-09 10:27:55.000000000 +0000 +++ gnome-system-tools-3.0.0/debian/control.in 2015-02-27 05:28:17.000000000 +0000 @@ -35,6 +35,7 @@ Replaces: ximian-setup-tools, gnome-network-admin (<< 3.0.0-3ubuntu1), gnome-time-admin (<< 3.0.0-3ubuntu1) Breaks: gnome-network-admin (<< 3.0.0-3ubuntu1), gnome-time-admin (<< 3.0.0-3ubuntu1) Provides: gnome-network-admin, gnome-time-admin +Recommends: python3-aptdaemon.pkcompat | packagekit Description: Cross-platform configuration utilities for GNOME The GNOME System Tools are a fully integrated set of tools aimed to make easy the job that means the computer administration on an UNIX or Linux system. @@ -89,4 +90,4 @@ This package provides time-admin, a program to specify the time and date of your system. . - This is a transitional package \ No newline at end of file + This is a transitional package diff -Nru gnome-system-tools-3.0.0/debian/patches/80_gst-packages-common.patch gnome-system-tools-3.0.0/debian/patches/80_gst-packages-common.patch --- gnome-system-tools-3.0.0/debian/patches/80_gst-packages-common.patch 2015-01-09 10:27:55.000000000 +0000 +++ gnome-system-tools-3.0.0/debian/patches/80_gst-packages-common.patch 2015-02-27 05:23:49.000000000 +0000 @@ -1,11 +1,19 @@ Description: Add functions for Ubuntu packaging Author: ? +Last-Update: 2015-02-26 -Index: gnome-system-tools-3.0.0/src/common/Makefile.am +--- + src/common/Makefile.am | 1 + src/common/gst-package.c | 122 +++++++++++++++++++++++++++++++++++++++++++++++ + src/common/gst-package.h | 35 +++++++++++++ + src/common/gst.h | 1 + 4 files changed, 159 insertions(+) + +Index: b/src/common/Makefile.am =================================================================== ---- gnome-system-tools-3.0.0.orig/src/common/Makefile.am 2010-12-12 12:39:02.000000000 -0500 -+++ gnome-system-tools-3.0.0/src/common/Makefile.am 2011-12-16 16:35:31.000000000 -0500 -@@ -11,6 +11,7 @@ +--- a/src/common/Makefile.am ++++ b/src/common/Makefile.am +@@ -11,6 +11,7 @@ INCLUDES += \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" libsetuptool_a_SOURCES = \ @@ -13,13 +21,13 @@ gst-dialog.c gst-dialog.h \ gst-tool.c gst-tool.h \ gst-platform-dialog.c gst-platform-dialog.h \ -Index: gnome-system-tools-3.0.0/src/common/gst-package.c +Index: b/src/common/gst-package.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gnome-system-tools-3.0.0/src/common/gst-package.c 2011-12-16 16:41:12.427282686 -0500 -@@ -0,0 +1,201 @@ +--- /dev/null ++++ b/src/common/gst-package.c +@@ -0,0 +1,122 @@ +/* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */ -+/* ++/* + * Copyright (C) 2004 Vincent Untz + * + * This program is free software; you can redistribute it and/or modify @@ -49,6 +57,7 @@ +#include +#include +#include ++#include +#include +#include +#include @@ -74,158 +83,78 @@ +} + +static gboolean -+find_app (GtkWindow *window, -+ const gchar *app) -+{ -+ gchar *path; -+ -+ path = g_find_program_in_path (app); -+ -+ if (!path) -+ { -+ show_error_dialog (window, -+ _("The necessary applications to install" -+ " the package could not be found.")); -+ return FALSE; -+ } -+ -+ g_free (path); -+ -+ return TRUE; -+} -+ -+static gchar * -+create_temp_file (const gchar *packages[]) -+{ -+ int fd; -+ gchar *path, *str; -+ -+ path = g_strdup_printf ("/tmp/packages.XXXXXX"); -+ fd = mkstemp (path); -+ -+ while (*packages) -+ { -+ str = g_strdup_printf ("%s\ti\n", *packages); -+ write (fd, str, strlen (str)); -+ g_free (str); -+ packages++; -+ } -+ -+ close (fd); -+ return path; -+} -+ -+static gchar* -+get_synaptic_command_line (GtkWindow *window, -+ const gchar *path) -+{ -+ gchar *synaptic_path, *command; -+ -+ synaptic_path = g_find_program_in_path ("synaptic"); -+ command = g_strdup_printf ("%s --hide-main-window --non-interactive " -+ "--set-selections-file %s --parent-window-id %ld", -+ synaptic_path, path, -+ (long)gdk_x11_window_get_xid (gtk_widget_get_window (GTK_WIDGET (window)))); -+ g_free (synaptic_path); -+ return command; -+} -+ -+static gboolean -+spawn_synaptic (GtkWindow *window, -+ const gchar *path, -+ GPid *child_pid) ++gst_packages_packagekit(GtkWindow *window, ++ const gchar *packages[]) +{ -+ gchar **argv; ++ GDBusProxy *proxy = NULL; + GError *error = NULL; -+ gboolean retval = TRUE; -+ gint i = 0; -+ -+ argv = g_new0 (gchar*, 6); -+ argv[i++] = g_find_program_in_path ("gksudo"); -+ argv[i++] = g_strdup ("--desktop"); -+ argv[i++] = g_strdup ("/usr/share/applications/synaptic.desktop"); -+ argv[i++] = g_strdup ("--disable-grab"); -+ argv[i++] = g_strdup ("--display"); -+ argv[i++] = gdk_screen_make_display_name (gtk_window_get_screen (window)); -+ argv[i++] = get_synaptic_command_line (window, path); -+ argv[i++] = NULL; -+ -+ if (!g_spawn_async (NULL, argv, NULL, -+ G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, -+ NULL, NULL, child_pid, &error)) -+ { -+ show_error_dialog (window, (error) ? error->message : ""); -+ g_error_free (error); -+ retval = FALSE; -+ } ++ guint32 xid = 0; ++ GVariant *retval = NULL; ++ gboolean success = FALSE; ++ ++ /* get a session bus proxy */ ++ proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, ++ G_DBUS_PROXY_FLAGS_NONE, NULL, ++ "org.freedesktop.PackageKit", ++ "/org/freedesktop/PackageKit", ++ "org.freedesktop.PackageKit.Modify", ++ NULL, &error); ++ if (proxy == NULL) { ++ g_warning ("failed to reach Packagekit proxy: %s", ++ error ? error->message : "(unknown)"); ++ show_error_dialog (window, error ? error->message : _("Unknown error")); ++ g_error_free (error); ++ goto out; ++ } ++ ++ /* get the window ID, or use 0 for non-modal */ ++ xid = GDK_WINDOW_XID ( gtk_widget_get_window ( GTK_WIDGET (window))); ++ ++ /* issue the sync request */ ++ retval = g_dbus_proxy_call_sync (proxy, ++ "InstallPackageNames", ++ g_variant_new ("(u^a&ss)", ++ xid, ++ packages, ++ "hide-finished"), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, /* timeout */ ++ NULL, /* cancellable */ ++ &error); ++ if (retval == NULL) { ++ g_warning ("failed to install package: %s", ++ error ? error->message : "(unknown)"); ++ show_error_dialog (window, error ? error->message : _("Unknown error")); ++ g_error_free (error); ++ goto out; ++ } ++ ++ success = TRUE; ++ ++out: ++ if (proxy != NULL) ++ g_object_unref (proxy); ++ if (retval != NULL) ++ g_variant_unref (retval); + -+ g_strfreev (argv); -+ -+ return retval; -+} -+ -+static void -+on_wait_timeout (GPid pid, gint status, gpointer data) -+{ -+ g_spawn_close_pid (pid); -+ /* FIXME: should show an error dialog if the installation fails, -+ * but funnily I'm getting always an exit status 0 here... maybe gksudo fault? */ -+ gtk_main_quit (); -+} -+ -+static gboolean -+wait_for_synaptic (GtkWindow *window, GPid pid) -+{ -+ GdkCursor *cursor; -+ -+ cursor = gdk_cursor_new (GDK_WATCH); -+ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), cursor); -+ gtk_widget_set_sensitive (GTK_WIDGET (window), FALSE); -+ -+ /* wait here a bit until the process has exited */ -+ g_child_watch_add (pid, on_wait_timeout, NULL); -+ gtk_main (); -+ -+ gtk_widget_set_sensitive (GTK_WIDGET (window), TRUE); -+ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), NULL); -+ -+ g_object_unref (cursor); -+ -+ /* keep this until we can get status -+ * info from the launched process */ -+ return TRUE; ++ return success; +} + +gboolean +gst_packages_install (GtkWindow *window, + const gchar *packages[]) +{ -+ gchar *path; -+ GPid pid; -+ gboolean retval = FALSE; -+ + g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE); + -+ if (!find_app (window, "synaptic") || !find_app (window, "gksudo")) -+ return FALSE; -+ -+ path = create_temp_file (packages); -+ -+ if (spawn_synaptic (window, path, &pid)) -+ retval = wait_for_synaptic (window, pid); -+ -+ unlink (path); -+ g_free (path); -+ -+ return retval; ++ return gst_packages_packagekit(window, packages); +} -Index: gnome-system-tools-3.0.0/src/common/gst-package.h +Index: b/src/common/gst-package.h =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gnome-system-tools-3.0.0/src/common/gst-package.h 2011-12-16 16:35:31.000000000 -0500 +--- /dev/null ++++ b/src/common/gst-package.h @@ -0,0 +1,35 @@ +/* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */ -+/* ++/* + * Copyright (C) 2004 Vincent Untz + * + * This program is free software; you can redistribute it and/or modify @@ -259,10 +188,10 @@ +G_END_DECLS + +#endif /* __GST_PACKAGES_H__ */ -Index: gnome-system-tools-3.0.0/src/common/gst.h +Index: b/src/common/gst.h =================================================================== ---- gnome-system-tools-3.0.0.orig/src/common/gst.h 2010-10-06 05:54:53.000000000 -0400 -+++ gnome-system-tools-3.0.0/src/common/gst.h 2011-12-16 16:35:31.000000000 -0500 +--- a/src/common/gst.h ++++ b/src/common/gst.h @@ -1,5 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ #include