]> git.ipfire.org Git - thirdparty/plymouth.git/log
thirdparty/plymouth.git
2 years agowip! main: Keep detailed splash around always multiple-splashes-at-once-yay
Ray Strode [Thu, 20 Oct 2022 17:22:37 +0000 (13:22 -0400)] 
wip! main: Keep detailed splash around always

If a machine has a serial console and local VT, we would ideally
show graphics on the local VT and text on the serial console.

Right now we degenerate, showing text on both.

This commit creates two splashes, one detailed and one primary,
and uses the detailed for serial consoles, and the primary
for the local vt.

2 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

2 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
2 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

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

2 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

2 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.

2 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

2 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>
2 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

2 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.

2 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

2 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>
2 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>
2 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

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

2 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

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

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

2 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

2 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

2 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

2 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.

2 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

2 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.

3 years agoscript: Enforce separate lines for function parameters
Ray Strode [Mon, 4 Apr 2022 19:40:52 +0000 (15:40 -0400)] 
script: Enforce separate lines for function parameters

The moment it's possible to sneak in functions like:

static void
foo (int param1, int param2)
{
}

when the style requires parameters on separate lines.

This updates the uncrustify config to account for that.

3 years agoMerge branch 'check-shell-before-merge' into 'main' landing-spot
Ray Strode [Fri, 1 Apr 2022 16:17:03 +0000 (16:17 +0000)] 
Merge branch 'check-shell-before-merge' into 'main'

.gitlab-ci: Check for shell errors in CI

See merge request plymouth/plymouth!172

3 years ago.gitlab-ci: Check for shell errors in CI
Ray Strode [Fri, 1 Apr 2022 16:09:45 +0000 (12:09 -0400)] 
.gitlab-ci: Check for shell errors in CI

Recently a shell error snuck into CI and I didn't notice it because
it was in the tail end of a short-circuited conditional.

This commit adds a little shell validation to CI to avoid that
sort of thing in the future.

3 years agoMerge branch 'plymouth-set-default-theme' into 'main'
Ray Strode [Fri, 1 Apr 2022 14:47:58 +0000 (14:47 +0000)] 
Merge branch 'plymouth-set-default-theme' into 'main'

scripts: plymouth-set-default-theme reporting missing right brace

See merge request plymouth/plymouth!171

3 years agoscripts: plymouth-set-default-theme reporting missing right brace
Eric Curtin [Fri, 1 Apr 2022 13:13:23 +0000 (14:13 +0100)] 
scripts: plymouth-set-default-theme reporting missing right brace

Fixes issue:

/usr/sbin/plymouth-set-default-theme: line 199: [: missing `]'

when executed as plymouth-set-default-theme spinner

3 years agoMerge branch 'tt-keyfilter' into 'main'
Ray Strode [Tue, 29 Mar 2022 17:49:52 +0000 (17:49 +0000)] 
Merge branch 'tt-keyfilter' into 'main'

core, script: add support for filtering input characters in plugins

See merge request plymouth/plymouth!169

3 years agocore, script: add support for validating input characters in plugins
Timo Teräs [Tue, 1 Sep 2020 09:51:43 +0000 (12:51 +0300)] 
core, script: add support for validating input characters in plugins

This adds also '\e' to be parsed as escape character in script strings.

Together these allow possibility to create scripts that allow only
numeric PINs, and prevent switching to text mode.

3 years agoMerge branch 'set-default-theme-improvements' into 'main'
Ray Strode [Mon, 28 Mar 2022 16:26:46 +0000 (16:26 +0000)] 
Merge branch 'set-default-theme-improvements' into 'main'

Improve plymouth-set-default-theme a bit

Closes #174

See merge request plymouth/plymouth!167

3 years agoscripts: Support -R with -r and standalone for plymouth-set-default-theme
Ray Strode [Mon, 21 Mar 2022 19:13:15 +0000 (15:13 -0400)] 
scripts: Support -R with -r and standalone for plymouth-set-default-theme

Right now plymouth-set-default-theme only supports rebuilding the initrd if a theme
is passed explicitly.

This commit improves the script to also work for --reset and even in a
standalone mode where no theme is passed at all.

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

3 years agoscripts: Support short options being squished togethers for plymouth-set-default...
Ray Strode [Mon, 21 Mar 2022 19:10:30 +0000 (15:10 -0400)] 
scripts: Support short options being squished togethers for plymouth-set-default-theme

People expect to be able to squish short options together, so
this commit adds some glob matching to support that feature.

3 years agoMerge branch 'mem-leak' into 'main'
Ray Strode [Mon, 28 Mar 2022 15:30:38 +0000 (15:30 +0000)] 
Merge branch 'mem-leak' into 'main'

client: fix memory leak state.client and state.loop

See merge request plymouth/plymouth!170

3 years agoevent-loop: change assert to just check for is_running
Eric Curtin [Mon, 28 Mar 2022 14:58:27 +0000 (15:58 +0100)] 
event-loop: change assert to just check for is_running

Simlify assert in ply_event_loop_free, to check that the event loop is
not running.

3 years agocommand-parser: add more free's
Eric Curtin [Mon, 28 Mar 2022 14:55:06 +0000 (15:55 +0100)] 
command-parser: add more free's

A couple of resources not free'd

3 years agoclient: call cleanup functions everytime we return from main
Eric Curtin [Mon, 28 Mar 2022 14:52:49 +0000 (15:52 +0100)] 
client: call cleanup functions everytime we return from main

We were not cleaning up allocated resources in many of the code
execution paths in main()

3 years agoMerge branch 'script-password-argument' into 'main'
Ray Strode [Fri, 25 Mar 2022 20:00:49 +0000 (20:00 +0000)] 
Merge branch 'script-password-argument' into 'main'

script: add password argument to display password callback

Closes #150

See merge request plymouth/plymouth!166

3 years agoscript: add String.Length function
Mateusz Piórkowski [Fri, 4 Mar 2022 18:23:45 +0000 (19:23 +0100)] 
script: add String.Length function

Add String.Length function which returns the length of a string.
It will make it possible to get the number of bullets from the
display prompt callback inside scripts.

3 years agoAdd display_prompt function
Mateusz Piórkowski [Fri, 4 Mar 2022 18:15:23 +0000 (19:15 +0100)] 
Add display_prompt function

Add display_prompt function which will be called for both passwords
and questions. This will make it possible to get a plaintext password
string.
SetDisplayPromptFunction will make it possible to set this callback
from a theme script.

Closes #150

3 years agoMerge branch 'device-manager-fbdev-add-after-timeout' into 'main'
Ray Strode [Mon, 7 Mar 2022 18:34:10 +0000 (18:34 +0000)] 
Merge branch 'device-manager-fbdev-add-after-timeout' into 'main'

ply-device-manager: Accept new simpledrm/fbdev devices from udev events after timeout

Closes #167

See merge request plymouth/plymouth!165

3 years agoply-device-manager: Accept new simpledrm/fbdev devices from udev events after timeout
Hans de Goede [Mon, 28 Feb 2022 15:46:34 +0000 (16:46 +0100)] 
ply-device-manager: Accept new simpledrm/fbdev devices from udev events after timeout

Before the device-timeout elapses verify_add_or_change () blocks new
simpledrm and fbdev getting added through udev add events because we
really only want native drm devices.

Then when the timeout triggers the list of udev devices existing at
that point int time is rescanned and any drm (including simpledrm) and
fbdev devices are added (filtering out duplicates).

But what if a simpledrm or fbdev device for some reason only shows
up after the timeout? Before this change those would then be ignored
for ever.

Add a manager->device_timeout_elapsed check and make verify_add_or_change ()
accept any drm + fbdev devices after the timeout. Note this addresses
a mostly theoretically issue since in practice a simpledrm or fbdev device
showing up later is very unlikely.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
3 years agoply-device-manager: verify_add_or_change(): Move local_console_is_text check
Hans de Goede [Mon, 28 Feb 2022 15:36:58 +0000 (16:36 +0100)] 
ply-device-manager: verify_add_or_change(): Move local_console_is_text check

Move the local_console_is_text check outside of the
"if (subsytem == SUBSYSTEM_DRM)" block.

This check is equally relevant for SUBSYSTEM_FRAME_BUFFER.

Note by itself this is a no-op since verify_add_or_change() *always*
returns false for SUBSYSTEM_FRAME_BUFFER devices.

This is a preparation patch for making verify_add_or_change() not
return false when manager->device_timeout_elapsed is set.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
3 years agoMerge branch 'simpledrm-enumeration' into 'main'
Ray Strode [Mon, 7 Mar 2022 13:34:00 +0000 (13:34 +0000)] 
Merge branch 'simpledrm-enumeration' into 'main'

ply-device-manager: Treat SimpleDRM drm devices as fbdev devices

Closes #167

See merge request plymouth/plymouth!163

3 years agoply-device-manager: Treat SimpleDRM drm devices as fbdev devices
Hans de Goede [Mon, 28 Feb 2022 15:07:11 +0000 (16:07 +0100)] 
ply-device-manager: Treat SimpleDRM drm devices as fbdev devices

Simple-framebuffer devices driven by simpledrm lack information
like panel-rotation info and physical size, causing the splash
to briefly render on its side / without HiDPI scaling, switching
to the correct rendering when the native driver loads.

To avoid this treat simpledrm devices as fbdev devices and only
use them after the timeout.

Also adds 2 exceptions to this:

1. If nomodeset is passed on the kernel commandline then no native
drivers will load, so in this case it is best to immediately use
SimpleDRM devices when they are detected.

2. On some devics the firmware leave the panel black at boot. In this
case it is desirable to show the splash to the user ASAP so that there
is some visual feedback that the device is booting. Add a support for a
"plymouth.use-simpledrm" kernel cmdline option to show the splash
immediately on SimpleDRM devices rather then waiting for the native
driver to load.

Closes #167

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
3 years agoply-utils: Reintroduce ply_string_has_prefix helper
Hans de Goede [Mon, 7 Mar 2022 11:25:56 +0000 (12:25 +0100)] 
ply-utils: Reintroduce ply_string_has_prefix helper

ply_string_has_prefix was dropped in commit c7965ea19abf ("ply-utils:
Drop unused ply_string_has_prefix helper"). We have a need for this
helper again, so reintroduce it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
3 years agoMerge branch 'misc-cleanups' into 'main'
Ray Strode [Mon, 28 Feb 2022 18:56:25 +0000 (18:56 +0000)] 
Merge branch 'misc-cleanups' into 'main'

Misc. cleanups

See merge request plymouth/plymouth!164

3 years agoply-device-manager: Remove unnecessary subsystem != NULL check
Hans de Goede [Mon, 28 Feb 2022 15:20:43 +0000 (16:20 +0100)] 
ply-device-manager: Remove unnecessary subsystem != NULL check

The ply-device-manager.c already assumes that the return value of
udev_device_get_subsystem () is never NULL in many places, including
in the condition of the "else if" just below the check which is
being removed.

Remove the one lonely check for it being NULL for consistency.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
3 years agoply-device-manager: Fix double-assignment of subsystem
Hans de Goede [Mon, 28 Feb 2022 15:17:53 +0000 (16:17 +0100)] 
ply-device-manager: Fix double-assignment of subsystem

The subsystem variable is also initialized with udev_device_get_subsystem ()
a couple of lines lower.

Remove the first initialization, so that udev_device_get_subsystem ()
does not get called unnecessary when the function exits early because
of the action value.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
3 years agogitignore: Add plymouthd-fd-escrow to gitignore
Hans de Goede [Mon, 28 Feb 2022 15:16:48 +0000 (16:16 +0100)] 
gitignore: Add plymouthd-fd-escrow to gitignore

Add the new plymouthd-fd-escrow binary to gitignore.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
3 years agoMerge branch 'main' into 'main'
Ray Strode [Tue, 22 Feb 2022 15:41:50 +0000 (15:41 +0000)] 
Merge branch 'main' into 'main'

Add support for CSI sequences

Closes #166

See merge request plymouth/plymouth!162

3 years agoAdd support for CSI sequences
Mateusz Piórkowski [Tue, 22 Feb 2022 15:41:49 +0000 (15:41 +0000)] 
Add support for CSI sequences

3 years agoMerge branch 'ignore-clangd-files' into 'main'
Ray Strode [Wed, 16 Feb 2022 21:57:40 +0000 (21:57 +0000)] 
Merge branch 'ignore-clangd-files' into 'main'

Ignore generated files required by clangd

See merge request plymouth/plymouth!160

3 years agoIgnore generated files required by clangd
Hans Christian Schmitz [Tue, 1 Feb 2022 14:42:06 +0000 (15:42 +0100)] 
Ignore generated files required by clangd

Also add .dirstamp which seems to be generated by
autoconf/automake/make.

`compile_commands.json` is also used by standalone `clang-tidy`

3 years agoMerge branch 'reproducible-build-fix' into 'main'
Ray Strode [Tue, 15 Feb 2022 20:16:04 +0000 (20:16 +0000)] 
Merge branch 'reproducible-build-fix' into 'main'

configure: Generate version from date of last commit not current date

See merge request plymouth/plymouth!158

3 years agoconfigure: Generate version from date of last commit not current date
Ray Strode [Tue, 15 Feb 2022 18:34:39 +0000 (13:34 -0500)] 
configure: Generate version from date of last commit not current date

Using the date at build time prevents the build from being reproducible
later.

In order to facilitate reproducible builds, this commit changes the
logic to derive the version from the date of the last commit.

3 years agoMerge branch 'romanian-translation' into 'main'
Ray Strode [Mon, 7 Feb 2022 18:00:12 +0000 (18:00 +0000)] 
Merge branch 'romanian-translation' into 'main'

Add Romanian translation

See merge request plymouth/plymouth!155

3 years agoAdd Romanian translation
Sergiu Bivol [Sun, 6 Feb 2022 22:30:37 +0000 (22:30 +0000)] 
Add Romanian translation

3 years agoMerge branch 'fix-buffer' into 'main'
Ray Strode [Sat, 15 Jan 2022 05:02:37 +0000 (05:02 +0000)] 
Merge branch 'fix-buffer' into 'main'

drm: do not reset the buffer twice

See merge request plymouth/plymouth!152

3 years agodrm: Retry setting scanout buffer on failure
Oleg Solovyov [Wed, 8 Dec 2021 16:15:47 +0000 (19:15 +0300)] 
drm: Retry setting scanout buffer on failure

Plymouth currently assumes that setting the scanout buffer will succeed.
if it fails because of a driver bug or transient failure it should try
again next frame.

This commit adds that error handling code.

3 years agoMerge branch 'version-naming-change' into 'main' 22.02.122
Ray Strode [Tue, 11 Jan 2022 17:10:11 +0000 (17:10 +0000)] 
Merge branch 'version-naming-change' into 'main'

autogoo: Determine project version from date

See merge request plymouth/plymouth!153

3 years agoautogoo: Determine project version from date
Ray Strode [Tue, 11 Jan 2022 15:17:59 +0000 (10:17 -0500)] 
autogoo: Determine project version from date

Numbers are arbitrary, and we've never successfully made it to
version 1.0 after like 15 years or something.

Furthermore, plymouth has a very slow release schedule at present
and some distros hate building from git.

So, I'd like to start generating tarballs more regularly.

Adopting a version number derived from the date will help facilitate
that.

This commit changes AC_INIT to compute the version automatically.

https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/143
https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/158

3 years agoMerge branch 'wip/use-logo-file' into 'main'
Ray Strode [Tue, 11 Jan 2022 14:35:27 +0000 (14:35 +0000)] 
Merge branch 'wip/use-logo-file' into 'main'

spinfinity: use logo file passed to configure

See merge request plymouth/plymouth!110

3 years agospinfinity: use logo file passed to configure
Ray Strode [Mon, 20 Apr 2020 20:20:52 +0000 (16:20 -0400)] 
spinfinity: use logo file passed to configure

At the moment we hardcode the header to a logo file that ships
in fedora.

This commit changes it to use the logo configured by the distro.

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

3 years agoMerge branch 'weblate-plymouth-master' into 'main'
Ray Strode [Tue, 11 Jan 2022 14:26:24 +0000 (14:26 +0000)] 
Merge branch 'weblate-plymouth-master' into 'main'

Translations update from Weblate

See merge request plymouth/plymouth!146

3 years agoTranslated using Weblate (Belarusian)
Yauhen Bugamol [Sat, 25 Sep 2021 19:05:03 +0000 (21:05 +0200)] 
Translated using Weblate (Belarusian)

Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: Yauhen Bugamol <3abac@3a.by>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/be/
Translation: plymouth/master

3 years agoMerge branch 'add_croatian_language' into 'main'
Ray Strode [Tue, 11 Jan 2022 14:25:37 +0000 (14:25 +0000)] 
Merge branch 'add_croatian_language' into 'main'

Add Croatian language

See merge request plymouth/plymouth!148

3 years agoAdd Croatian language
muzena [Fri, 29 Oct 2021 15:13:57 +0000 (17:13 +0200)] 
Add Croatian language

3 years agoMerge branch 'fix-configure-help-string' into 'main'
Ray Strode [Tue, 11 Jan 2022 14:24:31 +0000 (14:24 +0000)] 
Merge branch 'fix-configure-help-string' into 'main'

configure: Fix help string for --with-background-end-color-stop

See merge request plymouth/plymouth!149

3 years agoconfigure: Fix help string for --with-background-end-color-stop
João Paulo Rechi Vita [Wed, 10 Nov 2021 21:33:22 +0000 (16:33 -0500)] 
configure: Fix help string for --with-background-end-color-stop

Looks like it was copied from --with-background-start-color-stop and
never updated to reflect the option it is describing.

3 years agoMerge branch 'fix-twostep-comments' into 'main'
Ray Strode [Tue, 11 Jan 2022 14:23:40 +0000 (14:23 +0000)] 
Merge branch 'fix-twostep-comments' into 'main'

two-step: Fix typos and missing words in comments

See merge request plymouth/plymouth!150

3 years agotwo-step: Fix typos and missing words in comments
João Paulo Rechi Vita [Thu, 11 Nov 2021 00:49:47 +0000 (19:49 -0500)] 
two-step: Fix typos and missing words in comments