]> git.ipfire.org Git - thirdparty/plymouth.git/log
thirdparty/plymouth.git
11 years agosystemd: don't call udevadm settle before show-splash wip/udev
Ray Strode [Tue, 10 Dec 2013 02:50:07 +0000 (21:50 -0500)] 
systemd: don't call udevadm settle before show-splash

Since we're monitoring udev explicitly now, we have no
need to block the client show-splash request until graphics
devices settle.

This commit removes the udevadm calls from plymouth-start.service.

11 years agomain: provide way to toggle udev device enumeration off
Ray Strode [Tue, 10 Dec 2013 02:07:16 +0000 (21:07 -0500)] 
main: provide way to toggle udev device enumeration off

We don't want to use udev for device enumeration if:

1) DISPLAY is set (since we're going to use the X11 renderer)
2) if it's disabled explicitly on the kernel command line

This commit adds support for those two things.

11 years agodevice-manager: add support for udev device enumeration
Ray Strode [Mon, 9 Dec 2013 18:13:38 +0000 (13:13 -0500)] 
device-manager: add support for udev device enumeration

At the moment, we hardcode /dev/dri/card0 for the DRM device.
This works well enough in the lion's share of cases, but there are cases
where it falls over.  Namely, machines with multiple GPUs, such as
optimus hardware, sometimes end up with the kernel fb console going to
/dev/dri/card1.

Rather than trying /dev/dri/card0 then /dev/dri/card1 etc in succession,
this commit, instead, adds support for querying udev for the
information.

11 years agorenderer: add way to get device_name that was passed to constructor
Ray Strode [Tue, 10 Dec 2013 02:13:13 +0000 (21:13 -0500)] 
renderer: add way to get device_name that was passed to constructor

It's useful to be able to figure out which renderer a given renderer
is, by examining the device that is associated with it.

This commit adds and accessor function to return the device that
was passed to ply_renderer_new.

At the moment, it does not return the device name if NULL was passed
to the constructor and the device was figured out automatically.  A
future commit may add that ability if it becomes necessary.

11 years agoconfigure: add libudev dependency
Ray Strode [Wed, 20 Nov 2013 02:22:58 +0000 (21:22 -0500)] 
configure: add libudev dependency

We're going to want to support multiple graphics devices, as
specified by udev.

This first commit, merely adds the libudev dependency to the
build goo.

11 years agoframe-buffer: support activating without a terminal
Ray Strode [Mon, 9 Dec 2013 19:35:31 +0000 (14:35 -0500)] 
frame-buffer: support activating without a terminal

This is the same as the previous drm commit, but for
the frame-buffer backend.

11 years agodrm: support activating without terminal
Ray Strode [Mon, 9 Dec 2013 19:28:42 +0000 (14:28 -0500)] 
drm: support activating without terminal

If there are multiple DRM devices, only one
can really be reading from the terminal at a time.

We currently punt this issue by ignoring all but
the first drm device.

In preparation for supporting more than one DRM device,
we need to come up with a solution.

This commit changes the DRM renderer plugin to allow getting
a NULL terminal.  In this way, we can assign the terminal to
one of the DRM cards, but still output to the others.

Note, we never pass NULL for a terminal yet, that comes later.

11 years agomain: use new device manager class
Ray Strode [Mon, 9 Dec 2013 02:09:15 +0000 (21:09 -0500)] 
main: use new device manager class

Now that we have a class for managing our seats, let's use it.
This gets a lot of the nitty gritty logic out of main.c and
paves the way for us to do smartcard device management going
forward.

11 years agosplash-core: add device manager class
Ray Strode [Mon, 9 Dec 2013 02:03:46 +0000 (21:03 -0500)] 
splash-core: add device manager class

There's quite a bit of logic for managing input and output in
main.c right now.  That code is already a bit too complicated,
but will get even more complicated going forward if we want
to add udev support, etc.

In an effort to keep things from getting too unwieldly, this
commit breaks out a lot of the logic into a new
ply-device-manager class.

A subsequent commit will make main.c use the new class.

11 years agomain: move show_messages into show_theme
Ray Strode [Mon, 9 Dec 2013 15:42:45 +0000 (10:42 -0500)] 
main: move show_messages into show_theme

Everywhere we call show_theme we call show_messages immediately,
afterward.

Since showing the messages on the theme is arguable part of showing
it, this commit moves show_messages into the show_theme function.

11 years agomain: refactor on_show_splash
Ray Strode [Mon, 9 Dec 2013 16:56:17 +0000 (11:56 -0500)] 
main: refactor on_show_splash

Now that showing the theme is separated out, this
commit refactors on_show_splash to move the splash
loading specific bits to its own function.

11 years agomain: refactor show_*_splash
Ray Strode [Mon, 9 Dec 2013 15:37:51 +0000 (10:37 -0500)] 
main: refactor show_*_splash

Right now show_default_splash and show_detailed_splash,
load the relevant splash and then show it.

This commit drops the "show" part and renames the functions to
load_default_splash and load_detailed_splash, respectively.

It, of course, also updates the callers to call show_theme
explicitly.

This refactorization will make it easier to later move device
management out of main.c

11 years agoboot-splash: strip out old api
Ray Strode [Tue, 3 Dec 2013 03:37:30 +0000 (22:37 -0500)] 
boot-splash: strip out old api

Now that main.c is attaching seat objects to the boot splash,
instead of the seat's individual components, we can drop the
apis that allow doing things piecewise.

11 years agomain: port over to seat objects
Ray Strode [Sat, 30 Nov 2013 03:45:19 +0000 (22:45 -0500)] 
main: port over to seat objects

We create one seat object for the main display and one seat
for each serial console.

11 years agoboot-splash: add support for seat objects
Ray Strode [Fri, 29 Nov 2013 16:28:52 +0000 (11:28 -0500)] 
boot-splash: add support for seat objects

ply_boot_splash_t currently gets notified about displays and keyboard
objects to pass along to the splash plugins.

Now that we have a ply_seat_t object that can encapsulate display
and keyboard objects, we should add support to ply_boot_splash_t for
using it.

This commit does that. For now, it does it without changing the plugin
interface (which is still in terms of displays and keyboards).

Note, this commit only adds support for seat objects to
ply_boot_splash_t. It doesn't actually change any of the calling code
to use that support. That will come in a subsequent commit.

11 years agosplash-core: add new seat object
Ray Strode [Fri, 29 Nov 2013 16:03:14 +0000 (11:03 -0500)] 
splash-core: add new seat object

Right now we maintain parallel lists of displays in several different
layers of code.

This commit introduces a "seat" object to encapsulate a set of displays,
and associated input device.

A subsequently commit will actually change the code over to use the
seat object.

11 years agomain: get rid of start_boot_splash
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.

11 years agomain: drop fall back feature of load_theme
Ray Strode [Thu, 5 Dec 2013 19:58:19 +0000 (14:58 -0500)] 
main: drop fall back feature of load_theme

load_theme currently takes a boolean that if true, will
make it load the built-in "details" plugin if the main plugin
fails to load.

Boolean arguments are hard to read, so this commit drops it.

11 years agomain: load built-in theme instead of details plugin
Ray Strode [Thu, 5 Dec 2013 19:51:13 +0000 (14:51 -0500)] 
main: load built-in theme instead of details plugin

We already have the details theme "built" in, so there's
little point in loading the details.so plugin when we want
details internally.

This commit fixes that.

11 years agomain: split start_boot_splash up into two functions
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.

11 years agomain: don't unredirect /dev/console from on_show_splash
Ray Strode [Tue, 3 Dec 2013 21:51:38 +0000 (16:51 -0500)] 
main: don't unredirect /dev/console from on_show_splash

The code that's there, doesn't make much sense, so this
commit removes it.

11 years agomain: require /sys/class/tty/console/active to have plymouth on serial consoles
Ray Strode [Thu, 5 Dec 2013 18:09:00 +0000 (13:09 -0500)] 
main: require /sys/class/tty/console/active to have plymouth on serial consoles

This commit drops the aging fallback code for when
/sys/class/tty/console/active is unavailable.

This should have no impact for people running recent kernels, and
minimal impact for people running old kernels.

11 years agotests: drop for now
Ray Strode [Tue, 3 Dec 2013 15:39:03 +0000 (10:39 -0500)] 
tests: drop for now

They're fairly bitrotten, don't tie into make check,
and aren't that useful.

Drop them for now, until we can come up with a better
story.

11 years agoboot-splash: set KD_TEXT from main instead of boot_splash object
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.

11 years agoboot-splash: drop debugging keybindings
Ray Strode [Tue, 3 Dec 2013 02:13:28 +0000 (21:13 -0500)] 
boot-splash: drop debugging keybindings

The boot splash currently lets the user hit ctrl-L to refresh,
ctrl-T to force text mode, and ctrl-V to toggle verbose messages.

These easter eggs are undocumented and really only used when I
was first writing plymouth.

These days it's just taking up space, so drop it.

11 years agomain: maintain better accounting of terminals
Ray Strode [Sun, 1 Dec 2013 01:57:52 +0000 (20:57 -0500)] 
main: maintain better accounting of terminals

Currently terminals are created in the main file and passed
down to other layers, with no direct reference maintained in
the main file.

There are points when we need to get references to all those
terminals again, and we have to fish them out from other layers.

This commit makes it all more explicit, maintaining the terminals
in a hash table in the main state object.

11 years agohashtable: add get_size method
Ray Strode [Sun, 1 Dec 2013 23:58:02 +0000 (18:58 -0500)] 
hashtable: add get_size method

Right now there's no easy way to know if a hash table is empty,
which I'm going to need in a future commit.

This commit adds a get_size method to return the number of items in
the hash table.

11 years agoterminal: add new get_name() method
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.

11 years agorenderer: use enum for selecting renderer type, not plugin path
Ray Strode [Sat, 30 Nov 2013 04:02:34 +0000 (23:02 -0500)] 
renderer: use enum for selecting renderer type, not plugin path

ply_renderer_new takes a path to a renderer plugin, or NULL to
try each one in turn.

It's cleaner to abstract the path behind an enum type, so this
commit makes that change.

Now it will be possible to instantiate specific renderers without
hardcoding the paths to plugins in more than one place.

11 years agomain: drop check_for_consoles call at startup
Ray Strode [Wed, 27 Nov 2013 05:26:45 +0000 (00:26 -0500)] 
main: drop check_for_consoles call at startup

It was only used to make kernel_console_tty get set,
which we no longer have.

11 years agomain: drop kernel_console_tty
Ray Strode [Wed, 27 Nov 2013 05:24:54 +0000 (00:24 -0500)] 
main: drop kernel_console_tty

We aren't actually really using it anymore.  It gets checked
in on place in the debugging code, but only before it's set.

This commit drops it.

11 years agomain: drop parameters for check_for_consoles function
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.

This commit drops the parameters.

11 years agodrm: simplify device open
Daniel Drake [Mon, 25 Nov 2013 17:38:37 +0000 (11:38 -0600)] 
drm: simplify device open

libdrm's open functions are just wrappers around open(), and our
detection of which parameter to pass to drmOpen() is not 100%
reliable.

Simplify the code and just call open() directly.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=71590

11 years agosystemd-units: don't timeout the plymouth waiting
Ray Strode [Thu, 31 Oct 2013 13:46:56 +0000 (09:46 -0400)] 
systemd-units: don't timeout the plymouth waiting

A timeout causes things to fail, so we shouldn't timeout.

11 years agotwo-step: fix unlock screen
Ray Strode [Fri, 8 Nov 2013 13:31:32 +0000 (08:31 -0500)] 
two-step: fix unlock screen

The previous commit introduced a bug where the unlock screen won't
get shown if it's requested within the first 5 seconds of startup.

This commit fixes that by forcing a redraw if the state switches from
NORMAL.

11 years agotwo-step: introduce delayed startup
Ray Strode [Fri, 25 Oct 2013 20:24:47 +0000 (16:24 -0400)] 
two-step: introduce delayed startup

Many machines these days can boot in 5 seconds or less.
In those cases, there's little point in showing a boot splash.

This commit introduces a StartupDelay option to the two step
plugin to prevent it from displaying anything for a few seconds.

11 years agotwo-step: add support for watermark
Ray Strode [Thu, 24 Oct 2013 13:33:17 +0000 (09:33 -0400)] 
two-step: add support for watermark

The watermark is overlaid on top of the background but below all the
other content.

11 years agotwo-step: delete extraneous log spew
Ray Strode [Thu, 24 Oct 2013 00:19:35 +0000 (20:19 -0400)] 
two-step: delete extraneous log spew

11 years agotwo-step: add support for tiled background image
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.

11 years agoply-image: add tiling support
Ray Strode [Tue, 22 Oct 2013 22:36:15 +0000 (18:36 -0400)] 
ply-image: add tiling support

This follow up commit adds tiling support to images, so
that splash screens can have been background patterns instead
of just background colors.

11 years agopixel-buffer: add tiling function
Ray Strode [Tue, 22 Oct 2013 22:34:46 +0000 (18:34 -0400)] 
pixel-buffer: add tiling function

It can be useful to tile a group of pixels across the screen
(for e.g. backgrounds).

This commit adds API to pixel buffer to do that tiling.

A follow up commit will add support into ply-image so images can
be loaded from disk and then tiled on screen.

11 years agoconfigure: add back --enable-tracing
Ray Strode [Wed, 23 Oct 2013 19:54:24 +0000 (15:54 -0400)] 
configure: add back --enable-tracing

It was accidentally removed, when dropping device specific drm support.

11 years agodocs: add docbook based man pages
Matthias Clasen [Mon, 21 Oct 2013 21:53:33 +0000 (17:53 -0400)] 
docs: add docbook based man pages

This commit adds man pages for the plymouthd and plymouth client
commands.

11 years agoscripts: make plymouth-update-initrd somewhat more useful
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)

11 years agomain: force tty to /dev/tty if $DISPLAY is set
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.

11 years agoMake contact the default text plugin
William Jon McCann [Mon, 1 Oct 2012 20:16:03 +0000 (16:16 -0400)] 
Make contact the default text plugin

And rename the old text plugin "tribar"

https://bugs.freedesktop.org/show_bug.cgi?id=55286

11 years agoAdd contact plugin
William Jon McCann [Mon, 24 Sep 2012 14:16:31 +0000 (10:16 -0400)] 
Add contact plugin

https://bugs.freedesktop.org/show_bug.cgi?id=55286

11 years agoconfigure: don't bother with rhgb-compat-link anymore
Ray Strode [Tue, 3 Sep 2013 21:42:46 +0000 (17:42 -0400)] 
configure: don't bother with rhgb-compat-link anymore

it's been N years since rhgb, let's toggle the default to no.

11 years agodrm: drop driver specific renderers
Ikey Doherty [Tue, 3 Sep 2013 21:14:48 +0000 (22:14 +0100)] 
drm: drop driver specific renderers

All the major modesetting drivers support the generic interface now, so
there's no reason to have driver specific code.

This commit drops all that extra code and hard codes the generic interface

12 years agosystemd units: halt/reboot/kexec/power systemd unit have changed names
Frederic Crozat [Mon, 29 Jul 2013 15:41:30 +0000 (17:41 +0200)] 
systemd units: halt/reboot/kexec/power systemd unit have changed names

Ensure we use the new 'systemd-' prefixed names now.

12 years agosystemd units: Replace prefdm.service with display-manager.service
Colin Walters [Thu, 18 Jul 2013 22:38:24 +0000 (18:38 -0400)] 
systemd units: Replace prefdm.service with display-manager.service

The former is dead, the latter is the new name.  See:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=b2c9cbafb8b1a2742978e1faf37fbb3cf4fb5d44
https://fedoraproject.org/wiki/Features/DisplayManagerRework

12 years agokey-file: ignore leading spaces and blank lines
Ray Strode [Wed, 17 Jul 2013 19:07:43 +0000 (15:07 -0400)] 
key-file: ignore leading spaces and blank lines

leading spaces and blank lines currently cause parse errors.
This commit fixes the parser to be more lenient.

https://bugs.freedesktop.org/show_bug.cgi?id=67006

12 years agoMiscellaneous fixes for compiler warnings
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".

12 years agoscript: include head with prototype of ply_get_timestamp()
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:

https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/1187318

and

http://lists.freedesktop.org/archives/plymouth/2013-June/000733.html

12 years agomain: redirect standard io to /dev/null
Frederic Crozat [Mon, 10 Jun 2013 16:44:08 +0000 (18:44 +0200)] 
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

12 years agosystemd: make sure to ignore all exit codes in ExecStartPost
Frederic Crozat [Mon, 10 Jun 2013 16:54:47 +0000 (18:54 +0200)] 
systemd: make sure to ignore all exit codes in ExecStartPost

12 years agoterminal-session: don't close ptmx unless it's opened
Ray Strode [Mon, 10 Jun 2013 15:11:56 +0000 (11:11 -0400)] 
terminal-session: don't close ptmx unless it's opened

This prevents a scary close(-1) in straces.

12 years agoterminal-session: plug /dev/console fd leak
Ray Strode [Mon, 10 Jun 2013 14:44:56 +0000 (10:44 -0400)] 
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.

12 years agologger: don't close already logger if already closed
Ray Strode [Thu, 6 Jun 2013 14:08:55 +0000 (10:08 -0400)] 
logger: don't close already logger if already closed

This prevents close(-1) from showing up in strace

12 years agoplymouth: Add line numbers to tracing output
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>
12 years agoLookup the location of udevadm
Cristian Rodríguez [Mon, 15 Apr 2013 00:16:49 +0000 (21:16 -0300)] 
Lookup the location of udevadm

It is not always in /bin , but /usr/...

12 years agoconfigure: Use pkgconfig to determine the systemd unit dir location
Cristian Rodríguez [Sat, 13 Apr 2013 19:16:05 +0000 (16:16 -0300)] 
configure: Use pkgconfig to determine the systemd unit dir location

Don't assume it's in /lib/systemd/system

12 years agosystemd: Look up systemd-tty-ask-password-agent location
Cristian Rodríguez [Sat, 13 Apr 2013 19:17:51 +0000 (16:17 -0300)] 
systemd: Look up systemd-tty-ask-password-agent location

Don't assume it's in /bin.

12 years agodrm: inform kernel about recently flushed areas
Dave Airlie [Tue, 26 Mar 2013 16:11:05 +0000 (12:11 -0400)] 
drm: inform kernel about recently flushed areas

Some drivers (QXL in particular) require to be notified when a part
of the mapped frame buffer memory is changed.

This commit adds a drmModeDirtyFB call after flushing changes to the
frame buffer to accomplish that.

12 years agosystemd: add Wants: systemd-vconsole-setup.service
Ray Strode [Tue, 26 Mar 2013 15:41:14 +0000 (11:41 -0400)] 
systemd: add Wants: systemd-vconsole-setup.service

Harald says we need it.

12 years agosystemd: add plymouth-start.service to initrd-switch-root.target
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

12 years agoanimation,throbber: go back to frame dropping
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.

Based on deductive work from Kevin Murphy.

12 years agomain: use correct cache file
Ray Strode [Mon, 25 Feb 2013 19:41:48 +0000 (14:41 -0500)] 
main: use correct cache file

Now that we allow switching into the initrd we shouldn't try
to load the boot cache file when shutting down.

12 years agomain: all update-root-fs for shutdown
Ray Strode [Mon, 25 Feb 2013 19:39:25 +0000 (14:39 -0500)] 
main: all update-root-fs for shutdown

Some distros now switch root back to the initrd at shutdown.

This commit allows plymouth to go along for the ride.

12 years agogenerate-initrd: Use pigz if available.
Ville Skyttä [Tue, 12 Feb 2013 22:03:53 +0000 (00:03 +0200)] 
generate-initrd: Use pigz if available.

12 years agogitignore: Ignore systemd service and path files.
Ville Skyttä [Tue, 12 Feb 2013 22:10:56 +0000 (00:10 +0200)] 
gitignore: Ignore systemd service and path files.

12 years agoutils: don't create pipes non-blocking
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.

12 years agoutils: Add strerror(errno) to error message
Colin Walters [Fri, 7 Dec 2012 14:08:21 +0000 (09:08 -0500)] 
utils: Add strerror(errno) to error message

So it's easier to debug why it fails.

12 years agomain: ensure add_consoles_from_file terminates buffer string
Ray Strode [Mon, 10 Dec 2012 16:55:32 +0000 (11:55 -0500)] 
main: ensure add_consoles_from_file terminates buffer string

This isn't a real problem in practice, since the files getting
read will be much smaller than the buffer, but it looks bad.

This commit ensures the buffer always leaves room for the terminating
NUL.

12 years agomain: fix small leak
Ray Strode [Mon, 10 Dec 2012 16:52:43 +0000 (11:52 -0500)] 
main: fix small leak

12 years agotext-progress-bar: fix os string parsing
Ray Strode [Mon, 10 Dec 2012 16:50:07 +0000 (11:50 -0500)] 
text-progress-bar: fix os string parsing

If there's no newline the the end of string variable will be NULL
instead of at the end of string.

12 years agothrobgress: add more debug spew
Will Woods [Thu, 29 Nov 2012 15:25:02 +0000 (10:25 -0500)] 
throbgress: add more debug spew

These were melded into place from two-step

12 years agopopulate-initrd: If PLYMOUTH_THEME_NAME is set, write it into plymouthd.conf
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.

12 years agokey-file: use %m instead of %a in fscanf
Ray Strode [Wed, 7 Nov 2012 19:45:03 +0000 (14:45 -0500)] 
key-file: use %m instead of %a in fscanf

It's meaning is less muzzled and this fixes a compiler warning.

12 years agoUse fseeko and ftello just for the sake of LFS correctness
Cristian Rodríguez [Tue, 6 Nov 2012 02:09:46 +0000 (23:09 -0300)] 
Use fseeko and ftello just for the sake of LFS correctness

No bug involved.

12 years agoUse O_CLOEXEC where adequate, simplify its use.
Cristian Rodríguez [Tue, 6 Nov 2012 02:07:46 +0000 (23:07 -0300)] 
Use O_CLOEXEC where adequate, simplify its use.

12 years agosystemd: add WantedBy snippets
Christoph Brill [Wed, 7 Nov 2012 19:33:02 +0000 (14:33 -0500)] 
systemd: add WantedBy snippets

This fixes systemctl enable.

https://bugs.freedesktop.org/show_bug.cgi?id=38348

12 years agomain: make plymouth show-splash idempotent
Ray Strode [Fri, 2 Nov 2012 21:26:41 +0000 (17:26 -0400)] 
main: make plymouth show-splash idempotent

plymouth show-splash causes hairy things, that should only happen once,
like activating renderers to happen.

This commit makes subsequent show-splash calls be no-ops.

12 years agotwo-step: don't update progress when idle
Ray Strode [Thu, 1 Nov 2012 21:16:07 +0000 (17:16 -0400)] 
two-step: don't update progress when idle

We've already reach a state where we aren't drawing anymore, etc,
so don't update progress and potentially fire off animations
that won't be seen.

12 years agomain: if deactivate when already deactivated return immediately
Ray Strode [Thu, 1 Nov 2012 21:04:33 +0000 (17:04 -0400)] 
main: if deactivate when already deactivated return immediately

We were trying to ignore second deactivate requests, but
were instead crashing because we're trying to use a nullified
trigger.

This commit makes sure things don't go crashy when a user
does "plymouth deactivate" on an already deactivated plymouthd.

12 years agoconfigure: bump to 0.8.8 0.8.8
Ray Strode [Fri, 26 Oct 2012 15:01:07 +0000 (11:01 -0400)] 
configure: bump to 0.8.8

12 years agox11: make window fullscreen by default
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.

12 years agox11: only create windows when necessary
Ray Strode [Wed, 24 Oct 2012 20:12:23 +0000 (16:12 -0400)] 
x11: only create windows when necessary

right now, if a user does show-splash
more than once, the X11 plugin will keep recreating
windows.

This commit changes it to only create windows when necessary.

12 years agospace-flares: reshow label after changing message
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.

http://bugs.freedesktop.org/show_bug.cgi?id=55669

12 years agofade-throbber: reshow label after changing message
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.

http://bugs.freedesktop.org/show_bug.cgi?id=55669

12 years agothrobgress: reshow label after changing message
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.

http://bugs.freedesktop.org/show_bug.cgi?id=55669

12 years agotwo-step: reshow label after changing message
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.

http://bugs.freedesktop.org/show_bug.cgi?id=55669

12 years agoboot-splash: avoid crash if plugin doesn't support system updates
Ray Strode [Wed, 24 Oct 2012 18:50:27 +0000 (14:50 -0400)] 
boot-splash: avoid crash if plugin doesn't support system updates

Right now if the user hits escape a couple of times they'll get
a crash, since the details plugin doesn't support system updates.

This commit makes ply_boot_splash_system_update a no-op in the
event the splash doesn't support that feature.

12 years agothrobber: stop throbber when freed
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.

12 years agoanimaton: stop animation when freed
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.

12 years agothrobgress: support system-update feature
Richard Hughes [Wed, 26 Sep 2012 16:37:08 +0000 (17:37 +0100)] 
throbgress: support system-update feature

This commit adds support for the system-update command
by updating the throbgress progress bar.

12 years agomain: Quiet compiler warning about free(const char *)
Colin Walters [Tue, 25 Sep 2012 19:01:54 +0000 (15:01 -0400)] 
main: Quiet compiler warning about free(const char *)

Just make a duplicate variable.

12 years agoplymouthd: set default theme to spinner
Ray Strode [Fri, 21 Sep 2012 19:54:47 +0000 (15:54 -0400)] 
plymouthd: set default theme to spinner

It's a nicer default than fade-in.

12 years agotext: drop unused defines
Ray Strode [Tue, 18 Sep 2012 18:34:27 +0000 (14:34 -0400)] 
text: drop unused defines

12 years agoservice: start plymouthd unconditionally
Cosimo Cecchi [Mon, 10 Sep 2012 20:32:45 +0000 (16:32 -0400)] 
service: start plymouthd unconditionally

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.