From a33fc582898332f610bac7a8f7229de09d3e49be Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 25 Sep 2018 10:03:36 +0100 Subject: [PATCH] New upstream release --- .gitignore | 1 + ...callbacks-on-PkClientHelper-finalize.patch | 276 ------------------ ...e-shut-down-services-cleanly-before-.patch | 79 ----- ...sage-of-FALSE-when-it-should-be-NULL.patch | 34 --- ...utdown-the-daemon-on-idle-by-default.patch | 36 --- 0005-Reflect-latest-changes-in-libdnf.patch | 30 -- 0006-Allow-module-filtering.patch | 36 --- ...-update-service-to-run-after-system-.patch | 27 -- ...rgument-to-the-dnf_sack_filter_modul.patch | 28 -- 0009-dnf-trivial-Add-missing-include.patch | 26 -- 0010-dnf-trivial-Fix-whitespace.patch | 25 -- ...sing-deprecated-hy_goal_downgrade_to.patch | 35 --- ...or-DnfAdvisory-changes-in-new-libdnf.patch | 55 ---- ...n-an-interactive-TTY-is-not-availabl.patch | 43 --- PackageKit.spec | 29 +- sources | 2 +- 16 files changed, 13 insertions(+), 749 deletions(-) delete mode 100644 0001-De-register-callbacks-on-PkClientHelper-finalize.patch delete mode 100644 0002-pk-offline-update-shut-down-services-cleanly-before-.patch delete mode 100644 0003-Fix-usage-of-FALSE-when-it-should-be-NULL.patch delete mode 100644 0004-Shutdown-the-daemon-on-idle-by-default.patch delete mode 100644 0005-Reflect-latest-changes-in-libdnf.patch delete mode 100644 0006-Allow-module-filtering.patch delete mode 100644 0007-Schedule-offline-update-service-to-run-after-system-.patch delete mode 100644 0008-Add-additional-argument-to-the-dnf_sack_filter_modul.patch delete mode 100644 0009-dnf-trivial-Add-missing-include.patch delete mode 100644 0010-dnf-trivial-Fix-whitespace.patch delete mode 100644 0011-dnf-Avoid-using-deprecated-hy_goal_downgrade_to.patch delete mode 100644 0012-dnf-Adapt-for-DnfAdvisory-changes-in-new-libdnf.patch delete mode 100644 0013-Never-assert-when-an-interactive-TTY-is-not-availabl.patch diff --git a/.gitignore b/.gitignore index 15f002d..82dbb73 100644 --- a/.gitignore +++ b/.gitignore @@ -74,3 +74,4 @@ PackageKit-0.6.7.tar.bz2 /PackageKit-1.1.8.tar.xz /PackageKit-1.1.9.tar.xz /PackageKit-1.1.10.tar.xz +/PackageKit-1.1.11.tar.xz diff --git a/0001-De-register-callbacks-on-PkClientHelper-finalize.patch b/0001-De-register-callbacks-on-PkClientHelper-finalize.patch deleted file mode 100644 index a6da2a3..0000000 --- a/0001-De-register-callbacks-on-PkClientHelper-finalize.patch +++ /dev/null @@ -1,276 +0,0 @@ -From 6b08de1e7578e32ec369148ff3f4d7f2e8c884af Mon Sep 17 00:00:00 2001 -From: Robert Ancell -Date: Tue, 15 May 2018 13:07:40 +1200 -Subject: [PATCH 01/13] De-register callbacks on PkClientHelper finalize. - -These could otherwise trigger on a deleted object. ---- - lib/packagekit-glib2/pk-client-helper.c | 83 ++++++++++++++++--------- - 1 file changed, 55 insertions(+), 28 deletions(-) - -diff --git a/lib/packagekit-glib2/pk-client-helper.c b/lib/packagekit-glib2/pk-client-helper.c -index f3240afee..26ee12ec6 100644 ---- a/lib/packagekit-glib2/pk-client-helper.c -+++ b/lib/packagekit-glib2/pk-client-helper.c -@@ -118,12 +118,16 @@ pk_client_helper_stop (PkClientHelper *client_helper, GError **error) - /* stop watching for events */ - if (priv->io_channel_socket_listen_id > 0) - g_source_remove (priv->io_channel_socket_listen_id); -+ priv->io_channel_socket_listen_id = 0; - if (priv->io_channel_child_stdout_listen_id > 0) - g_source_remove (priv->io_channel_child_stdout_listen_id); -+ priv->io_channel_child_stdout_listen_id = 0; - if (priv->io_channel_child_stderr_listen_id > 0) - g_source_remove (priv->io_channel_child_stderr_listen_id); -+ priv->io_channel_child_stderr_listen_id = 0; - if (priv->io_channel_child_stdin_listen_id > 0) - g_source_remove (priv->io_channel_child_stdin_listen_id); -+ priv->io_channel_child_stdin_listen_id = 0; - } - - /* kill process */ -@@ -170,15 +174,16 @@ pk_client_helper_copy_stdout_cb (GIOChannel *source, GIOCondition condition, PkC - /* the helper process exited */ - if ((condition & G_IO_HUP) > 0) { - g_debug ("helper process exited"); -+ priv->io_channel_child_stdout_listen_id = 0; - status = g_io_channel_shutdown (priv->io_channel_child_stdout, FALSE, &error); - if (status != G_IO_STATUS_NORMAL) { - g_warning ("failed to shutdown channel: %s", error->message); -- return FALSE; -+ return G_SOURCE_REMOVE; - } - status = g_io_channel_shutdown (priv->io_channel_child_stderr, FALSE, &error); - if (status != G_IO_STATUS_NORMAL) { - g_warning ("failed to shutdown channel: %s", error->message); -- return FALSE; -+ return G_SOURCE_REMOVE; - } - if (priv->active_conn != NULL) { - ret = g_socket_close (priv->active_conn, &error); -@@ -188,7 +193,7 @@ pk_client_helper_copy_stdout_cb (GIOChannel *source, GIOCondition condition, PkC - g_object_unref (priv->active_conn); - priv->active_conn = NULL; - } -- return FALSE; -+ return G_SOURCE_REMOVE; - } - - /* there is data to read */ -@@ -198,10 +203,11 @@ pk_client_helper_copy_stdout_cb (GIOChannel *source, GIOCondition condition, PkC - status = g_io_channel_read_chars (source, data, 1024, &len, &error); - if (status == G_IO_STATUS_EOF) { - g_warning ("child closed unexpectedly"); -- return FALSE; -+ priv->io_channel_child_stdout_listen_id = 0; -+ return G_SOURCE_REMOVE; - } - if (len == 0) -- return TRUE; -+ return G_SOURCE_CONTINUE; - - /* write to socket */ - data[len] = '\0'; -@@ -209,16 +215,18 @@ pk_client_helper_copy_stdout_cb (GIOChannel *source, GIOCondition condition, PkC - status = g_io_channel_write_chars (priv->io_channel_socket, data, len, &written, &error); - if (status != G_IO_STATUS_NORMAL) { - g_warning ("failed to write to socket: %s", error->message); -- return FALSE; -+ priv->io_channel_child_stdout_listen_id = 0; -+ return G_SOURCE_REMOVE; - } - if (written != len) { - g_warning ("failed to write %" G_GSIZE_FORMAT " bytes, " - "only wrote %" G_GSIZE_FORMAT " bytes", len, written); -- return FALSE; -+ priv->io_channel_child_stdout_listen_id = 0; -+ return G_SOURCE_REMOVE; - } - g_debug ("wrote %" G_GSIZE_FORMAT " bytes to socket", written); - } -- return TRUE; -+ return G_SOURCE_CONTINUE; - } - - /* -@@ -227,10 +235,11 @@ pk_client_helper_copy_stdout_cb (GIOChannel *source, GIOCondition condition, PkC - static gboolean - pk_client_helper_echo_stderr_cb (GIOChannel *source, GIOCondition condition, PkClientHelper *client_helper) - { -+ PkClientHelperPrivate *priv = client_helper->priv; - gchar data[1024]; - gsize len = 0; - GIOStatus status; -- gboolean ret = TRUE; -+ gboolean ret = G_SOURCE_CONTINUE; - - /* there is data to read */ - if ((condition & G_IO_IN) == 0) -@@ -239,7 +248,8 @@ pk_client_helper_echo_stderr_cb (GIOChannel *source, GIOCondition condition, PkC - /* read data */ - status = g_io_channel_read_chars (source, data, 1024, &len, NULL); - if (status == G_IO_STATUS_EOF) { -- ret = FALSE; -+ priv->io_channel_child_stderr_listen_id = 0; -+ ret = G_SOURCE_REMOVE; - goto out; - } - if (len == 0) -@@ -261,33 +271,39 @@ pk_client_helper_copy_conn_cb (GIOChannel *source, GIOCondition condition, PkCli - PkClientHelperPrivate *priv = client_helper->priv; - gchar data[1024]; - gsize len = 0; -- GIOStatus status; - gsize written = 0; -- gboolean ret = TRUE; - g_autoptr(GError) error = NULL; - - /* package manager is done processing a package */ - if ((condition & G_IO_HUP) > 0) { -+ gboolean ret; -+ - g_debug ("socket hung up"); - ret = g_socket_close (priv->active_conn, &error); - if (!ret) - g_warning ("failed to close socket"); - g_object_unref (priv->active_conn); - priv->active_conn = NULL; -- return FALSE; -+ priv->io_channel_child_stdin_listen_id = 0; -+ return G_SOURCE_REMOVE; - } - - /* there is data to read */ - if ((condition & G_IO_IN) > 0) { -+ GIOStatus status; -+ - status = g_io_channel_read_chars (source, data, 1024, &len, &error); -- if (status == G_IO_STATUS_EOF) -- return FALSE; -+ if (status == G_IO_STATUS_EOF) { -+ priv->io_channel_child_stdin_listen_id = 0; -+ return G_SOURCE_REMOVE; -+ } - if (error != NULL) { - g_warning ("failed to read: %s", error->message); -- return FALSE; -+ priv->io_channel_child_stdin_listen_id = 0; -+ return G_SOURCE_REMOVE; - } - if (len == 0) -- return TRUE; -+ return G_SOURCE_CONTINUE; - - /* write to child */ - data[len] = '\0'; -@@ -295,16 +311,18 @@ pk_client_helper_copy_conn_cb (GIOChannel *source, GIOCondition condition, PkCli - status = g_io_channel_write_chars (priv->io_channel_child_stdin, data, len, &written, &error); - if (status != G_IO_STATUS_NORMAL) { - g_warning ("failed to write to stdin: %s", error->message); -- return FALSE; -+ priv->io_channel_child_stdin_listen_id = 0; -+ return G_SOURCE_REMOVE; - } - if (written != len) { - g_warning ("failed to write %" G_GSIZE_FORMAT " bytes, " - "only wrote %" G_GSIZE_FORMAT " bytes", len, written); -- return FALSE; -+ priv->io_channel_child_stdin_listen_id = 0; -+ return G_SOURCE_REMOVE; - } - g_debug ("wrote %" G_GSIZE_FORMAT " bytes to stdin of %s", written, priv->argv[0]); - } -- return TRUE; -+ return G_SOURCE_CONTINUE; - } - - /* -@@ -324,13 +342,13 @@ pk_client_helper_accept_connection_cb (GIOChannel *source, GIOCondition conditio - - /* delaying connection */ - if (priv->active_conn != NULL) -- return TRUE; -+ return G_SOURCE_CONTINUE; - - /* accept the connection request */ - priv->active_conn = g_socket_accept (priv->socket, NULL, &error); - if (priv->active_conn == NULL) { - g_warning ("failed to accept socket: %s", error->message); -- return TRUE; -+ return G_SOURCE_CONTINUE; - } - g_debug ("accepting connection %i for socket %i", - g_socket_get_fd (priv->active_conn), -@@ -341,7 +359,7 @@ pk_client_helper_accept_connection_cb (GIOChannel *source, GIOCondition conditio - &standard_input, &standard_output, &standard_error, &error); - if (!ret) { - g_warning ("failed to spawn: %s", error->message); -- return TRUE; -+ return G_SOURCE_CONTINUE; - } - g_debug ("started process %s with pid %i", priv->argv[0], priv->child_pid); - -@@ -354,7 +372,7 @@ pk_client_helper_accept_connection_cb (GIOChannel *source, GIOCondition conditio - status = g_io_channel_set_encoding (priv->io_channel_child_stdin, NULL, &error); - if (status != G_IO_STATUS_NORMAL) { - g_warning ("failed to set encoding: %s", error->message); -- return TRUE; -+ return G_SOURCE_CONTINUE; - } - g_io_channel_set_buffered (priv->io_channel_child_stdin, FALSE); - -@@ -362,7 +380,7 @@ pk_client_helper_accept_connection_cb (GIOChannel *source, GIOCondition conditio - status = g_io_channel_set_encoding (priv->io_channel_child_stdout, NULL, &error); - if (status != G_IO_STATUS_NORMAL) { - g_warning ("failed to set encoding: %s", error->message); -- return TRUE; -+ return G_SOURCE_CONTINUE; - } - g_io_channel_set_buffered (priv->io_channel_child_stdout, FALSE); - -@@ -370,7 +388,7 @@ pk_client_helper_accept_connection_cb (GIOChannel *source, GIOCondition conditio - status = g_io_channel_set_encoding (priv->io_channel_child_stderr, NULL, &error); - if (status != G_IO_STATUS_NORMAL) { - g_warning ("failed to set encoding: %s", error->message); -- return TRUE; -+ return G_SOURCE_CONTINUE; - } - g_io_channel_set_buffered (priv->io_channel_child_stderr, FALSE); - -@@ -385,7 +403,7 @@ pk_client_helper_accept_connection_cb (GIOChannel *source, GIOCondition conditio - status = g_io_channel_set_encoding (priv->io_channel_socket, NULL, &error); - if (status != G_IO_STATUS_NORMAL) { - g_warning ("failed to set encoding: %s", error->message); -- return TRUE; -+ return G_SOURCE_CONTINUE; - } - g_io_channel_set_buffered (priv->io_channel_socket, FALSE); - -@@ -397,7 +415,7 @@ pk_client_helper_accept_connection_cb (GIOChannel *source, GIOCondition conditio - priv->io_channel_child_stderr_listen_id = - g_io_add_watch_full (priv->io_channel_child_stderr, G_PRIORITY_HIGH_IDLE, G_IO_IN, - (GIOFunc) pk_client_helper_echo_stderr_cb, client_helper, NULL); -- return TRUE; -+ return G_SOURCE_CONTINUE; - } - - /** -@@ -533,6 +551,15 @@ pk_client_helper_finalize (GObject *object) - PkClientHelper *client_helper = PK_CLIENT_HELPER (object); - PkClientHelperPrivate *priv = client_helper->priv; - -+ if (priv->io_channel_socket_listen_id > 0) -+ g_source_remove (priv->io_channel_socket_listen_id); -+ if (priv->io_channel_child_stdout_listen_id > 0) -+ g_source_remove (priv->io_channel_child_stdout_listen_id); -+ if (priv->io_channel_child_stderr_listen_id > 0) -+ g_source_remove (priv->io_channel_child_stderr_listen_id); -+ if (priv->io_channel_child_stdin_listen_id > 0) -+ g_source_remove (priv->io_channel_child_stdin_listen_id); -+ - if (priv->socket_file != NULL) - g_object_unref (priv->socket_file); - if (priv->io_channel_socket != NULL) --- -2.19.0 - diff --git a/0002-pk-offline-update-shut-down-services-cleanly-before-.patch b/0002-pk-offline-update-shut-down-services-cleanly-before-.patch deleted file mode 100644 index e7d864e..0000000 --- a/0002-pk-offline-update-shut-down-services-cleanly-before-.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 721249857d6ade6b3cdfd207486c026b1eb6098a Mon Sep 17 00:00:00 2001 -From: Alan Jenkins -Date: Wed, 16 May 2018 10:42:49 +0100 -Subject: [PATCH 02/13] pk-offline-update: shut down services cleanly before - rebooting -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -do not use forced reboot. -https://bugzilla.redhat.com/show_bug.cgi?id=1564462 - -Seconded by Zbigniew Jędrzejewski-Szmek. -"org.freedesktop.systemd1.Manager.Reboot is unnecessarily harsh, and -shutting down normally through StartUnit is much better." - -Having pk-offline-update use a different, harsher shutdown path than is -used in normal operation, is a really no-good idea and can trigger problems -which are harder than necessary to test, reproduce, etc. - -For example, Fedora is not unmounting the root filesystem cleanly! due to a -plymouth bug. In *some* circumstances, the graceful systemd shutdown -will avoid this. Because a graceful shutdown *with an LVM rootfs*, will -transition back into dracut for final shutdown. And dracut includes a -workaround for plymouth or similar very weird processes, which has recently -been modified and hopefully works more reliably now. - -https://unix.stackexchange.com/questions/441511/does-recovering-journal-prove-an-unclean-shutdown-unmount - -https://bugzilla.redhat.com/show_bug.cgi?id=1575376#c10 - -https://github.com/dracutdevs/dracut/commit/df6bb5e959178cba06118493a7c8d019e84d54e7 - -I was able to reproduce the plymouth bug, by downgrading a package and then -running an offline update. I have a systemd-shutdown hook which pauses -before rebooting/entering dracut; this let me see log messages about -failing to remount the root filesystem as read-only, because it was still -busy (for writing) - i.e. by plymouth. - -With this commit applied, the filesystem was clean after the reboot, and -did not require journal recovery. Thanks to the version of dracut which -makes sure to kill plymouth before unmounting the root filesystem. ---- - client/pk-offline-update.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/client/pk-offline-update.c b/client/pk-offline-update.c -index 73f524c1f..9fb248aef 100644 ---- a/client/pk-offline-update.c -+++ b/client/pk-offline-update.c -@@ -214,8 +214,10 @@ pk_offline_update_reboot (void) - "org.freedesktop.systemd1", - "/org/freedesktop/systemd1", - "org.freedesktop.systemd1.Manager", -- "Reboot", -- NULL, -+ "StartUnit", -+ g_variant_new("(ss)", -+ "reboot.target", -+ "replace-irreversibly"), - NULL, - G_DBUS_CALL_FLAGS_NONE, - -1, -@@ -257,8 +259,10 @@ pk_offline_update_power_off (void) - "org.freedesktop.systemd1", - "/org/freedesktop/systemd1", - "org.freedesktop.systemd1.Manager", -- "PowerOff", -- NULL, -+ "StartUnit", -+ g_variant_new("(ss)", -+ "poweroff.target", -+ "replace-irreversibly"), - NULL, - G_DBUS_CALL_FLAGS_NONE, - -1, --- -2.19.0 - diff --git a/0003-Fix-usage-of-FALSE-when-it-should-be-NULL.patch b/0003-Fix-usage-of-FALSE-when-it-should-be-NULL.patch deleted file mode 100644 index dfb24f1..0000000 --- a/0003-Fix-usage-of-FALSE-when-it-should-be-NULL.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 9053bc6809fb009c41799ad95d082af7e4bb29a8 Mon Sep 17 00:00:00 2001 -From: Robert Ancell -Date: Thu, 17 May 2018 14:03:48 +1200 -Subject: [PATCH 03/13] Fix usage of FALSE when it should be NULL - ---- - lib/packagekit-glib2/pk-client.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lib/packagekit-glib2/pk-client.c b/lib/packagekit-glib2/pk-client.c -index 15f684eed..8a928263c 100644 ---- a/lib/packagekit-glib2/pk-client.c -+++ b/lib/packagekit-glib2/pk-client.c -@@ -1972,7 +1972,7 @@ pk_client_create_helper_socket (PkClientState *state) - - /* no supported frontends available */ - if (!ret) -- return FALSE; -+ return NULL; - - /* create object */ - state->client_helper = pk_client_helper_new (); -@@ -1985,7 +1985,7 @@ pk_client_create_helper_socket (PkClientState *state) - ret = pk_client_helper_start (state->client_helper, socket_filename, argv, envp, &error); - if (!ret) { - g_warning ("failed to open debconf socket: %s", error->message); -- return FALSE; -+ return NULL; - } - - /* success */ --- -2.19.0 - diff --git a/0004-Shutdown-the-daemon-on-idle-by-default.patch b/0004-Shutdown-the-daemon-on-idle-by-default.patch deleted file mode 100644 index 328f4f7..0000000 --- a/0004-Shutdown-the-daemon-on-idle-by-default.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 934ced74697a2c2f0a13737318db581302311523 Mon Sep 17 00:00:00 2001 -From: Richard Hughes -Date: Tue, 15 May 2018 17:28:39 +0100 -Subject: [PATCH 04/13] Shutdown the daemon on idle by default - -This reverts commit c6eb3555ec5b41e988c111d276764d55fb83bda3 and means that -the daemon will close after 5 minutes of inactivity. - -The percieved race on shutdown is mitigated by the engine unown-ing the D-Bus -name in finalize. For machines with 2GB of RAM unloading the SAT database is a -big deal. - -The slight downside here is that doing operations on the command line with -dnf or rpm will not trigger an updates_changed signal in GNOME Software if -PackageKit is not running, but the changed event should still be sent when the -the inotify watches of things in the AsStore fire. ---- - src/pk-main.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/pk-main.c b/src/pk-main.c -index f21767734..980be0a99 100644 ---- a/src/pk-main.c -+++ b/src/pk-main.c -@@ -190,6 +190,8 @@ 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 */ --- -2.19.0 - diff --git a/0005-Reflect-latest-changes-in-libdnf.patch b/0005-Reflect-latest-changes-in-libdnf.patch deleted file mode 100644 index bc8e100..0000000 --- a/0005-Reflect-latest-changes-in-libdnf.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 92f26d8965622d4a4ca28bdc952b9d876cb354ce Mon Sep 17 00:00:00 2001 -From: Jaroslav Mracek -Date: Tue, 6 Mar 2018 14:37:50 +0100 -Subject: [PATCH 05/13] Reflect latest changes in libdnf - -Requires: libdnf-0.13.0+ - -G object DnfPackageSet in libdnf was replaced by c++ class therefore -g_object_unref cannot be used anymore, but the new dnf_packageset_free has to be -used instead. ---- - 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 d997dee67..ddfcd4231 100644 ---- a/backends/dnf/pk-backend-dnf.c -+++ b/backends/dnf/pk-backend-dnf.c -@@ -850,7 +850,7 @@ dnf_utils_run_query_with_newest_filter (DnfSack *sack, HyQuery query) - hy_query_free (query_tmp); - g_ptr_array_unref (results_tmp); - -- g_object_unref (pkgset); -+ dnf_packageset_free(pkgset); - - return results; - } --- -2.19.0 - diff --git a/0006-Allow-module-filtering.patch b/0006-Allow-module-filtering.patch deleted file mode 100644 index 742e6e9..0000000 --- a/0006-Allow-module-filtering.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 1a29475d35d2a054901eaad6f121980577b2c962 Mon Sep 17 00:00:00 2001 -From: Jaroslav Mracek -Date: Tue, 12 Jun 2018 08:57:54 +0200 -Subject: [PATCH 06/13] Allow module filtering - -It should disable packages from disabled modules. - -The patch requires libdnf-0.15.0 ---- - backends/dnf/pk-backend-dnf.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/backends/dnf/pk-backend-dnf.c b/backends/dnf/pk-backend-dnf.c -index ddfcd4231..414a13f32 100644 ---- a/backends/dnf/pk-backend-dnf.c -+++ b/backends/dnf/pk-backend-dnf.c -@@ -39,6 +39,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -799,6 +800,8 @@ dnf_utils_create_sack_for_filters (PkBackendJob *job, - return NULL; - } - -+ dnf_sack_filter_modules (sack, dnf_context_get_repos (job_data->context), install_root); -+ - /* save in cache */ - g_mutex_lock (&priv->sack_mutex); - cache_item = g_slice_new (DnfSackCacheItem); --- -2.19.0 - diff --git a/0007-Schedule-offline-update-service-to-run-after-system-.patch b/0007-Schedule-offline-update-service-to-run-after-system-.patch deleted file mode 100644 index 3116585..0000000 --- a/0007-Schedule-offline-update-service-to-run-after-system-.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 63118a587c967ecfc8eeb4155d7f44e0dcf3fe25 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Tue, 3 Jul 2018 10:44:28 +0200 -Subject: [PATCH 07/13] Schedule offline update service to run after - system-update-pre.target - -https://bugzilla.redhat.com/show_bug.cgi?id=1597659 ---- - data/packagekit-offline-update.service.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/data/packagekit-offline-update.service.in b/data/packagekit-offline-update.service.in -index 55e1f82c9..23096058f 100644 ---- a/data/packagekit-offline-update.service.in -+++ b/data/packagekit-offline-update.service.in -@@ -3,7 +3,7 @@ Description=Update the operating system whilst offline - - DefaultDependencies=no - Requires=sysinit.target dbus.socket --After=sysinit.target dbus.socket systemd-journald.socket -+After=sysinit.target dbus.socket systemd-journald.socket system-update-pre.target - Before=shutdown.target system-update.target - # See packagekit.service - ConditionPathExists=!/run/ostree-booted --- -2.19.0 - diff --git a/0008-Add-additional-argument-to-the-dnf_sack_filter_modul.patch b/0008-Add-additional-argument-to-the-dnf_sack_filter_modul.patch deleted file mode 100644 index a785a56..0000000 --- a/0008-Add-additional-argument-to-the-dnf_sack_filter_modul.patch +++ /dev/null @@ -1,28 +0,0 @@ -From b62e128b9e068ec4180f3f63cc2e448bcb32802e Mon Sep 17 00:00:00 2001 -From: Daniel Mach -Date: Thu, 2 Aug 2018 13:44:17 +0200 -Subject: [PATCH 08/13] Add additional argument to the - dnf_sack_filter_modules() call. - -Libdnf API has changed and the function takes an additional argument: platformModule. -It's set to NULL to trigger platform module auto-detection based on /etc/os-release. ---- - 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 414a13f32..b6d575737 100644 ---- a/backends/dnf/pk-backend-dnf.c -+++ b/backends/dnf/pk-backend-dnf.c -@@ -800,7 +800,7 @@ dnf_utils_create_sack_for_filters (PkBackendJob *job, - return NULL; - } - -- dnf_sack_filter_modules (sack, dnf_context_get_repos (job_data->context), install_root); -+ dnf_sack_filter_modules (sack, dnf_context_get_repos (job_data->context), install_root, NULL); - - /* save in cache */ - g_mutex_lock (&priv->sack_mutex); --- -2.19.0 - diff --git a/0009-dnf-trivial-Add-missing-include.patch b/0009-dnf-trivial-Add-missing-include.patch deleted file mode 100644 index 8e42308..0000000 --- a/0009-dnf-trivial-Add-missing-include.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 5902d7a575cbd33649593f1e9324810ccc5253e6 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Wed, 12 Sep 2018 14:57:22 +0200 -Subject: [PATCH 09/13] dnf: trivial: Add missing include - -Add missing dnf-db.h for dnf_db_ensure_origin_pkglist() and -dnf_db_ensure_origin_pkg(). ---- - backends/dnf/pk-backend-dnf.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/backends/dnf/pk-backend-dnf.c b/backends/dnf/pk-backend-dnf.c -index b6d575737..e2e4a0a7b 100644 ---- a/backends/dnf/pk-backend-dnf.c -+++ b/backends/dnf/pk-backend-dnf.c -@@ -36,6 +36,7 @@ - #include - #include - #include -+#include - #include - #include - #include --- -2.19.0 - diff --git a/0010-dnf-trivial-Fix-whitespace.patch b/0010-dnf-trivial-Fix-whitespace.patch deleted file mode 100644 index 4078c1a..0000000 --- a/0010-dnf-trivial-Fix-whitespace.patch +++ /dev/null @@ -1,25 +0,0 @@ -From aaba3baa744936da2fafaf3e89bd74c8f8294eab Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Wed, 12 Sep 2018 15:00:13 +0200 -Subject: [PATCH 10/13] dnf: trivial: Fix whitespace - ---- - 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 e2e4a0a7b..7c8465b73 100644 ---- a/backends/dnf/pk-backend-dnf.c -+++ b/backends/dnf/pk-backend-dnf.c -@@ -854,7 +854,7 @@ dnf_utils_run_query_with_newest_filter (DnfSack *sack, HyQuery query) - hy_query_free (query_tmp); - g_ptr_array_unref (results_tmp); - -- dnf_packageset_free(pkgset); -+ dnf_packageset_free (pkgset); - - return results; - } --- -2.19.0 - diff --git a/0011-dnf-Avoid-using-deprecated-hy_goal_downgrade_to.patch b/0011-dnf-Avoid-using-deprecated-hy_goal_downgrade_to.patch deleted file mode 100644 index f4dfbdc..0000000 --- a/0011-dnf-Avoid-using-deprecated-hy_goal_downgrade_to.patch +++ /dev/null @@ -1,35 +0,0 @@ -From a3876b538b0bdc20b2c5ec40d73fc2c83457e92f Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Wed, 12 Sep 2018 15:02:59 +0200 -Subject: [PATCH 11/13] dnf: Avoid using deprecated hy_goal_downgrade_to() - -Just use hy_goal_install() that does the exact same thing. ---- - backends/dnf/pk-backend-dnf.c | 10 +++------- - 1 file changed, 3 insertions(+), 7 deletions(-) - -diff --git a/backends/dnf/pk-backend-dnf.c b/backends/dnf/pk-backend-dnf.c -index 7c8465b73..988dd8fcb 100644 ---- a/backends/dnf/pk-backend-dnf.c -+++ b/backends/dnf/pk-backend-dnf.c -@@ -3152,14 +3152,10 @@ pk_backend_install_packages_thread (PkBackendJob *job, GVariant *params, gpointe - "Failed to find %s", package_ids[i]); - return; - } -- if (relations[i] == HY_LT) { -- hy_goal_downgrade_to (job_data->goal, pkg); -- } else { -- if (relations[i] == HY_EQ) { -- dnf_package_set_action (pkg, DNF_STATE_ACTION_REINSTALL); -- } -- hy_goal_install (job_data->goal, pkg); -+ if (relations[i] == HY_EQ) { -+ dnf_package_set_action (pkg, DNF_STATE_ACTION_REINSTALL); - } -+ hy_goal_install (job_data->goal, pkg); - } - - /* run transaction */ --- -2.19.0 - diff --git a/0012-dnf-Adapt-for-DnfAdvisory-changes-in-new-libdnf.patch b/0012-dnf-Adapt-for-DnfAdvisory-changes-in-new-libdnf.patch deleted file mode 100644 index 976d606..0000000 --- a/0012-dnf-Adapt-for-DnfAdvisory-changes-in-new-libdnf.patch +++ /dev/null @@ -1,55 +0,0 @@ -From cc2df77b5c60b323539f19002b2d482a4be0079f Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Thu, 20 Sep 2018 15:36:20 +0200 -Subject: [PATCH 12/13] dnf: Adapt for DnfAdvisory changes in new libdnf - -libdnf has some wonky memory management here, and apparently it's -deliberately so. dnf_package_get_advisories() now returns a GPtrArray -that doesn't have a free function set as DnfAdvisory is no longer a -GObject. Instead, the called is supposed to deep free the returned -array. - -This fixes packagekitd spamming logs on F29 with: -(packagekitd:1317): GLib-GObject-CRITICAL **: 19:49:09.741: g_object_ref: assertion 'G_IS_OBJECT (object)' failed ---- - backends/dnf/pk-backend-dnf.c | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/backends/dnf/pk-backend-dnf.c b/backends/dnf/pk-backend-dnf.c -index 988dd8fcb..ad891adad 100644 ---- a/backends/dnf/pk-backend-dnf.c -+++ b/backends/dnf/pk-backend-dnf.c -@@ -942,8 +942,10 @@ dnf_package_get_advisory (DnfPackage *package) - - advisorylist = dnf_package_get_advisories (package, HY_EQ); - -- if (advisorylist->len > 0) -- advisory = g_object_ref (g_ptr_array_index (advisorylist, 0)); -+ for (guint i = 0; i < advisorylist->len; i++) { -+ dnf_advisory_free (advisory); -+ advisory = g_ptr_array_index (advisorylist, 0); -+ } - g_ptr_array_unref (advisorylist); - - return advisory; -@@ -1115,7 +1117,7 @@ pk_backend_search_thread (PkBackendJob *job, GVariant *params, gpointer user_dat - advisory = dnf_package_get_advisory (pkg); - if (advisory != NULL) { - kind = dnf_advisory_get_kind (advisory); -- g_object_unref (advisory); -+ dnf_advisory_free (advisory); - info_enum = dnf_advisory_kind_to_info_enum (kind); - dnf_package_set_info (pkg, info_enum); - } -@@ -3822,7 +3824,7 @@ pk_backend_get_update_detail_thread (PkBackendJob *job, GVariant *params, gpoint - NULL /* updated */); - - g_ptr_array_unref (references); -- g_object_unref (advisory); -+ dnf_advisory_free (advisory); - } - - /* done */ --- -2.19.0 - diff --git a/0013-Never-assert-when-an-interactive-TTY-is-not-availabl.patch b/0013-Never-assert-when-an-interactive-TTY-is-not-availabl.patch deleted file mode 100644 index 2e2cf94..0000000 --- a/0013-Never-assert-when-an-interactive-TTY-is-not-availabl.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 984e7b03e186e71a51476ede965cc6d27179f735 Mon Sep 17 00:00:00 2001 -From: Richard Hughes -Date: Fri, 21 Sep 2018 11:47:00 +0100 -Subject: [PATCH 13/13] Never assert when an interactive TTY is not available - -Also, fd==0 is unlikely, but valid. Do the right thing in finalize(). ---- - lib/packagekit-glib2/pk-progress-bar.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/lib/packagekit-glib2/pk-progress-bar.c b/lib/packagekit-glib2/pk-progress-bar.c -index 3917c2cf2..e75f319e4 100644 ---- a/lib/packagekit-glib2/pk-progress-bar.c -+++ b/lib/packagekit-glib2/pk-progress-bar.c -@@ -58,6 +58,8 @@ pk_progress_bar_console (PkProgressBar *self, const gchar *tmp) - gssize count; - gssize wrote; - count = strlen (tmp) + 1; -+ if (self->priv->tty_fd < 0) -+ return; - wrote = write (self->priv->tty_fd, tmp, count); - if (wrote != count) { - g_warning ("Only wrote %" G_GSSIZE_FORMAT -@@ -366,7 +368,7 @@ pk_progress_bar_finalize (GObject *object) - g_free (self->priv->old_start_text); - if (self->priv->timer_id != 0) - g_source_remove (self->priv->timer_id); -- if (self->priv->tty_fd > 0) -+ if (self->priv->tty_fd >= 0) - close (self->priv->tty_fd); - G_OBJECT_CLASS (pk_progress_bar_parent_class)->finalize (object); - } -@@ -399,7 +401,6 @@ pk_progress_bar_init (PkProgressBar *self) - self->priv->tty_fd = open ("/dev/console", O_RDWR, 0); - if (self->priv->tty_fd < 0) - self->priv->tty_fd = open ("/dev/stdout", O_RDWR, 0); -- g_assert (self->priv->tty_fd > 0); - } - - /** --- -2.19.0 - diff --git a/PackageKit.spec b/PackageKit.spec index 399e9f6..c9349fe 100644 --- a/PackageKit.spec +++ b/PackageKit.spec @@ -13,8 +13,8 @@ Summary: Package management service Name: PackageKit -Version: 1.1.10 -Release: 5%{?dist} +Version: 1.1.11 +Release: 1%{?dist} License: GPLv2+ and LGPLv2+ URL: http://www.freedesktop.org/software/PackageKit/ Source0: http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz @@ -29,22 +29,6 @@ Provides: bundled(libdnf) = 0.7.0 # Fedora-specific: set Vendor.conf up for Fedora. Patch0: PackageKit-0.3.8-Fedora-Vendor.conf.patch -# Backports from master that fix various bugs and compat issues -# esp. with recent libdnf -Patch1: 0001-De-register-callbacks-on-PkClientHelper-finalize.patch -Patch2: 0002-pk-offline-update-shut-down-services-cleanly-before-.patch -Patch3: 0003-Fix-usage-of-FALSE-when-it-should-be-NULL.patch -Patch4: 0004-Shutdown-the-daemon-on-idle-by-default.patch -Patch5: 0005-Reflect-latest-changes-in-libdnf.patch -Patch6: 0006-Allow-module-filtering.patch -Patch7: 0007-Schedule-offline-update-service-to-run-after-system-.patch -Patch8: 0008-Add-additional-argument-to-the-dnf_sack_filter_modul.patch -Patch9: 0009-dnf-trivial-Add-missing-include.patch -Patch10: 0010-dnf-trivial-Fix-whitespace.patch -Patch11: 0011-dnf-Avoid-using-deprecated-hy_goal_downgrade_to.patch -Patch12: 0012-dnf-Adapt-for-DnfAdvisory-changes-in-new-libdnf.patch -Patch13: 0013-Never-assert-when-an-interactive-TTY-is-not-availabl.patch - BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: xmlto @@ -355,6 +339,15 @@ systemctl disable packagekit-offline-update.service > /dev/null 2>&1 || : %{_datadir}/vala/vapi/packagekit-glib2.vapi %changelog +* Tue Sep 25 2018 Richard Hughes - 1.1.11-1 +- New upstream release +- Add --autoremove option to pkcon +- De-register callbacks on PkClientHelper finalize +- Don't complain if command-not-found get uninstalled while running +- Never assert when an interactive TTY is not available +- Shut down services cleanly before rebooting after offline updates +- Shutdown the daemon on idle by default + * Sat Sep 22 2018 Adam Williamson - 1.1.10-5 - Backport several more fixes from master for libdnf compat diff --git a/sources b/sources index c0d570d..19daacd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (PackageKit-1.1.10.tar.xz) = 58bcbfc55e90d86f08fe3c864c733a5035729eee36b932a799a8d065ca1d1fa90d30685113ebe9bd913c759601d67e69fc7d422ff32627a7cd6037f41cccb165 +SHA512 (PackageKit-1.1.11.tar.xz) = 6b8f2f10330073cd5592103ce74b1e6a49ff587a4ce827a425fa6892fda343e3ba3d1f5844afba176b9d803a9f11cd64f2294039369523694d31230b3b139bfe