Blame SOURCES/fix-details.patch

e22087
From 785a0050c01567e3e9eaaf0534e7e52045fc4a9d Mon Sep 17 00:00:00 2001
e22087
From: Ray Strode <rstrode@redhat.com>
e22087
Date: Fri, 24 Jan 2014 14:08:16 -0500
e22087
Subject: [PATCH 1/3] plymouthd: build with -rdynamic so built-in module works
e22087
e22087
The details plugin is "built in" to the plymouthd binary, so
e22087
it's always available even if the details module isn't installed
e22087
(say /usr isn't mounted yet or something)
e22087
e22087
Unfortunately, this feature isn't working because plymouthd isn't
e22087
built with -rdynamic (except for in my local CFLAGS).
e22087
e22087
This commit fixes the makefile goo accordingly.
e22087
---
e22087
 src/Makefile.am | 1 +
e22087
 1 file changed, 1 insertion(+)
e22087
e22087
diff --git a/src/Makefile.am b/src/Makefile.am
e22087
index 152cd43..fc2f5da 100644
e22087
--- a/src/Makefile.am
e22087
+++ b/src/Makefile.am
e22087
@@ -1,47 +1,48 @@
e22087
 SUBDIRS = libply libply-splash-core libply-splash-graphics . plugins client viewer
e22087
 if ENABLE_UPSTART_MONITORING
e22087
 SUBDIRS += upstart-bridge
e22087
 endif
e22087
 AM_CPPFLAGS = -I$(top_srcdir)                                                 \
e22087
            -I$(srcdir)/libply                                                 \
e22087
            -I$(srcdir)/libply-splash-core                                     \
e22087
            -I$(srcdir)                                                        \
e22087
            -DPLYMOUTH_LOG_DIRECTORY=\"$(localstatedir)/log\"                  \
e22087
            -DPLYMOUTH_SPOOL_DIRECTORY=\"$(localstatedir)/spool/plymouth\"     \
e22087
            -DPLYMOUTH_TIME_DIRECTORY=\"$(localstatedir)/lib/plymouth/\"       \
e22087
            -DPLYMOUTH_LOGO_FILE=\"$(logofile)\"
e22087
 
e22087
 plymouthdbindir = $(plymouthdaemondir)
e22087
 plymouthdbin_PROGRAMS = plymouthd
e22087
 
e22087
 plymouthd_CFLAGS = $(PLYMOUTH_CFLAGS)                                         \
e22087
+		   -rdynamic                                                  \
e22087
 		   -DPLYMOUTH_PLUGIN_PATH=\"$(PLYMOUTH_PLUGIN_PATH)\"         \
e22087
 		   -DPLYMOUTH_THEME_PATH=\"$(PLYMOUTH_THEME_PATH)/\"          \
e22087
 		   -DPLYMOUTH_POLICY_DIR=\"$(PLYMOUTH_POLICY_DIR)/\"          \
e22087
 		   -DPLYMOUTH_RUNTIME_DIR=\"$(PLYMOUTH_RUNTIME_DIR)\"         \
e22087
 		   -DPLYMOUTH_CONF_DIR=\"$(PLYMOUTH_CONF_DIR)/\"
e22087
 plymouthd_LDADD = $(PLYMOUTH_LIBS) libply/libply.la libply-splash-core/libply-splash-core.la
e22087
 plymouthd_SOURCES =                                                            \
e22087
                    ply-boot-protocol.h                                        \
e22087
                    ply-boot-server.h                                          \
e22087
                    ply-boot-server.c                                          \
e22087
                    plugins/splash/details/plugin.c                  \
e22087
                    main.c
e22087
 
e22087
 plymouthdrundir = $(localstatedir)/run/plymouth
e22087
 plymouthdspooldir = $(localstatedir)/spool/plymouth
e22087
 plymouthdtimedir = $(localstatedir)/lib/plymouth
e22087
 
e22087
 pkgconfigdir = $(libdir)/pkgconfig
e22087
 pkgconfig_DATA = ply-splash-core.pc ply-splash-graphics.pc
e22087
 
e22087
 plymouthd_defaultsdir = $(PLYMOUTH_POLICY_DIR)
e22087
 dist_plymouthd_defaults_DATA = plymouthd.defaults
e22087
 
e22087
 plymouthd_confdir = $(PLYMOUTH_CONF_DIR)
e22087
 dist_plymouthd_conf_DATA = plymouthd.conf
e22087
 
e22087
 install-data-hook:
e22087
 	-mkdir -p $(DESTDIR)$(plymouthdrundir)
e22087
 	-mkdir -p $(DESTDIR)$(plymouthdspooldir)
e22087
 	-mkdir -p $(DESTDIR)$(plymouthdtimedir)
e22087
-- 
e22087
1.8.3.1
e22087
e22087
e22087
From 382305e4a9f7b4c221968fcba7394b1cc03b454e Mon Sep 17 00:00:00 2001
e22087
From: Ray Strode <rstrode@redhat.com>
e22087
Date: Fri, 24 Jan 2014 14:29:31 -0500
e22087
Subject: [PATCH 2/3] main: disable hotplug events and splash delay if details
e22087
 forced
e22087
e22087
There's no point in waiting for a graphics device if details are
e22087
forced, and we shouldn't ever delay showing details.  If details
e22087
are requested, we shouldn't be hiding them.
e22087
---
e22087
 src/main.c | 9 +++++++++
e22087
 1 file changed, 9 insertions(+)
e22087
e22087
diff --git a/src/main.c b/src/main.c
e22087
index 2ccb8ec..43e3a0a 100644
e22087
--- a/src/main.c
e22087
+++ b/src/main.c
e22087
@@ -2279,60 +2279,69 @@ main (int    argc,
e22087
         }
e22087
     }
e22087
 
e22087
   state.progress = ply_progress_new ();
e22087
   state.splash_delay = NAN;
e22087
 
e22087
   ply_progress_load_cache (state.progress,
e22087
                            get_cache_file_for_mode (state.mode));
e22087
 
e22087
   if (pid_file != NULL)
e22087
     write_pid_file (pid_file);
e22087
 
e22087
   if (daemon_handle != NULL
e22087
       && !ply_detach_daemon (daemon_handle, 0))
e22087
     {
e22087
       ply_error ("plymouthd: could not tell parent to exit: %m");
e22087
       return EX_UNAVAILABLE;
e22087
     }
e22087
 
e22087
   find_override_splash (&state);
e22087
   find_system_default_splash (&state);
e22087
   find_distribution_default_splash (&state);
e22087
 
e22087
   if (command_line_has_argument (state.kernel_command_line, "plymouth.ignore-serial-consoles"))
e22087
     device_manager_flags |= PLY_DEVICE_MANAGER_FLAGS_IGNORE_SERIAL_CONSOLES;
e22087
 
e22087
   if (command_line_has_argument (state.kernel_command_line, "plymouth.ignore-udev") ||
e22087
       (getenv ("DISPLAY") != NULL))
e22087
     device_manager_flags |= PLY_DEVICE_MANAGER_FLAGS_IGNORE_UDEV;
e22087
 
e22087
+  if (!plymouth_should_show_default_splash (&state))
e22087
+    {
e22087
+      /* don't bother listening for udev events if we're forcing details */
e22087
+      device_manager_flags |= PLY_DEVICE_MANAGER_FLAGS_IGNORE_UDEV;
e22087
+
e22087
+      /* don't ever delay showing the detailed splash */
e22087
+      state.splash_delay = NAN;
e22087
+    }
e22087
+
e22087
   load_devices (&state, device_manager_flags);
e22087
 
e22087
   ply_trace ("entering event loop");
e22087
   exit_code = ply_event_loop_run (state.loop);
e22087
   ply_trace ("exited event loop");
e22087
 
e22087
   ply_boot_splash_free (state.boot_splash);
e22087
   state.boot_splash = NULL;
e22087
 
e22087
   ply_command_parser_free (state.command_parser);
e22087
 
e22087
   ply_boot_server_free (state.boot_server);
e22087
   state.boot_server = NULL;
e22087
 
e22087
   ply_trace ("freeing terminal session");
e22087
   ply_terminal_session_free (state.session);
e22087
 
e22087
   ply_buffer_free (state.boot_buffer);
e22087
   ply_progress_free (state.progress);
e22087
 
e22087
   ply_trace ("exiting with code %d", exit_code);
e22087
   
e22087
   if (debug_buffer != NULL)
e22087
     {
e22087
       dump_debug_buffer_to_file ();
e22087
       ply_buffer_free (debug_buffer);
e22087
     }
e22087
 
e22087
   ply_free_error_log();
e22087
 
e22087
-- 
e22087
1.8.3.1
e22087
e22087
e22087
From 9255a442e93a4fce835ca6e7e9dc9023be6eaf30 Mon Sep 17 00:00:00 2001
e22087
From: Ray Strode <rstrode@redhat.com>
e22087
Date: Fri, 24 Jan 2014 15:08:10 -0500
e22087
Subject: [PATCH 3/3] seat: proceed without renderer if type is AUTO and
e22087
 renderer fails
e22087
e22087
If a seat gets opened with a renderer type of AUTO, and the renderer
e22087
fails to open, then it's okay and expected to proceed without a
e22087
renderer (and just use the terminal). The code attempted to do this
e22087
but failed to nullify the seat->renderer object, so it ended up
e22087
going down the renderer-active code path.
e22087
e22087
This commit fixes that.
e22087
---
e22087
 src/libply-splash-core/ply-seat.c | 17 ++++++++++++-----
e22087
 1 file changed, 12 insertions(+), 5 deletions(-)
e22087
e22087
diff --git a/src/libply-splash-core/ply-seat.c b/src/libply-splash-core/ply-seat.c
e22087
index d9c7a2b..541b29e 100644
e22087
--- a/src/libply-splash-core/ply-seat.c
e22087
+++ b/src/libply-splash-core/ply-seat.c
e22087
@@ -90,69 +90,76 @@ add_pixel_displays (ply_seat_t *seat)
e22087
       next_node = ply_list_get_next_node (heads, node);
e22087
 
e22087
       display = ply_pixel_display_new (seat->renderer, head);
e22087
 
e22087
       ply_list_append_data (seat->pixel_displays, display);
e22087
 
e22087
       node = next_node;
e22087
     }
e22087
 }
e22087
 
e22087
 static void
e22087
 add_text_displays (ply_seat_t *seat)
e22087
 {
e22087
   ply_text_display_t *display;
e22087
 
e22087
   display = ply_text_display_new (seat->terminal);
e22087
   ply_list_append_data (seat->text_displays, display);
e22087
 }
e22087
 
e22087
 bool
e22087
 ply_seat_open (ply_seat_t          *seat,
e22087
                ply_renderer_type_t  renderer_type,
e22087
                const char          *device)
e22087
 {
e22087
   if (renderer_type != PLY_RENDERER_TYPE_NONE)
e22087
     {
e22087
       ply_renderer_t *renderer;
e22087
 
e22087
       renderer = ply_renderer_new (renderer_type, device, seat->terminal);
e22087
 
e22087
-      if (!ply_renderer_open (renderer) && renderer_type != PLY_RENDERER_TYPE_AUTO)
e22087
+      if (!ply_renderer_open (renderer))
e22087
         {
e22087
           ply_trace ("could not open renderer for %s", device);
e22087
           ply_renderer_free (renderer);
e22087
-          return false;
e22087
-        }
e22087
 
e22087
-      seat->renderer = renderer;
e22087
-      seat->renderer_active = true;
e22087
+          seat->renderer = NULL;
e22087
+          seat->renderer_active = false;
e22087
+
e22087
+          if (renderer_type != PLY_RENDERER_TYPE_AUTO)
e22087
+            return false;
e22087
+        }
e22087
+      else
e22087
+        {
e22087
+          seat->renderer = renderer;
e22087
+          seat->renderer_active = true;
e22087
+        }
e22087
     }
e22087
 
e22087
   if (seat->renderer != NULL)
e22087
     {
e22087
       seat->keyboard = ply_keyboard_new_for_renderer (seat->renderer);
e22087
       add_pixel_displays (seat);
e22087
 
e22087
     }
e22087
   else
e22087
     {
e22087
       seat->keyboard = ply_keyboard_new_for_terminal (seat->terminal);
e22087
     }
e22087
   add_text_displays (seat);
e22087
 
e22087
   ply_keyboard_watch_for_input (seat->keyboard);
e22087
   seat->keyboard_active = true;
e22087
 
e22087
   return true;
e22087
 }
e22087
 
e22087
 bool
e22087
 ply_seat_is_open (ply_seat_t *seat)
e22087
 {
e22087
   return ply_list_get_length (seat->pixel_displays) > 0 ||
e22087
          ply_list_get_length (seat->text_displays) > 0;
e22087
 }
e22087
 
e22087
 void
e22087
 ply_seat_deactivate_keyboard (ply_seat_t *seat)
e22087
 {
e22087
-- 
e22087
1.8.3.1
e22087