]> git.ipfire.org Git - thirdparty/plymouth.git/log
thirdparty/plymouth.git
2 years agowip! label-pango: Parse escape sequences in input parsekmsg
Ray Strode [Thu, 1 Jun 2023 17:04:10 +0000 (13:04 -0400)] 
wip! label-pango: Parse escape sequences in input

This commit starts to sketch out how color escape sequences could
be turned to actual colors in the label.

It's untested.

2 years agowip! Add ply-terminal-buffer object
Ray Strode [Fri, 5 May 2023 20:22:11 +0000 (16:22 -0400)] 
wip! Add ply-terminal-buffer object

We're going to need to do at least basic parsing of terminal text
so we can show the console to the user in color when they hit
escape and VTs are disabled.

This commit adds the start of a class to do this basic parsing.

The way it works is the terminal text is inject into the object
and all escape sequences are filtered out. When a color control
sequence is found, the current color is noted, along with which
characters it applies to. A list of the text spans and their
color attributes is then iteratable using a an api.

2 years agoscript: Use new interfaces in ply-boot-splash for ply-kmsg-reader, and use ply-kmsg...
n3rdopolis [Mon, 20 Mar 2023 02:43:11 +0000 (22:43 -0400)] 
script: Use new interfaces in ply-boot-splash for ply-kmsg-reader, and use ply-kmsg-viewer to display the boot messages

2 years agospace-flares: Use new interfaces in ply-boot-splash for ply-kmsg-reader, and use...
n3rdopolis [Mon, 20 Mar 2023 02:42:41 +0000 (22:42 -0400)] 
space-flares: Use new interfaces in ply-boot-splash for ply-kmsg-reader, and use ply-kmsg-viewer to display the boot messages

2 years agofade-throbber: Use new interfaces in ply-boot-splash for ply-kmsg-reader, and use...
n3rdopolis [Mon, 20 Mar 2023 02:42:14 +0000 (22:42 -0400)] 
fade-throbber: Use new interfaces in ply-boot-splash for ply-kmsg-reader, and use ply-console-viewer to display messages

2 years agotwo-step: Use new interfaces in ply-boot-splash for ply-kmsg-reader, and use ply...
n3rdopolis [Mon, 20 Mar 2023 02:41:51 +0000 (22:41 -0400)] 
two-step: Use new interfaces in ply-boot-splash for ply-kmsg-reader, and use ply-console-viewer to display messages

2 years agolibply-splash-graphics: Introduce new ply-console-viewer control
n3rdopolis [Mon, 20 Mar 2023 02:41:32 +0000 (22:41 -0400)] 
libply-splash-graphics: Introduce new ply-console-viewer control

2 years agoply-label: Add ply_label_set_hex_color () based off of ply_pixel_buffer_fill_with_hex...
n3rdopolis [Mon, 20 Mar 2023 02:40:52 +0000 (22:40 -0400)] 
ply-label: Add ply_label_set_hex_color () based off of ply_pixel_buffer_fill_with_hex_color for configuration of label text colors

2 years agomain: Use new integrations in ply-boot-splash and start ply-kmsg-reader
n3rdopolis [Mon, 20 Mar 2023 02:40:18 +0000 (22:40 -0400)] 
main: Use new integrations in ply-boot-splash and start ply-kmsg-reader

2 years agoIntroduce ply-terminal-emulator to handle parsing lines from /dev/console
nerdopolis [Sun, 28 May 2023 01:22:32 +0000 (21:22 -0400)] 
Introduce ply-terminal-emulator to handle parsing lines from /dev/console

2 years agoply-list: Introduce ply_list_node_set_data
nerdopolis [Wed, 31 May 2023 02:18:45 +0000 (22:18 -0400)] 
ply-list: Introduce ply_list_node_set_data

2 years agoIntroduce ply-kmsg-reader to read kernel log messages from /dev/kmsg
n3rdopolis [Mon, 20 Mar 2023 02:38:26 +0000 (22:38 -0400)] 
Introduce ply-kmsg-reader to read kernel log messages from /dev/kmsg

2 years agoply-utils: Add ply_utf8_string_get_substring_range () to split UTF-8 strings at a...
n3rdopolis [Mon, 20 Mar 2023 02:39:12 +0000 (22:39 -0400)] 
ply-utils: Add ply_utf8_string_get_substring_range () to split UTF-8 strings at a number character, to a specified range

2 years agolabel-freetype: Support monospaced fonts
n3rdopolis [Tue, 2 May 2023 21:03:03 +0000 (17:03 -0400)] 
label-freetype: Support monospaced fonts

2 years agolabel-freetype: Allow the label size to be set when hidden
nerdopolis [Mon, 8 May 2023 23:24:19 +0000 (19:24 -0400)] 
label-freetype: Allow the label size to be set when hidden

2 years agolabel-freetype: Fix uncrustify
nerdopolis [Tue, 9 May 2023 23:34:14 +0000 (19:34 -0400)] 
label-freetype: Fix uncrustify

2 years agopopulate-initrd: Ensure a monospace font is in the initrd, along with fonts defined...
n3rdopolis [Fri, 9 Dec 2022 18:07:36 +0000 (13:07 -0500)] 
populate-initrd: Ensure a monospace font is in the initrd, along with fonts defined in the theme.

2 years agoMerge branch 'fixnumpadreturn' into 'main'
Ray Strode [Thu, 4 May 2023 12:57:04 +0000 (12:57 +0000)] 
Merge branch 'fixnumpadreturn' into 'main'

ply-input-device: Handle the "Enter" key on the numpad correctly.

See merge request plymouth/plymouth!236

2 years agoply-input-device: Handle the "Enter" key on the numpad correctly.
nerdopolis [Thu, 4 May 2023 12:38:06 +0000 (08:38 -0400)] 
ply-input-device: Handle the "Enter" key on the numpad correctly.

2 years agoMerge branch 'tt-x11-periodically-handle-events' into 'main'
Ray Strode [Mon, 1 May 2023 17:04:11 +0000 (17:04 +0000)] 
Merge branch 'tt-x11-periodically-handle-events' into 'main'

x11: periodically handle gtk events

Closes #190

See merge request plymouth/plymouth!230

2 years agox11: periodically handle gtk events
Timo Teräs [Wed, 22 Mar 2023 11:46:41 +0000 (13:46 +0200)] 
x11: periodically handle gtk events

GTK main loop needs to be called periodically to handle
any idle and timer based events which do not trigger via fd.

fixes #190

2 years agoMerge branch 'boot-log-option' into 'main'
Ray Strode [Sat, 29 Apr 2023 15:36:16 +0000 (15:36 +0000)] 
Merge branch 'boot-log-option' into 'main'

Add new option to set boot log file

See merge request plymouth/plymouth!235

2 years agoAdd new option to set boot log file
Balló György [Sat, 29 Apr 2023 15:36:16 +0000 (15:36 +0000)] 
Add new option to set boot log file

2 years agoMerge branch 'tt-script-hotplug' into 'main'
Ray Strode [Wed, 22 Mar 2023 13:17:37 +0000 (13:17 +0000)] 
Merge branch 'tt-script-hotplug' into 'main'

script: handle display hotplug

Closes #186

See merge request plymouth/plymouth!232

2 years ago script: handle display hotplug
Timo Teräs [Wed, 22 Mar 2023 11:54:39 +0000 (13:54 +0200)] 
 script: handle display hotplug

- Fix script plugin to handle monitor hotplug events

- Expose Plymouth.SetDisplayHotplugFunction to set script callback
  after display hotplug

fixes #186

2 years agoMerge branch 'tt-fixes' into 'main'
Ray Strode [Wed, 22 Mar 2023 13:14:52 +0000 (13:14 +0000)] 
Merge branch 'tt-fixes' into 'main'

Various fixes to script plugin

See merge request plymouth/plymouth!231

2 years agoscript: fix deletion of sprites after full refresh
Timo Teräs [Wed, 22 Mar 2023 11:49:47 +0000 (13:49 +0200)] 
script: fix deletion of sprites after full refresh

The node pointer is reused in the if (data->full_refresh) block
causing the following sprite list walking to fail. Fix this by
moving the sprite list first node getting next to the while loop
where it belongs.

2 years agoscript: fix script_lib_sprite_draw_area() if sprite_list is empty
Timo Teräs [Wed, 22 Mar 2023 11:49:41 +0000 (13:49 +0200)] 
script: fix script_lib_sprite_draw_area() if sprite_list is empty

The Sprite list may be empty under various conditions, cope with
this.

2 years agoscript: fix reference leak in script_evaluate_set()
Timo Teräs [Wed, 22 Mar 2023 11:49:33 +0000 (13:49 +0200)] 
script: fix reference leak in script_evaluate_set()

script_obj_hash_add_element() takes a new reference, so release
the reference returned by script_evaluate().

2 years agologger: snprintf needs #include <stdio.h>
Timo Teräs [Wed, 22 Mar 2023 11:49:25 +0000 (13:49 +0200)] 
logger: snprintf needs #include <stdio.h>

2 years agoMerge branch 'weblate-plymouth-master' into 'main'
Ray Strode [Wed, 22 Feb 2023 13:43:27 +0000 (13:43 +0000)] 
Merge branch 'weblate-plymouth-master' into 'main'

Translations update from Fedora Weblate

See merge request plymouth/plymouth!229

2 years agoTranslated using Weblate (Lithuanian)
mooo [Tue, 21 Feb 2023 22:20:28 +0000 (23:20 +0100)] 
Translated using Weblate (Lithuanian)

Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: mooo <hazap@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/lt/
Translation: plymouth/main

2 years agoTranslated using Weblate (Occidental)
Olga Smirnova [Tue, 21 Feb 2023 22:20:28 +0000 (23:20 +0100)] 
Translated using Weblate (Occidental)

Currently translated at 100.0% (7 of 7 strings)

Added translation using Weblate (Occidental)

Co-authored-by: Olga Smirnova <mistresssilvara@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/ie/
Translation: plymouth/main

2 years agoMerge branch 'removeunderscores' into 'main'
n3rdopolis [Tue, 24 Jan 2023 21:11:46 +0000 (21:11 +0000)] 
Merge branch 'removeunderscores' into 'main'

ply-device-manager: Change XKB_* variables from vconsole.conf to match systemd's

See merge request plymouth/plymouth!228

2 years agoply-device-manager: Change XKB_* variables from vconsole.conf to match systemd's
n3rdopolis [Tue, 24 Jan 2023 17:53:29 +0000 (12:53 -0500)] 
ply-device-manager: Change XKB_* variables from vconsole.conf to match systemd's

2 years agoMerge branch 'keep-it-on-the-dl' into 'main'
Ray Strode [Mon, 2 Jan 2023 17:35:08 +0000 (17:35 +0000)] 
Merge branch 'keep-it-on-the-dl' into 'main'

meson: Use dependency('dl') instead of cc.find_library('dl')

See merge request plymouth/plymouth!222

2 years agomeson: Use dependency('dl') instead of cc.find_library('dl')
Ray Strode [Thu, 1 Dec 2022 19:39:34 +0000 (14:39 -0500)] 
meson: Use dependency('dl') instead of cc.find_library('dl')

meson apparently has some built-in support for libdl, which
depending on libc implementations may or may not be in a separate
library from libc.

This commit changes meson.build to do things the "better" way.

2 years agoMerge branch 'plymouth-fixleds' into 'main'
Ray Strode [Mon, 2 Jan 2023 17:27:24 +0000 (12:27 -0500)] 
Merge branch 'plymouth-fixleds' into 'main'

ply-input-device: Don't skip setting LEDs on the device that a lock key was pressed on

See merge request plymouth/plymouth!227

2 years agoply-input-device: Ensure that the LED state is updated on the keyboard of which the...
n3rdopolis [Mon, 2 Jan 2023 16:57:21 +0000 (11:57 -0500)] 
ply-input-device: Ensure that the LED state is updated on the keyboard of which the lock key was pressed on

When a lock modifier is pressed, plymouth goes through some gymnastics
to ensure the LEDs on all attached keyboards are appropriately updated.

Unfortunately, an optimization in the code used to avoid redundant
updates of keyboards that already have the correct state is actually
preventing the initiating keyboard from getting its LEDs turned on.

This is because the initiating keyboard gets its state updated at
key press time before the LED handling code runs, thus making it
seem like that run is redundant.

This commit introduces a new state variable `leds_state_invalid`
on the input device to mark this situation and updates the optimization
check to also check the new variable.

Some contributions by Ray Strode.

2 years agoMerge branch 'more-dynamic-exports-than-marco-polo' into 'main' 189-feature-request-virtual-console-display
Ray Strode [Fri, 2 Dec 2022 01:25:59 +0000 (01:25 +0000)] 
Merge branch 'more-dynamic-exports-than-marco-polo' into 'main'

meson: Use export_dynmic: true instead of -rdynamic

See merge request plymouth/plymouth!223

2 years agomeson: Use export_dynmic: true instead of -rdynamic
Ray Strode [Fri, 2 Dec 2022 01:11:38 +0000 (20:11 -0500)] 
meson: Use export_dynmic: true instead of -rdynamic

It seems like specifying -rdynamic in meson cflags doesn't work
on some systems, but meson has a built in way of doing the same
thing:

export_dynamic: true

This commit switches over to the probably more right way of
achieving a working dlopen(NULL).

2 years agoMerge branch 'built-ins-are-dynamic' into 'main'
Ray Strode [Thu, 1 Dec 2022 19:31:39 +0000 (19:31 +0000)] 
Merge branch 'built-ins-are-dynamic' into 'main'

meson: Build plymouthd with -rdynamic

See merge request plymouth/plymouth!219

2 years agomeson: Build plymouthd with -rdynamic
Ray Strode [Thu, 1 Dec 2022 15:18:31 +0000 (10:18 -0500)] 
meson: Build plymouthd with -rdynamic

plymouthd needs to be built with -rdynamic so that the builtin
"details" plugin is loadable.

This commit adds the flag.

Related to #200

2 years agoMerge branch 'fix-input-crash' into 'main'
Ray Strode [Thu, 1 Dec 2022 19:26:02 +0000 (19:26 +0000)] 
Merge branch 'fix-input-crash' into 'main'

device-manager: Fix crash if XKB keymap could not be created

Closes #199

See merge request plymouth/plymouth!221

2 years agodevice-manager: Fix crash if XKB keymap could not be created
Ray Strode [Thu, 1 Dec 2022 19:18:39 +0000 (14:18 -0500)] 
device-manager: Fix crash if XKB keymap could not be created

This commit fixes a crash introduced in the last commit when an
xkb keymap can't be created.

Closes: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/199
2 years agoMerge branch 'uhh-actually-fix-tty-fallback' into 'main'
Ray Strode [Thu, 1 Dec 2022 18:57:09 +0000 (18:57 +0000)] 
Merge branch 'uhh-actually-fix-tty-fallback' into 'main'

device-manager: Actually fall back to reading from tty if no xkb layout specified

Closes #199

See merge request plymouth/plymouth!220

2 years agodevice-manager: Actually fall back to reading from tty if no xkb layout specified
Ray Strode [Wed, 30 Nov 2022 14:51:17 +0000 (09:51 -0500)] 
device-manager: Actually fall back to reading from tty if no xkb layout specified

Commit 7fcfcdf2d63025151a160f7948ee7406f0f16843 tried to fall back to
reading from a tty if no xkb layout was specified, but neglected to
actually check if no xkb layout was specified and force fall back to
reading from a tty in that case.

This commit changes device manager to actually disable reading from
/dev/input if the user doesn't specify a layout to use in vconsole.conf.

Closes https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/199

2 years agoMerge branch 'dont-assume-qwerty-us-layout' into 'main'
Ray Strode [Thu, 1 Dec 2022 15:35:52 +0000 (15:35 +0000)] 
Merge branch 'dont-assume-qwerty-us-layout' into 'main'

device-manager: Fall back to reading from tty if no xkb layout specified

Closes #199

See merge request plymouth/plymouth!218

2 years agodevice-manager: Fall back to reading from tty if no xkb layout specified
Ray Strode [Wed, 30 Nov 2022 14:51:17 +0000 (09:51 -0500)] 
device-manager: Fall back to reading from tty if no xkb layout specified

At the moment if a user doesn't specify a xkb layout in vconsole.conf we
just fall back to assuming a us qwerty layout.

This isn't really optimal, since it might not match the keyboard.
Furthermore, the tty does have a usable layout, so it makes more sense
to fall back to it.

This commit changes device manager to disable reading from /dev/input
if the user doesn't specify a layout to use in vconsole.conf.

Close https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/199

2 years agoMerge branch 'fix-check-format' into 'main'
Ray Strode [Tue, 29 Nov 2022 19:57:19 +0000 (19:57 +0000)] 
Merge branch 'fix-check-format' into 'main'

ci: Fix check-format

See merge request plymouth/plymouth!217

2 years agoci: Fix check-format
Ray Strode [Tue, 29 Nov 2022 19:46:08 +0000 (14:46 -0500)] 
ci: Fix check-format

In commit bb6580212d45f9ab0a459a9335aec2ff20818a6e we tried to stop
running check-format on debian. We did this by moving the check-format
details to its own map and then adding a "<<" merge key to only pull
it in on Fedora.

The Fedora map already has a "<<" merge key however for doing the actual
build.

It's not allowed for their to be two, and gitlab's ci just ignores
the second one.

This commit combines the merge keys into one.

2 years agoMerge branch 'reproducible-builds' into 'main'
Ray Strode [Tue, 29 Nov 2022 19:45:26 +0000 (19:45 +0000)] 
Merge branch 'reproducible-builds' into 'main'

meson: Generate version for reproducibility

Closes #188

See merge request plymouth/plymouth!216

2 years agomeson: Generate version for reproducibility
Ray Strode [Tue, 29 Nov 2022 19:26:43 +0000 (14:26 -0500)] 
meson: Generate version for reproducibility

Right now we call date directly from meson.build leading to
non-reproducible builds.

This commit makes it only call date when building from git,
otherwise it extracts the version from the tarball name.

script borrowed from accountsservice.

Closes https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/188

2 years agoMerge branch 'im-not-stuttering-its-just-broken' into 'main'
Ray Strode [Tue, 29 Nov 2022 18:35:30 +0000 (18:35 +0000)] 
Merge branch 'im-not-stuttering-its-just-broken' into 'main'

Fix double input probably on optimus hardware

Closes #197

See merge request plymouth/plymouth!215

2 years agoinput-device: Only allow one renderer to consume input at a time
Ray Strode [Tue, 29 Nov 2022 18:08:59 +0000 (13:08 -0500)] 
input-device: Only allow one renderer to consume input at a time

Right now if there are two graphics cards, there ends up with two
renderers active at the same time. Both process keyboard inputs
and both end up sending those events to plymouthd, resulting in
duplicate input.

This commit changes the input handlers so the first one wins, and
the rest don't get input.

Closes https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/197

2 years agotrigger: Provide way for instance handlers to preempt run.
Ray Strode [Tue, 29 Nov 2022 18:15:16 +0000 (13:15 -0500)] 
trigger: Provide way for instance handlers to preempt run.

This commit adds a way for instance handlers to say "My handler
completed things, don't run any other handlers".

It does that by adding a boolean return value to the handler type
and making the callers return true for done.

Note, this commit doesn't update the callers to use the new api,
so it's sort of leaving things in a broken state.

The next commit will update the callers.

2 years agoMerge branch 'hide-text-early' into 'main'
Ray Strode [Tue, 29 Nov 2022 15:15:30 +0000 (15:15 +0000)] 
Merge branch 'hide-text-early' into 'main'

src: Hide console text when splash is requested

See merge request plymouth/plymouth!205

2 years agosrc: Hide console text when splash is requested
Ray Strode [Fri, 21 Oct 2022 15:33:41 +0000 (11:33 -0400)] 
src: Hide console text when splash is requested

plymouthd may not be able to show the splash screen as soon as the
boot process wants it shown (if e.g. the driver isn't fully loaded
yet)

In that case, we sit tight and wait. Unfortunately, we aren't
logging boot messages while waiting.

This commit sets KD_GRAPHICS mode early to hide text from hitting
the console, but still tells systemd to print messages.  This way
we get boot logging but don't display the text while we wait on
the splash.

2 years agoMerge branch 'fix-novt-input' into 'main'
Ray Strode [Tue, 29 Nov 2022 14:26:18 +0000 (14:26 +0000)] 
Merge branch 'fix-novt-input' into 'main'

renderers: No longer assume that input is closed if the terminal device is NULL.

See merge request plymouth/plymouth!214

2 years agorenderers: No longer assume that input is closed if the terminal device is NULL.
n3rdopolis [Tue, 29 Nov 2022 13:32:37 +0000 (08:32 -0500)] 
renderers: No longer assume that input is closed if the terminal device is NULL.

2 years agoci: Update to add new keyboard handling dependencies
Diego Augusto [Sat, 15 Oct 2022 17:22:20 +0000 (13:22 -0400)] 
ci: Update to add new keyboard handling dependencies

Now that plymouth uses libxkbcommon and xkeyboard-config for
keyboard handling, we need to make sure those dependencies get
pulled into the CI system.

2 years agopopulate-initrd: Ensure all xkb stuff gets moved to initramfs
Diego Augusto [Sat, 15 Oct 2022 17:38:50 +0000 (13:38 -0400)] 
populate-initrd: Ensure all xkb stuff gets moved to initramfs

Now that plymouth supports /dev/input directly, it's important
that the initramfs gains all the newly needed support files.

This commit adds the necessary changes to the script to ensure
those files get moved over.

Some contributions by n3rdopolis and Ray Strode.

2 years agoframe-buffer: Add support for new /dev/input feature
n3rdopolis [Sun, 20 Nov 2022 15:38:51 +0000 (10:38 -0500)] 
frame-buffer: Add support for new /dev/input feature

2 years agodrm: Add support for new /dev/input feature
Diego Augusto [Sat, 15 Oct 2022 17:53:34 +0000 (13:53 -0400)] 
drm: Add support for new /dev/input feature

Now that the core plymouth code supports /dev/input, the renderer
plugins need to support it as well.

As a first step, this commit adds such support to the drm renderer
plugin.

Some contributions by n3rdopolis and Ray Strode.

2 years agosrc: Add support for /dev/input devices
Diego Augusto [Sat, 15 Oct 2022 17:45:42 +0000 (13:45 -0400)] 
src: Add support for /dev/input devices

Plymouth currently gets keyboard input from the terminal. This isn't
ideal, since it means plymouth requires VTs to be enabled in the kernel.

Furthermore, most display servers use /dev/input and libxkbcommon for
keyboard handling these days.

This commit adds similar support to the plymouth core code. Subsequent
commits will add support to the render plugins.

Some contributions by n3rdopolis and Ray Strode.

2 years agoscripts: Update keymap-render script to handle xkb keymaps too
Diego Augusto [Sat, 15 Oct 2022 17:32:53 +0000 (13:32 -0400)] 
scripts: Update keymap-render script to handle xkb keymaps too

At the moment the keyboard-render script only generates short
names for console layouts.

We're going to add /dev/input support to plymouth using
libxkbcommon, so we're going to need a list of of those keymaps
too.

This commit adds that.

Some contributions by n3rdopolis and Ray Strode.

2 years agodevice-manager: Only wait for device timeout for framebuffer devices
Ray Strode [Fri, 25 Nov 2022 16:27:24 +0000 (11:27 -0500)] 
device-manager: Only wait for device timeout for framebuffer devices

At the moment we ignore any udev events that come in before the
device timeout that are not drm devices.

That is because we don't want to use framebuffer devices as anything
but a last resort fallback option.

In the near future we're going to be handling input events from udev
as well. Those will obviously need to be handled right away, just like
drm devices.

This commit makes the check only defer framebuffer devices and not
anything that isn't a drm device.

2 years agoply-device-manager: Add != 0 to strcmp calls
Ray Strode [Fri, 25 Nov 2022 16:25:37 +0000 (11:25 -0500)] 
ply-device-manager: Add != 0 to strcmp calls

strcmp is kind of a confusing function in that it returns
non-zero when the strings are not equal. That is
especially counterintuitive when this non-zero value is
treated as a TRUE boolean.

This commit just adds some != 0's to a couple of strcmp
calls for clarity.

2 years agobuffer: Support length == 0 for ply_buffer_append_bytes
Ray Strode [Sat, 26 Nov 2022 16:15:59 +0000 (11:15 -0500)] 
buffer: Support length == 0 for ply_buffer_append_bytes

Right now callers of ply_buffer_append_bytes have to be
very careful to make sure the data they're appending is
non-zero in length. This is kind of inconvenient, since
it's not unusual for data to come in that's zero bytes
long.

For simplicity, this commit just makes
ply_buffer_append_bytes support that use case.

2 years agoterminal: Add API for flushing input buffer
Ray Strode [Thu, 17 Nov 2022 15:01:34 +0000 (10:01 -0500)] 
terminal: Add API for flushing input buffer

In the future we're going to start reading keyboard input from
/dev/input instead of the tty. When that happens, input will
still be sent by the kernel to the tty.

This input would eventually back up and overflow.

To address that problem before it exists, this commit adds a new
API, ply_terminal_flush_input, that will drain the input buffer
on demand.

We can later use that API to keep the tty from backing up.

2 years agotrigger: Add the ability to trigger data with an associated instance
Ray Strode [Wed, 16 Nov 2022 18:57:56 +0000 (13:57 -0500)] 
trigger: Add the ability to trigger data with an associated instance

Right now triggers can only fire off handlers that have one piece
of data associated with them, but sometimes it's useful to have
an object associated with the data too.

This commit adds new api for adding "instance handlers" that have
an additional parameter and a new method `ply_trigger_set_instance`
that allows an object to be associated with the trigger and get
used for the additional parameter of the instance handlers.

2 years agolist: Add helper macro for iterating lists
Diego Augusto [Sat, 15 Oct 2022 17:18:15 +0000 (13:18 -0400)] 
list: Add helper macro for iterating lists

At the moment, iterating over a ply_list_t requires an an
ugly looking for loop.

This commit adds a little sugar in the form of a
ply_list_foreach macro in the name of convenience.

2 years agoRevert "Add input device support"
Ray Strode [Tue, 29 Nov 2022 14:14:37 +0000 (09:14 -0500)] 
Revert "Add input device support"

Apparently the:

[x] Squash commits

box was checked when merge request plymouth/plymouth!177 was merged.
Oops.

We want good commit messages for such a big change, though, so people
doing code spelunking later have a fighting chance of following what's
going on.

This reverts commit dacfb36b5714cd34791ab85d72629886075ff492.

Subsequents commits will bring it back, peicemeal.

2 years agoMerge branch 'fix-terminal-crash' into 'main'
Ray Strode [Tue, 29 Nov 2022 05:40:54 +0000 (05:40 +0000)] 
Merge branch 'fix-terminal-crash' into 'main'

Fix terminal crash

Closes #196

See merge request plymouth/plymouth!213

2 years agodevice-manager: Make sure local console terminal is open
Ray Strode [Tue, 29 Nov 2022 00:32:43 +0000 (19:32 -0500)] 
device-manager: Make sure local console terminal is open

We need to make sure the local console terminal is open so that
when we check later if it's a vt or not we get a valid answer.

This commit adds the open call.

Closes: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/196
2 years agodevice-manager: Ensure local_console_terminal isn't NULL
Ray Strode [Tue, 29 Nov 2022 00:17:33 +0000 (19:17 -0500)] 
device-manager: Ensure local_console_terminal isn't NULL

We thought we could get away with a NULL local_console_terminal
when the terminal isn't a VT, but it turns out we need it for
various reasons anyway.

This commit just makes sure we keep it in place.

2 years agoMerge branch 'vt-less_graphical' into 'main'
Ray Strode [Sun, 27 Nov 2022 02:13:05 +0000 (02:13 +0000)] 
Merge branch 'vt-less_graphical' into 'main'

Allow Plymouth to use graphical backends on kernels without VT

See merge request plymouth/plymouth!179

2 years agodevice-manager: Support kernels with CONFIG_VT=n
n3rdopolis [Tue, 18 Oct 2022 17:06:28 +0000 (13:06 -0400)] 
device-manager: Support kernels with CONFIG_VT=n

At the moment, plymouth requires VT support be enabled in the kernel
to show graphical splashes.

This is because:

1. it relies on the tty to show details
2. when VT support is disabled the kernel will use ttyS0 as the default
console which makes plymouth disable graphical splashes since it assumes
the machine is a server with a serial console.

This commit addresses the first problem by disabling the
escape-to-toggle-details feature and addresses the second problem by
introducing a new kernel parameter plymouth.graphical that is like
the "splash" option and "plymouth.ignore-serial-consoles" option
combined.

2 years agoMerge branch 'dev_input' into 'main'
Ray Strode [Sun, 27 Nov 2022 01:38:00 +0000 (01:38 +0000)] 
Merge branch 'dev_input' into 'main'

Add input device support

See merge request plymouth/plymouth!177

2 years agoAdd input device support
Diego Augusto [Sun, 27 Nov 2022 01:38:00 +0000 (01:38 +0000)] 
Add input device support

2 years agoMerge branch 'main' into 'main'
Ray Strode [Mon, 21 Nov 2022 00:33:27 +0000 (00:33 +0000)] 
Merge branch 'main' into 'main'

Add Hindi (hi) translation

See merge request plymouth/plymouth!212

2 years agoAdd Hindi (hi) translation
Hemish [Mon, 21 Nov 2022 00:17:39 +0000 (05:47 +0530)] 
Add Hindi (hi) translation

2 years agoMerge branch 'debian-needs-a-certain-je-ne-sais-quoi' into 'main'
Ray Strode [Tue, 15 Nov 2022 21:23:40 +0000 (21:23 +0000)] 
Merge branch 'debian-needs-a-certain-je-ne-sais-quoi' into 'main'

A bunch of fixes for -Wl,--no-undefined

Closes #194

See merge request plymouth/plymouth!211

2 years agoci: Add -Wl,--no-undefined to CFLAGS
Ray Strode [Tue, 15 Nov 2022 21:17:01 +0000 (16:17 -0500)] 
ci: Add -Wl,--no-undefined to CFLAGS

I believe this is the real cause of failures on debian, so add
it to the CI builds.

2 years agolabel-pango: Add -lcairo
Ray Strode [Tue, 15 Nov 2022 21:15:44 +0000 (16:15 -0500)] 
label-pango: Add -lcairo

This is more -Wl,--no-undefined fall out.

Closes: #194
2 years agoscript: Fix up build for script plugin
Ray Strode [Tue, 15 Nov 2022 21:12:59 +0000 (16:12 -0500)] 
script: Fix up build for script plugin

More problems uncovered by -Wl,--no-undefined

2 years agolibply: Add -lm too
Ray Strode [Tue, 15 Nov 2022 21:03:50 +0000 (16:03 -0500)] 
libply: Add -lm too

-lm is problematic as well, so add it.

2 years agoMerge branch 'seriously-whats-the-dl' into 'main'
Ray Strode [Tue, 15 Nov 2022 20:45:41 +0000 (20:45 +0000)] 
Merge branch 'seriously-whats-the-dl' into 'main'

libply: Try again to add -ldl

Closes #194

See merge request plymouth/plymouth!210

2 years agolibply: Try again to add -ldl seriously-whats-the-dl
Ray Strode [Tue, 15 Nov 2022 20:43:23 +0000 (15:43 -0500)] 
libply: Try again to add -ldl

This is yet one more try to get -ldl added to the link line on
debian.

Closes: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/194
2 years agoMerge branch 'its-not-just-at-the-end-of-a-rainbow' into 'main'
Ray Strode [Tue, 15 Nov 2022 14:58:33 +0000 (14:58 +0000)] 
Merge branch 'its-not-just-at-the-end-of-a-rainbow' into 'main'

ci: Use gold by default

See merge request plymouth/plymouth!209

2 years agoci: Use gold by default
Ray Strode [Tue, 15 Nov 2022 14:51:22 +0000 (09:51 -0500)] 
ci: Use gold by default

I assume

https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/194

happened because the machine was using gold instead of ld. Let's
try to prevent future problems like that by making fedora use
gold in ci, too.

2 years agoMerge branch 'whats-the-dl' into 'main'
Ray Strode [Tue, 15 Nov 2022 14:37:20 +0000 (14:37 +0000)] 
Merge branch 'whats-the-dl' into 'main'

libply: Add dependency on ldl

Closes #194

See merge request plymouth/plymouth!208

2 years agolibply: Add dependency on ldl
Ray Strode [Tue, 15 Nov 2022 14:34:08 +0000 (09:34 -0500)] 
libply: Add dependency on ldl

debian is failing to build right now because libply isn't explicitly
pulling in libdl.

This commit fixes that oversight.

Closes: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/194
2 years agoMerge branch 'meson' into 'main'
Ray Strode [Mon, 14 Nov 2022 19:22:08 +0000 (19:22 +0000)] 
Merge branch 'meson' into 'main'

meson: Fix theme path

See merge request plymouth/plymouth!207

2 years agomeson: Fix theme path
Ray Strode [Mon, 14 Nov 2022 19:19:58 +0000 (14:19 -0500)] 
meson: Fix theme path

The meson port is missing a few slashes that cause some theme loading
issues at runtime.

This fixes that.

2 years agoMerge branch 'meson' into 'main'
Ray Strode [Mon, 14 Nov 2022 18:48:43 +0000 (18:48 +0000)] 
Merge branch 'meson' into 'main'

Port build system to Meson

See merge request plymouth/plymouth!206

2 years agoautogoo: Drop the goo
Ray Strode [Mon, 14 Nov 2022 16:34:53 +0000 (11:34 -0500)] 
autogoo: Drop the goo

We have meson support now, get rid of the cruft.

2 years agoci: Update for meson
Ray Strode [Mon, 14 Nov 2022 18:21:02 +0000 (13:21 -0500)] 
ci: Update for meson

2 years agoPort build system to Meson
Niels De Graef [Mon, 25 Jul 2022 10:55:59 +0000 (12:55 +0200)] 
Port build system to Meson

2 years agoMerge branch 'label-freetype-font-fixes' into 'main'
Ray Strode [Thu, 20 Oct 2022 16:45:37 +0000 (16:45 +0000)] 
Merge branch 'label-freetype-font-fixes' into 'main'

plugins: label-freetype: Fix alignment and calculation of line width

See merge request plymouth/plymouth!204