rhughes pushed to PackageKit (f22). "New upstream release"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Apr 8 20:00:38 UTC 2015


>From 5240790de14b62b7cec2ddb90084ab1dcbb37162 Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard at hughsie.com>
Date: Tue, 7 Apr 2015 13:30:35 +0100
Subject: New upstream release


diff --git a/.gitignore b/.gitignore
index 794287f..38a4361 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,3 +47,4 @@ PackageKit-0.6.7.tar.bz2
 /PackageKit-1.0.3.tar.xz
 /PackageKit-1.0.4.tar.xz
 /PackageKit-1.0.5.tar.xz
+/PackageKit-1.0.6.tar.xz
diff --git a/0001-hif-Fix-use-after-free-during-untrusted-repo-check.patch b/0001-hif-Fix-use-after-free-during-untrusted-repo-check.patch
deleted file mode 100644
index 75de5e7..0000000
--- a/0001-hif-Fix-use-after-free-during-untrusted-repo-check.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From e3d857e50e2a9d587e59e377238adb7ed2e82a58 Mon Sep 17 00:00:00 2001
-From: Kalev Lember <kalevlember at gmail.com>
-Date: Fri, 13 Mar 2015 22:47:49 +0100
-Subject: [PATCH] hif: Fix use-after-free during untrusted repo check
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1185544
----
- backends/hif/pk-backend-hif.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/backends/hif/pk-backend-hif.c b/backends/hif/pk-backend-hif.c
-index 2e497cd..5988ab1 100644
---- a/backends/hif/pk-backend-hif.c
-+++ b/backends/hif/pk-backend-hif.c
-@@ -2090,7 +2090,7 @@ pk_backend_transaction_check_untrusted_repos (PkBackend *backend, GPtrArray *sou
- 					 HIF_PACKAGE_INFO_DOWNGRADE,
- 					 HIF_PACKAGE_INFO_UPDATE,
- 					 -1);
--	array = g_ptr_array_new ();
-+	array = g_ptr_array_new_with_free_func ((GDestroyNotify) hy_package_free);
- 	for (i = 0; i < install->len; i++) {
- 		pkg = g_ptr_array_index (install, i);
- 
-@@ -2098,7 +2098,7 @@ pk_backend_transaction_check_untrusted_repos (PkBackend *backend, GPtrArray *sou
- 		 * untrusted repo */
- 		if (g_strcmp0 (hy_package_get_reponame (pkg),
- 			       HY_CMDLINE_REPO_NAME) == 0) {
--			g_ptr_array_add (array, pkg);
-+			g_ptr_array_add (array, hy_package_link (pkg));
- 			continue;
- 		}
- 
-@@ -2115,7 +2115,7 @@ pk_backend_transaction_check_untrusted_repos (PkBackend *backend, GPtrArray *sou
- 
- 		/* repo has no gpg key */
- 		if (!hif_source_get_gpgcheck (src))
--			g_ptr_array_add (array, pkg);
-+			g_ptr_array_add (array, hy_package_link (pkg));
- 	}
- out:
- 	if (array != NULL && !ret) {
--- 
-2.3.4
-
diff --git a/PackageKit-new-missing-codecs-API.patch b/PackageKit-new-missing-codecs-API.patch
deleted file mode 100644
index 07dbaac..0000000
--- a/PackageKit-new-missing-codecs-API.patch
+++ /dev/null
@@ -1,362 +0,0 @@
-From 07376458f5c490f2e6bfa682692fbe1b2dc07784 Mon Sep 17 00:00:00 2001
-From: Kalev Lember <kalevlember at gmail.com>
-Date: Mon, 2 Feb 2015 13:57:17 +0100
-Subject: [PATCH 1/4] gstreamer plugin: Add support for v2 of the PK session
- service interface
-
-This adds support for the Modify2 interface, but keeps the older
-interface supported as a fallback.
----
- contrib/gstreamer-plugin/pk-gstreamer-install.c | 115 +++++++++++++++++-------
- 1 file changed, 85 insertions(+), 30 deletions(-)
-
-diff --git a/contrib/gstreamer-plugin/pk-gstreamer-install.c b/contrib/gstreamer-plugin/pk-gstreamer-install.c
-index ad6cf98..c2a5cfe 100644
---- a/contrib/gstreamer-plugin/pk-gstreamer-install.c
-+++ b/contrib/gstreamer-plugin/pk-gstreamer-install.c
-@@ -259,6 +259,76 @@ out:
- 	return suffix;
- }
- 
-+static gboolean
-+pk_gst_dbus_install_resources (gchar **resources, const gchar *desktop_id, guint timestamp, GError **error)
-+{
-+	_cleanup_object_unref_ GDBusProxy *proxy = NULL;
-+	_cleanup_variant_unref_ GVariant *value = NULL;
-+
-+	/* get proxy */
-+	proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
-+					       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
-+					       G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
-+					       NULL,
-+					       "org.freedesktop.PackageKit",
-+					       "/org/freedesktop/PackageKit",
-+					       "org.freedesktop.PackageKit.Modify2",
-+					       NULL,
-+					       error);
-+	if (proxy != NULL) {
-+		/* invoke the method */
-+		value = g_dbus_proxy_call_sync (proxy,
-+						"InstallGStreamerResources",
-+						g_variant_new ("(^a&sssu)",
-+							       resources,
-+							       "hide-finished",
-+							       desktop_id,
-+							       timestamp),
-+						G_DBUS_CALL_FLAGS_NONE,
-+						60 * 60 * 1000, /* 1 hour */
-+						NULL,
-+						error);
-+		if (value != NULL)
-+			return TRUE;
-+	}
-+
-+	return FALSE;
-+}
-+
-+static gboolean
-+pk_gst_dbus_install_resources_compat (gchar **resources, gint xid, GError **error)
-+{
-+	_cleanup_object_unref_ GDBusProxy *proxy = NULL;
-+	_cleanup_variant_unref_ GVariant *value = NULL;
-+
-+	/* get proxy */
-+	proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
-+					       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
-+					       G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
-+					       NULL,
-+					       "org.freedesktop.PackageKit",
-+					       "/org/freedesktop/PackageKit",
-+					       "org.freedesktop.PackageKit.Modify",
-+					       NULL,
-+					       error);
-+	if (proxy != NULL) {
-+		/* invoke the method */
-+		value = g_dbus_proxy_call_sync (proxy,
-+						"InstallGStreamerResources",
-+						g_variant_new ("(u^a&ss)",
-+							       xid,
-+							       resources,
-+							       "hide-finished"),
-+						G_DBUS_CALL_FLAGS_NONE,
-+						60 * 60 * 1000, /* 1 hour */
-+						NULL,
-+						error);
-+		if (value != NULL)
-+			return TRUE;
-+	}
-+
-+	return FALSE;
-+}
- 
- /**
-  * main:
-@@ -269,18 +339,21 @@ main (int argc, gchar **argv)
- 	GOptionContext *context;
- 	guint i;
- 	guint len;
-+	gboolean ret;
- 	gchar **codecs = NULL;
- 	gint xid = 0;
-+	guint timestamp = 0;
- 	const gchar *suffix;
- 	gchar *resource;
- 	_cleanup_error_free_ GError *error = NULL;
--	_cleanup_object_unref_ GDBusProxy *proxy = NULL;
-+	_cleanup_free_ gchar *desktop_id = NULL;
- 	_cleanup_ptrarray_unref_ GPtrArray *array = NULL;
- 	_cleanup_strv_free_ gchar **resources = NULL;
--	_cleanup_variant_unref_ GVariant *value = NULL;
- 
- 	const GOptionEntry options[] = {
- 		{ "transient-for", '\0', 0, G_OPTION_ARG_INT, &xid, "The XID of the parent window", NULL },
-+		{ "desktop-id", '\0', 0, G_OPTION_ARG_STRING, &desktop_id, "The desktop ID of the calling application", NULL },
-+		{ "timestamp", '\0', 0, G_OPTION_ARG_INT, &timestamp, "The timestamp of the user interaction that triggered this call", NULL },
- 		{ G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &codecs, "GStreamer install infos", NULL },
- 		{ NULL }
- 	};
-@@ -307,22 +380,7 @@ main (int argc, gchar **argv)
- 
- 	/* this is our parent window */
- 	g_message ("PackageKit: xid = %i", xid);
--
--	/* get proxy */
--	proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
--					       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
--					       G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
--					       NULL,
--					       "org.freedesktop.PackageKit",
--					       "/org/freedesktop/PackageKit",
--					       "org.freedesktop.PackageKit.Modify",
--					       NULL,
--					       &error);
--	if (proxy == NULL) {
--		g_warning ("Cannot connect to PackageKit session service: %s",
--			   error->message);
--		return GST_INSTALL_PLUGINS_ERROR;
--	}
-+	g_message ("PackageKit: desktop_id = %s", desktop_id);
- 
- 	/* use a ()(64bit) suffix for 64 bit */
- 	suffix = pk_gst_get_arch_suffix ();
-@@ -384,18 +442,15 @@ main (int argc, gchar **argv)
- 	/* convert to a GStrv */
- 	resources = pk_ptr_array_to_strv (array);
- 
--	/* invoke the method */
--	value = g_dbus_proxy_call_sync (proxy,
--					"InstallGStreamerResources",
--					g_variant_new ("(u^a&ss)",
--						       xid,
--						       resources,
--						       "hide-finished"),
--					G_DBUS_CALL_FLAGS_NONE,
--					60 * 60 * 1000, /* 1 hour */
--					NULL,
--					&error);
--	if (value == NULL) {
-+	/* first try the new interface */
-+	ret = pk_gst_dbus_install_resources (resources, desktop_id, timestamp, &error);
-+	if (g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD)) {
-+		/* ... and if that fails, fall back to the compat interface */
-+		g_clear_error (&error);
-+		g_message ("PackageKit: falling back to compat dbus interface");
-+		ret = pk_gst_dbus_install_resources_compat (resources, xid, &error);
-+	}
-+	if (!ret) {
- 		/* use the error string to return a good GStreamer exit code */
- 		g_message ("PackageKit: Did not install codec: %s", error->message);
- 		if (g_strrstr (error->message, "did not agree to search") != NULL)
--- 
-2.3.0
-
-From aa8b11490e1ef3c687c85dbef126d23320c8deca Mon Sep 17 00:00:00 2001
-From: Kalev Lember <kalevlember at gmail.com>
-Date: Tue, 10 Feb 2015 13:33:06 +0100
-Subject: [PATCH 2/4] gstreamer plugin: Add a new --interaction command line
- option
-
-This allows passing in e.g --interaction=hide-confirm-search which would
-tell the PK session service implementation that it shouldn't ask for
-confirmation again, since the app has already done that.
----
- contrib/gstreamer-plugin/pk-gstreamer-install.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/contrib/gstreamer-plugin/pk-gstreamer-install.c b/contrib/gstreamer-plugin/pk-gstreamer-install.c
-index c2a5cfe..a89d8a4 100644
---- a/contrib/gstreamer-plugin/pk-gstreamer-install.c
-+++ b/contrib/gstreamer-plugin/pk-gstreamer-install.c
-@@ -260,7 +260,7 @@ out:
- }
- 
- static gboolean
--pk_gst_dbus_install_resources (gchar **resources, const gchar *desktop_id, guint timestamp, GError **error)
-+pk_gst_dbus_install_resources (gchar **resources, const gchar *desktop_id, guint timestamp, const gchar *interaction, GError **error)
- {
- 	_cleanup_object_unref_ GDBusProxy *proxy = NULL;
- 	_cleanup_variant_unref_ GVariant *value = NULL;
-@@ -281,7 +281,7 @@ pk_gst_dbus_install_resources (gchar **resources, const gchar *desktop_id, guint
- 						"InstallGStreamerResources",
- 						g_variant_new ("(^a&sssu)",
- 							       resources,
--							       "hide-finished",
-+							       interaction,
- 							       desktop_id,
- 							       timestamp),
- 						G_DBUS_CALL_FLAGS_NONE,
-@@ -347,6 +347,7 @@ main (int argc, gchar **argv)
- 	gchar *resource;
- 	_cleanup_error_free_ GError *error = NULL;
- 	_cleanup_free_ gchar *desktop_id = NULL;
-+	_cleanup_free_ gchar *interaction = NULL;
- 	_cleanup_ptrarray_unref_ GPtrArray *array = NULL;
- 	_cleanup_strv_free_ gchar **resources = NULL;
- 
-@@ -354,6 +355,7 @@ main (int argc, gchar **argv)
- 		{ "transient-for", '\0', 0, G_OPTION_ARG_INT, &xid, "The XID of the parent window", NULL },
- 		{ "desktop-id", '\0', 0, G_OPTION_ARG_STRING, &desktop_id, "The desktop ID of the calling application", NULL },
- 		{ "timestamp", '\0', 0, G_OPTION_ARG_INT, &timestamp, "The timestamp of the user interaction that triggered this call", NULL },
-+		{ "interaction", '\0', 0, G_OPTION_ARG_STRING, &interaction, "Interaction mode specifying which UI elements should be shown", NULL },
- 		{ G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &codecs, "GStreamer install infos", NULL },
- 		{ NULL }
- 	};
-@@ -443,7 +445,7 @@ main (int argc, gchar **argv)
- 	resources = pk_ptr_array_to_strv (array);
- 
- 	/* first try the new interface */
--	ret = pk_gst_dbus_install_resources (resources, desktop_id, timestamp, &error);
-+	ret = pk_gst_dbus_install_resources (resources, desktop_id, timestamp, interaction, &error);
- 	if (g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD)) {
- 		/* ... and if that fails, fall back to the compat interface */
- 		g_clear_error (&error);
--- 
-2.3.0
-
-From 3bbea278b8f1b8208a937be779905978a6326e77 Mon Sep 17 00:00:00 2001
-From: Kalev Lember <kalevlember at gmail.com>
-Date: Fri, 13 Feb 2015 14:00:31 +0100
-Subject: [PATCH 3/4] gstreamer plugin: Adapt to gstreamer missing plugin
- changes
-
-The final version that went into upstream gst-plugins-base passes
---startup-notification-id instead of --timestamp.
----
- contrib/gstreamer-plugin/pk-gstreamer-install.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/contrib/gstreamer-plugin/pk-gstreamer-install.c b/contrib/gstreamer-plugin/pk-gstreamer-install.c
-index a89d8a4..99b85f3 100644
---- a/contrib/gstreamer-plugin/pk-gstreamer-install.c
-+++ b/contrib/gstreamer-plugin/pk-gstreamer-install.c
-@@ -260,7 +260,7 @@ out:
- }
- 
- static gboolean
--pk_gst_dbus_install_resources (gchar **resources, const gchar *desktop_id, guint timestamp, const gchar *interaction, GError **error)
-+pk_gst_dbus_install_resources (gchar **resources, const gchar *desktop_id, const gchar *startup_id, const gchar *interaction, GError **error)
- {
- 	_cleanup_object_unref_ GDBusProxy *proxy = NULL;
- 	_cleanup_variant_unref_ GVariant *value = NULL;
-@@ -279,11 +279,11 @@ pk_gst_dbus_install_resources (gchar **resources, const gchar *desktop_id, guint
- 		/* invoke the method */
- 		value = g_dbus_proxy_call_sync (proxy,
- 						"InstallGStreamerResources",
--						g_variant_new ("(^a&sssu)",
-+						g_variant_new ("(^a&ssss)",
- 							       resources,
- 							       interaction,
- 							       desktop_id,
--							       timestamp),
-+							       startup_id),
- 						G_DBUS_CALL_FLAGS_NONE,
- 						60 * 60 * 1000, /* 1 hour */
- 						NULL,
-@@ -342,20 +342,20 @@ main (int argc, gchar **argv)
- 	gboolean ret;
- 	gchar **codecs = NULL;
- 	gint xid = 0;
--	guint timestamp = 0;
- 	const gchar *suffix;
- 	gchar *resource;
- 	_cleanup_error_free_ GError *error = NULL;
- 	_cleanup_free_ gchar *desktop_id = NULL;
- 	_cleanup_free_ gchar *interaction = NULL;
-+	_cleanup_free_ gchar *startup_id = NULL;
- 	_cleanup_ptrarray_unref_ GPtrArray *array = NULL;
- 	_cleanup_strv_free_ gchar **resources = NULL;
- 
- 	const GOptionEntry options[] = {
- 		{ "transient-for", '\0', 0, G_OPTION_ARG_INT, &xid, "The XID of the parent window", NULL },
- 		{ "desktop-id", '\0', 0, G_OPTION_ARG_STRING, &desktop_id, "The desktop ID of the calling application", NULL },
--		{ "timestamp", '\0', 0, G_OPTION_ARG_INT, &timestamp, "The timestamp of the user interaction that triggered this call", NULL },
- 		{ "interaction", '\0', 0, G_OPTION_ARG_STRING, &interaction, "Interaction mode specifying which UI elements should be shown", NULL },
-+		{ "startup-notification-id", '\0', 0, G_OPTION_ARG_STRING, &startup_id, "The startup notification ID for focus stealing prevention", NULL },
- 		{ G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &codecs, "GStreamer install infos", NULL },
- 		{ NULL }
- 	};
-@@ -445,7 +445,7 @@ main (int argc, gchar **argv)
- 	resources = pk_ptr_array_to_strv (array);
- 
- 	/* first try the new interface */
--	ret = pk_gst_dbus_install_resources (resources, desktop_id, timestamp, interaction, &error);
-+	ret = pk_gst_dbus_install_resources (resources, desktop_id, startup_id, interaction, &error);
- 	if (g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD)) {
- 		/* ... and if that fails, fall back to the compat interface */
- 		g_clear_error (&error);
--- 
-2.3.0
-
-From 0b2f0c75df4896ff96f07e5cf63356596f5106b4 Mon Sep 17 00:00:00 2001
-From: Kalev Lember <kalevlember at gmail.com>
-Date: Mon, 16 Feb 2015 17:57:08 +0100
-Subject: [PATCH 4/4] gstreamer plugin: Adapt to gnome-software session service
- changes
-
----
- contrib/gstreamer-plugin/pk-gstreamer-install.c | 19 +++++++++++++++++--
- 1 file changed, 17 insertions(+), 2 deletions(-)
-
-diff --git a/contrib/gstreamer-plugin/pk-gstreamer-install.c b/contrib/gstreamer-plugin/pk-gstreamer-install.c
-index 99b85f3..4cae3ba 100644
---- a/contrib/gstreamer-plugin/pk-gstreamer-install.c
-+++ b/contrib/gstreamer-plugin/pk-gstreamer-install.c
-@@ -259,6 +259,21 @@ out:
- 	return suffix;
- }
- 
-+static GVariant *
-+make_platform_data (const gchar *startup_id)
-+{
-+	GVariantBuilder builder;
-+
-+	g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
-+
-+	if (startup_id && g_utf8_validate (startup_id, -1, NULL)) {
-+		g_variant_builder_add (&builder, "{sv}",
-+		                       "desktop-startup-id", g_variant_new_string (startup_id));
-+	}
-+
-+	return g_variant_builder_end (&builder);
-+}
-+
- static gboolean
- pk_gst_dbus_install_resources (gchar **resources, const gchar *desktop_id, const gchar *startup_id, const gchar *interaction, GError **error)
- {
-@@ -279,11 +294,11 @@ pk_gst_dbus_install_resources (gchar **resources, const gchar *desktop_id, const
- 		/* invoke the method */
- 		value = g_dbus_proxy_call_sync (proxy,
- 						"InstallGStreamerResources",
--						g_variant_new ("(^a&ssss)",
-+						g_variant_new ("(^a&sss at a{sv})",
- 							       resources,
- 							       interaction,
- 							       desktop_id,
--							       startup_id),
-+							       make_platform_data (startup_id)),
- 						G_DBUS_CALL_FLAGS_NONE,
- 						60 * 60 * 1000, /* 1 hour */
- 						NULL,
--- 
-2.3.0
-
diff --git a/PackageKit.spec b/PackageKit.spec
index ac9720d..85f64f5 100644
--- a/PackageKit.spec
+++ b/PackageKit.spec
@@ -6,8 +6,8 @@
 
 Summary:   Package management service
 Name:      PackageKit
-Version:   1.0.5
-Release:   2%{?dist}
+Version:   1.0.6
+Release:   1%{?dist}
 License:   GPLv2+ and LGPLv2+
 URL:       http://www.freedesktop.org/software/PackageKit/
 Source0:   http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
@@ -17,9 +17,6 @@ Source1:   cached-metadata.tar
 
 # Fedora-specific: set Vendor.conf up for Fedora.
 Patch0:    PackageKit-0.3.8-Fedora-Vendor.conf.patch
-# Backported from upstream
-Patch1:    PackageKit-new-missing-codecs-API.patch
-Patch2:    0001-hif-Fix-use-after-free-during-untrusted-repo-check.patch
 
 Requires: %{name}-glib%{?_isa} = %{version}-%{release}
 Requires: shared-mime-info
@@ -176,8 +173,6 @@ using PackageKit.
 %prep
 %setup -q
 %patch0 -p1 -b .fedora
-%patch1 -p1 -b .new-missing-codecs-API
-%patch2 -p1
 
 %build
 %configure \
@@ -317,6 +312,12 @@ systemctl disable packagekit-offline-update.service > /dev/null 2>&1 || :
 %{_datadir}/gtk-doc/html/PackageKit
 
 %changelog
+* Tue Apr 07 2015 Richard Hughes <rhughes at redhat.com> - 1.0.6-1
+- New upstream release
+- Add dbus method for returning prepared packages
+- Don't recursive lock the debug mutex when using --verbose without a tty
+- Make "reboot" the default action for no action file
+
 * Sat Mar 28 2015 Kalev Lember <kalevlember at gmail.com> - 1.0.5-2
 - Backport a crash fix from upstream (#1185544)
 - Update cached metadata
diff --git a/sources b/sources
index 073fb29..ca285d2 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-1b7b4f820d522cf5fb1d4449afd89a27  PackageKit-1.0.5.tar.xz
-d0a7942fa3a2cb7626f8e0b861b08772  cached-metadata.tar
+d92ffad202f7d18e8c4ed09fecb4624c  PackageKit-1.0.6.tar.xz
+71ec3594e566df369d5d5c6c230cc00f  cached-metadata.tar
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/PackageKit.git/commit/?h=f22&id=5240790de14b62b7cec2ddb90084ab1dcbb37162


More information about the scm-commits mailing list