]> git.ipfire.org Git - thirdparty/plymouth.git/log
thirdparty/plymouth.git
21 months agoMerge branch 'fix-freetype-fallback' into 'main'
Ray Strode [Tue, 16 Jan 2024 02:06:59 +0000 (02:06 +0000)] 
Merge branch 'fix-freetype-fallback' into 'main'

label-freetype: fix fallback not working when fc-match isn't available

Closes #239

See merge request plymouth/plymouth!302

21 months agolabel-freetype: fix fallback not working when fc-match isn't available
Ferdinand Bachmann [Tue, 16 Jan 2024 00:52:11 +0000 (01:52 +0100)] 
label-freetype: fix fallback not working when fc-match isn't available

The new font loading functions introduced in
544e62ac41a490f04d8e6b4e85f8b9fa1171b0cc assume that popen() returns
NULL when fc-match is unavailable or fails. This is incorrect, since
popen() will always start a shell to run the passed command and return a
stream to that shell's stdin and stdout.

This results in an non-null but empty font name being passed to
FT_New_Face(), which fails.

This commit fixes this by also using the fallback font when the font
path read from the popen() stream is empty.

Fixes #239
Fixes regression caused by 544e62ac41a490f04d8e6b4e85f8b9fa1171b0cc

21 months agoMerge branch 'inibash' into 'main'
n3rdopolis [Sat, 13 Jan 2024 00:33:26 +0000 (00:33 +0000)] 
Merge branch 'inibash' into 'main'

plymouth-set-default-theme: Use a more targeted bash ini-parser function...

Closes #238

See merge request plymouth/plymouth!300

21 months agoplymouth-set-default-theme: Use a more targeted bash ini-parser function instead...
nerdopolis [Wed, 10 Jan 2024 03:02:14 +0000 (22:02 -0500)] 
plymouth-set-default-theme: Use a more targeted bash ini-parser function instead of sed to handle the config file

21 months agoMerge branch 'fixinigroup' into 'main'
Ray Strode [Wed, 10 Jan 2024 19:46:10 +0000 (19:46 +0000)] 
Merge branch 'fixinigroup' into 'main'

splash plugins: Fix wrong group being used for console viewer settings in...

See merge request plymouth/plymouth!301

21 months agosplash plugins: Fix wrong group being used for console viewer settings in space-flare...
nerdopolis [Wed, 10 Jan 2024 12:20:02 +0000 (07:20 -0500)] 
splash plugins: Fix wrong group being used for console viewer settings in space-flares and fade-throbber

21 months agoMerge branch 'fixinputwarnings' into 'main'
Ray Strode [Fri, 5 Jan 2024 15:42:39 +0000 (15:42 +0000)] 
Merge branch 'fixinputwarnings' into 'main'

ply-input-device: Fix 'may be used uninitialized' warnings

See merge request plymouth/plymouth!299

21 months agoply-input-device: Fix 'may be used uninitialized' warnings
n3rdopolis [Fri, 5 Jan 2024 15:42:39 +0000 (15:42 +0000)] 
ply-input-device: Fix 'may be used uninitialized' warnings

If libevdev gave plymouth an event with an out of range key event type then plymouth would end up using uninitialized variables.

This commit fixes the compiler warning introduced from that unlikely scenario.

21 months agoMerge branch 'fixvtlesscrash' into 'main'
Ray Strode [Fri, 5 Jan 2024 10:20:26 +0000 (10:20 +0000)] 
Merge branch 'fixvtlesscrash' into 'main'

ply-terminal: Fix crash on vt-less kernels when checking the enabled state

See merge request plymouth/plymouth!298

21 months agorenderers: Only call ply_terminal_set_unbuffered_input when there is a terminal
nerdopolis [Fri, 5 Jan 2024 02:42:28 +0000 (21:42 -0500)] 
renderers: Only call ply_terminal_set_unbuffered_input when there is a terminal

21 months agoply-terminal: Fix crash on vt-less kernels when checking the enabled state
nerdopolis [Fri, 5 Jan 2024 02:06:50 +0000 (21:06 -0500)] 
ply-terminal: Fix crash on vt-less kernels when checking the enabled state

21 months agoMerge branch 'fix-hidpi-on-freetype' into 'main' 24.004.60
Ray Strode [Thu, 4 Jan 2024 21:08:14 +0000 (21:08 +0000)] 
Merge branch 'fix-hidpi-on-freetype' into 'main'

label-freetype: Fix rowstride bug with hidpi displays

See merge request plymouth/plymouth!297

21 months agolabel-freetype: Force resize calculation when moving control
Ray Strode [Thu, 4 Jan 2024 21:05:40 +0000 (16:05 -0500)] 
label-freetype: Force resize calculation when moving control

When moving the label around we need to do a full recalculation
of the metrics, because the position is part of the computation.

21 months agolabel-freetype: Fix rowstride bug with hidpi displays
Ray Strode [Wed, 3 Jan 2024 21:24:50 +0000 (16:24 -0500)] 
label-freetype: Fix rowstride bug with hidpi displays

The freetype plugin correctly doubles the DPI on hidpi displays,
but fails to account for the doubled pixels in display's pixel buffer.

This commit adds a factor of 2 to the size and positioncomputations,
to hopefully fix a row stride and a positioning bug.

21 months agoMerge branch 'weblate-plymouth-master' into 'main'
Ray Strode [Thu, 4 Jan 2024 09:25:55 +0000 (09:25 +0000)] 
Merge branch 'weblate-plymouth-master' into 'main'

Translations update from Fedora Weblate

See merge request plymouth/plymouth!234

21 months agoTranslated using Weblate (Welsh)
Diogyn D [Fri, 13 Oct 2023 14:36:11 +0000 (16:36 +0200)] 
Translated using Weblate (Welsh)

Currently translated at 100.0% (7 of 7 strings)

Added translation using Weblate (Welsh)

Co-authored-by: Diogyn D <diogyn@tutanota.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/cy/
Translation: plymouth/main

21 months agoTranslated using Weblate (Galician)
Fran Diéguez [Fri, 13 Oct 2023 14:36:11 +0000 (16:36 +0200)] 
Translated using Weblate (Galician)

Currently translated at 100.0% (7 of 7 strings)

Added translation using Weblate (Galician)

Co-authored-by: Fran Diéguez <frandieguez@gnome.org>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/gl/
Translation: plymouth/main

21 months agoTranslated using Weblate (Dutch)
Philip Goto [Fri, 13 Oct 2023 14:36:11 +0000 (16:36 +0200)] 
Translated using Weblate (Dutch)

Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: Philip Goto <philip.goto@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/nl/
Translation: plymouth/main

21 months agoTranslated using Weblate (Czech)
Pavel Borecki [Fri, 13 Oct 2023 14:36:11 +0000 (16:36 +0200)] 
Translated using Weblate (Czech)

Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: Pavel Borecki <pavel.borecki@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/cs/
Translation: plymouth/main

21 months agoMerge branch 'fix-freetype-loading-bug' into 'main'
Ray Strode [Wed, 3 Jan 2024 21:24:44 +0000 (21:24 +0000)] 
Merge branch 'fix-freetype-loading-bug' into 'main'

label-freetype: Rework font loading

See merge request plymouth/plymouth!296

21 months agolabel-freetype: Rework font loading
Ray Strode [Wed, 3 Jan 2024 20:37:08 +0000 (15:37 -0500)] 
label-freetype: Rework font loading

There's currently this function, set_font_with_fallback, that
almost always gets called with a NULL first argument in the
initramfs, forcing the _with_fallback part of the function to
run.

It's a little strange to have a function with a chunk of code that
hardly ever runs. Furthermore there's a bug where the error variable
is left uninitialized in this case leading to the freetype plugin
sporadically failing to load the fallback font.

This commit reworks things to drop set_font_with_fallback, and just
call FT_New_Face directly in the caller. Fallbacks are handled
at the point where the font path is determined
(previously called query_fc_match, now called find_default_font_path.

21 months agoMerge branch 'fix-pango-hex-box-removal' into 'main'
Ray Strode [Wed, 3 Jan 2024 16:29:51 +0000 (16:29 +0000)] 
Merge branch 'fix-pango-hex-box-removal' into 'main'

label-pango: Try to fix up remove_hexboxes_from_pango_layout

See merge request plymouth/plymouth!295

21 months agolabel-pango: Try to fix up remove_hexboxes_from_pango_layout
Ray Strode [Tue, 2 Jan 2024 22:04:26 +0000 (17:04 -0500)] 
label-pango: Try to fix up remove_hexboxes_from_pango_layout

There are a few issues with the remove_hexboxes_from_pango_layout
function, where it's getting offsets wrong and things like that.

This commit changes the approach entirely. Rather than modifying
the text to remove characters without font converage, it just
changes out the glyphs for those characters to be white boxes.

21 months agoply-utils: Make ply_utf8_character_get_byte_type detect invalid bytes
Ray Strode [Wed, 3 Jan 2024 14:53:50 +0000 (09:53 -0500)] 
ply-utils: Make ply_utf8_character_get_byte_type detect invalid bytes

Somehow I neglected to make ply_utf8_character_get_byte_type
differentiate between valid and invalid utf-8.

This commit fixes that.

21 months agoMerge branch 'dont-set-keyboard-mode-so-much' into 'main'
Ray Strode [Wed, 3 Jan 2024 00:56:21 +0000 (00:56 +0000)] 
Merge branch 'dont-set-keyboard-mode-so-much' into 'main'

ply-terminal: Only set keyboard mode when changing it

See merge request plymouth/plymouth!294

21 months agoply-terminal: Only set keyboard mode when changing it
Ray Strode [Tue, 2 Jan 2024 03:04:21 +0000 (22:04 -0500)] 
ply-terminal: Only set keyboard mode when changing it

Setting the console keyboard mode is not entirely idempotent.
The kernel may flush the input buffer leading to lost
key strokes. We currently set the mode explicitly on graphics
updates as part of our more general "fix things up in case
something during boot screws with the terminal settings" code.

That leads to keystrokes getting eaten.

This commit makes the terminal more careful about setting the
keyboard mode. It now only changes it when plymouth thinks its
necessary to do so.

In the future we could query the keyboard mode and reset it
when it's wrong, but I think we should hold off on doing that
until shown we need to.

21 months agoMerge branch 'more-keyboard-debugging' into 'main'
Ray Strode [Tue, 2 Jan 2024 03:24:26 +0000 (03:24 +0000)] 
Merge branch 'more-keyboard-debugging' into 'main'

ply-keyboard: Add a little mode debug logging

See merge request plymouth/plymouth!293

21 months agoply-keyboard: Add a little mode debug logging
Ray Strode [Tue, 2 Jan 2024 02:32:48 +0000 (21:32 -0500)] 
ply-keyboard: Add a little mode debug logging

It seems like the terminal fd is getting read from multiple
consumers, so add a little more logging to see if it's happening
in the keyboard code.

21 months agoMerge branch 'debug-key-events' into 'main'
Ray Strode [Mon, 1 Jan 2024 21:23:06 +0000 (21:23 +0000)] 
Merge branch 'debug-key-events' into 'main'

ply-keyboard: Add new plymouth.debug-key-events option

See merge request plymouth/plymouth!292

21 months agoply-keyboard: Add new plymouth.debug-key-events option
Ray Strode [Mon, 1 Jan 2024 19:40:08 +0000 (14:40 -0500)] 
ply-keyboard: Add new plymouth.debug-key-events option

We're currently facing a bug where keys have to be hit several
times to register for a user.

In order to make traction on that problem, this commit adds a
new plymouth.debug-key-events kernel command line option
to report in more detail the keyboard events coming in from the
terminal.

22 months agoMerge branch 'rework-renderer-terminal-input-handling' into 'main'
Ray Strode [Sat, 30 Dec 2023 16:19:57 +0000 (16:19 +0000)] 
Merge branch 'rework-renderer-terminal-input-handling' into 'main'

renderers: Rework input handling a little

See merge request plymouth/plymouth!291

22 months agorenderers: Rework input handling a little
Ray Strode [Sat, 30 Dec 2023 14:52:37 +0000 (09:52 -0500)] 
renderers: Rework input handling a little

We don't need to flush the terminal input buffer on key events from
the renderers, because the terminal does that itself.

Also, we should disable the terminal input when a /dev/input
device is added instead of relying on it happening the next flush
period.

Finally, we should make sure the terminal gets reenabled on close,
just so we clean up after ourselves.

22 months agoMerge branch 'add-terminal-logging' into 'main'
Ray Strode [Sat, 30 Dec 2023 14:05:15 +0000 (14:05 +0000)] 
Merge branch 'add-terminal-logging' into 'main'

ply-terminal: Log when terminal input gets enabled/disabled

See merge request plymouth/plymouth!290

22 months agoply-terminal: Log when terminal input gets enabled/disabled
Ray Strode [Sat, 30 Dec 2023 13:53:03 +0000 (08:53 -0500)] 
ply-terminal: Log when terminal input gets enabled/disabled

We're currently seeing a bug where it seems like the terminal might
be getting intermittently disabled.

This commit adds some logging to confirm or rule out that possibility.

22 months agoMerge branch 'initialize-line-dimensions' into 'main'
Ray Strode [Fri, 29 Dec 2023 14:31:35 +0000 (14:31 +0000)] 
Merge branch 'initialize-line-dimensions' into 'main'

label-freetype: Initialize line dimensions to 0

See merge request plymouth/plymouth!289

22 months agolabel-freetype: Initialize line dimensions to 0
Ray Strode [Fri, 29 Dec 2023 14:16:59 +0000 (09:16 -0500)] 
label-freetype: Initialize line dimensions to 0

Now that we can print the line dimensions, we should
initialize them to zero.

22 months agoMerge branch 'debug-escape-sequences' into 'main'
Ray Strode [Fri, 29 Dec 2023 01:22:54 +0000 (01:22 +0000)] 
Merge branch 'debug-escape-sequences' into 'main'

ply-terminal-emulator: Add way to see escape sequences

See merge request plymouth/plymouth!288

22 months agoply-terminal-emulator: Add way to see escape sequences
Ray Strode [Wed, 27 Dec 2023 19:46:31 +0000 (14:46 -0500)] 
ply-terminal-emulator: Add way to see escape sequences

This commit adds a new kernel command line option
plymouth.debug-escape-sequences that makes escape sequences stay
unparsed and instead get printed on the screen.

22 months agoMerge branch 'show-label-dimensions' into 'main'
Ray Strode [Fri, 29 Dec 2023 01:21:50 +0000 (01:21 +0000)] 
Merge branch 'show-label-dimensions' into 'main'

label: Put dimensions of text in log

See merge request plymouth/plymouth!287

22 months agolabel: Put dimensions of text in log
Ray Strode [Fri, 29 Dec 2023 00:42:15 +0000 (19:42 -0500)] 
label: Put dimensions of text in log

This just helps with debugging.

22 months agoMerge branch 'measure-hidden-freetype-labels' into 'main'
Ray Strode [Thu, 28 Dec 2023 19:08:24 +0000 (19:08 +0000)] 
Merge branch 'measure-hidden-freetype-labels' into 'main'

label-freetype: Measure control even if hidden

See merge request plymouth/plymouth!286

22 months agolabel-freetype: Measure control even if hidden
Ray Strode [Thu, 28 Dec 2023 19:01:05 +0000 (14:01 -0500)] 
label-freetype: Measure control even if hidden

Sometimes we want to query the size of hidden labels too, so
it's important we still compute the size, even if hidden.

22 months agoRevert "ply-utils: Use lstat instead of stat for ply_file_exists"
Ray Strode [Thu, 28 Dec 2023 19:05:36 +0000 (14:05 -0500)] 
Revert "ply-utils: Use lstat instead of stat for ply_file_exists"

This reverts commit e989867f4871bba564cd5dcc0de64da8ead36058.

I had stat/lstat momentarily crossed in my brain

22 months agoMerge branch 'freetype-metrics-fix' into 'main'
Ray Strode [Thu, 28 Dec 2023 18:44:18 +0000 (18:44 +0000)] 
Merge branch 'freetype-metrics-fix' into 'main'

label-freetype: Ensure font metrics are up to date when querying dimensions

See merge request plymouth/plymouth!285

22 months agolabel-freetype: Ensure font metrics are up to date when querying dimensions
Ray Strode [Thu, 28 Dec 2023 18:28:46 +0000 (13:28 -0500)] 
label-freetype: Ensure font metrics are up to date when querying dimensions

If code calls ply_label_get_width without ply_label_show or some other
call that forces the dimensions to be computed first, then the returned
width will be wrong.

This commit makes the freetype plugin look more like the pango plugin
where the size will computed on demand when querying the width, if
necessary.

22 months agoMerge branch 'freetype-font-debugging' into 'main'
Ray Strode [Thu, 28 Dec 2023 17:32:15 +0000 (17:32 +0000)] 
Merge branch 'freetype-font-debugging' into 'main'

Improve font loading error debug messages in freetype plugin

See merge request plymouth/plymouth!284

22 months agolabel-freetype: Log font loading error
Ray Strode [Thu, 28 Dec 2023 17:17:10 +0000 (12:17 -0500)] 
label-freetype: Log font loading error

Right now if there's an error loading a font we quietly just
proceed.

This commit adds a debug log message saying what the error is.

22 months agolabel-freetype: Don't bother loading fallback font if it doesn't exist
Ray Strode [Thu, 28 Dec 2023 17:15:20 +0000 (12:15 -0500)] 
label-freetype: Don't bother loading fallback font if it doesn't exist

If the fallback font doesn't exist, we shouldn't even try to load it,
there's no point.

Instead, put a nice error in the log.

22 months agoply-utils: Use lstat instead of stat for ply_file_exists
Ray Strode [Thu, 28 Dec 2023 17:10:57 +0000 (12:10 -0500)] 
ply-utils: Use lstat instead of stat for ply_file_exists

If a file is a symlink, we usually want to follow it, so
testing the symlink itself, is less than optimal.

This commit switches to lstat instead of stat.

22 months agoMerge branch 'pango-console-viewer-fixes' into 'main'
Ray Strode [Thu, 28 Dec 2023 16:54:10 +0000 (16:54 +0000)] 
Merge branch 'pango-console-viewer-fixes' into 'main'

console viewer fixes with the pango label plugin

See merge request plymouth/plymouth!283

22 months agoply-console-viewer: Make free function NULL safe
Ray Strode [Thu, 28 Dec 2023 16:51:09 +0000 (11:51 -0500)] 
ply-console-viewer: Make free function NULL safe

22 months agolabel-pango: Pass explicit width when computing height
Ray Strode [Thu, 28 Dec 2023 16:35:51 +0000 (11:35 -0500)] 
label-pango: Pass explicit width when computing height

pango will give a height that's several orders of magnitude too
big sometimes when the width is -1.

This commit checks for -1, explicitly measures the width first, and
remeasures with that width passed in to compute the height.

22 months agoply-console-viewer: Disallow zero lines
Ray Strode [Thu, 28 Dec 2023 16:35:10 +0000 (11:35 -0500)] 
ply-console-viewer: Disallow zero lines

A logic error meant the console viewer can end up being zero lines.

This commit fixes that.

22 months agolabel-pango: Fix inverted conditional
Ray Strode [Thu, 28 Dec 2023 15:53:02 +0000 (10:53 -0500)] 
label-pango: Fix inverted conditional

Right now we skip sizing the control when force == true because
of an inverted conditional.

This commit fixes that.

22 months agoply-console-viewer: Fix typo
Ray Strode [Thu, 28 Dec 2023 15:03:05 +0000 (10:03 -0500)] 
ply-console-viewer: Fix typo

The last commit had a typo where it would never prefer console viewer.

This commit fixes that.

22 months agoMerge branch 'console-viewer-crasher-fix' into 'main'
Ray Strode [Thu, 28 Dec 2023 15:01:18 +0000 (15:01 +0000)] 
Merge branch 'console-viewer-crasher-fix' into 'main'

ply-console-viewer: Handle fonts failing to load better

See merge request plymouth/plymouth!282

22 months agotwo-step: Be more tolerant when there's no console viewer
Ray Strode [Thu, 28 Dec 2023 14:31:08 +0000 (09:31 -0500)] 
two-step: Be more tolerant when there's no console viewer

There are still a number of places in the code where a console
viewer is expected, when it's totally possible that there won't
be one.

This commit runs through them, and does a few other style
cleanups on the way.

22 months agospace-flares: Be more tolerant when there's no console viewer
Ray Strode [Thu, 28 Dec 2023 14:31:08 +0000 (09:31 -0500)] 
space-flares: Be more tolerant when there's no console viewer

There are still a number of places in the code where a console
viewer is expected, when it's totally possible that there won't
be one.

This commit runs through them, and does a few other style
cleanups on the way.

22 months agofade-throbber: Be more tolerant when there's no console viewer
Ray Strode [Thu, 28 Dec 2023 14:31:08 +0000 (09:31 -0500)] 
fade-throbber: Be more tolerant when there's no console viewer

There are still a number of places in the code where a console
viewer is expected, when it's totally possible that there won't
be one.

This commit runs through them, and does a few other style
cleanups on the way.

22 months agoply-console-viewer: Handle fonts failing to load better
Ray Strode [Thu, 28 Dec 2023 13:03:03 +0000 (08:03 -0500)] 
ply-console-viewer: Handle fonts failing to load better

Right now we divide by zero if the font metrics can't be determined
and tank.

This commit attempts to detect the situation and fall back to using
kernel fb console in that case.

22 months agoMerge branch 'catch-sigfpe' into 'main'
Ray Strode [Thu, 28 Dec 2023 13:05:22 +0000 (13:05 +0000)] 
Merge branch 'catch-sigfpe' into 'main'

main: Catch floating point exceptions in crasher handler too

See merge request plymouth/plymouth!281

22 months agomain: Catch floating point exceptions in crasher handler too
Ray Strode [Thu, 28 Dec 2023 12:48:43 +0000 (07:48 -0500)] 
main: Catch floating point exceptions in crasher handler too

Right now we catch the two big types of crashes:

1. Segmentation fault
2. Assertion failure

But we don't catch another common type, "Divide by zero"

This commit fixes that.

22 months agoMerge branch 'fix-xkb-crash' into 'main'
Ray Strode [Wed, 27 Dec 2023 22:02:36 +0000 (22:02 +0000)] 
Merge branch 'fix-xkb-crash' into 'main'

ply-device-manager: Handle XKB failing to load more gracefully

See merge request plymouth/plymouth!280

22 months agoply-device-manager: Handle XKB failing to load more gracefully
Ray Strode [Wed, 27 Dec 2023 21:36:52 +0000 (16:36 -0500)] 
ply-device-manager: Handle XKB failing to load more gracefully

Right now we always assume `xkb_context_new` will succeed.

This isn't necessarily true. If it fails, we shouldn't crash.

This commit fixes that.

22 months agoMerge branch 'print-backtraces' into 'main'
Ray Strode [Wed, 27 Dec 2023 21:39:27 +0000 (21:39 +0000)] 
Merge branch 'print-backtraces' into 'main'

main: Print backtrace on crash

See merge request plymouth/plymouth!279

22 months agomain: Print backtrace on crash
Ray Strode [Wed, 27 Dec 2023 21:30:15 +0000 (16:30 -0500)] 
main: Print backtrace on crash

Since plymouth can crash before the root filesystem is mounted,
and since plymouth can prevent boot from proceeding, coredumpctl
isn't always a viable option for getting backtraces.

This commit changes the crash handler to output backtrace
information to assist when coredumpctl can't.

22 months agoMerge branch 'fix-freetype-crash' into 'main'
Ray Strode [Wed, 27 Dec 2023 20:18:35 +0000 (20:18 +0000)] 
Merge branch 'fix-freetype-crash' into 'main'

label-freetype: Handle font failing to load more gracefully

See merge request plymouth/plymouth!276

22 months agolabel-freetype: Fix loading debug message
Ray Strode [Tue, 26 Dec 2023 18:27:36 +0000 (13:27 -0500)] 
label-freetype: Fix loading debug message

The freetype plugin was calling printf instead of ply-trace when
a font failed to load. Also, it didnt list the failure reason.

This commit fixes things up a bit.

22 months agolabel-freetype: Handle font failing to load more gracefully
Ray Strode [Tue, 26 Dec 2023 18:20:39 +0000 (13:20 -0500)] 
label-freetype: Handle font failing to load more gracefully

We currently crash if the font fails to load.

This commit attempts to handle the situation more gracefully.

22 months agoMerge branch 'fix-console-viewer-crash' into 'main'
Ray Strode [Wed, 27 Dec 2023 19:53:42 +0000 (19:53 +0000)] 
Merge branch 'fix-console-viewer-crash' into 'main'

fade-throbber,space-flares,two-step: Don't crash if no console viewer

See merge request plymouth/plymouth!278

22 months agofade-throbber,space-flares,two-step: Don't crash if no console viewer
Ray Strode [Wed, 27 Dec 2023 19:50:09 +0000 (14:50 -0500)] 
fade-throbber,space-flares,two-step: Don't crash if no console viewer

The splash plugins don't create a console viewer if
`plymouth.prefer-fbcon` is on the kernel command line, but expect it
to be not NULL regardless.

This commit corrects that misconception.

22 months agoMerge branch 'fall-back-to-text-faster' into 'main' 23.360.11
Ray Strode [Tue, 26 Dec 2023 11:37:01 +0000 (11:37 +0000)] 
Merge branch 'fall-back-to-text-faster' into 'main'

ply-device-manager: Fall back to text plugin if no renderers installed

See merge request plymouth/plymouth!275

22 months agoply-device-manager: Fall back to text plugin if no renderers installed
Ray Strode [Tue, 26 Dec 2023 01:20:31 +0000 (20:20 -0500)] 
ply-device-manager: Fall back to text plugin if no renderers installed

If there's no renderers installed there's no point in continuing to
listen for DRM events and trying to load the drm plugin.

This commit just forces text mode right away in that case.

22 months agoMerge branch 'font-fix' into 'main'
Ray Strode [Tue, 26 Dec 2023 00:05:11 +0000 (00:05 +0000)] 
Merge branch 'font-fix' into 'main'

Fix checks for existence of vars set by fc-match

See merge request plymouth/plymouth!274

22 months agoFix checks for existence of vars set by fc-match
Adam Williamson [Mon, 25 Dec 2023 22:48:27 +0000 (14:48 -0800)] 
Fix checks for existence of vars set by fc-match

The first line here checked for the wrong variable and is a dupe
from two lines earlier anyway, and the second line isn't guarded
at all, which seems to cause the weird failure we've been seeing
in openQA testing.

Also add a couple more existence checks for the same variables
later.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
22 months agoplymouth-populate-initrd: More dependency softification
Ray Strode [Mon, 25 Dec 2023 20:24:29 +0000 (15:24 -0500)] 
plymouth-populate-initrd: More dependency softification

This commit makes lack of fc-match less noisy and makes
compose.dir from libX11 be optional as well.

22 months agoMerge branch 'make-deps-less-hard' into 'main'
Ray Strode [Mon, 25 Dec 2023 19:47:06 +0000 (19:47 +0000)] 
Merge branch 'make-deps-less-hard' into 'main'

plymouth-populate-initrd: Handle xkb and fontconfig not being installed

See merge request plymouth/plymouth!273

22 months agoplymouth-populate-initrd: Handle xkb and fontconfig not being installed
Ray Strode [Mon, 25 Dec 2023 19:42:53 +0000 (14:42 -0500)] 
plymouth-populate-initrd: Handle xkb and fontconfig not being installed

Some minimal installs won't have fontconfig or xkb. In those cases,
the script should continue to work even if the initramfs will be
less featureful.

This commit fixes that.

22 months agoMerge branch 'fix-usage-message' into 'main'
Ray Strode [Mon, 25 Dec 2023 16:12:59 +0000 (16:12 +0000)] 
Merge branch 'fix-usage-message' into 'main'

plymouth-populate-initrd: Fix usage message

See merge request plymouth/plymouth!272

22 months agoplymouth-populate-initrd: Fix usage message
Ray Strode [Mon, 25 Dec 2023 16:07:47 +0000 (11:07 -0500)] 
plymouth-populate-initrd: Fix usage message

It currently says the scripts name is `plymouth` not
`plymouth-populate-initrd`.

This commit changes it to use $0

22 months agoMerge branch 'meson-systemd-integration' into 'main'
Ray Strode [Mon, 25 Dec 2023 13:29:25 +0000 (13:29 +0000)] 
Merge branch 'meson-systemd-integration' into 'main'

meson: Fix PLY_ENABLE_SYSTEMD_INTEGRATION define

See merge request plymouth/plymouth!271

22 months agomeson: Fix PLY_ENABLE_SYSTEMD_INTEGRATION define
Balló György [Mon, 25 Dec 2023 13:29:25 +0000 (13:29 +0000)] 
meson: Fix PLY_ENABLE_SYSTEMD_INTEGRATION define

22 months agoMerge branch 'fix-label-crasher' into 'main' 23.358.4
Ray Strode [Sun, 24 Dec 2023 20:48:47 +0000 (20:48 +0000)] 
Merge branch 'fix-label-crasher' into 'main'

ply-label: Make NULL safe (again)

See merge request plymouth/plymouth!270

22 months agoply-label: Make NULL safe (again)
Ray Strode [Fri, 22 Dec 2023 13:27:30 +0000 (08:27 -0500)] 
ply-label: Make NULL safe (again)

commit a045f01568f53ca10ef8b76d9f507ccd3546e9d8 tried to make ply-label
NULL safe, but missed a strdup.

This commit fixes that.

22 months agoMerge branch 'input-device-crasher' into 'main'
Ray Strode [Sun, 24 Dec 2023 20:46:28 +0000 (20:46 +0000)] 
Merge branch 'input-device-crasher' into 'main'

ply-input-device: Fix crasher

See merge request plymouth/plymouth!269

22 months agoply-input-device: Fix crasher
Ray Strode [Sun, 24 Dec 2023 20:27:49 +0000 (15:27 -0500)] 
ply-input-device: Fix crasher

If we have an error during early input device initialization we
can blow assertion because we may try to cleave it from the event
loop it is not yet attached to.

This commit fixes that.

22 months agogenerate-version: Use day number instead of week number 23.356.9
Ray Strode [Fri, 22 Dec 2023 16:29:12 +0000 (11:29 -0500)] 
generate-version: Use day number instead of week number

Right now the version is generated from week number but that
means more than one release in a week won't work.

This commit changes it to day number.

22 months agoMerge branch 'main' into 'main'
Ray Strode [Fri, 22 Dec 2023 16:22:14 +0000 (16:22 +0000)] 
Merge branch 'main' into 'main'

main: fix out of bounds write

See merge request plymouth/plymouth!265

22 months agomain: Fix out of bounds write
Ray Strode [Fri, 22 Dec 2023 15:12:32 +0000 (10:12 -0500)] 
main: Fix out of bounds write

There's currently an out of bounds write when copying dmesg to to
the boot buffer.

This is because there's a newline and a terminating NUL and only
one of the two was being accounted for.

This commit fixes the problem by dropping strcat/strcpy and using
printf style functions instead.

Spotted by Ilya K.

22 months agoMerge branch 'fix-generate-version' into 'main'
Ray Strode [Fri, 22 Dec 2023 15:46:55 +0000 (15:46 +0000)] 
Merge branch 'fix-generate-version' into 'main'

generate-version: Fix script inside of a tarball

Closes #232

See merge request plymouth/plymouth!268

22 months agogenerate-version: Fix script inside of a tarball
Ray Strode [Fri, 22 Dec 2023 15:18:59 +0000 (10:18 -0500)] 
generate-version: Fix script inside of a tarball

The heuristic to check whether or not we're inside of a git checkout
or a tarball isn't working properly.

This commit changes it to use git rev-parse --is-inside-git-dir which
is pretty specifically designed for this use case.

Closes: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/232
22 months agoMerge branch 'fix-keymap-memory-leak' into 'main'
Ray Strode [Fri, 22 Dec 2023 14:50:08 +0000 (14:50 +0000)] 
Merge branch 'fix-keymap-memory-leak' into 'main'

ply-keymap-icon: Fix memory leak

See merge request plymouth/plymouth!267

22 months agoply-keymap-icon: Fix memory leak
Ray Strode [Fri, 22 Dec 2023 13:41:30 +0000 (08:41 -0500)] 
ply-keymap-icon: Fix memory leak

It seems like there's a memory leak with the keymap icon text if
there isn't a hit.

This commit fixes that, and renames some of the variables to make
it a little clearer what's going on

22 months agoMerge branch 'handle-null-better' into 'main'
Ray Strode [Fri, 22 Dec 2023 13:42:41 +0000 (13:42 +0000)] 
Merge branch 'handle-null-better' into 'main'

ply-label: Make NULL safe

See merge request plymouth/plymouth!266

22 months agoply-label: Make NULL safe
Ray Strode [Fri, 22 Dec 2023 13:27:30 +0000 (08:27 -0500)] 
ply-label: Make NULL safe

commit 42d07913a0b72b8607190ab31931d5460765f589 made the pango plugin
NULL safe but the same problem exists in the freetype plugin.

This commit makes things NULL safe a layer higher.

22 months agoMerge branch 'revamp-freetype-plugin' into 'main' 23.51.283
Ray Strode [Tue, 19 Dec 2023 19:32:45 +0000 (19:32 +0000)] 
Merge branch 'revamp-freetype-plugin' into 'main'

label-freetype: Revamp to work better

See merge request plymouth/plymouth!264

22 months agolabel-freetype: Revamp to work better
Ray Strode [Mon, 18 Dec 2023 18:48:42 +0000 (13:48 -0500)] 
label-freetype: Revamp to work better

Recent changes to the freetype plugin made it quite buggy. There
was an infinite loop bug, and also a failure in metrics handling.

There's also a number of outstanding issues:

1. Kerning is not properly applied
2. hidpi displays don't render correctly

Rather than try to tackle all of these problems in a peicemeal way,
this commit substantially reworks the code.

It introduces a ply_freetype_unit_t type for more clearly managing
the fixed point math freetype requires. This type relies on less
than well defined compiler behavior, however, so it may cause issues
down the road.

It consolidates measuring and drawing code to one function, since in
both cases, the same computation needs to happen, and they had
slightly divergent implementations before.

It consolidates font loading code, so we don't end up with two
different font face loading routines, with different dpi values.

It also changes the names of some variables to be clearer in my
mind (like changing the loaded glyph to the name "glyph" instead
of the name "slot")

22 months agoply-console-viewer: Don't crash if passed a NULL format
Ray Strode [Mon, 18 Dec 2023 13:52:00 +0000 (08:52 -0500)] 
ply-console-viewer: Don't crash if passed a NULL format

The splash plugins currently call

ply_console_viewer_print (... NULL);

if no prompt message is specified... This leads to crash.

Rather than fixing all the splash plugins, this commit just makes
a NULL format be a noop.

22 months agoMerge branch 'synchronize-display-updates' into 'main'
Ray Strode [Sun, 17 Dec 2023 15:05:23 +0000 (15:05 +0000)] 
Merge branch 'synchronize-display-updates' into 'main'

ply-boot-splash: Flush display updates at fixed framerate

See merge request plymouth/plymouth!263

22 months agoply-boot-splash: Flush display updates at fixed framerate
Ray Strode [Sun, 17 Dec 2023 12:50:19 +0000 (07:50 -0500)] 
ply-boot-splash: Flush display updates at fixed framerate

At the moment the splash plugins have a lot of leeway when
updates can go to the screen. They can pause and unpause
updates by themselves, and draw at any point.

This rope has a little too much slack, it's actually kind
of complicated for the splash plugins to manage drawing
when they have more than one moving part.

For instance, a spinner animation may be drawing autonomously
from the splash plugin itself. To avoid flicker, everything
needs to be synchronized.

This commit adds that synchronization a layer higher than
the plugins themselves, in ply-boot-splash. It accumulates
drawing updates continuously without doing any drawing, until
a given deadline, then flushes the updates out all at once.