Accepting request 1031464 from Base:System

OBS-URL: https://build.opensuse.org/request/show/1031464
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/plymouth?expand=0&rev=117
This commit is contained in:
Dominique Leuenberger 2022-10-28 17:29:07 +00:00 committed by Git OBS Bridge
commit 9b5de25ff0
10 changed files with 72 additions and 1528 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,32 +0,0 @@
From 2c4145e4b7e146541ba8e33aee5e0125423d97bc Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.com>
Date: Wed, 20 Jan 2016 14:03:18 +0100
Subject: [PATCH 2/2] Install label-ft plugin into initrd, if available
It is small and useful enough to include it by default.
Signed-off-by: Fabian Vogt <fvogt@suse.com>
---
scripts/plymouth-populate-initrd.in | 9 +++++++++
1 file changed, 9 insertions(+)
Index: b/scripts/plymouth-populate-initrd.in
===================================================================
--- a/scripts/plymouth-populate-initrd.in
+++ b/scripts/plymouth-populate-initrd.in
@@ -523,6 +523,15 @@ if [ -L "${PLYMOUTH_WATERMARK_PATH}" ];
inst_symlink "${PLYMOUTH_WATERMARK_PATH}"
fi
+if [ -f "${PLYMOUTH_PLUGIN_PATH}/label-ft.so" ]; then
+ inst ${PLYMOUTH_PLUGIN_PATH}/label-ft.so $INITRDDIR
+ font=$(fc-match -f %{file})
+ inst "$font" $INITRDDIR
+ # The label-ft plugin expects it at this location
+ mkdir -p $INITRDDIR/usr/share/fonts
+ ln -s "$font" $INITRDDIR/usr/share/fonts/Plymouth.ttf
+fi
+
if [ -L ${PLYMOUTH_SYSROOT}${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth ]; then
cp -a ${PLYMOUTH_SYSROOT}${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth $INITRDDIR${PLYMOUTH_DATADIR}/plymouth/themes
fi

View File

@ -1,36 +0,0 @@
From 99ee02fe20ae53323fe5756416e6a7d96a3baf8a Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.com>
Date: Thu, 21 Jan 2016 10:39:21 +0100
Subject: [PATCH 1/3] ply-label: Don't crash if label plugin fails
The label plugin's create_control function can return NULL if allocation
failed, for example, but ply-label.c ignores that and uses the NULL control,
causing various SEGVs.
Signed-off-by: Fabian Vogt <fvogt@suse.com>
---
src/libply-splash-graphics/ply-label.c | 8 ++++++++
1 file changed, 8 insertions(+)
Index: plymouth-0.9.2/src/libply-splash-graphics/ply-label.c
===================================================================
diff -Nura plymouth-0.9.5+git20200921+20778f2/src/libply-splash-graphics/ply-label.c plymouth-0.9.5+git20200921+20778f2_new/src/libply-splash-graphics/ply-label.c
--- plymouth-0.9.5+git20200921+20778f2/src/libply-splash-graphics/ply-label.c 2020-10-05 23:11:23.011964608 +0800
+++ plymouth-0.9.5+git20200921+20778f2_new/src/libply-splash-graphics/ply-label.c 2020-10-05 23:17:39.139340680 +0800
@@ -130,6 +130,15 @@
label->control = label->plugin_interface->create_control ();
+ if (label->control == NULL) {
+ ply_save_errno ();
+ label->plugin_interface = NULL;
+ ply_close_module (label->module_handle);
+ label->module_handle = NULL;
+ ply_restore_errno ();
+ return false;
+ }
+
if (label->text != NULL)
label->plugin_interface->set_text_for_control (label->control,
label->text);

View File

@ -1,21 +0,0 @@
From: Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com>
Subject: fix alignment for label-ft
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.
--- plymouth-0.9.5+git20211018.orig/src/plugins/controls/label-ft/plugin.c
+++ plymouth-0.9.5+git20211018/src/plugins/controls/label-ft/plugin.c
@@ -324,9 +324,9 @@ draw_control (ply_label_plugin_control_t
/* Start at start position (alignment) */
if(label->alignment == PLY_LABEL_ALIGN_CENTER)
- pen.x += (label->width - width_of_line(label, cur_c)) << 5;
+ pen.x += (label->area.width - width_of_line(label, cur_c)) << 5;
else if(label->alignment == PLY_LABEL_ALIGN_RIGHT)
- pen.x += (label->width - width_of_line(label, cur_c)) << 6;
+ pen.x += (label->area.width - width_of_line(label, cur_c)) << 6;
while(*cur_c && *cur_c != '\n')
{

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f7e79cdf8284ed2ca7f274c604345b9258d3583e8ea0749d59e88cd19cba8ad0
size 7017620

BIN
plymouth-22.02.122+94.4bd41a3.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -6,13 +6,10 @@ DRM does not work well with cirrus and bochs (no display) but the framebuffer dr
prevents DRM drivers from loading.
As we need to support cirrus for libvirt and bochs for QEMU, we cannot just remove support for frame-buffer.
Index: plymouth-0.9.3+git20180807.7663b0c/src/libply-splash-core/ply-device-manager.c
===================================================================
diff -Nura plymouth-22.02.122+77.c09c651/src/libply-splash-core/ply-device-manager.c plymouth-22.02.122+77.c09c651_new/src/libply-splash-core/ply-device-manager.c
--- plymouth-22.02.122+77.c09c651/src/libply-splash-core/ply-device-manager.c 2022-10-06 07:38:29.000000000 +0800
+++ plymouth-22.02.122+77.c09c651_new/src/libply-splash-core/ply-device-manager.c 2022-10-07 00:22:51.532816241 +0800
@@ -312,6 +312,18 @@
diff -Nura plymouth-22.02.122+94.4bd41a3/src/libply-splash-core/ply-device-manager.c plymouth-22.02.122+94.4bd41a3_new/src/libply-splash-core/ply-device-manager.c
--- plymouth-22.02.122+94.4bd41a3/src/libply-splash-core/ply-device-manager.c 2022-10-26 19:09:02.000000000 +0800
+++ plymouth-22.02.122+94.4bd41a3_new/src/libply-splash-core/ply-device-manager.c 2022-10-27 00:07:06.605777003 +0800
@@ -316,6 +316,18 @@
subsystem = udev_device_get_subsystem (device);
ply_trace ("device subsystem is %s", subsystem);
@ -31,7 +28,7 @@ diff -Nura plymouth-22.02.122+77.c09c651/src/libply-splash-core/ply-device-manag
if (strcmp (subsystem, SUBSYSTEM_DRM) == 0) {
if (!manager->device_timeout_elapsed && !verify_drm_device (device)) {
ply_trace ("ignoring since we only handle SimpleDRM devices after timeout");
@@ -319,10 +331,18 @@
@@ -323,10 +335,18 @@
}
ply_trace ("found DRM device %s", device_path);
renderer_type = PLY_RENDERER_TYPE_DRM;
@ -48,6 +45,6 @@ diff -Nura plymouth-22.02.122+77.c09c651/src/libply-splash-core/ply-device-manag
+ else if (!fb_device_has_drm_device (manager, device)) {
+ ply_trace ("avoiding use of framebuffer to not block DRM drivers from working");
+ }
else if (force_fb)
renderer_type = PLY_RENDERER_TYPE_FRAME_BUFFER;
else
ply_trace ("ignoring, since there's a DRM device associated with it");
}

View File

@ -1,8 +1,30 @@
Index: plymouth-22.02.122+64.0b0e93c_new/src/plugins/splash/two-step/plugin.c
===================================================================
diff -Nura plymouth-22.02.122+64.0b0e93c/src/plugins/splash/two-step/plugin.c plymouth-22.02.122+64.0b0e93c_new/src/plugins/splash/two-step/plugin.c
--- plymouth-22.02.122+64.0b0e93c/src/plugins/splash/two-step/plugin.c 2022-08-13 20:58:13.000000000 +0800
+++ plymouth-22.02.122+64.0b0e93c_new/src/plugins/splash/two-step/plugin.c 2022-08-13 22:48:06.625172362 +0800
diff -Nura plymouth-22.02.122+94.4bd41a3/scripts/plymouth-populate-initrd.in plymouth-22.02.122+94.4bd41a3_new/scripts/plymouth-populate-initrd.in
--- plymouth-22.02.122+94.4bd41a3/scripts/plymouth-populate-initrd.in 2022-10-27 12:28:09.250335251 +0800
+++ plymouth-22.02.122+94.4bd41a3_new/scripts/plymouth-populate-initrd.in 2022-10-27 14:41:01.624380841 +0800
@@ -491,6 +491,7 @@
PLYMOUTH_MODULE_NAME=$(grep "ModuleName *= *" ${PLYMOUTH_SYSROOT}${PLYMOUTH_THEME_DIR}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ModuleName *= *//')
PLYMOUTH_IMAGE_DIR=$(grep "ImageDir *= *" ${PLYMOUTH_SYSROOT}${PLYMOUTH_THEME_DIR}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ImageDir *= *//')
+PLYMOUTH_WATERMARK_PATH=$(grep "WatermarkPath *= *" ${PLYMOUTH_SYSROOT}${PLYMOUTH_THEME_DIR}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/WatermarkPath *= *//')
PLYMOUTH_Font_PATH=$(fc-list |grep $(fc-match "$(echo $(grep "^Font *= *" ${PLYMOUTH_SYSROOT}${PLYMOUTH_DATADIR}/plymouth/themes/`plymouth-set-default-theme`/`plymouth-set-default-theme`.plymouth | sed -e 's/^Font *= *//'| awk 'NF{NF--};1'))" |awk -F : {'print $1'}) |awk -F : {'print $1'} | sort -u | head -n 1)
PLYMOUTH_TitleFont_PATH=$(fc-list |grep $(fc-match "$(echo $(grep "^TitleFont *= *" ${PLYMOUTH_SYSROOT}${PLYMOUTH_DATADIR}/plymouth/themes/`plymouth-set-default-theme`/`plymouth-set-default-theme`.plymouth | sed -e 's/^TitleFont *= *//'| awk 'NF{NF--};1'))" |awk -F : {'print $1'}) |awk -F : {'print $1'} | sort -u | head -n 1)
@@ -516,6 +517,12 @@
inst_recur "${PLYMOUTH_IMAGE_DIR}"
fi
+# WatermarkPath is either an image file or a symlink to it
+[ -f "${PLYMOUTH_WATERMARK_PATH}" ] && inst "${PLYMOUTH_WATERMARK_PATH}" $INITRDDIR
+if [ -L "${PLYMOUTH_WATERMARK_PATH}" ]; then
+ inst_symlink "${PLYMOUTH_WATERMARK_PATH}"
+fi
+
if [ -f "${PLYMOUTH_PLUGIN_PATH}/label-freetype.so" ]; then
inst ${PLYMOUTH_PLUGIN_PATH}/label-freetype.so $INITRDDIR
font=$(fc-match -f %{file})
diff -Nura plymouth-22.02.122+94.4bd41a3/src/plugins/splash/two-step/plugin.c plymouth-22.02.122+94.4bd41a3_new/src/plugins/splash/two-step/plugin.c
--- plymouth-22.02.122+94.4bd41a3/src/plugins/splash/two-step/plugin.c 2022-08-13 20:58:13.000000000 +0800
+++ plymouth-22.02.122+94.4bd41a3_new/src/plugins/splash/two-step/plugin.c 2022-10-27 14:37:52.319120852 +0800
@@ -1095,9 +1095,23 @@
plugin->background_tile_image = ply_image_new (image_path);
free (image_path);
@ -30,11 +52,9 @@ diff -Nura plymouth-22.02.122+64.0b0e93c/src/plugins/splash/two-step/plugin.c pl
if (!ply_kernel_command_line_has_argument ("secure_boot.warn_if_disabled=false") &&
!ply_is_secure_boot_enabled ()) {
Index: plymouth-22.02.122+64.0b0e93c_new/themes/bgrt/bgrt.plymouth.desktop
===================================================================
diff -Nura plymouth-22.02.122+64.0b0e93c/themes/bgrt/bgrt.plymouth.desktop plymouth-22.02.122+64.0b0e93c_new/themes/bgrt/bgrt.plymouth.desktop
--- plymouth-22.02.122+64.0b0e93c/themes/bgrt/bgrt.plymouth.desktop 2022-04-15 16:39:24.000000000 +0800
+++ plymouth-22.02.122+64.0b0e93c_new/themes/bgrt/bgrt.plymouth.desktop 2022-08-13 22:45:46.132327415 +0800
diff -Nura plymouth-22.02.122+94.4bd41a3/themes/bgrt/bgrt.plymouth.desktop plymouth-22.02.122+94.4bd41a3_new/themes/bgrt/bgrt.plymouth.desktop
--- plymouth-22.02.122+94.4bd41a3/themes/bgrt/bgrt.plymouth.desktop 2022-04-15 16:39:24.000000000 +0800
+++ plymouth-22.02.122+94.4bd41a3_new/themes/bgrt/bgrt.plymouth.desktop 2022-10-27 14:38:58.846563650 +0800
@@ -7,6 +7,7 @@
Font=Cantarell 12
TitleFont=Cantarell Light 30
@ -43,29 +63,3 @@ diff -Nura plymouth-22.02.122+64.0b0e93c/themes/bgrt/bgrt.plymouth.desktop plymo
DialogHorizontalAlignment=.5
DialogVerticalAlignment=.382
TitleHorizontalAlignment=.5
Index: plymouth-22.02.122+64.0b0e93c_new/scripts/plymouth-populate-initrd.in
===================================================================
diff -Nura plymouth-22.02.122+64.0b0e93c/scripts/plymouth-populate-initrd.in plymouth-22.02.122+64.0b0e93c_new/scripts/plymouth-populate-initrd.in
--- plymouth-22.02.122+64.0b0e93c/scripts/plymouth-populate-initrd.in 2022-08-13 22:33:38.499980381 +0800
+++ plymouth-22.02.122+64.0b0e93c_new/scripts/plymouth-populate-initrd.in 2022-08-13 22:44:01.052695444 +0800
@@ -491,6 +491,7 @@
PLYMOUTH_MODULE_NAME=$(grep "ModuleName *= *" ${PLYMOUTH_SYSROOT}${PLYMOUTH_THEME_DIR}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ModuleName *= *//')
PLYMOUTH_IMAGE_DIR=$(grep "ImageDir *= *" ${PLYMOUTH_SYSROOT}${PLYMOUTH_THEME_DIR}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ImageDir *= *//')
+PLYMOUTH_WATERMARK_PATH=$(grep "WatermarkPath *= *" ${PLYMOUTH_SYSROOT}${PLYMOUTH_THEME_DIR}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/WatermarkPath *= *//')
PLYMOUTH_Font_PATH=$(fc-list |grep $(fc-match "$(echo $(grep "^Font *= *" ${PLYMOUTH_SYSROOT}${PLYMOUTH_DATADIR}/plymouth/themes/`plymouth-set-default-theme`/`plymouth-set-default-theme`.plymouth | sed -e 's/^Font *= *//'| awk 'NF{NF--};1'))" |awk -F : {'print $1'}) |awk -F : {'print $1'} | sort -u | head -n 1)
PLYMOUTH_TitleFont_PATH=$(fc-list |grep $(fc-match "$(echo $(grep "^TitleFont *= *" ${PLYMOUTH_SYSROOT}${PLYMOUTH_DATADIR}/plymouth/themes/`plymouth-set-default-theme`/`plymouth-set-default-theme`.plymouth | sed -e 's/^TitleFont *= *//'| awk 'NF{NF--};1'))" |awk -F : {'print $1'}) |awk -F : {'print $1'} | sort -u | head -n 1)
@@ -516,6 +517,12 @@
inst_recur "${PLYMOUTH_IMAGE_DIR}"
fi
+# WatermarkPath is either an image file or a symlink to it
+[ -f "${PLYMOUTH_WATERMARK_PATH}" ] && inst "${PLYMOUTH_WATERMARK_PATH}" $INITRDDIR
+if [ -L "${PLYMOUTH_WATERMARK_PATH}" ]; then
+ inst_symlink "${PLYMOUTH_WATERMARK_PATH}"
+fi
+
if [ -L ${PLYMOUTH_SYSROOT}${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth ]; then
cp -a ${PLYMOUTH_SYSROOT}${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth $INITRDDIR${PLYMOUTH_DATADIR}/plymouth/themes
fi

View File

@ -1,3 +1,32 @@
-------------------------------------------------------------------
Wed Oct 26 07:12:23 UTC 2022 - Cliff Zhao <qzhao@suse.com>
- Update to version 22.02.122+94.4bd41a3:
* plugins: label-freetype: Fixes calculation of line width.
* plugins: label-freetype: Fix font alignment.
* populate-initrd: Install label-freetype plugin into initrd if
available.
* plugins: Add FreeType-based label plugin.
* ply-label: Don't crash if label plugin fails.
* details: Don't replay boot buffer on serial consoles.
* main: Add "reload" command.
* ply-device-manager: Add plymouth.force-frame-buffer-on-boot
parameter, allow to choose force framebuffer mode.
* systemd: Add mkinitcpio support to
plymouth-switch-root-initramfs.service.
* Rebase plymouth-only_use_fb_for_cirrus_bochs.patch;
for build success.
* Rebase plymouth-watermark-config.patch;
for build success.
* Drop 0001-Add-label-ft-plugin.patch;
for already merged by upstream.
* Drop 0002-Install-label-ft-plugin-into-initrd-if-available.patch
for already merged by upstream.
* Drop 0003-fix_null_deref.patch
for already merged by upstream.
* Drop 0004-label-ft-fix-alignment.patch
for already merged by upstream.
-------------------------------------------------------------------
Thu Oct 6 11:20:28 UTC 2022 - Cliff Zhao <qzhao@suse.com>

View File

@ -23,7 +23,7 @@
%global soversion 5
Name: plymouth
Version: 22.02.122+77.c09c651
Version: 22.02.122+94.4bd41a3
Release: 0
Summary: Graphical Boot Animation and Logger
License: GPL-2.0-or-later
@ -54,14 +54,6 @@ Patch9: plymouth-log-on-default.patch
Patch10: plymouth-screen-twice-scale-on-160DPI-higher.patch
# PATCH-FIX-OPENSUSE plymouth-crash-avoid-on-keyboard-remove-input-handler.patch bsc#1193736 qzhao@suse.com -- Confirm keyboard handler list not NULL before release memory to avoid crash.
Patch11: plymouth-crash-avoid-on-keyboard-remove-input-handler.patch
# PATCH-FIX-UPSTREAM 0001-Add-label-ft-plugin.patch boo#959986 fvogt@suse.com -- Add ability to output text in initrd needed for encryption.
Patch1001: 0001-Add-label-ft-plugin.patch
# PATCH-FIX-UPSTREAM 0002-Install-label-ft-plugin-into-initrd-if-available.patch boo#959986 fvogt@suse.com -- Add ability to output text in initrd needed for encryption.
Patch1002: 0002-Install-label-ft-plugin-into-initrd-if-available.patch
# PATCH-FIX-UPSTREAM 0003-fix_null_deref.patch boo#959986 fvogt@suse.com -- Add ability to output text in initrd needed for encryption.
Patch1003: 0003-fix_null_deref.patch
# PATCH-FIX-UPSTREAM 0004-label-ft-fix-alignment.patch boo#959986 fvogt@suse.com -- Fix alignment for label-ft
Patch1004: 0004-label-ft-fix-alignment.patch
BuildRequires: automake
BuildRequires: docbook-xsl-stylesheets
BuildRequires: gcc
@ -595,10 +587,10 @@ fi
%{_libdir}/plymouth/fade-throbber.so
%files plugin-label
%{_libdir}/plymouth/label.so
%{_libdir}/plymouth/label-pango.so
%files plugin-label-ft
%{_libdir}/plymouth/label-ft.so
%{_libdir}/plymouth/label-freetype.so
%files plugin-script
%{_libdir}/plymouth/script.so