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.
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.
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>
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>
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>
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>
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>
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.
Add a new option called ThemeDir to the configuration file, so a
configurable directory can be used to ship themes. The option applies
only to the theme specified in the same configuration file.
Hela Basa [Thu, 26 Aug 2021 19:04:56 +0000 (21:04 +0200)]
Translated using Weblate (Sinhala)
Currently translated at 14.2% (1 of 7 strings)
Co-authored-by: Hela Basa <r45xveza@pm.me>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/si/
Translation: plymouth/master
Liu Tao [Thu, 26 Aug 2021 19:04:56 +0000 (21:04 +0200)]
Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (7 of 7 strings)
Co-authored-by: Liu Tao <lyuutau@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/zh_CN/
Translation: plymouth/master
Ray Strode [Fri, 17 Jul 2020 20:06:44 +0000 (16:06 -0400)]
systemd: Add plymouth-switch-root-initramfs.service to switch back to initramfs on shutdown
Add a plymouth-switch-root-initramfs.service, which will call
"plymouth update-root-fs --new-root-dir=/run/initramfs" to switch back
to the initramfs (when applicable).
Systemd will run this service before plymouthd receives the SIGTERM on
shutdown, so this will cause the plymouthd-fd-escrow helper to run
from the initramfs.
This avoids the plymouthd-fd-escrow helper keeping the rootfs busy.
Changes by Hans de Goede:
- Fix a couple of typos
- Add Conflicts=dracut-shutdown.service to plymouth-switch-root-initramfs.service
dracut-shutdown.service restores the initramfs when it is _stopped_
use Conflicts to make sure its ExecStop has run before we do
- Add a check for switching back to the initramfs to on_newroot () and dump
the debug-buffer before the switch (while we still have access to /var/log).
- Also add plymouth-switch-root-initramfs.service to kexec.target.wants.
kexec.target.wants uses --mode=shutdown, so the plymouthd-fd-escrow helper
will run, so we need to switch to the initramfs.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Ray Strode [Mon, 29 Mar 2021 20:22:40 +0000 (22:22 +0200)]
main: Add a plymouthd-fd-escrow helper
When plymouth receives SIGTERM during shutdown or reboot, we must
exit cleanly to avoid keeping files open on the rootfs and to avoid
making drmModeSetCrtc () calls after the kms driver's shutdown method
has ran.
But at the same time we also want the boot-splash to stay up (in its
idle form) until the system actually reboots or powers off.
So we want to avoid the boot-splash getting replaced by e.g.
the text-console.
Add a plymouthd-fd-escrow helper which will get forked off when we
receive a SIGTERM in reboot/shutdown mode with pixel-displays active.
This helper will keep the fds for the pixel-displays open, so that
the boot-splash stays up until the end.
Changes by Hans de Goede:
- Start the escrow helper from main.c instead of from the drm plugin
- Rename the helper from plymouthd-drm-escrow to plymouthd-fd-escrow, since it
will be used to escrow fbdev fd-s too now
- In the child of the fork, continue with quiting normally (letting the
bootsplash become idle) instead of exiting directly
- Make plymouthd-fd-escrow a normal dynamic binary instead of a static binary,
the initrd already contains dynamic binaries so it does not have to be static
- Split the changes adding plymouth-switch-root-initramfs.service into a
separate patch
- Rewrite commit message
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Wed, 31 Mar 2021 12:58:11 +0000 (14:58 +0200)]
main: Dump debug log to plymouth-shutdown-debug.log on shutdown/reboot
When working on plymouth I always have "plymouth.debug=stream:/dev/null"
on the kernel commandline. This enables tracing without logging anything
to the console and causes the entire trace to be logged to
/var/log/plymouth-debug.log when plymouth quits.
This is very useful for debugging (non crash) issues with plymouth at boot.
With the recent "main: Cleanly quit on SIGTERM" change plymouth will now
also write a trace log to /var/log/plymouth-debug.log on shutdown/reboot,
but this will be overwritten again on boot by the boot log.
This commit changes the default debug_buffer_path value from:
/var/log/plymouth-debug.log to /var/log/plymouth-shutdown-debug.log
when in shutdown or reboot mode so that it does not get overwritten
by the debug-log written at boot.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Tue, 30 Mar 2021 11:35:04 +0000 (13:35 +0200)]
main: Cleanly quit on SIGTERM
Now that we are no longer unconditionally opting out of getting terminated,
we get send a SIGTERM when transitioning from the rootfs back to the initrd
on poweroff/reboot.
Catch this SIGTERM and then exit cleanly by calling the on_quit handler,
besides exiting cleanly being the right thing to do, this will also allow the
boot-splash to go idle, so that it can cleanly finish the end-animation.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Mon, 29 Mar 2021 09:05:01 +0000 (11:05 +0200)]
main: Only mark plymouthd as unkillable when running from the initrd
Before this commit plymouthd would always mark itself as "unkillable"
by setting "argv[0][0] = '@';" as documented here:
https://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons/
There are 2 problems with this:
1. This causes filesystems to fail to remount read-only in some case,
plymouthd may be holding open a deleted file (say an upgraded library).
If that happens, then the filesystem won't allow the disk to be remounted
read-only, because when plymouth dies, the filesystem will need to do I/O
to clean up the removed file from disk.
2. This causes the "gracefully shutdown" of displays which the kernel's
i915 driver recently introduced in commit fe0f1e3bfdfe ("drm/i915: Shut
down displays gracefully on reboot") to get undone. Because of being
"unkillable" plymouthd keeps running and showing the spinner animation
to the very end, this results in a drmModeSetCrtc () call after the i915
display driver has turned off the displays. This causes 2 issues:
2.1 This causes the screen to go black for 1-2 seconds and then show the
plymouth screen again for 1-2 seconds on poweroff/reboot which looks ugly:
https://bugzilla.redhat.com/show_bug.cgi?id=1941329
2.2 This may cause issues with the attached monitors on reboot, since it
undoes the gracefull shutdown which the i915 does.
Change the code to only set "argv[0][0] = '@';" when run from the initrd
at bootup, this solves the 2 mentioned issues and brings the code inline
with the above specification which says this should only ever be used for
daemons started from the initrd.
Note this will cause plymouth to get killed on shutdown, leading to the
last couple of text messages of shutdown being shown on shutdown.
This will be fixed by the next couple of patches.
Related: https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/118 Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1941329 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Tue, 30 Mar 2021 18:07:53 +0000 (20:07 +0200)]
ply-device-manager: Don't deactivate renderers from ply_device_manager_free ()
Don't deactivate renderers from ply_device_manager_free (),
ply_device_manager_free () is only ever called with the renderers still
active on a "plymouth quit --retain-splash".
Since the splash is being retained in this case the renderers should not be
deactivated. Normally this does not matter because plymouthd exits almost
immediately afterwards and the kernels will close the renderers fds on exit.
But with the upcoming plymouthd-drm-escrow binary which keeps the renderers
fds open, not deactivate renderers; and thus not dropping DRM master rights
does make a difference.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Sat, 27 Mar 2021 15:34:28 +0000 (16:34 +0100)]
details: Clear newly added text-display before replaying log messages
When switching between the "text" splash and the "details" splash the
"text" splash's hide function clears the console/terminal before
the "details" splash replays the log messages. So on each switch
the user sees all the log messages once.
But when switching between a graphical/pixel splash and details,
the console/terminal is not touched by the graphical splash's hide
function; and the details splash's hide function deliberately does
not clear the terminal on hide, so that when booting in detailed
mode, the log messages stay on the console when plymouth exits.
This means that when switching graphical-splash -> details ->
graphical-splash -> details, the second time the details splash
gets shown, the previous set of replayed log messages is still
on the terminal and all messages are now shown twice.
(and toggling back and forth a third time makes them all show 3
times, etc).
Fix this by clearing the terminal on show, before replaying the
log messages.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Sat, 27 Mar 2021 15:24:39 +0000 (16:24 +0100)]
text/tribar: Fix ply_boot_splash_hide () not clearing the terminal
In order to clear the console/terminal back to black again when hiding
the splash, we must restore the original terminal palette, so that
black actually is black before calling ply_text_display_clear_screen ().
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1933378 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Sat, 27 Mar 2021 15:13:26 +0000 (16:13 +0100)]
ply-text-display: Fix bottom pixels of fbcon not getting cleared
When fbcon is used for the console then there might be some unused
rows of pixels at the bottom because the screen's height in pixel
is not fully divideable by the font height. So the remaining few
rows of pixels at the bottom are unused.
The "text" splash changes the background color of the terminal and
then does a ply_text_display_clear_screen () to clear the console
to the new background color.
ply_text_display_clear_screen () was using "ESC [ 2 J" as control-sequence
to clear the screen. Which means "clear the entire screen" but fbcon
seems to not always count the unused bottom rows part of the "entire
screen", leaving them black.
Also send an "ESC [ 3 J" control-sequence when clearing the screen,
which means "clear the entire screen; and the scrollback-buffer".
Using this does consistenly result in the unused bottom rows always
being set to the background color.
This new behavior is esp. important when hiding the splash (e.g.
when quiting) because under some circumstances (1) the "ESC [ 2 J"
would clear the unused bottom rows to plymouth's background color
and then when hiding the splash it would not clear the unused rows,
leaving the unused rows set to plymouth's background color after
plymouth has quit.
Note the "ESC [ 2 J" control sequences is also still send because older
(serial) terminals may not support the "ESC [ 3 J" control sequence.
1) The exact circumstances when this happens are unclear
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1933378 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Sat, 27 Mar 2021 12:22:45 +0000 (13:22 +0100)]
ply-text-display: Only skip clearing the screen when tracing to a terminal
When the user has chosen to enable tracing to a file, so that the terminal
output stays the same as when not tracing, ply_text_display_clear_screen ()
should still clear the screen, as it does when not tracing.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Sat, 27 Mar 2021 12:20:29 +0000 (13:20 +0100)]
main: Redirect stdio/stderr to null when tracing to a file
When the user has chosen to enable tracing to a file, so that the terminal
output stays the same as when not tracing, we should still redirect
tdio/stderr to /dev/null as we do when not tracing.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Sat, 27 Mar 2021 12:07:32 +0000 (13:07 +0100)]
ply-logger: Add a ply_is_tracing_to_terminal () helper
Track if we are logging to the terminal (or to a file) and add
a new ply_is_tracing_to_terminal () helper.
This will be used in follow-up patches to replace some
ply_is_tracing () checks for things which should only be done
when tracing to a terminal (and not when tracing to a file).
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Gaël PORTAY [Fri, 18 Dec 2020 11:24:09 +0000 (06:24 -0500)]
main: Retain splash on on_show_splash() and on_hide_splash()
The function ply_device_manager_activate_keyboard() asserts for positive
file-descriptors.
However, the daemon aborts after the splash screen is shown again after
being hidden; the virtual terminal file-descriptor is -1 (i.e. plymouth
show-splash; plymouth hide-splash; plymouth-show-spash).
The three helpers on_show_splash(), on_hide_splash() and on_quit() share
the same function dump_details_and_quit_splash().
This function calls on_hide() and on_quit(); the later deallocates and
closes the virtual terminal if the flag should_retain_splash is not set.
This is always the case on both on_show_splash() and on_hide_splash().
Only on_quit() has the ability to set that flag. Therefore, the virtual
terminal is always deallocated and closed on on_hide_splash (), and in a
some condition on on_show_splash().
The virtual terminal is allocated by ply_device_manager_new() in the
function main() and it is deallocated in the function quit_program()
(i.e. at the begining and at the end of the daemon). The function
quit_program() is called either by on_quit() or by on_boot_splash_idle()
(on quit only, not on deactivate). The two helpers on_show_splash() and
on_hide_splash() *MUST NOT* dealocates and closes the virtual terminal.
This sets the flag should_retain_splash in both helpers on_show_splash()
and on_hide_splash() to prevent them from deallocation the virtual
terminal.
Fixes:
01:24:16.983 ply-event-loop.c:732:ply_event_loop_watch_fd : fd: 9
01:24:16.994 ply-boot-server.c:393:print_connection_process_identity : connection is from pid 8474 (plymouth show-splash) with parent pid 2137 (-ash)
01:24:16.994 ply-boot-server.c:492:ply_boot_connection_on_request : got show splash request
01:24:16.994 main.c:832:plymouth_should_ignore_show_splash_calls : checking if plymouth should be running
01:24:16.994 main.c:933:on_show_splash : at least one display already available, so loading splash
01:24:16.994 main.c:864:plymouth_should_show_default_splash : checking if plymouth should show default splash
01:24:16.994 main.c:892:plymouth_should_show_default_splash : using default splash because kernel command line has option "splash"
01:24:16.994 main.c:445:show_default_splash : Showing splash screen
01:24:16.994 main.c:459:show_default_splash : Trying distribution default splash
01:24:16.994 main.c:1692:load_theme : Loading boot splash theme '/usr/share/plymouth/themes/spinner/spinner.plymouth'
01:24:16.995 ply-key-file.c:175:ply_key_file_load_group : trying to load group Plymouth Theme
01:24:16.995 ply-key-file.c:175:ply_key_file_load_group : trying to load group two-step
01:24:16.995 ply-key-file.c:175:ply_key_file_load_group : trying to load group boot-up
01:24:16.995 ply-key-file.c:175:ply_key_file_load_group : trying to load group shutdown
01:24:16.995 ply-key-file.c:175:ply_key_file_load_group : trying to load group reboot
01:24:16.995 ply-key-file.c:175:ply_key_file_load_group : trying to load group updates
01:24:16.995 ply-key-file.c:175:ply_key_file_load_group : trying to load group system-upgrade
01:24:16.996 ply-key-file.c:175:ply_key_file_load_group : trying to load group firmware-upgrade
01:24:16.996 ply-key-file.c:262:ply_key_file_load_groups : key file has no more groups
01:24:16.996 plugin.c:1030:create_plugin : Using '/usr/share/plymouth/themes/spinner' as working directory
01:24:16.996 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'ProgressBarHorizontalAlignment'
01:24:16.996 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'ProgressBarVerticalAlignment'
01:24:16.996 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'ProgressBarWidth'
01:24:16.996 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'ProgressBarHeight'
01:24:16.996 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'SuppressMessages'
01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'ProgressBarShowPercentComplete'
01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'UseProgressBar'
01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'UseFirmwareBackground'
01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'Title'
01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'SubTitle'
01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'SuppressMessages'
01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'ProgressBarShowPercentComplete'
01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'UseProgressBar'
01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'UseFirmwareBackground'
01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'Title'
01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'SubTitle'
01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'SuppressMessages'
01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'ProgressBarShowPercentComplete'
01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'UseProgressBar'
01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'UseFirmwareBackground'
01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'Title'
01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'SubTitle'
01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'UseFirmwareBackground'
01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'UseFirmwareBackground'
01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'UseFirmwareBackground'
01:24:17.332 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'DialogClearsFirmwareBackground'
01:24:17.332 ply-key-file.c:359:ply_key_file_get_raw_value : key file does not have entry for key 'ProgressFunction'
01:24:17.332 main.c:1708:load_theme : attaching plugin to event loop
01:24:17.332 main.c:1711:load_theme : attaching progress to plugin
01:24:17.332 ply-boot-splash.c:138:ply_boot_splash_add_pixel_display : adding 1920x1080 pixel display
01:24:17.332 plugin.c:1563:add_pixel_display : adding pixel display to plugin
01:24:17.332 ply-device-manager.c:1028:ply_device_manager_activate_renderer: activating renderers
01:24:17.332 plugin.c:918:activate : taking master and scanning out
01:24:17.332 ply-terminal.c:242:ply_terminal_unlock : couldn't unlock terminal settings: Bad file descriptor
01:24:17.332 plugin.c:693:ply_renderer_head_set_scan_out_buffer : Setting scan out buffer of 1920x1080 head to our buffer
01:24:17.333 plugin.c:1693:flush_head : Needed to reset scan out buffer on 1920x1080 renderer head
01:24:17.334 ply-boot-splash.c:486:ply_boot_splash_show : showing splash screen
01:24:17.334 plugin.c:1621:show_splash_screen : loading lock image
01:24:17.335 plugin.c:1626:show_splash_screen : loading box image
01:24:17.335 plugin.c:1635:show_splash_screen : loading corner image
01:24:17.335 plugin.c:1644:show_splash_screen : loading header image
01:24:17.335 plugin.c:1653:show_splash_screen : loading background tile image
01:24:17.335 plugin.c:1681:show_splash_screen : loading watermark image
01:24:17.335 plugin.c:615:view_load : loading entry
01:24:17.340 ply-keymap-icon.c:158:ply_keymap_icon_load : loading '/usr/share/plymouth/themes/spinner/keyboard.png': success
01:24:17.495 ply-keymap-icon.c:165:ply_keymap_icon_load : loading '/usr/share/plymouth/themes/spinner/keymap-render.png': success
01:24:17.496 plugin.c:625:view_load : loading progress animation
01:24:17.497 ply-progress-animation.c:373:ply_progress_animation_add_frames: could not find any progress animation frames
01:24:17.497 plugin.c:627:view_load : optional progress animation wouldn't load
01:24:17.498 plugin.c:636:view_load : loading throbber
01:24:17.531 plugin.c:1697:show_splash_screen : starting boot animations
01:24:17.531 plugin.c:1336:start_progress_animation : starting animation
01:24:17.587 ply-terminal.c:242:ply_terminal_unlock : couldn't unlock terminal settings: Bad file descriptor
01:24:17.599 ply-terminal.c:242:ply_terminal_unlock : couldn't unlock terminal settings: Bad file descriptor
01:24:17.599 ply-device-manager.c:1061:ply_device_manager_activate_keyboard: activating keyboards
Assertion failed: fd >= 0 (ply-event-loop.c: ply_event_loop_watch_fd: 732)
Aborted
Gaël PORTAY [Fri, 18 Dec 2020 17:12:54 +0000 (12:12 -0500)]
two-step: Links against libintl.so if LNS
The plugin two-step cannot be loaded on a system based on the musl libc
library.
01:25:00.427 ply-utils.c:536:ply_open_module : Could not load module "/usr/lib/plymouth/two-step.so": Error relocating /usr/lib/plymouth/two-step.so: libintl_dgettext: symbol not found
The utilities ldd and objdump reports the missing symbol:
The story is much complicated, however, the autotools does the magic.
The GNU gettext FAQ[1] says explicitly that if the program's final link
command does not contain the option -lintl...
> In this case it's likely a bug in the package you are building: The
package's Makefiles should make sure that “-lintl” is used where needed.
Autoconf sets both variables LIBINTL and LTLIBINTL with the appropriate
link options if NLS is being used. These variables are left empty if the
option --disable-nls is set at the configure step.
This links the plugin two-step to libintl by adding the libtool variable
LTLIBINTL to the list of the plugin's libraries to link with.
Note: The plugin two-step loads fine on a system based on the glibc
library (without this commit). The plugin uses the intermediate symbol
dcgettext which is implemented by the glibc instead of the remapped
symbol libintl_gettext which is implemented by gettext in libintl.
However, this commit changes nothing for system based on glibc as the
magic of the Autoconf leaves the LIBINTL and LTLIBINTL empty even if the
NLS is being used.