set ShutdownTimeout=60 by default in PackageKit.conf [release 1.2.6-2mamba;Wed Feb 01 2023]

This commit is contained in:
Silvan Calarco 2024-01-05 17:51:45 +01:00
parent 62515e5acc
commit c19bc796e2
13 changed files with 21 additions and 345 deletions

View File

@ -1,28 +0,0 @@
From 11872c12358cb3ec1491c5309280f548d04aa00e Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard@hughsie.com>
Date: Tue, 15 Mar 2011 11:08:58 +0000
Subject: [PATCH] Fix a crash where the error code was pointing to freed memory. Fixes rh#684464
---
src/pk-transaction.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index 5dd4577..34ded99 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -1874,8 +1874,9 @@ pk_transaction_set_running (PkTransaction *transaction)
/* set proxy */
ret = pk_transaction_set_session_state (transaction, &error);
if (!ret) {
- g_debug ("failed to set the session state (non-fatal): %s", error->message);
- g_error_free (error);
+ g_debug ("failed to set the session state (non-fatal): %s",
+ error->message);
+ g_clear_error (&error);
}
/* we are no longer waiting, we are setting up */
--
1.6.1

View File

@ -1,26 +0,0 @@
From a32482c30d3760ed5a158d4cad7c1f2a569b49ae Mon Sep 17 00:00:00 2001
From: Dimitar Popov <dimitar.georgiev.popov@googlemail.com>
Date: Mon, 14 Mar 2011 15:12:06 +0000
Subject: [PATCH] qt: Fix typo in SearchGroups
Signed-off-by: Richard Hughes <richard@hughsie.com>
---
lib/packagekit-qt/src/transaction.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/packagekit-qt/src/transaction.cpp b/lib/packagekit-qt/src/transaction.cpp
index fad5255..c08d638 100644
--- a/lib/packagekit-qt/src/transaction.cpp
+++ b/lib/packagekit-qt/src/transaction.cpp
@@ -528,7 +528,7 @@ void Transaction::searchGroups(Enum::Groups groups, Enum::Filters filters)
groupsSL << Util::enumToString<Enum>(group, "Group", "Group");
}
- searchGroups(groups, filters);
+ searchGroups(groupsSL, filters);
}
void Transaction::searchGroups(Enum::Group group, Enum::Filters filters)
--
1.6.1

View File

@ -1,13 +0,0 @@
diff -Nru PackageKit-0.6.13.orig//backends/smart/smartBackend.py PackageKit-0.6.13/backends/smart/smartBackend.py
--- PackageKit-0.6.13.orig//backends/smart/smartBackend.py 2011-04-24 17:46:40.515400442 +0200
+++ PackageKit-0.6.13/backends/smart/smartBackend.py 2011-04-24 17:47:09.923720527 +0200
@@ -403,8 +403,7 @@
continue
info = loader.getInfo(package)
if hasattr(info, 'getChangeLog'):
- changelog = info.getChangeLog()
- changelog = ';'.join(changelog)
+ changelog = info.getChangeLog()[0] + ';' + info.getChangeLog()[1]
if hasattr(loader, 'getErrata'):
errata = loader.getErrata(package)

View File

@ -1,14 +0,0 @@
diff -Nru PackageKit-0.6.13.orig//backends/smart/smartBackend.py PackageKit-0.6.13/backends/smart/smartBackend.py
--- PackageKit-0.6.13.orig//backends/smart/smartBackend.py 2011-04-24 15:46:32.744153747 +0200
+++ PackageKit-0.6.13/backends/smart/smartBackend.py 2011-04-24 15:47:05.073518384 +0200
@@ -912,9 +912,9 @@
def _best_package_from_list(self, package_list):
for installed in (True, False):
best = None
for package in package_list:
- if not best or package > best:
+ if not best or (package.installed and not best.installed):
best = package
if best:
return best

View File

@ -1,14 +0,0 @@
diff -Nru PackageKit-0.6.21.orig/lib/python/packagekit/backend.py PackageKit-0.6.21/lib/python/packagekit/backend.py
--- PackageKit-0.6.21.orig/lib/python/packagekit/backend.py 2011-12-05 11:02:02.000000000 +0100
+++ PackageKit-0.6.21/lib/python/packagekit/backend.py 2011-12-12 20:05:54.663934072 +0100
@@ -91,8 +91,8 @@
def __init__(self, cmds):
# Make sys.stdout/stderr cope with UTF-8
- sys.stdout = _UTF8Writer(sys.stdout)
- sys.stderr = _UTF8Writer(sys.stderr)
+ #sys.stdout = _UTF8Writer(sys.stdout)
+ #sys.stderr = _UTF8Writer(sys.stderr)
# Setup a custom exception handler
installExceptionHandler(self)

View File

@ -1,20 +0,0 @@
--- PackageKit-0.6.21.orig/contrib/browser-plugin/pk-main.c 2011-12-05 11:23:45.000000000 +0100
+++ PackageKit-0.6.21/contrib/browser-plugin/pk-main.c 2011-12-12 04:01:55.094124426 +0100
@@ -541,17 +541,6 @@
}
/**
- * NP_GetMIMEDescription:
- **/
-const char *
-NP_GetMIMEDescription (void)
-{
- pk_debug ("NP_GetMIMEDescription");
-
- return (gchar*) "application/x-packagekit-plugin:bsc:PackageKit Plugin";
-}
-
-/**
* NP_GetValue:
**/
NPError

View File

@ -1,18 +0,0 @@
diff -Nru PackageKit-0.6.22.orig/lib/python/packagekit/backend.py PackageKit-0.6.22/lib/python/packagekit/backend.py
--- PackageKit-0.6.22.orig/lib/python/packagekit/backend.py 2012-08-21 17:30:49.780155890 +0200
+++ PackageKit-0.6.22/lib/python/packagekit/backend.py 2012-08-21 17:32:29.138192772 +0200
@@ -845,12 +845,13 @@
# Call backend custom Traceback handler
if not base.customTracebackHandler(typ):
etb = traceback.extract_tb(tb)
- errmsg = 'Error Type: %s;' % str(typ)
+ errmsg = '<html>Error Type: %s;' % str(typ)
errmsg += 'Error Value: %s;' % str(value)
for tub in etb:
f, l, m, c = tub # file, lineno, function, codeline
errmsg += ' File : %s, line %s, in %s;' % (f, str(l), m)
errmsg += ' %s;' % c
+ errmsg += '</html>'
# send the traceback to PackageKit
base.error(ERROR_INTERNAL_ERROR, errmsg, exit=True)

View File

@ -1,11 +0,0 @@
--- PackageKit-0.8.11/backends/smart/pk-backend-smart.c.orig 2013-09-23 17:36:30.145979165 +0200
+++ PackageKit-0.8.11/backends/smart/pk-backend-smart.c 2013-09-23 17:36:57.691715613 +0200
@@ -324,7 +324,7 @@
/* send the complete list as stdin */
package_ids_temp = pk_package_ids_to_string (package_ids);
transaction_flags_temp = pk_transaction_flag_bitfield_to_string (transaction_flags);
- pk_backend_spawn_helper (spawn, job, BACKEND_FILE, "remove-packages", transaction_flags_temp, package_ids_temp, pk_backend_bool_to_string (autoremove), NULL);
+ pk_backend_spawn_helper (spawn, job, BACKEND_FILE, "remove-packages", transaction_flags_temp, package_ids_temp, pk_backend_bool_to_string(allow_deps), pk_backend_bool_to_string (autoremove), NULL);
g_free (package_ids_temp);
g_free (transaction_flags_temp);
}

View File

@ -1,59 +0,0 @@
diff -Nru PackageKit-0.8.7.orig/backends/smart/smartBackend.py PackageKit-0.8.7/backends/smart/smartBackend.py
--- PackageKit-0.8.7.orig/backends/smart/smartBackend.py 2013-03-06 15:22:47.965497048 +0100
+++ PackageKit-0.8.7/backends/smart/smartBackend.py 2013-03-06 19:34:16.385058826 +0100
@@ -172,9 +172,6 @@
@needs_cache
def install_packages(self, transaction_flags, packageids):
- if TRANSACTION_FLAG_ONLY_TRUSTED in transaction_flags:
- self.error(ERROR_MISSING_GPG_SIGNATURE, "Trusted packages not available.")
- return
packages = []
for packageid in packageids:
ratio, results, suggestions = self._search_packageid(packageid)
@@ -211,9 +208,6 @@
@needs_cache
def install_files(self, transaction_flags, paths):
- if TRANSACTION_FLAG_ONLY_TRUSTED in transaction_flags:
- self.error(ERROR_MISSING_GPG_SIGNATURE, "Trusted packages not available.")
- return
for path in paths:
self.ctrl.addFileChannel(path)
self.ctrl.reloadChannels()
@@ -280,9 +274,6 @@
@needs_cache
def update_packages(self, transaction_flags, packageids):
- if TRANSACTION_FLAG_ONLY_TRUSTED in transaction_flags:
- self.error(ERROR_MISSING_GPG_SIGNATURE, "Trusted packages not available.")
- return
packages = []
for packageid in packageids:
ratio, results, suggestions = self._search_packageid(packageid)
@@ -292,13 +283,13 @@
'Package %s was not found' % packagestring)
packages.extend(self._process_search_results(results))
- installed = [package for package in packages if package.installed]
+ installed = [package for package in packages]
if len(installed) < 1:
return
trans = smart.transaction.Transaction(self.ctrl.getCache(),
smart.transaction.PolicyUpgrade)
for package in installed:
- trans.enqueue(package, smart.transaction.UPGRADE)
+ trans.enqueue(package, smart.transaction.INSTALL)
self.allow_cancel(False)
self.status(STATUS_DEP_RESOLVE)
@@ -334,9 +325,6 @@
@needs_cache
def update_system(self, transaction_flags):
- if TRANSACTION_FLAG_ONLY_TRUSTED in transaction_flags:
- self.error(ERROR_MISSING_GPG_SIGNATURE, "Trusted packages not available.")
- return
self.status(STATUS_INFO)
cache = self.ctrl.getCache()

View File

@ -1,59 +0,0 @@
--- PackageKit-0.7.3/backends/smart/pk-backend-smart.c.orig 2012-04-09 15:51:47.815045302 +0200
+++ PackageKit-0.7.3/backends/smart/pk-backend-smart.c 2012-04-09 15:52:44.828441254 +0200
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include <stdio.h>
#include <pk-backend.h>
#include <pk-backend-spawn.h>
@@ -492,6 +493,22 @@
}
/**
+ * pk_backend_what_provides:
+ */
+static void
+backend_what_provides (PkBackend *backend, PkBitfield filters, gchar **values)
+{
+ gchar *search_tmp;
+ gchar *filters_text;
+
+ filters_text = pk_filter_bitfield_to_string (filters);
+ search_tmp = g_strjoinv ("&", values);
+ pk_backend_spawn_helper (spawn, BACKEND_FILE, "what-provides", filters_text, "any", search_tmp, NULL);
+ g_free (filters_text);
+ g_free (search_tmp);
+}
+
+/**
* pk_backend_get_description:
*/
gchar *
--- PackageKit-0.6.13.orig//backends/smart/smartBackend.py 2011-04-24 13:53:16.796854052 +0200
+++ PackageKit-0.6.13/backends/smart/smartBackend.py 2011-04-24 15:03:58.644185808 +0200
@@ -551,6 +551,23 @@
self._post_process_package_list(filters)
self._show_package_list()
+ @needs_cache
+ def what_provides(self, filters, provides_type, values):
+ self.status(STATUS_QUERY)
+ self.allow_cancel(True)
+ if provides_type != PROVIDES_ANY:
+ self.error(ERROR_NOT_SUPPORTED,
+ "provide %s not supported" % provides_type)
+ return
+ for value in values:
+ providers = self.ctrl.getCache().getProvides(value)
+ for provider in providers:
+ for package in provider.packages:
+ if self._package_passes_filters(package, filters):
+ self._add_package(package)
+ self._post_process_package_list(filters)
+ self._show_package_list()
+
def refresh_cache(self, force):
# TODO: use force ?
self.status(STATUS_REFRESH_CACHE)

View File

@ -1,63 +0,0 @@
diff -Nru PackageKit-0.9.5.orig/backends/smart/smartBackend.py PackageKit-0.9.5/backends/smart/smartBackend.py
--- PackageKit-0.9.5.orig/backends/smart/smartBackend.py 2015-08-19 00:28:41.888881409 +0200
+++ PackageKit-0.9.5/backends/smart/smartBackend.py 2015-08-19 00:29:05.737801008 +0200
@@ -204,7 +204,10 @@
else:
self.status(STATUS_INSTALL)
self._packagesdict = trans.getChangeSet()
- self.ctrl.commitTransaction(trans, confirm=False)
+ try:
+ self.ctrl.commitTransaction(trans, confirm=False)
+ except smart.Error, e:
+ self.error(ERROR_PACKAGE_FAILED_TO_INSTALL, e, exit=False)
@needs_cache
def install_files(self, transaction_flags, paths):
@@ -230,7 +233,10 @@
else:
self.status(STATUS_INSTALL)
self._packagesdict = trans.getChangeSet()
- self.ctrl.commitTransaction(trans, confirm=False)
+ try:
+ self.ctrl.commitTransaction(trans, confirm=False)
+ except smart.Error, e:
+ self.error(ERROR_PACKAGE_FAILED_TO_INSTALL, e, exit=False)
@needs_cache
def remove_packages(self, transaction_flags, packageids, allow_deps, autoremove):
@@ -270,7 +276,10 @@
else:
self.status(STATUS_REMOVE)
self._packagesdict = trans.getChangeSet()
- self.ctrl.commitTransaction(trans, confirm=False)
+ try:
+ self.ctrl.commitTransaction(trans, confirm=False)
+ except smart.Error, e:
+ self.error(ERROR_PACKAGE_FAILED_TO_REMOVE, e, exit=False)
@needs_cache
def update_packages(self, transaction_flags, packageids):
@@ -299,7 +308,10 @@
else:
self.status(STATUS_UPDATE)
self._packagesdict = trans.getChangeSet()
- self.ctrl.commitTransaction(trans, confirm=False)
+ try:
+ self.ctrl.commitTransaction(trans, confirm=False)
+ except smart.Error, e:
+ self.error(ERROR_PACKAGE_FAILED_TO_INSTALL, e, exit=False)
@needs_cache
def download_packages(self, directory, packageids):
@@ -344,7 +356,10 @@
return
self.status(STATUS_UPDATE)
self._packagesdict = trans.getChangeSet()
- self.ctrl.commitTransaction(trans, confirm=False)
+ try:
+ self.ctrl.commitTransaction(trans, confirm=False)
+ except smart.Error, e:
+ self.error(ERROR_PACKAGE_FAILED_TO_INSTALL, e, exit=False)
@needs_cache
def get_updates(self, filters):

View File

@ -0,0 +1,11 @@
--- PackageKit-1.2.6/etc/PackageKit.conf.orig 2023-02-01 12:11:24.811865246 +0100
+++ PackageKit-1.2.6/etc/PackageKit.conf 2023-02-01 12:11:37.548813834 +0100
@@ -15,7 +15,7 @@
#BackendShutdownTimeout=5
# Shut down the daemon after this many seconds idle. 0 means don't shutdown.
-#ShutdownTimeout=300
+ShutdownTimeout=60
# Keep the packages after they have been downloaded
#KeepCache=false

View File

@ -1,6 +1,6 @@
Name: PackageKit
Version: 1.2.6
Release: 1mamba
Release: 2mamba
Summary: A system designed to make installing and updating software on your computer easier
Group: System/Management
Vendor: openmamba
@ -11,22 +11,12 @@ Source: http://www.freedesktop.org/software/PackageKit/releases/PackageKi
Patch0: %{name}-0.6.6-openmamba-groups.patch
Patch1: %{name}-1.1.6-openmamba-Vendor.conf.patch
Patch2: %{name}-0.6.9-command_not_found_raise_timeout.patch
Patch3: %{name}-0.9.1-smart-what_provides.patch
Patch4: %{name}-0.6.13-smartBackend_fix_best_package.patch
Patch5: %{name}-0.6.13-smartBackend_fix_Changelog.patch
Patch6: %{name}-0.6.13-qt_fix_searchGroups.patch
Patch7: %{name}-0.6.13-pk-transaction_fix_crash.patch
Patch8: %{name}-0.8.7-smartBackend-fix_trust_and_upgrade.patch
Patch9: %{name}-0.6.21-xulrunner-7.patch
Patch10: %{name}-0.6.21-revert_utf8_for_smart.patch
Patch11: PackageKit-0.6.22-display_smart_errors_as_html.patch
Patch12: PackageKit-0.8.11-smartBackend-fix-remove-packages.patch
Patch13: PackageKit-0.9.5-smartBackend-correctly-raise-exceptions.patch
Patch14: PackageKit-1.1.6-yumBackend-override_sigchecks.patch
Patch15: PackageKit-1.2.0-dnf-openmamba.patch
Patch16: PackageKit-1.1.12-dnf-repos-dir.patch
Patch17: PackageKit-1.1.12-dnf-disable-trusted-packages-check.patch
Patch18: PackageKit-1.1.12-upstream-dnf-invalidate-the-sack-cache-after-downloading-new-metadata.patch
Patch19: PackageKit-1.2.6-enable-ShutdownTimeout.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -61,8 +51,7 @@ Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description devel
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 use some of the latest technology like PolicyKit to make the process suck less.
This package contains static libraries and header files need for development.
This package contains static libraries and header files needed for development.
%package glib
Summary: glib interface library for %{name}
@ -71,7 +60,6 @@ Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description glib
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 use some of the latest technology like PolicyKit to make the process suck less.
This package contains the glib interface library for %{name}.
%package glib-devel
@ -82,8 +70,7 @@ Requires: %{name}-glib = %{?epoch:%epoch:}%{version}-%{release}
%description glib-devel
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 use some of the latest technology like PolicyKit to make the process suck less.
This package contains static libraries and header files need for development.
This package contains static libraries and header files needed for development.
%package gtk
Summary: Gtk interface library for %{name}
@ -91,11 +78,10 @@ Group: System/Libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: %{name}-glib = %{?epoch:%epoch:}%{version}-%{release}
Provides: PackageKit-gtk2
Obsoletes: PackageKit-gtk2
Obsoletes: PackageKit-gtk2 < 1.2.6
%description gtk
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 use some of the latest technology like PolicyKit to make the process suck less.
This package contains the Gtk interface library for %{name}.
%debug_package
@ -108,6 +94,7 @@ This package contains the Gtk interface library for %{name}.
#%patch16 -p1
%patch17 -p1
#%patch18 -p1
%patch19 -p1
sed -i "s|openmandriva|openmamba|" meson_options.txt
@ -140,7 +127,7 @@ install -d -m0755 %{buildroot}/var/cache/PackageKit
%files -f %{name}.lang
%defattr(-,root,root)
%{_sysconfdir}/PackageKit/*.conf
%config %{_sysconfdir}/PackageKit/*.conf
%{_sysconfdir}/cron.daily/packagekit-background.cron
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.PackageKit.conf
%{_sysconfdir}/profile.d/PackageKit.sh
@ -200,6 +187,9 @@ install -d -m0755 %{buildroot}/var/cache/PackageKit
%doc NEWS README
%changelog
* Wed Feb 01 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2.6-2mamba
- set ShutdownTimeout=60 by default in PackageKit.conf
* Fri Dec 02 2022 Automatic Build System <autodist@mambasoft.it> 1.2.6-1mamba
- automatic version update by autodist