Package: plymouth
Version: 0.7.2-1
Severity: normal
Tags: patch

Hi,
the initramfs is lacking themes and other files to display a proper
bootsplash from within the initramfs. Attached patch adds the basic set
of files to hooks/plymouth so that a:
        plymouthd --mode=boot
        plymouth --show-splash
from an initramfs script (e.g. in init-premount) can work. It also moves
the install call from override_dh_auto_build to override_dh_auto_install
since they otherwise get wiped before installation.

Please apply.
 -- Guido

P.S.: I do have a basic scripts/init-premount/plymouth working here too
but I need to add more fixes for this to work reliably.
>From 5c630fbae873b8520491fa24b7edc5c4185520c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <a...@sigxcpu.org>
Date: Sun, 14 Mar 2010 15:11:32 +0100
Subject: [PATCH] Add themes to hook script

---
 debian/local/plymouth.hook |   28 ++++++++++++++++++++++------
 debian/rules               |    5 +----
 2 files changed, 23 insertions(+), 10 deletions(-)
 mode change 100644 => 100755 debian/local/plymouth.hook

diff --git a/debian/local/plymouth.hook b/debian/local/plymouth.hook
old mode 100644
new mode 100755
index 8f5bfdf..8ef250e
--- a/debian/local/plymouth.hook
+++ b/debian/local/plymouth.hook
@@ -22,12 +22,28 @@ esac
 
 . /usr/share/initramfs-tools/hook-functions
 
-# plymouth hook
-copy_exec /bin/plymouth /bin
-copy_exec /sbin/plymouthd /bin
+THEMES=/usr/share/plymouth/themes/
+DEFAULT=$THEMES/default.plymouth
+
+[ -r $DEFAULT ] || exit 0
+
+THEME=$THEMES/$(readlink $DEFAULT)
+
+IMAGES=$(sed -n 's/^ImageDir=\(.*\)/\1/p' $THEME)
+MODULE=/usr/lib/plymouth/$(sed -n 's/^ModuleName=\(.*\)/\1/p' $THEME).so
+
+copy_exec $MODULE
+copy_exec /bin/plymouth
+copy_exec /sbin/plymouthd
 copy_exec /usr/lib/plymouth/details.so
 copy_exec /usr/lib/plymouth/text.so
+copy_exec /usr/lib/plymouth/label.so
+
+mkdir -p $DESTDIR/$THEMES
+# No images in text mode:
+[ -z "$IMAGES" ] || cp -r $IMAGES $DESTDIR/$THEMES/
+cp -rL $DEFAULT $DESTDIR/$THEMES/
+cp -a $THEMES/details ${DESTDIR}/$THEMES/
+cp -a $THEMES/text ${DESTDIR}/$THEMES/
+cp /usr/share/plymouth/debian-logo.png $DESTDIR/usr/share/plymouth/
 
-# TODO:
-# handling logos
-# handling default plugins
diff --git a/debian/rules b/debian/rules
index dc8a629..dbe2560 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,18 +23,15 @@ override_dh_auto_configure:
 override_dh_auto_build:
 	dh_auto_build
 
-	install -D -m 0755 debian/local/plymouth.hook debian/plymouth/usr/share/initramfs-tools/hooks/plymouth
-	install -D -m 0755 debian/local/plymouth-set-default-plugin.sh debian/plymouth/usr/sbin/plymouth-set-default-plugin
-
 	# Removing double files
 	rm -rf debian/tmp/usr/libexec
-	rm -f debian/tmp/usr/sbin/plymouth-set-default-plugin
 	rm -rf debian/tmp/var
 
 override_dh_auto_install:
 	dh_auto_install
 
 	install -D -m 0644 debian/local/debian-logo.png debian/plymouth/usr/share/plymouth/debian-logo.png
+	install -D -m 0755 debian/local/plymouth.hook debian/plymouth/usr/share/initramfs-tools/hooks/plymouth
 
 override_dh_makeshlibs:
 	dh_makeshlibs -p plymouth
-- 
1.7.0

Reply via email to