]> git.ipfire.org Git - thirdparty/plymouth.git/log
thirdparty/plymouth.git
12 years agoRevert "drm: inform kernel about recently flushed areas" wip/better-flush-notification
Ray Strode [Tue, 26 Mar 2013 22:22:09 +0000 (18:22 -0400)] 
Revert "drm: inform kernel about recently flushed areas"

This reverts commit 32ae2addfb1955e0584f16299c745e23efd3a299.

It's superceded by the previous commit.

12 years agodrm: be more granular when informing kernel about flushed areas
Ray Strode [Tue, 26 Mar 2013 22:20:37 +0000 (18:20 -0400)] 
drm: be more granular when informing kernel about flushed areas

Right now we inform the kernel about flushed areas (for the QXL)
driver a whole buffer at a time, even if we only update a small
part of the buffer.

This commit makes our flush notification much more specific, telling
the kernel exactly what part of the buffer we updated.

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.

12 years agomain: silently succeed if plymouthd is started a second time
Cosimo Cecchi [Mon, 10 Sep 2012 20:33:53 +0000 (16:33 -0400)] 
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.

12 years agomain: Try to own socket before anything else
Cosimo Cecchi [Mon, 10 Sep 2012 20:44:46 +0000 (16:44 -0400)] 
main: Try to own socket before anything else

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.

12 years agomain: fix debug message
Cosimo Cecchi [Mon, 10 Sep 2012 20:43:09 +0000 (16:43 -0400)] 
main: fix debug message

If plymouthd is already running, then a second invocation will
fail with the message:

could not log bootup

This message is misleading, so fix it.

12 years agoconfigure: bump to 0.8.7 0.8.7
Ray Strode [Mon, 20 Aug 2012 23:25:52 +0000 (19:25 -0400)] 
configure: bump to 0.8.7

12 years agosystemd: start after udev triggers
Ray Strode [Mon, 20 Aug 2012 18:35:34 +0000 (14:35 -0400)] 
systemd: start after udev triggers

This fixes the race where udevadm settle finishes too early.

13 years agorevert spurious broken changes in master commit 468c53a
Alban Browaeys [Mon, 13 Aug 2012 07:52:17 +0000 (09:52 +0200)] 
revert spurious broken changes in master commit 468c53a

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

13 years agoscript: Add alignment argument to Image.Text
Anisse Astier [Tue, 7 Aug 2012 08:22:09 +0000 (10:22 +0200)] 
script: Add alignment argument to Image.Text

Enables scripts to choose the text alignment they want with a seventh
argument to Image.Text API:

    new_image = Image.Text("Hello\n"
                           "Plymouth aligned world",
                            1, 1, 1, 1,
                           "DejaVu Bold,Italic 18",
                           "center");

This argument can be ignored, the default being left aligned.
Possible values are "left", "center", or "right".

http://lists.freedesktop.org/archives/plymouth/2012-August/000676.html

13 years agoply-text-progress-bar: strip quotes if present
Jan Engelhardt [Sun, 29 Jul 2012 18:25:21 +0000 (20:25 +0200)] 
ply-text-progress-bar: strip quotes if present

The syntax for sysconfig-style files allows for quotes.

13 years agobuild: fix typo in configure.ac
Jan Engelhardt [Sun, 29 Jul 2012 17:34:15 +0000 (19:34 +0200)] 
build: fix typo in configure.ac

s/reelase/release/

13 years agoply-terminal: remove pointless casts
Jan Engelhardt [Sun, 29 Jul 2012 17:11:21 +0000 (19:11 +0200)] 
ply-terminal: remove pointless casts

The target variables are already of the desired type.

13 years agosystemd: don't run read-write service from initrd
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

Related to fedora bug 830482

13 years agothrobgress: s/TRUE/true/
Ray Strode [Tue, 24 Jul 2012 02:49:24 +0000 (22:49 -0400)] 
throbgress: s/TRUE/true/

I introduced a compilation error in Ian's patch when changing it
slightly.

13 years agothrogress: pull trigger right away if already idle
Ian Pilcher [Mon, 23 Jul 2012 21:54:19 +0000 (17:54 -0400)] 
throgress: pull trigger right away if already idle

commit eed536ba544dee38aee3c697efd2e3980362954a introduced
a fix for hangs in the two-step plugin. This is a comparable
commit for throbgress.

https://bugzilla.redhat.com/show_bug.cgi?id=704658

13 years agoconfigure: bump to 0.8.6.2
Ray Strode [Mon, 23 Jul 2012 17:33:18 +0000 (13:33 -0400)] 
configure: bump to 0.8.6.2

13 years agopopulate-initrd: copy service files to initrd
Ray Strode [Mon, 23 Jul 2012 17:22:46 +0000 (13:22 -0400)] 
populate-initrd: copy service files to initrd

Since we're in charge of the systemd service files now,
we should probably be in charge of copying them to the initrd.

13 years agosystemd: add plymouth-switch-root.service
Ray Strode [Mon, 23 Jul 2012 17:08:45 +0000 (13:08 -0400)] 
systemd: add plymouth-switch-root.service

This service file is needed by systemdized dracut to ensure we properly
transition from the initrd to the root file system

13 years agosystemd: more updates to start service
Ray Strode [Mon, 23 Jul 2012 21:36:03 +0000 (17:36 -0400)] 
systemd: more updates to start service

The dashes next to the semi-colons seem to confuse systemd so drop them.

13 years agosystemd: create missing links various targets
Frederic Crozat [Fri, 20 Jul 2012 13:28:31 +0000 (15:28 +0200)] 
systemd: create missing links various targets

13 years agosystemd: make sure plymouth-start never gets killed
Ray Strode [Tue, 17 Jul 2012 21:12:03 +0000 (17:12 -0400)] 
systemd: make sure plymouth-start never gets killed

systemd tries to bring down the world when going from
the initramfs to /

commit 9e5a276f322cfce46b5b2ed2125cb9ec67df7e9f tried
to prevent plymouthd from getting killed by settings
argv[0][0] to @

This isn't seemingly sufficient.  Throw some lines into
the plymouth-start service file that should hopefully help.

13 years agopopulate-initrd: put plymouthd in /sbin not /bin
Ray Strode [Tue, 17 Jul 2012 21:09:18 +0000 (17:09 -0400)] 
populate-initrd: put plymouthd in /sbin not /bin

This matches what we do post-boot better

13 years agoconfigure: bump to 0.8.6.1 0.8.6.1
Ray Strode [Tue, 10 Jul 2012 14:18:13 +0000 (10:18 -0400)] 
configure: bump to 0.8.6.1

13 years agosystemd: unfoul up Makefile
Ray Strode [Tue, 10 Jul 2012 14:16:29 +0000 (10:16 -0400)] 
systemd: unfoul up Makefile

The previous systemd commit introduced a file named

systemd-ask-password-plymouth.path.in

The makefile was only looking for .service.in files
when stripping the .in suffix, so it got installed
incorrectly.

This commit fixes up the Makefile.

13 years agoconfigure: bump to 0.8.6
Ray Strode [Tue, 10 Jul 2012 14:16:13 +0000 (10:16 -0400)] 
configure: bump to 0.8.6

13 years agosystemd: add two more files 0.8.6
Ray Strode [Mon, 9 Jul 2012 15:59:59 +0000 (11:59 -0400)] 
systemd: add two more files

When plymouth service files were moved from systemd to plymouth
two files got lost in the shuffle.

This commit adds them.

http://bugzilla.freedesktop.org/51573

13 years agoframe-buffer: fix flush_area fast-path
David Herrmann [Sun, 24 Jun 2012 10:06:07 +0000 (12:06 +0200)] 
frame-buffer: fix flush_area fast-path

plymouth uses a shadow framebuffer to cache screen contents for
quick compositing.  This shadow framebuffer may or may not have
the same memory layout as the hardware framebuffer.  In cases
where the size and layout of pixels are the same between the shadow
framebuffer and the hardware framebuffer we can memcpy()
the pixels line-by-line to the hardware.  If the width of area being
flushed is the same number of bytes as the width of the hardware buffer,
then we can memcpy() the entire flush area in one call to memcpy.

The check for this latter fast-path has a miscalculation that tests
the number of pixels in the flush area width to number of bytes in the
buffer width. This commit adds the * 4 multiplier to correctly compare
bytes with bytes instead of pixels with bytes.

This commit also adds a sanity check to make sure the byte size of the
hardware framebuffer width is equal to the advertised row stride.

13 years agosystemd: more udev clean ups
Ray Strode [Wed, 20 Jun 2012 15:57:06 +0000 (11:57 -0400)] 
systemd: more udev clean ups

The udev trigger calls that are there, are actually
spurious.  udev will coldplug those subsystems at
start up anyway, so doing it explicitly is wrong.

This commit drops those trigger calls.

What does matter is the udevadm settle call. It's
what makes things block until the graphics driver
is loaded.

udevadm settle is a big sledgehammer, though. It blocks
until all the triggered events (even stuff unrelated to
graphics) are finished.

This commit adds a --exit-if-exists argument to udevadm settle,
so it will bail early as soon as the graphics devices
are up.

13 years agosystemd: drop weird udev trigger --attr-match=class=0x030000
Ray Strode [Wed, 20 Jun 2012 15:19:05 +0000 (11:19 -0400)] 
systemd: drop weird udev trigger --attr-match=class=0x030000

plymouth-start.service does this sort of hacky
"udevadm trigger" stuff before doing plymouth show-splash,
to ensure plymouth show-splash is called after the
graphcis subsystem is up.

It actually does two calls:

- one call that triggers any pci devices with the class
0x030000 (which is "vga compatible display device")
- another call that triggers the gpu subsystem

The first call is borrowed from dracut:

http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=commitdiff;h=2c02c8318

and I can't find any historical context on why its needed.  As I
understand things, the latter should be a superset of the former.
Furthermore, the first trigger is missing a --subsystem-match=pci call
so it's matching the "class" attribute in every subsystem, which is slow.

I'm going to drop the first trigger until I start hitting problems
and need to add it back.

13 years agoRevert "systemd: add --subsystem=pci to udevadm trigger call"
Ray Strode [Wed, 20 Jun 2012 15:01:07 +0000 (11:01 -0400)] 
Revert "systemd: add --subsystem=pci to udevadm trigger call"

This reverts commit cf90d3c7faa1499c2ce239cde68873302b411d74.

It was wrong. I misunderstood what Kay told me.

13 years agosystemd: add --subsystem=pci to udevadm trigger call
Ray Strode [Wed, 20 Jun 2012 14:41:59 +0000 (10:41 -0400)] 
systemd: add --subsystem=pci to udevadm trigger call

plymouth-start.service does this sort of hacky
"udevadm trigger" call before doing plymouth show-splash,
to ensure plymouth show-splash is called after the
graphcis subsystem is up.  Because this udev trigger call
only passes --subsystem-match calls with no corresponding
--subsystem call, it will trawl through all subsystems in
/sys rather than just the pci subsystem (where all the matches
are guaranteed to be).

This commit adds --subsystem=pci to stop doing that extra work.

All of this will eventually be replaced with plymouthd either
listening for the udev  events itself (or potentially logind,
if logind gains a way to tag a "graphics" capability on a seat).

13 years agotext-progress-bar: Initial os-string to "" when can't be read
Ray Strode [Wed, 13 Jun 2012 10:56:56 +0000 (06:56 -0400)] 
text-progress-bar: Initial os-string to "" when can't be read

get_os_string either returns a string describing the distribution,
or NULL on error.

This NULL later causes problems since we run strlen on it.

This commit makes get_os_string return "" instead of NULL for error
cases.

Spotted by Andreas Henriksson.

13 years agotwo-step: implement the system-update command
Richard Hughes [Fri, 8 Jun 2012 10:32:52 +0000 (11:32 +0100)] 
two-step: implement the system-update command

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

13 years agomain: add a system-update command that can pass update progress to the daemon
Richard Hughes [Fri, 8 Jun 2012 08:09:52 +0000 (09:09 +0100)] 
main: add a system-update command that can pass update progress to the daemon

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

13 years agomain: add a change-mode command to be able to switch the splash mode at runtime
Richard Hughes [Thu, 7 Jun 2012 16:01:53 +0000 (17:01 +0100)] 
main: add a change-mode command to be able to switch the splash mode at runtime

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

13 years agomain: add an 'updates' mode for installing offline updates
Richard Hughes [Thu, 7 Jun 2012 18:55:19 +0000 (19:55 +0100)] 
main: add an 'updates' mode for installing offline updates

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

13 years agolibply: remove the unused SPLASH_MODE_SUSPEND and SPLASH_MODE_RESUME
Richard Hughes [Thu, 7 Jun 2012 18:49:59 +0000 (19:49 +0100)] 
libply: remove the unused SPLASH_MODE_SUSPEND and SPLASH_MODE_RESUME

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

13 years agomain: show the correct trace message if a message is supressed
Richard Hughes [Thu, 7 Jun 2012 15:20:13 +0000 (16:20 +0100)] 
main: show the correct trace message if a message is supressed

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

13 years agothrobgress plugin: show messages in the top left corner
Richard Hughes [Thu, 7 Jun 2012 15:18:19 +0000 (16:18 +0100)] 
throbgress plugin: show messages in the top left corner

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

13 years agospace-flares plugin: show messages in the top left corner
Richard Hughes [Thu, 7 Jun 2012 15:17:36 +0000 (16:17 +0100)] 
space-flares plugin: show messages in the top left corner

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

13 years agofade-throbber plugin: show messages in the top left corner
Richard Hughes [Thu, 7 Jun 2012 15:16:52 +0000 (16:16 +0100)] 
fade-throbber plugin: show messages in the top left corner

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

13 years agoconfigure: make gtk optional
Ray Strode [Fri, 8 Jun 2012 21:21:23 +0000 (17:21 -0400)] 
configure: make gtk optional

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

13 years agoscript: seed random number generator
Ray Strode [Fri, 8 Jun 2012 20:52:29 +0000 (16:52 -0400)] 
script: seed random number generator

Most splash plugins that use random numbers
seed the random number generator with the
current time, but script fails, too.

This commit fixes that.

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

13 years agosplash: drop SIGINT handlers
Ray Strode [Fri, 8 Jun 2012 19:11:52 +0000 (15:11 -0400)] 
splash: drop SIGINT handlers

They serve no real purpose.

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

13 years agoconfigure: bump to 0.8.5.1 0.8.5.1
Ray Strode [Wed, 6 Jun 2012 20:14:07 +0000 (16:14 -0400)] 
configure: bump to 0.8.5.1

13 years agoconfigure: allow building drm renderer without driver dependent backends
Ray Strode [Wed, 6 Jun 2012 20:11:47 +0000 (16:11 -0400)] 
configure: allow building drm renderer without driver dependent backends

Since we support the dumb ioctl now, it's useful to build the drm
renderer without support for the individual drivers.

This commit allows for that.

13 years agoconfigure: don't build intel/radeon/nouveau/libkms drivers by default 0.8.5
Ray Strode [Wed, 6 Jun 2012 19:14:37 +0000 (15:14 -0400)] 
configure: don't build intel/radeon/nouveau/libkms drivers by default

Now that we have the dumb ioctl there's little reason to build
these guys, since it's just as good.

I'll probably drop the code entirely soon.

13 years agopopulate-initrd: don't depend on inst from mkinitrd/dracut
Ray Strode [Wed, 6 Jun 2012 19:10:35 +0000 (15:10 -0400)] 
populate-initrd: don't depend on inst from mkinitrd/dracut

Having the dependency is awkward and causes problems, so
don't bother.

This commit just copy and pastes the relevant bits for
inst().

Ideally, this would be an installroot command implemented in
C in util-linux, but shrug

13 years agotwo-step: set is_idle=TRUE at shutdown time wip/systemd-fixes
Ray Strode [Wed, 6 Jun 2012 17:35:18 +0000 (13:35 -0400)] 
two-step: set is_idle=TRUE at shutdown time

Right now, we do the end animation immediately if in
shutdown mode.  This is because shutdown is fast,
and we don't try to estimate how long it will take.

The code depends on is_idle being true after the end
animation is run, but we neglect to do that in the
shutdown case.

This commit makes shutdown mode just call
"become_idle" right away, and deletes the duplicated
shutdown code path.

13 years agodrm: flush pending draw to kernel buffer on vt switch
Ray Strode [Wed, 6 Jun 2012 15:55:35 +0000 (11:55 -0400)] 
drm: flush pending draw to kernel buffer on vt switch

When plymouth's VT is not the foreground VT, we tell the
kernel not to scan out from the kernel buffer we manage.
Also, we don't bother dispatching rendering to the kernel
buffer (since it's not getting scanned out anyway).

When plymouth's VT becomes the foreground VT, we tell the
kernel to start scanning out from our buffer again.
Unfortunately, we neglect to flush all the pending drawing
that happens while VT switched away.

This means we briefly show stale contents.

This commit flushes all pending rendering to the kernel,
before resetting the scan out buffer, so we get a current
view of the splash shown immediately.

13 years agodrm: don't set mode initially if on different vt
Ray Strode [Wed, 6 Jun 2012 15:51:47 +0000 (11:51 -0400)] 
drm: don't set mode initially if on different vt

In the shutdown path we start out on a different
vt than where the splash is drawn.  Make sure we
don't set a mode until the jump.

This prevents unnecessary flicker.

13 years agoRevert "main: force frame-buffer plugin at shutdown"
Ray Strode [Tue, 5 Jun 2012 17:03:06 +0000 (13:03 -0400)] 
Revert "main: force frame-buffer plugin at shutdown"

This reverts commit 3f14f2700e031e6fbb674ebb1ab86a73b4469dc8.

Forcing frame-buffer plugin makes multi-monitor look really bad.
Instead, depend on the init system to make sure we stay alive
until the end.

13 years agosystemd: pull units from systemd tree
Ray Strode [Sat, 2 Jun 2012 15:15:56 +0000 (11:15 -0400)] 
systemd: pull units from systemd tree

Kay and Lenny want the service files shipped with plymouth
instead of systemd, so toss them into the tree.

13 years agomain: rename process to be more systemd friendly
Ray Strode [Sat, 2 Jun 2012 15:13:19 +0000 (11:13 -0400)] 
main: rename process to be more systemd friendly

Systemd will cleanse the system of running processes
in the hand over from the initrd to the main root filesystem,
and at shutdown.

In both cases we want to keep on chugging, so we tag ourselves
in a way that systemd won't kill us.

See http://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons

13 years agodrm: for minimum buffer size to be greater than 0
Kevin Murphy [Tue, 8 May 2012 09:02:08 +0000 (05:02 -0400)] 
drm: for minimum buffer size to be greater than 0

The drm driver tells us the minimum dimensions it supports
for buffer objects.  We use this minimum for creating a
small temporary 32-bit buffer to test if 32-bit buffers
are supported.

Unfortunately, some drivers neglect to fill in
min_width/min_height and then we try to allocate a buffer
with 0 sized dimensions.

This commit checks for min_width/min_height being 0, and then
bumps them to 1.

Minor changes to initial patch by Ray Strode.

13 years agoclient: add new flush api
Steve Langasek [Fri, 11 May 2012 07:38:17 +0000 (00:38 -0700)] 
client: add new flush api

In some cases, clients may need a way to ensure that all queued
messages have been flushed and are sent to the daemon
(before, for instance, exiting).

This commit adds an API to block until the outgoing request queue is
empty.

13 years agodocs: Add keyboard shortcuts
Dr. Tilmann Bubeck [Wed, 9 May 2012 11:35:37 +0000 (13:35 +0200)] 
docs: Add keyboard shortcuts

This commit adds four keyboard shortcuts to the developer
documentation that were found from reading the source:

Esc: Toggle between system console and plymouth boot animation.

Ctrl-V: Toogle verbose mode on and off.

Ctrl-U or Ctrl-W: erase a line

13 years agodocs: do a pass over new development.txt
Ray Strode [Tue, 8 May 2012 03:54:28 +0000 (23:54 -0400)] 
docs: do a pass over new development.txt

I just did a quick read through and made various changes here and
there.

13 years agodocs: specify where to send contributions
Ray Strode [Tue, 8 May 2012 02:33:15 +0000 (22:33 -0400)] 
docs: specify where to send contributions

13 years agodocs: Start document for developers
Dr. Tilmann Bubeck [Tue, 8 May 2012 02:16:14 +0000 (22:16 -0400)] 
docs: Start document for developers

This commit starts to document plymouth to help
new contributors get into the code.

The aim of the document is to provide useful information,
such as the overall architecture, the most
important data structures, and howto recipes for
typical user cases, like debugging.

The document is explicitly not meant to be detailed API documentation.
In the future, that type of documentation may be provided with gtk-doc
style annotations.

The documentation is written in asciidoc
(http://www.methods.co.nz/asciidoc/) and is therefore easily readable as
its ascii text and can also be translated into more rich formats
(like HTML).

For example, to get an HTML version of the document:

yum install asciidoc (or equivalent for your distribution)
cd docs
make development.html

13 years agotwo-step: quit properly when boot finishes while waiting for password
Dr. Tilmann Bubeck [Wed, 2 May 2012 16:18:13 +0000 (18:18 +0200)] 
two-step: quit properly when boot finishes while waiting for password

When the computer is progressing through its boot up process, plymouth
calls into the splash plugin's on_boot_progress function at regular
intervals with increasing values for "percent_done".  At some point, it
gets to 90% done, and that's when two-step begins its finishing
animation sequence.  As soon as this sequence finishes, two-step pulls
its stop trigger, which

1) sets its "is_idle" flag to true and
2) pulls the core plymouthd code's idle trigger, to notify that
   code that it's at a good animation frame to quit (if the core
   plymouthd code has an idle trigger set up)

During the boot process, the user may need to enter a password
(the "plymouth ask-for-password" command).  When that happens,
the splash waits for the user to enter a password, but boot progresses
in the background.

If the user then enters a password, the boot animation restarts again
(from the display_normal function).  This restarting of the boot
animation will cause the "is_idle" flag of the splash to get set back
to false.

Later when plymouthd wants to quit, it calls the become_idle function
of the splash plugin. That function notices "is_idle" is false, and
the stop_trigger is not NULL.  The function isn't suited to work
with this combination, and so at this point the splash never
tells the code daemon code it's idle.

This commit changes on_boot_progress to return before looking at
percent_done, if the user is getting asked a question.  This way
the stop_trigger won't get created prematurely, and is_idle won't
get out of sync.

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

13 years agodrm: rename ENABLE_GDM_TRANSITION to ENABLE_GDM_DEPRECATED_TRANSITION
Ray Strode [Thu, 3 May 2012 20:52:52 +0000 (16:52 -0400)] 
drm: rename ENABLE_GDM_TRANSITION to ENABLE_GDM_DEPRECATED_TRANSITION

Most distributions no longer use this transition, which relies
on plymouth quitting before X starts.

For clarity, rename the #define to include the word DEPRECATED

13 years agodrm: add generic driver to drm renderer plugin
Dave Airlie [Thu, 26 Apr 2012 19:00:00 +0000 (20:00 +0100)] 
drm: add generic driver to drm renderer plugin

Since around 2.6.39, the kernel has offered a generic ioctl interface
for modesetting (the KMS 'dumb' interface).  This interface is now
provided by most all of the modesetting drivers.

Adding support for this interface means that plymouth will automatically
gain support for new modesetting drivers going forward.

This commit adds that support. Some changes made by Ray Strode.