Accepting request 235227 from home:namtrac:bugfix

- Add fix-serial-consoles.patch to fix binary garbage on serial
  consoles. This is bnc#873859

OBS-URL: https://build.opensuse.org/request/show/235227
OBS-URL: https://build.opensuse.org/package/show/Base:System/plymouth?expand=0&rev=143
This commit is contained in:
Ismail Dönmez 2014-05-26 08:07:03 +00:00 committed by Git OBS Bridge
parent 551d1cf07f
commit 1e32b6dd24
3 changed files with 92 additions and 0 deletions

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

@ -0,0 +1,84 @@
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,12 @@ ply_device_manager_has_open_seats (ply_d
return false;
}
+bool
+ply_device_manager_has_serial_consoles (ply_device_manager_t *manager)
+{
+ return manager->has_serial_consoles;
+}
+
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 +1,9 @@
-------------------------------------------------------------------
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

View File

@ -41,6 +41,7 @@ Patch10: 0001-Some-greenish-openSUSE-colors.patch
Patch16: plymouth-correct-runtime-dir.patch
# PATCH-FIX-UPSTREAM plymouth-manpages.patch idoenmez@suse.de -- Fix man page installation
Patch17: plymouth-manpages.patch
Patch18: fix-serial-consoles.patch
BuildRequires: automake
BuildRequires: docbook-xsl-stylesheets
BuildRequires: kernel-headers
@ -326,6 +327,7 @@ plugin.
%patch10 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
# replace builddate with patch0date
sed -i "s/__DATE__/\"$(stat -c %y %{_sourcedir}/%{name}.changes)\"/" src/main.c