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