[plymouth/f14/master] More serial console fixing

Ray Strode rstrode at fedoraproject.org
Fri Oct 15 15:09:12 UTC 2010


commit 4585404daf24530b8d4fb5d28c15457359131437
Author: Ray Strode <rstrode at redhat.com>
Date:   Fri Oct 15 11:06:39 2010 -0400

    More serial console fixing
    
    This update adds another fix from upstream that's necessary
    for serial consoles to work properly and also adds some debug
    information.

 add-debug.patch                |   27 ++++++++++++++++
 fix-serial-console-crash.patch |   68 ++++++++++++++++++++++++++++++++++++++++
 plymouth.spec                  |    9 +++++-
 3 files changed, 103 insertions(+), 1 deletions(-)
---
diff --git a/add-debug.patch b/add-debug.patch
new file mode 100644
index 0000000..f8f2de3
--- /dev/null
+++ b/add-debug.patch
@@ -0,0 +1,27 @@
+From 784fbcfb096d756a63cd42a1efad1413c1ed8903 Mon Sep 17 00:00:00 2001
+From: Ray Strode <rstrode at redhat.com>
+Date: Thu, 16 Sep 2010 21:31:24 -0400
+Subject: [PATCH] main: add __DATE__ to debug prolog
+
+When looking at debug logs, it's often useful to know
+how old the build of plymouth featured in the log is.
+---
+ src/main.c |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/src/main.c b/src/main.c
+index 8152fc7..4b069c7 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -1879,6 +1879,8 @@ initialize_environment (state_t *state)
+   check_verbosity (state);
+   check_logging (state);
+ 
++  ply_trace ("source built on %s", __DATE__);
++
+   state->keystroke_triggers = ply_list_new ();
+   state->entry_triggers = ply_list_new ();
+   state->entry_buffer = ply_buffer_new();
+-- 
+1.7.3.1
+
diff --git a/fix-serial-console-crash.patch b/fix-serial-console-crash.patch
index 58c3fa3..792a8ef 100644
--- a/fix-serial-console-crash.patch
+++ b/fix-serial-console-crash.patch
@@ -1,3 +1,71 @@
+From b7c7bdbf7639ebfd16875cba63f2a63404193ec4 Mon Sep 17 00:00:00 2001
+From: Ray Strode <rstrode at redhat.com>
+Date: Fri, 10 Sep 2010 15:43:28 -0400
+Subject: [PATCH] main: Fix up check_for_consoles
+
+commit c40fd792b6edf931a6bbe2ec23518b57483a4e2f was just wrong.
+
+Attempt to fix it up to be less awful.
+---
+ src/main.c |   26 ++++++++++++++------------
+ 1 files changed, 14 insertions(+), 12 deletions(-)
+
+diff --git a/src/main.c b/src/main.c
+index 27ec95c..b06dbdc 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -1755,8 +1755,9 @@ check_for_consoles (state_t    *state,
+                     const char *default_tty,
+                     bool        should_add_displays)
+ {
+-  const char *console;
++  const char *console_string;
+   const char *remaining_command_line;
++  char *console;
+   ply_hashtable_t *consoles;
+ 
+   ply_trace ("checking for consoles%s",
+@@ -1766,25 +1767,26 @@ check_for_consoles (state_t    *state,
+ 
+   consoles = ply_hashtable_new (ply_hashtable_string_hash,
+                                 ply_hashtable_string_compare);
+-  while ((console = command_line_get_string_after_prefix (remaining_command_line,
+-                                                          "console=")) != NULL)
++  while ((console_string = command_line_get_string_after_prefix (remaining_command_line,
++                                                                 "console=")) != NULL)
+     {
+       char *end;
+ 
+-      state->should_force_details = true;
++      remaining_command_line = console_string;
+ 
+-      ply_trace ("serial console %s found!", console);
+-      ply_hashtable_insert (consoles, strdup (console), NULL);
++      state->should_force_details = true;
+ 
+-      remaining_command_line = console;
++      console = strdup (console_string);
+ 
+-      end = strpbrk (state->kernel_console_tty, " \n\t\v,");
++      end = strpbrk (console, " \n\t\v,");
+ 
+       if (end != NULL)
+-        {
+-          *end = '\0';
+-          console += end - state->kernel_console_tty;
+-        }
++        *end = '\0';
++
++      ply_trace ("serial console %s found!", console);
++      ply_hashtable_insert (consoles, console, NULL);
++
++      remaining_command_line += strlen (console);
+     }
+ 
+   free (state->kernel_console_tty);
+-- 
+1.7.3.1
+
 From 18541c1d58612f1535972c54940bbb460c5cab06 Mon Sep 17 00:00:00 2001
 From: Ray Strode <rstrode at redhat.com>
 Date: Thu, 7 Oct 2010 12:47:47 -0400
diff --git a/plymouth.spec b/plymouth.spec
index b4edf42..6c6fe2a 100644
--- a/plymouth.spec
+++ b/plymouth.spec
@@ -7,7 +7,7 @@
 Summary: Graphical Boot Animation and Logger
 Name: plymouth
 Version: 0.8.4
-Release: 0.20100823.5%{?dist}
+Release: 0.20100823.6%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 Source0: http://freedesktop.org/software/plymouth/releases/%{name}-%{version}.tar.bz2
@@ -34,6 +34,7 @@ Obsoletes: plymouth-plugin-pulser < 0.7.0-0.2009.05.08.2
 Obsoletes: plymouth-theme-pulser < 0.7.0-0.2009.05.08.2
 
 Patch0: fix-serial-console-crash.patch
+Patch1: add-debug.patch
 
 %description
 Plymouth provides an attractive graphical boot animation in
@@ -248,6 +249,7 @@ plugin.
 %prep
 %setup -q
 %patch0 -p1 -b .fix-serial-crash
+%patch1 -p1 -b .add-debug
 
 # Change the default theme
 sed -i -e 's/fade-in/charge/g' src/plymouthd.defaults
@@ -494,6 +496,11 @@ fi
 %defattr(-, root, root)
 
 %changelog
+* Fri Oct 15 2010 Ray Strode <rstrode at redhat.com> 0.8.4-0.20100823.6
+- More serial console fixes
+  Related: #642699
+- improve debug output
+
 * Wed Oct 13 2010 Ray Strode <rstrode at redhat.com> 0.8.4-0.20100823.5
 - Fix serial console crash.
   Related: #642699


More information about the scm-commits mailing list