[packages/PackageKit] - up to 1.1.13
arekm
arekm at pld-linux.org
Tue Mar 3 11:51:44 CET 2020
commit 783c79a35b68774676c30e8eabe97e8fdbf70647
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Tue Mar 3 11:51:38 2020 +0100
- up to 1.1.13
PackageKit-format.patch | 111 ----------------------------------------------
PackageKit-poldek.patch | 20 +++++++++
PackageKit-zypp.patch | 59 ------------------------
PackageKit.spec | 21 +++------
consolekit-fallback.patch | 26 ++++++-----
5 files changed, 40 insertions(+), 197 deletions(-)
---
diff --git a/PackageKit.spec b/PackageKit.spec
index 0a7a49f..d5c45d7 100644
--- a/PackageKit.spec
+++ b/PackageKit.spec
@@ -28,17 +28,16 @@
Summary: System daemon that is a D-Bus abstraction layer for package management
Summary(pl.UTF-8): Demon systemowy będący warstwą abstrakcji D-Bus do zarządzania pakietami
Name: PackageKit
-Version: 1.0.11
-Release: 3
+Version: 1.1.13
+Release: 1
License: GPL v2+
Group: Applications/System
Source0: https://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
-# Source0-md5: f7ab847e87328d4bee155bcada10dcba
+# Source0-md5: 7635892baa047639cf5590d6f57324c1
Patch0: %{name}-poldek.patch
Patch1: %{name}-bashcomp.patch
-Patch2: %{name}-format.patch
+
Patch3: consolekit-fallback.patch
-Patch4: %{name}-zypp.patch
URL: https://www.freedesktop.org/software/PackageKit/
BuildRequires: NetworkManager-devel >= 0.6.5
# pkgconfig(libalpm) >= 8.2.0
@@ -441,9 +440,8 @@ Wtyczka PackageKit do przeglądarek WWW.
%setup -q
%patch0 -p1
%patch1 -p1
-%patch2 -p1
+
%patch3 -p1
-%patch4 -p1
%build
%if %{with doc}
@@ -499,13 +497,6 @@ ln -s pk-gstreamer-install $RPM_BUILD_ROOT%{_libdir}/gst-install-plugins-helper
%{__rm} $RPM_BUILD_ROOT%{_browserpluginsdir}/*.{la,a}
%endif
-# empty version of bg
-%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/bg_BG
-# empty version of fa (empty as well BTW)
-%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/fa_IR
-# outdated copy of it
-%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/it_IT
-
%py_postclean
%find_lang %{name}
@@ -688,7 +679,7 @@ fi
%files gstreamer-plugin
%defattr(644,root,root,755)
%doc contrib/gstreamer-plugin/README
-%attr(755,root,root) %{_libexecdir}/gst-install-plugins-helper
+%attr(755,root,root) %{_libdir}/gst-install-plugins-helper
%attr(755,root,root) %{_libexecdir}/pk-gstreamer-install
%files gtk-module
diff --git a/PackageKit-format.patch b/PackageKit-format.patch
deleted file mode 100644
index a52caa5..0000000
--- a/PackageKit-format.patch
+++ /dev/null
@@ -1,111 +0,0 @@
---- PackageKit-1.0.5/backends/zypp/pk-backend-zypp.cpp.orig 2014-12-15 16:21:39.000000000 +0100
-+++ PackageKit-1.0.5/backends/zypp/pk-backend-zypp.cpp 2015-02-21 11:57:31.071358228 +0100
-@@ -273,7 +273,7 @@
- }
-
- virtual Action problem (zypp::Resolvable::constPtr resolvable, Error error, const std::string &description, RpmLevel level) {
-- pk_backend_job_error_code (_job, PK_ERROR_ENUM_PACKAGE_FAILED_TO_INSTALL, description.c_str ());
-+ pk_backend_job_error_code (_job, PK_ERROR_ENUM_PACKAGE_FAILED_TO_INSTALL, "%s", description.c_str ());
- return ABORT;
- }
-
-@@ -308,7 +308,7 @@
- }
-
- virtual Action problem (zypp::Resolvable::constPtr resolvable, Error error, const std::string &description) {
-- pk_backend_job_error_code (_job, PK_ERROR_ENUM_CANNOT_REMOVE_SYSTEM_PACKAGE, description.c_str ());
-+ pk_backend_job_error_code (_job, PK_ERROR_ENUM_CANNOT_REMOVE_SYSTEM_PACKAGE, "%s", description.c_str ());
- return ABORT;
- }
-
-@@ -407,7 +407,7 @@
- {
- virtual Action requestMedia (zypp::Url &url, unsigned mediaNr, const std::string &label, zypp::media::MediaChangeReport::Error error, const std::string &description, const std::vector<std::string> & devices, unsigned int &dev_current)
- {
-- pk_backend_job_error_code (_job, PK_ERROR_ENUM_REPO_NOT_AVAILABLE, description.c_str ());
-+ pk_backend_job_error_code (_job, PK_ERROR_ENUM_REPO_NOT_AVAILABLE, "%s", description.c_str ());
- // We've to abort here, because there is currently no feasible way to inform the user to insert/change media
- return ABORT;
- }
-@@ -597,10 +597,10 @@
- initialized = TRUE;
- }
- } catch (const ZYppFactoryException &ex) {
-- pk_backend_job_error_code (priv->currentJob, PK_ERROR_ENUM_FAILED_INITIALIZATION, ex.asUserString().c_str() );
-+ pk_backend_job_error_code (priv->currentJob, PK_ERROR_ENUM_FAILED_INITIALIZATION, "%s", ex.asUserString().c_str() );
- return NULL;
- } catch (const Exception &ex) {
-- pk_backend_job_error_code (priv->currentJob, PK_ERROR_ENUM_INTERNAL_ERROR, ex.asUserString().c_str() );
-+ pk_backend_job_error_code (priv->currentJob, PK_ERROR_ENUM_INTERNAL_ERROR, "%s", ex.asUserString().c_str() );
- return NULL;
- }
-
-@@ -966,7 +966,7 @@
- RepoManager manager;
- info = manager.getRepositoryInfo (alias);
- } catch (const repo::RepoNotFoundException &ex) {
-- pk_backend_job_error_code (job, PK_ERROR_ENUM_REPO_NOT_FOUND, ex.asUserString().c_str() );
-+ pk_backend_job_error_code (job, PK_ERROR_ENUM_REPO_NOT_FOUND, "%s", ex.asUserString().c_str() );
- return RepoInfo ();
- }
-
-@@ -1411,7 +1411,7 @@
- it->statusReset ();
- }
-
-- pk_backend_job_error_code (job, PK_ERROR_ENUM_DEP_RESOLUTION_FAILED, emsg);
-+ pk_backend_job_error_code (job, PK_ERROR_ENUM_DEP_RESOLUTION_FAILED, "%s", emsg);
- g_free (emsg);
-
- goto exit;
-@@ -1538,11 +1538,11 @@
- pk_backend_job_set_percentage(job, 100);
- ret = TRUE;
- } catch (const repo::RepoNotFoundException &ex) {
-- pk_backend_job_error_code (job, PK_ERROR_ENUM_REPO_NOT_FOUND, ex.asUserString().c_str() );
-+ pk_backend_job_error_code (job, PK_ERROR_ENUM_REPO_NOT_FOUND, "%s", ex.asUserString().c_str() );
- } catch (const target::rpm::RpmException &ex) {
-- pk_backend_job_error_code (job, PK_ERROR_ENUM_PACKAGE_DOWNLOAD_FAILED, ex.asUserString().c_str () );
-+ pk_backend_job_error_code (job, PK_ERROR_ENUM_PACKAGE_DOWNLOAD_FAILED, "%s", ex.asUserString().c_str () );
- } catch (const Exception &ex) {
-- pk_backend_job_error_code (job, PK_ERROR_ENUM_INTERNAL_ERROR, ex.asUserString().c_str() );
-+ pk_backend_job_error_code (job, PK_ERROR_ENUM_INTERNAL_ERROR, "%s", ex.asUserString().c_str() );
- }
-
- exit:
-@@ -1601,7 +1601,7 @@
- catch ( const Exception &e)
- {
- // FIXME: make sure this dumps out the right sring.
-- pk_backend_job_error_code (job, PK_ERROR_ENUM_REPO_NOT_FOUND, e.asUserString().c_str() );
-+ pk_backend_job_error_code (job, PK_ERROR_ENUM_REPO_NOT_FOUND, "%s", e.asUserString().c_str() );
- return FALSE;
- }
-
-@@ -1651,7 +1651,7 @@
- pk_backend_job_set_percentage (job, i >= num_of_repos ? 100 : (100 * i) / num_of_repos);
- }
- if (repo_messages != NULL)
-- g_printf(repo_messages);
-+ g_printf("%s", repo_messages);
-
- pk_backend_job_set_percentage (job, 100);
- g_free (repo_messages);
-@@ -2373,7 +2373,7 @@
- try {
- manager.removeRepository (tmpRepo);
- } catch (const repo::RepoNotFoundException &ex) {
-- pk_backend_job_error_code (job, PK_ERROR_ENUM_REPO_NOT_FOUND, ex.asUserString().c_str() );
-+ pk_backend_job_error_code (job, PK_ERROR_ENUM_REPO_NOT_FOUND, "%s", ex.asUserString().c_str() );
- }
- }
-
-@@ -3308,7 +3308,7 @@
- } catch (const repo::RepoException &ex) {
- pk_backend_job_error_code (job, PK_ERROR_ENUM_INTERNAL_ERROR, "Can't access the given URL");
- } catch (const Exception &ex) {
-- pk_backend_job_error_code (job, PK_ERROR_ENUM_INTERNAL_ERROR, ex.asString ().c_str ());
-+ pk_backend_job_error_code (job, PK_ERROR_ENUM_INTERNAL_ERROR, "%s", ex.asString ().c_str ());
- }
- }
-
diff --git a/PackageKit-poldek.patch b/PackageKit-poldek.patch
index 5b635aa..0e21284 100644
--- a/PackageKit-poldek.patch
+++ b/PackageKit-poldek.patch
@@ -9,3 +9,23 @@
} else {
if (pri & LOGERR) {
g_string_append_printf (pberror->tslog, "error: %s", message);
+--- PackageKit-1.1.13/backends/poldek/pk-backend-poldek.c~ 2020-03-03 11:43:32.000000000 +0100
++++ PackageKit-1.1.13/backends/poldek/pk-backend-poldek.c 2020-03-03 11:46:06.324485256 +0100
+@@ -979,7 +979,7 @@ poldek_get_nvra_from_package_id (const g
+ static tn_array*
+ poldek_get_installed_packages (void)
+ {
+- return poclidek_get_dent_packages (priv->cctx, POCLIDEK_INSTALLEDDIR);
++ return poclidek_get_dent_packages (priv->cctx, POCLIDEK_INSTALLEDDIR, 0);
+ }
+
+ static tn_array*
+@@ -2723,7 +2723,7 @@ get_obsoletedby_pkg (struct pkg *pkg)
+ obsoletes = g_ptr_array_new ();
+
+ /* get installed packages */
+- dbpkgs = poclidek_get_dent_packages (priv->cctx, POCLIDEK_INSTALLEDDIR);
++ dbpkgs = poclidek_get_dent_packages (priv->cctx, POCLIDEK_INSTALLEDDIR, 0);
+
+ if (dbpkgs == NULL)
+ return NULL;
diff --git a/PackageKit-zypp.patch b/PackageKit-zypp.patch
deleted file mode 100644
index 148e1dc..0000000
--- a/PackageKit-zypp.patch
+++ /dev/null
@@ -1,59 +0,0 @@
---- PackageKit-1.0.11/backends/zypp/pk-backend-zypp.cpp.orig 2015-11-30 17:18:58.487752181 +0100
-+++ PackageKit-1.0.11/backends/zypp/pk-backend-zypp.cpp 2015-11-30 17:45:58.811017517 +0100
-@@ -3577,7 +3577,6 @@
- const gchar *proxy_http;
- const gchar *proxy_https;
- const gchar *proxy_ftp;
-- const gchar *uri;
- const gchar *proxy_socks;
- const gchar *no_proxy;
- const gchar *pac;
-@@ -3590,33 +3589,29 @@
- /* http_proxy */
- proxy_http = pk_backend_job_get_proxy_http (job);
- if (!pk_strzero (proxy_http)) {
-- uri = pk_backend_convert_uri (proxy_http);
-+ _cleanup_free_ gchar *uri = pk_backend_convert_uri (proxy_http);
- g_setenv ("http_proxy", uri, TRUE);
-- g_free (uri);
- }
-
- /* https_proxy */
- proxy_https = pk_backend_job_get_proxy_https (job);
- if (!pk_strzero (proxy_https)) {
-- uri = pk_backend_convert_uri (proxy_https);
-+ _cleanup_free_ gchar *uri = pk_backend_convert_uri (proxy_https);
- g_setenv ("https_proxy", uri, TRUE);
-- g_free (uri);
- }
-
- /* ftp_proxy */
- proxy_ftp = pk_backend_job_get_proxy_ftp (job);
- if (!pk_strzero (proxy_ftp)) {
-- uri = pk_backend_convert_uri (proxy_ftp);
-+ _cleanup_free_ gchar *uri = pk_backend_convert_uri (proxy_ftp);
- g_setenv ("ftp_proxy", uri, TRUE);
-- g_free (uri);
- }
-
- /* socks_proxy */
- proxy_socks = pk_backend_job_get_proxy_socks (job);
- if (!pk_strzero (proxy_socks)) {
-- uri = pk_backend_convert_uri (proxy_socks);
-+ _cleanup_free_ gchar *uri = pk_backend_convert_uri (proxy_socks);
- g_setenv ("socks_proxy", uri, TRUE);
-- g_free (uri);
- }
-
- /* no_proxy */
-@@ -3628,9 +3623,8 @@
- /* pac */
- pac = pk_backend_job_get_pac (job);
- if (!pk_strzero (pac)) {
-- uri = pk_backend_convert_uri (pac);
-+ _cleanup_free_ gchar *uri = pk_backend_convert_uri (pac);
- g_setenv ("pac", uri, TRUE);
-- g_free (uri);
- }
- }
-
diff --git a/consolekit-fallback.patch b/consolekit-fallback.patch
index cca8f94..1bb6948 100644
--- a/consolekit-fallback.patch
+++ b/consolekit-fallback.patch
@@ -1,40 +1,42 @@
---- PackageKit-1.0.7/src/pk-dbus.c~ 2015-04-22 11:54:49.000000000 +0200
-+++ PackageKit-1.0.7/src/pk-dbus.c 2015-08-02 12:57:29.398321174 +0200
+--- PackageKit-1.1.13/src/pk-dbus.c.orig 2018-12-14 10:05:15.000000000 +0100
++++ PackageKit-1.1.13/src/pk-dbus.c 2020-03-03 11:41:02.148537933 +0100
@@ -28,6 +28,7 @@
#include <gio/gio.h>
- #ifdef HAVE_SYSTEMD
+ #ifdef HAVE_SYSTEMD_SD_LOGIN_H
+ #include <systemd/sd-daemon.h>
#include <systemd/sd-login.h>
#endif
-@@ -222,9 +222,7 @@
+@@ -218,9 +219,7 @@ gchar *
pk_dbus_get_session (PkDbus *dbus, const gchar *sender)
{
gchar *session = NULL;
--#ifndef HAVE_SYSTEMD
- _cleanup_error_free_ GError *error = NULL;
+-#ifndef HAVE_SYSTEMD_SD_LOGIN_H
+ g_autoptr(GError) error = NULL;
-#endif
guint pid;
- _cleanup_variant_unref_ GVariant *value = NULL;
+ g_autoptr(GVariant) value = NULL;
-@@ -252,8 +254,10 @@
+@@ -249,10 +248,12 @@ pk_dbus_get_session (PkDbus *dbus, const
/* get session from systemd or ConsoleKit */
- #ifdef HAVE_SYSTEMD
-+ if (sd_booted () > 0) {
+ #ifdef HAVE_SYSTEMD_SD_LOGIN_H
++ if (sd_booted () > 0) {
session = pk_dbus_get_session_systemd (pid);
+ if (session == NULL)
+ g_warning ("failed to get session for pid %u", pid);
-#else
+ } else {
+#endif
/* get session from ConsoleKit */
value = g_dbus_proxy_call_sync (dbus->priv->proxy_session,
"GetSessionForUnixProcess",
-@@ -269,6 +273,8 @@
+@@ -268,6 +269,8 @@ pk_dbus_get_session (PkDbus *dbus, const
goto out;
}
g_variant_get (value, "(o)", &session);
-+#ifdef HAVE_SYSTEMD
++#ifdef HAVE_SYSTEMD_SD_LOGIN_H
+ }
#endif
out:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/PackageKit.git/commitdiff/783c79a35b68774676c30e8eabe97e8fdbf70647
More information about the pld-cvs-commit
mailing list