4 Commits

Author SHA256 Message Date
831c5817c0 Accepting request 1328530 from GNOME:Factory
OBS-URL: https://build.opensuse.org/request/show/1328530
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/PackageKit?expand=0&rev=242
2026-01-23 16:31:10 +00:00
710f7d2187 - Rebase to version 1.3.3
+ See included NEWS file for details between 1.2.8 to 1.3.3
- Drop patches included upstream
  + PackageKit-dynamic-export.patch
  + PackageKit-fix-crash-pre-dbus.patch
  + PackageKit-fix-pkcon-permission.patch
  + PackageKit-mark-as-compulsory.patch
  + PackageKit-zypp-disable-upgrade-system-in-sle.patch
  + PackageKit-zypp-dont-install-updateCandidateObj.patch
  + PackageKit-zypp-parallel-package-downloads.patch
- Backport dnf5 backend and add patch to transition dnf users to dnf5
  + PackageKit-1.3.3-Initial-DNF5-Backend.patch
  + PackageKit-alias-dnf-to-dnf5.patch
- Drop legacy dnf backend and related patches
  + PackageKit-dnf-Add-support-for-AppStream-repodata-basenames-use.patch
- Drop patches for support for SUSE Linux < 16
  + PackageKit-find-python-3-6.patch

OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/PackageKit?expand=0&rev=463
2026-01-21 14:06:06 +00:00
f5212d0474 Accepting request 1300943 from GNOME:Factory
OBS-URL: https://build.opensuse.org/request/show/1300943
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/PackageKit?expand=0&rev=241
2025-08-25 18:36:05 +00:00
5ec8e7f50e - Add PackageKit-zypp-parallel-package-downloads.patch:
zypp: Implement parallel downloading
  (gh#PackageKit/PackageKit/commit/dd39d2982, bsc#1244920).

OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/PackageKit?expand=0&rev=461
2025-08-22 08:36:32 +00:00
16 changed files with 2736 additions and 298 deletions

Binary file not shown.

View File

@@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEE0zo/DKFrCsxRpgc4SUyKX79N7OsFAmVL8fAACgkQSUyKX79N
7OuBgw/9HMzZHR28uRPBXsCFvuizNp/BNmJm0rsJp8bG7vUOydz1MlEjwf+GIxXy
SqEbfbVqT6ENjyWC1w1pPGS10uHsmdQVuI5Zsu6NjD+UjEpQxK210BvgS+Yl+QNA
E/oaE1gbNykHpKLmqR1X2NyTb2352x2BjPgFcy5rJAmJnss6vuFwWZu30EKOX4x0
wClHmmdMw5jgbkj+HsA5USvtZyEwKNFfo5E9a0CmbksTeO5iPACh7ZZ+h+ZsfLfi
K6+LtZ3GsDAyg2W+UdggUCVHALe4aHUCu7nor3om6D4tDQIn6FQqo5A5If6yF6l7
NEbr2EZJ8aafIZ+knmtjjvByDmtXbq+IZpEVjReyAT8EVsVhZa7Wb3Xpulm8eSyr
Qa4EKluSbTw+jOQtjMmYIjLNBQnPOGIF1LRS2OmrYpNUyFiINKDl2bTFvvGOVgQP
wp9mGOiKwwLD2RitQZbC89RmFK/jPlVvOKNpR6vBS0taDWnd6hyC2SbCZzUa4S/8
t1vG3kfmk1etCcVX+1BHSTk2HwthVeTrUsqBaN8Fa7Ti2IhZIIJCWslvd7yc57vQ
njzaWgU9sA/XIoE2I2WMkmCpA94//b3X8o3MtwVHHJ5AwVEFg8qn32/2gxhhgcdQ
XPhzuVtWJxUOGJZJoiZifaQ5KzWCa3SXeZ7Be8XzhzzuS230bis=
=0749
-----END PGP SIGNATURE-----

File diff suppressed because it is too large Load Diff

3
PackageKit-1.3.3.tar.xz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e8dcb0fb1ec3c705be4d6fe85c1d5898c1d92f4abc69a17c7c646cef9aaf327f
size 2927368

View File

@@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEE0zo/DKFrCsxRpgc4SUyKX79N7OsFAmkksLYACgkQSUyKX79N
7OsU8A//QMH2KpDOsGTFy0hu2/jvOkf4nq5UM+bcwMws6KvneTDnpu1HYhJG3q8l
nbjHrZK6hyp81GxOXA3tX7jYXgEy8RT4q78INnxTK8YJkuEG8FJCG8nbIwdd9HlW
IqgUtZTdBzAUW/75xERIkZ2faeVJvq8KBGMiltVohGjbISVIcrxS+OyaarSwN6Et
rcsiuxH5KI8k9ZGeeSg+vZPrE18pCSy+ACMbaSr1Fn0ngrf5dd/cR5DUNw2Cy9M7
k4i4/v6o9POnYC3K2DpfJtWGcHAolbWUFMHbgckfTdFr4kGFupCrhWJ5f66SZW34
tw1m4QaFbrwOXdywwu+L1Pz+BWg7mGUG+h7banjtOT7ogIkeCkBnucbN3P+OQkIp
0XD5eCIUWlvcHTNmEuqV9qKVbRBmOiZo1Drm1jNsDQVoT7+BI/c2Je/JBDrLLXJN
K7Lobi1uta2aSUQmy+zCqwaSejHEQgG1bP2Bo1tOldKDoxd/auDjjVChuaWSQWt7
iHCLReRFGYCpWRJFsDRn2ie9w04+3dLlycDaZFU4TQUbWLoiv/i0LDkQCSwKKbi9
FBZrMWu9bI9d3G0/DQ5DGeb/GoxUB0ybsuIDde3H51mTcRnhw8TrjP8BuBtgXgvN
ve6vqBuXti1xJE+flH4LSAjCu0+xtd7DnyZ9Ku7fzbQprqEwMHA=
=kJg7
-----END PGP SIGNATURE-----

View File

@@ -0,0 +1,21 @@
diff --git a/src/pk-backend.c b/src/pk-backend.c
index a87fb1a83..6c8c42073 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -473,12 +473,13 @@ pk_backend_load (PkBackend *backend, GError **error)
if (backend_name == NULL)
return FALSE;
- /* the "hawkey" and "hif" backends are superseded by "dnf" */
+ /* the "hawkey", "hif", and "dnf" backends are superseded by "dnf5" */
if (g_strcmp0 (backend_name, "hawkey") == 0 ||
g_strcmp0 (backend_name, "yum") == 0 ||
- g_strcmp0 (backend_name, "hif") == 0) {
+ g_strcmp0 (backend_name, "hif") == 0 ||
+ g_strcmp0 (backend_name, "dnf") == 0) {
g_free (backend_name);
- backend_name = g_strdup ("dnf");
+ backend_name = g_strdup ("dnf5");
}
g_debug ("Trying to load : %s", backend_name);

View File

@@ -1,29 +0,0 @@
From 819847a0f585e9e950f63c65fa5dead5cdf0027c Mon Sep 17 00:00:00 2001
From: Neal Gompa <ngompa13@gmail.com>
Date: Sat, 31 Aug 2019 22:45:04 -0400
Subject: [PATCH] dnf: Add support for AppStream repodata basenames used by
Open Build Service
For no particularly clear reason, it appears that the Open Build Service
appends AppStream repodata to repositories with the 'appdata' basename
instead of the default 'appstream' basename.
Support downloading this variant as well, as it should (hopefully)
be mutually exclusive.
---
backends/dnf/pk-backend-dnf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: PackageKit-1.2.8/backends/dnf/pk-backend-dnf-common.c
===================================================================
--- PackageKit-1.2.8.orig/backends/dnf/pk-backend-dnf-common.c
+++ PackageKit-1.2.8/backends/dnf/pk-backend-dnf-common.c
@@ -89,7 +89,7 @@ pk_backend_setup_dnf_context (DnfContext
gboolean
dnf_utils_refresh_repo_appstream (DnfRepo *repo, GError **error)
{
- const gchar *as_basenames[] = { "appstream", "appstream-icons", NULL };
+ const gchar *as_basenames[] = { "appstream", "appstream-icons", "appdata", "appdata-icons", NULL };
for (guint i = 0; as_basenames[i] != NULL; i++) {
const gchar *tmp = dnf_repo_get_filename_md (repo, as_basenames[i]);
if (tmp == NULL)

View File

@@ -1,12 +0,0 @@
Index: PackageKit-1.2.8/src/meson.build
===================================================================
--- PackageKit-1.2.8.orig/src/meson.build
+++ PackageKit-1.2.8/src/meson.build
@@ -51,6 +51,7 @@ packagekit_direct_exec = executable(
],
install: true,
install_dir: get_option('libexecdir'),
+ export_dynamic: true,
c_args: [
'-DG_LOG_DOMAIN="PackageKit"',
'-DLIBDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('libdir'))),

View File

@@ -1,12 +0,0 @@
diff --unified --recursive --text --new-file --color PackageKit-1.2.8.old/backends/dnf/meson.build PackageKit-1.2.8.new/backends/dnf/meson.build
--- PackageKit-1.2.8.old/backends/dnf/meson.build 2023-11-09 04:35:41.000000000 +0800
+++ PackageKit-1.2.8.new/backends/dnf/meson.build 2024-01-02 16:12:35.600072285 +0800
@@ -8,7 +8,7 @@
endif
python = import('python')
-python_exec = python.find_installation()
+python_exec = python.find_installation('python3.6')
python_package_dir = get_option('pythonpackagedir')
if python_package_dir == ''
python_package_dir = python_exec.get_install_dir()

View File

@@ -1,27 +0,0 @@
From 30b22c0f06970c934b3e6f6ea0328c589548850c Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard@hughsie.com>
Date: Thu, 29 Oct 2020 15:40:00 +0000
Subject: [PATCH] Do not crash when calling pk_dbus_get_uid() before D-Bus is
setup
Fixes https://github.com/hughsie/PackageKit/issues/436
---
src/pk-dbus.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/pk-dbus.c b/src/pk-dbus.c
index ddd04d4e6..af275eb2a 100644
--- a/src/pk-dbus.c
+++ b/src/pk-dbus.c
@@ -64,6 +64,10 @@ pk_dbus_get_uid (PkDbus *dbus, const gchar *sender)
g_return_val_if_fail (PK_IS_DBUS (dbus), G_MAXUINT);
g_return_val_if_fail (sender != NULL, G_MAXUINT);
+ /* no connection to DBus */
+ if (dbus->priv->proxy_uid == NULL)
+ return G_MAXUINT;
+
/* set in the test suite */
if (g_strcmp0 (sender, ":org.freedesktop.PackageKit") == 0) {
g_debug ("using self-check shortcut");

View File

@@ -1,17 +0,0 @@
From 47b7f97bc9ef22b9c1c6c0a738ff49c876d8122a Mon Sep 17 00:00:00 2001
From: Matthias Klumpp <matthias@tenstral.net>
Date: Thu, 17 Feb 2022 21:19:50 +0100
Subject: [PATCH] trivial: Drop unnecessary x permission
Lintian complained about it.
---
contrib/pkcon | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100755 => 100644 contrib/pkcon
diff --git a/contrib/pkcon b/contrib/pkcon
old mode 100755
new mode 100644
--
2.39.2

View File

@@ -1,35 +0,0 @@
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>

View File

@@ -1,30 +0,0 @@
From 01ae2ceee2688b308553b0ed0c5f9c1b6f27ad78 Mon Sep 17 00:00:00 2001
From: Jonathan Kang <jonathankang@gnome.org>
Date: Wed, 27 Jul 2022 17:15:31 +0800
Subject: [PATCH] zypp: Disable upgrade-system support in SLE
---
backends/zypp/pk-backend-zypp.cpp | 13 +++++++++++++
1 file changed, 13 insertions(+)
Index: PackageKit-1.2.8/backends/zypp/pk-backend-zypp.cpp
===================================================================
--- PackageKit-1.2.8.orig/backends/zypp/pk-backend-zypp.cpp
+++ PackageKit-1.2.8/backends/zypp/pk-backend-zypp.cpp
@@ -3572,6 +3572,16 @@ pk_backend_upgrade_system_thread (PkBack
return;
}
+ release_name = pk_get_distro_name (&error);
+ if (release_name == NULL)
+ g_error ("Failed to parse os-release: %s", error->message);
+ if (g_str_has_prefix (release_name, "SLE")) {
+ pk_backend_job_error_code (job, PK_ERROR_ENUM_NOT_SUPPORTED,
+ "upgrade-system is not supported in SLE.");
+
+ return;
+ }
+
ResPool pool = zypp_build_pool (zypp, TRUE);
PkRestartEnum restart = PK_RESTART_ENUM_NONE;
PoolStatusSaver saver;

View File

@@ -1,33 +0,0 @@
From 209aa62950e503494716fd046f8f5cb546bf57d4 Mon Sep 17 00:00:00 2001
From: Jonathan Kang <jonathankang@gnome.org>
Date: Wed, 4 Sep 2024 15:16:25 +0800
Subject: [PATCH] zypp: Mark the correct packages to-be-installed
The package list passed to backend_update_packages_thread() is already
the packages that are about to be installed. It doesn't make sense to
mark the update candidate of those packages to be installed.
https://bugzilla.suse.com/show_bug.cgi?id=1227389
---
backends/zypp/pk-backend-zypp.cpp | 5 -----
1 file changed, 5 deletions(-)
diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index dd3f19ee0..2d4a51238 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -3524,11 +3524,6 @@ backend_update_packages_thread (PkBackendJob *job, GVariant *params, gpointer us
zypp_backend_finished_error (job, PK_ERROR_ENUM_DEP_RESOLUTION_FAILED, "Package %s is not installed", package_ids[i]);
return;
}
- item = sel->updateCandidateObj();
- if (!item) {
- zypp_backend_finished_error(job, PK_ERROR_ENUM_DEP_RESOLUTION_FAILED, "There is no update candidate for %s", sel->installedObj().satSolvable().asString().c_str());
- return;
- }
}
item.status ().setToBeInstalled (ResStatus::USER);
--
2.46.0

View File

@@ -1,3 +1,31 @@
-------------------------------------------------------------------
Tue Jan 20 16:23:50 UTC 2026 - Neal Gompa <ngompa@opensuse.org>
- Rebase to version 1.3.3
+ See included NEWS file for details between 1.2.8 to 1.3.3
- Drop patches included upstream
+ PackageKit-dynamic-export.patch
+ PackageKit-fix-crash-pre-dbus.patch
+ PackageKit-fix-pkcon-permission.patch
+ PackageKit-mark-as-compulsory.patch
+ PackageKit-zypp-disable-upgrade-system-in-sle.patch
+ PackageKit-zypp-dont-install-updateCandidateObj.patch
+ PackageKit-zypp-parallel-package-downloads.patch
- Backport dnf5 backend and add patch to transition dnf users to dnf5
+ PackageKit-1.3.3-Initial-DNF5-Backend.patch
+ PackageKit-alias-dnf-to-dnf5.patch
- Drop legacy dnf backend and related patches
+ PackageKit-dnf-Add-support-for-AppStream-repodata-basenames-use.patch
- Drop patches for support for SUSE Linux < 16
+ PackageKit-find-python-3-6.patch
-------------------------------------------------------------------
Thu Aug 21 08:47:17 UTC 2025 - Jonathan Kang <songchuan.kang@suse.com>
- Add PackageKit-zypp-parallel-package-downloads.patch:
zypp: Implement parallel downloading
(gh#PackageKit/PackageKit/commit/dd39d2982, bsc#1244920).
-------------------------------------------------------------------
Tue Oct 15 11:48:02 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@@ -1,7 +1,8 @@
#
# spec file for package PackageKit
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2026 Neal Gompa
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,23 +17,17 @@
#
%if 0%{?sle_version} && 0%{?sle_version} < 160000
%bcond_with offline_updates
%else
%bcond_without offline_updates
%endif
# Only make DNF backend available openSUSE Leap 15.1+
%if 0%{?sle_version} >= 150100 || 0%{?suse_version} >= 1550
%bcond_without dnf
# Only make DNF backend available openSUSE Leap 16+
%if 0%{?suse_version} >= 1600
%bcond_without dnf5
%bcond_with cnf
%else
%bcond_with dnf
%bcond_with dnf5
%bcond_with cnf
%endif
Name: PackageKit
Version: 1.2.8
Version: 1.3.3
Release: 0
Summary: Simple software installation management software
License: GPL-2.0-or-later
@@ -43,27 +38,14 @@ Source1: %{url}/releases/%{name}-%{version}.tar.xz.asc
Source3: PackageKit.tmpfiles
Source99: PackageKit.keyring
# PATCH-FEATURE-UPSTREAM PackageKit-1.3.3-Initial-DNF5-Backend.patch neal@gompa.dev -- Add DNF5 backend
Patch0: PackageKit-1.3.3-Initial-DNF5-Backend.patch
# PATCH-FEATURE-OPENSUSE PackageKit-systemd-timers.patch bsc#1115410 sckang@suse.com -- Migrate from cron to systemd timers
Patch1: PackageKit-systemd-timers.patch
# PATCH-FIX-OPENSUSE PackageKit-remove-polkit-rules.patch bsc#1125434 sckang@suse.com -- Remove polkit rules file
Patch2: PackageKit-remove-polkit-rules.patch
# PATCH-FIX-OPENSUSE PackageKit-dnf-Add-support-for-AppStream-repodata-basenames-use.patch ngompa13@gmail.com -- Band-aid to deal with OBS producing differently named appstream repodata files
Patch3: PackageKit-dnf-Add-support-for-AppStream-repodata-basenames-use.patch
# PATCH-FIX-UPSTREAM PackageKit-fix-crash-pre-dbus.patch gh#hughsie/PackageKit!436 -- Do not crash when calling pk_dbus_get_uid() before D-Bus is setup
Patch4: PackageKit-fix-crash-pre-dbus.patch
# PATCH-FIX-UPSTREAM PackageKit-zypp-disable-upgrade-system-in-sle.patch gh#PackageKit/PackageKit/commit/0fcd820c2 sckang@suse.com -- zypp: Disable upgrade-system support in SLE
Patch7: PackageKit-zypp-disable-upgrade-system-in-sle.patch
# PATCH-FIX-UPSTREAM PackageKit-fix-pkcon-permission.patch gh#PackageKit/PackageKit/commit/47b7f97bc, bsc#1209138 sckang@suse.com -- trivial: Drop unnecessary x permission
Patch15: PackageKit-fix-pkcon-permission.patch
# PATCH-FIX-UPSTREAM PackageKit-dynamic-export.patch boo#1213309 dimstar@opensuse.org -- Fix loading modules when built with glib 2.70
Patch16: PackageKit-dynamic-export.patch
# PATCH-FIX-UPSTREAM PackageKit-mark-as-compulsory.patch bsc#1226269 alynx.zhou@suse.com -- Prevent PackageKit from user uninstallable
Patch17: PackageKit-mark-as-compulsory.patch
# PATCH-FIX-UPSTREAM PackageKit-zypp-dont-install-updateCandidateObj.patch bsc#1227389, gh#PackageKit/PackageKit/commit/209aa6295 sckang@suse.com -- zypp: Mark the correct packages to-be-installed
Patch18: PackageKit-zypp-dont-install-updateCandidateObj.patch
# PATCH-FIX-SLE PackageKit-find-python-3-6.patch alynx.zhou@suse.com -- Build PackageKit with Python 3.6
Patch1001: PackageKit-find-python-3-6.patch
# PATCH-FIX-OPENSUSE PackageKit-alias-dnf-to-dnf5.patch ngompa@opensuse.org -- Handle replacing dnf with dnf5
Patch3: PackageKit-alias-dnf-to-dnf5.patch
BuildRequires: fdupes
BuildRequires: gcc-c++
@@ -75,10 +57,10 @@ BuildRequires: gtk3-devel
BuildRequires: intltool
BuildRequires: libarchive-devel
BuildRequires: libcppunit-devel
%if %{with dnf}
BuildRequires: appstream-glib-devel
BuildRequires: libdnf-devel >= 0.43.1
BuildRequires: pkgconfig(appstream)
%if %{with dnf5}
BuildRequires: libdnf5-devel >= 5.2.14.0
BuildRequires: rpm-devel >= 4.20
BuildRequires: sdbus-cpp-devel
%endif
BuildRequires: libgudev-1_0-devel
BuildRequires: libtool
@@ -133,21 +115,25 @@ all the software graphical tools used in different distributions, and
use some of the latest technology like PolicyKit to make the process
suck less.
%if %{with dnf}
%package backend-dnf
Summary: DNF backend for the PackageKit installation management software
%if %{with dnf5}
%package backend-dnf5
Summary: DNF5 backend for the PackageKit installation management software
License: GPL-2.0-or-later
Group: System/Daemons
Requires: %{name} = %{version}
Provides: %{name}-backend = %{version}
Conflicts: %{name}-backend
Supplements: (%{name} and dnf-data)
Obsoletes: %{name}-backend-dnf < %{version}
Provides: %{name}-backend-dnf = %{version}
Supplements: (%{name} and libdnf5)
Recommends: rpm-repos-openSUSE
Suggests: PackageKit-command-not-found
# Ensure AppStream repodata is processed
Requires: libdnf5-plugin-appstream
# Stricter dependency to keep things sane
%requires_ge %(rpm -qf "$(readlink -f %{_libdir}/libdnf.so)")
%requires_ge %(rpm -qf "$(readlink -f %{_libdir}/libdnf5.so)")
%description backend-dnf
%description backend-dnf5
PackageKit is a system designed to make installing and updating
software on your computer easier. The primary design goal is to unify
all the software graphical tools used in different distributions, and
@@ -160,7 +146,6 @@ suck less.
Summary: Command Not Found using PackageKit
License: GPL-2.0-or-later
Group: System/Daemons
Obsoletes: command-not-found
Provides: command-not-found
Conflicts: command-not-found
# zypp backend lacks full functionality for this to make sense
@@ -278,28 +263,17 @@ This package provides the upstream default configuration for PackageKit.
%lang_package
%prep
%setup -q
%patch -P 1 -p1
%patch -P 2 -p1
%patch -P 3 -p1
%patch -P 4 -p1
%patch -P 7 -p1
%patch -P 15 -p1
%patch -P 16 -p1
%patch -P 17 -p1
%patch -P 18 -p1
%if 0%{?sle_version} && 0%{?sle_version} < 160000
%patch -P 1001 -p1
%endif
%autosetup -p1
# XXX: Temporarily downgrade minimum version for dnf5
sed -e "s/5.2.17.0/5.2.14.0/g" -i backends/dnf5/meson.build
%build
%meson \
-Dgtk_doc=true \
-Dpython_backend=false \
-Dpackaging_backend=%{?with_dnf:dnf,}zypp \
%{?with_dnf:-Ddnf_vendor=opensuse} \
-Dpackaging_backend=%{?with_dnf5:dnf5,}zypp \
%{?with_dnf5:-Ddnf_vendor=opensuse} \
%{!?with_cnf:-Dbash_command_not_found=false} \
%{!?with_offline_updates:-Doffline_update=false} \
-Dcron=false \
-Dlocal_checkout=false \
-Ddbus_sys=%{_datadir}/dbus-1/system.d
@@ -308,16 +282,14 @@ This package provides the upstream default configuration for PackageKit.
%install
%meson_install
%if %{with offline_updates}
# enable packagekit-offline-updates.service here for now, till we
# decide how to do it upstream after the meson conversion:
# https://github.com/hughsie/PackageKit/issues/401
# https://bugzilla.redhat.com/show_bug.cgi?id=1833176
mkdir -p %{buildroot}%{_unitdir}/system-update.target.wants/
ln -sf ../packagekit-offline-update.service %{buildroot}%{_unitdir}/system-update.target.wants/packagekit-offline-update.service
%endif
# create a link that GStreamer will recognise
# create a link that GStreamer will recognize
pushd %{buildroot}%{_libexecdir} > /dev/null
ln -s pk-gstreamer-install gst-install-plugins-helper
popd > /dev/null
@@ -335,50 +307,35 @@ install -m 0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf
%pre
%service_add_pre packagekit.service
%service_add_pre packagekit-background.service packagekit-background.timer
%if %{with offline_updates}
%service_add_pre packagekit-offline-update.service
%endif
%post
%mime_database_post
%service_add_post packagekit.service
%service_add_post packagekit-background.service packagekit-background.timer
%if %{with offline_updates}
%service_add_post packagekit-offline-update.service
%else
if [ -L system-update ]; then
rm system-update
fi
if [ -f var/lib/PackageKit/prepared-update ]; then
rm var/lib/PackageKit/prepared-update
fi
%endif
%tmpfiles_create %_tmpfilesdir/%{name}.conf
%preun
%service_del_preun packagekit.service
%service_del_preun packagekit-background.service packagekit-background.timer
%if %{with offline_updates}
%service_del_preun packagekit-offline-update.service
%endif
%postun
%mime_database_postun
# Do not restart PackageKit on upgrade - it kills the transaction
%service_del_postun_without_restart packagekit.service
%service_del_postun_without_restart packagekit-background.service packagekit-background.timer
%if %{with offline_updates}
%service_del_postun_without_restart packagekit-offline-update.service
%endif
%post -n libpackagekit-glib2-18 -p /sbin/ldconfig
%postun -n libpackagekit-glib2-18 -p /sbin/ldconfig
%ldconfig_scriptlets -n libpackagekit-glib2-18
%files lang -f %{name}.lang
%files
%license COPYING
%doc AUTHORS HACKING NEWS README policy/org.freedesktop.packagekit.rules
%doc AUTHORS CONTRIBUTING NEWS README.md
%doc policy/org.freedesktop.packagekit.rules
%dir %{_sysconfdir}/PackageKit
%dir %{_datadir}/PackageKit
%dir %{_datadir}/PackageKit/helpers
@@ -404,12 +361,10 @@ install -m 0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf
%{_unitdir}/packagekit-background.timer
%{_mandir}/man?/*%{ext_man}
%{_tmpfilesdir}/PackageKit.conf
%if %{with offline_updates}
%{_libexecdir}/pk-offline-update
%{_unitdir}/packagekit-offline-update.service
%dir %{_unitdir}/system-update.target.wants
%{_unitdir}/system-update.target.wants/packagekit-offline-update.service
%endif
%ghost %dir %{_localstatedir}/lib/PackageKit
%ghost %dir %{_localstatedir}/cache/PackageKit
%ghost %{_localstatedir}/lib/PackageKit/transactions.db
@@ -417,11 +372,11 @@ install -m 0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf
%files backend-zypp
%{_libdir}/packagekit-backend/libpk_backend_zypp.so
%if %{with dnf}
%files backend-dnf
%{_libdir}/packagekit-backend/libpk_backend_dnf.so
%{_libexecdir}/packagekit-dnf-refresh-repo
%{python3_sitelib}/dnf-plugins/
%if %{with dnf5}
%files backend-dnf5
%{_libdir}/packagekit-backend/libpk_backend_dnf5.so
%{_libdir}/rpm-plugins/notify_packagekit.so
%{_rpmmacrodir}/macros.transaction_notify_packagekit
%endif
%if %{with cnf}