]> git.ipfire.org Git - thirdparty/plymouth.git/log
thirdparty/plymouth.git
5 years agosrc: die during shutdown with everything else wip/fix-remount-failure
Ray Strode [Fri, 17 Jul 2020 20:06:44 +0000 (16:06 -0400)] 
src: die during shutdown with everything else

plymouthd currently avoids getting killed at shutdown.  This causes
filesystems to fail to remount read-only in some cases.

This commit changes things up so that plymouthd dies with everyone else,
but spawns a process to hold open the drm device that can keep the splash
up until the very end.

In order to keep this process alive until the very end, it gets run
from within the initramfs (if available).  This requires adding service
files to jump back into the initramfs at shutdown

5 years agoautogoo: use /proc/self/fd/0 instead of /dev/stdin
Ray Strode [Thu, 9 Jul 2020 13:34:36 +0000 (09:34 -0400)] 
autogoo: use /proc/self/fd/0 instead of /dev/stdin

The symlink isn't available in some sandboxes:

https://gitlab.gnome.org/GNOME/gnome-build-meta/-/commit/99bf64efdc5a2d5c5fdedb627967b931d02be3d0#note_860312

5 years agoconfigure: bump to 0.9.6
Ray Strode [Wed, 8 Jul 2020 20:48:19 +0000 (16:48 -0400)] 
configure: bump to 0.9.6

5 years agoMerge branch 'ci' into 'master' 0.9.5
Ray Strode [Wed, 8 Jul 2020 20:01:28 +0000 (20:01 +0000)] 
Merge branch 'ci' into 'master'

Add CI pipeline for Plymouth

See merge request plymouth/plymouth!48

5 years agoApply suggestion to .gitlab-ci.yml
Emmanuele Bassi [Tue, 16 Jul 2019 15:19:54 +0000 (15:19 +0000)] 
Apply suggestion to .gitlab-ci.yml

5 years agoci: Add a `distcheck` step
Emmanuele Bassi [Tue, 16 Jul 2019 15:18:40 +0000 (16:18 +0100)] 
ci: Add a `distcheck` step

We want to ensure that the CI is "release ready".

5 years agoAdd CI pipeline for Plymouth
Emmanuele Bassi [Tue, 16 Jul 2019 14:34:32 +0000 (15:34 +0100)] 
Add CI pipeline for Plymouth

We can use GitLab's CI/CD support to run a build.

5 years agoMerge branch 'drop-intltool' into 'master'
Ray Strode [Wed, 8 Jul 2020 19:20:30 +0000 (19:20 +0000)] 
Merge branch 'drop-intltool' into 'master'

Drop intltool

See merge request plymouth/plymouth!117

5 years agoconfigure: quiet a warning
Ray Strode [Wed, 8 Jul 2020 19:14:40 +0000 (15:14 -0400)] 
configure: quiet a warning

I really don't like autogoo

5 years agopo: drop intltool usage
Ray Strode [Wed, 8 Jul 2020 19:12:54 +0000 (15:12 -0400)] 
po: drop intltool usage

gettext can do most everything intltool can do anyway, so just
drop intltool.

5 years agoMerge branch 'docs-man-page-xref' into 'master'
Ray Strode [Sat, 30 May 2020 13:07:50 +0000 (13:07 +0000)] 
Merge branch 'docs-man-page-xref' into 'master'

docs: fix man page cross-reference

See merge request plymouth/plymouth!116

5 years agodocs: fix man page cross-reference
Jan Pokorný [Sat, 30 May 2020 11:40:52 +0000 (13:40 +0200)] 
docs: fix man page cross-reference

5 years agoMerge branch 'not-a-percentage' into 'master'
Ray Strode [Fri, 1 May 2020 15:29:49 +0000 (15:29 +0000)] 
Merge branch 'not-a-percentage' into 'master'

Rename 'percent_done' to 'fraction_done'

See merge request plymouth/plymouth!111

5 years agoRename 'percent_done' to 'fraction_done'
Daniel van Vugt [Tue, 21 Apr 2020 05:38:21 +0000 (13:38 +0800)] 
Rename 'percent_done' to 'fraction_done'

Because they are not percentages but fractional values in the range [0,1]

5 years agoMerge branch 'optional-theme' into 'master'
Ray Strode [Sat, 18 Apr 2020 12:40:50 +0000 (12:40 +0000)] 
Merge branch 'optional-theme' into 'master'

main: Don't bail out of load_settings if "Theme" is missing

See merge request plymouth/plymouth!109

5 years agomain: Don't bail out of load_settings if "Theme" is missing
Daniel van Vugt [Fri, 17 Apr 2020 09:27:12 +0000 (17:27 +0800)] 
main: Don't bail out of load_settings if "Theme" is missing

Because on some systems (like Ubuntu with its alternatives) the "Theme="
line will be missing from plymouthd.defaults. And bailing out early was
causing other settings like DeviceTimeout to never be loaded, which would
then cause the graphics renderers to fail.

5 years agoMerge branch 'wip/close-the-log' into 'master'
Ray Strode [Tue, 7 Apr 2020 13:28:48 +0000 (13:28 +0000)] 
Merge branch 'wip/close-the-log' into 'master'

main: switch log file when switching mode

See merge request plymouth/plymouth!102

5 years agomain: fix mode changing before splash is shown
Laurent Bigonville [Tue, 7 Apr 2020 13:22:02 +0000 (09:22 -0400)] 
main: fix mode changing before splash is shown

At the moment switching modes affects two aspects of how plymouth
runs.

1) What log file is opened (i.e., boot.log or no log file at all)
2) What type of splash gets shown (the details of which are relegated
   to the individual splash plugins)

The mode change handler has a check in place to avoid changing the
type of splash getting shown in the event no splash is supposed to
be shown yet.  This check just makes the function return without
doing anything.

Unfortunately, the check is placed at the top of the function, so
it runs before the log file is changed.

This commit moves the check lower down, so the log file gets properly
updated when the mode is changed.

5 years agomain: switch log file when switching mode
Ray Strode [Thu, 26 Mar 2020 18:11:50 +0000 (14:11 -0400)] 
main: switch log file when switching mode

plymouthd can be run in various modes, for, e.g., boot up,
shutdown, and software upgrades.

The mode plymouthd is using can be changed at runtime.

The "boot" mode keeps a log of the console messages that
happen during boot up.  At the moment, when changing from
the "boot" mode to any other mode, the log file is kept
open.

That open file can cause problems during shutdown.

This commit makes sure the log file is properly closed when
the mode is changed from boot to another mode.

https://gitlab.freedesktop.org/plymouth/plymouth/issues/88

5 years agoMerge branch 'fix-99' into 'master'
Ray Strode [Mon, 6 Apr 2020 18:23:46 +0000 (18:23 +0000)] 
Merge branch 'fix-99' into 'master'

two-step: Center message text within labels if labels are centered

Closes #99

See merge request plymouth/plymouth!103

5 years agotwo-step: Center message text within labels if labels are centered
Daniel van Vugt [Mon, 30 Mar 2020 10:52:39 +0000 (18:52 +0800)] 
two-step: Center message text within labels if labels are centered

This makes a difference when you start rendering multiple lines in
a single label. For a single line label you won't see any difference.

Closes: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/99
5 years agoMerge branch 'master' into 'master'
Ray Strode [Mon, 6 Apr 2020 18:20:51 +0000 (18:20 +0000)] 
Merge branch 'master' into 'master'

Added Indonesian translation

See merge request plymouth/plymouth!107

5 years agopo: add Indonesian translation
Andika Triwidada [Mon, 6 Apr 2020 18:20:51 +0000 (18:20 +0000)] 
po: add Indonesian translation

5 years agoMerge branch 'drm-probe-speedups' into 'master'
Hans de Goede [Wed, 25 Mar 2020 19:27:11 +0000 (19:27 +0000)] 
Merge branch 'drm-probe-speedups' into 'master'

drm/kms probe speedups

See merge request plymouth/plymouth!101

5 years agodrm: Do not unnecessarily get output info twice
Hans de Goede [Tue, 24 Mar 2020 22:17:42 +0000 (23:17 +0100)] 
drm: Do not unnecessarily get output info twice

When a kernel-mode-setting driver loads it will trigger an add udev event
for /dev/dri/card0, followed by one udev change event per connector on the
card. This means that after our initial probe of the card,
create_heads_for_active_connectors is called a number of times for all the
udev change events.

After the initial enum our outputs array will contain active entries for
all connected displays. Meaning that the first loop in
create_heads_for_active_connectors would call get_output_info for
these outputs. Under the hood this does a number of ioctls and especially
the drmModeGetConnector call can be quite expensive.

Then in the second loop create_heads_for_active_connectors would call
get_output_info for all connectors, including for the once which were
checked in the first loop.

There is no reason why we cannot check if active connectors in the
old outputs array have changed when we are calling get_output_info for
all connectors to build the new array. This avoids unnecessarily making
the expensive get_output_info call twice for active connectors in the
old outputs array.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoply-device-manager: Only consume one udev event at a time
Hans de Goede [Mon, 23 Mar 2020 16:38:18 +0000 (17:38 +0100)] 
ply-device-manager: Only consume one udev event at a time

Commit f9e376797a91 ("ply-device-manager: Consume all events in one go")
changed ply-device-manager to consume all pending udev events in one go
instead of consuming only 1 and then returning back to the mainloop.

The idea here was to avoid the overhead of returning back to the mainloop,
doing the poll again, seeing more events were pending and then re-enter
ply-device-manager.

In retrospect this is not a good idea. Systemd waits for oneshot units
like plymouth-switch-root.service to finish and this can block the boot.
Specifically plymouth-switch-root.service must complete before systemd in
the initrd will exec the systemd from the real rootfs. This means that
systemd inside the initrd waits for the:

ExecStart=-/usr/bin/plymouth update-root-fs --new-root-dir=/sysroot

Command to complete, if this command runs while we are consuming udev
events from the graphics card (which sends a change event per probed
connector during the initial probe), then plymouth will not send the ack
to the plymouth boot-client (completing the ExecStart) until all udev
events are consumed.

On my main workstation with i915 graphics and 2 HDMI connected FHD monitors,
this delays the actual switching of the root by 1.9 - 2.1 seconds,
because the re-enumaration of the connectors in the drm plugin takes
about 0.4 seconds per run.

Other upcoming changes will greatly reduce that 0.4 seconds, but still
returning to the main-loop after a single udev event so that we can
answer any waiting boot-clients ASAP is a good idea.

This reverts commit f9e376797a91ad5fbc1f8e8e4aea778f4f22397c.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'two-step-end-animation-fix' into 'master'
Hans de Goede [Tue, 24 Mar 2020 18:29:37 +0000 (18:29 +0000)] 
Merge branch 'two-step-end-animation-fix' into 'master'

two-step: Do not jump to end-animation on halt/reboot if it is disabled

See merge request plymouth/plymouth!100

5 years agotwo-step: Do not jump to end-animation on halt/reboot if it is disabled
Hans de Goede [Mon, 23 Mar 2020 16:20:03 +0000 (17:20 +0100)] 
two-step: Do not jump to end-animation on halt/reboot if it is disabled

If the end-animation is disabled then directly becoming idle on halt /
reboot leads to no animation at all being shown.

Fix this by not jumping to the end-animation on halt/reboot if the
end-animation is disabled.

Fixes: 50c619ed41ca ("two-step: Add UseEndAnimation setting")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'systemd-RemainAfterExit' into 'master'
Hans de Goede [Mon, 23 Mar 2020 19:15:41 +0000 (19:15 +0000)] 
Merge branch 'systemd-RemainAfterExit' into 'master'

Add RemainAfterExit=yes to plymouth's systemd service files

See merge request plymouth/plymouth!99

5 years agoAdd RemainAfterExit=yes to plymouth's systemd service files
Hans de Goede [Mon, 23 Mar 2020 14:59:24 +0000 (15:59 +0100)] 
Add RemainAfterExit=yes to plymouth's systemd service files

All plymouth's systemd unit files are meant to only run once, either during
boot or during shutdown/restart.

Certain events cause systemd to recheck the dependency try between systemd
units. Systemd had a bug before the 245 release which caused this check to
sometimes not restart exited services for which the dependencies are met.

Systemd 245 fixes this, this is causing problems with plymouth.
When the conditions are met for systemd to recheck the dependencies;
and the plymouthd started by plymouth-start.service has exited;
then systemd will restart the plymouth-start unit, causing plymouthd to
take over tty1 after boot. This is causing various problems, also see:

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

Since all plymouth's systemd units are intended to run only once, they
all should be marked as remaining after exit by adding:
"RemainAfterExit=yes" to them. This causes systemd to still consider them
running after e.g. plymouthd has exited, as long as they have started
successfully. This fixes systemd restarting plymouth's units when it
should not do so.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1803293
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1807771
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'twostep-end-animation' into 'master'
Hans de Goede [Wed, 11 Mar 2020 19:23:44 +0000 (19:23 +0000)] 
Merge branch 'twostep-end-animation' into 'master'

two-step: Add UseEndAnimation setting

See merge request plymouth/plymouth!94

5 years agotwo-step: Add UseEndAnimation setting
Hans de Goede [Tue, 18 Feb 2020 21:03:58 +0000 (22:03 +0100)] 
two-step: Add UseEndAnimation setting

We try to start the end animation early based on our progress accounting
but this is highly unreliable because e.g.:
-It counts time to enter the diskcrypt passwd as normal boot time, while
 this varies wildly from boot to boot
-Boot times for laptops can differ significantly between docked / undocked
 state

Between gdm calling /bin/plymouth deactivate and the drm plugin's deactivate
method getting called there can be e.g. 2.1 seconds (from a random boot),
with a theoretical maximum of 3 seconds (2 seconds to finish the throbber +
1 second for the end animation).

On a modern system userland boot should be able to finish in say 5 seconds,
making gdm wait an additional 1 - 3 seconds for deactivation is a huge amount
of extra wait time!

This commit adds a new "UseEndAnimation" option to the two-step plugin,
which defaults to true. Setting this to false makes deactivation immediate.

This works nicely with the spinner (and bgrt) themes since we do not really
do anything special in the end animation there anyways and since we fade-over
into gdm things will still look ok, while shaving a signifcant chunk of our
boot time.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'script-image-crop' into 'master'
Ray Strode [Wed, 11 Mar 2020 13:44:35 +0000 (13:44 +0000)] 
Merge branch 'script-image-crop' into 'master'

script: add Image.Crop(x, y, width, height)

See merge request plymouth/plymouth!98

5 years agoscript: add Image.Crop(x, y, width, height)
J-P Nurmi [Tue, 10 Mar 2020 22:10:08 +0000 (23:10 +0100)] 
script: add Image.Crop(x, y, width, height)

The script plugin currently allows pixel buffers to be resized and
scaled, but provides no mechanism for script theme authors to just crop
the buffer, which is necessary for images that cannot be stretched,
such as progress bars with gradients.

This commit adds that feature as a new Crop method.

5 years agoMerge branch 'drm-hotplug-fixes' into 'master'
Ray Strode [Tue, 10 Mar 2020 23:51:41 +0000 (23:51 +0000)] 
Merge branch 'drm-hotplug-fixes' into 'master'

Drm hotplug fixes

See merge request plymouth/plymouth!92

5 years agoply-throbber: Do not redraw when we need to stop throbbing on free
Hans de Goede [Tue, 18 Feb 2020 10:51:03 +0000 (11:51 +0100)] 
ply-throbber: Do not redraw when we need to stop throbbing on free

One case where the various widgets are being freed is the pixel-display-s
being removed because of a monitor being hot(un)plugged. When the monitor
configuration changes ply-device-manager removes all old pixel-displays
and then adds the pixel-displays from the new config.

Calling ply_pixel_display_draw_area on a pixel-display which is about to be
freed is a bad idea, if the monitor was actually unplugged this leads to
various sort of errors, including crashes in some cases.

ply-throbber is the only (older) widget which does a redraw on free,
this likely was not noticed until now because typically the throbber
will already have been stopped on free.

This commit adds a redraw parameter to ply_throbber_stop_now and sets
this to false when calling ply_throbber_stop_now from ply_throbber_free.
This fixes plymouth sometimes crashing when monitors are hot(un)plugged
while plymouth is running.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoply-keymap-icon: Do not draw on free
Hans de Goede [Tue, 18 Feb 2020 10:50:17 +0000 (11:50 +0100)] 
ply-keymap-icon: Do not draw on free

One case where the various widgets are being freed is the pixel-display-s
being removed because of a monitor being hot(un)plugged. When the monitor
configuration changes ply-device-manager removes all old pixel-displays
and then adds the pixel-displays from the new config.

Calling ply_pixel_display_draw_area on a pixel-display which is about to be
freed is a bad idea, if the monitor was actually unplugged this leads to
various sort of errors, including crashes in some cases.

ply-keymap-icon is a recently added widget, none of the other
(older) widgets redraw themselves as hidden on free because there is
no reason to do this.

This commit removes the troublesome hide call (which involves redrawing).
This fixes plymouth sometimes crashing when monitors are hot(un)plugged
while plymouth is running.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoply-capslock-icon: Do not draw on free
Hans de Goede [Tue, 18 Feb 2020 10:45:55 +0000 (11:45 +0100)] 
ply-capslock-icon: Do not draw on free

One case where the various widgets are being freed is the pixel-display-s
being removed because of a monitor being hot(un)plugged. When the monitor
configuration changes ply-device-manager removes all old pixel-displays
and then adds the pixel-displays from the new config.

Calling ply_pixel_display_draw_area on a pixel-display which is about to be
freed is a bad idea, if the monitor was actually unplugged this leads to
various sort of errors, including crashes in some cases.

ply-capslock-icon is a recently added widget, none of the other
(older) widgets redraw themselves as hidden on free because there is
no reason to do this.

This commit adds a new stop_polling helper and replaces the troublesome
hide call (which involves redrawing) with this. This fixes plymouth
sometimes crashing when monitors are hot(un)plugged while plymouth is
running.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'script-unref' into 'master'
Ray Strode [Tue, 10 Mar 2020 17:25:04 +0000 (17:25 +0000)] 
Merge branch 'script-unref' into 'master'

script: add missing unref() for system update func

See merge request plymouth/plymouth!97

5 years agoscript: add missing unref() for system update func
J-P Nurmi [Tue, 10 Mar 2020 14:51:58 +0000 (15:51 +0100)] 
script: add missing unref() for system update func

As pointed out by @mmstick in #79

5 years agoMerge branch 'themes-fix-UseFirmwareBackground-usage' into 'master'
Ray Strode [Tue, 10 Mar 2020 14:22:22 +0000 (14:22 +0000)] 
Merge branch 'themes-fix-UseFirmwareBackground-usage' into 'master'

themes: Drop UseFirmwareBackground=true from spinner/bgrt firmware-upgrade settings

See merge request plymouth/plymouth!95

5 years agothemes: Drop UseFirmwareBackground=true from spinner/bgrt firmware-upgrade settings
Hans de Goede [Tue, 18 Feb 2020 21:38:06 +0000 (22:38 +0100)] 
themes: Drop UseFirmwareBackground=true from spinner/bgrt firmware-upgrade settings

The spinner theme should never have UseFirmwareBackground=true and in the
bgrt case we should not use it for modes which set a Title as the Title
location will conflict with the firmware background vendor logo.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'system-update' into 'master'
Ray Strode [Tue, 10 Mar 2020 14:09:55 +0000 (14:09 +0000)] 
Merge branch 'system-update' into 'master'

Fix SetSystemUpdateFunction

Closes #79

See merge request plymouth/plymouth!96

5 years agoFix SetSystemUpdateFunction
J-P Nurmi [Mon, 9 Mar 2020 14:36:42 +0000 (15:36 +0100)] 
Fix SetSystemUpdateFunction

script_lib_plymouth_on_system_update() was never called, because
the plugin interface mapping was missing.

Fixes: #79
Signed-off-by: J-P Nurmi <jpnurmi@gmail.com>
5 years agoMerge branch 'event-loop-log-less' into 'master'
Ray Strode [Tue, 10 Mar 2020 12:32:26 +0000 (12:32 +0000)] 
Merge branch 'event-loop-log-less' into 'master'

Event loop log less

See merge request plymouth/plymouth!93

5 years agoevent-loop: Remove ply_trace calls around the disconnect handler
Hans de Goede [Tue, 18 Feb 2020 20:19:38 +0000 (21:19 +0100)] 
event-loop: Remove ply_trace calls around the disconnect handler

Doing a ply_trace both before and after the disconnect handler, which
gets called every time a boot client asks something of us through by
calling /sbin/plymouth leads to a lot of not really informative messages
in the debug-log.

This removes the 2 ply_trace calls around the disconnect handlers to make
the logs easier to read.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoevent-loop: Fix debug-log "failed to delete fd # from epoll watch list" spam
Hans de Goede [Tue, 18 Feb 2020 20:16:38 +0000 (21:16 +0100)] 
event-loop: Fix debug-log "failed to delete fd # from epoll watch list" spam

The boot server uses a disconnect handler which closes the fd, this
causes deleting the fd from the epoll watch list to fail with an EBADF
error. Since the fd was closed it was already removed from the epoll
watch list, so the failure is harmless, silence these errors getting logged
to the debug logs.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'avoid_shutdown_failure' into 'master'
Ray Strode [Fri, 6 Mar 2020 18:02:31 +0000 (18:02 +0000)] 
Merge branch 'avoid_shutdown_failure' into 'master'

ply-terminal-session: Not use grantpt when the system shut down. to avoid sytem hung up.

See merge request plymouth/plymouth!52

5 years agoterminal-session: Drop unnecessary grantpt() call.
Zhao Qiang [Fri, 6 Mar 2020 17:43:03 +0000 (01:43 +0800)] 
terminal-session: Drop unnecessary grantpt() call.

plymouth calls `grantpt()` when setting up the pseudoterminal it uses
for boot logging and console broadcasting. `grantpt()` traditionally
sets up the access permissions and file mode of the created slave
pseudoterminal device node.

That call is unnecessary for two reasons:
1. The kernel automatically sets up the correct permissions at open
   time on modern Linux.
2. plymouthd runs as root anyway

Furthermore, it seems like, for some unknown reason, the call may be
interfering with the shutdown process.

This commit drops the call, since it's unnecessary, and potentially
even problematic.

5 years agoMerge branch 'clean_codes_gdm_transition' into 'master'
Ray Strode [Fri, 6 Mar 2020 16:50:34 +0000 (16:50 +0000)] 
Merge branch 'clean_codes_gdm_transition' into 'master'

Misc: Code cleanups, gdm-transition is obsolete, so I removed the related code and scripts.

See merge request plymouth/plymouth!86

5 years agobuild-goo: Remove vestigial remnants of old GDM integration code.
Zhao Qiang [Fri, 6 Mar 2020 15:39:06 +0000 (23:39 +0800)] 
build-goo: Remove vestigial remnants of old GDM integration code.

commit 04102125 removed a feature, only several versions of
GDM relied on for doing the splash to login screen transition.
but it missed a few spots in the build goo and documentation. So
this commit does another pass to fully clean up any lingering
references to obsolete GDM transition code.

5 years agoMerge branch 'fix-bad-assertion' into 'master'
Ray Strode [Mon, 2 Mar 2020 15:59:31 +0000 (15:59 +0000)] 
Merge branch 'fix-bad-assertion' into 'master'

main: Add state variable splash_is_becoming_idle

See merge request plymouth/plymouth!90

5 years agomain: Add state variable splash_is_becoming_idle
Gaël PORTAY [Wed, 26 Feb 2020 20:57:23 +0000 (15:57 -0500)] 
main: Add state variable splash_is_becoming_idle

Both handlers on_deactivate() and on_quit() sets the handler
on_boot_splash_idle() using the helper ply_boot_splash_become_idle().

That helper creates a new trigger and it stores it alongside the handler
in its context. The helper asserts if the trigger is set (i.e. a handler
is pending already).

None of the handlers on_deactivate() and on_quit() check if the handler
on_boot_splash_idle() is set already.

There is a race condition that leads to the situation in which the
assertion is false and causes plymouthd to signal itself with SIGABRT
and die.

First, a client sends the request deactivate to the daemon that creates
a trigger for the idle handler. Then, the trigger is still pending while
another client sends the request quit to the daemon that tries to create
a second trigger and die because of the assertion.

This commit adds the new state variable splash_is_becoming_idle that is
checked before calling the helper ply_boot_splash_become_idle() to avoid
to call it twice. The state variable is set by the caller after it calls
the helper ply_boot_splash_become_idle(). It is cleared by the handler
on_boot_splash_idle() after the splash becomes idle.

Fixes:

Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-boot-server.c:350:print_connection_process_identity       : connection is from pid 683 (/usr/bin/plymouth deactivate) with parent pid 1 (/usr/lib/systemd/systemd --switched-root --system --deserialize 27)
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-boot-server.c:459:ply_boot_connection_on_request          : got deactivate request
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 main.c:1275:on_deactivate                                     : deactivating
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:967:ply_event_loop_stop_watching_for_timeout : no matching timeout found for removal
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-device-manager.c:1112:ply_device_manager_pause            : ply_device_manager_pause() called, stopping watching for udev events
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:761:ply_event_loop_stop_watching_fd          : stopping watching fd 8
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:777:ply_event_loop_stop_watching_fd          : removing destination for fd 8
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:786:ply_event_loop_stop_watching_fd          : no more destinations remaing for fd 8, removing source
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-device-manager.c:1092:ply_device_manager_deactivate_keyboa: deactivating keyboards
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:761:ply_event_loop_stop_watching_fd          : stopping watching fd 10
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:777:ply_event_loop_stop_watching_fd          : removing destination for fd 10
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-boot-splash.c:687:ply_boot_splash_become_idle             : telling splash to become idle
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ./plugin.c:1801:become_idle                                   : deactivation requested
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ./plugin.c:1819:become_idle                                   : already waiting for plugin to stop
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 ply-boot-server.c:350:print_connection_process_identity       : connection is from pid 685 (/usr/bin/plymouth quit --retain-splash) with parent pid 1 (/usr/lib/systemd/systemd --switched-root --system --deserialize 27)
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 ply-boot-server.c:486:ply_boot_connection_on_request          : got quit --retain-splash request
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 main.c:1326:on_quit                                           : quitting (retain splash: true)
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 main.c:1338:on_quit                                           : system initialized so saving boot-duration file
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 ply-utils.c:596:ply_create_directory                          : directory '/var/lib/plymouth/' already exists
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 main.c:686:get_cache_file_for_mode                            : returning cache file '/var/lib/plymouth//boot-duration'
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 ply-progress.c:214:ply_progress_save_cache                    : saving progress cache to /var/lib/plymouth//boot-duration
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.192 main.c:1634:tell_systemd_to_stop_printing_details             : telling systemd to stop printing details
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.192 main.c:1352:on_quit                                           : closing log
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.192 ply-device-manager.c:1092:ply_device_manager_deactivate_keyboa: deactivating keyboards
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.192 main.c:1358:on_quit                                           : unloading splash
Feb 25 22:04:35 steamos plymouthd[312]: plymouthd: ply-boot-splash.c:677: ply_boot_splash_become_idle: Assertion `splash->idle_trigger == NULL' failed.
Feb 25 22:05:06 steamos systemd[1]: plymouth-start.service: Main process exited, code=dumped, status=6/ABRT
Feb 25 22:05:06 steamos systemd[1]: plymouth-start.service: Failed with result 'core-dump'.

Signed-off-by: Gaël PORTAY <gael.portay@collabora.com>
5 years agoMerge branch 'fix-bug-report-URL' into 'master'
Ray Strode [Tue, 24 Dec 2019 16:29:10 +0000 (16:29 +0000)] 
Merge branch 'fix-bug-report-URL' into 'master'

configure: Update bug report URL.

See merge request plymouth/plymouth!87

5 years agoconfigure: Update bug report URL.
ZhaoQiang [Tue, 24 Dec 2019 16:29:10 +0000 (16:29 +0000)] 
configure: Update bug report URL.

5 years agoMerge branch 'cleanups' into 'master'
Hans de Goede [Fri, 1 Nov 2019 12:42:52 +0000 (12:42 +0000)] 
Merge branch 'cleanups' into 'master'

Misc. code cleanups

See merge request plymouth/plymouth!82

5 years agodrm: Remove reset_scan_out_buffer_if_needed() prototype declaration
Hans de Goede [Mon, 21 Oct 2019 14:25:43 +0000 (16:25 +0200)] 
drm: Remove reset_scan_out_buffer_if_needed() prototype declaration

Remove the unnecessary forward reset_scan_out_buffer_if_needed() declaration.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agodrm: Remove unnecessary next_node helper variable
Hans de Goede [Mon, 21 Oct 2019 14:22:58 +0000 (16:22 +0200)] 
drm: Remove unnecessary next_node helper variable

When walking a list, we only need to store the next_node before doing
operations on the current node, if the operation modifies the list,
which is only the case in free_heads() in all other cases we can remove
the unnecessary next_node helper variable.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agotwo-step: Remove unnecessary next_node helper variable
Hans de Goede [Mon, 21 Oct 2019 14:46:07 +0000 (16:46 +0200)] 
two-step: Remove unnecessary next_node helper variable

When walking a list, we only need to store the next_node before doing
operations on the current node, if the operation modifies the list,
which is only the case in free_views() and remove_pixel_display () in all
other cases we can remove the unnecessary next_node helper variable.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'allow-separate-rootfs' into 'master'
Hans de Goede [Fri, 1 Nov 2019 12:34:37 +0000 (12:34 +0000)] 
Merge branch 'allow-separate-rootfs' into 'master'

Allow running plymouth-populate-initrd in a cross-compiler environment

See merge request plymouth/plymouth!72

5 years agoAllow running plymouth-populate-initrd in a cross-compiler environment
Böszörményi Zoltán [Fri, 18 Oct 2019 11:30:52 +0000 (13:30 +0200)] 
Allow running plymouth-populate-initrd in a cross-compiler environment

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
5 years agoMerge branch 'throbgress-removal' into 'master'
Hans de Goede [Tue, 29 Oct 2019 15:29:45 +0000 (15:29 +0000)] 
Merge branch 'throbgress-removal' into 'master'

throbgress: Remove the throbgress plugin

See merge request plymouth/plymouth!69

5 years agothrobgress: Remove the throbgress plugin
Hans de Goede [Thu, 26 Sep 2019 14:25:43 +0000 (16:25 +0200)] 
throbgress: Remove the throbgress plugin

Now that the spinfinity theme has been modified to use the two-step
splash plugin instead, there are no more users of the throbgress plugin,
so lets remove it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'drm-first-draw-fixes2' into 'master'
Hans de Goede [Mon, 21 Oct 2019 17:35:58 +0000 (17:35 +0000)] 
Merge branch 'drm-first-draw-fixes2' into 'master'

Drm first draw fixes part 2

See merge request plymouth/plymouth!81

5 years agodrm: Remove explicit set_scan_out_buffer() from activate()
Hans de Goede [Mon, 21 Oct 2019 14:00:44 +0000 (16:00 +0200)] 
drm: Remove explicit set_scan_out_buffer() from activate()

flush_head() already sets the scan-out buffer if necessary and if it is not
necessary then we do not want to do this. Specifically second and later heads
do not yet have their buffer drawn to when activate gets called from the
map_to_device call for the first head and then we do not want to start
scanning out the uninitialized buffer.

Removing the explicit ply_renderer_head_set_scan_out_buffer() call also
allows removing the if (head->scan_out_buffer_id != 0) check,
flush_head() already checks this itself.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agodrm: Mark buffer as clean in ply_renderer_head_new()
Hans de Goede [Mon, 21 Oct 2019 14:05:56 +0000 (16:05 +0200)] 
drm: Mark buffer as clean in ply_renderer_head_new()

We do not want to set our buffer as scanout source before it has been
drawn to by the splash, to avoid a flicker caused by us installing a
black buffer for scanout.

To avoid this, flush_head() only calls reset_scan_out_buffer() if the buffer
for the head has updated_areas, iow if it already has been drawn to.

Our ply_pixel_buffer_fill_with_color() call in ply_renderer_head_new()
causes updated_areas to be non-empty, triggering a reset_scan_out_buffer()
call before the buffer has been drawn at least once.

This commit fixes this by clearing the updated_areas after the
ply_pixel_buffer_fill_with_color() call.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'twostep-bgrt-position-fix' into 'master'
Hans de Goede [Mon, 21 Oct 2019 09:39:21 +0000 (09:39 +0000)] 
Merge branch 'twostep-bgrt-position-fix' into 'master'

two-step: Fix wrong horizontal position of bgrt logo on left-side-up LCD panels

See merge request plymouth/plymouth!80

5 years agotwo-step: Fix wrong horizontal position of bgrt logo on left-side-up LCD panels
Hans de Goede [Mon, 21 Oct 2019 08:34:26 +0000 (10:34 +0200)] 
two-step: Fix wrong horizontal position of bgrt logo on left-side-up LCD panels

On devices which have their LCD panel mounted 90° rotated with the left-side
of the physical LCD-panel up (at the top), we were using the wrong offset
for placing the bgrt graphics. We were directly using y_offset from the bgrt
as x_offset, but y_offset is from the top of the physical LCD which in this
case is the right side of the panel as seen by the user. Where as our x_offset
is defined to have 0 at the left side.

This commit fixes this issue by flipping the y_offset value on these panels
before using it as our x_offset.

This fixes the logo jumping 6 pixels to the left on an Asus T100HA, which
has such a panel and uses a bgrt y_offset of 512, which results in a flipped
y_offset of 518 (for some reason the log is not entirely centered triggering
this problem).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'kbd-indicator-tweaks' into 'master'
Hans de Goede [Sun, 20 Oct 2019 12:40:41 +0000 (12:40 +0000)] 
Merge branch 'kbd-indicator-tweaks' into 'master'

keyboard indicator theming improvements

See merge request plymouth/plymouth!79

5 years agotwo-step: Change keyboard-indicator positioning to fixed offset below dialog
Hans de Goede [Tue, 15 Oct 2019 10:15:10 +0000 (12:15 +0200)] 
two-step: Change keyboard-indicator positioning to fixed offset below dialog

The keyboard-indicators should be located close to the dialog/entry to
make clear that they belong to each other. Using relative positioning
does not work well for this.

Drop the KeyboardIndicator[Vertic|Horizont]alAlignment options (we have
never done a release with these) and put the keyboard indicators at
a fixed offset (half their height) from the bottom of the dialog instead.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agothemes: spinner/bgrt: Modify password dialog to match gnome 3.34 changes
Hans de Goede [Mon, 14 Oct 2019 20:08:21 +0000 (22:08 +0200)] 
themes: spinner/bgrt: Modify password dialog to match gnome 3.34 changes

There have been some small tweaks to the gnome lockscreen password
entry filed which we use as template for the diskcrypt password dialog,
adjust our dialog to match these tweaks.

Also move the keyboard indicator to be close to the entry, so that it
is clear it belongs to the entry.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agogitignore: Add translation related generated files to .gitignore
Hans de Goede [Tue, 15 Oct 2019 08:27:17 +0000 (10:27 +0200)] 
gitignore: Add translation related generated files to .gitignore

Add translation related generated files to .gitignore.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'drm-upside-down-fix' into 'master'
Hans de Goede [Tue, 15 Oct 2019 07:07:39 +0000 (07:07 +0000)] 
Merge branch 'drm-upside-down-fix' into 'master'

Drm upside down fix

See merge request plymouth/plymouth!78

5 years agotwo-step: Remove workaround for upside-down panels
Hans de Goede [Mon, 14 Oct 2019 06:11:07 +0000 (08:11 +0200)] 
two-step: Remove workaround for upside-down panels

Now that the drm plugin uses hw-rotation for upside down panels when
the GOP does so, there is no need to treat the bgrt rotation for
upside-down panels special anymore,

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agodrm: Keep hw-rotation on devices with upside down LCD panels
Hans de Goede [Sun, 13 Oct 2019 21:46:31 +0000 (23:46 +0200)] 
drm: Keep hw-rotation on devices with upside down LCD panels

On devices with an upside down LCD panel and where the hw is capable of
rotating the image to correct this the firmware will program the primary
plane to use hw rotation. When we reset this, this may lead to a small
flicker, where the vendor logo is briefly shown upside down.

A bigger problem is the transition to gdm/mutter. We leave the splash
on screen when mutter loads for a smooth transition,  when mutter turns
hw-rotation back on, the splash turns upside down! And mutter then fades
from the upside-down splash to the login screen, which looks kinda bad.

Keeping the hw-rotation (and disabling our sw rotation) on devices like
this fixes both issues.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agodrm: Add get_primary_plane_rotation() helper function
Hans de Goede [Sun, 13 Oct 2019 20:42:24 +0000 (22:42 +0200)] 
drm: Add get_primary_plane_rotation() helper function

Factor most of the code in ply_renderer_head_clear_plane_rotation() out
into a get_primary_plane_rotation() helper, this is a preparation patch
for adding support for using hw-rotation in some cases.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'systemd-units-fix-hardcoding-run' into 'master'
Hans de Goede [Sun, 13 Oct 2019 18:03:33 +0000 (18:03 +0000)] 
Merge branch 'systemd-units-fix-hardcoding-run' into 'master'

systemd-ask-password-plymouth.service.in: Do not hardcode /run path to pid file

Closes #26

See merge request plymouth/plymouth!77

5 years agosystemd-ask-password-plymouth.service.in: Do not hardcode /run path to pid file
Hans de Goede [Sun, 13 Oct 2019 14:39:22 +0000 (16:39 +0200)] 
systemd-ask-password-plymouth.service.in: Do not hardcode /run path to pid file

Use @plymouthruntimedir@/pid in systemd-ask-password-plymouth.service.in so
that the way the path to the pidfile is build there is identical to the
way the --pidfile argument is build in plymouth-start.service.in.

Fixes #26

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'logrotate' into 'master'
Hans de Goede [Sun, 13 Oct 2019 14:47:56 +0000 (14:47 +0000)] 
Merge branch 'logrotate' into 'master'

scripts: Add a logrotate file for /var/log/boot.log

Closes #31

See merge request plymouth/plymouth!76

5 years agoscripts: Add a logrotate file for /var/log/boot.log
Hans de Goede [Sun, 13 Oct 2019 14:37:29 +0000 (16:37 +0200)] 
scripts: Add a logrotate file for /var/log/boot.log

Since plymouth concatenates boot logs one after the other in
/var/log/boot.log, causing it to grow endlessly. we need to logrotrate it.

Fixes #31

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'drm-first-draw-fixes' into 'master'
Hans de Goede [Sun, 13 Oct 2019 12:17:03 +0000 (12:17 +0000)] 
Merge branch 'drm-first-draw-fixes' into 'master'

Drm first draw fixes

See merge request plymouth/plymouth!75

5 years agodrm: Install our fb after drawing to it
Hans de Goede [Sat, 12 Oct 2019 14:31:04 +0000 (16:31 +0200)] 
drm: Install our fb after drawing to it

If we need to (re)install our fb as the buffer to scan-out of during
flush, then do so after updating our fb contents, rather then before.

This removes another potential source of flickering.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agodrm: Delay installing our framebuffer until the first draw
Hans de Goede [Sat, 12 Oct 2019 14:26:08 +0000 (16:26 +0200)] 
drm: Delay installing our framebuffer until the first draw

Instead of installing a framebuffer with uninitialized contents, delay
installing our framebuffer until the first (re)draw.

This fixes some ugly flashes when plymout loads in some cases and it
also removes a FIXME comment from the code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'runtimedir' into 'master'
Hans de Goede [Sun, 13 Oct 2019 10:32:14 +0000 (10:32 +0000)] 
Merge branch 'runtimedir' into 'master'

configure: Make runtimedir configurable

Closes #75

See merge request plymouth/plymouth!74

5 years agoconfigure: Make runtimedir configurable
Hans de Goede [Sun, 13 Oct 2019 08:22:43 +0000 (10:22 +0200)] 
configure: Make runtimedir configurable

On modern systems we should use /run/plymouth to store things like the
pid file, instead of /var/run/plymouth, make the runtime dir configurable
with --with-runtimedir. This keeps the old default behavior of using
/var/run/plymouth, users can pass --with-runtimedir=/run to use
/run/plymouth instead.

Fixes: #75
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'hidpi-gfx-glitch-fix' into 'master'
Hans de Goede [Sun, 13 Oct 2019 08:28:06 +0000 (08:28 +0000)] 
Merge branch 'hidpi-gfx-glitch-fix' into 'master'

ply-pixel-buffer: Fix bottom edge rendering of scaled buffers

Closes #83

See merge request plymouth/plymouth!73

5 years agoply-pixel-buffer: Fix bottom edge rendering of scaled buffers
Hans de Goede [Sat, 12 Oct 2019 10:38:25 +0000 (12:38 +0200)] 
ply-pixel-buffer: Fix bottom edge rendering of scaled buffers

Commit 4e1c00b89a71 (" ply-pixel-buffer: Fix right and bottom edge rendering
of scaled buffers"), which tried to fix a minor rendering issue with the right
and bottom edge of scaled images, contains a typo which actually makes things
worse :|

When checking if iy exceeds the height of the image, ix gets set to the height
instead of iy leading to addressing pass part of the buffer which leads to
various rendering artifacts.

This commit fixes the typo and thus also the artifacts.

Fixes: #83
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'keyboard-indicator' into 'master'
Hans de Goede [Tue, 1 Oct 2019 08:12:17 +0000 (08:12 +0000)] 
Merge branch 'keyboard-indicator' into 'master'

Add keyboard layout indicator support

Closes #85

See merge request plymouth/plymouth!71

5 years agothemes: Add images for keyboard indicator support to spinner and spinfinity
Hans de Goede [Mon, 30 Sep 2019 22:19:48 +0000 (00:19 +0200)] 
themes: Add images for keyboard indicator support to spinner and spinfinity

Add capslock.png, keyboard.png and keymap-render.png files to the
spinner and spinfinity themes, this enables keyboard indicator
(keymap and capslock state) support for these themes.

capslock.png was made by me drawing the icon in xfig, then export as
svg, at some blank rows at the bottom and save as png. I've added the
capslock.fig file to the spinner theme dir.

keyboard.png comes from google's material-design-icons (original is
apache licensed): https://github.com/google/material-design-icons/
I've also added a copy of the 2 svg source files to the spinner theme dir.

keymap-render.png is generated by scripts/keymap-render.py.

Fixes: #85
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agotwo-step: Add Keyboard layout indicator support
Hans de Goede [Mon, 30 Sep 2019 21:30:53 +0000 (23:30 +0200)] 
two-step: Add Keyboard layout indicator support

Use the new keymap-icon control to show a keyboard layout indicator,
when showing a dialog.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agocapslock-icon: Draw the icon on show
Hans de Goede [Mon, 30 Sep 2019 19:20:33 +0000 (21:20 +0200)] 
capslock-icon: Draw the icon on show

Mark the display area where the icon is as damaged on show to force it
being drawn on show, in case capslock is on at show time.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agolibply-splash-graphics: Add new keymap-icon control
Hans de Goede [Mon, 30 Sep 2019 19:02:04 +0000 (21:02 +0200)] 
libply-splash-graphics: Add new keymap-icon control

Add a new control which draws a keyboard-icon + a pre-rendered text
describing the current layout/keymap (as reported by the renderer).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoscripts: Add keymap-render.py script
Alberto Ruiz [Mon, 30 Sep 2019 14:58:55 +0000 (16:58 +0200)] 
scripts: Add keymap-render.py script

Add a script for generating a png with the short-name (ignoring variants)
of all keymaps listed by "localectl list-keymaps" pre-generated.

This scripts also generates a ply-keymap-metadata.h file with info on
which pre-generated keymap name is where in the png.

This will be used in a follow-up commit to add support for a new
keyboard-keymap-icon control to libply-splash-graphics.

Note that this commit does not add the generated keymap-render.png file,
this file will be added to each themes image-dir separately as the color
of the pre-generated text may differ per theme.

Changes by Hans de Goede:
- Change generated metadata into a C header file
- Drop drawing of curved corners, we just want the text
- Add special handling for dvorak

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agorenderer: Add ply_renderer_get_keymap function
Hans de Goede [Mon, 30 Sep 2019 12:06:51 +0000 (14:06 +0200)] 
renderer: Add ply_renderer_get_keymap function

Add a function to get the keymap from a renderer and implement
this for the drm and frame-buffer renderers.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoterminal: add ply_terminal_get_keymap function
Hans de Goede [Mon, 30 Sep 2019 09:01:34 +0000 (11:01 +0200)] 
terminal: add ply_terminal_get_keymap function

Add a helper function to get the keymap from the terminal.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agokey-file: Add support for non ini style config files
Hans de Goede [Sat, 28 Sep 2019 20:31:38 +0000 (22:31 +0200)] 
key-file: Add support for non ini style config files

In some cases me way want to parse key=value style config files from
outside of plymouth which lack ini style groups.

This commit adds a new ply_key_file_load_groupless_file function which
supports loading such files. When a file is loaded this way, NULL must
be passed as group_name for subsequent ply_key_file_get_* calls.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'avoid_build_warning' into 'master'
Hans de Goede [Mon, 30 Sep 2019 09:25:47 +0000 (09:25 +0000)] 
Merge branch 'avoid_build_warning' into 'master'

Use GTK 3.22's way to get screen size

See merge request plymouth/plymouth!51

5 years agox11-render-plugin: Use GTK 3.22's method to get screen size to avoid
ZhaoQiang [Wed, 24 Jul 2019 12:12:51 +0000 (20:12 +0800)] 
x11-render-plugin: Use GTK 3.22's method to get screen size to avoid
deprecate warning in compile.

5 years agoMerge branch 'cleanups' into 'master'
Hans de Goede [Mon, 30 Sep 2019 09:17:47 +0000 (09:17 +0000)] 
Merge branch 'cleanups' into 'master'

Cleanups

See merge request plymouth/plymouth!70

5 years agospace-flares: Fix compiler warning
Hans de Goede [Mon, 30 Sep 2019 09:12:45 +0000 (11:12 +0200)] 
space-flares: Fix compiler warning

Recent gcc versions give the following compiler warning with space-flares:
./plugin.c: In function ‘star_bg_update’:
./plugin.c:762:21: warning: taking the absolute value of unsigned type ‘uint32_t’ {aka ‘unsigned int’} has no effect [-Wabsolute-value]
  762 |                 if (abs (((image_data[x + y * width] >> 16) & 0xff) - ((pixel_colour >> 16) & 0xff)) > 8) {
      |                     ^~~

This commit fixes this, assuming that gcc actually optimises the abs()
away, this will also make the code behave as intended again.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>