.
OBS-URL: https://build.opensuse.org/package/show/Base:System/plymouth?expand=0&rev=131
This commit is contained in:
parent
8e78c64e31
commit
73b3a2de5b
50
0001-Make-plymouthd-real-daemon-and-save-old-log.patch
Normal file
50
0001-Make-plymouthd-real-daemon-and-save-old-log.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From: Werner Fink <werner@suse.de>
|
||||
Subject: All daemons should call setsid(2) to become a real daemons
|
||||
|
||||
All daemons should call setsid(2) to become a real daemons without
|
||||
controlling terminal. Beside this the old boot log will help for
|
||||
debugging and for support.
|
||||
|
||||
---
|
||||
libply/ply-utils.c | 1 +
|
||||
main.c | 5 +++--
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/src/libply/ply-utils.c
|
||||
+++ b/src/libply/ply-utils.c 2014-02-12 15:05:49.895141867 +0100
|
||||
@@ -815,6 +815,7 @@ ply_create_daemon (void)
|
||||
|
||||
_exit ((int) byte);
|
||||
}
|
||||
+ setsid();
|
||||
close (receiver_fd);
|
||||
|
||||
handle = calloc (1, sizeof (int));
|
||||
--- a/src/main.c
|
||||
+++ b/src/main.c 2014-02-12 14:43:49.216569414 +0100
|
||||
@@ -639,7 +639,7 @@ get_log_file_for_mode (ply_mode_t mode)
|
||||
break;
|
||||
case PLY_MODE_SHUTDOWN:
|
||||
case PLY_MODE_UPDATES:
|
||||
- filename = _PATH_DEVNULL;
|
||||
+ filename = PLYMOUTH_LOG_DIRECTORY "/boot.log";
|
||||
break;
|
||||
default:
|
||||
ply_error ("Unhandled case in %s line %d\n", __FILE__, __LINE__);
|
||||
@@ -663,7 +663,7 @@ get_log_spool_file_for_mode (ply_mode_t
|
||||
break;
|
||||
case PLY_MODE_SHUTDOWN:
|
||||
case PLY_MODE_UPDATES:
|
||||
- filename = NULL;
|
||||
+ filename = PLYMOUTH_SPOOL_DIRECTORY "/boot.log";
|
||||
break;
|
||||
default:
|
||||
ply_error ("Unhandled case in %s line %d\n", __FILE__, __LINE__);
|
||||
@@ -715,6 +715,7 @@ prepare_logging (state_t *state)
|
||||
if (logfile != NULL)
|
||||
{
|
||||
ply_trace ("opening log '%s'", logfile);
|
||||
+ rename(logfile, PLYMOUTH_LOG_DIRECTORY "/boot.olog");
|
||||
ply_terminal_session_open_log (state->session, logfile);
|
||||
|
||||
if (state->number_of_errors > 0)
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package plymouth
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -43,6 +43,8 @@ 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-SUSE -- 0001-Make-plymouthd-real-daemon-and-save-old-log.patch werner@suse.de -- All daemons should call setsid(2) to become a real daemons
|
||||
Patch17: 0001-Make-plymouthd-real-daemon-and-save-old-log.patch
|
||||
BuildRequires: automake
|
||||
BuildRequires: kernel-headers
|
||||
BuildRequires: libtool
|
||||
@ -308,6 +310,7 @@ plugin.
|
||||
%patch9 -p0
|
||||
%patch10 -p1
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
# replace builddate with patch0date
|
||||
sed -i "s/__DATE__/\"$(stat -c %y %{_sourcedir}/%{name}.changes)\"/" src/main.c
|
||||
|
||||
@ -327,10 +330,11 @@ autoreconf -fiv
|
||||
--with-log-viewer \
|
||||
--without-rhgb-compat-link \
|
||||
--with-boot-tty=/dev/tty7 \
|
||||
--with-shutdown-tty=/dev/tty1 \
|
||||
--with-shutdown-tty=/dev/tty7 \
|
||||
--without-gdm-autostart-file \
|
||||
--with-release-file=/etc/os-release
|
||||
|
||||
make clean
|
||||
make %{?_smp_mflags} V=1
|
||||
|
||||
%install
|
||||
|
Loading…
Reference in New Issue
Block a user