From xenithorb at fedoraproject.org Fri Oct 20 01:25:26 2017 From: xenithorb at fedoraproject.org (Michael Goodwin) Date: Fri, 20 Oct 2017 01:25:26 +0000 Subject: Please accept this patch to recursively include theme files in dracut Message-ID: <0100015f37628b1b-d67aa036-003a-41a3-aaf3-7f2c086b14cb-000000@email.amazonses.com> Hi, I'm submitting this patch because I have encountered problems with dracut being able to include anything but flat themes. Some themes such as "plymouth- theme-breeze" contain directories with images (in this case ./images) and I believe the script scripts/plymouth-populate-initrd.in should handle this better, as well as the dracut-only script `modules.d/50plymouth/plymouth- populate-initrd.sh` for which I will be contacting that project separately. I'm pasting the patch inline below for reading, and including it as a file for your convenience. Thanks, Mike -------------------- INLINE PATCH BELOW FOR READING ------------------------ >From 9dc3ae5737989166434b845e2c7b985d9ae832d9 Mon Sep 17 00:00:00 2001 From: Michael Goodwin Date: Thu, 19 Oct 2017 20:46:42 -0400 Subject: [PATCH 1/1] scripts: Add inst_recur for adding themes recursively Some themes are configured and shipped with directories and aren't flat this patch solves that by writing a pure bash function to recurse over those directories and files in order to include every bit of the theme into the initramfs. Without this, users typically experience a black screen at boot time and don't understand why their theme doesn't function: https://bugs.kde.org/show_bug.cgi?id=371276 https://src.fedoraproject.org/rpms/plymouth-theme-breeze/c/ 8ddf072a892e92afe1262a8a2c683574cc63c4b7 A similar funciton and patch will be filed for the dracut-only component: `modules.d/50plymouth/plymouth-populate-initrd.sh` --- scripts/plymouth-populate-initrd.in | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/scripts/plymouth-populate-initrd.in b/scripts/plymouth-populate- initrd.in index d0ffc23..c70adbe 100755 --- a/scripts/plymouth-populate-initrd.in +++ b/scripts/plymouth-populate-initrd.in @@ -336,6 +336,19 @@ inst_any() { return 1 } +inst_recur() { + for x in "${1%/}"/* ; do + if [[ -d "$x" ]]; then + inst_dir "$x" + inst_recur "$x" + elif [[ -f "$x" ]]; then + inst "$x" + else + break + fi + done +} + function usage() { local output="/proc/self/fd/1" local rc=0 @@ -411,10 +424,7 @@ inst ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so $INITRDDIR inst ${PLYMOUTH_PLUGIN_PATH}/renderers/frame-buffer.so $INITRDDIR if [ -d ${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME} ]; then - for x in ${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/* ; do - [ ! -f "$x" ] && continue - inst $x $INITRDDIR - done + inst_recur "${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}" fi if [ -L ${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth ]; then -- 2.14.2 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-scripts-Add-inst_recur-for-adding-themes-recursively.patch Type: text/x-patch Size: 2113 bytes Desc: not available URL: