]> git.ipfire.org Git - thirdparty/plymouth.git/log
thirdparty/plymouth.git
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

3 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

3 years agoplugins: label-freetype: Fixes calculation of line width
Alfonso Sánchez-Beato [Thu, 20 Oct 2022 11:48:55 +0000 (12:48 +0100)] 
plugins: label-freetype: Fixes calculation of line width

label-freetype was giving a wrong line width for two reasons:
* Unproper handling of negative left bearings as it was using it as normal
  while in fact the plugin draws full character boxes.
* Loading of the character used different flags when calculating width
  and when actually printing the characters.

3 years agoplugins: label-freetype: Fix font alignment
Alfonso Sánchez-Beato [Thu, 20 Oct 2022 10:37:14 +0000 (11:37 +0100)] 
plugins: label-freetype: Fix font alignment

label->width is used to calculate wrapping of lines and it is by
default -1. We need to use label->area.width instead when aligning a
line, as label->width might not have been set.

3 years agoMerge branch 'label-ft' into 'main'
Ray Strode [Mon, 17 Oct 2022 20:51:57 +0000 (20:51 +0000)] 
Merge branch 'label-ft' into 'main'

plugins: Add FreeType-based label plugin

See merge request plymouth/plymouth!203

3 years agopopulate-initrd: Install label-freetype plugin into initrd if available
Fabian Vogt [Fri, 6 Mar 2020 09:29:36 +0000 (10:29 +0100)] 
populate-initrd: Install label-freetype plugin into initrd if available

Now that there's a freetype plugin available, it should be installed in
the initramfs.

This commit adds the changes to plymout-populate-initrd to make that
happen.

Some contributions by Petr Vorel and Nathan Pratta Teodosio.

Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
3 years agoplugins: Add FreeType-based label plugin
Fabian Vogt [Fri, 6 Mar 2020 09:20:11 +0000 (10:20 +0100)] 
plugins: Add FreeType-based label plugin

Right now plymouth uses pango for rendering text. Pango is
fully featured, but also carries a lot of depedencies.

Since plymouth goes in the initramfs, using a library that
brings in a lot of dependencies is less than optimal.

This commit adds a new freetype based plugin, alongside the
pango one.

It doesn't have quite the same feature set, but it brings in
a smaller dependency footprint.

Contributions to this commit from Nathan Pratta Teodosio,
Alfonso Sánchez-Beato, Petr Vorel, and Ondrej Holecek.

Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Ondrej Holecek <oholecek@suse.com>
[ oholecek: fix plugin for newline characters ]
Signed-off-by: Fabian Vogt <fvogt@suse.com>
3 years agoply-label: Don't crash if label plugin fails
Fabian Vogt [Fri, 6 Mar 2020 09:28:04 +0000 (10:28 +0100)] 
ply-label: Don't crash if label plugin fails

Right now if the label plugin fails during initialization, the plymouth
daemon crashes.

This commit adds a NULL check to fail more gracefully.

Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
3 years agoMerge branch 'dont-clear-serial-consoles' into 'main'
Ray Strode [Sat, 15 Oct 2022 19:41:37 +0000 (19:41 +0000)] 
Merge branch 'dont-clear-serial-consoles' into 'main'

details: Only clear screen on VT not serial consoles

Closes #187

See merge request plymouth/plymouth!197

3 years agodetails: Don't replay boot buffer on serial consoles
Ray Strode [Tue, 30 Aug 2022 18:41:36 +0000 (14:41 -0400)] 
details: Don't replay boot buffer on serial consoles

commit 0e59dde8 changed the details plugin to clear the terminal when
first opening it. This was done to prevent duplicate messages from
showing up when toggling back and forth between details and graphical
splashes.

That has the negative side effect of purging serial console output too
though. Furthermore, it makes little sense to replay the boot buffer
on serial consoles, since serial consoles don't aggressively purge
scrollback like VTs do.

This commit adds a check to make sure the terminal is a VT before trying
to clear and replay the scrollback buffer.

Closes: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/187
3 years agoMerge branch 'main' into 'main'
Ray Strode [Sat, 15 Oct 2022 19:37:49 +0000 (19:37 +0000)] 
Merge branch 'main' into 'main'

po: add Geogian translation

See merge request plymouth/plymouth!201

3 years agopo: add Geogian translation
NorwayFun [Sat, 15 Oct 2022 19:37:49 +0000 (19:37 +0000)] 
po: add Geogian translation

3 years agoMerge branch 'valentindavid/reload-command' into 'main'
Ray Strode [Sat, 15 Oct 2022 18:04:08 +0000 (18:04 +0000)] 
Merge branch 'valentindavid/reload-command' into 'main'

main: Add "reload" command

See merge request plymouth/plymouth!194

3 years agomain: Add "reload" command
Valentin David [Tue, 30 Aug 2022 13:20:03 +0000 (15:20 +0200)] 
main: Add "reload" command

If an initramfs does not yet have all configuration, it might want
to start with a fallback theme, and re-load the correct theme is
accessible.

3 years agoMerge branch 'force-fb' into 'main'
Ray Strode [Sat, 15 Oct 2022 16:19:22 +0000 (16:19 +0000)] 
Merge branch 'force-fb' into 'main'

ply-device-manager: Add plymouth.force-frame-buffer parameter, allow to choose force framebuffer mode.

See merge request plymouth/plymouth!193

3 years agoply-device-manager: Add plymouth.force-frame-buffer-on-boot parameter, allow to choos...
shiptux [Sat, 27 Aug 2022 07:09:57 +0000 (15:09 +0800)] 
ply-device-manager: Add plymouth.force-frame-buffer-on-boot parameter, allow to choose force framebuffer mode.

Some hardware vendor may not open source display driver. (Such as pangu
M900). They load drm driver via kernel modules. On such devices, drm driver
load more slowly then other devices, which may cause logo show later and no
seem to get the Plymouth decryption screen to show. To avoid this problem,
add a bootargs for people who want to forced use fb in plymouth.

When found "plymouth.force-frame-buffer-on-boot flags" in kernel parameter,
During the system start, PLY_DEVICE_MANAGER_FLAGS_FORCE_FRAM_BUFFER will be
add to device_manager_flags. Then "force_fb" mode  will enable, and the
renderer_type set as framebuffer.

Signed-off-by: shiptux <shiptux@gmail.com>
3 years agoMerge branch 'fix-mkinitcpio-shutdown' into 'main'
Ray Strode [Sat, 15 Oct 2022 14:46:40 +0000 (14:46 +0000)] 
Merge branch 'fix-mkinitcpio-shutdown' into 'main'

systemd: Add mkinitcpio support to plymouth-switch-root-initramfs.service

See merge request plymouth/plymouth!202

3 years agosystemd: Add mkinitcpio support to plymouth-switch-root-initramfs.service
Maxim Mikityanskiy [Sat, 1 Oct 2022 11:52:19 +0000 (14:52 +0300)] 
systemd: Add mkinitcpio support to plymouth-switch-root-initramfs.service

plymouth-switch-root-initramfs.service commands plymouth to release
rootfs to allow the shutdown ramfs to unmount rootfs. However, it only
integrates with dracut. Arch Linux uses mkinitcpio by default, and it
uses shutdown ramfs when layered block storage (e.g. LUKS) is used for
rootfs. Therefore, it fails to unmount rootfs on shutdown if LUKS and
plymouth are used together.

Add a new trigger for plymouth-switch-root-initramfs.service to start
when /run/initramfs/shutdown exists (/run/initramfs/bin/sh may not exist
with mkinitcpio when systemd-based initramfs is used), and add a
dependency to start it after mkinitcpio generates the shutdown ramfs.

3 years agoMerge branch 'simpledrm-coldplug-fix' into 'main'
Hans de Goede [Mon, 3 Oct 2022 09:10:57 +0000 (09:10 +0000)] 
Merge branch 'simpledrm-coldplug-fix' into 'main'

ply-device-manager: Also ignore SimpleDRM devs in coldplug enumeration path

See merge request plymouth/plymouth!200

3 years agoply-device-manager: Also ignore SimpleDRM devs in coldplug enumeration path
Hans de Goede [Wed, 28 Sep 2022 13:16:15 +0000 (15:16 +0200)] 
ply-device-manager: Also ignore SimpleDRM devs in coldplug enumeration path

Plymouth has 2 hw discovery paths:
1. Enumerating devices already known by udev at plymouth startup
2. Devices which are hotplugged after startup

At boot we have udevd which is enumerating hw and plymouthd racing
with each other, which means that plymouthd may discover the new
SimpleDRM device through either 1. or 2.

Before this patch a check for SimpleDRM was missing from path 1, causing
it to be treated as a normal device instead of being ignored as intended:

plymouth-debug.log for the simpledrm being enumerated in path 1:

ply-device-manager.c:344: create_devices_for_subsystem:
 found device /sys/devices/platform/simple-framebuffer.0/drm/card0
ply-device-manager.c:351: create_devices_for_subsystem:
 device is initialized
ply-device-manager.c:360: create_devices_for_subsystem:
 found node /dev/dri/card0
ply-device-manager.c:283: create_devices_for_udev_device:
 found DRM device /dev/dri/card0
ply-device-manager.c:885: create_devices_for_terminal_and_rende:
 creating devices for /dev/dri/card0 (renderer type: 1)

plymouth-debug.log for the simpledrm *not* being enumerated in path 1:

ply-device-manager.c:344: create_devices_for_subsystem:
 found device /sys/devices/platform/simple-framebuffer.0/drm/card0
ply-device-manager.c:367: create_devices_for_subsystem:
 it's not initialized

followed by path 2 enumerating the device very shortly after this:

ply-device-manager.c:532: on_udev_event:
 got add event for device /dev/dri/card0
ply-device-manager.c:462: verify_add_or_change:
 ignoring since we only handle SimpleDRM devices after timeout

Note how path 2 does correctly ignore SimpleDRM devices, where as
path 1 does not. This commit fixes this by moving the verify_drm_device()
check in to create_devices_for_udev_device() which runs in both paths.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=2127663
Reported-by: Michael Catanzaro <mcatanza@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
3 years agoply-device-manager: Move verify_drm_device() higher up in the file
Hans de Goede [Wed, 28 Sep 2022 13:14:00 +0000 (15:14 +0200)] 
ply-device-manager: Move verify_drm_device() higher up in the file

Move verify_drm_device() higher up in ply-device-manager.c, this is
a preparation patch for the next patch in this series.

This is a pure move without any changes to the moved block.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
3 years agoMerge branch 'fixreadmebuild' into 'main'
Ray Strode [Mon, 12 Sep 2022 01:54:17 +0000 (01:54 +0000)] 
Merge branch 'fixreadmebuild' into 'main'

Fix build after README changes

See merge request plymouth/plymouth!199

3 years agoFix build after README changes
n3rdopolis [Sat, 10 Sep 2022 19:12:11 +0000 (15:12 -0400)] 
Fix build after README changes

3 years agoMerge branch 'jim.vzit-main-patch-40612' into 'main'
Jim Farrell [Wed, 7 Sep 2022 18:09:33 +0000 (18:09 +0000)] 
Merge branch 'jim.vzit-main-patch-40612' into 'main'

Jim.vzit main patch 40612

See merge request plymouth/plymouth!198

3 years agoUpdate Makefile.am
Jim Farrell [Wed, 7 Sep 2022 18:04:56 +0000 (18:04 +0000)] 
Update Makefile.am

3 years agoAdd README in .md format.
jim.vzit [Wed, 17 Aug 2022 16:22:21 +0000 (12:22 -0400)] 
Add README in .md format.

3 years agoMerge branch 'ignore-non-desktop' into 'main'
Ray Strode [Tue, 30 Aug 2022 17:26:20 +0000 (17:26 +0000)] 
Merge branch 'ignore-non-desktop' into 'main'

drm: ignore non-desktop outputs

See merge request plymouth/plymouth!187

3 years agodrm: ignore non-desktop outputs
Xaver Hugl [Mon, 22 Aug 2022 19:42:19 +0000 (21:42 +0200)] 
drm: ignore non-desktop outputs

It doesn't make sense to display a boot screen on virtual reality headsets

3 years agoMerge branch 'dont-uncrustify-on-debian' into 'main'
Ray Strode [Tue, 30 Aug 2022 15:15:20 +0000 (15:15 +0000)] 
Merge branch 'dont-uncrustify-on-debian' into 'main'

ci: Don't run uncrustify on debian

See merge request plymouth/plymouth!196

3 years agoci: Don't run uncrustify on debian
Ray Strode [Tue, 30 Aug 2022 13:54:22 +0000 (09:54 -0400)] 
ci: Don't run uncrustify on debian

The uncrustify is too old for the config we ship.

3 years agoMerge branch 'move-ci-to-debian-unstable' into 'main'
Ray Strode [Tue, 30 Aug 2022 13:20:03 +0000 (13:20 +0000)] 
Merge branch 'move-ci-to-debian-unstable' into 'main'

ci: Update to debian unstable

See merge request plymouth/plymouth!195

3 years agoci: Update to debian unstable
Ray Strode [Tue, 30 Aug 2022 13:16:29 +0000 (09:16 -0400)] 
ci: Update to debian unstable

It seems the uncrustify in debian stable is too old. Hopefully,
debian unstable has a new enough version.

3 years agoMerge branch 'kate/WIP/secureboot-check' into 'main'
Ray Strode [Thu, 11 Aug 2022 16:27:53 +0000 (16:27 +0000)] 
Merge branch 'kate/WIP/secureboot-check' into 'main'

plugins: splash: two-step: Secure boot check and a warning image

See merge request plymouth/plymouth!176

3 years agoplugins: splash: two-step: Secure boot check and a warning image
Kate Hsuan [Fri, 10 Jun 2022 05:52:37 +0000 (13:52 +0800)] 
plugins: splash: two-step: Secure boot check and a warning image

Secure boot is used against several security threats when malware tries to
infect the firmware of the system. Users may inadvertently disable or
software may intentionally disable the secure boot. Consequently, the
system is running on an insecure platform with incorrect configuration. If
Plymouth could offer a warning to the user, the user could reboot and
reconfigure their system or asks for help immediately.

This work can be used to check the secure boot configuration and put a red
warning image on the screen if the secure boot is disabled. Also, this
check can be utterly disabled through the kernel parameter for testing.
If the parameter "secure_boot.warn_if_disabled=false" appears in the
kernel parameter, the secure boot check will be disabled.

Signed-off-by: Kate Hsuan <hpa@redhat.com>
3 years agolibply: ply-utils: Add ply_is_secure_boot_enabled () helper
Kate Hsuan [Mon, 4 Jul 2022 08:13:58 +0000 (16:13 +0800)] 
libply: ply-utils: Add ply_is_secure_boot_enabled () helper

This checks the secure boot status. If the secure boot are enabled,
return true. Otherwise, return false.

The system secure boot settings is at
/sys/firmware/efi/efivars/SecureBoot* and the fifth byte should be
0x1 which means the system secure boot is enabled.

Signed-off-by: Kate Hsuan <hpa@redhat.com>
3 years agoMerge branch 'move-ci-to-f37' into 'main'
Ray Strode [Wed, 3 Aug 2022 19:48:31 +0000 (19:48 +0000)] 
Merge branch 'move-ci-to-f37' into 'main'

ci: Update to fedora 37

See merge request plymouth/plymouth!185

3 years agoci: Update to fedora 37
Ray Strode [Wed, 3 Aug 2022 19:15:33 +0000 (15:15 -0400)] 
ci: Update to fedora 37

It seems like uncrustify is changed slightly incompatibly between
35 and 37, so just move to 37.

3 years agoscripts: Add -B to interdiff in check-format
Ray Strode [Wed, 3 Aug 2022 19:29:40 +0000 (15:29 -0400)] 
scripts: Add -B to interdiff in check-format

It's currently complaining about an extra blank line in each file.
That's a little extreme.  Add -B.

3 years agoply-utils: Drop linux/fs.h include
Ray Strode [Wed, 3 Aug 2022 19:23:33 +0000 (15:23 -0400)] 
ply-utils: Drop linux/fs.h include

It was needed long ago for a function we no longer even have.

Now it's causing compile errors on Fedora 37 because it's conflicting
with sys/mount.h.

This commit drops it.

3 years agoMerge branch 'drop-vim-lines' into 'main'
Ray Strode [Wed, 3 Aug 2022 19:15:18 +0000 (19:15 +0000)] 
Merge branch 'drop-vim-lines' into 'main'

src: Drop vim: lines

See merge request plymouth/plymouth!184

3 years agosrc: Drop vim: lines
Ray Strode [Wed, 3 Aug 2022 19:10:20 +0000 (15:10 -0400)] 
src: Drop vim: lines

Many of the source files in tree have "vim:" lines to tell vim a
hint about our coding style.

Unfortunately, they were written when plymouth used the GNU coding
style, and it, of course, doesn't anymore.

This commit just drops them since the default vim indentation options
match pretty well with the plymouth coding style now, anyway.

3 years agoMerge branch 'update-uncrustify-config' into 'main'
Ray Strode [Mon, 1 Aug 2022 14:34:39 +0000 (14:34 +0000)] 
Merge branch 'update-uncrustify-config' into 'main'

scripts: Update uncrustify config

See merge request plymouth/plymouth!183

3 years agoscripts: Update uncrustify config
Ray Strode [Mon, 1 Aug 2022 14:00:17 +0000 (10:00 -0400)] 
scripts: Update uncrustify config

It looks like I forgot to merge the latest uncrustify config last
time I did an uncrustify run.

This commit puts it in place.

3 years agoMerge branch 'diff-less' into 'main'
Ray Strode [Fri, 29 Jul 2022 19:07:17 +0000 (19:07 +0000)] 
Merge branch 'diff-less' into 'main'

scripts: Diff less

See merge request plymouth/plymouth!182

3 years agoscripts: Diff less
Ray Strode [Fri, 29 Jul 2022 19:03:43 +0000 (15:03 -0400)] 
scripts: Diff less

I think check-format.sh might get into trouble in some cases when
a non source file gets changed.

This commit makes the diffing more targeted

3 years agoMerge branch 'cut-the-crust' into 'main'
Ray Strode [Fri, 29 Jul 2022 13:21:10 +0000 (13:21 +0000)] 
Merge branch 'cut-the-crust' into 'main'

src: Run through uncrustify

See merge request plymouth/plymouth!181

3 years agosrc: Run through uncrustify
Ray Strode [Fri, 29 Jul 2022 13:09:30 +0000 (09:09 -0400)] 
src: Run through uncrustify

I was going to fix the preexisting style issues piecewise as they're
changed, but it's actually making reviewing patchsets noisy.

This commit just bites the bullet and does a full run through
uncrustify.

3 years agoMerge branch 'runtimedir-fix' into 'main'
Ray Strode [Tue, 19 Jul 2022 18:32:22 +0000 (18:32 +0000)] 
Merge branch 'runtimedir-fix' into 'main'

Make use of standard --runstatedir flag vs custom --with-runtimedir

See merge request plymouth/plymouth!178

3 years agoFix daemon install ignoring configured runstatedir
Ben Brown [Tue, 19 Jul 2022 15:12:12 +0000 (16:12 +0100)] 
Fix daemon install ignoring configured runstatedir

3 years agoUse standard runstatedir vs custom flag
Ben Brown [Tue, 19 Jul 2022 15:10:24 +0000 (16:10 +0100)] 
Use standard runstatedir vs custom flag

3 years agoMerge branch 'fix-exit-crash' into 'main'
Ray Strode [Tue, 12 Apr 2022 23:46:01 +0000 (23:46 +0000)] 
Merge branch 'fix-exit-crash' into 'main'

client: Free command parser after event loop

Closes #175

See merge request plymouth/plymouth!175

3 years agoscript: Don't crash for scripts without input validation functions
Ray Strode [Tue, 12 Apr 2022 21:23:14 +0000 (17:23 -0400)] 
script: Don't crash for scripts without input validation functions

commit 5d1b49c601a085120e834c1e9134593318465eec adds support for
filtering input to plymouthd and the script plugin.

The script plugin additions, unfortunately, fail to properly handle
scripts that don't add a validation function.

This commit fixes that by assuming no validation function means
no filtering.

Closes: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/175
3 years agocommand-parser: Don't add duplicate command to command list
Ray Strode [Tue, 12 Apr 2022 20:16:49 +0000 (16:16 -0400)] 
command-parser: Don't add duplicate command to command list

ply_command_parser_get_options inexplicably adds a duplicate
command to the list of available subcommands every time it's
called. This must be some sort of cut and paste bug, it shouldn't
be modifying the list.

That leads to double frees when freeing the command parser.

This commit fixes that.

Related: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/175

3 years agoclient: Free command parser after event loop
Ray Strode [Tue, 12 Apr 2022 17:30:32 +0000 (13:30 -0400)] 
client: Free command parser after event loop

commit ed7b1690f0054888795059c2ef6ddd2f8107786a added an explicit
command parser free call on exit to make memory analysis tools
give better results.

That commit freed the command parser a little too early, though,
before the event loop gets freed and the event loop exit handlers
are run.

The command parser uses an exit handler to clear a weak reference
on the event loop, so freeing the command parser before the event
loop can lead to crash.

This commit moves the free call a little lower.

Related: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/175

3 years agoMerge branch 'wip/uncrustify-updates' into 'main'
Ray Strode [Wed, 6 Apr 2022 17:28:22 +0000 (17:28 +0000)] 
Merge branch 'wip/uncrustify-updates' into 'main'

.gitlab-ci: Don't regress formatting

See merge request plymouth/plymouth!174

3 years ago.gitlab-ci: Don't regress formatting
Ray Strode [Mon, 4 Apr 2022 19:06:15 +0000 (15:06 -0400)] 
.gitlab-ci: Don't regress formatting

The formatting in the codebase isn't perfect, but there's no
reason to make it worse.

This commit adds a CI check to make sure new code is styled
right.

3 years ago.gitlab-ci: Make it work better on merge requests
Ray Strode [Mon, 4 Apr 2022 20:21:39 +0000 (16:21 -0400)] 
.gitlab-ci: Make it work better on merge requests

gitlab CI apparently exposes more useful environment variables
if `only: merge_requests` is put on each job, so do that.

3 years ago.gitlab-ci: Update Fedora version to 35
Ray Strode [Mon, 4 Apr 2022 19:50:41 +0000 (15:50 -0400)] 
.gitlab-ci: Update Fedora version to 35

30 is ancient at this point.