From 6c4aee52e28e5d00f4a9b11ba8df82e033765fcb68231c68cc91cef11b103035 Mon Sep 17 00:00:00 2001 From: Raymond Wooninck Date: Thu, 1 Aug 2013 16:02:34 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Base:System/plymouth?expand=0&rev=121 --- plymouth-close-unredirect.patch | 34 ----- plymouth-exit-code.patch | 22 ---- plymouth-redirect-null.patch | 176 -------------------------- plymouth-terminal-session-close.patch | 27 ---- plymouth.changes | 4 + plymouth.spec | 12 -- 6 files changed, 4 insertions(+), 271 deletions(-) delete mode 100644 plymouth-close-unredirect.patch delete mode 100644 plymouth-exit-code.patch delete mode 100644 plymouth-redirect-null.patch delete mode 100644 plymouth-terminal-session-close.patch diff --git a/plymouth-close-unredirect.patch b/plymouth-close-unredirect.patch deleted file mode 100644 index 8a75926..0000000 --- a/plymouth-close-unredirect.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 41560df672d0aeb954874b6d0aa81849ab35ca71 Mon Sep 17 00:00:00 2001 -From: Ray Strode -Date: Mon, 10 Jun 2013 10:44:56 -0400 -Subject: [PATCH] terminal-session: plug /dev/console fd leak - -When we stop redirecting console messages, we temporarly open -/dev/console. We don't ever close it. - -This commit fixes that. ---- - src/libply/ply-terminal-session.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/libply/ply-terminal-session.c b/src/libply/ply-terminal-session.c -index 3d43709..e7377e9 100644 ---- a/src/libply/ply-terminal-session.c -+++ b/src/libply/ply-terminal-session.c -@@ -213,8 +213,12 @@ ply_terminal_session_unredirect_console (ply_terminal_session_t *session) - assert (session->console_is_redirected); - - fd = open ("/dev/console", O_RDWR | O_NOCTTY); -- if (fd >= 0) -+ if (fd >= 0) { - ioctl (fd, TIOCCONS); -+ close (fd); -+ } else { -+ ply_trace ("couldn't open /dev/console to stop redirecting it: %m"); -+ } - - session->console_is_redirected = false; - } --- -1.8.1.4 - diff --git a/plymouth-exit-code.patch b/plymouth-exit-code.patch deleted file mode 100644 index 7980785..0000000 --- a/plymouth-exit-code.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 95a4fd9cb721f3e8355a944db85462ef15603e1f Mon Sep 17 00:00:00 2001 -From: Frederic Crozat -Date: Mon, 10 Jun 2013 18:54:47 +0200 -Subject: [PATCH] systemd: make sure to ignore all exit codes in ExecStartPost - ---- - systemd-units/plymouth-start.service.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: plymouth-0.8.8_git201304161248/systemd-units/plymouth-start.service.in -=================================================================== ---- plymouth-0.8.8_git201304161248.orig/systemd-units/plymouth-start.service.in -+++ plymouth-0.8.8_git201304161248/systemd-units/plymouth-start.service.in -@@ -8,7 +8,7 @@ ConditionKernelCommandLine=!plymouth.ena - - [Service] - ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=boot --pid-file=@plymouthruntimedir@/pid --attach-to-session --ExecStartPost=-@UDEVADM@ settle --timeout=30 --exit-if-exists=/sys/class/drm/card0/dev ; @UDEVADM@ settle --timeout=30 --exit-if-exists=/sys/class/graphics/fb0/dev ; @PLYMOUTH_CLIENT_DIR@/plymouth show-splash -+ExecStartPost=-@UDEVADM@ settle --timeout=30 --exit-if-exists=/sys/class/drm/card0/dev ; -@UDEVADM@ settle --timeout=30 --exit-if-exists=/sys/class/graphics/fb0/dev ; -@PLYMOUTH_CLIENT_DIR@/plymouth show-splash - Type=forking - KillMode=none - SendSIGKILL=no diff --git a/plymouth-redirect-null.patch b/plymouth-redirect-null.patch deleted file mode 100644 index 3b63747..0000000 --- a/plymouth-redirect-null.patch +++ /dev/null @@ -1,176 +0,0 @@ -From 0d610f91e2bfc85f2e9a4c037adc91306e4faf62 Mon Sep 17 00:00:00 2001 -From: Frederic Crozat -Date: Mon, 10 Jun 2013 18:44:08 +0200 -Subject: [PATCH] main: redirect standard io to /dev/null - -do not redirect standard io to console tty anymore, it can cause issue -with Xorg grabbing tty -(https://bugzilla.novell.com/show_bug.cgi?id=811185). - -Initial patch by Ray Strode ---- - src/main.c | 87 +++++++++++++++++++++++++++++++++++++++----------------------- - 1 file changed, 55 insertions(+), 32 deletions(-) - -diff --git a/src/main.c b/src/main.c -index e0d087c..2a9c84d 100644 ---- a/src/main.c -+++ b/src/main.c -@@ -616,7 +616,7 @@ get_cache_file_for_mode (ply_mode_t mode) - filename = NULL; - break; - default: -- fprintf (stderr, "Unhandled case in %s line %d\n", __FILE__, __LINE__); -+ ply_error ("Unhandled case in %s line %d\n", __FILE__, __LINE__); - abort (); - break; - } -@@ -640,7 +640,7 @@ get_log_file_for_mode (ply_mode_t mode) - filename = _PATH_DEVNULL; - break; - default: -- fprintf (stderr, "Unhandled case in %s line %d\n", __FILE__, __LINE__); -+ ply_error ("Unhandled case in %s line %d\n", __FILE__, __LINE__); - abort (); - break; - } -@@ -664,7 +664,7 @@ get_log_spool_file_for_mode (ply_mode_t mode) - filename = NULL; - break; - default: -- fprintf (stderr, "Unhandled case in %s line %d\n", __FILE__, __LINE__); -+ ply_error ("Unhandled case in %s line %d\n", __FILE__, __LINE__); - abort (); - break; - } -@@ -1098,6 +1098,13 @@ deactivate_splash (state_t *state) - ply_terminal_stop_watching_for_vt_changes (state->local_console_terminal); - ply_terminal_set_buffered_input (state->local_console_terminal); - ply_terminal_ignore_mode_changes (state->local_console_terminal, true); -+ ply_terminal_close (state->local_console_terminal); -+ } -+ -+ /* do not let any tty opened where we could write after deactivate */ -+ if (command_line_has_argument (state->kernel_command_line, "plymouth.debug")) -+ { -+ ply_logger_close_file (ply_logger_get_error_default ()); - } - - state->is_inactive = true; -@@ -1191,6 +1198,7 @@ on_reactivate (state_t *state) - - if (state->local_console_terminal != NULL) - { -+ ply_terminal_open (state->local_console_terminal); - ply_terminal_watch_for_vt_changes (state->local_console_terminal); - ply_terminal_set_unbuffered_input (state->local_console_terminal); - ply_terminal_ignore_mode_changes (state->local_console_terminal, false); -@@ -1890,6 +1898,33 @@ check_verbosity (state_t *state) - ply_logger_set_output_fd (ply_logger_get_error_default (), fd); - } - free (stream_copy); -+ } else { -+ const char* device; -+ char *file; -+ -+ if (state->kernel_console_tty != NULL) -+ device = state->kernel_console_tty; -+ else -+ device = state->default_tty; -+ -+ ply_trace ("redirecting debug output to %s", device); -+ -+ if (strncmp (device, "/dev/", strlen ("/dev/")) == 0) -+ file = strdup (device); -+ else -+ asprintf (&file, "/dev/%s", device); -+ -+ fd = open (file, O_RDWR | O_APPEND); -+ -+ if (fd < 0) -+ { -+ ply_trace ("could not redirected debug output to %s: %m", device); -+ } -+ else { -+ ply_logger_set_output_fd (ply_logger_get_error_default (), fd); -+ } -+ -+ free (file); - } - } - else -@@ -2157,21 +2192,11 @@ check_for_consoles (state_t *state, - } - - static bool --redirect_standard_io_to_device (const char *device) -+redirect_standard_io_to_dev_null (void) - { - int fd; -- char *file; - -- ply_trace ("redirecting stdio to %s", device); -- -- if (strncmp (device, "/dev/", strlen ("/dev/")) == 0) -- file = strdup (device); -- else -- asprintf (&file, "/dev/%s", device); -- -- fd = open (file, O_RDWR | O_APPEND); -- -- free (file); -+ fd = open ("/dev/null", O_RDWR | O_APPEND); - - if (fd < 0) - return false; -@@ -2214,19 +2239,6 @@ initialize_environment (state_t *state) - if (!get_kernel_command_line (state)) - return false; - -- 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(); -- state->pixel_displays = ply_list_new (); -- state->text_displays = ply_list_new (); -- state->messages = ply_list_new (); -- state->keyboard = NULL; -- - if (!state->default_tty) - { - if (state->mode == PLY_MODE_SHUTDOWN) -@@ -2247,12 +2259,23 @@ 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(); -+ state->pixel_displays = ply_list_new (); -+ state->text_displays = ply_list_new (); -+ state->messages = ply_list_new (); -+ state->keyboard = NULL; -+ -+ - check_for_consoles (state, state->default_tty, false); - -- if (state->kernel_console_tty != NULL) -- redirect_standard_io_to_device (state->kernel_console_tty); -- else -- redirect_standard_io_to_device (state->default_tty); -+ redirect_standard_io_to_dev_null (); - - ply_trace ("Making sure " PLYMOUTH_RUNTIME_DIR " exists"); - if (!ply_create_directory (PLYMOUTH_RUNTIME_DIR)) --- -1.8.1.4 - diff --git a/plymouth-terminal-session-close.patch b/plymouth-terminal-session-close.patch deleted file mode 100644 index 1c0a087..0000000 --- a/plymouth-terminal-session-close.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 5ed074df62fe13acd491079c2156907ba9e5b3be Mon Sep 17 00:00:00 2001 -From: Frederic Crozat -Date: Mon, 10 Jun 2013 18:29:57 +0200 -Subject: [PATCH] terminal-session: don't close session fd if already closed - -Prevents close(-1) from showing up in strace ---- - src/libply/ply-terminal-session.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/libply/ply-terminal-session.c b/src/libply/ply-terminal-session.c -index e7377e9..0bdb985 100644 ---- a/src/libply/ply-terminal-session.c -+++ b/src/libply/ply-terminal-session.c -@@ -148,7 +148,8 @@ ply_terminal_session_free (ply_terminal_session_t *session) - - ply_free_string_array (session->argv); - -- close (session->pseudoterminal_master_fd); -+ if (session->pseudoterminal_master_fd >= 0) -+ close (session->pseudoterminal_master_fd); - free (session); - } - --- -1.8.1.4 - diff --git a/plymouth.changes b/plymouth.changes index 63e3b50..cbc502a 100644 --- a/plymouth.changes +++ b/plymouth.changes @@ -4,6 +4,10 @@ Thu Aug 1 14:08:53 UTC 2013 - tittiatcoke@gmail.com - Update to version 0.8.8_git201308011340 - Drop patch plymouth-correct-systemd-prefix.patch - Drop patch plymouth-close.patch + - Drop patch plymouth-close-unredirect.patch + - Drop patch plymouth-redirect-null.patch + - Drop patch plymouth-exit-code.patch + - Drop patch plymouth-terminal-session-close.patch ------------------------------------------------------------------- Mon Jul 29 16:23:21 UTC 2013 - tittiatcoke@gmail.com diff --git a/plymouth.spec b/plymouth.spec index 56234ec..fd2a7c1 100644 --- a/plymouth.spec +++ b/plymouth.spec @@ -43,14 +43,6 @@ 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-FIX-UPSTREAM plymouth-close-deactivate.patch bnc#811185 fcrozat@suse.com -- close stdout/stderr on deactivate -Patch18: plymouth-close-unredirect.patch -# PATCH-FIX-UPSTREAM plymouth-redirect-null.patch bnc#811185 fcrozat@suse.com -- redirect standard io to /dev/null -Patch19: plymouth-redirect-null.patch -# PATCH-FIX-UPSTREAM plymouth-exit-code.patch fcrozat@suse.com -- ensure all exit code are ignored in ExecStartPost -Patch20: plymouth-exit-code.patch -# PATCH-FIX-UPSTREAM plymouth-terminal-session-close.patch fcrozat@suse.com -- do not close already closed terminal session fd -Patch21: plymouth-terminal-session-close.patch BuildRequires: automake BuildRequires: kernel-headers BuildRequires: libtool @@ -322,10 +314,6 @@ plugin. %patch9 -p0 %patch10 -p1 %patch16 -p1 -#patch18 -p1 -#patch19 -p1 -#patch20 -p1 -%patch21 -p1 # replace builddate with patch0date sed -i "s/__DATE__/\"$(stat -c %y %{_sourcedir}/%{name}.changes)\"/" src/main.c