diff -rNu fbsplash.34/fbsplash-basic.sh fbsplash.35/fbsplash-basic.sh
--- fbsplash.34/fbsplash-basic.sh 1970-01-01 10:13:08.000000000 +0100
+++ fbsplash.35/fbsplash-basic.sh 2011-03-04 12:05:18.000000000 +0100
@@ -12,18 +12,20 @@
[[ $PREVLEVEL && $RUNLEVEL ]] || return 0
-# Do nothing if improved scripts are installed
-[ -r /etc/rc.d/functions.d/fbsplash-extras.sh ] && return
+# Do nothing if advanced script is installed
+[[ -r /etc/rc.d/functions.d/fbsplash-extras.sh ]] && return
# Only do this where needed
# Since we use BASH, all important functions and variables are exported
case ${0#/etc/rc.} in sysinit | multi | shutdown )
- export SPLASH_PUSH_MESSAGES="no"
- export SPLASH_VERBOSE_ON_ERRORS="no"
+ # splash-functions.sh will run splash_setup which needs /proc
+ # code line copied from /etc/rc.sysinit
+ /bin/mountpoint -q /proc || /bin/mount -n -t proc proc /proc -o nosuid,noexec,nodev
+ export SPLASH_PUSH_MESSAGES SPLASH_VERBOSE_ON_ERRORS
. /sbin/splash-functions.sh # /etc/conf.d/splash is also sourced by this
unset options opt i # eliminate splash_setup non local vars ## FIX ME ##
- declare -ix SPLASH_STEPS=3 # sysinit steps
- declare -ix SPLASH_STEPS_DONE=0
+ SPLASH_STEPS=3 # sysinit steps
+ SPLASH_STEPS_DONE=0
esac
# Verbose mode is handled by fbcondecor kernel patch and daemon script
@@ -59,7 +61,7 @@
splash_progress
}
splash_sysinit_postfsck() { # fsck failure emergency exit
- [ ${fsckret} -gt 1 -a ${fsckret} -ne 32 ] && chvt 1
+ (( fsckret > 1 && fsckret != 32 )) && chvt 1
}
splash_sysinit_end() {
splash_progress
@@ -131,7 +133,7 @@
case $daemon in $SPLASH_XSERVICE | @$SPLASH_XSERVICE ) break
;; \!* |@* ) continue
esac
- SPLASH_STEPS+=1
+ (( SPLASH_STEPS++ ))
done
}
@@ -141,7 +143,6 @@
}
# Start the splash daemon - using upstream function
-splash_set_event_dev() { :; } # override - Never grab the keyboard
splash_begin() {
if ! [[ $( /bin/pidof -o %PPID $spl_daemon ) ]]; then
stat_busy "Starting Fbsplash daemon"
diff -rNu fbsplash.34/fbsplash.initcpio_hook fbsplash.35/fbsplash.initcpio_hook
--- fbsplash.34/fbsplash.initcpio_hook 1970-01-01 10:13:08.000000000 +0100
+++ fbsplash.35/fbsplash.initcpio_hook 2011-03-04 10:56:15.000000000 +0100
@@ -1,99 +1,49 @@
run_hook ()
{
- SPLASH_INIT_MESSAGE="Initializing the kernel"
- SPLASH_MODE_REQ="off"
- SPLASH_THEME="default"
- SPLASH_TTY=16
- SPLASH_TEXTBOX="no"
- SPLASH_AUTOVERBOSE=0
-
- . /etc/conf.d/splash
-
- # Kernel parameters override config file
- local ifs="$IFS"
- IFS=','
- set -- $splash
- IFS="$ifs"
- local arg effects
- for arg in "$@"; do
- case "$arg"
- in off ) SPLASH_MODE_REQ="off"
- ;; silent ) SPLASH_MODE_REQ="silent"
- ;; verbose ) SPLASH_MODE_REQ="verbose"
- ;; theme:?* ) SPLASH_THEME="${arg#theme:}"
- ;; tty:?* ) SPLASH_TTY="${arg#tty:}"
- ;; insane ) SPLASH_SANITY="insane"
- ;; fadein | fadeout ) effects="$effects,$arg"
- esac
- done
- if [ -n "$effects" ]; then
- SPLASH_EFFECTS="${effects#,}"
- fi
-
- if [ "${SPLASH_MODE_REQ}" != "silent" ]; then
- return
- fi
-
- if ! [ "$console" = tty1 -o "$SPLASH_SANITY" = insane ]; then
- err "Fbsplash requires console=tty1 in kernel line!"
- return 1
- fi
-
- # Start the daemon here if possible
- # to show animations early and gain some bootup speed
- if [ -x /sbin/fbsplashd.static ]; then
- if [ -x /etc/splash/"$SPLASH_THEME"/scripts/rc_init-pre ]; then
- msg "Found '/etc/splash/$SPLASH_THEME/scripts/rc_init-pre'"
- msg "Not starting Fbsplash daemon - no theme hook support in initcpio."
- else
+ # avoid exporting configuration
+ (
+ SPLASH_INIT_MESSAGE="Initializing the kernel"
+ # Get configuration and functions (faking sysinit for config file hacks)
+ PREVLEVEL=N; RUNLEVEL=S
+ . /sbin/splash-functions.sh
+ unset PREVLEVEL RUNLEVEL
+
+ [ "${SPLASH_MODE_REQ}" = "silent" ] || exit 0
+
+ # Start the daemon here if possible
+ # to show animations early and gain some bootup speed
+ if [ -x /sbin/fbsplashd.static ]; then
msg "Starting Fbsplash Daemon"
- (
- set -e
- # Hold the cache and fifo within /dev to get it moved to the new root
- mkdir /dev/.splash-cache
- # code line derived from splash-functions.sh
- mount -t tmpfs cachedir /dev/.splash-cache -o rw,mode=0644,size=4096k
- # Take over any existing cache content
- mkdir -p /lib/splash/cache
- mv /lib/splash/cache /lib/splash/.splash-cache
- cp -a /lib/splash/.splash-cache /dev/
- ln -s /dev/.splash-cache /lib/splash/cache
- mkfifo -m 600 /lib/splash/cache/.splash
- # Wait for any fbcondecor fadein - may take very long on some broken systems
- i=0
- while [ -n "$( pidof fbcondecor_helper )" ]; do
- if [ $i -ge 50 ]; then
- err "timeout on waiting for fbcondecor_helper to die!"
- exit 1
- fi
- sleep .1
- i=$(( i + 1 ))
- done
- # Actually start the daemon
- options=""
- [ -n "$SPLASH_THEME" ] && options="$options --theme=$SPLASH_THEME"
- [ -n "$SPLASH_EFFECTS" ] && options="$options --effects=$SPLASH_EFFECTS"
- [ "$SPLASH_TEXTBOX" = yes ] && options="$options --textbox"
- cd /dev/.splash-cache
- BOOT_MSG="${SPLASH_INIT_MESSAGE}" \
- /sbin/fbsplashd.static --type=bootup --pidfile=daemon.pid $options
- (
- echo set tty silent $SPLASH_TTY
- echo set mode silent
- echo repaint
- echo set autoverbose $SPLASH_AUTOVERBOSE
- ) >/lib/splash/cache/.splash &
- )
- return
+ set -e
+ # Mount the cache within /dev to get it moved to the new root
+ mkdir /dev/.splash-cache
+ ( spl_cachedir=/dev/.splash-cache; splash_cache_prep )
+ # Take over any existing cache content
+ mkdir -p $spl_cachedir
+ parent=$( dirname $spl_cachedir )
+ mv $spl_cachedir $parent/.splash-cache
+ cp -a $parent/.splash-cache /dev/
+ # Symlink for starting the daemon
+ ln -s /dev/.splash-cache $spl_cachedir
+ # Wait for any fbcondecor fadein - may take very long on some broken systems
+ i=0
+ while [ -n "$( pidof fbcondecor_helper )" ]; do
+ if [ $i -ge 50 ]; then
+ err "timeout on waiting for fbcondecor_helper to die!"
+ exit 1
+ fi
+ sleep .1
+ i=$(( i + 1 ))
+ done
+ # Actually start the daemon
+ cd /dev/.splash-cache
+ set +e
+ SPLASH_BOOT_MESSAGE="${SPLASH_INIT_MESSAGE}"
+ splash_start && sleep .1 # allow the daemon to open the event dev
+ exit
fi
- fi
- # Start the fbcondecor helper if not already done by fbcondecor kernel
- (
- # code copied from splash-functions.sh
- fbcondecor_supported() {
- [ -e /dev/fbsplash -o -e /dev/fbcondecor ]
- }
+ # Start the fbcondecor helper if not already done by fbcondecor kernel
if ! fbcondecor_supported; then
BOOT_MSG="${SPLASH_INIT_MESSAGE}" \
/sbin/fbcondecor_helper 2 init 0 0 $SPLASH_THEME
diff -rNu fbsplash.34/fbsplash.initcpio_install fbsplash.35/fbsplash.initcpio_install
--- fbsplash.34/fbsplash.initcpio_install 1970-01-01 10:13:08.000000000 +0100
+++ fbsplash.35/fbsplash.initcpio_install 2011-03-07 08:57:08.000000000 +0100
@@ -1,104 +1,95 @@
install() {
- (
- . /etc/conf.d/splash
-
- if /bin/mountpoint -q /lib/splash/cache; then
- /bin/umount /lib/splash/cache
- fi
-
- # Add the helper
- add_binary /sbin/fbcondecor_helper
-
- # Add the daemon for early start
- if [[ $SPLASH_DAEMON = early ]]; then
- add_binary /sbin/fbsplashd.static
+ # Add config file, splash-functions and the helper
+ add_file /etc/conf.d/splash
+ add_file /sbin/splash-functions.sh
+ add_binary /sbin/fbcondecor_helper
+
+ # Get in configuration, parameters and functions
+ . /etc/conf.d/splash
+ . /sbin/splash-functions.sh
+
+ # Unmount any stale cache tmpfs
+ splash_cache_cleanup
+
+ SPLASH_PROFILE=off
+
+ if [[ $SPLASH_DAEMON = early ]]; then
+ # Add stuff needed to run splash_start function (except optional evdev module)
+ add_dir $spl_tmpdir
+ add_binary $spl_daemon
+ if [[ -e /etc/rc.d/functions.d/fbsplash-extras.sh ]]; then
+ . /etc/rc.d/functions.d/fbsplash-extras.sh
+ # Add files from a prepared cache (faking sysinit)
+ splash_cache_prep_initcpio && add_full_dir $spl_cachedir
fi
+ fi
- # Add a clean config file avoiding errors when running the hook
- file=$( /usr/bin/mktemp )
- for var in SPLASH_INIT_MESSAGE SPLASH_MODE_REQ SPLASH_THEME SPLASH_TTY \
- SPLASH_AUTOVERBOSE SPLASH_EFFECTS SPLASH_TEXTBOX
- do
- eval value=\"\$$var\"
- [ -n "$value" ] && echo $var="'$value'"
- done >|$file
- add_file $file /etc/conf.d/splash
-
- # List file paths contained in given Fbsplash theme cfg file
- _get_cfg_files() {
- < "$1" /bin/sed -re '
- # convert all whitespace into single blanks
- s,[[:space:]]+, ,g ; t L1
- :L1
- # drop comments, grouping directives and blank lines
- /^ *([#<]|$)/ d
- # get a filepath or drop
- s,.*[ =]([^ ]*/[^ ]+).*,, ; t ; d
- ' | /usr/bin/sort -u
- }
-
- # Check if cfg file name or path
- _match_cfg() {
- [[ "$1" =~ (^|/)[0-9]+x[0-9]+\.cfg$ ]]
- }
-
- # Add non-cfg files in given dir
- _add_non_cfg_files() {
- local file dir="$1"
- for file in $( /bin/ls "$dir" ); do
- if [ -f "$dir/$file" ]; then
- _match_cfg "$file" || add_file "$dir/$file"
- fi
- done
- }
-
- # Add global non-cfg files
- _add_non_cfg_files /etc/splash
-
- # Add themes
- dirs=""
- for theme in ${SPLASH_THEMES[*]}; do # string list and array allowed
- [ ${theme:0:1} = / ] || theme=/etc/splash/$theme
- if [ -f $theme ]; then
- if ! _match_cfg $theme; then
- err "Not a valid theme cfg file name: $theme"
- continue
- fi
- add_file $theme || continue
- dir=$( dirname $theme )
- # Add non-cfg files in theme dir
- _add_non_cfg_files $dir
- # Add files refered in cfg file by paths
- for file in $( _get_cfg_files $theme ); do
- if [ ${file:0:1} = / ]; then
- add_file $file
- continue
- fi
- # Path may be relative to theme-dir or to /etc/splash
- [ -e $dir/$file -o ! -f /etc/splash/$file ] && add_file $dir/$file
- [ -e /etc/splash/$file -o ! -f $dir/$file ] && add_file /etc/splash/$file
+ # List file paths contained in given Fbsplash theme cfg files
+ # (Only file paths containing at least one slash will be found by this.)
+ fbsplash_list_paths() {
+ (( $# )) || return 0
+ /bin/sed -re '
+ # convert all whitespace into single blanks
+ s,[[:space:]]+, ,g ; t L1
+ :L1
+ # drop comments, grouping directives and blank lines
+ /^ *([#<]|$)/ d
+ # get a filepath or drop
+ s,.*[ =]([^ ]*/[^ ]+).*,, ; t ; d
+ ' "$@" | /usr/bin/sort -u
+ }
+
+ # Check if arg is a theme cfg file path
+ fbsplash_is_cfg() {
+ [[ $1 =~ ^/etc/splash/[^/]+/[0-9]+x[0-9]+\.cfg$ ]]
+ }
+
+ # Add all files referenced by path in given theme cfg files
+ # args: <theme-root-dir> <cfg-file>...
+ fbsplash_add_files_from_cfgs() {
+ local file theme_dir=$1; shift
+ while read file; do
+ if [[ $file == /* ]]; then
+ add_file $file
+ else # Path may be relative to /etc/splash or theme-dir
+ local found=0
+ for file in /etc/splash/$file "$theme_dir"/$file; do
+ [[ -f $file ]] && { add_file $file; found=1; }
done
- elif [ -d $theme ]; then
- dir=$theme
- add_full_dir $dir
- else
- err "Theme not found: $theme"
- continue
+ (( found )) || err "Theme '${theme_dir##*/}': File not found: '$file'"
fi
- if [[ " "$dirs" " != *" "$dir" "* ]]; then
- dirs+=" "$dir
- fi
- done
- for dir in $dirs; do
- # Add the rc_init-pre script if we have one
- # Currently this just prevents early daemon start for the theme
- if [[ $SPLASH_DAEMON = early && -x $dir/scripts/rc_init-pre ]]; then
- add_file $dir/scripts/rc_init-pre || continue
- echo "WARNING: rc_init-pre script found - no early daemon with '${dir##*/}'!" >&2
- fi
- done
- )
+ done < <( fbsplash_list_paths "$@" )
+ }
+
+ # Add common files (may be referenced in cfg by plain file name)
+ local file
+ for file in /etc/splash/*; do
+ [[ -f $file ]] && add_file "$file"
+ done
+
+ # Add themes
+ local file theme
+ for theme in $SPLASH_THEMES; do
+ if [[ -d /etc/splash/$theme && $theme != */* ]]; then
+ add_full_dir /etc/splash/$theme
+ local files=()
+ for file in /etc/splash/$theme/*.cfg; do
+ [[ -f $file ]] && fbsplash_is_cfg "$file" && files+=( $file )
+ done
+ fbsplash_add_files_from_cfgs /etc/splash/$theme "${files[@]}"
+ elif [[ -f /etc/splash/$theme ]] && fbsplash_is_cfg /etc/splash/$theme; then
+ file=/etc/splash/$theme; theme=${theme%/*}
+ add_file $file
+ fbsplash_add_files_from_cfgs /etc/splash/$theme $file
+ # Add all non-cfg files from theme dir (may be referenced by plain file name)
+ for file in /etc/splash/$theme/*; do
+ [[ -f $file ]] && ! fbsplash_is_cfg "$file" && add_file "$file"
+ done
+ else
+ err "Theme invalid or not found: '$theme'"
+ fi
+ done
SCRIPT="fbsplash"
}
@@ -106,8 +97,7 @@
help() {
cat<<HELPEOF
This hook adds the FBconDecor helper and Fbsplash themes and maybe the
- Fbsplash daemon as specified in /etc/conf.d/splash. Put it after udev
- for early daemon start or when using a FBconDecor kernel.
+ Fbsplash daemon as specified in /etc/conf.d/splash.
HELPEOF
}
diff -rNu fbsplash.34/PKGBUILD fbsplash.35/PKGBUILD
--- fbsplash.34/PKGBUILD 2011-02-12 22:56:31.000000000 +0100
+++ fbsplash.35/PKGBUILD 2011-03-07 12:34:20.391593823 +0100
@@ -3,7 +3,7 @@
pkgname=fbsplash
pkgver=1.5.4.3
-pkgrel=34
+pkgrel=35
pkgdesc="A userspace implementation of a splash screen for Linux (formerly known as gensplash)"
arch=('i686' 'x86_64')
url="http://fbsplash.berlios.de"
@@ -19,6 +19,7 @@
install=fbsplash.install
source=(http://dev.gentoo.org/~spock/projects/gensplash/archive/splashutils-${pkgver}.tar.bz2
fbsplash.git.patch
+ splash_start_initcpio.patch
splash.conf
fbsplash-basic.sh
fbsplash.initcpio_install
@@ -27,10 +28,11 @@
fbcondecor.conf)
md5sums=('c722cd4148817b9c50381d9bdc1ea6ef'
'3a338c60ed0710c8b7e3e08929db521a'
- 'dd6d7ecad8e953754f90de683f0d5a33'
- 'e69753dac753b8ba4e2e29ef5a9c46ca'
- 'e29b3db6ee059b9950febe976a0f2881'
- 'ac2351bc918b101bb9249ce8940722be'
+ '4045e315c52f5a576fca4f7e634eeb91'
+ '90708a96038d7d7921c2e9fde938c058'
+ '898c6633058909e7c2bbf4cf4567ceb8'
+ '3f24687935f635279ac88e33241c7ba0'
+ '1aff36f1ef3e052be3b4a016ef593981'
'715926469d05eecd345c052e6248ca32'
'b3db9d4fd902b62ac9e38589677e2d16')
@@ -44,6 +46,9 @@
# fix fbcondecor_ctl splash type
sed -e 's,fbsplash_lib_init(fbspl_bootup),fbsplash_lib_init(fbspl_undef),' -i src/fbcon_decor_ctl.c
+ # fix set_event_dev call for initcpio usage (if evdev module is there)
+ patch -Np2 -i ${srcdir}/splash_start_initcpio.patch
+
./configure --prefix=/usr --sysconfdir=/etc --without-klibc --enable-fbcondecor --with-gpm --with-mng --with-png --with-ttf --with-ttf-kernel
make
}
diff -rNu fbsplash.34/splash.conf fbsplash.35/splash.conf
--- fbsplash.34/splash.conf 2010-07-10 01:38:47.000000000 +0200
+++ fbsplash.35/splash.conf 2011-03-06 15:45:55.000000000 +0100
@@ -2,17 +2,21 @@
# /etc/conf.d/splash
#
+#### WARNING!
+## This file is also sourced in the initcpio hook.
+## No BASH-code (like arrays) is allowed here!
+
#### initcpio and Fbsplash daemon ##########################################
## Themes to include into initcpio
## For a smaller initcpio you may try theme cfg files instead of directories.
-SPLASH_THEMES=(
+SPLASH_THEMES="
arch-black
arch-banner-icons/1024x768.cfg
arch-banner-icons/1280x800.cfg
arch-banner-noicons/1024x768.cfg
arch-banner-noicons/1280x800.cfg
-)
+"
## Override the initial silent splash screen status message defaults.
## Note: '$progress' will be replaced by Fbsplash itself.
@@ -25,16 +29,21 @@
## * shutdown
SPLASH_SHUTDOWN_MESSAGE="Shutting down '$HOSTNAME' (\$progress%)"
-## To show animations early, include the Fbsplash daemon (1.5 MiB) into initcpio, too,
+## Include and use the Fbsplash daemon (1.5 MiB) in the initcpio
## instead of the small helper only.
-## Note: Themes with 'scripts/rc_init-pre' like 'arch-banner-icons' are not supported.
+## Usefull to show animations early.
+## Note: Themes with 'scripts/rc_init-pre' like 'arch-banner-icons' are
+## supported now if fbsplash-extras>=2.0.10 is installed, but there
+## might still be some sophisticated ones which break when using this.
SPLASH_DAEMON="early"
## Make the splash daemon use fade effects.
## Note: The initcpio helper does only use the kernel parameter!
+# Just use fadein on bootup and fadeout on shutdown/reboot
+case $PREVLEVEL in N ) SPLASH_EFFECTS="fadein" ; esac
+case $RUNLEVEL in [06] ) SPLASH_EFFECTS="fadeout"; esac
+# Uncomment this line to allways use both
# SPLASH_EFFECTS="fadein,fadeout"
-## Uggly hack to get that in from the kernel line :p
-SPLASH_EFFECTS=$(e=();IFS=',';for w in $splash;do [[ $w == fade* ]]&&e+=($w);done;echo "${e[*]}")
## Enable the textbox when starting the Fbsplash daemon.
## Useful if the theme provides a message log or other textbox.
@@ -54,7 +63,7 @@
SPLASH_VERBOSE_ON_ERRORS="no"
## Name of the DAEMONS script starting Xorg if any
-## Set this to avoid virtual terminal change struggle between Xorg and Fbsplash.
+## Set this to avoid virtual terminal change struggle between X and Fbsplash.
SPLASH_XSERVICE="gdm"
#SPLASH_XSERVICE="kdm"
#SPLASH_XSERVICE="xdm"
diff -rNu fbsplash.34/splash_start_initcpio.patch fbsplash.35/splash_start_initcpio.patch
--- fbsplash.34/splash_start_initcpio.patch 1970-01-01 01:00:00.000000000 +0100
+++ fbsplash.35/splash_start_initcpio.patch 2011-03-03 09:47:19.000000000 +0100
@@ -0,0 +1,22 @@
+diff -ru src.orig//splashutils-1.5.4.3/scripts/splash-functions.sh.in src//splashutils-1.5.4.3/scripts/splash-functions.sh.in
+--- src.orig//splashutils-1.5.4.3/scripts/splash-functions.sh.in 2008-11-13 20:54:19.000000000 +0100
++++ src//splashutils-1.5.4.3/scripts/splash-functions.sh.in 2011-03-03 09:45:29.258901793 +0100
+@@ -250,6 +250,9 @@
+ # Start the splash daemon
+ BOOT_MSG="$(splash_get_boot_message)" ${spl_daemon} --theme="${SPLASH_THEME}" --pidfile="${spl_pidfile}" --type=${ttype} ${options}
+
++ # First let the daemon open the event dev before it's gone away in case this is run in the initcpio
++ splash_set_event_dev
++
+ # Set the silent TTY and boot message
+ splash_comm_send "set tty silent ${SPLASH_TTY}"
+
+@@ -261,8 +264,6 @@
+
+ splash_comm_send "set autoverbose ${SPLASH_AUTOVERBOSE}"
+
+- splash_set_event_dev
+-
+ return 0
+ }
+