Commit graph

2615 commits

Author SHA1 Message Date
Ray Strode
bf3eb9fdea libply: Add -lm too
-lm is problematic as well, so add it.
2022-11-15 16:18:23 -05:00
Ray Strode
0baf613607 Merge branch 'seriously-whats-the-dl' into 'main'
libply: Try again to add -ldl

Closes #194

See merge request plymouth/plymouth!210
2022-11-15 20:45:41 +00:00
Ray Strode
e7ff99e6da 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
2022-11-15 15:43:23 -05:00
Ray Strode
b86cd4679e Merge branch 'its-not-just-at-the-end-of-a-rainbow' into 'main'
ci: Use gold by default

See merge request plymouth/plymouth!209
2022-11-15 14:58:33 +00:00
Ray Strode
cd7df781b5 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.
2022-11-15 14:58:26 +00:00
Ray Strode
f2a475f9e2 Merge branch 'whats-the-dl' into 'main'
libply: Add dependency on ldl

Closes #194

See merge request plymouth/plymouth!208
2022-11-15 14:37:20 +00:00
Ray Strode
f87be4d429 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
2022-11-15 09:34:08 -05:00
Ray Strode
29fa684c68 Merge branch 'meson' into 'main'
meson: Fix theme path

See merge request plymouth/plymouth!207
2022-11-14 19:22:08 +00:00
Ray Strode
78fad74cd0 meson: Fix theme path
The meson port is missing a few slashes that cause some theme loading
issues at runtime.

This fixes that.
2022-11-14 14:19:58 -05:00
Ray Strode
53bff28957 Merge branch 'meson' into 'main'
Port build system to Meson

See merge request plymouth/plymouth!206
2022-11-14 18:48:43 +00:00
Ray Strode
a5c1ccd711 autogoo: Drop the goo
We have meson support now, get rid of the cruft.
2022-11-14 13:40:56 -05:00
Ray Strode
1654069171 ci: Update for meson 2022-11-14 13:30:59 -05:00
Niels De Graef
95d3e3bbf9 Port build system to Meson 2022-11-14 12:21:55 -05:00
Ray Strode
4bd41a355f Merge branch 'label-freetype-font-fixes' into 'main'
plugins: label-freetype: Fix alignment and calculation of line width

See merge request plymouth/plymouth!204
2022-10-20 16:45:37 +00:00
Alfonso Sánchez-Beato
d566b1285d 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.
2022-10-20 12:48:55 +01:00
Alfonso Sánchez-Beato
dbf0fa7fc7 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.
2022-10-20 11:37:14 +01:00
Ray Strode
770ef251a6 Merge branch 'label-ft' into 'main'
plugins: Add FreeType-based label plugin

See merge request plymouth/plymouth!203
2022-10-17 20:51:57 +00:00
Fabian Vogt
c9a03c17d7 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>
2022-10-17 13:04:02 -04:00
Fabian Vogt
58f4d4f47c 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>
2022-10-17 13:04:02 -04:00
Fabian Vogt
d019a7fce9 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>
2022-10-17 13:04:02 -04:00
Ray Strode
ccf2edf406 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
2022-10-15 19:41:37 +00:00
Ray Strode
45c3a40abd 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
2022-10-15 19:39:12 +00:00
Ray Strode
2370412c10 Merge branch 'main' into 'main'
po: add Geogian translation

See merge request plymouth/plymouth!201
2022-10-15 19:37:49 +00:00
NorwayFun
5caf597e44 po: add Geogian translation 2022-10-15 19:37:49 +00:00
Ray Strode
214cdfc8c8 Merge branch 'valentindavid/reload-command' into 'main'
main: Add "reload" command

See merge request plymouth/plymouth!194
2022-10-15 18:04:08 +00:00
Valentin David
8d1c0e622e 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.
2022-10-15 18:02:01 +00:00
Ray Strode
5d98b174ba 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
2022-10-15 16:19:22 +00:00
shiptux
f07ab522f4 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>
2022-10-15 16:17:16 +00:00
Ray Strode
e3aab2748b Merge branch 'fix-mkinitcpio-shutdown' into 'main'
systemd: Add mkinitcpio support to plymouth-switch-root-initramfs.service

See merge request plymouth/plymouth!202
2022-10-15 14:46:40 +00:00
Maxim Mikityanskiy
2f12aa4c5d 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.
2022-10-15 14:44:03 +00:00
Hans de Goede
c09c651afe Merge branch 'simpledrm-coldplug-fix' into 'main'
ply-device-manager: Also ignore SimpleDRM devs in coldplug enumeration path

See merge request plymouth/plymouth!200
2022-10-03 09:10:57 +00:00
Hans de Goede
5dedca818f 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>
2022-09-28 15:41:58 +02:00
Hans de Goede
439c38ccc7 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>
2022-09-28 15:41:58 +02:00
Ray Strode
6f5dc63785 Merge branch 'fixreadmebuild' into 'main'
Fix build after README changes

See merge request plymouth/plymouth!199
2022-09-12 01:54:17 +00:00
n3rdopolis
58d0dece94 Fix build after README changes 2022-09-10 15:12:11 -04:00
Jim Farrell
9826df513c Merge branch 'jim.vzit-main-patch-40612' into 'main'
Jim.vzit main patch 40612

See merge request plymouth/plymouth!198
2022-09-07 18:09:33 +00:00
Jim Farrell
f43e8a32f0 Update Makefile.am 2022-09-07 18:07:31 +00:00
jim.vzit
ca0b765501 Add README in .md format. 2022-09-07 18:07:31 +00:00
Ray Strode
614d2db918 Merge branch 'ignore-non-desktop' into 'main'
drm: ignore non-desktop outputs

See merge request plymouth/plymouth!187
2022-08-30 17:26:20 +00:00
Xaver Hugl
4b8c1336a7 drm: ignore non-desktop outputs
It doesn't make sense to display a boot screen on virtual reality headsets
2022-08-30 17:23:19 +00:00
Ray Strode
9c5f356e89 Merge branch 'dont-uncrustify-on-debian' into 'main'
ci: Don't run uncrustify on debian

See merge request plymouth/plymouth!196
2022-08-30 15:15:20 +00:00
Ray Strode
bb6580212d ci: Don't run uncrustify on debian
The uncrustify is too old for the config we ship.
2022-08-30 09:54:51 -04:00
Ray Strode
30615d6560 Merge branch 'move-ci-to-debian-unstable' into 'main'
ci: Update to debian unstable

See merge request plymouth/plymouth!195
2022-08-30 13:20:03 +00:00
Ray Strode
25b60af88c ci: Update to debian unstable
It seems the uncrustify in debian stable is too old. Hopefully,
debian unstable has a new enough version.
2022-08-30 09:16:29 -04:00
Ray Strode
0b0e93c241 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
2022-08-11 16:27:53 +00:00
Kate Hsuan
98cf5fa56a 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>
2022-08-11 22:24:51 +08:00
Kate Hsuan
25f0932cba 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>
2022-08-11 22:24:40 +08:00
Ray Strode
52b0494de7 Merge branch 'move-ci-to-f37' into 'main'
ci: Update to fedora 37

See merge request plymouth/plymouth!185
2022-08-03 19:48:31 +00:00
Ray Strode
9dff465f0c ci: Update to fedora 37
It seems like uncrustify is changed slightly incompatibly between
35 and 37, so just move to 37.
2022-08-03 15:32:04 -04:00
Ray Strode
eb6d33782d 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.
2022-08-03 15:32:04 -04:00