Package: plymouth
Version: 24.004.60-2
Tags: patch upstream
Forwarded: https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/340
Plymouth has an initramfs-tools hook [1] which will (among other things)
install the "label-pango.so" module. There's also a separate hook [2] which is
used by dracut(-ng) [3][4], which will "not" install "label-pango.so" (though
it will install "label-freetype.so").
That means that there's no text output possible from e.g. "emerald" (Debians
default theme from the desktop-base package) when doing things like unlocking
encrypted volumes during boot.
A simple fix for now is to always include "label-pango.so" together with
"label-freetype.so" (if found), patch attached.
[1]
https://salsa.debian.org/debian/plymouth/-/blob/debian/debian/local/plymouth.hook
[2]
https://salsa.debian.org/debian/plymouth/-/blob/debian/scripts/plymouth-populate-initrd.in
[3]
https://salsa.debian.org/debian/dracut/-/blob/master/modules.d/50plymouth/module-setup.sh
[4]
https://github.com/dracut-ng/dracut-ng/blob/cf676056df694b6957ada08ab091023002c42c76/modules.d/45plymouth/module-setup.sh#L39
From 62fda295c618a06bb809c9b3f419aad36d7df24b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20H=C3=A4rdeman?= <[email protected]>
Date: Sun, 19 Jan 2025 11:47:28 +0100
Subject: [PATCH] scripts: include label-pango.so in initrd
Debians dracut package uses plymouth-populate-initrd to include plymouth
in the built initrd. However, the label-pango.so module won't be
included by that script, meaning that prompts won't show any text labels
for the default theme on Debian (emerald, from the desktop-base
package, the reason this isn't a bigger issue is that Debian defaults to
using initramfs-tools, and not dracut).
Including label-pango.so in addition to label-freetype.so fixes that and
shouldn't have any ill effects on other platforms.
---
scripts/plymouth-populate-initrd.in | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/scripts/plymouth-populate-initrd.in b/scripts/plymouth-populate-initrd.in
index 20614a22..47f77173 100755
--- a/scripts/plymouth-populate-initrd.in
+++ b/scripts/plymouth-populate-initrd.in
@@ -601,12 +601,19 @@ DEFAULT_FONT=$(fc-match -f %{file} 2> /dev/null)
DEFAULT_MONOSPACE_FONT=$(fc-match -f %{file} monospace 2> /dev/null)
[ ! -z "$DEFAULT_MONOSPACE_FONT" ] && inst "$DEFAULT_MONOSPACE_FONT" $INITRDDIR
-if [ -f "${PLYMOUTH_PLUGIN_PATH}/label-freetype.so" ]; then
- inst ${PLYMOUTH_PLUGIN_PATH}/label-freetype.so $INITRDDIR
- # The label-freetype plugin expects it at this location
- mkdir -p $INITRDDIR/usr/share/fonts
- [ ! -z "$DEFAULT_FONT" ] && ln -s "$DEFAULT_FONT" $INITRDDIR/usr/share/fonts/Plymouth.ttf
- [ ! -z "$DEFAULT_MONOSPACE_FONT" ] && ln -s "$DEFAULT_MONOSPACE_FONT" $INITRDDIR/usr/share/fonts/Plymouth-monospace.ttf
+if [ -f "${PLYMOUTH_PLUGIN_PATH}/label-freetype.so" ] || [ -f "${PLYMOUTH_PLUGIN_PATH}/label-pango.so" ]; then
+ if [ -f "${PLYMOUTH_PLUGIN_PATH}/label-freetype.so" ]; then
+ inst ${PLYMOUTH_PLUGIN_PATH}/label-freetype.so $INITRDDIR
+ fi
+
+ if [ -f "${PLYMOUTH_PLUGIN_PATH}/label-pango.so" ]; then
+ inst ${PLYMOUTH_PLUGIN_PATH}/label-pango.so $INITRDDIR
+ fi
+
+ # The label-freetype plugin expects it at this location
+ mkdir -p $INITRDDIR/usr/share/fonts
+ [ ! -z "$DEFAULT_FONT" ] && ln -s "$DEFAULT_FONT" $INITRDDIR/usr/share/fonts/Plymouth.ttf
+ [ ! -z "$DEFAULT_MONOSPACE_FONT" ] && ln -s "$DEFAULT_MONOSPACE_FONT" $INITRDDIR/usr/share/fonts/Plymouth-monospace.ttf
fi
if [ -L ${PLYMOUTH_SYSROOT}${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth ]; then
--
2.47.1