Ray Strode [Thu, 5 Dec 2013 20:02:35 +0000 (15:02 -0500)]
main: get rid of start_boot_splash
start_boot_splash is a convenience function that's going to
get in the way in the future. It also has the annoying
"boolean argument" problem that load_theme had.
This commit gets rid of start_boot_splash entirely.
Ray Strode [Thu, 5 Dec 2013 19:39:50 +0000 (14:39 -0500)]
main: split start_boot_splash up into two functions
Right now start_boot_splash loads the theme, then
shows it.
It's going to be useful in the future to preload the
theme, so this commit breaks the two operations out
into two functions, load_theme and show_theme,
and makes start_boot_splash just call those two
functions.
Ray Strode [Tue, 3 Dec 2013 03:07:37 +0000 (22:07 -0500)]
boot-splash: set KD_TEXT from main instead of boot_splash object
Now that debugging keybindings are gone, ply-boot-splash is really
just a wrapper around splash plugins. As such, it doesn't really
make sense to be mucking with terminal objects from it.
This commit moves that mucking to main until I can find a better
destination for it.
Ray Strode [Sun, 1 Dec 2013 01:34:24 +0000 (20:34 -0500)]
terminal: add new get_name() method
The name is passed in at construct time, but it gets canonicalized.
This commit adds api to get the final name. The api is also useful,
since it prevents callers that need the mapping from having to maintain
it separately, which will be good for a future clean up.
Ray Strode [Wed, 27 Nov 2013 05:07:54 +0000 (00:07 -0500)]
main: drop parameters for check_for_consoles function
both the default tty and whether or not displays should be added
are available in the global state object (as state->default_tty
and state->is_shown respectively), so they don't need to be parameters.
The latter one was a boolean, so having it as a parameter was confusing
at the call sites.
Ray Strode [Tue, 22 Oct 2013 23:24:14 +0000 (19:24 -0400)]
two-step: add support for tiled background image
If there's a file named background-tile.png in the theme
then it will get used as the background behind the other
content in place of the background gradient.
Ray Strode [Tue, 15 Oct 2013 13:52:46 +0000 (09:52 -0400)]
scripts: make plymouth-update-initrd somewhat more useful
plymouth-update-initrd is a script that should probably be eventually
dropped. It was originally created to unpack and initrd and graft
plymouth in. Later, it just became a thin wrapper around mkinitrd.
These days, very few (any?) distros use mkinitrd. Change it to call
dracut instead.
Relevant irc log:
<newfo> this is SO WRONG:
http://cgit.freedesktop.org/plymouth/tree/scripts/plymouth-update-initrd
<newfo> it won't work on any distro
<newfo> would you mind updating that please?
<newfo> replace the mkinitrd line in
/usr/libexec/plymouth/plymouth-update-initrd to dracut -f
/boot/initramfs-$(uname -r).img $(uname -r)
<-- newfo has quit (Client Quit)
Ray Strode [Mon, 23 Sep 2013 19:21:30 +0000 (15:21 -0400)]
main: force tty to /dev/tty if $DISPLAY is set
the X11 renderer is useful for testing themes without rebooting,
but it really only functions if the user puts --tty=/dev/tty or
similar. Furthermore, if a user neglects to do that really bad
stuff happens since plymouth will try to take over VT1.
This commit makes --tty=/dev/tty implied if $DISPLAY is set.
Steve Langasek [Fri, 28 Jun 2013 22:53:40 +0000 (15:53 -0700)]
Miscellaneous fixes for compiler warnings
Fix various warnings turned up with -Wall. After fixing these remaining
issues, plymouth now builds successfully with gcc 4.8 using
"-Werror -Wno-error=unused-result -Wno-error=sign-compare".
Steve Langasek [Fri, 28 Jun 2013 17:52:59 +0000 (10:52 -0700)]
script: include head with prototype of ply_get_timestamp()
ply_get_timestamp() returns a double, but the compiler assumes it will
return an int if ply-utils.h isn't #included. This disparity between
what gets returned and what the compiler is expecting will be returned
causes astonishing knock-on effects (the label plugin fails to display
any text). See:
Jeff Mahoney [Mon, 15 Apr 2013 04:27:16 +0000 (01:27 -0300)]
plymouth: Add line numbers to tracing output
The plymouth tracing output lists the function but there are many
cases in which the same message is issued from multiple places in the same
function, which makes debugging more difficult. This patch adds the line
number to the output to uniquely identify each site.
Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
Ray Strode [Wed, 13 Mar 2013 14:24:14 +0000 (10:24 -0400)]
systemd: add plymouth-start.service to initrd-switch-root.target
<haraldh> halfline, can you add plymouth-start.service to
plymouth-populate-initrd ??
<halfline> haraldh: sure, can you give me details on the bug its fixing?
<haraldh> except, if you put yourself out of the plymouth cgroup
<haraldh> and the "@" in argv[0][0]
<haraldh> better put plymouth-start.service in the
initrd-switch-root.target
<haraldh> easier
<halfline> well we already do the "@" in argv[0][0]
<halfline> and we already put KillMode=none SendSIGKILL=no in the
service file
<halfline> but will add the change
<haraldh> hmm, ok
Ray Strode [Tue, 12 Mar 2013 15:57:15 +0000 (11:57 -0400)]
animation,throbber: go back to frame dropping
Right now we figure out which animation frame to use
based on a static counter variable. Since it's static
instead of per-object, if there are multiple instances
it ends up counting up too fast.
We could:
1) make it per-object state
2) drop it and use the ifdef'd out alternative implementation
that potentially drops frames if the machine is sluggish
This commit chooses 2, but we may end up going to one if the
frame dropping turns out to be problematic.
Ray Strode [Tue, 11 Dec 2012 19:37:16 +0000 (14:37 -0500)]
utils: don't create pipes non-blocking
The daemonizing code depends on its pipe io being
blocking. The other user of ply_open_unidirectional_pipe
will work with blocking or non blocking io.
This commit changes ply_open_unidirectional_pipe to create
blocking pipes. This started causing failures with
commit 9ec69929 since it replaced broken code (passing
O_NONBLOCK to fcntl(fd, F_SETFD.. instead of F_SETFL)
with working code.
Will Woods [Thu, 29 Nov 2012 15:25:03 +0000 (10:25 -0500)]
populate-initrd: If PLYMOUTH_THEME_NAME is set, write it into plymouthd.conf
You can set PLYMOUTH_THEME_NAME when building initramfs to get a
different theme into initramfs, but this doesn't change the default
theme, so the resulting initramfs won't actually use the theme we
installed.
This patch makes plymouth-populate-initrd rewrite the 'Theme=XXX' line
in plymouthd.conf, so plymouth will use the theme we install.
Ray Strode [Wed, 24 Oct 2012 20:26:27 +0000 (16:26 -0400)]
x11: make window fullscreen by default
The x11 plugin currently does multi-head by default, which is
sometimes useful, but often just gets in the way.
This commit makes it use one, fullscreen head by default, and
falls back to the old behavior if the PLY_CREATE_FAKE_MULTI_HEAD_SETUP
environment variable is set.
Ray Strode [Wed, 24 Oct 2012 19:40:48 +0000 (15:40 -0400)]
space-flares: reshow label after changing message
We should call ply_label_show any time we have a message
to show, so that if the root filesystem gets mounted, we
can try to load the label plugin again.
This should prevent weird situations where the text shows up
invisible unless the user hits escape twice.
Ray Strode [Wed, 24 Oct 2012 19:40:48 +0000 (15:40 -0400)]
fade-throbber: reshow label after changing message
We should call ply_label_show any time we have a message
to show, so that if the root filesystem gets mounted, we
can try to load the label plugin again.
This should prevent weird situations where the text shows up
invisible unless the user hits escape twice.
Ray Strode [Wed, 24 Oct 2012 19:40:48 +0000 (15:40 -0400)]
throbgress: reshow label after changing message
We should call ply_label_show any time we have a message
to show, so that if the root filesystem gets mounted, we
can try to load the label plugin again.
This should prevent weird situations where the text shows up
invisible unless the user hits escape twice.
Ray Strode [Wed, 24 Oct 2012 19:40:48 +0000 (15:40 -0400)]
two-step: reshow label after changing message
We should call ply_label_show any time we have a message
to show, so that if the root filesystem gets mounted, we
can try to load the label plugin again.
This should prevent weird situations where the text shows up
invisible unless the user hits escape twice.
Ray Strode [Wed, 24 Oct 2012 17:08:41 +0000 (13:08 -0400)]
throbber: stop throbber when freed
It's possible that a throbber could get freed while animating.
In that case, stop the animation right away, so we don't keep
running the animation timeout on freed memory.
Ray Strode [Wed, 24 Oct 2012 17:08:41 +0000 (13:08 -0400)]
animaton: stop animation when freed
It's possible that an animation could get freed before it finishes.
In that case, finish the animation right away, so we don't keep running the
animation timeout on freed memory.
It's possible to get in a state where plymouthd is
started in the initrd but not displayed. In the
event this happens, we'll neglect to ever show it,
since it already has a pid file.
plymouthd is now hardened against getting called
multiple times, so we no longer need to protect it
at the systemd level.
This commit drops the
ConditionPathExists=!@plymouthruntimedir@/pid
line from the systemd service file, so we always
call plymouthd from the main fs and always call
plymouth show-splash.
main: silently succeed if plymouthd is started a second time
Make plymouthd idempotent to multiple calls. This will make
it easier to integrate with boot scripts that start plymouthd
in the initrd and from the main fs.
The first thing plymouthd should do is try to take control
over its server socket. If it can't do that, then no plymouth
client will be able to communicate with it. The socket is
also how we can detect if plymouthd is already running.
Ray Strode [Thu, 26 Jul 2012 17:05:22 +0000 (13:05 -0400)]
systemd: don't run read-write service from initrd
the initrd hits the local-fs.target as part of its normal
boot process. We used to use local-fs.target as a way of
knowing the system / is read-write. This no longer is a
valid mechanism.
This commit:
1) Stops installing plymouth-read-write service in the initrd
2) Makes it so if it does end up in the initrd it won't be
used