Compare commits

...

No commits in common. "c8" and "c10s" have entirely different histories.
c8 ... c10s

17 changed files with 1353 additions and 942 deletions

88
.gitignore vendored
View File

@ -1 +1,87 @@
SOURCES/PackageKit-1.1.12.tar.xz PackageKit-0.6.6.tar.bz2
PackageKit-0.6.7.tar.bz2
/PackageKit-0.6.8.tar.bz2
/PackageKit-0.6.9.tar.bz2
/PackageKit-0.6.10.tar.bz2
/PackageKit-0.6.11.tar.bz2
/PackageKit-0.6.12.tar.bz2
/PackageKit-0.6.13.tar.bz2
/PackageKit-0.6.14.tar.bz2
/PackageKit-0.6.15.tar.bz2
/PackageKit-0.6.16.tar.xz
/PackageKit-0.6.17.tar.xz
/PackageKit-0.6.18.tar.xz
/PackageKit-0.6.19.tar.xz
/PackageKit-0.6.20.tar.xz
/PackageKit-0.6.21.tar.xz
/PackageKit-0.7.2.tar.xz
/PackageKit-0.7.4.tar.xz
/PackageKit-0.8.1.tar.xz
/PackageKit-0.8.2.tar.xz
/PackageKit-0.8.3.tar.xz
/PackageKit-0.8.4.tar.xz
/PackageKit-0.8.5.tar.xz
/PackageKit-0.8.6.tar.xz
/PackageKit-0.8.7.tar.xz
/PackageKit-0.8.8.tar.xz
/PackageKit-0.8.9.tar.xz
/PackageKit-0.8.11.tar.xz
/PackageKit-0.8.12.tar.xz
/PackageKit-0.8.13.tar.xz
/PackageKit-0.8.14.tar.xz
/PackageKit-0.8.15.tar.xz
/PackageKit-0.8.16.tar.xz
/PackageKit-0.9.1-20140130.tar.xz
/PackageKit-0.9.1-20140217.tar.xz
/PackageKit-0.9.1-20140226.tar.xz
/PackageKit-0.9.1-20140307.tar.xz
/PackageKit-0.9.1.tar.xz
/PackageKit-0.9.2.tar.xz
/PackageKit-0.9.3.tar.xz
/PackageKit-0.9.4.tar.xz
/PackageKit-0.9.5.tar.xz
/PackageKit-1.0.0.tar.xz
/PackageKit-1.0.1-20141015.tar.xz
/PackageKit-1.0.1.tar.xz
/PackageKit-1.0.3.tar.xz
/PackageKit-1.0.4.tar.xz
/PackageKit-1.0.5.tar.xz
/PackageKit-1.0.6.tar.xz
/PackageKit-1.0.7.tar.xz
/PackageKit-1.0.8.tar.xz
/PackageKit-1.0.9.tar.xz
/PackageKit-1.0.10.tar.xz
/PackageKit-1.0.11.tar.xz
/PackageKit-1.1.0.tar.xz
/PackageKit-1.1.1.tar.xz
/PackageKit-1.1.2.tar.xz
/PackageKit-1.1.3.tar.xz
/PackageKit-1.1.4-20160805.tar.xz
/libdnf-c0a107b.tar.gz
/PackageKit-1.1.4-20160825.tar.xz
/libdnf-0646992.tar.gz
/PackageKit-1.1.4-20160901.tar.xz
/libdnf-9cf4fb3.tar.gz
/PackageKit-1.1.4.tar.xz
/libdnf-ccd2e28.tar.gz
/libdnf-378d315.tar.gz
/PackageKit-1.1.5-20161221.tar.xz
/libdnf-3675456.tar.gz
/PackageKit-1.1.5.tar.xz
/libdnf-fe5a08b.tar.gz
/PackageKit-1.1.6.tar.xz
/PackageKit-1.1.7.tar.xz
/PackageKit-1.1.8.tar.xz
/PackageKit-1.1.9.tar.xz
/PackageKit-1.1.10.tar.xz
/PackageKit-1.1.11.tar.xz
/PackageKit-1.1.12.tar.xz
/PackageKit-1.1.13.tar.xz
/PackageKit-1.2.0.tar.xz
/PackageKit-1.2.1.tar.xz
/PackageKit-1.2.2.tar.xz
/PackageKit-1.2.3.tar.xz
/PackageKit-1.2.4.tar.xz
/PackageKit-1.2.5.tar.xz
/PackageKit-1.2.6.tar.xz
/PackageKit-1.2.8.tar.xz

View File

@ -0,0 +1,45 @@
diff -urNp PackageKit-0.8.14.old/etc/Vendor.conf PackageKit-0.8.14/etc/Vendor.conf
--- PackageKit-0.8.14.old/etc/Vendor.conf 2013-12-02 15:14:19.644838900 +0000
+++ PackageKit-0.8.14/etc/Vendor.conf 2013-12-02 15:15:26.956925038 +0000
@@ -12,7 +12,7 @@
# If the value is set to 'none' then no link is shown.
#
# default=https://www.freedesktop.org/software/PackageKit/pk-package-not-found.html
-DefaultUrl=https://www.freedesktop.org/software/PackageKit/pk-package-not-found.html
+DefaultUrl=https://fedoraproject.org/wiki/PackageKit_Items_Not_Found#Missing_Package
# The URL which is shown to the user when a codec could not be found.
# It should explain why certain codecs cannot be used, and perhaps show
@@ -21,7 +21,7 @@ DefaultUrl=http://www.packagekit.org/pk-
# If the value is set to 'none' then the value of DefaultUrl is used.
#
# default=none
-CodecUrl=none
+CodecUrl=https://fedoraproject.org/wiki/PackageKit_Items_Not_Found#Missing_Codec
# The URL which is shown to the user when hardware drivers could not be found.
# It should explain why some hardware is not supported, and links to futher
@@ -30,7 +30,7 @@ CodecUrl=none
# If the value is set to 'none' then the value of DefaultUrl is used.
#
# default=none
-HardwareUrl=none
+HardwareUrl=https://fedoraproject.org/wiki/PackageKit_Items_Not_Found#Missing_Driver
# The URL which is shown to the user when fonts could not be found.
# Alternatives should probably be suggested where possible.
@@ -38,7 +38,7 @@ HardwareUrl=none
# If the value is set to 'none' then the value of DefaultUrl is used.
#
# default=none
-FontUrl=none
+FontUrl=https://fedoraproject.org/wiki/PackageKit_Items_Not_Found#Missing_Font
# The URL which is shown to the user when programs handing a mime tpye could not
# be found. It should probably explain how to use wine if the program is a
@@ -47,4 +47,4 @@ FontUrl=none
# If the value is set to 'none' then the value of DefaultUrl is used.
#
# default=none
-MimeUrl=none
+MimeUrl=https://fedoraproject.org/wiki/PackageKit_Items_Not_Found#Missing_MIME_Support

View File

@ -4,8 +4,8 @@ diff -urNp PackageKit-0.8.14.old/etc/Vendor.conf PackageKit-0.8.14/etc/Vendor.co
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
# If the value is set to 'none' then no link is shown. # If the value is set to 'none' then no link is shown.
# #
# default=http://www.packagekit.org/pk-package-not-found.html # default=https://www.freedesktop.org/software/PackageKit/pk-package-not-found.html
-DefaultUrl=http://www.packagekit.org/pk-package-not-found.html -DefaultUrl=https://www.freedesktop.org/software/PackageKit/pk-package-not-found.html
+DefaultUrl=https://access.redhat.com/site/solutions/537113#Missing_Package +DefaultUrl=https://access.redhat.com/site/solutions/537113#Missing_Package
# The URL which is shown to the user when a codec could not be found. # The URL which is shown to the user when a codec could not be found.

255
PackageKit.spec Normal file
View File

@ -0,0 +1,255 @@
%global glib2_version 2.54.0
%global libdnf_version 0.43.1
Summary: Package management service
Name: PackageKit
Version: 1.2.8
Release: %autorelease
License: GPL-2.0-or-later AND LGPL-2.1-or-later
URL: http://www.freedesktop.org/software/PackageKit/
Source0: http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
%if 0%{?fedora}
Patch0: PackageKit-0.3.8-Fedora-Vendor.conf.patch
%elif 0%{?rhel}
Patch0: PackageKit-0.3.8-RHEL-Vendor.conf.patch
%endif
# https://pagure.io/fedora-workstation/issue/233
# https://github.com/PackageKit/PackageKit/pull/404
Patch1: package-remove-password-prompt.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2283063
Patch2: appstream-mark-pk-as-compulsory.patch
# https://github.com/PackageKit/PackageKit/pull/751
# https://github.com/PackageKit/PackageKit/pull/774
Patch3: runtime-warnings.patch
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: xmlto
BuildRequires: gtk-doc
BuildRequires: sqlite-devel
BuildRequires: polkit-devel >= 0.92
BuildRequires: gtk3-devel
BuildRequires: docbook-utils
BuildRequires: meson
BuildRequires: gettext
BuildRequires: vala
BuildRequires: gstreamer1-devel
BuildRequires: gstreamer1-plugins-base-devel
BuildRequires: pango-devel
BuildRequires: fontconfig-devel
BuildRequires: pkgconfig(appstream)
BuildRequires: libdnf-devel >= %{libdnf_version}
BuildRequires: systemd
BuildRequires: systemd-devel
BuildRequires: gobject-introspection-devel
BuildRequires: bash-completion
BuildRequires: python3-devel
# Validate metainfo
BuildRequires: libappstream-glib
Requires: %{name}-glib%{?_isa} = %{version}-%{release}
Requires: glib2%{?_isa} >= %{glib2_version}
Requires: libdnf%{?_isa} >= %{libdnf_version}
Requires: shared-mime-info
Requires: systemd
# functionality moved to udev itself
Obsoletes: PackageKit-udev-helper < %{version}-%{release}
Obsoletes: udev-packagekit < %{version}-%{release}
# No more GTK+-2 plugin
Obsoletes: PackageKit-gtk-module < %{version}-%{release}
# No more zif, smart or yum in Fedora
Obsoletes: PackageKit-smart < %{version}-%{release}
Obsoletes: PackageKit-yum < 0.9.1
Obsoletes: PackageKit-yum-plugin < 0.9.1
Obsoletes: PackageKit-zif < 0.8.13-2
# components now built-in
Obsoletes: PackageKit-debug-install < 0.9.1
Obsoletes: PackageKit-hawkey < 0.9.1
Obsoletes: PackageKit-backend-devel < 0.9.6
# Udev no longer provides this functionality
Obsoletes: PackageKit-device-rebind < 0.8.13-2
%description
PackageKit is a D-Bus abstraction layer that allows the session user
to manage packages in a secure way using a cross-distro,
cross-architecture API.
%package glib
Summary: GLib libraries for accessing PackageKit
Requires: dbus >= 1.1.1
Requires: gobject-introspection
Obsoletes: PackageKit-libs < %{version}-%{release}
Provides: PackageKit-libs = %{version}-%{release}
%description glib
GLib libraries for accessing PackageKit.
%package cron
Summary: Cron job and related utilities for PackageKit
Requires: crontabs
Requires: %{name}%{?_isa} = %{version}-%{release}
%description cron
Crontab and utilities for running PackageKit as a cron job.
%package glib-devel
Summary: GLib Libraries and headers for PackageKit
Requires: %{name}-glib%{?_isa} = %{version}-%{release}
Requires: dbus-devel%{?_isa} >= 1.1.1
Requires: sqlite-devel%{?_isa}
Obsoletes: PackageKit-devel < %{version}-%{release}
Provides: PackageKit-devel = %{version}-%{release}
Obsoletes: PackageKit-docs < %{version}-%{release}
Provides: PackageKit-docs = %{version}-%{release}
%description glib-devel
GLib headers and libraries for PackageKit.
%package gstreamer-plugin
Summary: Install GStreamer codecs using PackageKit
Requires: %{name}-glib%{?_isa} = %{version}-%{release}
Obsoletes: codeina < 0.10.1-10
Provides: codeina = 0.10.1-10
%description gstreamer-plugin
The PackageKit GStreamer plugin allows any Gstreamer application to install
codecs from configured repositories using PackageKit.
%package gtk3-module
Summary: Install fonts automatically using PackageKit
Requires: pango
Requires: %{name}-glib%{?_isa} = %{version}-%{release}
%description gtk3-module
The PackageKit GTK3+ module allows any Pango application to install
fonts from configured repositories using PackageKit.
%package command-not-found
Summary: Ask the user to install command line programs automatically
Requires: bash
Requires: %{name} = %{version}-%{release}
Requires: %{name}-glib%{?_isa} = %{version}-%{release}
%description command-not-found
A simple helper that offers to install new packages on the command line
using PackageKit.
%prep
%autosetup -p1
%build
%meson \
-Dgtk_doc=true \
-Dpython_backend=false \
-Dpackaging_backend=dnf \
-Dlocal_checkout=false
%meson_build
%install
%meson_install
# Create cache dir
mkdir -p %{buildroot}%{_localstatedir}/cache/PackageKit
# Create directories for downloaded appstream data
mkdir -p %{buildroot}%{_localstatedir}/cache/app-info/{icons,xmls}
# create a link that GStreamer will recognise
pushd %{buildroot}%{_libexecdir} > /dev/null
ln -s pk-gstreamer-install gst-install-plugins-helper
popd > /dev/null
%find_lang %name
%check
# FIXME: Validation fails in appstream-util because it does not recognize component type "service"
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml || :
%post
# Remove leftover symlinks from /etc/systemd; the offline update service is
# instead now hooked into /usr/lib/systemd/system/system-update.target.wants
systemctl disable packagekit-offline-update.service > /dev/null 2>&1 || :
%files -f %{name}.lang
%license COPYING
%doc README AUTHORS NEWS
%dir %{_datadir}/PackageKit
%dir %{_sysconfdir}/PackageKit
%dir %{_localstatedir}/lib/PackageKit
%dir %{_localstatedir}/cache/app-info
%dir %{_localstatedir}/cache/app-info/icons
%dir %{_localstatedir}/cache/app-info/xmls
%dir %{_localstatedir}/cache/PackageKit
%{_datadir}/bash-completion/completions/pkcon
%dir %{_libdir}/packagekit-backend
%config(noreplace) %{_sysconfdir}/PackageKit/PackageKit.conf
%config(noreplace) %{_sysconfdir}/PackageKit/Vendor.conf
%{_datadir}/man/man1/pkcon.1*
%{_datadir}/man/man1/pkmon.1*
%{_datadir}/polkit-1/actions/*.policy
%{_datadir}/polkit-1/rules.d/*
%{_datadir}/PackageKit/pk-upgrade-distro.sh
%{_datadir}/PackageKit/helpers/test_spawn/search-name.sh
%{_metainfodir}/org.freedesktop.packagekit.metainfo.xml
%{_libexecdir}/packagekitd
%{_libexecdir}/packagekit-direct
%{_bindir}/pkmon
%{_bindir}/pkcon
%exclude %{_libdir}/libpackagekit*.so.*
%{_libdir}/packagekit-backend/libpk_backend_dummy.so
%{_libdir}/packagekit-backend/libpk_backend_test_*.so
%ghost %verify(not md5 size mtime) %attr(0644,-,-) %{_localstatedir}/lib/PackageKit/transactions.db
%{_datadir}/dbus-1/system.d/*
%{_datadir}/dbus-1/system-services/*.service
%{_datadir}/dbus-1/interfaces/*.xml
%{_unitdir}/packagekit-offline-update.service
%{_unitdir}/packagekit.service
%{_unitdir}/system-update.target.wants/
%{_libexecdir}/pk-*offline-update
%{_libexecdir}/packagekit-dnf-refresh-repo
%{_libdir}/packagekit-backend/libpk_backend_dnf.so
%pycached %{python3_sitelib}/dnf-plugins/notify_packagekit.py
%files glib
%{_libdir}/*packagekit-glib2.so.*
%{_libdir}/girepository-1.0/PackageKitGlib-1.0.typelib
%files cron
%config %{_sysconfdir}/cron.daily/packagekit-background.cron
%config(noreplace) %{_sysconfdir}/sysconfig/packagekit-background
%files gstreamer-plugin
%{_libexecdir}/pk-gstreamer-install
%{_libexecdir}/gst-install-plugins-helper
%files gtk3-module
%{_libdir}/gtk-3.0/modules/*.so
%{_libdir}/gnome-settings-daemon-3.0/gtk-modules/*.desktop
%files command-not-found
%{_sysconfdir}/profile.d/*
%{_libexecdir}/pk-command-not-found
%config(noreplace) %{_sysconfdir}/PackageKit/CommandNotFound.conf
%files glib-devel
%{_libdir}/libpackagekit-glib2.so
%{_libdir}/pkgconfig/packagekit-glib2.pc
%dir %{_includedir}/PackageKit
%dir %{_includedir}/PackageKit/packagekit-glib2
%{_includedir}/PackageKit/packagekit-glib*/*.h
%{_datadir}/gir-1.0/PackageKitGlib-1.0.gir
%{_datadir}/gtk-doc/html/PackageKit
%{_datadir}/vala/vapi/packagekit-glib2.vapi
%{_datadir}/vala/vapi/packagekit-glib2.deps
%changelog
%autochangelog

View File

@ -1,25 +0,0 @@
From bb5d77c89eb0f98e7a76b7cdf14cfe9e79d387fa Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard@hughsie.com>
Date: Mon, 25 Nov 2019 11:49:06 +0000
Subject: [PATCH] command-not-found: Don't use a bash regex to fix other shells
---
contrib/command-not-found/PackageKit.sh.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/command-not-found/PackageKit.sh.in b/contrib/command-not-found/PackageKit.sh.in
index ea90981f7..1e1fcdffd 100644
--- a/contrib/command-not-found/PackageKit.sh.in
+++ b/contrib/command-not-found/PackageKit.sh.in
@@ -11,7 +11,7 @@ command_not_found_handle () {
local retval=127
# only search for the command if we're interactive
- [[ $- =~ i ]] || runcnf=0
+ [[ $- == *"i"* ]] || runcnf=0
# don't run if DBus isn't running
[[ ! -S /run/dbus/system_bus_socket ]] && runcnf=0
--
2.23.0

View File

@ -1,45 +0,0 @@
From be075445cafd370abf1ad3e6e85f2baebef056cb Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
Date: Wed, 30 Jan 2019 15:37:21 +0100
Subject: [PATCH] dnf: Don't override DnfContext's release_ver for the running
system
Only override release_ver for the system upgrade DnfContext and leave it
at the default value for the default context. This makes
dnf_context_setup() automatically figure out the release_ver based on
the running system: it looks at various provides in rpmdb and finally
falls back to VERSION_ID from /etc/os-release.
The goal here is to make it possible to adjust the value that gets
passed to librepo by changing system-release(releasever) provides in
fedora-release (which DnfContext correctly handles if we leave the
release_ver set to the default value).
https://pagure.io/releng/issue/7445
---
backends/dnf/pk-backend-dnf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backends/dnf/pk-backend-dnf.c b/backends/dnf/pk-backend-dnf.c
index 47e565915..779896c2d 100644
--- a/backends/dnf/pk-backend-dnf.c
+++ b/backends/dnf/pk-backend-dnf.c
@@ -156,7 +156,6 @@ pk_backend_setup_dnf_context (DnfContext *context, GKeyFile *conf, const gchar *
dnf_context_set_repo_dir (context, repo_dir);
lock_dir = g_build_filename (destdir, "/var/run", NULL);
dnf_context_set_lock_dir (context, lock_dir);
- dnf_context_set_release_ver (context, release_ver);
dnf_context_set_rpm_verbosity (context, "info");
/* use this initial data if repos are not present */
@@ -3401,6 +3400,7 @@ pk_backend_upgrade_system_thread (PkBackendJob *job, GVariant *params, gpointer
g_autoptr(DnfContext) context = NULL;
context = dnf_context_new ();
+ dnf_context_set_release_ver (context, release_ver);
ret = pk_backend_setup_dnf_context (context, priv->conf, release_ver, &error);
if (!ret) {
g_debug ("failed to setup context: %s", error->message);
--
2.21.0

View File

@ -1,38 +0,0 @@
From cdbd27d699b51e37c533d07abd2f1ab26e11355c Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
Date: Tue, 18 Dec 2018 01:02:27 +0100
Subject: [PATCH] dnf: Invalidate the sack cache after downloading new metadata
This fixes first resolve() after refresh() to correctly return the new
data.
https://bugzilla.redhat.com/show_bug.cgi?id=1642878
---
backends/dnf/pk-backend-dnf.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/backends/dnf/pk-backend-dnf.c b/backends/dnf/pk-backend-dnf.c
index 5961f1258..47e565915 100644
--- a/backends/dnf/pk-backend-dnf.c
+++ b/backends/dnf/pk-backend-dnf.c
@@ -1568,6 +1568,7 @@ pk_backend_refresh_cache_thread (PkBackendJob *job,
gpointer user_data)
{
PkBackendDnfJobData *job_data = pk_backend_job_get_user_data (job);
+ PkBackend *backend = pk_backend_job_get_backend (job);
DnfRepo *repo;
DnfState *state_local;
DnfState *state_loop;
@@ -1699,6 +1700,9 @@ pk_backend_refresh_cache_thread (PkBackendJob *job,
return;
}
+ /* invalidate the sack cache after downloading new metadata */
+ pk_backend_sack_cache_invalidate (backend, "downloaded new metadata");
+
/* regenerate the libsolv metadata */
state_local = dnf_state_get_child (job_data->state);
sack = dnf_utils_create_sack_for_filters (job, 0,
--
2.19.1

View File

@ -1,56 +0,0 @@
From 0a46c047512e36d454800602b3845be35eb2dafe Mon Sep 17 00:00:00 2001
From: Philip Withnall <pwithnall@endlessos.org>
Date: Sat, 1 May 2021 01:08:59 +0100
Subject: [PATCH 1/2] pk-transaction: Only set polkit interactive flag if
transaction has too
This should fix polkit dialogues popping up when doing background
refresh operations, particularly for the
`org.freedesktop.packagekit.system-sources-refresh` action.
See
https://gitlab.gnome.org/GNOME/gnome-software/-/issues/582#note_1095101.
Note: This fix is only done through code inspection. I have not tried to
reproduce the failure case, and not tested that this commit actually
fixes it.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
---
src/pk-transaction.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index 83ee5588c..64b7def40 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -2252,6 +2252,7 @@ pk_transaction_authorize_actions (PkTransaction *transaction,
PkTransactionPrivate *priv = transaction->priv;
const gchar *text = NULL;
struct AuthorizeActionsData *data = NULL;
+ PolkitCheckAuthorizationFlags flags;
if (actions->len <= 0) {
g_debug ("No authentication required");
@@ -2338,13 +2339,17 @@ pk_transaction_authorize_actions (PkTransaction *transaction,
data->role = role;
data->actions = g_ptr_array_ref (actions);
+ flags = POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE;
+ if (pk_backend_job_get_interactive (priv->job))
+ flags |= POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION;
+
g_debug ("authorizing action %s", action_id);
/* do authorization async */
polkit_authority_check_authorization (priv->authority,
priv->subject,
action_id,
details,
- POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION,
+ flags,
priv->cancellable,
(GAsyncReadyCallback) pk_transaction_authorize_actions_finished_cb,
data);
--
2.40.0

View File

@ -1,84 +0,0 @@
From b06fae505b66049e537ad15d3569c260e9bc976f Mon Sep 17 00:00:00 2001
From: Philip Withnall <pwithnall@endlessos.org>
Date: Sat, 1 May 2021 01:16:05 +0100
Subject: [PATCH 2/2] pk-engine: Only set polkit interactive flag if method
call has too
Same as the previous commit.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
---
src/pk-engine.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/src/pk-engine.c b/src/pk-engine.c
index 7ea87a448..3d6633ba6 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -632,6 +632,18 @@ pk_engine_is_proxy_unchanged (PkEngine *engine, const gchar *sender,
return TRUE;
}
+static PolkitCheckAuthorizationFlags
+get_polkit_flags_for_dbus_invocation (GDBusMethodInvocation *invocation)
+{
+ PolkitCheckAuthorizationFlags flags = POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE;
+ GDBusMessage *message = g_dbus_method_invocation_get_message (invocation);
+
+ if (g_dbus_message_get_flags (message) & G_DBUS_MESSAGE_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION)
+ flags |= POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION;
+
+ return flags;
+}
+
static void
pk_engine_set_proxy (PkEngine *engine,
const gchar *proxy_http,
@@ -715,7 +727,7 @@ pk_engine_set_proxy (PkEngine *engine,
polkit_authority_check_authorization (engine->priv->authority, subject,
"org.freedesktop.packagekit.system-network-proxy-configure",
NULL,
- POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION,
+ get_polkit_flags_for_dbus_invocation (context),
NULL,
(GAsyncReadyCallback) pk_engine_action_obtain_proxy_authorization_finished_cb,
state);
@@ -1604,7 +1616,7 @@ pk_engine_offline_method_call (GDBusConnection *connection_, const gchar *sender
polkit_authority_check_authorization (engine->priv->authority, subject,
"org.freedesktop.packagekit.trigger-offline-update",
NULL,
- POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION,
+ get_polkit_flags_for_dbus_invocation (invocation),
NULL,
pk_engine_offline_helper_cb,
helper);
@@ -1618,7 +1630,7 @@ pk_engine_offline_method_call (GDBusConnection *connection_, const gchar *sender
polkit_authority_check_authorization (engine->priv->authority, subject,
"org.freedesktop.packagekit.clear-offline-update",
NULL,
- POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION,
+ get_polkit_flags_for_dbus_invocation (invocation),
NULL,
pk_engine_offline_helper_cb,
helper);
@@ -1645,7 +1657,7 @@ pk_engine_offline_method_call (GDBusConnection *connection_, const gchar *sender
polkit_authority_check_authorization (engine->priv->authority, subject,
"org.freedesktop.packagekit.trigger-offline-update",
NULL,
- POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION,
+ get_polkit_flags_for_dbus_invocation (invocation),
NULL,
pk_engine_offline_helper_cb,
helper);
@@ -1672,7 +1684,7 @@ pk_engine_offline_method_call (GDBusConnection *connection_, const gchar *sender
polkit_authority_check_authorization (engine->priv->authority, subject,
"org.freedesktop.packagekit.trigger-offline-upgrade",
NULL,
- POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION,
+ get_polkit_flags_for_dbus_invocation (invocation),
NULL,
pk_engine_offline_helper_cb,
helper);
--
2.40.0

View File

@ -1,41 +0,0 @@
From c9c13747e575fe2ce398cec200284d0318aaece3 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@gnome.org>
Date: Wed, 29 Apr 2020 13:44:41 -0500
Subject: [PATCH] Revert "Shutdown the daemon on idle by default"
This reverts commit 0c84d71509e851db20445c747529bd7d3724f081.
This broke the end session dialog in GNOME Shell.
I thought I had that fixed by changing GNOME Shell to autostart
PackageKit when it is not already running:
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1104
But turns out, there are more problems. The update fails if the user has
used dnf since PackageKit last quit, a scenario I did not test. It also
results in GNOME Software getting confused about what software is
installed and what software is not. The issues are discussed here:
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1227#note_784327
It's still desirable to shut down automatically, but it requires more
planning. And shutting down GNOME Software itself is frankly more
important, since it uses a lot more RAM than packagekitd.
---
src/pk-main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/pk-main.c b/src/pk-main.c
index 7a0bbd199..5791c5fef 100644
--- a/src/pk-main.c
+++ b/src/pk-main.c
@@ -178,8 +178,6 @@ main (int argc, char *argv[])
/* after how long do we timeout? */
exit_idle_time = g_key_file_get_integer (conf, "Daemon", "ShutdownTimeout", NULL);
- if (exit_idle_time == 0)
- exit_idle_time = 300;
g_debug ("daemon shutdown set to %i seconds", exit_idle_time);
/* override the backend name */

View File

@ -1,650 +0,0 @@
%global _changelog_trimtime %(date +%s -d "1 year ago")
%global gitdate 20161221
%global bundled_libdnf 0
%global glib2_version 2.54.0
%global libdnf_version 0.22.0
%if 0%{?bundled_libdnf}
%global commit1 fe5a08bca7e2599798af7778917da2cc31f1460e
%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
%endif
Summary: Package management service
Name: PackageKit
Version: 1.1.12
Release: 7%{?dist}
License: GPLv2+ and LGPLv2+
URL: http://www.freedesktop.org/software/PackageKit/
Source0: http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
%if 0%{?bundled_libdnf}
# https://github.com/rpm-software-management/libdnf
# Bundled because the library is API/ABI unstable, and we're trying to
# avoid being version locked with rpm-ostree/dnf right now.
Source1: https://github.com/rpm-software-management/libdnf/archive/%{commit1}/libdnf-%{shortcommit1}.tar.gz
Provides: bundled(libdnf) = 0.7.0
%endif
# RHEL-specific: set Vendor.conf up for RHEL.
Patch0: rhel-Vendor.conf.patch
# Backported from upstream
Patch1: 0001-dnf-Invalidate-the-sack-cache-after-downloading-new-.patch
Patch2: 0001-dnf-Don-t-override-DnfContext-s-release_ver-for-the-.patch
Patch3: 0001-command-not-found-Don-t-use-a-bash-regex-to-fix-othe.patch
Patch5: 0001-pk-transaction-Only-set-polkit-interactive-flag-if-t.patch
Patch6: 0002-pk-engine-Only-set-polkit-interactive-flag-if-method.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1814820
Patch4: revert-shutdown-on-idle.patch
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: xmlto
BuildRequires: gtk-doc
BuildRequires: sqlite-devel
BuildRequires: polkit-devel >= 0.92
BuildRequires: libtool
BuildRequires: gtk2-devel
BuildRequires: gtk3-devel
BuildRequires: docbook-utils
BuildRequires: yelp-tools
BuildRequires: intltool
BuildRequires: gettext
BuildRequires: vala-tools
BuildRequires: gstreamer1-devel
BuildRequires: gstreamer1-plugins-base-devel
BuildRequires: pango-devel
BuildRequires: fontconfig-devel
BuildRequires: libappstream-glib-devel
%if 0%{?bundled_libdnf}
BuildRequires: check-devel
BuildRequires: cmake
BuildRequires: librepo-devel
BuildRequires: libsolv-devel
BuildRequires: python2-devel
BuildRequires: python2-nose
BuildRequires: python2-sphinx
BuildRequires: rpm-devel
%else
BuildRequires: libdnf-devel >= %{libdnf_version}
%endif
BuildRequires: systemd-devel
BuildRequires: gobject-introspection-devel
BuildRequires: bash-completion
BuildRequires: python3-devel
%if 0%{?bundled_libdnf}
# Filter private libraries
%global __provides_exclude ^libdnf[.]so[.].*$
%global __requires_exclude ^libdnf[.]so[.].*$
%endif
Requires: %{name}-glib%{?_isa} = %{version}-%{release}
Requires: glib2%{?_isa} >= %{glib2_version}
%if ! 0%{?bundled_libdnf}
Requires: libdnf%{?_isa} >= %{libdnf_version}
%endif
Requires: shared-mime-info
Requires: systemd
# functionality moved to udev itself
Obsoletes: PackageKit-udev-helper < %{version}-%{release}
Obsoletes: udev-packagekit < %{version}-%{release}
# No more GTK+-2 plugin
Obsoletes: PackageKit-gtk-module < %{version}-%{release}
# No more zif, smart or yum in Fedora
Obsoletes: PackageKit-smart < %{version}-%{release}
Obsoletes: PackageKit-yum < 0.9.1
Obsoletes: PackageKit-yum-plugin < 0.9.1
Obsoletes: PackageKit-zif < 0.8.13-2
# Removed in F23
Obsoletes: PackageKit-cached-metadata < 1.0.10-2
# Removed in F24
Obsoletes: PackageKit-browser-plugin < 1.0.11-3
# components now built-in
Obsoletes: PackageKit-debug-install < 0.9.1
Obsoletes: PackageKit-hawkey < 0.9.1
Obsoletes: PackageKit-backend-devel < 0.9.6
# Udev no longer provides this functionality
Obsoletes: PackageKit-device-rebind < 0.8.13-2
# remove F22
Provides: PackageKit-debug-install = %{version}-%{release}
Provides: PackageKit-device-rebind = %{version}-%{release}
Provides: PackageKit-hawkey = %{version}-%{release}
Provides: PackageKit-yum = %{version}-%{release}
Provides: PackageKit-yum-plugin = %{version}-%{release}
Provides: PackageKit-zif = %{version}-%{release}
%description
PackageKit is a D-Bus abstraction layer that allows the session user
to manage packages in a secure way using a cross-distro,
cross-architecture API.
%package glib
Summary: GLib libraries for accessing PackageKit
Requires: dbus >= 1.1.1
Requires: gobject-introspection
Obsoletes: PackageKit-libs < %{version}-%{release}
Provides: PackageKit-libs = %{version}-%{release}
%description glib
GLib libraries for accessing PackageKit.
%package cron
Summary: Cron job and related utilities for PackageKit
Requires: crontabs
Requires: %{name}%{?_isa} = %{version}-%{release}
%description cron
Crontab and utilities for running PackageKit as a cron job.
%package glib-devel
Summary: GLib Libraries and headers for PackageKit
Requires: %{name}-glib%{?_isa} = %{version}-%{release}
Requires: dbus-devel%{?_isa} >= 1.1.1
Requires: sqlite-devel%{?_isa}
Obsoletes: PackageKit-devel < %{version}-%{release}
Provides: PackageKit-devel = %{version}-%{release}
Obsoletes: PackageKit-docs < %{version}-%{release}
Provides: PackageKit-docs = %{version}-%{release}
%description glib-devel
GLib headers and libraries for PackageKit.
%package gstreamer-plugin
Summary: Install GStreamer codecs using PackageKit
Requires: %{name}-glib%{?_isa} = %{version}-%{release}
Obsoletes: codeina < 0.10.1-10
Provides: codeina = 0.10.1-10
%description gstreamer-plugin
The PackageKit GStreamer plugin allows any Gstreamer application to install
codecs from configured repositories using PackageKit.
%package gtk3-module
Summary: Install fonts automatically using PackageKit
Requires: pango
Requires: %{name}-glib%{?_isa} = %{version}-%{release}
%description gtk3-module
The PackageKit GTK3+ module allows any Pango application to install
fonts from configured repositories using PackageKit.
%package command-not-found
Summary: Ask the user to install command line programs automatically
Requires: bash
Requires: %{name} = %{version}-%{release}
Requires: %{name}-glib%{?_isa} = %{version}-%{release}
%description command-not-found
A simple helper that offers to install new packages on the command line
using PackageKit.
%prep
%autosetup -p1
%if 0%{?bundled_libdnf}
# Extract libdnf archive
tar -xf %{S:1}
%endif
%build
%if 0%{?bundled_libdnf}
mkdir -p libdnf-%{commit1}/build
pushd libdnf-%{commit1}/build
%cmake \
-DCMAKE_BUILD_TYPE=Release \
..
%make_build
popd
export DNF_CFLAGS="-I`pwd`/libdnf-%{commit1} `pkg-config --cflags appstream-glib`"
export DNF_LIBS="-L`pwd`/libdnf-%{commit1}/build/libdnf -ldnf -Wl,-rpath=%{_libdir}/PackageKit `pkg-config --libs appstream-glib`"
%endif
%configure \
--disable-static \
--enable-dnf \
--enable-introspection \
--enable-bash-completion \
--disable-local \
--disable-silent-rules
make %{?_smp_mflags} V=1
%install
make install DESTDIR=$RPM_BUILD_ROOT
%if 0%{?bundled_libdnf}
# Install libdnf to a temporary prefix
make install DESTDIR=`pwd`/libdnf-install -C libdnf-%{commit1}/build
# Cherry pick the shared library
mkdir -p $RPM_BUILD_ROOT%{_libdir}/PackageKit
cp -a libdnf-install%{_libdir}/libdnf*.so.* $RPM_BUILD_ROOT%{_libdir}/PackageKit
%endif
rm -f $RPM_BUILD_ROOT%{_libdir}/libpackagekit*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/packagekit-plugin.la
rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/modules/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/modules/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/polkit-1/extensions/libpackagekit-action-lookup.la
# Create directories for downloaded appstream data
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/app-info/{icons,xmls}
touch $RPM_BUILD_ROOT%{_localstatedir}/cache/PackageKit/groups.sqlite
# create a link that GStreamer will recognise
pushd ${RPM_BUILD_ROOT}%{_libexecdir} > /dev/null
ln -s pk-gstreamer-install gst-install-plugins-helper
popd > /dev/null
# create a link that from the comps icons to PK, as PackageKit frontends
# cannot add /usr/share/pixmaps/comps to the icon search path as some distros
# do not use comps. Patching this in the frontend is not a good idea, as there
# are multiple frontends in multiple programming languages.
pushd ${RPM_BUILD_ROOT}%{_datadir}/PackageKit > /dev/null
ln -s ../pixmaps/comps icons
popd > /dev/null
%find_lang %name
%post
# Remove leftover symlinks from /etc/systemd; the offline update service is
# instead now hooked into /usr/lib/systemd/system/system-update.target.wants
systemctl disable packagekit-offline-update.service > /dev/null 2>&1 || :
%files -f %{name}.lang
%license COPYING
%doc README AUTHORS NEWS
%dir %{_datadir}/PackageKit
%dir %{_datadir}/PackageKit/helpers
%dir %{_sysconfdir}/PackageKit
%dir %{_localstatedir}/lib/PackageKit
%dir %{_localstatedir}/cache/app-info
%dir %{_localstatedir}/cache/app-info/icons
%dir %{_localstatedir}/cache/app-info/xmls
%dir %{_localstatedir}/cache/PackageKit
%ghost %verify(not md5 size mtime) %{_localstatedir}/cache/PackageKit/groups.sqlite
%{_datadir}/bash-completion/completions/pkcon
%dir %{_libdir}/packagekit-backend
%config(noreplace) %{_sysconfdir}/PackageKit/PackageKit.conf
%config(noreplace) %{_sysconfdir}/PackageKit/Vendor.conf
%config %{_sysconfdir}/dbus-1/system.d/*
%dir %{_datadir}/PackageKit/helpers/test_spawn
%{_datadir}/PackageKit/icons
%{_datadir}/PackageKit/helpers/test_spawn/*
%{_datadir}/man/man1/pkcon.1.gz
%{_datadir}/man/man1/pkmon.1.gz
%{_datadir}/polkit-1/actions/*.policy
%{_datadir}/polkit-1/rules.d/*
%{_datadir}/PackageKit/pk-upgrade-distro.sh
%{_libexecdir}/packagekitd
%{_libexecdir}/packagekit-direct
%{_bindir}/pkmon
%{_bindir}/pkcon
%exclude %{_libdir}/libpackagekit*.so.*
%{_libdir}/packagekit-backend/libpk_backend_dummy.so
%{_libdir}/packagekit-backend/libpk_backend_test_*.so
%if 0%{?bundled_libdnf}
%{_libdir}/PackageKit/
%endif
%ghost %verify(not md5 size mtime) %{_localstatedir}/lib/PackageKit/transactions.db
%{_datadir}/dbus-1/system-services/*.service
%{_datadir}/dbus-1/interfaces/*.xml
%{_unitdir}/packagekit-offline-update.service
%{_unitdir}/packagekit.service
%{_unitdir}/system-update.target.wants/
%{_libexecdir}/pk-*offline-update
%{_libdir}/packagekit-backend/libpk_backend_dnf.so
%files glib
%{_libdir}/*packagekit-glib2.so.*
%{_libdir}/girepository-1.0/PackageKitGlib-1.0.typelib
%files cron
%config %{_sysconfdir}/cron.daily/packagekit-background.cron
%config(noreplace) %{_sysconfdir}/sysconfig/packagekit-background
%files gstreamer-plugin
%{_libexecdir}/pk-gstreamer-install
%{_libexecdir}/gst-install-plugins-helper
%files gtk3-module
%{_libdir}/gtk-2.0/modules/*.so
%{_libdir}/gtk-3.0/modules/*.so
%{_libdir}/gnome-settings-daemon-3.0/gtk-modules/*.desktop
%files command-not-found
%{_sysconfdir}/profile.d/*
%{_libexecdir}/pk-command-not-found
%config(noreplace) %{_sysconfdir}/PackageKit/CommandNotFound.conf
%files glib-devel
%{_libdir}/libpackagekit-glib2.so
%{_libdir}/pkgconfig/packagekit-glib2.pc
%dir %{_includedir}/PackageKit
%dir %{_includedir}/PackageKit/packagekit-glib2
%{_includedir}/PackageKit/packagekit-glib*/*.h
%{_datadir}/gir-1.0/PackageKitGlib-1.0.gir
%{_datadir}/gtk-doc/html/PackageKit
%{_datadir}/vala/vapi/packagekit-glib2.vapi
%changelog
* Mon Apr 24 2023 Richard Hughes <rhughes@redhat.com> - 1.1.12-7
- Backport changes for passing interactive flag to polkit calls.
- Resolves: #2177711
* Fri May 22 2020 Michael Catanzaro <mcatanzaro@redhat.com> - 1.1.12-6
- Fix documentation links in Vendor.conf
- Resolves: #1837648
* Tue May 19 2020 Michael Catanzaro <mcatanzaro@redhat.com> - 1.1.12-5
- Do not shutdown the daemon on idle
- Resolves: #1814820
* Mon Nov 25 2019 Richard Hughes <rhughes@redhat.com> - 1.1.12-4
- Do not use a bash regex to fix CNF on shells other than bash
- Resolves: #1728855
* Wed May 29 2019 Kalev Lember <klember@redhat.com> - 1.1.12-3
- Backport a patch to improve release_ver handling (#1714439)
* Tue Dec 18 2018 Kalev Lember <klember@redhat.com> - 1.1.12-2
- Invalidate the sack cache after downloading new metadata
* Wed Nov 28 2018 Kalev Lember <klember@redhat.com> - 1.1.12-1
- Update to 1.1.12
* Wed Oct 24 2018 Richard Hughes <rhughes@redhat.com> - 1.1.10-6
- Backport a patch to fix modularity.
- Resolves: #1641091
* Tue Oct 09 2018 Richard Hughes <rhughes@redhat.com> - 1.1.10-5
- Backport a patch to poke subscription manager when required
- Resolves: #1633244
* Thu Jul 12 2018 Richard Hughes <rhughes@redhat.com> - 1.1.10-4
- Enable the DNF backend
* Wed Jul 11 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.1.10-3
- Replace gnome-doc-utils with yelp-tools for the docs
* Thu Jun 14 2018 Richard Hughes <rhughes@redhat.com> - 1.1.10-2
- Don't depend on a dead package for gnome-packagekit
* Mon Apr 23 2018 Richard Hughes <rhughes@redhat.com> - 1.1.10-1
- New upstream release
- This release fixes CVE-2018-1106 which is a moderate security issue.
* Tue Mar 27 2018 Kalev Lember <klember@redhat.com> - 1.1.9-4
- Remove ldconfig scriptlets
* Thu Mar 22 2018 Kalev Lember <klember@redhat.com> - 1.1.9-3
- Create /var/cache/app-info/{icons,xmls} directories
* Mon Mar 12 2018 Kalev Lember <klember@redhat.com> - 1.1.9-2
- Don't abort on daemon startup for invalid .repo files
* Mon Mar 05 2018 Kalev Lember <klember@redhat.com> - 1.1.9-1
- Update to 1.1.9
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Tue Jan 09 2018 Kalev Lember <klember@redhat.com> - 1.1.8-1
- Update to 1.1.8
* Mon Sep 11 2017 Richard Hughes <rhughes@redhat.com> - 1.1.7-1
- New upstream release
- Add fedora-cisco-openh264 repos to supported repos list
- Add missing context pushes and pops in appstream-glib
- Add the ability to install updates on reboot in PackageKit-cron
- Effectively check for previous proxy entries
- Fix an inverted condition that led to frequent crashes
- Show a different progress message for system upgrades
* Fri Aug 11 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.1.6-7
- Rebuilt after RPM update (№ 3)
* Thu Aug 10 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.1.6-6
- Rebuilt for RPM soname bump
* Thu Aug 10 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.1.6-5
- Rebuilt for RPM soname bump
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Thu Jun 15 2017 Richard Hughes <rhughes@redhat.com> - 1.1.6-2
- Fix a crash when refreshing the metadata cache
- Resolves: #1460825
* Wed Jun 07 2017 Richard Hughes <rhughes@redhat.com> - 1.1.6-1
- New upstream release
- Ensure AppStream is deployed when the repo is updated
* Fri Mar 24 2017 Kalev Lember <klember@redhat.com> - 1.1.5-4
- Fix the offline updater to work with latest systemd (#1430920)
* Fri Mar 17 2017 Kalev Lember <klember@redhat.com> - 1.1.5-3
- Build with system libdnf
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Jan 17 2017 Kalev Lember <klember@redhat.com> - 1.1.5-1
- Update to 1.1.5
- Update to latest libdnf git snapshot (#1398429)
* Wed Dec 21 2016 Kalev Lember <klember@redhat.com> - 1.1.5-0.1.20161221
- Update to latest git snapshot
* Mon Dec 19 2016 Kalev Lember <klember@redhat.com> - 1.1.4-3
- Adapt for libhif->libdnf git repo rename
* Fri Dec 16 2016 Kalev Lember <klember@redhat.com> - 1.1.4-2
- Update to latest libdnf git snapshot (#1383819)
* Mon Sep 19 2016 Richard Hughes <rhughes@redhat.com> - 1.1.4-1
- New upstream release
- Change the configuration of the cron script to a sysconfig-like config
- Don't crash when emitting PropertiesChanged for NULL values
- Fix several small memory leaks
- Look for command-not-found dbus socket in /run instead of /var/run
- Use GetFilesLocal in pkcon get-files if argument is a file
* Thu Sep 08 2016 Kalev Lember <klember@redhat.com> - 1.1.4-0.4.20160901
- Update to latest libdnf git snapshot (#1344643)
* Thu Sep 01 2016 Kalev Lember <klember@redhat.com> - 1.1.4-0.3.20160901
- Update to latest git snapshot
* Wed Aug 31 2016 Kalev Lember <klember@redhat.com> - 1.1.4-0.2.20160825
- Update to latest git snapshot
* Fri Aug 05 2016 Kalev Lember <klember@redhat.com> - 1.1.4-0.1.20160805
- Update to today's git snapshot
- Switch to new libdnf based backend
* Wed Jul 27 2016 Kalev Lember <klember@redhat.com> - 1.1.3-2
- engine: Don't crash when emitting PropertiesChanged for NULL values
(#1359479)
* Thu Jul 14 2016 Kalev Lember <klember@redhat.com> - 1.1.3-1
- Update to 1.1.3
* Tue Jul 12 2016 Kalev Lember <klember@redhat.com> - 1.1.2-1
- Update to 1.1.2
- Set minimum required glib2 and libhif versions
* Tue Jun 07 2016 Kalev Lember <klember@redhat.com> - 1.1.1-3
- Match unavailable packages for the what-provides query
* Sat May 28 2016 Kalev Lember <klember@redhat.com> - 1.1.1-2
- Require admin authorisation to trigger a distro upgrade (#1335458)
* Wed Apr 20 2016 Richard Hughes <rhughes@redhat.com> - 1.1.1-1
- New upstream release
- Add TriggerUpgrade DBus method handling
- Emit UpdatesChanges when installing packages
- Fix GIR annotations for progress callbacks
- Increase the number of packages that can be resolved
- Point offline update/upgrade trigger to the prepared update
- Set ALLOW_DOWNGRADE flag for all transactions
* Fri Feb 12 2016 Richard Hughes <rhughes@redhat.com> - 1.1.0-1
- New upstream release
- Add support for UpgradeSystem
- Correctly store file descriptor from logind
- Do not crash on GetPrepared when there are no offline updates
- Do not crash on transaction database corruption
- Do not crash when parsing a very broken transaction log
- Port to g_autoptr()
- Relax validation performed on input strings passed to backends
- Remove the PackageKit browser plugin
- Use the GLib network monitoring support
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Nov 27 2015 Richard Hughes <rhughes@redhat.com> - 1.0.11-1
- Add support for HTTP proxy
- Allow the use of variadic functions in vala
- By popular demand, reintroduce the UpgradeSystem method
- Improve RefreshCache progress updates
- New upstream release
* Mon Oct 19 2015 Kalev Lember <klember@redhat.com> - 1.0.10-2
- Remove PackageKit-cached-metadata subpackage
* Mon Sep 21 2015 Richard Hughes <rhughes@redhat.com> - 1.0.10-1
- Update to 1.0.10 to fix a couple of bugs in the offline updater
* Tue Sep 15 2015 Richard Hughes <rhughes@redhat.com> - 1.0.9-1
- New upstream release
- Check the offline action trigger before performing the update
- Fix a race with the backend job thread creation
* Sat Sep 05 2015 Kalev Lember <klember@redhat.com> - 1.0.8-3
- Rebuilt for librpm soname bump
* Thu Aug 20 2015 Kalev Lember <klember@redhat.com> - 1.0.8-2
- Revert "Correctly register enum properties" as this broke offline updates
* Wed Aug 19 2015 Richard Hughes <rhughes@redhat.com> - 1.0.8-1
- New upstream release
- Exit quietly if we didn't prepare the offline update
- Record the UID of the session user in the yumdb
* Fri Aug 14 2015 Kalev Lember <klember@redhat.com> - 1.0.7-3
- Rebuild for new libappstream-glib
* Sun Jul 26 2015 Kevin Fenzi <kevin@scrye.com> 1.0.7-2
- Rebuild for new librpm
* Mon Jul 13 2015 Richard Hughes <rhughes@redhat.com> - 1.0.7-1
- New upstream release
- Correct punctuation while applying offline updates
- Define command_not_found_handler for zsh
- Port GTK+ module to org.freedesktop.PackageKit.Modify2
- Return the correct return codes for syntax errors
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Jun 08 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.6-6
- Actually apply the patches
* Mon Jun 08 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.6-5
- Backport a few more upstream patches:
- Add missing locking when accessing sack cache (#1146734)
- Improve parallel kernel installation (#1205649)
* Wed May 20 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.6-4
- Update cached metadata in preparation for F22 release
* Fri May 15 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.6-3
- Revert a commit that inadvertantly changed the default value for the
TriggerAction DBus property
* Mon May 11 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.6-2
- Update cached metadata
* Tue Apr 07 2015 Richard Hughes <rhughes@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@gmail.com> - 1.0.5-2
- Backport a crash fix from upstream (#1185544)
- Update cached metadata
- Use license macro for the COPYING file
* Sat Feb 21 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.5-1
- Update to 1.0.5
- Backport new missing gstreamer codecs API
* Fri Feb 06 2015 Richard Hughes <rhughes@redhat.com> - 1.0.4-2
- Adapt to the new hawkey API.
* Mon Jan 19 2015 Richard Hughes <rhughes@redhat.com> - 1.0.4-1
- New upstream release
- Actually inhibit logind when the transaction can't be cancelled
- Add 'quit' command to pkcon
- Automatically import metadata public keys when safe to do so
- Automatically install AppStream metadata
- Do not attempt to run command-not-found for anything prefixed with '.'
- Don't use PkBackendSpawn helpers in compiled backends
- Fix a hard-to-debug crash when cancelling a task that has never been run
- Look for unavailable packages during resolve
- Make pk_backend_job_call_vfunc() threadsafe
- Make pk_backend_repo_list_changed() threadsafe
- Return 'unavailable' packages for metadata-only repos
- Use a thread-local HifTransaction to avoid db3 index corruption
* Mon Nov 17 2014 Kalev Lember <kalevlember@gmail.com> - 1.0.3-2
- Update cached metadata in preparation for F21 release
* Mon Nov 10 2014 Richard Hughes <rhughes@redhat.com> - 1.0.3-1
- New upstream release
- Add support for reinstallation and downgrades
- Be smarter when using the vendor cache
* Tue Oct 21 2014 Richard Hughes <rhughes@redhat.com> - 1.0.1-1
- New upstream release
- Add a KeepCache config parameter
- Do not install the python helpers
- Invalidate offline updates when the rpmdb changes
- Never allow cancelling a transaction twice
* Wed Oct 15 2014 Kalev Lember <kalevlember@gmail.com> - 1.0.1-0.1.20141015
- Update to today's git snapshot
* Tue Sep 16 2014 Richard Hughes <rhughes@redhat.com> - 1.0.0-2
- Add a new subpackage designed for the workstation spin.
- See http://blogs.gnome.org/hughsie/2014/08/29/ for details.
* Fri Sep 12 2014 Richard Hughes <rhughes@redhat.com> - 1.0.0-1
- New upstream release
- Add a D-Bus interface and helpers for offline support
- Do not shutdown the daemon on idle by default
- Refresh the NetworkManager state when the daemon starts
- Remove pk-debuginfo-install
- Remove the events/pre-transaction.d functionality
- Remove the pkexec systemd helpers
- Remove the plugin interface
- Remove various options from the config file

View File

@ -0,0 +1,35 @@
From d8f84f7e0a017e0b4df1e08a2a6be832c9fb3611 Mon Sep 17 00:00:00 2001
From: Matthias Klumpp <matthias@tenstral.net>
Date: Tue, 21 May 2024 02:33:55 +0200
Subject: [PATCH] metainfo: Mark PK as compulsory for most desktops
Ideally, AppStream needs a way to just mark a component as critical for
the system to function and prevent its removal. But this is okay as a
temporary fix.
Resolves: #759
---
data/org.freedesktop.packagekit.metainfo.xml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/data/org.freedesktop.packagekit.metainfo.xml b/data/org.freedesktop.packagekit.metainfo.xml
index 13b7a316d..ce47582a8 100644
--- a/data/org.freedesktop.packagekit.metainfo.xml
+++ b/data/org.freedesktop.packagekit.metainfo.xml
@@ -27,6 +27,16 @@
<url type="homepage">https://www.freedesktop.org/software/PackageKit</url>
<launchable type="service">packagekit.service</launchable>
+
+ <compulsory_for_desktop>Cinnamon</compulsory_for_desktop>
+ <compulsory_for_desktop>GNOME</compulsory_for_desktop>
+ <compulsory_for_desktop>KDE</compulsory_for_desktop>
+ <compulsory_for_desktop>LXQt</compulsory_for_desktop>
+ <compulsory_for_desktop>MATE</compulsory_for_desktop>
+ <compulsory_for_desktop>Pantheon</compulsory_for_desktop>
+ <compulsory_for_desktop>Unity</compulsory_for_desktop>
+ <compulsory_for_desktop>XFCE</compulsory_for_desktop>
+
<categories>
<category>System</category>
</categories>

430
changelog Normal file
View File

@ -0,0 +1,430 @@
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Feb 17 2022 Richard Hughes <rhughes@redhat.com> - 1.2.5-1
- New upstream release
- Properly handle allow-reinstall flag for installations
- Provide better error message if trying to install an installed package
- Searches by name and package details should be case insensitive
- Update appstream xml files if dnf_sack_add_repos() does the download
- Wait until online to activate systemd service
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Oct 27 2021 Rex Dieter <rdieter@fedoraproject.org> - 1.2.4-3
- own /var/cache/PackageKit (#2016636)
* Fri Sep 10 2021 Adam Williamson <awilliam@redhat.com> - 1.2.4-2
- Backport PR #505 to fix offline upgrading (#2002609)
* Fri Jul 30 2021 Richard Hughes <rhughes@redhat.com> - 1.2.4-1
- New upstream release
- Add specific error code when user declined interaction
- Avoid spurious GObject::notify signal emissions
- Fix a leak on calling set_locale() a second time
- Fix a possible use-after-free under pk_client_cancel_cb()
- Honor install_weak_deps=False
- Improve thread safety on an operation cancellation
- Let the finish understand the 'cancelled' exit code
- Only set polkit interactive flag if method call has too
- Read update information also when getting list of updates
- Use 'hy_query_get_advisory_pkgs', if available
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jul 15 2021 Michael Catanzaro <mcatanzaro@redhat.com> - 1.2.3-2
- Add package-remove-password-prompt.patch for fedora-workstation#233
* Mon Mar 22 2021 Richard Hughes <rhughes@redhat.com> - 1.2.3-1
- New upstream release
- Add support for coercing upgrade to distupgrade
- Append to cron log instead of overwriting it
- Cancel a transaction if calling Cancel fails or the daemon disappears
- Remove large transaction size sanity check
* Mon Mar 08 2021 Richard Hughes <rhughes@redhat.com> - 1.2.2-5
- Drop unused gnome-doc-utils BR
* Tue Feb 09 2021 Kalev Lember <klember@redhat.com> - 1.2.2-4
- Fix multilib conflicts in generated pk-enum-types.h (#1915259)
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Nov 9 2020 Vít Ondruch <vondruch@redhat.com> - 1.2.2-2
- Fix crash on login.
Resolves: rhbz#1836304
* Mon Nov 02 2020 Richard Hughes <rhughes@redhat.com> - 1.2.2-1
- New upstream release
- Notify systemd when beginning to shutdown
- Fix possible information disclosure
* Mon Sep 07 2020 Richard Hughes <rhughes@redhat.com> - 1.2.1-1
- New upstream release
- Actually merge in the PolicyKit translation
- Exit pkcon with retval 5 if no packages needed be installed
- Fix command-not-found handling arguments with spaces
- Fix setting libexecdir for command-not-found helper
- Use SQL statements for queries with input
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri May 08 2020 Adam Williamson <awilliam@redhat.com> - 1.2.0-3
- Fix packagekit-offline-update.service not being enabled (#1833176)
* Tue May 05 2020 Neal Gompa <ngompa13@gmail.com> - 1.2.0-2
- Clean up and simplify spec
- Fix packaging to work properly with EL8+
* Mon May 04 2020 Richard Hughes <rhughes@redhat.com> - 1.2.0-1
- New upstream release
- Do not do failable actions in constructors
- Load all the repos and vars directories
- Port to the meson build system
- Remove the GTK2 gtk-module support
- Revert "Shutdown the daemon on idle by default"
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jan 08 2020 Richard Hughes <rhughes@redhat.com> - 1.1.13-1
- New upstream release
- Don't use a bash regex to fix command not found on other shells
- Keep a ref on transaction while doing async polkit call
- Properly mark obsoleted packages when simulating upgrade
- Return directly when its state is going backwards
- Shrink the progress bar to fit when run in small spaces
- Support non-x86 arches in gstreamer helper
- zsh command not found should return the same as its bash equivalent
* Tue Aug 13 2019 Richard Hughes <rhughes@redhat.com> - 1.1.12-12
- Fix rpmdb permission of transaction database file
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.12-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Jul 19 2019 Richard Hughes <rhughes@redhat.com> - 1.1.12-10
- Do not trigger an inotity event when the AppStream XML data is unchanged
- Remove the unconditional copy to speed up gnome-software startup.
* Fri Jul 12 2019 Kalev Lember <klember@redhat.com> - 1.1.12-9
- Drop unused comps-extras requires
* Wed Jun 19 2019 Kalev Lember <klember@redhat.com> - 1.1.12-8
- Don't override DnfContext's release_ver for the running system
* Mon Jun 10 22:13:21 CET 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.1.12-7
- Rebuild for RPM 4.15
* Mon Jun 10 15:42:04 CET 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.1.12-6
- Rebuild for RPM 4.15
* Mon Mar 04 2019 Kalev Lember <klember@redhat.com> - 1.1.12-5
- Use new plymouth "system-upgrade" and "reboot" modes
* Mon Feb 04 2019 Kalev Lember <klember@redhat.com> - 1.1.12-4
- Update BRs for vala packaging changes
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Dec 18 2018 Kalev Lember <klember@redhat.com> - 1.1.12-2
- Invalidate the sack cache after downloading new metadata (#1642878)
* Wed Nov 28 2018 Kalev Lember <klember@redhat.com> - 1.1.12-1
- Update to 1.1.12
* Tue Sep 25 2018 Richard Hughes <rhughes@redhat.com> - 1.1.11-1
- New upstream release
- Add --autoremove option to pkcon
- De-register callbacks on PkClientHelper finalize
- Don't complain if command-not-found get uninstalled while running
- Never assert when an interactive TTY is not available
- Shut down services cleanly before rebooting after offline updates
- Shutdown the daemon on idle by default
* Sat Sep 22 2018 Adam Williamson <awilliam@redhat.com> - 1.1.10-5
- Backport several more fixes from master for libdnf compat
* Tue Jul 24 2018 Stephen Gallagher <sgallagh@redhat.com> - 1.1.10-4
- Add patch to support modularity
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 26 2018 Adam Williamson <awilliam@redhat.com> - 1.1.10-2
- Rebuild for new libdnf
* Mon Apr 23 2018 Richard Hughes <rhughes@redhat.com> - 1.1.10-1
- New upstream release
- This release fixes CVE-2018-1106 which is a moderate security issue.
* Tue Mar 27 2018 Kalev Lember <klember@redhat.com> - 1.1.9-4
- Remove ldconfig scriptlets
* Thu Mar 22 2018 Kalev Lember <klember@redhat.com> - 1.1.9-3
- Create /var/cache/app-info/{icons,xmls} directories
* Mon Mar 12 2018 Kalev Lember <klember@redhat.com> - 1.1.9-2
- Don't abort on daemon startup for invalid .repo files
* Mon Mar 05 2018 Kalev Lember <klember@redhat.com> - 1.1.9-1
- Update to 1.1.9
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Tue Jan 09 2018 Kalev Lember <klember@redhat.com> - 1.1.8-1
- Update to 1.1.8
* Mon Sep 11 2017 Richard Hughes <rhughes@redhat.com> - 1.1.7-1
- New upstream release
- Add fedora-cisco-openh264 repos to supported repos list
- Add missing context pushes and pops in appstream-glib
- Add the ability to install updates on reboot in PackageKit-cron
- Effectively check for previous proxy entries
- Fix an inverted condition that led to frequent crashes
- Show a different progress message for system upgrades
* Fri Aug 11 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.1.6-7
- Rebuilt after RPM update (№ 3)
* Thu Aug 10 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.1.6-6
- Rebuilt for RPM soname bump
* Thu Aug 10 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.1.6-5
- Rebuilt for RPM soname bump
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Thu Jun 15 2017 Richard Hughes <rhughes@redhat.com> - 1.1.6-2
- Fix a crash when refreshing the metadata cache
- Resolves: #1460825
* Wed Jun 07 2017 Richard Hughes <rhughes@redhat.com> - 1.1.6-1
- New upstream release
- Ensure AppStream is deployed when the repo is updated
* Fri Mar 24 2017 Kalev Lember <klember@redhat.com> - 1.1.5-4
- Fix the offline updater to work with latest systemd (#1430920)
* Fri Mar 17 2017 Kalev Lember <klember@redhat.com> - 1.1.5-3
- Build with system libdnf
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Jan 17 2017 Kalev Lember <klember@redhat.com> - 1.1.5-1
- Update to 1.1.5
- Update to latest libdnf git snapshot (#1398429)
* Wed Dec 21 2016 Kalev Lember <klember@redhat.com> - 1.1.5-0.1.20161221
- Update to latest git snapshot
* Mon Dec 19 2016 Kalev Lember <klember@redhat.com> - 1.1.4-3
- Adapt for libhif->libdnf git repo rename
* Fri Dec 16 2016 Kalev Lember <klember@redhat.com> - 1.1.4-2
- Update to latest libdnf git snapshot (#1383819)
* Mon Sep 19 2016 Richard Hughes <rhughes@redhat.com> - 1.1.4-1
- New upstream release
- Change the configuration of the cron script to a sysconfig-like config
- Don't crash when emitting PropertiesChanged for NULL values
- Fix several small memory leaks
- Look for command-not-found dbus socket in /run instead of /var/run
- Use GetFilesLocal in pkcon get-files if argument is a file
* Thu Sep 08 2016 Kalev Lember <klember@redhat.com> - 1.1.4-0.4.20160901
- Update to latest libdnf git snapshot (#1344643)
* Thu Sep 01 2016 Kalev Lember <klember@redhat.com> - 1.1.4-0.3.20160901
- Update to latest git snapshot
* Wed Aug 31 2016 Kalev Lember <klember@redhat.com> - 1.1.4-0.2.20160825
- Update to latest git snapshot
* Fri Aug 05 2016 Kalev Lember <klember@redhat.com> - 1.1.4-0.1.20160805
- Update to today's git snapshot
- Switch to new libdnf based backend
* Wed Jul 27 2016 Kalev Lember <klember@redhat.com> - 1.1.3-2
- engine: Don't crash when emitting PropertiesChanged for NULL values
(#1359479)
* Thu Jul 14 2016 Kalev Lember <klember@redhat.com> - 1.1.3-1
- Update to 1.1.3
* Tue Jul 12 2016 Kalev Lember <klember@redhat.com> - 1.1.2-1
- Update to 1.1.2
- Set minimum required glib2 and libhif versions
* Tue Jun 07 2016 Kalev Lember <klember@redhat.com> - 1.1.1-3
- Match unavailable packages for the what-provides query
* Sat May 28 2016 Kalev Lember <klember@redhat.com> - 1.1.1-2
- Require admin authorisation to trigger a distro upgrade (#1335458)
* Wed Apr 20 2016 Richard Hughes <rhughes@redhat.com> - 1.1.1-1
- New upstream release
- Add TriggerUpgrade DBus method handling
- Emit UpdatesChanges when installing packages
- Fix GIR annotations for progress callbacks
- Increase the number of packages that can be resolved
- Point offline update/upgrade trigger to the prepared update
- Set ALLOW_DOWNGRADE flag for all transactions
* Fri Feb 12 2016 Richard Hughes <rhughes@redhat.com> - 1.1.0-1
- New upstream release
- Add support for UpgradeSystem
- Correctly store file descriptor from logind
- Do not crash on GetPrepared when there are no offline updates
- Do not crash on transaction database corruption
- Do not crash when parsing a very broken transaction log
- Port to g_autoptr()
- Relax validation performed on input strings passed to backends
- Remove the PackageKit browser plugin
- Use the GLib network monitoring support
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Nov 27 2015 Richard Hughes <rhughes@redhat.com> - 1.0.11-1
- Add support for HTTP proxy
- Allow the use of variadic functions in vala
- By popular demand, reintroduce the UpgradeSystem method
- Improve RefreshCache progress updates
- New upstream release
* Mon Oct 19 2015 Kalev Lember <klember@redhat.com> - 1.0.10-2
- Remove PackageKit-cached-metadata subpackage
* Mon Sep 21 2015 Richard Hughes <rhughes@redhat.com> - 1.0.10-1
- Update to 1.0.10 to fix a couple of bugs in the offline updater
* Tue Sep 15 2015 Richard Hughes <rhughes@redhat.com> - 1.0.9-1
- New upstream release
- Check the offline action trigger before performing the update
- Fix a race with the backend job thread creation
* Sat Sep 05 2015 Kalev Lember <klember@redhat.com> - 1.0.8-3
- Rebuilt for librpm soname bump
* Thu Aug 20 2015 Kalev Lember <klember@redhat.com> - 1.0.8-2
- Revert "Correctly register enum properties" as this broke offline updates
* Wed Aug 19 2015 Richard Hughes <rhughes@redhat.com> - 1.0.8-1
- New upstream release
- Exit quietly if we didn't prepare the offline update
- Record the UID of the session user in the yumdb
* Fri Aug 14 2015 Kalev Lember <klember@redhat.com> - 1.0.7-3
- Rebuild for new libappstream-glib
* Sun Jul 26 2015 Kevin Fenzi <kevin@scrye.com> 1.0.7-2
- Rebuild for new librpm
* Mon Jul 13 2015 Richard Hughes <rhughes@redhat.com> - 1.0.7-1
- New upstream release
- Correct punctuation while applying offline updates
- Define command_not_found_handler for zsh
- Port GTK+ module to org.freedesktop.PackageKit.Modify2
- Return the correct return codes for syntax errors
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Jun 08 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.6-6
- Actually apply the patches
* Mon Jun 08 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.6-5
- Backport a few more upstream patches:
- Add missing locking when accessing sack cache (#1146734)
- Improve parallel kernel installation (#1205649)
* Wed May 20 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.6-4
- Update cached metadata in preparation for F22 release
* Fri May 15 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.6-3
- Revert a commit that inadvertantly changed the default value for the
TriggerAction DBus property
* Mon May 11 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.6-2
- Update cached metadata
* Tue Apr 07 2015 Richard Hughes <rhughes@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@gmail.com> - 1.0.5-2
- Backport a crash fix from upstream (#1185544)
- Update cached metadata
- Use license macro for the COPYING file
* Sat Feb 21 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.5-1
- Update to 1.0.5
- Backport new missing gstreamer codecs API
* Fri Feb 06 2015 Richard Hughes <rhughes@redhat.com> - 1.0.4-2
- Adapt to the new hawkey API.
* Mon Jan 19 2015 Richard Hughes <rhughes@redhat.com> - 1.0.4-1
- New upstream release
- Actually inhibit logind when the transaction can't be cancelled
- Add 'quit' command to pkcon
- Automatically import metadata public keys when safe to do so
- Automatically install AppStream metadata
- Do not attempt to run command-not-found for anything prefixed with '.'
- Don't use PkBackendSpawn helpers in compiled backends
- Fix a hard-to-debug crash when cancelling a task that has never been run
- Look for unavailable packages during resolve
- Make pk_backend_job_call_vfunc() threadsafe
- Make pk_backend_repo_list_changed() threadsafe
- Return 'unavailable' packages for metadata-only repos
- Use a thread-local HifTransaction to avoid db3 index corruption
* Mon Nov 17 2014 Kalev Lember <kalevlember@gmail.com> - 1.0.3-2
- Update cached metadata in preparation for F21 release
* Mon Nov 10 2014 Richard Hughes <rhughes@redhat.com> - 1.0.3-1
- New upstream release
- Add support for reinstallation and downgrades
- Be smarter when using the vendor cache
* Tue Oct 21 2014 Richard Hughes <rhughes@redhat.com> - 1.0.1-1
- New upstream release
- Add a KeepCache config parameter
- Do not install the python helpers
- Invalidate offline updates when the rpmdb changes
- Never allow cancelling a transaction twice
* Wed Oct 15 2014 Kalev Lember <kalevlember@gmail.com> - 1.0.1-0.1.20141015
- Update to today's git snapshot
* Tue Sep 16 2014 Richard Hughes <rhughes@redhat.com> - 1.0.0-2
- Add a new subpackage designed for the workstation spin.
- See http://blogs.gnome.org/hughsie/2014/08/29/ for details.
* Fri Sep 12 2014 Richard Hughes <rhughes@redhat.com> - 1.0.0-1
- New upstream release
- Add a D-Bus interface and helpers for offline support
- Do not shutdown the daemon on idle by default
- Refresh the NetworkManager state when the daemon starts
- Remove pk-debuginfo-install
- Remove the events/pre-transaction.d functionality
- Remove the pkexec systemd helpers
- Remove the plugin interface
- Remove various options from the config file

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional}

View File

@ -0,0 +1,32 @@
From 8914e11968a934faa651311fd98a98a3a19218ae Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@gnome.org>
Date: Wed, 3 Jun 2020 10:45:12 -0500
Subject: [PATCH] Allow admin users to remove packages without password prompt
A local, active admin user can install packages without a password
prompt, but has to enter the admin password to remove packages. This
doesn't make much sense. It should be parallel.
Note that this change has no effect on what users are able to do,
because it only applies to admin users. The password only protects
against unlocked workstation attackers, where an attacker gains physical
access to an unlocked desktop. It's pretty weird to prevent such an
attacker from removing software, but allow installing new stuff.
https://pagure.io/fedora-workstation/issue/233
---
policy/org.freedesktop.packagekit.rules | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/policy/org.freedesktop.packagekit.rules b/policy/org.freedesktop.packagekit.rules
index 6a1c8a701..95d21925f 100644
--- a/policy/org.freedesktop.packagekit.rules
+++ b/policy/org.freedesktop.packagekit.rules
@@ -1,5 +1,6 @@
polkit.addRule(function(action, subject) {
- if (action.id == "org.freedesktop.packagekit.package-install" &&
+ if ((action.id == "org.freedesktop.packagekit.package-install" ||
+ action.id == "org.freedesktop.packagekit.package-remove") &&
subject.active == true && subject.local == true &&
subject.isInGroup("wheel")) {
return polkit.Result.YES;

460
runtime-warnings.patch Normal file
View File

@ -0,0 +1,460 @@
From 671ef87143c0a68e5f11cfbd0c305caaebecc204 Mon Sep 17 00:00:00 2001
From: sid <sidtosh4@gmail.com>
Date: Fri, 10 May 2024 21:46:54 +0100
Subject: [PATCH] pkcon: Use appropriate callbacks for client / task async
calls
Fixes: #747
---
client/pk-console.c | 112 ++++++++++++++++++++++++++------------------
1 file changed, 66 insertions(+), 46 deletions(-)
diff --git a/client/pk-console.c b/client/pk-console.c
index 056e37e65..ad42c3b49 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -637,7 +637,7 @@ pk_console_progress_cb (PkProgress *progress, PkProgressType type, gpointer data
}
static void
-pk_console_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
+pk_console_process_results (PkResults *results, PkConsoleCtx *ctx, const GError *finish_error)
{
const gchar *filename;
gboolean ret;
@@ -645,11 +645,8 @@ pk_console_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
PkPackageSack *sack;
PkRestartEnum restart;
PkRoleEnum role;
- PkConsoleCtx *ctx = (PkConsoleCtx *) data;
- g_autoptr(GError) error = NULL;
g_autoptr(GFile) file = NULL;
g_autoptr(PkError) error_code = NULL;
- g_autoptr(PkResults) results = NULL;
/* no more progress */
if (ctx->is_console) {
@@ -659,13 +656,11 @@ pk_console_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
g_print ("%s\n", _("Results:"));
}
- /* get the results */
- results = pk_task_generic_finish (PK_TASK (ctx->task), res, &error);
if (results == NULL) {
/* TRANSLATORS: we failed to get any results, which is pretty
* fatal in my book */
- g_print ("%s: %s\n", _("Fatal error"), error->message);
- switch (error->code - 0xff) {
+ g_print ("%s: %s\n", _("Fatal error"), finish_error->message);
+ switch (finish_error->code - 0xff) {
case PK_ERROR_ENUM_ALL_PACKAGES_ALREADY_INSTALLED:
case PK_ERROR_ENUM_REPO_NOT_AVAILABLE:
ctx->retval = PK_EXIT_CODE_NOTHING_USEFUL;
@@ -821,6 +816,7 @@ pk_console_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
/* write the sack to disk */
if (role == PK_ROLE_ENUM_GET_PACKAGES && filename != NULL) {
+ g_autoptr(GError) error = NULL;
file = g_file_new_for_path (filename);
ret = pk_package_sack_to_file (sack, file, &error);
if (!ret) {
@@ -833,6 +829,30 @@ pk_console_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
g_main_loop_quit (ctx->loop);
}
+static void
+pk_console_client_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
+{
+ g_autoptr(GError) error = NULL;
+ g_autoptr(PkResults) results = NULL;
+ PkConsoleCtx *ctx = (PkConsoleCtx *) data;
+
+ results = pk_client_generic_finish (PK_CLIENT (ctx->task), res, &error);
+
+ pk_console_process_results (results, ctx, error);
+}
+
+static void
+pk_console_task_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
+{
+ g_autoptr(GError) error = NULL;
+ g_autoptr(PkResults) results = NULL;
+ PkConsoleCtx *ctx = (PkConsoleCtx *) data;
+
+ results = pk_task_generic_finish (PK_TASK (ctx->task), res, &error);
+
+ pk_console_process_results (results, ctx, error);
+}
+
static gchar *
pk_console_resolve_package (PkConsoleCtx *ctx, const gchar *package_name, GError **error)
{
@@ -1057,7 +1077,7 @@ pk_console_install_packages (PkConsoleCtx *ctx, gchar **packages, GError **error
pk_task_install_packages_async (PK_TASK (ctx->task),
package_ids, ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
return TRUE;
}
@@ -1086,7 +1106,7 @@ pk_console_remove_packages (PkConsoleCtx *ctx, gchar **packages, gboolean autore
TRUE, autoremove,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
return TRUE;
}
@@ -1115,7 +1135,7 @@ pk_console_download_packages (PkConsoleCtx *ctx, gchar **packages, const gchar *
directory,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
return TRUE;
}
@@ -1145,7 +1165,7 @@ pk_console_update_packages (PkConsoleCtx *ctx, gchar **packages, GError **error)
package_ids,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
return TRUE;
}
@@ -1188,7 +1208,7 @@ pk_console_update_system (PkConsoleCtx *ctx, GError **error)
package_ids,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
return TRUE;
}
@@ -1200,7 +1220,7 @@ pk_console_upgrade_system (PkConsoleCtx *ctx, const gchar *distro_id, const gcha
pk_upgrade_kind_enum_from_string (upgrade_kind),
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
return TRUE;
}
@@ -1230,7 +1250,7 @@ pk_console_required_by (PkConsoleCtx *ctx, gchar **packages, GError **error)
TRUE,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
return TRUE;
}
@@ -1259,7 +1279,7 @@ pk_console_depends_on (PkConsoleCtx *ctx, gchar **packages, GError **error)
FALSE,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
return TRUE;
}
@@ -1275,7 +1295,7 @@ pk_console_get_details (PkConsoleCtx *ctx, gchar **packages, GError **error)
packages,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_client_finished_cb, ctx);
return TRUE;
}
@@ -1296,7 +1316,7 @@ pk_console_get_details (PkConsoleCtx *ctx, gchar **packages, GError **error)
package_ids,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
return TRUE;
}
@@ -1307,7 +1327,7 @@ pk_console_get_details_local (PkConsoleCtx *ctx, gchar **files, GError **error)
files,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_client_finished_cb, ctx);
return TRUE;
}
@@ -1318,7 +1338,7 @@ pk_console_get_files_local (PkConsoleCtx *ctx, gchar **files, GError **error)
files,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_client_finished_cb, ctx);
return TRUE;
}
@@ -1334,7 +1354,7 @@ pk_console_get_files (PkConsoleCtx *ctx, gchar **packages, GError **error)
packages,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_client_finished_cb, ctx);
return TRUE;
}
@@ -1355,7 +1375,7 @@ pk_console_get_files (PkConsoleCtx *ctx, gchar **packages, GError **error)
package_ids,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
return TRUE;
}
@@ -1383,7 +1403,7 @@ pk_console_get_update_detail (PkConsoleCtx *ctx, gchar **packages, GError **erro
package_ids,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
return TRUE;
}
@@ -1830,7 +1850,7 @@ main (int argc, char *argv[])
argv + 3,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else if (strcmp (value, "details") == 0) {
if (details == NULL) {
@@ -1847,7 +1867,7 @@ main (int argc, char *argv[])
argv + 3,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else if (strcmp (value, "group") == 0) {
if (details == NULL) {
@@ -1864,7 +1884,7 @@ main (int argc, char *argv[])
argv + 3,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else if (strcmp (value, "file") == 0) {
if (details == NULL) {
@@ -1881,7 +1901,7 @@ main (int argc, char *argv[])
argv + 3,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else {
/* fallback to a generic search */
pk_task_search_details_async (PK_TASK (ctx->task),
@@ -1889,7 +1909,7 @@ main (int argc, char *argv[])
argv + 2,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
}
} else if (strcmp (mode, "install") == 0) {
@@ -1920,7 +1940,7 @@ main (int argc, char *argv[])
argv + 2,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else if (strcmp (mode, "install-sig") == 0) {
if (value == NULL || details == NULL || parameter == NULL) {
@@ -1938,7 +1958,7 @@ main (int argc, char *argv[])
parameter,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_client_finished_cb, ctx);
} else if (strcmp (mode, "remove") == 0) {
if (value == NULL) {
@@ -1992,7 +2012,7 @@ main (int argc, char *argv[])
value,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_client_finished_cb, ctx);
} else if (strcmp (mode, "update") == 0) {
if (value == NULL) {
@@ -2019,7 +2039,7 @@ main (int argc, char *argv[])
argv + 2,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else if (strcmp (mode, "repo-enable") == 0) {
if (value == NULL) {
@@ -2036,7 +2056,7 @@ main (int argc, char *argv[])
TRUE,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else if (strcmp (mode, "repo-disable") == 0) {
if (value == NULL) {
@@ -2053,7 +2073,7 @@ main (int argc, char *argv[])
FALSE,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else if (strcmp (mode, "repo-set-data") == 0) {
if (value == NULL || details == NULL || parameter == NULL) {
@@ -2070,7 +2090,7 @@ main (int argc, char *argv[])
parameter,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_client_finished_cb, ctx);
} else if (strcmp (mode, "repo-remove") == 0) {
if (value == NULL || details == NULL) {
@@ -2088,14 +2108,14 @@ main (int argc, char *argv[])
atoi (details),
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_client_finished_cb, ctx);
} else if (strcmp (mode, "repo-list") == 0) {
pk_task_get_repo_list_async (PK_TASK (ctx->task),
ctx->filters,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else if (strcmp (mode, "get-time") == 0) {
PkRoleEnum role;
@@ -2144,7 +2164,7 @@ main (int argc, char *argv[])
pk_client_get_distro_upgrades_async (PK_CLIENT (ctx->task),
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_client_finished_cb, ctx);
} else if (strcmp (mode, "get-update-detail") == 0) {
if (value == NULL) {
@@ -2186,7 +2206,7 @@ main (int argc, char *argv[])
argv + 2,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else if (strcmp (mode, "get-details") == 0) {
if (value == NULL) {
@@ -2237,20 +2257,20 @@ main (int argc, char *argv[])
ctx->filters,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else if (strcmp (mode, "get-categories") == 0) {
pk_task_get_categories_async (PK_TASK (ctx->task),
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else if (strcmp (mode, "get-packages") == 0) {
pk_task_get_packages_async (PK_TASK (ctx->task),
ctx->filters,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else if (strcmp (mode, "upgrade-system") == 0) {
/* do the system upgrade */
@@ -2341,7 +2361,7 @@ main (int argc, char *argv[])
10,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_client_finished_cb, ctx);
} else if (strcmp (mode, "refresh") == 0) {
gboolean force = (value != NULL && g_strcmp0 (value, "force") == 0);
@@ -2349,12 +2369,12 @@ main (int argc, char *argv[])
force,
ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else if (strcmp (mode, "repair") == 0) {
pk_task_repair_system_async (PK_TASK (ctx->task), ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else if (strcmp (mode, "list-create") == 0) {
if (value == NULL) {
@@ -2386,7 +2406,7 @@ main (int argc, char *argv[])
g_free);
pk_task_get_packages_async (PK_TASK (ctx->task), ctx->filters, ctx->cancellable,
pk_console_progress_cb, ctx,
- pk_console_finished_cb, ctx);
+ pk_console_task_finished_cb, ctx);
} else {
error = g_error_new (PK_CONSOLE_ERROR,
PK_ERROR_ENUM_INTERNAL_ERROR,
From cbb5a6d5ca849e4dca5a68b13ee655146996f002 Mon Sep 17 00:00:00 2001
Date: Mon, 22 Jul 2024 12:20:16 +0200
Subject: [PATCH] pk-client: Fix runtime warning when backend does not support
role
The daemon returns "op not supported by the backend" as part of the method
call response, but this response can be received after the "Destroy" signal,
which causes infinite wait for the transaction end and runtime warnings
about NULL error being passed to the g_task_return_error() on the client side.
This is a regression from commit https://github.com/PackageKit/PackageKit/commit/44215db95d9cfda23045d9a9b97175519f473eb2
---
lib/packagekit-glib2/pk-client.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/packagekit-glib2/pk-client.c b/lib/packagekit-glib2/pk-client.c
index 735c718cb..3cbb0d859 100644
--- a/lib/packagekit-glib2/pk-client.c
+++ b/lib/packagekit-glib2/pk-client.c
@@ -1616,11 +1616,11 @@ pk_client_signal_cb (GDBusProxy *proxy,
if (g_strcmp0 (signal_name, "Destroy") == 0) {
g_autoptr(GError) local_error = NULL;
- if (state->waiting_for_finished)
+ if (state->waiting_for_finished) {
local_error = g_error_new_literal (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED,
"PackageKit transaction disappeared");
-
- pk_client_state_finish (state, g_steal_pointer (&local_error));
+ pk_client_state_finish (state, g_steal_pointer (&local_error));
+ }
return;
}
}

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (PackageKit-1.2.8.tar.xz) = b1dc1ba3bea53e127099cfa0aaeb6e72a7ab1597ebb3baef5ca92806c208b0b6d5bcbaf8da8ea38434aa5fd725f57c96929101692be644d97f93d9cc32f6dcde