Compare commits
No commits in common. "c8" and "c9s" have entirely different histories.
86
.gitignore
vendored
86
.gitignore
vendored
@ -1 +1,85 @@
|
|||||||
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.6.tar.xz
|
||||||
|
|||||||
28
0001-packagekitd-Use-export_dynamic-explicitly.patch
Normal file
28
0001-packagekitd-Use-export_dynamic-explicitly.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From 70594bbe7b3c61b7f9fe58cb77ddaeb630e7276f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
Date: Mon, 17 Jul 2023 15:24:14 +0200
|
||||||
|
Subject: [PATCH] packagekitd: Use export_dynamic explicitly
|
||||||
|
|
||||||
|
We used to get that implicitly through GModule .pc file defining -Wl,--export-dynamic so that modules could reference symbols in the main executable.
|
||||||
|
|
||||||
|
With newer GLib including glib@11bdd6fc the gmodule .pc file will no longer define this compiler flag in a way that works for us, resulting in errors like:
|
||||||
|
packagekitd[2394]: Failed to load the backend: opening module zypp failed : /usr/lib64/packagekit-backend/libpk_backend_zypp.so: undefined symbol: pk_backend_job_require_restart
|
||||||
|
---
|
||||||
|
src/meson.build | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/src/meson.build b/src/meson.build
|
||||||
|
index cae73380e..a47169c2b 100644
|
||||||
|
--- a/src/meson.build
|
||||||
|
+++ b/src/meson.build
|
||||||
|
@@ -76,6 +76,7 @@ packagekitd_exec = executable(
|
||||||
|
],
|
||||||
|
install: true,
|
||||||
|
install_dir: get_option('libexecdir'),
|
||||||
|
+ export_dynamic: true,
|
||||||
|
c_args: [
|
||||||
|
'-DPK_BUILD_DAEMON=1',
|
||||||
|
'-DG_LOG_DOMAIN="PackageKit"',
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
||||||
45
PackageKit-0.3.8-Fedora-Vendor.conf.patch
Normal file
45
PackageKit-0.3.8-Fedora-Vendor.conf.patch
Normal 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=http://www.packagekit.org/pk-package-not-found.html
|
||||||
|
-DefaultUrl=http://www.packagekit.org/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
|
||||||
@ -1,91 +1,61 @@
|
|||||||
%global _changelog_trimtime %(date +%s -d "1 year ago")
|
%global _changelog_trimtime %(date +%s -d "1 year ago")
|
||||||
|
|
||||||
%global gitdate 20161221
|
|
||||||
%global bundled_libdnf 0
|
|
||||||
|
|
||||||
%global glib2_version 2.54.0
|
%global glib2_version 2.54.0
|
||||||
%global libdnf_version 0.22.0
|
%global libdnf_version 0.43.1
|
||||||
|
|
||||||
%if 0%{?bundled_libdnf}
|
|
||||||
%global commit1 fe5a08bca7e2599798af7778917da2cc31f1460e
|
|
||||||
%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Summary: Package management service
|
Summary: Package management service
|
||||||
Name: PackageKit
|
Name: PackageKit
|
||||||
Version: 1.1.12
|
Version: 1.2.6
|
||||||
Release: 7%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+ and LGPLv2+
|
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||||
URL: http://www.freedesktop.org/software/PackageKit/
|
URL: http://www.freedesktop.org/software/PackageKit/
|
||||||
Source0: http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
|
Source0: http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
%if 0%{?bundled_libdnf}
|
%if 0%{?fedora}
|
||||||
# https://github.com/rpm-software-management/libdnf
|
Patch0: PackageKit-0.3.8-Fedora-Vendor.conf.patch
|
||||||
# Bundled because the library is API/ABI unstable, and we're trying to
|
%elif 0%{?rhel}
|
||||||
# avoid being version locked with rpm-ostree/dnf right now.
|
Patch0: PackageKit-0.3.8-RHEL-Vendor.conf.patch
|
||||||
Source1: https://github.com/rpm-software-management/libdnf/archive/%{commit1}/libdnf-%{shortcommit1}.tar.gz
|
|
||||||
Provides: bundled(libdnf) = 0.7.0
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# RHEL-specific: set Vendor.conf up for RHEL.
|
# https://pagure.io/fedora-workstation/issue/233
|
||||||
Patch0: rhel-Vendor.conf.patch
|
# https://github.com/PackageKit/PackageKit/pull/404
|
||||||
|
Patch1: package-remove-password-prompt.patch
|
||||||
|
|
||||||
# Backported from upstream
|
# https://github.com/PackageKit/PackageKit/pull/578
|
||||||
Patch1: 0001-dnf-Invalidate-the-sack-cache-after-downloading-new-.patch
|
# https://github.com/PackageKit/PackageKit/pull/599
|
||||||
Patch2: 0001-dnf-Don-t-override-DnfContext-s-release_ver-for-the-.patch
|
# https://github.com/PackageKit/PackageKit/pull/600
|
||||||
Patch3: 0001-command-not-found-Don-t-use-a-bash-regex-to-fix-othe.patch
|
Patch2: shutdown-on-idle.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
|
# https://github.com/PackageKit/PackageKit/pull/643
|
||||||
Patch4: revert-shutdown-on-idle.patch
|
# Fixes errors like
|
||||||
|
# packagekitd[1113]: Failed to load the backend: opening module dnf failed : /usr/lib64/packagekit-backend/libpk_backend_dnf.so: undefined symbol: pk_backend_job_update_details
|
||||||
|
Patch3: 0001-packagekitd-Use-export_dynamic-explicitly.patch
|
||||||
|
|
||||||
BuildRequires: glib2-devel >= %{glib2_version}
|
BuildRequires: glib2-devel >= %{glib2_version}
|
||||||
BuildRequires: xmlto
|
BuildRequires: xmlto
|
||||||
BuildRequires: gtk-doc
|
BuildRequires: gtk-doc
|
||||||
BuildRequires: sqlite-devel
|
BuildRequires: sqlite-devel
|
||||||
BuildRequires: polkit-devel >= 0.92
|
BuildRequires: polkit-devel >= 0.92
|
||||||
BuildRequires: libtool
|
|
||||||
BuildRequires: gtk2-devel
|
|
||||||
BuildRequires: gtk3-devel
|
BuildRequires: gtk3-devel
|
||||||
BuildRequires: docbook-utils
|
BuildRequires: docbook-utils
|
||||||
BuildRequires: yelp-tools
|
BuildRequires: meson
|
||||||
BuildRequires: intltool
|
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: vala-tools
|
BuildRequires: vala
|
||||||
BuildRequires: gstreamer1-devel
|
BuildRequires: gstreamer1-devel
|
||||||
BuildRequires: gstreamer1-plugins-base-devel
|
BuildRequires: gstreamer1-plugins-base-devel
|
||||||
BuildRequires: pango-devel
|
BuildRequires: pango-devel
|
||||||
BuildRequires: fontconfig-devel
|
BuildRequires: fontconfig-devel
|
||||||
BuildRequires: libappstream-glib-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}
|
BuildRequires: libdnf-devel >= %{libdnf_version}
|
||||||
%endif
|
BuildRequires: systemd
|
||||||
BuildRequires: systemd-devel
|
BuildRequires: systemd-devel
|
||||||
BuildRequires: gobject-introspection-devel
|
BuildRequires: gobject-introspection-devel
|
||||||
BuildRequires: bash-completion
|
BuildRequires: bash-completion
|
||||||
BuildRequires: python3-devel
|
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: %{name}-glib%{?_isa} = %{version}-%{release}
|
||||||
Requires: glib2%{?_isa} >= %{glib2_version}
|
Requires: glib2%{?_isa} >= %{glib2_version}
|
||||||
%if ! 0%{?bundled_libdnf}
|
|
||||||
Requires: libdnf%{?_isa} >= %{libdnf_version}
|
Requires: libdnf%{?_isa} >= %{libdnf_version}
|
||||||
%endif
|
|
||||||
Requires: shared-mime-info
|
Requires: shared-mime-info
|
||||||
Requires: systemd
|
Requires: systemd
|
||||||
|
|
||||||
@ -102,12 +72,6 @@ Obsoletes: PackageKit-yum < 0.9.1
|
|||||||
Obsoletes: PackageKit-yum-plugin < 0.9.1
|
Obsoletes: PackageKit-yum-plugin < 0.9.1
|
||||||
Obsoletes: PackageKit-zif < 0.8.13-2
|
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
|
# components now built-in
|
||||||
Obsoletes: PackageKit-debug-install < 0.9.1
|
Obsoletes: PackageKit-debug-install < 0.9.1
|
||||||
Obsoletes: PackageKit-hawkey < 0.9.1
|
Obsoletes: PackageKit-hawkey < 0.9.1
|
||||||
@ -116,14 +80,6 @@ Obsoletes: PackageKit-backend-devel < 0.9.6
|
|||||||
# Udev no longer provides this functionality
|
# Udev no longer provides this functionality
|
||||||
Obsoletes: PackageKit-device-rebind < 0.8.13-2
|
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
|
%description
|
||||||
PackageKit is a D-Bus abstraction layer that allows the session user
|
PackageKit is a D-Bus abstraction layer that allows the session user
|
||||||
to manage packages in a secure way using a cross-distro,
|
to manage packages in a secure way using a cross-distro,
|
||||||
@ -192,69 +148,34 @@ using PackageKit.
|
|||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
|
||||||
%if 0%{?bundled_libdnf}
|
|
||||||
# Extract libdnf archive
|
|
||||||
tar -xf %{S:1}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?bundled_libdnf}
|
%meson \
|
||||||
mkdir -p libdnf-%{commit1}/build
|
-Dgtk_doc=true \
|
||||||
pushd libdnf-%{commit1}/build
|
-Dpython_backend=false \
|
||||||
%cmake \
|
-Dpackaging_backend=dnf \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-Dlocal_checkout=false
|
||||||
..
|
%meson_build
|
||||||
%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
|
%install
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
%meson_install
|
||||||
|
|
||||||
%if 0%{?bundled_libdnf}
|
# Create cache dir
|
||||||
# Install libdnf to a temporary prefix
|
mkdir -p %{buildroot}%{_localstatedir}/cache/PackageKit
|
||||||
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
|
# Create directories for downloaded appstream data
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/app-info/{icons,xmls}
|
mkdir -p %{buildroot}%{_localstatedir}/cache/app-info/{icons,xmls}
|
||||||
|
|
||||||
touch $RPM_BUILD_ROOT%{_localstatedir}/cache/PackageKit/groups.sqlite
|
|
||||||
|
|
||||||
# create a link that GStreamer will recognise
|
# create a link that GStreamer will recognise
|
||||||
pushd ${RPM_BUILD_ROOT}%{_libexecdir} > /dev/null
|
pushd %{buildroot}%{_libexecdir} > /dev/null
|
||||||
ln -s pk-gstreamer-install gst-install-plugins-helper
|
ln -s pk-gstreamer-install gst-install-plugins-helper
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
# create a link that from the comps icons to PK, as PackageKit frontends
|
# enable packagekit-offline-updates.service here for now, till we
|
||||||
# cannot add /usr/share/pixmaps/comps to the icon search path as some distros
|
# decide how to do it upstream after the meson conversion:
|
||||||
# do not use comps. Patching this in the frontend is not a good idea, as there
|
# https://github.com/hughsie/PackageKit/issues/401
|
||||||
# are multiple frontends in multiple programming languages.
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1833176
|
||||||
pushd ${RPM_BUILD_ROOT}%{_datadir}/PackageKit > /dev/null
|
mkdir -p %{buildroot}%{_unitdir}/system-update.target.wants/
|
||||||
ln -s ../pixmaps/comps icons
|
ln -sf ../packagekit-offline-update.service %{buildroot}%{_unitdir}/system-update.target.wants/packagekit-offline-update.service
|
||||||
popd > /dev/null
|
|
||||||
|
|
||||||
%find_lang %name
|
%find_lang %name
|
||||||
|
|
||||||
@ -267,27 +188,23 @@ systemctl disable packagekit-offline-update.service > /dev/null 2>&1 || :
|
|||||||
%license COPYING
|
%license COPYING
|
||||||
%doc README AUTHORS NEWS
|
%doc README AUTHORS NEWS
|
||||||
%dir %{_datadir}/PackageKit
|
%dir %{_datadir}/PackageKit
|
||||||
%dir %{_datadir}/PackageKit/helpers
|
|
||||||
%dir %{_sysconfdir}/PackageKit
|
%dir %{_sysconfdir}/PackageKit
|
||||||
%dir %{_localstatedir}/lib/PackageKit
|
%dir %{_localstatedir}/lib/PackageKit
|
||||||
%dir %{_localstatedir}/cache/app-info
|
%dir %{_localstatedir}/cache/app-info
|
||||||
%dir %{_localstatedir}/cache/app-info/icons
|
%dir %{_localstatedir}/cache/app-info/icons
|
||||||
%dir %{_localstatedir}/cache/app-info/xmls
|
%dir %{_localstatedir}/cache/app-info/xmls
|
||||||
%dir %{_localstatedir}/cache/PackageKit
|
%dir %{_localstatedir}/cache/PackageKit
|
||||||
%ghost %verify(not md5 size mtime) %{_localstatedir}/cache/PackageKit/groups.sqlite
|
|
||||||
%{_datadir}/bash-completion/completions/pkcon
|
%{_datadir}/bash-completion/completions/pkcon
|
||||||
%dir %{_libdir}/packagekit-backend
|
%dir %{_libdir}/packagekit-backend
|
||||||
%config(noreplace) %{_sysconfdir}/PackageKit/PackageKit.conf
|
%config(noreplace) %{_sysconfdir}/PackageKit/PackageKit.conf
|
||||||
%config(noreplace) %{_sysconfdir}/PackageKit/Vendor.conf
|
%config(noreplace) %{_sysconfdir}/PackageKit/Vendor.conf
|
||||||
%config %{_sysconfdir}/dbus-1/system.d/*
|
%config %{_sysconfdir}/dbus-1/system.d/*
|
||||||
%dir %{_datadir}/PackageKit/helpers/test_spawn
|
%{_datadir}/man/man1/pkcon.1*
|
||||||
%{_datadir}/PackageKit/icons
|
%{_datadir}/man/man1/pkmon.1*
|
||||||
%{_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/actions/*.policy
|
||||||
%{_datadir}/polkit-1/rules.d/*
|
%{_datadir}/polkit-1/rules.d/*
|
||||||
%{_datadir}/PackageKit/pk-upgrade-distro.sh
|
%{_datadir}/PackageKit/pk-upgrade-distro.sh
|
||||||
|
%{_datadir}/PackageKit/helpers/test_spawn/search-name.sh
|
||||||
%{_libexecdir}/packagekitd
|
%{_libexecdir}/packagekitd
|
||||||
%{_libexecdir}/packagekit-direct
|
%{_libexecdir}/packagekit-direct
|
||||||
%{_bindir}/pkmon
|
%{_bindir}/pkmon
|
||||||
@ -295,10 +212,7 @@ systemctl disable packagekit-offline-update.service > /dev/null 2>&1 || :
|
|||||||
%exclude %{_libdir}/libpackagekit*.so.*
|
%exclude %{_libdir}/libpackagekit*.so.*
|
||||||
%{_libdir}/packagekit-backend/libpk_backend_dummy.so
|
%{_libdir}/packagekit-backend/libpk_backend_dummy.so
|
||||||
%{_libdir}/packagekit-backend/libpk_backend_test_*.so
|
%{_libdir}/packagekit-backend/libpk_backend_test_*.so
|
||||||
%if 0%{?bundled_libdnf}
|
%ghost %verify(not md5 size mtime) %attr(0644,-,-) %{_localstatedir}/lib/PackageKit/transactions.db
|
||||||
%{_libdir}/PackageKit/
|
|
||||||
%endif
|
|
||||||
%ghost %verify(not md5 size mtime) %{_localstatedir}/lib/PackageKit/transactions.db
|
|
||||||
%{_datadir}/dbus-1/system-services/*.service
|
%{_datadir}/dbus-1/system-services/*.service
|
||||||
%{_datadir}/dbus-1/interfaces/*.xml
|
%{_datadir}/dbus-1/interfaces/*.xml
|
||||||
%{_unitdir}/packagekit-offline-update.service
|
%{_unitdir}/packagekit-offline-update.service
|
||||||
@ -306,6 +220,7 @@ systemctl disable packagekit-offline-update.service > /dev/null 2>&1 || :
|
|||||||
%{_unitdir}/system-update.target.wants/
|
%{_unitdir}/system-update.target.wants/
|
||||||
%{_libexecdir}/pk-*offline-update
|
%{_libexecdir}/pk-*offline-update
|
||||||
%{_libdir}/packagekit-backend/libpk_backend_dnf.so
|
%{_libdir}/packagekit-backend/libpk_backend_dnf.so
|
||||||
|
%pycached %{python3_sitelib}/dnf-plugins/notify_packagekit.py
|
||||||
|
|
||||||
%files glib
|
%files glib
|
||||||
%{_libdir}/*packagekit-glib2.so.*
|
%{_libdir}/*packagekit-glib2.so.*
|
||||||
@ -320,7 +235,6 @@ systemctl disable packagekit-offline-update.service > /dev/null 2>&1 || :
|
|||||||
%{_libexecdir}/gst-install-plugins-helper
|
%{_libexecdir}/gst-install-plugins-helper
|
||||||
|
|
||||||
%files gtk3-module
|
%files gtk3-module
|
||||||
%{_libdir}/gtk-2.0/modules/*.so
|
|
||||||
%{_libdir}/gtk-3.0/modules/*.so
|
%{_libdir}/gtk-3.0/modules/*.so
|
||||||
%{_libdir}/gnome-settings-daemon-3.0/gtk-modules/*.desktop
|
%{_libdir}/gnome-settings-daemon-3.0/gtk-modules/*.desktop
|
||||||
|
|
||||||
@ -338,49 +252,157 @@ systemctl disable packagekit-offline-update.service > /dev/null 2>&1 || :
|
|||||||
%{_datadir}/gir-1.0/PackageKitGlib-1.0.gir
|
%{_datadir}/gir-1.0/PackageKitGlib-1.0.gir
|
||||||
%{_datadir}/gtk-doc/html/PackageKit
|
%{_datadir}/gtk-doc/html/PackageKit
|
||||||
%{_datadir}/vala/vapi/packagekit-glib2.vapi
|
%{_datadir}/vala/vapi/packagekit-glib2.vapi
|
||||||
|
%{_datadir}/vala/vapi/packagekit-glib2.deps
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Apr 24 2023 Richard Hughes <rhughes@redhat.com> - 1.1.12-7
|
* Mon Jan 15 2024 Milan Crha <mcrha@redhat.com> - 1.2.6-1
|
||||||
- Backport changes for passing interactive flag to polkit calls.
|
- Resolves: RHEL-21560 (Rebase PackageKit to 1.2.6 version)
|
||||||
- Resolves: #2177711
|
|
||||||
|
|
||||||
* Fri May 22 2020 Michael Catanzaro <mcatanzaro@redhat.com> - 1.1.12-6
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.4-2
|
||||||
- Fix documentation links in Vendor.conf
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
- Resolves: #1837648
|
Related: rhbz#1991688
|
||||||
|
|
||||||
* Tue May 19 2020 Michael Catanzaro <mcatanzaro@redhat.com> - 1.1.12-5
|
* Mon Aug 09 2021 Milan Crha <mcrha@redhat.com> - 1.2.4-1
|
||||||
- Do not shutdown the daemon on idle
|
- New upstream release
|
||||||
- Resolves: #1814820
|
- 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
|
||||||
|
|
||||||
* Mon Nov 25 2019 Richard Hughes <rhughes@redhat.com> - 1.1.12-4
|
* Tue Jun 22 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.3-3
|
||||||
- Do not use a bash regex to fix CNF on shells other than bash
|
- Rebuilt for RHEL 9 BETA for openssl 3.0
|
||||||
- Resolves: #1728855
|
Related: rhbz#1971065
|
||||||
|
|
||||||
* Wed May 29 2019 Kalev Lember <klember@redhat.com> - 1.1.12-3
|
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.3-2
|
||||||
- Backport a patch to improve release_ver handling (#1714439)
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
|
* 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
|
* Tue Dec 18 2018 Kalev Lember <klember@redhat.com> - 1.1.12-2
|
||||||
- Invalidate the sack cache after downloading new metadata
|
- Invalidate the sack cache after downloading new metadata (#1642878)
|
||||||
|
|
||||||
* Wed Nov 28 2018 Kalev Lember <klember@redhat.com> - 1.1.12-1
|
* Wed Nov 28 2018 Kalev Lember <klember@redhat.com> - 1.1.12-1
|
||||||
- Update to 1.1.12
|
- Update to 1.1.12
|
||||||
|
|
||||||
* Wed Oct 24 2018 Richard Hughes <rhughes@redhat.com> - 1.1.10-6
|
* Tue Sep 25 2018 Richard Hughes <rhughes@redhat.com> - 1.1.11-1
|
||||||
- Backport a patch to fix modularity.
|
- New upstream release
|
||||||
- Resolves: #1641091
|
- 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
|
||||||
|
|
||||||
* Tue Oct 09 2018 Richard Hughes <rhughes@redhat.com> - 1.1.10-5
|
* Sat Sep 22 2018 Adam Williamson <awilliam@redhat.com> - 1.1.10-5
|
||||||
- Backport a patch to poke subscription manager when required
|
- Backport several more fixes from master for libdnf compat
|
||||||
- Resolves: #1633244
|
|
||||||
|
|
||||||
* Thu Jul 12 2018 Richard Hughes <rhughes@redhat.com> - 1.1.10-4
|
* Tue Jul 24 2018 Stephen Gallagher <sgallagh@redhat.com> - 1.1.10-4
|
||||||
- Enable the DNF backend
|
- Add patch to support modularity
|
||||||
|
|
||||||
* Wed Jul 11 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.1.10-3
|
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.10-3
|
||||||
- Replace gnome-doc-utils with yelp-tools for the docs
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
* Thu Jun 14 2018 Richard Hughes <rhughes@redhat.com> - 1.1.10-2
|
* Tue Jun 26 2018 Adam Williamson <awilliam@redhat.com> - 1.1.10-2
|
||||||
- Don't depend on a dead package for gnome-packagekit
|
- Rebuild for new libdnf
|
||||||
|
|
||||||
* Mon Apr 23 2018 Richard Hughes <rhughes@redhat.com> - 1.1.10-1
|
* Mon Apr 23 2018 Richard Hughes <rhughes@redhat.com> - 1.1.10-1
|
||||||
- New upstream release
|
- New upstream release
|
||||||
@ -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
|
|
||||||
|
|
||||||
@ -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
|
|
||||||
|
|
||||||
@ -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
|
|
||||||
|
|
||||||
@ -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
|
|
||||||
|
|
||||||
@ -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
|
|
||||||
|
|
||||||
@ -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 */
|
|
||||||
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-9
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional}
|
||||||
32
package-remove-password-prompt.patch
Normal file
32
package-remove-password-prompt.patch
Normal 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;
|
||||||
156
shutdown-on-idle.patch
Normal file
156
shutdown-on-idle.patch
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
From f42096ff2427a758eda9de2e3046714167a38c95 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Russell Haley <yumpusamongus@gmail.com>
|
||||||
|
Date: Mon, 12 Sep 2022 12:36:10 -0500
|
||||||
|
Subject: [PATCH] Revert "Revert "Shutdown the daemon on idle by default""
|
||||||
|
|
||||||
|
This reverts commit dca1f5b2508a4632d0b9fefab771a5a9caf83a5c.
|
||||||
|
|
||||||
|
Which reverted commit 0c84d71509e851db20445c747529bd7d3724f081,
|
||||||
|
which reverted commit c6eb3555ec5b41e988c111d276764d55fb83bda3.
|
||||||
|
|
||||||
|
Fixes #460.
|
||||||
|
|
||||||
|
The memory usage of packagekitd has been observed growing well beyond
|
||||||
|
half a GiB. See:
|
||||||
|
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1354074
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1854875
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1896964
|
||||||
|
|
||||||
|
As I understand it, this timeout causes some slightly surprising
|
||||||
|
behavior when users mix command line dnf upgades with GUI PackageKit
|
||||||
|
upgrades, and do not manually run an update check before rebooting for
|
||||||
|
update. But that is an edge case, and the price of not having it is too
|
||||||
|
high.
|
||||||
|
---
|
||||||
|
src/pk-main.c | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/pk-main.c b/src/pk-main.c
|
||||||
|
index d372a7456..1de9a1390 100644
|
||||||
|
--- a/src/pk-main.c
|
||||||
|
+++ b/src/pk-main.c
|
||||||
|
@@ -183,6 +183,11 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
|
/* after how long do we timeout? */
|
||||||
|
exit_idle_time = g_key_file_get_integer (conf, "Daemon", "ShutdownTimeout", NULL);
|
||||||
|
+ /* THIS COMMENT IS A TSUNAMI STONE
|
||||||
|
+ * Before removing the default timeout, please study the git history and
|
||||||
|
+ * be sure that you are not regressing Redhat bugzilla #1354074 (again). */
|
||||||
|
+ if (exit_idle_time == 0)
|
||||||
|
+ exit_idle_time = 300;
|
||||||
|
g_debug ("daemon shutdown set to %i seconds", exit_idle_time);
|
||||||
|
|
||||||
|
/* override the backend name */
|
||||||
|
|
||||||
|
From ba378b8510133bbad081aebd15cfe2ae74fe1e8a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gordon Messmer <gordon.messmer@gmail.com>
|
||||||
|
Date: Sun, 15 Jan 2023 15:17:45 -0800
|
||||||
|
Subject: [PATCH] valgrind warns that a conditional depends on an uninitialized
|
||||||
|
value.
|
||||||
|
|
||||||
|
---
|
||||||
|
src/pk-main.c | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/pk-main.c b/src/pk-main.c
|
||||||
|
index d372a7456..43727d206 100644
|
||||||
|
--- a/src/pk-main.c
|
||||||
|
+++ b/src/pk-main.c
|
||||||
|
@@ -241,6 +241,8 @@ main (int argc, char *argv[])
|
||||||
|
helper.loop = loop;
|
||||||
|
helper.timer_id = g_timeout_add_seconds (5, (GSourceFunc) pk_main_timeout_check_cb, &helper);
|
||||||
|
g_source_set_name_by_id (helper.timer_id, "[PkMain] main poll");
|
||||||
|
+ } else {
|
||||||
|
+ helper.timer_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* immediatly exit */
|
||||||
|
|
||||||
|
From 8c22a0e2f3caf7df8728eec0dbf04d9c3c69f32e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gordon Messmer <gordon.messmer@gmail.com>
|
||||||
|
Date: Tue, 17 Jan 2023 08:45:16 -0800
|
||||||
|
Subject: [PATCH] Notify PackageKit when dnf installs or removes packages.
|
||||||
|
|
||||||
|
---
|
||||||
|
backends/dnf/meson.build | 13 +++++++++
|
||||||
|
backends/dnf/notify_packagekit.py | 45 +++++++++++++++++++++++++++++++
|
||||||
|
contrib/PackageKit.spec.in | 2 ++
|
||||||
|
3 files changed, 60 insertions(+)
|
||||||
|
create mode 100644 backends/dnf/notify_packagekit.py
|
||||||
|
|
||||||
|
diff --git a/backends/dnf/meson.build b/backends/dnf/meson.build
|
||||||
|
index ac75a1b6c..09718baf1 100644
|
||||||
|
--- a/backends/dnf/meson.build
|
||||||
|
+++ b/backends/dnf/meson.build
|
||||||
|
@@ -7,6 +7,19 @@ if meson.get_compiler('c').has_function('hy_query_get_advisory_pkgs', prefix: '#
|
||||||
|
c_args += ['-DHAVE_HY_QUERY_GET_ADVISORY_PKGS']
|
||||||
|
endif
|
||||||
|
|
||||||
|
+python = import('python')
|
||||||
|
+python_exec = python.find_installation()
|
||||||
|
+python_package_dir = get_option('pythonpackagedir')
|
||||||
|
+if python_package_dir == ''
|
||||||
|
+ python_package_dir = python_exec.get_install_dir()
|
||||||
|
+endif
|
||||||
|
+python_package_dir = join_paths(python_package_dir, 'dnf-plugins')
|
||||||
|
+
|
||||||
|
+install_data(
|
||||||
|
+ 'notify_packagekit.py',
|
||||||
|
+ install_dir: join_paths(python_package_dir),
|
||||||
|
+)
|
||||||
|
+
|
||||||
|
shared_module(
|
||||||
|
'pk_backend_dnf',
|
||||||
|
'dnf-backend-vendor-@0@.c'.format(get_option('dnf_vendor')),
|
||||||
|
diff --git a/backends/dnf/notify_packagekit.py b/backends/dnf/notify_packagekit.py
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000..3be1fadd8
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/backends/dnf/notify_packagekit.py
|
||||||
|
@@ -0,0 +1,45 @@
|
||||||
|
+# -*- coding: utf-8 -*-
|
||||||
|
+#
|
||||||
|
+# Copyright (C) 2022 Gordon Messmer
|
||||||
|
+#
|
||||||
|
+# Licensed under the GNU Lesser General Public License Version 2.1
|
||||||
|
+#
|
||||||
|
+# This library is free software; you can redistribute it and/or
|
||||||
|
+# modify it under the terms of the GNU Lesser General Public
|
||||||
|
+# License as published by the Free Software Foundation; either
|
||||||
|
+# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+#
|
||||||
|
+# This library is distributed in the hope that it will be useful,
|
||||||
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+# Lesser General Public License for more details.
|
||||||
|
+#
|
||||||
|
+# You should have received a copy of the GNU Lesser General Public
|
||||||
|
+# License along with this library; if not, write to the Free Software
|
||||||
|
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
+
|
||||||
|
+"""
|
||||||
|
+Notify packagekitd when packages are installed, updated, or removed.
|
||||||
|
+"""
|
||||||
|
+
|
||||||
|
+import dbus
|
||||||
|
+import dnf
|
||||||
|
+from dnfpluginscore import _
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+class NotifyPackagekit(dnf.Plugin):
|
||||||
|
+ name = "notify-packagekit"
|
||||||
|
+
|
||||||
|
+ def __init__(self, base, cli):
|
||||||
|
+ super(NotifyPackagekit, self).__init__(base, cli)
|
||||||
|
+ self.base = base
|
||||||
|
+ self.cli = cli
|
||||||
|
+
|
||||||
|
+ def transaction(self):
|
||||||
|
+ try:
|
||||||
|
+ bus = dbus.SystemBus()
|
||||||
|
+ proxy = bus.get_object('org.freedesktop.PackageKit', '/org/freedesktop/PackageKit')
|
||||||
|
+ iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.PackageKit')
|
||||||
|
+ iface.StateHasChanged('posttrans')
|
||||||
|
+ except:
|
||||||
|
+ pass
|
||||||
Loading…
Reference in New Issue
Block a user