From 5a61d82f748da129626d04bd3a542c71d3822517 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Mon, 9 Nov 2020 17:04:08 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/PackageKit.git#cc620e243eb5c3781b320390e1f7c22d626d5d29 --- ...k_dbus_get_uid-before-D-Bus-is-setup.patch | 26 +++++++++++++++++++ PackageKit.spec | 11 +++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 PackageKit-1.2.2-Do-not-crash-when-calling-pk_dbus_get_uid-before-D-Bus-is-setup.patch diff --git a/PackageKit-1.2.2-Do-not-crash-when-calling-pk_dbus_get_uid-before-D-Bus-is-setup.patch b/PackageKit-1.2.2-Do-not-crash-when-calling-pk_dbus_get_uid-before-D-Bus-is-setup.patch new file mode 100644 index 0000000..f1acca8 --- /dev/null +++ b/PackageKit-1.2.2-Do-not-crash-when-calling-pk_dbus_get_uid-before-D-Bus-is-setup.patch @@ -0,0 +1,26 @@ +From 0a7437961dad8ba8366d133e73068c6a578e9754 Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Thu, 29 Oct 2020 15:40:00 +0000 +Subject: [PATCH] Do not crash when calling pk_dbus_get_uid() before D-Bus is + setup + +Fixes https://github.com/hughsie/PackageKit/issues/436 +--- + src/pk-dbus.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/pk-dbus.c b/src/pk-dbus.c +index ddd04d4e6..af275eb2a 100644 +--- a/src/pk-dbus.c ++++ b/src/pk-dbus.c +@@ -64,6 +64,10 @@ pk_dbus_get_uid (PkDbus *dbus, const gchar *sender) + g_return_val_if_fail (PK_IS_DBUS (dbus), G_MAXUINT); + g_return_val_if_fail (sender != NULL, G_MAXUINT); + ++ /* no connection to DBus */ ++ if (dbus->priv->proxy_uid == NULL) ++ return G_MAXUINT; ++ + /* set in the test suite */ + if (g_strcmp0 (sender, ":org.freedesktop.PackageKit") == 0) { + g_debug ("using self-check shortcut"); diff --git a/PackageKit.spec b/PackageKit.spec index aaa8cf8..33598bb 100644 --- a/PackageKit.spec +++ b/PackageKit.spec @@ -6,7 +6,7 @@ Summary: Package management service Name: PackageKit Version: 1.2.2 -Release: 1%{?dist} +Release: 2%{?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,6 +17,11 @@ Patch0: PackageKit-0.3.8-Fedora-Vendor.conf.patch Patch0: PackageKit-0.3.8-RHEL-Vendor.conf.patch %endif +# Do not crash on login. +# https://bugzilla.redhat.com/show_bug.cgi?id=1836304 +# https://github.com/hughsie/PackageKit/pull/437 +Patch1: PackageKit-1.2.2-Do-not-crash-when-calling-pk_dbus_get_uid-before-D-Bus-is-setup.patch + BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: xmlto BuildRequires: gtk-doc @@ -235,6 +240,10 @@ systemctl disable packagekit-offline-update.service > /dev/null 2>&1 || : %{_datadir}/vala/vapi/packagekit-glib2.deps %changelog +* Mon Nov 9 2020 Vít Ondruch - 1.2.2-2 +- Fix crash on login. + Resolves: rhbz#1836304 + * Mon Nov 02 2020 Richard Hughes - 1.2.2-1 - New upstream release - Notify systemd when beginning to shutdown