diff -Nru gnome-software-3.20.5/debian/changelog gnome-software-3.20.5/debian/changelog --- gnome-software-3.20.5/debian/changelog 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/changelog 2017-12-14 07:12:42.000000000 +0800 @@ -1,3 +1,13 @@ +gnome-software (3.20.5-0ubuntu0.16.04.8) xenial; urgency=medium + + * debian/patches/0018-Add-a-Snap-plugin.patch: + * debian/patches/0048-Display-a-warning-for-non-sandboxed-snaps.patch: + - Support installing of classic confined snaps (LP: #1690280) + * debian/patches/0001-trivial-Fix-CSS-validation-warning.patch: + - Part of 0011-Fix-a-couple-of-CSS-errors.patch moved upstream + + -- Robert Ancell Thu, 14 Dec 2017 12:12:42 +1300 + gnome-software (3.20.5-0ubuntu0.16.04.7) xenial; urgency=medium * debian/patches/0016-Add-a-dpkg-plugin.patch: diff -Nru gnome-software-3.20.5/debian/patches/0001-Add-gs_app_set_local_file.patch gnome-software-3.20.5/debian/patches/0001-Add-gs_app_set_local_file.patch --- gnome-software-3.20.5/debian/patches/0001-Add-gs_app_set_local_file.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0001-Add-gs_app_set_local_file.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From d3e81d6e52f3231d0f64eb06a4a04f1efc133014 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 25 Apr 2016 11:36:45 +0100 -Subject: [PATCH 01/47] Add gs_app_set_local_file() +Subject: [PATCH 01/49] Add gs_app_set_local_file() --- src/gs-app.c | 27 +++++++++++++++++++++++++++ diff -Nru gnome-software-3.20.5/debian/patches/0001-trivial-Fix-CSS-validation-warning.patch gnome-software-3.20.5/debian/patches/0001-trivial-Fix-CSS-validation-warning.patch --- gnome-software-3.20.5/debian/patches/0001-trivial-Fix-CSS-validation-warning.patch 1970-01-01 08:00:00.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0001-trivial-Fix-CSS-validation-warning.patch 2017-12-14 07:12:42.000000000 +0800 @@ -0,0 +1,39 @@ +From d01a6ee89e9d60fae52068842b677f47aab784c3 Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Thu, 6 Oct 2016 12:09:17 +0100 +Subject: [PATCH] trivial: Fix CSS validation warning + +--- + src/gtk-style-hc.css | 2 +- + src/gtk-style.css | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/gtk-style-hc.css b/src/gtk-style-hc.css +index a5fe5f2b..db0a98d5 100644 +--- a/src/gtk-style-hc.css ++++ b/src/gtk-style-hc.css +@@ -219,7 +219,7 @@ button.star, .button.star { + } + + .update-failed-details { +- font: Monospace; ++ font-family: Monospace; + font-size: 90%; + padding: 16px + } +diff --git a/src/gtk-style.css b/src/gtk-style.css +index f7b1d5ac..f2005e2e 100644 +--- a/src/gtk-style.css ++++ b/src/gtk-style.css +@@ -281,7 +281,7 @@ button.star, .button.star { + } + + .update-failed-details { +- font: Monospace; ++ font-family: Monospace; + font-size: 90%; + padding: 16px + } +-- +2.14.1 + diff -Nru gnome-software-3.20.5/debian/patches/0002-service-Set-NoDisplay-true.patch gnome-software-3.20.5/debian/patches/0002-service-Set-NoDisplay-true.patch --- gnome-software-3.20.5/debian/patches/0002-service-Set-NoDisplay-true.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0002-service-Set-NoDisplay-true.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From 1ce229ea70387e91d90900f94577f13778e72ad6 Mon Sep 17 00:00:00 2001 From: Jeremy Bicha Date: Thu, 27 Oct 2016 22:44:25 -0400 -Subject: [PATCH 02/47] service: Set NoDisplay=true +Subject: [PATCH 02/49] service: Set NoDisplay=true https://bugzilla.gnome.org/show_bug.cgi?id=773615 --- diff -Nru gnome-software-3.20.5/debian/patches/0003-Limit-search-entry-to-100-characters.patch gnome-software-3.20.5/debian/patches/0003-Limit-search-entry-to-100-characters.patch --- gnome-software-3.20.5/debian/patches/0003-Limit-search-entry-to-100-characters.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0003-Limit-search-entry-to-100-characters.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From 8a77c7ad8c36adcc478cea6811f555077ea9cace Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 12 May 2017 11:39:26 +1200 -Subject: [PATCH 03/47] Limit search entry to 100 characters. +Subject: [PATCH 03/49] Limit search entry to 100 characters. The search entry can be linked to a remote server - by limiting the number of characters this stops accidental input (e.g. cat sitting on keyboard) from diff -Nru gnome-software-3.20.5/debian/patches/0004-Guard-against-self-setting-origin.patch gnome-software-3.20.5/debian/patches/0004-Guard-against-self-setting-origin.patch --- gnome-software-3.20.5/debian/patches/0004-Guard-against-self-setting-origin.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0004-Guard-against-self-setting-origin.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From 6bdde60242c443b4fffb9a7ef19e9e98e33955fc Mon Sep 17 00:00:00 2001 From: William Hua Date: Thu, 14 Apr 2016 01:17:04 -0400 -Subject: [PATCH 04/47] Guard against self-setting origin +Subject: [PATCH 04/49] Guard against self-setting origin --- src/gs-app.c | 7 +++++-- diff -Nru gnome-software-3.20.5/debian/patches/0005-trivial-Add-provenance-and-is_free-in-gs_app_to_stri.patch gnome-software-3.20.5/debian/patches/0005-trivial-Add-provenance-and-is_free-in-gs_app_to_stri.patch --- gnome-software-3.20.5/debian/patches/0005-trivial-Add-provenance-and-is_free-in-gs_app_to_stri.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0005-trivial-Add-provenance-and-is_free-in-gs_app_to_stri.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From c198e91f7343467706db0e0afa960d98f01c5782 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Wed, 13 Apr 2016 14:44:15 +0100 -Subject: [PATCH 05/47] trivial: Add provenance and is_free in gs_app_to_string +Subject: [PATCH 05/49] trivial: Add provenance and is_free in gs_app_to_string --- src/gs-app.c | 4 ++++ diff -Nru gnome-software-3.20.5/debian/patches/0006-Allow-free-but-unspecified-SPDX-tokens.patch gnome-software-3.20.5/debian/patches/0006-Allow-free-but-unspecified-SPDX-tokens.patch --- gnome-software-3.20.5/debian/patches/0006-Allow-free-but-unspecified-SPDX-tokens.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0006-Allow-free-but-unspecified-SPDX-tokens.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From 947c53e07de408c5866f0af3d06e54578cb3591d Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Thu, 7 Apr 2016 14:23:48 +0100 -Subject: [PATCH 06/47] Allow free-but-unspecified SPDX tokens +Subject: [PATCH 06/49] Allow free-but-unspecified SPDX tokens We also allow custom URLs for tags, for example: @LicenseRef-free=http://www.ubuntu.com/about/about-ubuntu/licensing diff -Nru gnome-software-3.20.5/debian/patches/0007-Put-the-string-back-as-it-was-to-not-change-it-befor.patch gnome-software-3.20.5/debian/patches/0007-Put-the-string-back-as-it-was-to-not-change-it-befor.patch --- gnome-software-3.20.5/debian/patches/0007-Put-the-string-back-as-it-was-to-not-change-it-befor.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0007-Put-the-string-back-as-it-was-to-not-change-it-befor.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From 1bef55e516b1fb02012beba1998dd6acb6eb017c Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Tue, 12 Apr 2016 10:55:07 +0100 -Subject: [PATCH 07/47] Put the string back as it was, to not change it before +Subject: [PATCH 07/49] Put the string back as it was, to not change it before release --- diff -Nru gnome-software-3.20.5/debian/patches/0008-Show-a-notification-if-any-live-updatable-apps-needs.patch gnome-software-3.20.5/debian/patches/0008-Show-a-notification-if-any-live-updatable-apps-needs.patch --- gnome-software-3.20.5/debian/patches/0008-Show-a-notification-if-any-live-updatable-apps-needs.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0008-Show-a-notification-if-any-live-updatable-apps-needs.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From 5c24f6a63499f8544bd37c4c7e0cdf25ce5dbc8f Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 8 Apr 2016 12:35:57 +0100 -Subject: [PATCH 08/47] Show a notification if any live-updatable apps needs +Subject: [PATCH 08/49] Show a notification if any live-updatable apps needs restarting This covers the case where an xdg-app might need restarting because of the diff -Nru gnome-software-3.20.5/debian/patches/0009-Remove-nonfree-tag-on-search-results.patch gnome-software-3.20.5/debian/patches/0009-Remove-nonfree-tag-on-search-results.patch --- gnome-software-3.20.5/debian/patches/0009-Remove-nonfree-tag-on-search-results.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0009-Remove-nonfree-tag-on-search-results.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From 8098f601053851d12daf77b30c2fbfd551b6a13f Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 8 Feb 2017 16:22:37 +1300 -Subject: [PATCH 09/47] Remove nonfree tag on search results +Subject: [PATCH 09/49] Remove nonfree tag on search results --- src/gs-app-row.c | 2 +- diff -Nru gnome-software-3.20.5/debian/patches/0010-Override-button-theming-to-show-progress-meter.patch gnome-software-3.20.5/debian/patches/0010-Override-button-theming-to-show-progress-meter.patch --- gnome-software-3.20.5/debian/patches/0010-Override-button-theming-to-show-progress-meter.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0010-Override-button-theming-to-show-progress-meter.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From c988aa38e1d0f20eccc9ee6325ccf1b350f5544a Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 18 Apr 2016 19:06:48 -0400 -Subject: [PATCH 10/47] Override button theming to show progress meter +Subject: [PATCH 10/49] Override button theming to show progress meter --- src/gtk-style-hc.css | 6 ++++++ diff -Nru gnome-software-3.20.5/debian/patches/0011-Fix-a-couple-of-CSS-errors.patch gnome-software-3.20.5/debian/patches/0011-Fix-a-couple-of-CSS-errors.patch --- gnome-software-3.20.5/debian/patches/0011-Fix-a-couple-of-CSS-errors.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0011-Fix-a-couple-of-CSS-errors.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,41 +1,35 @@ -From 9e1e5244903363661ed5930c9b2f30e5122e0ef7 Mon Sep 17 00:00:00 2001 +From 60a33e173047442e3d321d057a43fa9af7fbe118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 27 Apr 2016 19:03:02 +0200 -Subject: [PATCH 11/47] Fix a couple of CSS errors +Subject: [PATCH 11/49] Fix a couple of CSS errors The 'font' shorthand requires at least 'font-family' and 'font-size' according to the spec, and recent GTK+ versions no longer accept it without a family/size. While at it, also add some missing semicolons and units. --- - src/gtk-style-hc.css | 4 ++-- - src/gtk-style.css | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) + src/gtk-style-hc.css | 2 +- + src/gtk-style.css | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtk-style-hc.css b/src/gtk-style-hc.css -index 3f0400e1..9bd7e960 100644 +index 1e0373b5..9bd7e960 100644 --- a/src/gtk-style-hc.css +++ b/src/gtk-style-hc.css -@@ -225,7 +225,7 @@ button.star, .button.star { - } - +@@ -227,5 +227,5 @@ button.star, .button.star { .update-failed-details { -- font: Monospace; -+ font-family: Monospace; + font-family: Monospace; font-size: 90%; - padding: 16px + padding: 16px; } diff --git a/src/gtk-style.css b/src/gtk-style.css -index 322a21ed..41668d7f 100644 +index 1b8c56a4..41668d7f 100644 --- a/src/gtk-style.css +++ b/src/gtk-style.css -@@ -287,9 +287,9 @@ button.star, .button.star { - } - +@@ -289,7 +289,7 @@ button.star, .button.star { .update-failed-details { -- font: Monospace; -+ font-family: Monospace; + font-family: Monospace; font-size: 90%; - padding: 16px + padding: 16px; diff -Nru gnome-software-3.20.5/debian/patches/0012-trivial-Allow-arbitrary-variables-to-be-read-from-et.patch gnome-software-3.20.5/debian/patches/0012-trivial-Allow-arbitrary-variables-to-be-read-from-et.patch --- gnome-software-3.20.5/debian/patches/0012-trivial-Allow-arbitrary-variables-to-be-read-from-et.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0012-trivial-Allow-arbitrary-variables-to-be-read-from-et.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From 56fc49430e372eeca8b08887a33258dba4513667 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 11 Feb 2016 15:31:30 +1300 -Subject: [PATCH 12/47] trivial: Allow arbitrary variables to be read from +Subject: [PATCH 12/49] trivial: Allow arbitrary variables to be read from /etc/os-release --- diff -Nru gnome-software-3.20.5/debian/patches/0013-Backport-URL-handling-improvements-from-master.patch gnome-software-3.20.5/debian/patches/0013-Backport-URL-handling-improvements-from-master.patch --- gnome-software-3.20.5/debian/patches/0013-Backport-URL-handling-improvements-from-master.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0013-Backport-URL-handling-improvements-from-master.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From ba763d9cb6736ab1c327b23c7b1725f320f6f113 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 2 Feb 2017 10:11:54 +0000 -Subject: [PATCH 13/47] Backport URL handling improvements from master +Subject: [PATCH 13/49] Backport URL handling improvements from master --- src/gs-application.c | 48 ++++++------ diff -Nru gnome-software-3.20.5/debian/patches/0014-Use-GFile-instead-of-a-filename-when-converting-apps.patch gnome-software-3.20.5/debian/patches/0014-Use-GFile-instead-of-a-filename-when-converting-apps.patch --- gnome-software-3.20.5/debian/patches/0014-Use-GFile-instead-of-a-filename-when-converting-apps.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0014-Use-GFile-instead-of-a-filename-when-converting-apps.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From f3b67be6acd0cced3cd846ec80346776fda164ce Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Mon, 25 Apr 2016 11:20:51 +0200 -Subject: [PATCH 14/47] Use GFile instead of a filename when converting apps. +Subject: [PATCH 14/49] Use GFile instead of a filename when converting apps. --- src/gs-cmd.c | 12 ++++--- diff -Nru gnome-software-3.20.5/debian/patches/0015-Allow-logging-into-Ubuntu-One-for-reviews.patch gnome-software-3.20.5/debian/patches/0015-Allow-logging-into-Ubuntu-One-for-reviews.patch --- gnome-software-3.20.5/debian/patches/0015-Allow-logging-into-Ubuntu-One-for-reviews.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0015-Allow-logging-into-Ubuntu-One-for-reviews.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From 6a42a13d21f39876ceb097b419247ebc17f455ff Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Sat, 17 Jun 2017 12:50:45 +1200 -Subject: [PATCH 15/47] Allow logging into Ubuntu One for reviews +Subject: [PATCH 15/49] Allow logging into Ubuntu One for reviews --- po/POTFILES.in | 2 + diff -Nru gnome-software-3.20.5/debian/patches/0016-Add-a-dpkg-plugin.patch gnome-software-3.20.5/debian/patches/0016-Add-a-dpkg-plugin.patch --- gnome-software-3.20.5/debian/patches/0016-Add-a-dpkg-plugin.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0016-Add-a-dpkg-plugin.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From 2621edc24c38da0befb35434ea8dd6fc9863dffa Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 7 Apr 2016 09:19:27 +0100 -Subject: [PATCH 16/47] Add a dpkg plugin +Subject: [PATCH 16/49] Add a dpkg plugin This commit is a combination of many changes by many people. --- diff -Nru gnome-software-3.20.5/debian/patches/0017-Add-an-APT-plugin.patch gnome-software-3.20.5/debian/patches/0017-Add-an-APT-plugin.patch --- gnome-software-3.20.5/debian/patches/0017-Add-an-APT-plugin.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0017-Add-an-APT-plugin.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ From dc39534084871db8fa8d965f4285a7ec18873b6d Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 16 Jun 2017 16:44:15 +1200 -Subject: [PATCH 17/47] Add an APT plugin +Subject: [PATCH 17/49] Add an APT plugin This commit is a combination of many changes by many people. --- diff -Nru gnome-software-3.20.5/debian/patches/0018-Add-a-Snap-plugin.patch gnome-software-3.20.5/debian/patches/0018-Add-a-Snap-plugin.patch --- gnome-software-3.20.5/debian/patches/0018-Add-a-Snap-plugin.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0018-Add-a-Snap-plugin.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 86f9dcf6da3494de41a9b9a3ee31f0497e0ba590 Mon Sep 17 00:00:00 2001 +From 0d520f02d07643561b543a28e5e7214d4c9c5f0e Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 16 Jun 2017 16:54:22 +1200 -Subject: [PATCH 18/47] Add a Snap plugin +Subject: [PATCH 18/48] Add a Snap plugin This commit is a combination of many changes by many people. --- @@ -12,10 +12,10 @@ src/org.gnome.Software.desktop.in | 2 +- src/plugins/Makefile.am | 26 + src/plugins/gs-plugin-icons.c | 1 + - src/plugins/gs-plugin-snap.c | 748 ++++++++++++++++++++++++++ - src/plugins/gs-snapd.c | 890 +++++++++++++++++++++++++++++++ - src/plugins/gs-snapd.h | 68 +++ - 10 files changed, 1763 insertions(+), 2 deletions(-) + src/plugins/gs-plugin-snap.c | 757 ++++++++++++++++++++++++++ + src/plugins/gs-snapd.c | 896 +++++++++++++++++++++++++++++++ + src/plugins/gs-snapd.h | 69 +++ + 10 files changed, 1779 insertions(+), 2 deletions(-) create mode 100644 src/plugins/gs-plugin-snap.c create mode 100644 src/plugins/gs-snapd.c create mode 100644 src/plugins/gs-snapd.h @@ -194,10 +194,10 @@ } diff --git a/src/plugins/gs-plugin-snap.c b/src/plugins/gs-plugin-snap.c new file mode 100644 -index 00000000..51abc81e +index 00000000..ff62e300 --- /dev/null +++ b/src/plugins/gs-plugin-snap.c -@@ -0,0 +1,748 @@ +@@ -0,0 +1,757 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2015 Canonical Ltd @@ -228,6 +228,7 @@ +#include "gs-ubuntuone.h" + +struct GsPluginPrivate { ++ gboolean system_is_confined; + gchar *store_name; + GMutex store_snaps_lock; + GHashTable *store_snaps; @@ -265,6 +266,7 @@ + gs_plugin_get_name ()); + gs_plugin_set_enabled (plugin, FALSE); + } ++ plugin->priv->system_is_confined = g_strcmp0 (json_object_get_string_member (system_information, "confinement"), "strict") == 0; + if (json_object_has_member (system_information, "store")) + plugin->priv->store_name = g_strdup (json_object_get_string_member (system_information, "store")); + else @@ -354,7 +356,7 @@ +snap_to_app (GsPlugin *plugin, JsonObject *snap) +{ + GsApp *app; -+ const gchar *type; ++ const gchar *type, *confinement; + + /* create a unique ID for deduplication, TODO: branch? */ + app = gs_app_new (json_object_get_string_member (snap, "name")); @@ -370,6 +372,10 @@ + gs_app_set_name (app, GS_APP_QUALITY_HIGHEST, get_snap_title (snap)); + if (gs_plugin_check_distro_id (plugin, "ubuntu")) + gs_app_add_quirk (app, AS_APP_QUIRK_PROVENANCE); ++ confinement = json_object_get_string_member (snap, "confinement"); ++ gs_app_set_metadata (app, "snap::confinement", confinement); ++ if (plugin->priv->system_is_confined && g_strcmp0 (confinement, "strict") == 0) ++ gs_app_add_kudo (app, GS_APP_KUDO_SANDBOXED); + + return app; +} @@ -838,15 +844,18 @@ + GError **error) +{ + ProgressData data; ++ gboolean classic = FALSE; + + /* We can only install apps we know of */ + if (g_strcmp0 (gs_app_get_management_plugin (app), "snap") != 0) + return TRUE; + + gs_app_set_state (app, AS_APP_STATE_INSTALLING); ++ if (g_strcmp0 (gs_app_get_metadata_item (app, "snap::confinement"), "classic") == 0) ++ classic = TRUE; + data.plugin = plugin; + data.app = app; -+ if (!gs_snapd_install (gs_app_get_id (app), progress_cb, &data, cancellable, error)) { ++ if (!gs_snapd_install (gs_app_get_id (app), classic, progress_cb, &data, cancellable, error)) { + gs_app_set_state (app, AS_APP_STATE_AVAILABLE); + return FALSE; + } @@ -948,10 +957,10 @@ +} diff --git a/src/plugins/gs-snapd.c b/src/plugins/gs-snapd.c new file mode 100644 -index 00000000..261af42d +index 00000000..eff7f12a --- /dev/null +++ b/src/plugins/gs-snapd.c -@@ -0,0 +1,890 @@ +@@ -0,0 +1,896 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016 Canonical Ltd @@ -1624,12 +1633,14 @@ +static gboolean +send_package_action (const gchar *name, + const gchar *action, ++ gboolean classic, + GsSnapdProgressCallback callback, + gpointer user_data, + GCancellable *cancellable, + GError **error) +{ -+ g_autofree gchar *content = NULL, *path = NULL; ++ g_autoptr(GString) content = NULL; ++ g_autofree gchar *path = NULL; + guint status_code; + g_autofree gchar *macaroon = NULL; + g_auto(GStrv) discharges = NULL; @@ -1641,9 +1652,13 @@ + JsonObject *root, *result; + const gchar *type; + -+ content = g_strdup_printf ("{\"action\": \"%s\"}", action); ++ content = g_string_new ("{"); ++ g_string_append_printf (content, "\"action\": \"%s\"", action); ++ if (classic) ++ g_string_append (content, ", \"classic\": true"); ++ g_string_append (content, "}"); + path = g_strdup_printf ("/v2/snaps/%s", name); -+ if (!send_request ("POST", path, content, ++ if (!send_request ("POST", path, content->str, + TRUE, NULL, NULL, + TRUE, &macaroon, &discharges, + &status_code, &reason_phrase, @@ -1701,12 +1716,12 @@ +} + +gboolean -+gs_snapd_install (const gchar *name, ++gs_snapd_install (const gchar *name, gboolean classic, + GsSnapdProgressCallback callback, gpointer user_data, + GCancellable *cancellable, + GError **error) +{ -+ return send_package_action (name, "install", callback, user_data, cancellable, error); ++ return send_package_action (name, "install", classic, callback, user_data, cancellable, error); +} + +gboolean @@ -1714,7 +1729,7 @@ + GsSnapdProgressCallback callback, gpointer user_data, + GCancellable *cancellable, GError **error) +{ -+ return send_package_action (name, "remove", callback, user_data, cancellable, error); ++ return send_package_action (name, "remove", FALSE, callback, user_data, cancellable, error); +} + +gchar * @@ -1844,10 +1859,10 @@ +} diff --git a/src/plugins/gs-snapd.h b/src/plugins/gs-snapd.h new file mode 100644 -index 00000000..c75cdf2a +index 00000000..5941ebdf --- /dev/null +++ b/src/plugins/gs-snapd.h -@@ -0,0 +1,68 @@ +@@ -0,0 +1,69 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016 Canonical Ltd @@ -1877,8 +1892,8 @@ + +typedef void (*GsSnapdProgressCallback) (JsonObject *object, gpointer user_data); + -+JsonObject *gs_snapd_get_system_info (GCancellable *cancellable, -+ GError **error); ++JsonObject *gs_snapd_get_system_info (GCancellable *cancellable, ++ GError **error); + +JsonObject *gs_snapd_list_one (const gchar *name, + GCancellable *cancellable, @@ -1897,6 +1912,7 @@ + GError **error); + +gboolean gs_snapd_install (const gchar *name, ++ gboolean classic, + GsSnapdProgressCallback callback, + gpointer user_data, + GCancellable *cancellable, diff -Nru gnome-software-3.20.5/debian/patches/0018-Backport-GS_APP_KUDO_SANDBOXED.patch gnome-software-3.20.5/debian/patches/0018-Backport-GS_APP_KUDO_SANDBOXED.patch --- gnome-software-3.20.5/debian/patches/0018-Backport-GS_APP_KUDO_SANDBOXED.patch 1970-01-01 08:00:00.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0018-Backport-GS_APP_KUDO_SANDBOXED.patch 2017-12-14 07:12:42.000000000 +0800 @@ -0,0 +1,24 @@ +From 145b62461cba477da5558e3b4200c8aa5fcba5d9 Mon Sep 17 00:00:00 2001 +From: Robert Ancell +Date: Thu, 14 Dec 2017 10:58:54 +1300 +Subject: [PATCH 18/49] Backport GS_APP_KUDO_SANDBOXED + +--- + src/gs-app.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/gs-app.h b/src/gs-app.h +index 2290b30a..7e5f2138 100644 +--- a/src/gs-app.h ++++ b/src/gs-app.h +@@ -55,6 +55,7 @@ typedef enum { + GS_APP_KUDO_PERFECT_SCREENSHOTS = 1 << 12, + GS_APP_KUDO_HIGH_CONTRAST = 1 << 13, + GS_APP_KUDO_HI_DPI_ICON = 1 << 14, ++ GS_APP_KUDO_SANDBOXED = 1 << 15, + GS_APP_KUDO_LAST + } GsAppKudo; + +-- +2.14.1 + diff -Nru gnome-software-3.20.5/debian/patches/0019-Use-minimal-limits-for-review-content.patch gnome-software-3.20.5/debian/patches/0019-Use-minimal-limits-for-review-content.patch --- gnome-software-3.20.5/debian/patches/0019-Use-minimal-limits-for-review-content.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0019-Use-minimal-limits-for-review-content.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From f63140ee24666037aa97b1c53c89723f8b01b851 Mon Sep 17 00:00:00 2001 +From f5e2fe3c788f15c85a72efed617d06ec3a0cb62b Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 11 Feb 2016 15:00:22 +1300 -Subject: [PATCH 19/47] Use minimal limits for review content +Subject: [PATCH 19/48] Use minimal limits for review content --- src/gs-review-dialog.c | 10 +++++----- diff -Nru gnome-software-3.20.5/debian/patches/0020-Format-update-descriptions-to-be-suitable-for-Ubuntu.patch gnome-software-3.20.5/debian/patches/0020-Format-update-descriptions-to-be-suitable-for-Ubuntu.patch --- gnome-software-3.20.5/debian/patches/0020-Format-update-descriptions-to-be-suitable-for-Ubuntu.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0020-Format-update-descriptions-to-be-suitable-for-Ubuntu.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 1e9e628ceec6f62c4b6b667307420a3c257989b7 Mon Sep 17 00:00:00 2001 +From 7176e482c02abb097064b6ccb1d2962b139a7742 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 15 Mar 2016 14:12:13 +1300 -Subject: [PATCH 20/47] Format update descriptions to be suitable for Ubuntu. +Subject: [PATCH 20/48] Format update descriptions to be suitable for Ubuntu. Don't show the update descriptions on the updates page - it's too complex to fit. Don't try and use markup - it doesn't work well with the information sourced from debian/changelog. diff -Nru gnome-software-3.20.5/debian/patches/0021-Don-t-use-notification-actions-under-Unity.patch gnome-software-3.20.5/debian/patches/0021-Don-t-use-notification-actions-under-Unity.patch --- gnome-software-3.20.5/debian/patches/0021-Don-t-use-notification-actions-under-Unity.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0021-Don-t-use-notification-actions-under-Unity.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 4ace6346bcb0e5339f8029e9ab49b9b5c7df85c4 Mon Sep 17 00:00:00 2001 +From 62541738748a4f0e33a4c0b9254cfce7df48f06a Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 23 Mar 2016 10:27:19 -0400 -Subject: [PATCH 21/47] Don't use notification actions under Unity +Subject: [PATCH 21/48] Don't use notification actions under Unity --- src/gs-dbus-helper.c | 8 +++++--- diff -Nru gnome-software-3.20.5/debian/patches/0022-Add-a-details-pkg-option-that-allows-showing-app-det.patch gnome-software-3.20.5/debian/patches/0022-Add-a-details-pkg-option-that-allows-showing-app-det.patch --- gnome-software-3.20.5/debian/patches/0022-Add-a-details-pkg-option-that-allows-showing-app-det.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0022-Add-a-details-pkg-option-that-allows-showing-app-det.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From e906986b9b9073f4c3cf801208535e0c4cd8769b Mon Sep 17 00:00:00 2001 +From eb1582a829220ff28d5d58fc786fb4b2584f54bf Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 26 Apr 2016 11:12:37 +0200 -Subject: [PATCH 22/47] Add a --details-pkg option that allows showing app +Subject: [PATCH 22/48] Add a --details-pkg option that allows showing app details keyed by package name --- diff -Nru gnome-software-3.20.5/debian/patches/0023-Add-the-concept-of-UpdateAll-into-the-plugin-loader.patch gnome-software-3.20.5/debian/patches/0023-Add-the-concept-of-UpdateAll-into-the-plugin-loader.patch --- gnome-software-3.20.5/debian/patches/0023-Add-the-concept-of-UpdateAll-into-the-plugin-loader.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0023-Add-the-concept-of-UpdateAll-into-the-plugin-loader.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 4bd2cb02df4d5c4f7fc86bc76e06cbab554a4ed4 Mon Sep 17 00:00:00 2001 +From d309059a955ca60771713336ba7b730ee044d9ae Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 8 Apr 2016 09:02:34 +0100 -Subject: [PATCH 23/47] Add the concept of UpdateAll into the plugin loader +Subject: [PATCH 23/48] Add the concept of UpdateAll into the plugin loader We had the gs_plugin_app_update() plugin vfunc to update a specific application, and a gs_plugin_offline_update() vfunc to schedule a list of updates to be diff -Nru gnome-software-3.20.5/debian/patches/0024-Hide-licence-updated-and-category-fields-if-they-are.patch gnome-software-3.20.5/debian/patches/0024-Hide-licence-updated-and-category-fields-if-they-are.patch --- gnome-software-3.20.5/debian/patches/0024-Hide-licence-updated-and-category-fields-if-they-are.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0024-Hide-licence-updated-and-category-fields-if-they-are.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From a1bad5cf2a6c901e13b3df94e09c4ac68b8f6b34 Mon Sep 17 00:00:00 2001 +From 114c0cf48666b371f5587c76b35228b673925158 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 29 Mar 2016 11:30:08 +1300 -Subject: [PATCH 24/47] Hide licence, updated and category fields if they +Subject: [PATCH 24/48] Hide licence, updated and category fields if they aren't set --- diff -Nru gnome-software-3.20.5/debian/patches/0025-provenance-Order-after-apt-so-we-have-the-origin-set.patch gnome-software-3.20.5/debian/patches/0025-provenance-Order-after-apt-so-we-have-the-origin-set.patch --- gnome-software-3.20.5/debian/patches/0025-provenance-Order-after-apt-so-we-have-the-origin-set.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0025-provenance-Order-after-apt-so-we-have-the-origin-set.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 150a4a91d0f2437ed15fe69a18034a0f53f297cc Mon Sep 17 00:00:00 2001 +From 50962ecccb2ed3c9763c58b55efc3bfc8c3ba953 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Wed, 13 Apr 2016 18:43:08 +0100 -Subject: [PATCH 25/47] provenance: Order after apt so we have the origin set +Subject: [PATCH 25/48] provenance: Order after apt so we have the origin set ubuntu-specific: apt should use order_before, but this seems buggy and creates a loop currently. diff -Nru gnome-software-3.20.5/debian/patches/0026-Build-xdg-app-reviews-only-if-ODRS-is-enabled.patch gnome-software-3.20.5/debian/patches/0026-Build-xdg-app-reviews-only-if-ODRS-is-enabled.patch --- gnome-software-3.20.5/debian/patches/0026-Build-xdg-app-reviews-only-if-ODRS-is-enabled.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0026-Build-xdg-app-reviews-only-if-ODRS-is-enabled.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 97a45f65ecb58ee3841e08a6eff2512f0fbb97b4 Mon Sep 17 00:00:00 2001 +From f728313e8aa334ba73f796cc415ec0fc88e914dd Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 14 Jun 2016 01:41:54 -0400 -Subject: [PATCH 26/47] Build xdg-app-reviews only if ODRS is enabled +Subject: [PATCH 26/48] Build xdg-app-reviews only if ODRS is enabled --- src/plugins/Makefile.am | 2 ++ diff -Nru gnome-software-3.20.5/debian/patches/0027-trivial-Run-the-generated-libtool-wrapper-instead-of.patch gnome-software-3.20.5/debian/patches/0027-trivial-Run-the-generated-libtool-wrapper-instead-of.patch --- gnome-software-3.20.5/debian/patches/0027-trivial-Run-the-generated-libtool-wrapper-instead-of.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0027-trivial-Run-the-generated-libtool-wrapper-instead-of.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 746df0c2953b3724ff179285c1fbba9ad899e586 Mon Sep 17 00:00:00 2001 +From 32cb81670bde9857d7f81fbda7b95e686c9bf55c Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Thu, 14 Apr 2016 12:35:47 +0100 -Subject: [PATCH 27/47] trivial: Run the generated libtool wrapper instead of +Subject: [PATCH 27/48] trivial: Run the generated libtool wrapper instead of /usr/bin/libtool There might not be a system-wide one - for example Debian-based systems diff -Nru gnome-software-3.20.5/debian/patches/0028-Allow-transition-from-AS_APP_STATE_INSTALLED-to-AS_A.patch gnome-software-3.20.5/debian/patches/0028-Allow-transition-from-AS_APP_STATE_INSTALLED-to-AS_A.patch --- gnome-software-3.20.5/debian/patches/0028-Allow-transition-from-AS_APP_STATE_INSTALLED-to-AS_A.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0028-Allow-transition-from-AS_APP_STATE_INSTALLED-to-AS_A.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From aed93f4de6664e6703ac0972a25b7138bb280dfe Mon Sep 17 00:00:00 2001 +From 870f9aecb7f036b7f3836bf4ba87861925b8e704 Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 13 Apr 2016 10:23:32 -0400 -Subject: [PATCH 28/47] Allow transition from AS_APP_STATE_INSTALLED to +Subject: [PATCH 28/48] Allow transition from AS_APP_STATE_INSTALLED to AS_APP_STATE_UPDATABLE --- diff -Nru gnome-software-3.20.5/debian/patches/0029-Allow-AS_APP_STATE_INSTALLED-to-AS_APP_STATE_INSTALL.patch gnome-software-3.20.5/debian/patches/0029-Allow-AS_APP_STATE_INSTALLED-to-AS_APP_STATE_INSTALL.patch --- gnome-software-3.20.5/debian/patches/0029-Allow-AS_APP_STATE_INSTALLED-to-AS_APP_STATE_INSTALL.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0029-Allow-AS_APP_STATE_INSTALLED-to-AS_APP_STATE_INSTALL.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 60d69c4d47533301518236e0428b104568747973 Mon Sep 17 00:00:00 2001 +From b594f5d8d0312b770d9927b74a9b0272cdc7bb46 Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 13 Apr 2016 18:24:34 -0400 -Subject: [PATCH 29/47] Allow AS_APP_STATE_INSTALLED to AS_APP_STATE_INSTALLING +Subject: [PATCH 29/48] Allow AS_APP_STATE_INSTALLED to AS_APP_STATE_INSTALLING --- src/gs-app.c | 1 + diff -Nru gnome-software-3.20.5/debian/patches/0030-Download-changelog-information-on-demand-this-stops-.patch gnome-software-3.20.5/debian/patches/0030-Download-changelog-information-on-demand-this-stops-.patch --- gnome-software-3.20.5/debian/patches/0030-Download-changelog-information-on-demand-this-stops-.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0030-Download-changelog-information-on-demand-this-stops-.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 1f6be06aac4ee33fdb75f46594788f7993d6b64b Mon Sep 17 00:00:00 2001 +From 1872a1b8ca9ed2316dd32e4c0703dac4290a1d1d Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 15 Sep 2016 21:19:50 +1200 -Subject: [PATCH 30/47] Download changelog information on demand - this stops +Subject: [PATCH 30/48] Download changelog information on demand - this stops the UI blocking on startup --- diff -Nru gnome-software-3.20.5/debian/patches/0031-De-dup-based-on-source.patch gnome-software-3.20.5/debian/patches/0031-De-dup-based-on-source.patch --- gnome-software-3.20.5/debian/patches/0031-De-dup-based-on-source.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0031-De-dup-based-on-source.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 75224d5d417016c229bb0f2abf1f8c019eaf3060 Mon Sep 17 00:00:00 2001 +From e50ec4ceff61ee9b59f35f8f4cb2de0fe2683de4 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 17 Feb 2016 11:31:07 -0800 -Subject: [PATCH 31/47] De-dup based on source +Subject: [PATCH 31/48] De-dup based on source --- src/gs-plugin.c | 13 ++++++++++--- diff -Nru gnome-software-3.20.5/debian/patches/0032-Set-error-when-org.freedesktop.fwupd-has-no-service.patch gnome-software-3.20.5/debian/patches/0032-Set-error-when-org.freedesktop.fwupd-has-no-service.patch --- gnome-software-3.20.5/debian/patches/0032-Set-error-when-org.freedesktop.fwupd-has-no-service.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0032-Set-error-when-org.freedesktop.fwupd-has-no-service.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 484b45acb03e510e248ef307e1a646654d907132 Mon Sep 17 00:00:00 2001 +From f92de135a18e15a12e185b44d991ee681c5332f8 Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 16 Mar 2016 15:03:42 -0400 -Subject: [PATCH 32/47] Set error when org.freedesktop.fwupd has no service +Subject: [PATCH 32/48] Set error when org.freedesktop.fwupd has no service --- src/plugins/gs-plugin-fwupd.c | 5 ++++- diff -Nru gnome-software-3.20.5/debian/patches/0033-Software-Sources-Software-Updates-in-menu.patch gnome-software-3.20.5/debian/patches/0033-Software-Sources-Software-Updates-in-menu.patch --- gnome-software-3.20.5/debian/patches/0033-Software-Sources-Software-Updates-in-menu.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0033-Software-Sources-Software-Updates-in-menu.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From ef6ccc167bae70e491dbb304ed7f6b164454dbe6 Mon Sep 17 00:00:00 2001 +From 2e27539a0bdbc0efb1f0f29eeaff3f5e4308670f Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 14 Mar 2016 10:56:42 -0400 -Subject: [PATCH 33/47] 'Software Sources' -> 'Software & Updates' in menu +Subject: [PATCH 33/48] 'Software Sources' -> 'Software & Updates' in menu --- src/gs-menus.ui | 2 +- diff -Nru gnome-software-3.20.5/debian/patches/0034-Update-kudo-hiding-code.patch gnome-software-3.20.5/debian/patches/0034-Update-kudo-hiding-code.patch --- gnome-software-3.20.5/debian/patches/0034-Update-kudo-hiding-code.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0034-Update-kudo-hiding-code.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 5e708b2b914c7701da1894a95556a5b3e0519839 Mon Sep 17 00:00:00 2001 +From a2ca53f301683003cfa95bbdcfbdaa8f6652edf4 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 4 Mar 2016 14:38:35 +1300 -Subject: [PATCH 34/47] Update kudo hiding code +Subject: [PATCH 34/48] Update kudo hiding code --- src/gs-shell-details.c | 5 +++-- diff -Nru gnome-software-3.20.5/debian/patches/0035-Remove-scary-3rd-party-and-non-free-warnings-they-we.patch gnome-software-3.20.5/debian/patches/0035-Remove-scary-3rd-party-and-non-free-warnings-they-we.patch --- gnome-software-3.20.5/debian/patches/0035-Remove-scary-3rd-party-and-non-free-warnings-they-we.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0035-Remove-scary-3rd-party-and-non-free-warnings-they-we.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From a01859a7cb127b476b2df9cbe6fb3d3fdf9c763a Mon Sep 17 00:00:00 2001 +From a57c6a529de136c9ffb5ca0b15e0c52675b98ec3 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 8 Feb 2017 16:10:10 +1300 -Subject: [PATCH 35/47] Remove scary 3rd party and non-free warnings (they were +Subject: [PATCH 35/48] Remove scary 3rd party and non-free warnings (they were removed upstream). Show license as 'Unknown' in this case --- diff -Nru gnome-software-3.20.5/debian/patches/0036-Disable-history-button.patch gnome-software-3.20.5/debian/patches/0036-Disable-history-button.patch --- gnome-software-3.20.5/debian/patches/0036-Disable-history-button.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0036-Disable-history-button.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 131e77eaddae4d59c50380a8039e2ef7c74e4d7d Mon Sep 17 00:00:00 2001 +From 2b2895017cb78dbd016187953766fc5244d9861f Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 16 Mar 2016 16:06:23 +1300 -Subject: [PATCH 36/47] Disable history button +Subject: [PATCH 36/48] Disable history button --- src/gs-shell-details.c | 3 ++- diff -Nru gnome-software-3.20.5/debian/patches/0037-trivial-Use-Install-as-the-verb-for-the-headerbar-bu.patch gnome-software-3.20.5/debian/patches/0037-trivial-Use-Install-as-the-verb-for-the-headerbar-bu.patch --- gnome-software-3.20.5/debian/patches/0037-trivial-Use-Install-as-the-verb-for-the-headerbar-bu.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0037-trivial-Use-Install-as-the-verb-for-the-headerbar-bu.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 24e6826ea9dd1601ca09b6ac57a6e92fb5fcc331 Mon Sep 17 00:00:00 2001 +From 92e701bf513ae8f031d735fdc2d184779c8cedff Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 8 Apr 2016 15:05:17 +0100 -Subject: [PATCH 37/47] trivial: Use 'Install' as the verb for the headerbar +Subject: [PATCH 37/48] trivial: Use 'Install' as the verb for the headerbar button --- diff -Nru gnome-software-3.20.5/debian/patches/0038-Fix-package-name-not-being-shown-when-using-details-.patch gnome-software-3.20.5/debian/patches/0038-Fix-package-name-not-being-shown-when-using-details-.patch --- gnome-software-3.20.5/debian/patches/0038-Fix-package-name-not-being-shown-when-using-details-.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0038-Fix-package-name-not-being-shown-when-using-details-.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 6f8d085d79bd97f6b90eb09fc3adbf35b397dabc Mon Sep 17 00:00:00 2001 +From 6ffb53291aed379485fc6f69f231458447295902 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 2 Feb 2017 14:28:27 +1300 -Subject: [PATCH 38/47] Fix package name not being shown when using +Subject: [PATCH 38/48] Fix package name not being shown when using --details-pkg with unknown package --- diff -Nru gnome-software-3.20.5/debian/patches/0039-Disable-Software-Updates-Available-notification.patch gnome-software-3.20.5/debian/patches/0039-Disable-Software-Updates-Available-notification.patch --- gnome-software-3.20.5/debian/patches/0039-Disable-Software-Updates-Available-notification.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0039-Disable-Software-Updates-Available-notification.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 0e8a7cfd4d1fd09260108251fbfd28f9859dbd8f Mon Sep 17 00:00:00 2001 +From acef5df841392a25344143eb3069ce9238e2ff22 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 14 Jun 2016 12:27:25 -0400 -Subject: [PATCH 39/47] Disable "Software Updates Available" notification +Subject: [PATCH 39/48] Disable "Software Updates Available" notification --- src/gs-update-monitor.c | 11 ----------- diff -Nru gnome-software-3.20.5/debian/patches/0040-Make-filename-passed-with-local-filename-absolute.patch gnome-software-3.20.5/debian/patches/0040-Make-filename-passed-with-local-filename-absolute.patch --- gnome-software-3.20.5/debian/patches/0040-Make-filename-passed-with-local-filename-absolute.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0040-Make-filename-passed-with-local-filename-absolute.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From a6361497a880e621c04d3219622f0f4f5c9b4ebd Mon Sep 17 00:00:00 2001 +From a6c0a7dc224dd3c2fc82c818d618e8a5021d1e15 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 21 Apr 2017 14:15:54 +1200 -Subject: [PATCH 40/47] Make filename passed with --local-filename absolute. +Subject: [PATCH 40/48] Make filename passed with --local-filename absolute. If you already have gnome-software running this filename is passed to the existing process which is likely to be running in a different working directory. diff -Nru gnome-software-3.20.5/debian/patches/0041-Sort-snaps-before-other-apps.patch gnome-software-3.20.5/debian/patches/0041-Sort-snaps-before-other-apps.patch --- gnome-software-3.20.5/debian/patches/0041-Sort-snaps-before-other-apps.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0041-Sort-snaps-before-other-apps.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From fac0b1e0151bdb33368fe91ee08e766439f69be2 Mon Sep 17 00:00:00 2001 +From 883d95145e81dfcfdf1b13cd982b3446b17b35a6 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 30 Mar 2016 15:55:47 +1300 -Subject: [PATCH 41/47] Sort snaps before other apps +Subject: [PATCH 41/48] Sort snaps before other apps --- src/gs-shell-search.c | 6 ++++++ diff -Nru gnome-software-3.20.5/debian/patches/0042-Non-live-updates-are-updatable-but-not-updatable-liv.patch gnome-software-3.20.5/debian/patches/0042-Non-live-updates-are-updatable-but-not-updatable-liv.patch --- gnome-software-3.20.5/debian/patches/0042-Non-live-updates-are-updatable-but-not-updatable-liv.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0042-Non-live-updates-are-updatable-but-not-updatable-liv.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 530eabeea3f3049a1013dcb99d5a721a9512039c Mon Sep 17 00:00:00 2001 +From 3f646e04d75de486a006e5dc59e690824728d680 Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 13 Apr 2016 09:06:10 -0400 -Subject: [PATCH 42/47] Non-live updates are updatable but not updatable-live +Subject: [PATCH 42/48] Non-live updates are updatable but not updatable-live --- src/gs-shell-updates.c | 2 +- diff -Nru gnome-software-3.20.5/debian/patches/0043-trivial-Don-t-do-two-update-actions-for-live-update.patch gnome-software-3.20.5/debian/patches/0043-trivial-Don-t-do-two-update-actions-for-live-update.patch --- gnome-software-3.20.5/debian/patches/0043-trivial-Don-t-do-two-update-actions-for-live-update.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0043-trivial-Don-t-do-two-update-actions-for-live-update.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 53768884006c8af2c8f45bd6556b55c90f89f832 Mon Sep 17 00:00:00 2001 +From c5f082fb74aa00f23e2466cef019ef06d626ced1 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 11 Apr 2016 10:31:12 +0100 -Subject: [PATCH 43/47] trivial: Don't do two update actions for live update +Subject: [PATCH 43/48] trivial: Don't do two update actions for live update --- src/gs-plugin-loader.c | 4 +--- diff -Nru gnome-software-3.20.5/debian/patches/0044-Use-Ubuntu-Software-title-in-Ubuntu.patch gnome-software-3.20.5/debian/patches/0044-Use-Ubuntu-Software-title-in-Ubuntu.patch --- gnome-software-3.20.5/debian/patches/0044-Use-Ubuntu-Software-title-in-Ubuntu.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0044-Use-Ubuntu-Software-title-in-Ubuntu.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From e556520f8993de0a71a3ae8bb6ec33f779f97933 Mon Sep 17 00:00:00 2001 +From d78f9289c82e2a5fff6822086fcefbe26d853d71 Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Sun, 18 Jun 2017 13:18:01 +1200 -Subject: [PATCH 44/47] Use 'Ubuntu Software' title in Ubuntu +Subject: [PATCH 44/48] Use 'Ubuntu Software' title in Ubuntu --- src/gs-application.c | 8 ++++++-- diff -Nru gnome-software-3.20.5/debian/patches/0045-Don-t-generate-popular-apps-from-Ubuntu-reviews.patch gnome-software-3.20.5/debian/patches/0045-Don-t-generate-popular-apps-from-Ubuntu-reviews.patch --- gnome-software-3.20.5/debian/patches/0045-Don-t-generate-popular-apps-from-Ubuntu-reviews.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0045-Don-t-generate-popular-apps-from-Ubuntu-reviews.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From c082b972d8b31e5130a46f58778ba3fd6e42e271 Mon Sep 17 00:00:00 2001 +From 20615223b7d2201e82c145a8f8ac2adcc6f6bd21 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Mon, 24 Jul 2017 16:41:12 +1200 -Subject: [PATCH 45/47] Don't generate popular apps from Ubuntu reviews +Subject: [PATCH 45/48] Don't generate popular apps from Ubuntu reviews --- src/plugins/gs-plugin-ubuntu-reviews.c | 87 ---------------------------------- diff -Nru gnome-software-3.20.5/debian/patches/0046-Don-t-randomize-editors-picks.patch gnome-software-3.20.5/debian/patches/0046-Don-t-randomize-editors-picks.patch --- gnome-software-3.20.5/debian/patches/0046-Don-t-randomize-editors-picks.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0046-Don-t-randomize-editors-picks.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 8a665c1c64bee3fddc3a4994f75fa3b08c5289c4 Mon Sep 17 00:00:00 2001 +From 48e9465cb1986cde07d5a048f91847e141c3dbea Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 18 Aug 2017 16:27:26 +1200 -Subject: [PATCH 46/47] Don't randomize editors picks. +Subject: [PATCH 46/48] Don't randomize editors picks. The featured snaps are provided in a significant order. https://bugs.launchpad.net/bugs/1705953 diff -Nru gnome-software-3.20.5/debian/patches/0047-Use-the-developer-name-if-set-in-preference-to-the-p.patch gnome-software-3.20.5/debian/patches/0047-Use-the-developer-name-if-set-in-preference-to-the-p.patch --- gnome-software-3.20.5/debian/patches/0047-Use-the-developer-name-if-set-in-preference-to-the-p.patch 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0047-Use-the-developer-name-if-set-in-preference-to-the-p.patch 2017-12-14 07:12:42.000000000 +0800 @@ -1,7 +1,7 @@ -From 713668fc282340d5076e27eaa369a4cf31cf0f70 Mon Sep 17 00:00:00 2001 +From fa460099421d4919f1da799b4755294b10f70b20 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 24 Mar 2017 12:30:10 +0000 -Subject: [PATCH 47/47] Use the developer name if set in preference to the +Subject: [PATCH 47/48] Use the developer name if set in preference to the project group --- @@ -72,10 +72,10 @@ g_free (app->version_ui); g_free (app->summary); diff --git a/src/gs-app.h b/src/gs-app.h -index 2290b30a..b14c73a9 100644 +index 7e5f2138..9ebb15c4 100644 --- a/src/gs-app.h +++ b/src/gs-app.h -@@ -126,6 +126,9 @@ void gs_app_clear_source_ids (GsApp *app); +@@ -127,6 +127,9 @@ void gs_app_clear_source_ids (GsApp *app); const gchar *gs_app_get_project_group (GsApp *app); void gs_app_set_project_group (GsApp *app, const gchar *source); diff -Nru gnome-software-3.20.5/debian/patches/0048-Display-a-warning-for-non-sandboxed-snaps.patch gnome-software-3.20.5/debian/patches/0048-Display-a-warning-for-non-sandboxed-snaps.patch --- gnome-software-3.20.5/debian/patches/0048-Display-a-warning-for-non-sandboxed-snaps.patch 1970-01-01 08:00:00.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/0048-Display-a-warning-for-non-sandboxed-snaps.patch 2017-12-14 07:12:42.000000000 +0800 @@ -0,0 +1,109 @@ +From 913f76ff1946df8f0bd119343e4d778f805054ba Mon Sep 17 00:00:00 2001 +From: James Henstridge +Date: Fri, 23 Jun 2017 11:22:36 +0800 +Subject: [PATCH 48/48] Display a warning for non-sandboxed snaps. + +--- + src/gs-shell-details.c | 10 ++++++++++ + src/gs-shell-details.ui | 43 ++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 52 insertions(+), 1 deletion(-) + +diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c +index 28f792ef..78575d7f 100644 +--- a/src/gs-shell-details.c ++++ b/src/gs-shell-details.c +@@ -114,6 +114,7 @@ struct _GsShellDetails + GtkWidget *label_details_kudo_integration; + GtkWidget *label_details_kudo_translated; + GtkWidget *label_details_kudo_updated; ++ GtkWidget *box_not_sandboxed_warning; + }; + + G_DEFINE_TYPE (GsShellDetails, gs_shell_details, GS_TYPE_PAGE) +@@ -828,6 +829,14 @@ gs_shell_details_refresh_all (GsShellDetails *self) + history->len == 0) + gtk_widget_set_visible (self->button_history, FALSE); + ++ /* Display a warning about non-sandboxed apps that may come ++ * from third party sources. Currently only checking snaps. */ ++ ret = FALSE; ++ if (g_strcmp0 (gs_app_get_management_plugin (self->app), "snap") == 0) { ++ ret |= (kudos & GS_APP_KUDO_SANDBOXED) == 0; ++ } ++ gtk_widget_set_visible (self->box_not_sandboxed_warning, ret); ++ + /* are we trying to replace something in the baseos */ + gtk_widget_set_visible (self->infobar_details_package_baseos, + gs_app_has_quirk (self->app, AS_APP_QUIRK_COMPULSORY) && +@@ -1719,6 +1728,7 @@ gs_shell_details_class_init (GsShellDetailsClass *klass) + gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_kudo_integration); + gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_kudo_translated); + gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_kudo_updated); ++ gtk_widget_class_bind_template_child (widget_class, GsShellDetails, box_not_sandboxed_warning); + } + + /** +diff --git a/src/gs-shell-details.ui b/src/gs-shell-details.ui +index 1c16097d..48a30d0d 100644 +--- a/src/gs-shell-details.ui ++++ b/src/gs-shell-details.ui +@@ -610,6 +610,47 @@ + 9 + + ++ ++ ++ False ++ False ++ 30 ++ 12 ++ ++ ++ True ++ False ++ 16 ++ dialog-warning ++ 6 ++ ++ ++ False ++ True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ This third party package is not sandboxed. It will have access to your documents. ++ 0 ++ 0.5 ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 10 ++ ++ + + + True +@@ -990,7 +1031,7 @@ + + False + True +- 10 ++ 11 + + + +-- +2.14.1 + diff -Nru gnome-software-3.20.5/debian/patches/series gnome-software-3.20.5/debian/patches/series --- gnome-software-3.20.5/debian/patches/series 2017-12-06 05:36:16.000000000 +0800 +++ gnome-software-3.20.5/debian/patches/series 2017-12-14 07:12:42.000000000 +0800 @@ -1,3 +1,4 @@ +0001-trivial-Fix-CSS-validation-warning.patch 0001-ubuntu-reviews-Fix-Wilson-score-calculation.patch 0001-Add-gs_app_set_local_file.patch 0002-service-Set-NoDisplay-true.patch @@ -16,6 +17,7 @@ 0015-Allow-logging-into-Ubuntu-One-for-reviews.patch 0016-Add-a-dpkg-plugin.patch 0017-Add-an-APT-plugin.patch +0018-Backport-GS_APP_KUDO_SANDBOXED.patch 0018-Add-a-Snap-plugin.patch 0019-Use-minimal-limits-for-review-content.patch 0020-Format-update-descriptions-to-be-suitable-for-Ubuntu.patch @@ -46,3 +48,4 @@ 0045-Don-t-generate-popular-apps-from-Ubuntu-reviews.patch 0046-Don-t-randomize-editors-picks.patch 0047-Use-the-developer-name-if-set-in-preference-to-the-p.patch +0048-Display-a-warning-for-non-sandboxed-snaps.patch