Accepting request 950754 from home:qzhao:branches:Base:System

1. Add plymouth-watermark-config.patch: Add two-step theme watermark configuration support, make the plymouth-branding easy to render the theme (bsc#1189613). 2. Add plymouth-quiet-dracut-build-info.patch: Avoid the dracut building info which is useless for plymouth(bsc#1189613). 3. Add plymouth-install-label-library-and-font-file-to-initrd.patch: Compress label.so and current theme's font into initrd to avoid prompt disappear when the folder in which has been encrypt  (boo#1183425).

OBS-URL: https://build.opensuse.org/request/show/950754
OBS-URL: https://build.opensuse.org/package/show/Base:System/plymouth?expand=0&rev=311
This commit is contained in:
Cliff Zhao 2022-02-02 14:42:58 +00:00 committed by Git OBS Bridge
parent a582ca3600
commit 3a03be408f
5 changed files with 113 additions and 6 deletions

View File

@ -0,0 +1,23 @@
diff -Nura plymouth-0.9.5+git20201026+53c83cc/scripts/plymouth-populate-initrd.in plymouth-0.9.5+git20201026+53c83cc_new/scripts/plymouth-populate-initrd.in
--- plymouth-0.9.5+git20201026+53c83cc/scripts/plymouth-populate-initrd.in 2021-06-14 01:04:23.842500337 +0800
+++ plymouth-0.9.5+git20201026+53c83cc_new/scripts/plymouth-populate-initrd.in 2021-06-14 01:06:52.766783152 +0800
@@ -420,6 +420,7 @@
inst ${PLYMOUTH_PLUGIN_PATH}/text.so $INITRDDIR
inst ${PLYMOUTH_DATADIR}/plymouth/themes/details/details.plymouth $INITRDDIR
inst ${PLYMOUTH_PLUGIN_PATH}/details.so $INITRDDIR
+inst ${PLYMOUTH_PLUGIN_PATH}/label.so $INITRDDIR
inst ${PLYMOUTH_LOGO_FILE} $INITRDDIR
inst @RELEASE_FILE@ $INITRDDIR
inst ${PLYMOUTH_POLICYDIR}/plymouthd.defaults $INITRDDIR
@@ -442,6 +443,11 @@
PLYMOUTH_MODULE_NAME=$(grep "ModuleName *= *" ${PLYMOUTH_SYSROOT}${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ModuleName *= *//')
PLYMOUTH_THEME_DIR="${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}"
PLYMOUTH_IMAGE_DIR=$(grep "ImageDir *= *" ${PLYMOUTH_SYSROOT}${PLYMOUTH_THEME_DIR}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ImageDir *= *//')
+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'})
+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'})
+
+[ -f ${PLYMOUTH_Font_PATH} ] && inst ${PLYMOUTH_Font_PATH} $INITRDDIR
+[ -f ${PLYMOUTH_TitleFont_PATH} ] && inst ${PLYMOUTH_TitleFont_PATH} $INITRDDIR
if [ ! -f ${PLYMOUTH_SYSROOT}${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so ]; then
echo "The default plymouth plugin (${PLYMOUTH_MODULE_NAME}) doesn't exist" >&2

View File

@ -0,0 +1,8 @@
diff -Nura plymouth-0.9.5~git20210406.e554475/scripts/plymouth-update-initrd plymouth-0.9.5~git20210406.e554475_new/scripts/plymouth-update-initrd
--- plymouth-0.9.5~git20210406.e554475/scripts/plymouth-update-initrd 2021-04-06 19:53:40.000000000 +0800
+++ plymouth-0.9.5~git20210406.e554475_new/scripts/plymouth-update-initrd 2022-01-28 00:44:13.745537970 +0800
@@ -1,2 +1,3 @@
#!/bin/bash
-dracut -f
+echo -e "Regenerating initrd image ..."
+dracut -qf && echo -e "\e[1;32m[ OK ]"

View File

@ -0,0 +1,49 @@
diff -Nura plymouth-0.9.5~git20210406.e554475/src/plugins/splash/two-step/plugin.c plymouth-0.9.5~git20210406.e554475_new/src/plugins/splash/two-step/plugin.c
--- plymouth-0.9.5~git20210406.e554475/src/plugins/splash/two-step/plugin.c 2021-04-06 19:53:40.000000000 +0800
+++ plymouth-0.9.5~git20210406.e554475_new/src/plugins/splash/two-step/plugin.c 2021-09-19 17:04:54.441225214 +0800
@@ -1053,7 +1053,6 @@
plugin = calloc (1, sizeof(ply_boot_splash_plugin_t));
image_dir = ply_key_file_get_value (key_file, "two-step", "ImageDir");
-
ply_trace ("Using '%s' as working directory", image_dir);
asprintf (&image_path, "%s/lock.png", image_dir);
@@ -1076,9 +1075,23 @@
plugin->background_tile_image = ply_image_new (image_path);
free (image_path);
- asprintf (&image_path, "%s/watermark.png", image_dir);
- plugin->watermark_image = ply_image_new (image_path);
- free (image_path);
+ char *release_watermark_path, *theme_watermark_path;
+ release_watermark_path = ply_key_file_get_value (key_file, "two-step", "WatermarkPath");
+ asprintf (&theme_watermark_path, "%s/watermark.png", image_dir);
+ if (release_watermark_path != NULL && access(release_watermark_path, R_OK) == 0 )
+ {
+ ply_trace ("openSUSE's Watermark path: '%s'", release_watermark_path);
+ plugin->watermark_image = ply_image_new (release_watermark_path);
+ free (release_watermark_path);
+ }
+ else if( access(theme_watermark_path, R_OK) == 0)
+ {
+ ply_trace ("Theme's Watermark path: '%s'", theme_watermark_path);
+ plugin->watermark_image = ply_image_new (theme_watermark_path);
+ free (theme_watermark_path);
+ }
+ else
+ plugin->watermark_image = NULL;
plugin->animation_dir = image_dir;
diff -Nura plymouth-0.9.5~git20210406.e554475/themes/bgrt/bgrt.plymouth.desktop plymouth-0.9.5~git20210406.e554475_new/themes/bgrt/bgrt.plymouth.desktop
--- plymouth-0.9.5~git20210406.e554475/themes/bgrt/bgrt.plymouth.desktop 2021-04-06 19:53:40.000000000 +0800
+++ plymouth-0.9.5~git20210406.e554475_new/themes/bgrt/bgrt.plymouth.desktop 2021-09-19 17:14:04.299069740 +0800
@@ -7,6 +7,7 @@
Font=Cantarell 12
TitleFont=Cantarell Light 30
ImageDir=@PLYMOUTH_THEME_PATH@/spinner
+WatermarkPath=/usr/share/pixmaps/distribution-logos/light-inline.png
DialogHorizontalAlignment=.5
DialogVerticalAlignment=.382
TitleHorizontalAlignment=.5

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Sun Jan 30 05:12:13 UTC 2022 - Cliff Zhao <qzhao@suse.com>
- Add plymouth-watermark-config.patch:
Add two-step theme watermark configuration support, make the
tumbleweed watermark could show in the boot splash (bsc#1189613).
-------------------------------------------------------------------
Sun Jan 30 05:06:23 UTC 2022 - Cliff Zhao <qzhao@suse.com>
- Add plymouth-quiet-dracut-build-info.patch: Avoid the dracut
building info which is useless for plymouth(bsc#1189613).
-------------------------------------------------------------------
Sun Jan 30 05:01:45 UTC 2022 - Cliff Zhao <qzhao@suse.com>
- Add plymouth-install-label-library-and-font-file-to-initrd.patch:
Compress label.so and current theme's font into initrd to avoid
prompt disappear when the folder in which has been encrypt
(boo#1183425).
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jan 13 15:14:28 UTC 2022 - Cliff Zhao <qzhao@suse.com> Thu Jan 13 15:14:28 UTC 2022 - Cliff Zhao <qzhao@suse.com>

View File

@ -45,11 +45,17 @@ Patch4: plymouth-disable-fedora-logo.patch
Patch5: plymouth-only_use_fb_for_cirrus_bochs.patch Patch5: plymouth-only_use_fb_for_cirrus_bochs.patch
# PATCH-FIX-OPENSUSE plymouth-keep-KillMode-none.patch bsc#1177082 bsc#1184087 boo#1182145 qzhao@suse.com -- Keep the plymouth-start.service KillMode=none. # PATCH-FIX-OPENSUSE plymouth-keep-KillMode-none.patch bsc#1177082 bsc#1184087 boo#1182145 qzhao@suse.com -- Keep the plymouth-start.service KillMode=none.
Patch6: plymouth-keep-KillMode-none.patch Patch6: plymouth-keep-KillMode-none.patch
# PATCH-FIX-OPENSUSE plymouth-install-label-library-and-font-file-to-initrd.patch boo#1183425 boo#1184309 qzhao@suse.com -- Pack label plugin and font into initram to ensure notice info could successfully show when partition encrypted.
Patch7: plymouth-install-label-library-and-font-file-to-initrd.patch
# PATCH-FIX-OPENSUSE plymouth-quiet-dracut-build-info.patch bsc#1189613 qzhao@suse.com -- Hide unuseful output when re-generate initrd.
Patch8: plymouth-quiet-dracut-build-info.patch
# PATCH-FIX-OPENSUSE plymouth-watermark-config.patch bsc#1189613 qzhao@suse.com -- Add two-step water mark config support.
Patch9: plymouth-watermark-config.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. # PATCH-FIX-UPSTREAM 0001-Add-label-ft-plugin.patch boo#959986 fvogt@suse.com -- add ability to output text in initrd needed for encryption.
Patch1000: 0001-Add-label-ft-plugin.patch Patch1000: 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. # 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.
Patch1001: 0002-Install-label-ft-plugin-into-initrd-if-available.patch Patch1001: 0002-Install-label-ft-plugin-into-initrd-if-available.patch
#uo PATCH-FIX-UPSTREAM 0003-fix_null_deref.patch boo#959986 fvogt@suse.com -- add ability to output text in initrd needed for encryption. # PATCH-FIX-UPSTREAM 0003-fix_null_deref.patch boo#959986 fvogt@suse.com -- add ability to output text in initrd needed for encryption.
Patch1002: 0003-fix_null_deref.patch Patch1002: 0003-fix_null_deref.patch
BuildRequires: automake BuildRequires: automake
BuildRequires: docbook-xsl-stylesheets BuildRequires: docbook-xsl-stylesheets