Accepting request 252285 from Base:System

- Update 0001-let-it-become-a-real-daemon.patch to call setsid 
  only from the child process.

- Add 0001-let-it-become-a-real-daemon.patch to make plymouth
  a real daemon, fixes part of bnc#889757. Patch by Werner.

- Add plymouth-boot-vga-framebuffer.patch to fix boot_vga
  problem with framebuffer devices. (bnc#886211)

- Modify plymouth-ignore-cirrusdrm.patch to return as
  early as possible. Patch by glin@suse.com

- Invert the logic in plymouth-ignore-cirrusdrm.patch bnc#890516

- Add
  0001-text-step-bar-use-correct-utf-8-multibyte-sequence-f.patch:
  fix incorrect UTF-8 code used for square [bnc#886148].

- Add plymouth-ignore-cirrusdrm.patch: ignore cirrus drm and use fb
  instead [bnc#888590]

- Add
  0001-seat-be-a-little-more-forgiving-in-the-case-there-s-.patch:
  Be more forgiving with empty seat.

- Update 0001-Some-greenish-openSUSE-colors.patch to also use SUSE
  colors on tribar [bnc#886148]

- Add
  0001-libply-splash-core-also-monitor-for-file-removal-in-.patch:

OBS-URL: https://build.opensuse.org/request/show/252285
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/plymouth?expand=0&rev=47
This commit is contained in:
Stephan Kulow 2014-09-28 17:59:02 +00:00 committed by Git OBS Bridge
commit 02a5490261
23 changed files with 1020 additions and 281 deletions

View File

@ -1,50 +0,0 @@
From: Werner Fink <werner@suse.de>
Subject: All daemons should call setsid(2) to become a real daemons
All daemons should call setsid(2) to become a real daemons without
controlling terminal. Beside this the old boot log will help for
debugging and for support.
---
libply/ply-utils.c | 1 +
main.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
--- a/src/libply/ply-utils.c
+++ b/src/libply/ply-utils.c 2014-02-12 15:05:49.895141867 +0100
@@ -815,6 +815,7 @@ ply_create_daemon (void)
_exit ((int) byte);
}
+ setsid();
close (receiver_fd);
handle = calloc (1, sizeof (int));
--- a/src/main.c
+++ b/src/main.c 2014-02-12 14:43:49.216569414 +0100
@@ -639,7 +639,7 @@ get_log_file_for_mode (ply_mode_t mode)
break;
case PLY_MODE_SHUTDOWN:
case PLY_MODE_UPDATES:
- filename = _PATH_DEVNULL;
+ filename = PLYMOUTH_LOG_DIRECTORY "/boot.log";
break;
default:
ply_error ("Unhandled case in %s line %d\n", __FILE__, __LINE__);
@@ -663,7 +663,7 @@ get_log_spool_file_for_mode (ply_mode_t
break;
case PLY_MODE_SHUTDOWN:
case PLY_MODE_UPDATES:
- filename = NULL;
+ filename = PLYMOUTH_SPOOL_DIRECTORY "/boot.log";
break;
default:
ply_error ("Unhandled case in %s line %d\n", __FILE__, __LINE__);
@@ -715,6 +715,7 @@ prepare_logging (state_t *state)
if (logfile != NULL)
{
ply_trace ("opening log '%s'", logfile);
+ rename(logfile, PLYMOUTH_LOG_DIRECTORY "/boot.olog");
ply_terminal_session_open_log (state->session, logfile);
if (state->number_of_errors > 0)

View File

@ -7,11 +7,32 @@ Subject: [PATCH] Some greenish openSUSE colors
src/plugins/splash/text/plugin.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/plugins/splash/text/plugin.c b/src/plugins/splash/text/plugin.c
index 50059be..d9235c5 100644
--- a/src/plugins/splash/text/plugin.c
+++ b/src/plugins/splash/text/plugin.c
@@ -180,13 +180,13 @@ view_start_animation (view_t *view)
Index: plymouth-0.9.0/src/plugins/splash/text/plugin.c
===================================================================
--- plymouth-0.9.0.orig/src/plugins/splash/text/plugin.c
+++ plymouth-0.9.0/src/plugins/splash/text/plugin.c
@@ -174,13 +174,13 @@ view_start_animation (view_t *view)
0x000000);
ply_terminal_set_color_hex_value (terminal,
PLY_TERMINAL_COLOR_WHITE,
- 0xffffff);
+ 0x40ff00);
ply_terminal_set_color_hex_value (terminal,
PLY_TERMINAL_COLOR_BLUE,
- 0x3465a4);
+ 0x20a000);
ply_terminal_set_color_hex_value (terminal,
PLY_TERMINAL_COLOR_BROWN,
- 0x979a9b);
+ 0x106000);
ply_text_display_set_background_color (view->display,
PLY_TERMINAL_COLOR_BLACK);
Index: plymouth-0.9.0/src/plugins/splash/tribar/plugin.c
===================================================================
--- plymouth-0.9.0.orig/src/plugins/splash/tribar/plugin.c
+++ plymouth-0.9.0/src/plugins/splash/tribar/plugin.c
@@ -177,13 +177,13 @@ view_start_animation (view_t *view)
0x000000);
ply_terminal_set_color_hex_value (terminal,
PLY_TERMINAL_COLOR_WHITE,
@ -28,6 +49,3 @@ index 50059be..d9235c5 100644
ply_text_display_set_background_color (view->display,
PLY_TERMINAL_COLOR_BLACK);
--
1.7.7

View File

@ -0,0 +1,26 @@
From 54951cef0e5ea3caeae1eb0ec33db7ed37d0d4b3 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Thu, 12 Jun 2014 13:50:51 +0200
Subject: [PATCH] device-manager: only call ply_terminal_free
ply_terminal_free will call ply_terminal_close anyway and is guarded
against NULL terminal (ply_terminal_close is not).
---
src/libply-splash-core/ply-device-manager.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/libply-splash-core/ply-device-manager.c b/src/libply-splash-core/ply-device-manager.c
index dbc203d..aa4d15c 100644
--- a/src/libply-splash-core/ply-device-manager.c
+++ b/src/libply-splash-core/ply-device-manager.c
@@ -442,7 +442,6 @@ free_terminal (char *device,
{
ply_hashtable_remove (manager->terminals, device);
- ply_terminal_close (terminal);
ply_terminal_free (terminal);
}
--
1.8.4.5

View File

@ -0,0 +1,191 @@
Related to bnc#892526 -- let plymouthd become a real daemon that
is it should use its own session with the help of the system call
setsid(2). Also avoid an EBUSY on ioctl TIOCCONS if a former
plymouthd had failed. And a crash or termination may restore not
only the current virtual console but also any serial console as
well restore the system console.
---
plymouth-0.9.0/src/libply-splash-core/ply-device-manager.c | 9 ++
plymouth-0.9.0/src/libply-splash-core/ply-device-manager.h | 1
plymouth-0.9.0/src/libply/ply-terminal-session.c | 7 ++
plymouth-0.9.0/src/libply/ply-utils.c | 2
plymouth-0.9.0/src/main.c | 42 +++++++------
5 files changed, 43 insertions(+), 18 deletions(-)
Index: plymouth-0.9.0/src/libply-splash-core/ply-device-manager.c
===================================================================
--- plymouth-0.9.0.orig/src/libply-splash-core/ply-device-manager.c
+++ plymouth-0.9.0/src/libply-splash-core/ply-device-manager.c
@@ -933,3 +933,12 @@ ply_device_manager_deactivate_keyboards
node = next_node;
}
}
+
+void
+ply_close_all_terminals (ply_device_manager_t *manager)
+{
+ ply_hashtable_foreach (manager->terminals,
+ (ply_hashtable_foreach_func_t *)
+ ply_terminal_close,
+ manager);
+}
Index: plymouth-0.9.0/src/libply-splash-core/ply-device-manager.h
===================================================================
--- plymouth-0.9.0.orig/src/libply-splash-core/ply-device-manager.h
+++ plymouth-0.9.0/src/libply-splash-core/ply-device-manager.h
@@ -49,6 +49,7 @@ void ply_device_manager_deactivate_keybo
void ply_device_manager_activate_renderers (ply_device_manager_t *manager);
void ply_device_manager_deactivate_renderers (ply_device_manager_t *manager);
ply_terminal_t *ply_device_manager_get_default_terminal (ply_device_manager_t *manager);
+void ply_close_all_terminals (ply_device_manager_t *manager);
#endif
Index: plymouth-0.9.0/src/libply/ply-utils.c
===================================================================
--- plymouth-0.9.0.orig/src/libply/ply-utils.c
+++ plymouth-0.9.0/src/libply/ply-utils.c
@@ -77,6 +77,7 @@
static int errno_stack[PLY_ERRNO_STACK_SIZE];
static int errno_stack_position = 0;
+static bool inChild = false;
bool
ply_open_unidirectional_pipe (int *sender_fd,
@@ -797,6 +798,7 @@ ply_create_daemon (void)
{
int read_error = errno;
int status;
+ inChild = true;
if (waitpid (pid, &status, WNOHANG) <= 0)
{
@@ -843,6 +845,9 @@ ply_detach_daemon (ply_daemon_handle_t *
close (sender_fd);
free (handle);
+ if (inChild)
+ setsid();
+
return true;
}
Index: plymouth-0.9.0/src/libply/ply-terminal-session.c
===================================================================
--- plymouth-0.9.0.orig/src/libply/ply-terminal-session.c
+++ plymouth-0.9.0/src/libply/ply-terminal-session.c
@@ -187,6 +187,13 @@ ply_terminal_session_redirect_console (p
assert (terminal_name != NULL);
+ fd = open ("/dev/console", O_RDWR | O_NOCTTY);
+ if (fd >= 0)
+ {
+ ioctl (fd, TIOCCONS); /* Undo any current map if any */
+ close (fd);
+ }
+
fd = open (terminal_name, O_RDWR | O_NOCTTY);
if (fd < 0)
Index: plymouth-0.9.0/src/main.c
===================================================================
--- plymouth-0.9.0.orig/src/main.c
+++ plymouth-0.9.0/src/main.c
@@ -1042,6 +1042,7 @@ on_seat_added (state_t *state,
}
+static ply_device_manager_t *manager;
static void
load_devices (state_t *state,
ply_device_manager_flags_t flags)
@@ -1049,6 +1050,8 @@ load_devices (state_t
state->device_manager = ply_device_manager_new (state->default_tty, flags);
state->local_console_terminal = ply_device_manager_get_default_terminal (state->device_manager);
+ manager = state->device_manager;
+
ply_device_manager_watch_seats (state->device_manager,
(ply_seat_added_handler_t)
on_seat_added,
@@ -1077,6 +1080,7 @@ quit_splash (state_t *state)
ply_trace ("Not retaining splash, so deallocating VT");
ply_terminal_deactivate_vt (state->local_console_terminal);
ply_terminal_close (state->local_console_terminal);
+ ply_close_all_terminals (state->device_manager);
}
}
@@ -2075,25 +2079,22 @@ dump_debug_buffer_to_file (void)
#include <termios.h>
#include <unistd.h>
static void
-on_crash (int signum)
+dosigaction (int signum)
{
- struct termios term_attributes;
int fd;
- fd = open ("/dev/tty1", O_RDWR | O_NOCTTY);
- if (fd < 0) fd = open ("/dev/hvc0", O_RDWR | O_NOCTTY);
-
- ioctl (fd, KDSETMODE, KD_TEXT);
-
- tcgetattr (fd, &term_attributes);
-
- term_attributes.c_iflag |= BRKINT | IGNPAR | ICRNL | IXON;
- term_attributes.c_oflag |= OPOST;
- term_attributes.c_lflag |= ECHO | ICANON | ISIG | IEXTEN;
-
- tcsetattr (fd, TCSAFLUSH, &term_attributes);
+ if (manager)
+ {
+ ply_device_manager_deactivate_keyboards (manager);
+ ply_close_all_terminals (manager);
+ }
- close (fd);
+ fd = open ("/dev/console", O_RDWR | O_NOCTTY);
+ if (fd >= 0)
+ {
+ ioctl (fd, TIOCCONS); /* Undo any current map if any */
+ close (fd);
+ }
if (debug_buffer != NULL)
{
@@ -2108,7 +2109,6 @@ on_crash (int signum)
pid_file = NULL;
}
- signal (signum, SIG_DFL);
raise(signum);
}
@@ -2145,6 +2145,7 @@ main (int argc,
char *kernel_command_line = NULL;
char *tty = NULL;
ply_device_manager_flags_t device_manager_flags = PLY_DEVICE_MANAGER_FLAGS_NONE;
+ struct sigaction sa;
state.start_time = ply_get_timestamp ();
state.command_parser = ply_command_parser_new ("plymouthd", "Splash server");
@@ -2256,8 +2257,13 @@ main (int argc,
if (debug)
debug_buffer = ply_buffer_new ();
- signal (SIGABRT, on_crash);
- signal (SIGSEGV, on_crash);
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = SA_RESETHAND;
+ sa.sa_handler = dosigaction;
+ sigaction (SIGHUP, &sa, NULL);
+ sigaction (SIGTERM, &sa, NULL);
+ sigaction (SIGABRT, &sa, NULL);
+ sigaction (SIGSEGV, &sa, NULL);
/* before do anything we need to make sure we have a working
* environment.

View File

@ -0,0 +1,26 @@
From 920009efa99204de172332486de5ccff6a3332d5 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Thu, 19 Jun 2014 17:58:50 +0200
Subject: [PATCH] libply-splash-core: also monitor for file removal in udev
directory
---
src/libply-splash-core/ply-device-manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libply-splash-core/ply-device-manager.c b/src/libply-splash-core/ply-device-manager.c
index aa4d15c..06d751c 100644
--- a/src/libply-splash-core/ply-device-manager.c
+++ b/src/libply-splash-core/ply-device-manager.c
@@ -761,7 +761,7 @@ watch_for_coldplug_completion (ply_device_manager_t *manager)
}
fd = inotify_init1 (IN_CLOEXEC);
- result = inotify_add_watch (fd, "/run/udev", IN_MOVED_TO);
+ result = inotify_add_watch (fd, "/run/udev", IN_MOVED_TO | IN_DELETE);
if (result < 0)
{
--
1.8.4.5

View File

@ -0,0 +1,47 @@
From 84eb4381db85877a9a56b35994e6c10d43e46ebe Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 14 Jul 2014 08:04:54 -0400
Subject: [PATCH] seat: be a little more forgiving in the case there's no open
terminal
We can end up in a situation where a seat object doesn't have a terminal
associated with it. In that case we shouldn't crash, but continue on
with no input available for that seat.
https://bugs.freedesktop.org/show_bug.cgi?id=80553
---
src/libply-splash-core/ply-seat.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
Index: plymouth-0.9.0/src/libply-splash-core/ply-seat.c
===================================================================
--- plymouth-0.9.0.orig/src/libply-splash-core/ply-seat.c
+++ plymouth-0.9.0/src/libply-splash-core/ply-seat.c
@@ -154,14 +154,23 @@ ply_seat_open (ply_seat_t *seat
add_pixel_displays (seat);
}
- else
+ else if (seat->terminal != NULL)
{
seat->keyboard = ply_keyboard_new_for_terminal (seat->terminal);
}
- add_text_displays (seat);
- ply_keyboard_watch_for_input (seat->keyboard);
- seat->keyboard_active = true;
+ if (seat->terminal != NULL) {
+ add_text_displays (seat);
+ } else {
+ ply_trace ("not adding text display for seat, since seat has no associated terminal");
+ }
+
+ if (seat->keyboard != NULL) {
+ ply_keyboard_watch_for_input (seat->keyboard);
+ seat->keyboard_active = true;
+ } else {
+ ply_trace ("not watching seat for input");
+ }
return true;
}

View File

@ -0,0 +1,94 @@
From a6eff09852c2eb4d684526b814d2b2df578938d0 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Thu, 12 Jun 2014 18:51:24 +0200
Subject: [PATCH] seats: guard against NULL terminal
---
src/libply-splash-core/ply-keyboard.c | 7 +++++--
src/libply-splash-core/ply-seat.c | 6 +++---
src/libply-splash-core/ply-terminal.c | 11 +++++++----
3 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/src/libply-splash-core/ply-keyboard.c b/src/libply-splash-core/ply-keyboard.c
index 624f906..1bed19f 100644
--- a/src/libply-splash-core/ply-keyboard.c
+++ b/src/libply-splash-core/ply-keyboard.c
@@ -423,8 +423,11 @@ ply_keyboard_free (ply_keyboard_t *keyboard)
}
else
{
- ply_buffer_free (keyboard->provider.if_terminal->key_buffer);
- free (keyboard->provider.if_terminal);
+ if (keyboard->provider.if_terminal)
+ {
+ ply_buffer_free (keyboard->provider.if_terminal->key_buffer);
+ free (keyboard->provider.if_terminal);
+ }
}
free (keyboard);
diff --git a/src/libply-splash-core/ply-seat.c b/src/libply-splash-core/ply-seat.c
index 2ac8bf7..29e2dfa 100644
--- a/src/libply-splash-core/ply-seat.c
+++ b/src/libply-splash-core/ply-seat.c
@@ -102,12 +102,12 @@ add_text_displays (ply_seat_t *seat)
{
ply_text_display_t *display;
- if (!ply_terminal_is_open (seat->terminal))
+ if (!seat->terminal || !ply_terminal_is_open (seat->terminal))
{
- if (!ply_terminal_open (seat->terminal))
+ if (!seat->terminal || !ply_terminal_open (seat->terminal))
{
ply_trace ("could not add terminal %s: %m",
- ply_terminal_get_name (seat->terminal));
+ seat->terminal ? ply_terminal_get_name (seat->terminal) : "none" );
return;
}
}
diff --git a/src/libply-splash-core/ply-terminal.c b/src/libply-splash-core/ply-terminal.c
index 992dd3f..b52b108 100644
--- a/src/libply-splash-core/ply-terminal.c
+++ b/src/libply-splash-core/ply-terminal.c
@@ -654,30 +654,33 @@ ply_terminal_open (ply_terminal_t *terminal)
int
ply_terminal_get_fd (ply_terminal_t *terminal)
{
- return terminal->fd;
+ return terminal ? terminal->fd : -1;
}
bool
ply_terminal_is_vt (ply_terminal_t *terminal)
{
- return terminal->vt_number > 0;
+ return terminal ? terminal->vt_number > 0 : false;
}
bool
ply_terminal_is_open (ply_terminal_t *terminal)
{
- return terminal->is_open;
+ return terminal ? terminal->is_open : false;
}
bool
ply_terminal_is_active (ply_terminal_t *terminal)
{
- return terminal->is_active;
+ return terminal ? terminal->is_active : false;
}
void
ply_terminal_close (ply_terminal_t *terminal)
{
+ if (!terminal)
+ return;
+
if (!terminal->is_open)
{
ply_trace ("terminal %s is already closed", terminal->name);
--
1.8.4.5

View File

@ -0,0 +1,56 @@
From 95b775ea543489c688595e94a96909402b2b56f1 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Fri, 20 Jun 2014 16:01:12 +0200
Subject: [PATCH] splash: do not process display lists if it is empty or NULL
---
src/plugins/splash/script/plugin.c | 1 +
src/plugins/splash/script/script-lib-sprite.c | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/src/plugins/splash/script/plugin.c b/src/plugins/splash/script/plugin.c
index 8e37b37..cd9e052 100644
--- a/src/plugins/splash/script/plugin.c
+++ b/src/plugins/splash/script/plugin.c
@@ -334,6 +334,7 @@ stop_script_animation (ply_boot_splash_plugin_t *plugin)
script_state_destroy (plugin->script_state);
script_lib_sprite_destroy (plugin->script_sprite_lib);
+ plugin->script_sprite_lib = NULL;
script_lib_image_destroy (plugin->script_image_lib);
script_lib_plymouth_destroy (plugin->script_plymouth_lib);
script_lib_math_destroy (plugin->script_math_lib);
diff --git a/src/plugins/splash/script/script-lib-sprite.c b/src/plugins/splash/script/script-lib-sprite.c
index 166c7e7..f1cd57f 100644
--- a/src/plugins/splash/script/script-lib-sprite.c
+++ b/src/plugins/splash/script/script-lib-sprite.c
@@ -704,6 +704,9 @@ void script_lib_sprite_pixel_display_removed (script_lib_sprite_data_t *data, pl
ply_list_node_t *next_node;
script_lib_display_t* display;
+ if (!data)
+ return;
+
node = ply_list_get_first_node (data->displays);
while (node)
{
@@ -725,6 +728,9 @@ script_lib_sprite_refresh (script_lib_sprite_data_t *data)
ply_region_t *region = ply_region_new ();
ply_list_t *rectable_list;
+ if (!data)
+ return;
+
ply_list_sort_stable (data->sprite_list, &sprite_compare_z);
node = ply_list_get_first_node (data->sprite_list);
@@ -848,5 +854,6 @@ void script_lib_sprite_destroy (script_lib_sprite_data_t *data)
script_parse_op_free (data->script_main_op);
script_obj_native_class_destroy (data->class);
free (data);
+ data = NULL;
}
--
1.8.4.5

View File

@ -0,0 +1,101 @@
From 61525fba34c724b6e319f6b3b8198c0c0f8aa677 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Thu, 19 Jun 2014 16:18:12 +0200
Subject: [PATCH] splash: remove pixel_pixel in sprite-lib when notified they
are gone
---
src/plugins/splash/script/plugin.c | 1 +
src/plugins/splash/script/script-lib-sprite.c | 28 +++++++++++++++++++++++----
src/plugins/splash/script/script-lib-sprite.h | 1 +
3 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/src/plugins/splash/script/plugin.c b/src/plugins/splash/script/plugin.c
index c5c1e16..8e37b37 100644
--- a/src/plugins/splash/script/plugin.c
+++ b/src/plugins/splash/script/plugin.c
@@ -401,6 +401,7 @@ static void
remove_pixel_display (ply_boot_splash_plugin_t *plugin,
ply_pixel_display_t *display)
{
+ script_lib_sprite_pixel_display_removed (plugin->script_sprite_lib, display);
ply_list_remove_data(plugin->displays, display);
}
diff --git a/src/plugins/splash/script/script-lib-sprite.c b/src/plugins/splash/script/script-lib-sprite.c
index e0ced7e..166c7e7 100644
--- a/src/plugins/splash/script/script-lib-sprite.c
+++ b/src/plugins/splash/script/script-lib-sprite.c
@@ -77,7 +77,7 @@ static script_return_t sprite_get_image (script_state_t *state,
{
script_lib_sprite_data_t *data = user_data;
sprite_t *sprite = script_obj_as_native_of_class (state->this, data->class);
-
+
if (sprite && sprite->image_obj)
{
script_obj_ref (sprite->image_obj);
@@ -481,7 +481,7 @@ static void script_lib_sprite_draw_area (script_lib_display_t *display,
}
}
-static void
+static void
draw_area (script_lib_sprite_data_t *data,
int x,
int y,
@@ -533,10 +533,10 @@ script_lib_sprite_data_t *script_lib_sprite_setup (script_state_t *state,
ply_pixel_display_t *pixel_display = ply_list_node_get_data (node);
script_lib_display_t *script_display = malloc (sizeof(script_lib_display_t));
script_display->pixel_display = pixel_display;
-
+
script_display->x = (max_width - ply_pixel_display_get_width (pixel_display)) / 2;
script_display->y = (max_height - ply_pixel_display_get_height (pixel_display)) / 2;
-
+
script_display->data = data;
ply_pixel_display_set_draw_handler (pixel_display,
(ply_pixel_display_draw_handler_t)
@@ -698,6 +698,26 @@ region_add_area (ply_region_t *region,
ply_region_add_rectangle (region, &rectangle);
}
+void script_lib_sprite_pixel_display_removed (script_lib_sprite_data_t *data, ply_pixel_display_t *pixel_display)
+{
+ ply_list_node_t *node;
+ ply_list_node_t *next_node;
+ script_lib_display_t* display;
+
+ node = ply_list_get_first_node (data->displays);
+ while (node)
+ {
+ next_node = ply_list_get_next_node (data->displays, node);
+ display = ply_list_node_get_data (node);
+
+ if (display->pixel_display == pixel_display)
+ {
+ ply_list_remove_node (data->displays, node);
+ }
+ node = next_node;
+ }
+}
+
void
script_lib_sprite_refresh (script_lib_sprite_data_t *data)
{
diff --git a/src/plugins/splash/script/script-lib-sprite.h b/src/plugins/splash/script/script-lib-sprite.h
index 0cb0681..2404b85 100644
--- a/src/plugins/splash/script/script-lib-sprite.h
+++ b/src/plugins/splash/script/script-lib-sprite.h
@@ -65,6 +65,7 @@ typedef struct
script_lib_sprite_data_t *script_lib_sprite_setup (script_state_t *state,
ply_list_t *displays);
+void script_lib_sprite_pixel_display_removed (script_lib_sprite_data_t *data, ply_pixel_display_t *pixel_display);
void script_lib_sprite_refresh (script_lib_sprite_data_t *data);
void script_lib_sprite_destroy (script_lib_sprite_data_t *data);
--
1.8.4.5

View File

@ -0,0 +1,37 @@
From 40c2dd36c5da64919f69dd4f37de2ecf19f23058 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 28 Jul 2014 09:58:49 -0400
Subject: [PATCH] =?UTF-8?q?text-step-bar:=20use=20correct=20utf-8=20multib?=
=?UTF-8?q?yte=20sequence=20for=20=E2=96=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
For some reason in commit 113526408c5706c9efc7f43c3f8258354e762677
I commited the sequence \x25\x96\xa0 in place of the block character
that was there before. I don't know where I got \x25 from, but it's
not right (and couldn't even be right since the high order bit isn't
set which is a requirement for the first byte in multi-byte utf-8
sequences).
This commit uses \xe2 instead which I got from doing:
$ echo ■ | xxd
0000000: e296 a00a ....
---
src/libply-splash-core/ply-text-step-bar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: plymouth-0.9.0/src/libply-splash-core/ply-text-step-bar.c
===================================================================
--- plymouth-0.9.0.orig/src/libply-splash-core/ply-text-step-bar.c
+++ plymouth-0.9.0/src/libply-splash-core/ply-text-step-bar.c
@@ -96,7 +96,7 @@ ply_text_step_bar_draw (ply_text_step_ba
}
/* U+25A0 BLACK SQUARE */
- ply_text_display_write (step_bar->display, "%s", "\x25\x96\xa0");
+ ply_text_display_write (step_bar->display, "%s", "\xe2\x96\xa0");
ply_text_display_write (step_bar->display, "%c", ' ');
}

87
fix-serial-consoles.patch Normal file
View File

@ -0,0 +1,87 @@
Index: plymouth-0.8.8_git20140327/src/libply-splash-core/ply-device-manager.c
===================================================================
--- plymouth-0.8.8_git20140327.orig/src/libply-splash-core/ply-device-manager.c
+++ plymouth-0.8.8_git20140327/src/libply-splash-core/ply-device-manager.c
@@ -58,6 +58,8 @@ struct _ply_device_manager
int udev_queue_fd;
ply_fd_watch_t *udev_queue_fd_watch;
struct udev_monitor *udev_monitor;
+ bool has_serial_consoles;
+
ply_seat_added_handler_t seat_added_handler;
ply_seat_removed_handler_t seat_removed_handler;
@@ -501,6 +503,7 @@ ply_device_manager_new (const char
manager->loop = NULL;
manager->terminals = ply_hashtable_new (ply_hashtable_string_hash, ply_hashtable_string_compare);
manager->local_console_terminal = ply_terminal_new (default_tty);
+ manager->has_serial_consoles = false;
ply_hashtable_insert (manager->terminals,
(void *) ply_terminal_get_name (manager->local_console_terminal),
manager->local_console_terminal);
@@ -670,21 +673,19 @@ create_seat_for_terminal (const char
static bool
create_seats_from_terminals (ply_device_manager_t *manager)
{
- bool has_serial_consoles;
-
ply_trace ("checking for consoles");
if (manager->flags & PLY_DEVICE_MANAGER_FLAGS_IGNORE_SERIAL_CONSOLES)
{
- has_serial_consoles = false;
+ manager->has_serial_consoles = false;
ply_trace ("ignoring all consoles but default console because explicitly told to.");
}
else
{
- has_serial_consoles = add_consoles_from_file (manager, "/sys/class/tty/console/active");
+ manager->has_serial_consoles = add_consoles_from_file (manager, "/sys/class/tty/console/active");
}
- if (has_serial_consoles)
+ if (manager->has_serial_consoles)
{
ply_trace ("serial consoles detected, managing them with details forced");
ply_hashtable_foreach (manager->terminals,
@@ -838,6 +839,15 @@ ply_device_manager_has_open_seats (ply_d
return false;
}
+bool
+ply_device_manager_has_serial_consoles (ply_device_manager_t *manager)
+{
+ if (manager)
+ return manager->has_serial_consoles;
+ else
+ return false;
+}
+
ply_list_t *
ply_device_manager_get_seats (ply_device_manager_t *manager)
{
Index: plymouth-0.8.8_git20140327/src/main.c
===================================================================
--- plymouth-0.8.8_git20140327.orig/src/main.c
+++ plymouth-0.8.8_git20140327/src/main.c
@@ -848,7 +848,7 @@ plymouth_should_show_default_splash (sta
};
int i;
- if (state->should_force_details)
+ if (ply_device_manager_has_serial_consoles(state->device_manager) || state->should_force_details)
return false;
for (i = 0; strings[i] != NULL; i++)
Index: plymouth-0.8.8_git20140327/src/libply-splash-core/ply-device-manager.h
===================================================================
--- plymouth-0.8.8_git20140327.orig/src/libply-splash-core/ply-device-manager.h
+++ plymouth-0.8.8_git20140327/src/libply-splash-core/ply-device-manager.h
@@ -42,6 +42,7 @@ void ply_device_manager_watch_seats (ply
ply_seat_removed_handler_t seat_removed_handler,
void *data);
bool ply_device_manager_has_open_seats (ply_device_manager_t *manager);
+bool ply_device_manager_has_serial_consoles (ply_device_manager_t *manager);
ply_list_t *ply_device_manager_get_seats (ply_device_manager_t *manager);
void ply_device_manager_free (ply_device_manager_t *manager);
void ply_device_manager_activate_keyboards (ply_device_manager_t *manager);

View File

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

3
plymouth-0.9.0.tar.bz2 Normal file
View File

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

View File

@ -0,0 +1,19 @@
Index: plymouth-0.9.0/src/libply-splash-core/ply-device-manager.c
===================================================================
--- plymouth-0.9.0.orig/src/libply-splash-core/ply-device-manager.c
+++ plymouth-0.9.0/src/libply-splash-core/ply-device-manager.c
@@ -101,12 +101,13 @@ device_is_for_local_console (ply_device_
* card the kernel is using for its console. */
device_path = udev_device_get_syspath (device);
asprintf (&bus_device_path, "%s/device", device_path);
+ ply_trace ("Testing device path %s\n", bus_device_path);
bus_device = udev_device_new_from_syspath (manager->udev_context, bus_device_path);
boot_vga = udev_device_get_sysattr_value (bus_device, "boot_vga");
free (bus_device_path);
- if (boot_vga != NULL && strcmp (boot_vga, "1") == 0)
+ if (boot_vga == NULL /* framebuffer case */ || strcmp (boot_vga, "1") == 0)
for_local_console = true;
else
for_local_console = false;

View File

@ -4,8 +4,8 @@
[ -z "$INITRDDIR" ] && usage error
mkdir -p ${INITRDDIR}${PLYMOUTH_DATADIR}/plymouth/themes
-inst ${PLYMOUTH_DAEMON_PATH} $INITRDDIR /sbin/plymouthd
-inst ${PLYMOUTH_CLIENT_PATH} $INITRDDIR /bin/plymouth
-inst ${PLYMOUTH_DAEMON_PATH} $INITRDDIR
-inst ${PLYMOUTH_CLIENT_PATH} $INITRDDIR
+inst ${PLYMOUTH_DAEMON_PATH} $INITRDDIR /usr/sbin/plymouthd
+inst ${PLYMOUTH_CLIENT_PATH} $INITRDDIR /usr/bin/plymouth
inst ${PLYMOUTH_DATADIR}/plymouth/themes/text/text.plymouth $INITRDDIR

View File

@ -0,0 +1,15 @@
diff --git a/src/libply-splash-core/ply-device-manager.c b/src/libply-splash-core/ply-device-manager.c
index a5aa59d..0be2117 100644
--- a/src/libply-splash-core/ply-device-manager.c
+++ b/src/libply-splash-core/ply-device-manager.c
@@ -125,6 +125,10 @@ fb_device_has_drm_device (ply_device_manager_t *manager,
const char *id_path;
bool has_drm_device = false;
+ const char *card_name = udev_device_get_sysattr_value (fb_device, "name");
+ if (card_name && strcmp ("cirrusdrmfb", card_name) == 0)
+ return false;
+
/* We want to see if the framebuffer is associated with a DRM-capable
* graphics card, if it is, we'll use the DRM device */
card_matches = udev_enumerate_new (manager->udev_context);

22
plymouth-manpages.patch Normal file
View File

@ -0,0 +1,22 @@
Index: plymouth-0.8.8_git20140207/docs/Makefile.am
===================================================================
--- plymouth-0.8.8_git20140207.orig/docs/Makefile.am
+++ plymouth-0.8.8_git20140207/docs/Makefile.am
@@ -16,12 +16,14 @@ plymouth.1: plymouth1.xml
%.1: %.xml
$(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
-man_MANS = \
+man1_MANS = \
plymouth.1 \
- plymouth.8 \
- plymouthd.8 \
plymouth-set-default-theme.1
+man8_MANS = \
+ plymouth.8 \
+ plymouthd.8
+
EXTRA_DIST = \
plymouth.xml \
plymouth1.xml \

View File

@ -1,49 +0,0 @@
From 152304f3fd2ebd04ca6d49c62dce4ddd2269326a Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Fri, 20 Jul 2012 11:07:29 +0200
Subject: [PATCH] Revert "libply: remove the unused SPLASH_MODE_SUSPEND and
SPLASH_MODE_RESUME"
This reverts commit 02c596757753589f7e49d26eab2759d552f24671.
Conflicts:
src/libply-splash-core/ply-boot-splash-plugin.h
src/plugins/splash/script/script-lib-plymouth.c
---
src/libply-splash-core/ply-boot-splash-plugin.h | 2 ++
src/plugins/splash/script/script-lib-plymouth.c | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/src/libply-splash-core/ply-boot-splash-plugin.h b/src/libply-splash-core/ply-boot-splash-plugin.h
index 2d73d66..1a67526 100644
--- a/src/libply-splash-core/ply-boot-splash-plugin.h
+++ b/src/libply-splash-core/ply-boot-splash-plugin.h
@@ -38,6 +38,8 @@ typedef enum
{
PLY_BOOT_SPLASH_MODE_BOOT_UP,
PLY_BOOT_SPLASH_MODE_SHUTDOWN,
+ PLY_BOOT_SPLASH_MODE_SUSPEND,
+ PLY_BOOT_SPLASH_MODE_RESUME,
PLY_BOOT_SPLASH_MODE_UPDATES,
PLY_BOOT_SPLASH_MODE_INVALID
} ply_boot_splash_mode_t;
diff --git a/src/plugins/splash/script/script-lib-plymouth.c b/src/plugins/splash/script/script-lib-plymouth.c
index 5c648a6..eb7791e 100644
--- a/src/plugins/splash/script/script-lib-plymouth.c
+++ b/src/plugins/splash/script/script-lib-plymouth.c
@@ -61,6 +61,12 @@ static script_return_t plymouth_get_mode (script_state_t *state,
case PLY_BOOT_SPLASH_MODE_SHUTDOWN:
obj = script_obj_new_string ("shutdown");
break;
+ case PLY_BOOT_SPLASH_MODE_SUSPEND:
+ obj = script_obj_new_string ("suspend");
+ break;
+ case PLY_BOOT_SPLASH_MODE_RESUME:
+ obj = script_obj_new_string ("resume");
+ break;
case PLY_BOOT_SPLASH_MODE_UPDATES:
obj = script_obj_new_string ("updates");
break;
--
1.7.10.4

View File

@ -1,3 +1,168 @@
-------------------------------------------------------------------
Thu Sep 25 13:19:01 UTC 2014 - idonmez@suse.com
- Update 0001-let-it-become-a-real-daemon.patch to call setsid
only from the child process.
-------------------------------------------------------------------
Fri Sep 12 12:50:06 UTC 2014 - idonmez@suse.com
- Add 0001-let-it-become-a-real-daemon.patch to make plymouth
a real daemon, fixes part of bnc#889757. Patch by Werner.
-------------------------------------------------------------------
Thu Sep 4 10:34:25 UTC 2014 - idonmez@suse.com
- Add plymouth-boot-vga-framebuffer.patch to fix boot_vga
problem with framebuffer devices. (bnc#886211)
-------------------------------------------------------------------
Mon Aug 11 14:23:27 UTC 2014 - idonmez@suse.com
- Modify plymouth-ignore-cirrusdrm.patch to return as
early as possible. Patch by glin@suse.com
-------------------------------------------------------------------
Thu Aug 7 09:24:37 UTC 2014 - idonmez@suse.com
- Invert the logic in plymouth-ignore-cirrusdrm.patch bnc#890516
-------------------------------------------------------------------
Mon Jul 28 16:10:49 CEST 2014 - fcrozat@suse.com
- Add
0001-text-step-bar-use-correct-utf-8-multibyte-sequence-f.patch:
fix incorrect UTF-8 code used for square [bnc#886148].
-------------------------------------------------------------------
Fri Jul 25 14:32:38 CEST 2014 - fcrozat@suse.com
- Add plymouth-ignore-cirrusdrm.patch: ignore cirrus drm and use fb
instead [bnc#888590]
-------------------------------------------------------------------
Thu Jul 24 16:30:43 UTC 2014 - fcrozat@suse.com
- Add
0001-seat-be-a-little-more-forgiving-in-the-case-there-s-.patch:
Be more forgiving with empty seat.
-------------------------------------------------------------------
Tue Jul 8 16:04:38 UTC 2014 - fcrozat@suse.com
- Update 0001-Some-greenish-openSUSE-colors.patch to also use SUSE
colors on tribar [bnc#886148]
-------------------------------------------------------------------
Fri Jun 27 11:27:02 UTC 2014 - fcrozat@suse.com
- Add
0001-libply-splash-core-also-monitor-for-file-removal-in-.patch:
handle new udev behaviour in seqnum removal.
-------------------------------------------------------------------
Fri Jun 20 14:03:36 UTC 2014 - fcrozat@suse.com
- Add
0001-splash-do-not-process-display-lists-if-it-is-empty.patch:
fix crash when calling plymouth quit
- Add 0001-seats-guard-against-NULL-terminal.patch: guard against
NULL terminal.
- Update stop-graphical.patch: add RemainAfterExit=true to
plymouth-start.service, ensuring plymouthd is not restarted when
switching between runlevels.
-------------------------------------------------------------------
Thu Jun 19 14:22:44 UTC 2014 - fcrozat@suse.com
- Add
0001-splash-remove-pixel_pixel-in-sprite-lib-when-notifie.patch:
fix crash when pixel_display is removed.
- Add 0001-device-manager-only-call-ply_terminal_free.patch: fix
crash.
- Add use-mkinitrd.patch: call mkinitrd -B, not dracut for now,
otherwise initramfs is being created by plymouth-update-initrd,
not initrd file.
- Ensure we don't rebuild initrd twice when updating plymouth.
- Ensure default theme is SLE/openSUSE (based on %suse_version)
-------------------------------------------------------------------
Fri Jun 6 16:16:38 UTC 2014 - fcrozat@suse.com
- Release 0.9.0 (3 additional fixes compared to previously packaged
git snapshot):
+ Use udev for graphics device enumeration
+ Add new text plugin to replace the tribar one
+ Add background tiling and watermark support to two-step
+ Make various plymouth commands that change state be resilient
to being called multiple times
+ Support going back to the initrd at shutdown
+ Keyfile parser improvements
+ Make plymouthd use better defaults when running on top of X11
+ Fixes for systems using QXL
+ minor two-step plugin fixes
+ Use /sys/class/tty/console/active instead of parsing
/proc/cmdline for consoles.
+ Documentation improvements
+ Drop driver specific renderers and use generic driver across the
board.
+ Better debug message output
+ systemd integration fixes
+ upstart integration fixes
+ initrd scripts fixes
+ Misc fixes
-------------------------------------------------------------------
Thu Jun 5 07:24:10 UTC 2014 - idonmez@suse.com
- Update fix-serial-consoles.patch to fix a crash in some rare
cases.
-------------------------------------------------------------------
Wed May 21 12:11:25 UTC 2014 - idonmez@suse.com
- Add fix-serial-consoles.patch to fix binary garbage on serial
consoles. This is bnc#873859
-------------------------------------------------------------------
Mon May 5 12:49:49 UTC 2014 - fcrozat@suse.com
- Remove plymouth-restore-suspend.patch: suspend package is being
dropped, no longer needs to provide this old API.
- Remove requires on suspend package.
-------------------------------------------------------------------
Thu Apr 17 12:56:23 UTC 2014 - idonmez@suse.com
- Update to git snapshot as of 20140327
* Fixes bnc#872502 and bnc#872428
-------------------------------------------------------------------
Wed Apr 16 11:35:30 UTC 2014 - trenn@suse.de
- Kill all mkinitrd stuff
Remove suse-initrd-support
- Tell zypper to regenerate initrd on installation/update via %post and
%posttrans scripts
-------------------------------------------------------------------
Thu Apr 10 10:55:03 UTC 2014 - idonmez@suse.com
- Add plymouth-manpages.patch to fix manpage installation (bnc#871419)
-------------------------------------------------------------------
Thu Feb 20 12:47:03 UTC 2014 - fcrozat@suse.com
- Drop plymouth.conf, it is no longer used, plymouthd.conf is
nowadays.
-------------------------------------------------------------------
Wed Feb 15 10:02:32 UTC 2014 - kigurame@opensuse.org
- Updated from git
- carried over patches
- Dropped 0001-Make-plymouthd-real-daemon-and-save-old-log.patch
Because it is really not necesary
-------------------------------------------------------------------
Wed Feb 12 14:19:48 UTC 2014 - werner@suse.de

View File

@ -22,32 +22,53 @@
%define plymouth_initrd_file /boot/initrd-plymouth.img
Name: plymouth
Version: 0.8.8_git201309032142
Version: 0.9.0
Release: 0
Summary: Graphical Boot Animation and Logger
License: GPL-2.0+
Group: System/Base
Url: http://freedesktop.org/software/plymouth/releases
Source0: %{name}-%{version}.tar.xz
Source0: %{name}-%{version}.tar.bz2
Source1: boot-duration
# PATCH-OPENSUSE -- Support the openSUSE initrd
Patch1: suse-initrd-support
# PATCH-OPENSUSE -- Handle correctly multiple displays with different sizes
Patch3: plymouth-fix-window-size
# PATCH-OPENSUSE -- Ensure graphical.target is conflicting with plymouth-wait-quit.service
Patch4: stop-graphical.patch
# PATCH-OPENSUSE -- Restore suspend / resume state (needed for suspend package)
Patch5: plymouth-restore-suspend.patch
# PATCH-OPENSUSE -- prefix is /usr/sbin and /usr/bin
Patch9: plymouth-dracut-path.patch
Patch10: 0001-Some-greenish-openSUSE-colors.patch
# PATCH-OPENSUSE -- plymouth-correct-runtime-dir.patch tittiatcoke@gmail.com -- make sure the runtime directory is /run and not /var/run
Patch16: plymouth-correct-runtime-dir.patch
# PATCH-SUSE -- 0001-Make-plymouthd-real-daemon-and-save-old-log.patch werner@suse.de -- All daemons should call setsid(2) to become a real daemons
Patch17: 0001-Make-plymouthd-real-daemon-and-save-old-log.patch
# PATCH-FIX-UPSTREAM plymouth-manpages.patch idoenmez@suse.de -- Fix man page installation
Patch17: plymouth-manpages.patch
Patch18: fix-serial-consoles.patch
# PATCH-FIX-UPSTREAM 0001-device-manager-only-call-ply_terminal_free.patch fcrozat@suse.com -- Fix crash
Patch19: 0001-device-manager-only-call-ply_terminal_free.patch
# PATCH-FIX-OPENSUSE use-mkinitrd.patch fcrozat@suse.com -- call mkinitrd -B for now
Patch20: use-mkinitrd.patch
# PATCH-FIX-UPSTREAM 0001-seats-guard-against-NULL-terminal.patch fcrozat@suse.com -- guard against null terminal
Patch21: 0001-seats-guard-against-NULL-terminal.patch
# PATCH-FIX-UPSTREAM 0001-splash-remove-pixel_pixel-in-sprite-lib-when-notifie.patch fcrozat@suse.com -- prevent crash if pixel display is removed
Patch22: 0001-splash-remove-pixel_pixel-in-sprite-lib-when-notifie.patch
# PATCH-FIX-UPSTREAM 0001-splash-do-not-process-display-lists-if-it-is-empty.patch fcrozat@suse.com -- do no crash when removing displays
Patch23: 0001-splash-do-not-process-display-lists-if-it-is-empty.patch
# PATCH-FIX-UPSTREAM 0001-libply-splash-core-also-monitor-for-file-removal-in-.patch fcrozat@suse.com -- handle recent udev
Patch24: 0001-libply-splash-core-also-monitor-for-file-removal-in-.patch
# PATCH-FIX-UPSTREAM 0001-seat-be-a-little-more-forgiving-in-the-case-there-s-.patch fcrozat@suse.com -- handle empty seat better
Patch25: 0001-seat-be-a-little-more-forgiving-in-the-case-there-s-.patch
# PATCH-FIX-UPSTREAM plymouth-ignore-cirrusdrm.patch fcrozat@suse.com -- ignore cirrusdrm, use fb instead
Patch26: plymouth-ignore-cirrusdrm.patch
# PATCH-FIX-UPSTREAM 0001-text-step-bar-use-correct-utf-8-multibyte-sequence-f.patch bnc#886148 fcrozat@suse.com -- fix UTF-8 code for square
Patch27: 0001-text-step-bar-use-correct-utf-8-multibyte-sequence-f.patch
Patch28: plymouth-boot-vga-framebuffer.patch
Patch29: 0001-let-it-become-a-real-daemon.patch
BuildRequires: automake
BuildRequires: docbook-xsl-stylesheets
BuildRequires: kernel-headers
BuildRequires: libtool
BuildRequires: libudev-devel
BuildRequires: libxslt
BuildRequires: module-init-tools
BuildRequires: update-desktop-files
BuildRequires: xz
@ -55,12 +76,9 @@ BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(systemd) >= 186
Requires: %{name}-branding
Requires: gnu-unifont-bitmap-fonts
%ifarch %ix86 x86_64 ppc ppc64 ppc64le
Requires: suspend >= 0.80.20100129.1
%endif
Requires: systemd >= 186
Requires(post): plymouth-scripts = %{version}
Requires(post): mkinitrd
BuildRequires: suse-module-tools
Suggests: plymouth-plugin-label
Provides: bootsplash = 3.4
Obsoletes: bootsplash <= 3.4
@ -156,7 +174,6 @@ Requires: coreutils
Requires: cpio
Requires: findutils
Requires: pigz
Requires(post): mkinitrd
%description scripts
This package contains scripts that help integrate Plymouth with
@ -239,6 +256,19 @@ Plymouth. It features an extensible, scriptable boot splash
language that simplifies the process of designing custom
boot splash themes.
%package plugin-tribar
Summary: Plymouth "script" plugin
Group: System/Base
Requires: libply-splash-core2 = %{version}
Requires: libply-splash-graphics2 = %{version}
Requires: libply2 = %{version}
%description plugin-tribar
This package contains the "tribar" boot splash plugin for
Plymouth. It features an extensible, scriptable boot splash
language that simplifies the process of designing custom
boot splash themes.
%package theme-fade-in
Summary: Plymouth "Fade-In" theme
Group: System/Base
@ -287,6 +317,17 @@ BuildArch: noarch
This package contains the "Solar" boot splash theme for
Plymouth. It features a blue flamed sun with animated solar flares.
%package theme-tribar
Summary: Plymouth "Tribar" theme
Group: System/Base
Requires: %{name}-plugin-tribar = %{version}
Requires(post): %{name}-scripts
BuildArch: noarch
%description theme-tribar
This package contains the "Tribar" boot splash theme for
Plymouth
%package theme-script
Summary: Plymouth "Script" plugin
Group: System/Base
@ -301,21 +342,35 @@ plugin.
%prep
%setup -q
%patch1 -p1
%patch3 -p1
%patch4 -p1
%ifarch %ix86 x86_64 ppc ppc64 ppc64le
%patch5 -p1
%endif
%patch9 -p0
%patch10 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
# replace builddate with patch0date
sed -i "s/__DATE__/\"$(stat -c %y %{_sourcedir}/%{name}.changes)\"/" src/main.c
# Change the default theme
sed -i -e 's/fade-in/openSUSE/g' src/plymouthd.defaults
%if %{suse_version} == 1315
sed -i -e 's/spinner/SLE/g' src/plymouthd.defaults
%else
sed -i -e 's/spinner/openSUSE/g' src/plymouthd.defaults
%endif
%build
autoreconf -fiv
@ -330,11 +385,10 @@ autoreconf -fiv
--with-log-viewer \
--without-rhgb-compat-link \
--with-boot-tty=/dev/tty7 \
--with-shutdown-tty=/dev/tty7 \
--with-shutdown-tty=/dev/tty1 \
--without-gdm-autostart-file \
--with-release-file=/etc/os-release
make clean
make %{?_smp_mflags} V=1
%install
@ -361,12 +415,12 @@ touch %{buildroot}%{_localstatedir}/log/boot.log
touch %{buildroot}%{_localstatedir}/spool/plymouth/boot.log
cp $RPM_SOURCE_DIR/boot-duration %{buildroot}%{_datadir}/plymouth/default-boot-duration
cp $RPM_SOURCE_DIR/boot-duration %{buildroot}%{_localstatedir}/lib/plymouth
cp %{buildroot}/%{_datadir}/plymouth/plymouthd.defaults %{buildroot}/%{_sysconfdir}/plymouth/plymouth.conf
cp %{buildroot}/%{_datadir}/plymouth/plymouthd.defaults %{buildroot}/%{_sysconfdir}/plymouth/plymouthd.conf
%post
%{?regenerate_initrd_post}
if [ ! -e /.buildenv ]; then
[ -f %{_localstatedir}/lib/plymouth/boot-duration ] || cp -f %{_datadir}/plymouth/default-boot-duration %{_localstatedir}/lib/plymouth/boot-duration
%{_libexecdir}/plymouth/plymouth-update-initrd
fi
[ -x /bin/systemctl ] && /bin/systemctl daemon-reload >/dev/null 2>&1 || :
@ -377,6 +431,9 @@ if [ $1 -eq 0 ]; then
[ -x /bin/systemctl ] && /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%posttrans
%{?regenerate_initrd_posttrans}
%post -n libply-boot-client2 -p /sbin/ldconfig
%postun -n libply-boot-client2 -p /sbin/ldconfig
@ -471,7 +528,6 @@ fi
%dir %{_libdir}/plymouth/renderers
%dir %{_sysconfdir}/plymouth
%config(noreplace) %{_sysconfdir}/plymouth/plymouthd.conf
%config(noreplace) %{_sysconfdir}/plymouth/plymouth.conf
%{plymouthdaemon_execdir}/plymouthd
%{plymouthclient_execdir}/plymouth
/bin/plymouth
@ -491,6 +547,7 @@ fi
%{_unitdir}/*
%ghost %{_localstatedir}/log/boot.log
%ghost %{_localstatedir}/spool/plymouth/boot.log
%files dracut
%defattr(-, root, root)
%{_libexecdir}/plymouth/plymouth-populate-initrd
@ -583,10 +640,19 @@ fi
%{_datadir}/plymouth/themes/solar/*.png
%{_datadir}/plymouth/themes/solar/solar.plymouth
%files theme-tribar
%defattr(-, root, root)
%dir %{_datadir}/plymouth/themes/tribar
%{_datadir}/plymouth/themes/tribar/*.*
%files plugin-two-step
%defattr(-, root, root)
%{_libdir}/plymouth/two-step.so
%files plugin-tribar
%defattr(-, root, root)
%{_libdir}/plymouth/tribar.so
%files plugin-script
%defattr(-, root, root)
%{_libdir}/plymouth/script.so

View File

@ -1,7 +1,7 @@
Index: plymouth-0.8.6.1/systemd-units/plymouth-quit-wait.service.in
Index: plymouth-0.9.0/systemd-units/plymouth-quit-wait.service.in
===================================================================
--- plymouth-0.8.6.1.orig/systemd-units/plymouth-quit-wait.service.in
+++ plymouth-0.8.6.1/systemd-units/plymouth-quit-wait.service.in
--- plymouth-0.9.0.orig/systemd-units/plymouth-quit-wait.service.in
+++ plymouth-0.9.0/systemd-units/plymouth-quit-wait.service.in
@@ -1,6 +1,7 @@
[Unit]
Description=Wait for Plymouth Boot Screen to Quit
@ -10,10 +10,10 @@ Index: plymouth-0.8.6.1/systemd-units/plymouth-quit-wait.service.in
[Service]
ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth --wait
Index: plymouth-0.8.6.1/systemd-units/plymouth-quit.service.in
Index: plymouth-0.9.0/systemd-units/plymouth-quit.service.in
===================================================================
--- plymouth-0.8.6.1.orig/systemd-units/plymouth-quit.service.in
+++ plymouth-0.8.6.1/systemd-units/plymouth-quit.service.in
--- plymouth-0.9.0.orig/systemd-units/plymouth-quit.service.in
+++ plymouth-0.9.0/systemd-units/plymouth-quit.service.in
@@ -1,6 +1,7 @@
[Unit]
Description=Terminate Plymouth Boot Screen

View File

@ -1,140 +0,0 @@
Index: plymouth-0.8.8_git201309032142/configure.ac
===================================================================
--- plymouth-0.8.8_git201309032142.orig/configure.ac
+++ plymouth-0.8.8_git201309032142/configure.ac
@@ -302,6 +302,7 @@ AC_CONFIG_FILES([Makefile
themes/spinner/Makefile
themes/script/Makefile
images/Makefile
+ scripts/setup-plymouth.sh
scripts/plymouth-generate-initrd
scripts/plymouth-populate-initrd
scripts/plymouth-set-default-theme
Index: plymouth-0.8.8_git201309032142/scripts/boot-plymouth.chroot.sh
===================================================================
--- /dev/null
+++ plymouth-0.8.8_git201309032142/scripts/boot-plymouth.chroot.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#%stage: setup
+#%depends: plymouth
+#%programs: /usr/bin/plymouth /usr/sbin/plymouthd /usr/bin/readlink
+#%dontshow
+
+ply_init_is_systemd()
+{
+ local d="$init"
+ [ -n "$d" ] || return 1
+ if [ -L "/root$d" ]; then
+ d=`readlink "/root$d"`
+ fi
+ [ "${d##*/}" = systemd ] || return 1
+ return 0
+}
+
+if ply_init_is_systemd; then
+ plymouth update-root-fs --new-root-dir=/root
+else
+ echo "init $init is not systemd, terminate plymouth"
+ plymouth quit
+fi
Index: plymouth-0.8.8_git201309032142/scripts/boot-plymouth.sh
===================================================================
--- /dev/null
+++ plymouth-0.8.8_git201309032142/scripts/boot-plymouth.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#%stage: boot
+#%depends: start udev kms
+#%programs: /usr/bin/plymouth /usr/sbin/plymouthd
+#%if: -z "$root_luks" -a -z "$luks"
+
+enable_plymouth=1
+for o in $(cat /proc/cmdline) ; do
+ case "$o" in
+ shell*|plymouth.enable=0*|rd.plymouth=0*)
+ enable_plymouth=0
+ break
+ ;;
+ esac
+done
+if [ "$enable_plymouth" = "1" ]; then
+ mkdir --mode 755 /run/plymouth
+
+ /usr/sbin/plymouthd --attach-to-session --pid-file /run/plymouth/pid
+
+ plymouth show-splash
+fi
+
Index: plymouth-0.8.8_git201309032142/scripts/setup-plymouth.sh.in
===================================================================
--- /dev/null
+++ plymouth-0.8.8_git201309032142/scripts/setup-plymouth.sh.in
@@ -0,0 +1,59 @@
+#!/bin/bash
+#
+#%stage: setup
+#%depends: start
+
+# We don't need to copy the binaries since boot-plymouth.sh does that for us
+
+[ -z "$tmp_mnt" ] && exit 1
+
+THEME=$(plymouth-set-default-theme)
+
+PLUGIN_PATH=$(plymouth --get-splash-plugin-path)
+
+MODULE=$(grep "ModuleName *= *" @PLYMOUTH_DATADIR@/plymouth/themes/${THEME}/${THEME}.plymouth | sed 's/ModuleName *= *//')
+
+if [ ! -f "$PLUGIN_PATH/${MODULE}.so" ]; then
+ echo "The default plymouth plugin ($MODULE) doesn't exist." > /dev/stderr
+ exit 1
+fi
+
+FILES="/usr/share/plymouth/themes/text/text.plymouth \
+ /usr/share/plymouth/themes/details/details.plymouth \
+ /usr/share/plymouth/plymouthd.defaults \
+ /usr/share/plymouth/themes/${THEME}/* \
+ /etc/plymouth/plymouthd.conf \
+ /usr/share/fonts/uni/unifont.pcf.gz /etc/os-release \
+ /etc/fonts/fonts.conf \
+ /etc/fonts/conf.d/69-unifont.conf "
+
+PLUGINS="${PLUGIN_PATH}/details.so \
+ ${PLUGIN_PATH}/text.so \
+ ${PLUGIN_PATH}/label.so \
+ ${PLUGIN_PATH}/${MODULE}.so \
+ ${PLUGIN_PATH}/renderers/drm.so \
+ ${PLUGIN_PATH}/renderers/frame-buffer.so"
+
+for file in $FILES; do
+ install -D $file $tmp_mnt/$file
+done
+
+for plugin in $PLUGINS; do
+ mkdir -p $tmp_mnt/$(dirname $plugin)
+ cp_bin $plugin $tmp_mnt/$plugin
+done
+
+_libdir=`rpm --eval '%{_lib}'`
+mkdir -p $tmp_mnt/etc/pango
+if [ "$_libdir" == "lib64" ];
+ then
+ _pangodir=`pango-querymodules-64 | grep ModulesPath | awk '{print $4}'`
+ pango-querymodules-64 > $tmp_mnt/etc/pango/pango.modules
+ pangobasicfc="${_pangodir}/pango-basic-fc.so"
+ else
+ _pangodir=`pango-querymodules | grep ModulesPath | awk '{print $4}'`
+ pango-querymodules > $tmp_mnt/etc/pango/pango.modules
+ pangobasicfc="${_pangodir}/pango-basic-fc.so"
+fi
+install -D ${pangobasicfc} $tmp_mnt/${pangobasicfc}
+mkdir -p $tmp_mnt/var/cache/fontconfig
Index: plymouth-0.8.8_git201309032142/scripts/plymouth-update-initrd
===================================================================
--- plymouth-0.8.8_git201309032142.orig/scripts/plymouth-update-initrd
+++ plymouth-0.8.8_git201309032142/scripts/plymouth-update-initrd
@@ -1,2 +1,2 @@
#!/bin/bash
-mkinitrd -f /boot/initrd-$(uname -r).img $(uname -r)
+/sbin/mkinitrd

8
use-mkinitrd.patch Normal file
View File

@ -0,0 +1,8 @@
Index: plymouth-0.9.0/scripts/plymouth-update-initrd
===================================================================
--- plymouth-0.9.0.orig/scripts/plymouth-update-initrd
+++ plymouth-0.9.0/scripts/plymouth-update-initrd
@@ -1,2 +1,2 @@
#!/bin/bash
-dracut -f
+mkinitrd -B