diff --git a/SOURCES/0001-boot-splash-handle-update-coming-in-after-splash-is-.patch b/SOURCES/0001-boot-splash-handle-update-coming-in-after-splash-is-.patch new file mode 100644 index 0000000..8cd73b8 --- /dev/null +++ b/SOURCES/0001-boot-splash-handle-update-coming-in-after-splash-is-.patch @@ -0,0 +1,110 @@ +From 4cb71a45b448dd8008242a5de122771c4e6d1c36 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Thu, 29 Aug 2019 09:21:57 -0400 +Subject: [PATCH] boot-splash: handle update coming in after splash is unloaded + +In some scenario i don't quite understand, involving plymouthd +getting updated while it's running, the boot splash can get unloaded +while its progress timeout remains active, leading to crash. + +This commit protects against such a crash. +--- + src/libply-splash-core/ply-boot-splash.c | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +diff --git a/src/libply-splash-core/ply-boot-splash.c b/src/libply-splash-core/ply-boot-splash.c +index 664acc3..267136a 100644 +--- a/src/libply-splash-core/ply-boot-splash.c ++++ b/src/libply-splash-core/ply-boot-splash.c +@@ -412,75 +412,80 @@ ply_boot_splash_free (ply_boot_splash_t *splash) + + if (splash->module_handle != NULL) + { + ply_boot_splash_unset_keyboard (splash); + + remove_pixel_displays (splash); + ply_list_free (splash->pixel_displays); + + remove_text_displays (splash); + ply_list_free (splash->text_displays); + + ply_boot_splash_unload (splash); + } + + if (splash->idle_trigger != NULL) + ply_trigger_free (splash->idle_trigger); + + free (splash->theme_path); + free (splash->plugin_dir); + free (splash); + } + + static void + ply_boot_splash_update_progress (ply_boot_splash_t *splash) + { + double percentage=0.0; + double time=0.0; + + assert (splash != NULL); + ++ if (splash->plugin_interface == NULL) ++ return; ++ + if (splash->progress) + { + percentage = ply_progress_get_percentage(splash->progress); + time = ply_progress_get_time(splash->progress); + } + + if (splash->plugin_interface->on_boot_progress != NULL) +- splash->plugin_interface->on_boot_progress (splash->plugin, +- time, +- percentage); +- +- ply_event_loop_watch_for_timeout (splash->loop, +- 1.0 / UPDATES_PER_SECOND, +- (ply_event_loop_timeout_handler_t) +- ply_boot_splash_update_progress, splash); ++ { ++ splash->plugin_interface->on_boot_progress (splash->plugin, ++ time, ++ percentage); ++ ++ ply_event_loop_watch_for_timeout (splash->loop, ++ 1.0 / UPDATES_PER_SECOND, ++ (ply_event_loop_timeout_handler_t) ++ ply_boot_splash_update_progress, splash); ++ } + } + + void + ply_boot_splash_attach_progress (ply_boot_splash_t *splash, + ply_progress_t *progress) + { + assert (splash != NULL); + assert (progress != NULL); + assert (splash->progress == NULL); + splash->progress = progress; + } + + + bool + ply_boot_splash_show (ply_boot_splash_t *splash, + ply_boot_splash_mode_t mode) + { + assert (splash != NULL); + assert (mode != PLY_BOOT_SPLASH_MODE_INVALID); + assert (splash->module_handle != NULL); + assert (splash->loop != NULL); + assert (splash->plugin_interface != NULL); + assert (splash->plugin != NULL); + assert (splash->plugin_interface->show_splash_screen != NULL); + + if (splash->mode == mode) + { + ply_trace ("already set same splash screen mode"); + return true; + } +-- +2.21.0 + diff --git a/SPECS/plymouth.spec b/SPECS/plymouth.spec index 99939c2..ecfb673 100644 --- a/SPECS/plymouth.spec +++ b/SPECS/plymouth.spec @@ -7,7 +7,7 @@ Summary: Graphical Boot Animation and Logger Name: plymouth Version: 0.8.9 -Release: 0.32.20140113%{?dist} +Release: 0.33.20140113%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://freedesktop.org/software/plymouth/releases/%{name}-%{version}.tar.bz2 @@ -61,6 +61,7 @@ Patch18: 0001-Revert-Recreate-boot-log-at-each-boot-instead-of-app.patch Patch19: 0001-Revert-Make-boot.log-world-readable-by-default.patch Patch20: 0001-device-manager-fall-back-to-text-mode-if-graphical-d.patch Patch21: 0001-ply-device-manager-Fix-race-causing-undesired-creati.patch +Patch22: 0001-boot-splash-handle-update-coming-in-after-splash-is-.patch Patch99: colors.patch @@ -240,7 +241,7 @@ Provides: plymouth(system-theme) = %{version}-%{release} %description theme-charge This package contains the "charge" boot splash theme for -Plymouth. It is the default theme for CentOS Linux. +Plymouth. It is the default theme for Red Hat Enterprise Linux. %package plugin-script Summary: Plymouth "script" plugin @@ -500,8 +501,9 @@ fi %defattr(-, root, root) %changelog -* Tue Aug 06 2019 CentOS Sources - 0.8.9-0.32.20140113.el7.centos -- Roll in Branding Change in the SPEC +* Thu Aug 29 2019 Ray Strode - 0.8.9-0.33.20140113 +- Address crash during upgrade + Resolves: #1581197 * Tue Mar 26 2019 Ray Strode - 0.8.9-0.32.20140113 - Fix race leading to duplicate output on some systems