summaryrefslogtreecommitdiffstats
path: root/abs/core/fbsplash
diff options
context:
space:
mode:
authorCecil <knoppmyth@gmail.com>2011-09-24 07:20:16 (GMT)
committerCecil <knoppmyth@gmail.com>2011-09-24 07:20:16 (GMT)
commitbe452ab0786fa9a452938c647704122f42838a28 (patch)
tree3a13b0052d437b3b16328023cf5d3f6f370036d1 /abs/core/fbsplash
parentae5fc8a102437e1671eb2d4a53a3c999cf1e1339 (diff)
downloadlinhes_pkgbuild-be452ab0786fa9a452938c647704122f42838a28.zip
linhes_pkgbuild-be452ab0786fa9a452938c647704122f42838a28.tar.gz
linhes_pkgbuild-be452ab0786fa9a452938c647704122f42838a28.tar.bz2
fbsplash:Bumped to latest version.
Diffstat (limited to 'abs/core/fbsplash')
-rw-r--r--abs/core/fbsplash/PKGBUILD38
-rw-r--r--abs/core/fbsplash/fbsplash-basic.sh39
-rw-r--r--abs/core/fbsplash/fbsplash.git.patch166
-rw-r--r--abs/core/fbsplash/fbsplash.initcpio_hook128
-rw-r--r--abs/core/fbsplash/fbsplash.initcpio_install176
-rw-r--r--abs/core/fbsplash/splash.conf31
-rw-r--r--abs/core/fbsplash/splash_start_initcpio.patch22
7 files changed, 202 insertions, 398 deletions
diff --git a/abs/core/fbsplash/PKGBUILD b/abs/core/fbsplash/PKGBUILD
index 3b25af8..49725d4 100644
--- a/abs/core/fbsplash/PKGBUILD
+++ b/abs/core/fbsplash/PKGBUILD
@@ -2,39 +2,50 @@
# Contributor: Kurt J. Bosch <kjb-temp-2009 at alpenjodel.de>
pkgname=fbsplash
-pkgver=1.5.4.3
-pkgrel=38
+pkgver=1.5.4.4
+pkgrel=7
pkgdesc="A userspace implementation of a splash screen for Linux (formerly known as gensplash)"
arch=('i686' 'x86_64')
url="http://fbsplash.berlios.de"
license=('GPL')
depends=('miscsplashutils' 'freetype2' 'libjpeg' 'libpng' 'libmng' 'lcms' 'gpm')
-optdepends=('kernel26-fbcondecor: enable console background images'
+optdepends=('linux-fbcondecor: enable console background images'
'fbsplash-extras: additional functionality like daemon icons'
'uswsusp-fbsplash: suspend to disk with fbsplash'
- 'python2: convert themes from splashy to fbsplash')
+ 'python: convert themes from splashy to fbsplash')
conflicts=('fbsplash-scripts' 'initscripts-extras-fbsplash')
options=('!makeflags')
backup=('etc/conf.d/fbcondecor' 'etc/conf.d/splash')
install=fbsplash.install
-source=(http://dev.gentoo.org/~spock/projects/gensplash/archive/splashutils-${pkgver}.tar.bz2
- fbsplash.git.patch
+source=(http://download.berlios.de/fbsplash/splashutils-${pkgver}.tar.bz2
+ splash_start_initcpio.patch
splash.conf
fbsplash-basic.sh
fbsplash.initcpio_install
fbsplash.initcpio_hook
fbcondecor.daemon
fbcondecor.conf)
+md5sums=('2a16704c4adde97b58812cd89e3f2342'
+ '4045e315c52f5a576fca4f7e634eeb91'
+ '90708a96038d7d7921c2e9fde938c058'
+ 'a6b0b9c5c7a460380a7db127e0278164'
+ '24e2a7bbc2d18fe3ec10093665cd7a6e'
+ '4a3ac992a5042fa9770cbd3fdb7e1465'
+ '715926469d05eecd345c052e6248ca32'
+ 'b3db9d4fd902b62ac9e38589677e2d16')
+
build() {
cd ${srcdir}/splashutils-${pkgver}
- # patch for building splashutils with glibc and dynamical linking
- patch -Np0 -i ${srcdir}/fbsplash.git.patch
autoreconf
# 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
+
+ export LIBS="-lbz2"
./configure --prefix=/usr --sysconfdir=/etc --without-klibc --enable-fbcondecor --with-gpm --with-mng --with-png --with-ttf --with-ttf-kernel
make
}
@@ -57,7 +68,7 @@ package() {
# Install fbsplash scripts and config file
install -D -m644 ${srcdir}/splash.conf etc/conf.d/splash
- install -D -m744 ${srcdir}/fbsplash-basic.sh etc/rc.d/functions.d/fbsplash-basic.sh
+ install -D -m644 ${srcdir}/fbsplash-basic.sh etc/rc.d/functions.d/fbsplash-basic.sh
install -D -m644 ${srcdir}/fbsplash.initcpio_install lib/initcpio/install/fbsplash
install -D -m644 ${srcdir}/fbsplash.initcpio_hook lib/initcpio/hooks/fbsplash
@@ -65,12 +76,3 @@ package() {
install -D -m644 ${srcdir}/fbcondecor.conf etc/conf.d/fbcondecor
install -D -m755 ${srcdir}/fbcondecor.daemon etc/rc.d/fbcondecor
}
-
-md5sums=('c722cd4148817b9c50381d9bdc1ea6ef'
- '3a338c60ed0710c8b7e3e08929db521a'
- '8f342632af1075667d6e11871a9e5d7e'
- 'e69753dac753b8ba4e2e29ef5a9c46ca'
- 'e29b3db6ee059b9950febe976a0f2881'
- 'ac2351bc918b101bb9249ce8940722be'
- '715926469d05eecd345c052e6248ca32'
- 'b3db9d4fd902b62ac9e38589677e2d16')
diff --git a/abs/core/fbsplash/fbsplash-basic.sh b/abs/core/fbsplash/fbsplash-basic.sh
index 2834060..4403b86 100644
--- a/abs/core/fbsplash/fbsplash-basic.sh
+++ b/abs/core/fbsplash/fbsplash-basic.sh
@@ -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
@@ -38,8 +40,8 @@ case $0 in /etc/rc.sysinit )
# Prevent splash destruction
CONSOLEFONT=""
# Continue to use a splash daamon started in initcpio
- if /bin/mountpoint -q /dev/.splash-cache; then
- /bin/mount --move /dev/.splash-cache $spl_cachedir || return
+ if /bin/mountpoint -q /run/.splash-cache; then
+ /bin/mount --move /run/.splash-cache $spl_cachedir || return
splash_comm_send set message "$SPLASH_BOOT_MESSAGE"
# Mount a tmpfs
else
@@ -59,7 +61,7 @@ case $0 in /etc/rc.sysinit )
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
@@ -108,19 +110,13 @@ case $0 in /etc/rc.sysinit )
splash_shutdown_start() {
splash_begin
}
- ## http://bugs.archlinux.org/task/10536 ## FIX ME ##
- splash_shutdown_prekillall() { /bin/sleep .1; }
+ splash_shutdown_prekillall() {
+ splash_comm_send progress $(( 65535*1/3 )); splash_comm_send paint
+ [[ -r $spl_pidfile ]] && add_omit_pids $( <$spl_pidfile )
+ }
splash_shutdown_postkillall() {
- if [[ $( $spl_bindir/fgconsole ) = $SPLASH_TTY ]]; then
- stat_busy "Restarting Fbsplash daemon"
- PROGRESS=$(( 65535*2/3 )) splash_start
- if [[ -e $spl_cachedir/stop_failed-fbsplash-dummy ]]; then
- splash_comm_send update_svc fbsplash-dummy svc_stop_failed
- fi
- stat_done
- fi
+ splash_comm_send progress $(( 65535*2/3 )); splash_comm_send paint
}
- ##
splash_shutdown_poweroff() {
SPLASH_EXIT_TYPE=staysilent splash_stop
}
@@ -131,7 +127,7 @@ splash_progress_init() {
case $daemon in $SPLASH_XSERVICE | @$SPLASH_XSERVICE ) break
;; \!* |@* ) continue
esac
- SPLASH_STEPS+=1
+ (( SPLASH_STEPS++ ))
done
}
@@ -141,7 +137,6 @@ splash_progress() {
}
# 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 --git a/abs/core/fbsplash/fbsplash.git.patch b/abs/core/fbsplash/fbsplash.git.patch
deleted file mode 100644
index 15f041c..0000000
--- a/abs/core/fbsplash/fbsplash.git.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-From 4ecac1b2645afc8079aad4067a1aa0e8a96eab12 Mon Sep 17 00:00:00 2001
-From: =?utf8?q?Micha=C5=82=20Januszewski?= <spock@gentoo.org>
-Date: Tue, 16 Feb 2010 23:30:18 +0100
-Subject: [PATCH] Make it possible to build fbcondecor_helper against glibc.
-
----
- configure.ac | 34 ++++++++++++++++++++++++++++++++++
- libs/Makefile.am | 2 ++
- src/Makefile.am | 34 +++++++++++++++++++++++++++++++++-
- 3 files changed, 69 insertions(+), 1 deletions(-)
-
-diff --git configure.ac configure.ac
-index 63b1ff6..8db1498 100644
---- configure.ac
-+++ configure.ac
-@@ -76,6 +76,23 @@ AC_ARG_ENABLE([klibc-shared],
- )
- AM_CONDITIONAL([CONFIG_KLIBC_SHARED], [test "x${config_klibc_shared}" = "xyes"])
-
-+AC_ARG_ENABLE([static-binaries],
-+ AC_HELP_STRING([--disable-static-binaries], [do not build any statically linked binaries]),
-+ [
-+ AS_CASE(["${enableval}"],
-+ [yes], [config_static_binaries="yes"],
-+ [no], [config_static_binaries="no"],
-+ [AC_MSG_ERROR([bad value '${enableval}' for --disable-static-binaries])]
-+ )
-+ ],
-+ [config_static_binaries="yes"]
-+)
-+AM_CONDITIONAL([CONFIG_STATIC_BINARIES], [test "x${config_static_binaries}" = "xyes"])
-+AS_IF(
-+ [test "x${config_static_binaries}" = "xyes"],
-+ [AC_DEFINE([CONFIG_STATIC_BINARIES], [1], [Define to 1 to disable building of statically linked binaries.])]
-+)
-+
- AC_ARG_ENABLE([deprecated],
- AC_HELP_STRING([--enable-deprecated], [include support for deprecated features]),
- [
-@@ -333,6 +350,23 @@ AC_ARG_WITH([themedir],
- )
- AC_SUBST([themedir])
-
-+AC_ARG_WITH([klibc],
-+ AC_HELP_STRING([--without-klibc], [link the kernel helper against glibc instead of klibc]),
-+ [
-+ AS_CASE(["${withval}"],
-+ [yes], [config_klibc="yes"],
-+ [no], [config_klibc="no"],
-+ [AC_MSG_ERROR([bad value ${withval} for --with-klibc])]
-+ )
-+ ],
-+ [config_klibc="yes"]
-+)
-+AM_CONDITIONAL([CONFIG_KLIBC], [test "x${config_klibc}" = "xyes"])
-+AS_IF(
-+ [test "x${config_klibc}" = "xyes"],
-+ [AC_DEFINE([CONFIG_KLIBC], [1], [use klibc])]
-+)
-+
- M_CFLFAGS=
- M_LIBS=
- AC_CHECK_HEADER(
-diff --git libs/Makefile.am b/core/libs/Makefile.am
-index 6675ec1..d070b29 100644
---- libs/Makefile.am
-+++ libs/Makefile.am
-@@ -24,6 +24,7 @@ mostlyclean-local: \
-
- noinst_LIBRARIES =
-
-+if CONFIG_KLIBC
- if CONFIG_HELPER
- noinst_LIBRARIES += libjpeg.a
- if CONFIG_PNG
-@@ -33,6 +34,7 @@ if CONFIG_TTF_KERNEL
- noinst_LIBRARIES += libfreetype.a
- endif
- endif
-+endif
-
- libjpeg_a_SOURCES =
- libpng_a_SOURCES =
-diff --git src/Makefile.am b/core/src/Makefile.am
-index fa6919d..7570b5e 100644
---- src/Makefile.am
-+++ src/Makefile.am
-@@ -167,7 +167,6 @@ sbin_PROGRAMS += fbcondecor_ctl
- endif
- sbin_PROGRAMS += fbsplashd
- bin_PROGRAMS += splash_util
--eexecsbin_PROGRAMS += fbsplashctl
-
- fbcondecor_ctl_SOURCES = fbcon_decor_ctl.c fbcon_decor.h ../include/console_decor.h ../include/fbcondecor.h common.h fbsplash.h
- fbcondecor_ctl_CPPFLAGS = $(AM_CPPFLAGS) -DTARGET_UTIL $(libfbsplashrender_la_CFLAGS)
-@@ -185,6 +184,9 @@ splash_util_CPPFLAGS = $(AM_CPPFLAGS) -DTARGET_UTIL $(libfbsplashrender_l
- splash_util_LDFLAGS = $(AM_LDFLAGS)
- splash_util_LDADD = libfbsplashrender.la libfbsplash.la
-
-+if CONFIG_STATIC_BINARIES
-+eexecsbin_PROGRAMS += fbsplashctl
-+
- fbsplashctl_SOURCES = $(fbsplashd_SOURCES) $(splash_util_SOURCES) fbsplashctl.c
- fbsplashctl_CFLAGS = $(AM_CFLAGS) $(PTHREAD_STATIC_CFLAGS) $(RT_CFLAGS) $(libfbsplashrender_la_CFLAGS) -DUNIFIED_BUILD
- fbsplashctl_CPPFLAGS = $(fbsplashd_CPPFLAGS) $(splash_util_CPPFLAGS)
-@@ -210,6 +212,7 @@ uninstall-hook:
- if CONFIG_FBCON_DECOR
- rm -f $(DESTDIR)$(eexecsbindir)/fbcondecor_ctl.static$(EXEEXT)
- endif
-+endif
-
- ################################################################################
- # Kernel
-@@ -219,6 +222,7 @@ if CONFIG_HELPER
- eexecsbin_PROGRAMS += fbcondecor_helper
- endif
-
-+if CONFIG_KLIBC
- fbcondecor_helper_SOURCES = \
- kernel.c \
- libfbsplash.c \
-@@ -236,10 +240,12 @@ fbcondecor_helper_SOURCES = \
- common.h \
- render.h \
- fbsplash.h
-+
- fbcondecor_helper_CPPFLAGS = -DWITH_ERRLIST -DTARGET_KERNEL -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
- fbcondecor_helper_CFLAGS = -Os -w -ffunction-sections -fdata-sections -I.@am__isrc@
- fbcondecor_helper_LDFLAGS =
- fbcondecor_helper_LDADD =
-+
- fbcondecor_helper_CFLAGS += -I$(abs_top_builddir)/libs/libjpeg -I$(LIBJPEG_SOURCE)
- fbcondecor_helper_LDADD += $(top_builddir)/libs/libjpeg.a
- if CONFIG_PNG
-@@ -280,3 +286,29 @@ fbcondecor_helper-%.o: %.c
- @$(call infmsg,CC,$@)
- $(Q)$(MKDIR_P) $(@D)
- $(Q)$(KLCC) $(fbcondecor_helper_CPPFLAGS) $(fbcondecor_helper_CFLAGS) $(INCLUDES) -c $< -o $@
-+else
-+fbcondecor_helper_SOURCES = \
-+ kernel.c \
-+ libfbsplash.c \
-+ libfbsplashrender.c \
-+ fbcon_decor.c \
-+ common.c \
-+ parse.c \
-+ list.c \
-+ render.c \
-+ image.c \
-+ effects.c \
-+ fbcon_decor.h \
-+ ../include/console_decor.h \
-+ ../include/fbcondecor.h \
-+ common.h \
-+ render.h \
-+ fbsplash.h
-+if CONFIG_TTF_KERNEL
-+fbcondecor_helper_SOURCES += ttf.c ttf.h
-+endif
-+fbcondecor_helper_CPPFLAGS = $(AM_CPPFLAGS) -DTARGET_KERNEL
-+fbcondecor_helper_CFLAGS = $(AM_CFLAGS) $(libfbsplashrender_la_CFLAGS)
-+fbcondecor_helper_LDFLAGS = $(AM_LDFLAGS)
-+fbcondecor_helper_LDADD = $(libfbsplashrender_la_LIBADD)
-+endif
---
-1.6.5.GIT
diff --git a/abs/core/fbsplash/fbsplash.initcpio_hook b/abs/core/fbsplash/fbsplash.initcpio_hook
index 62048df..02617a2 100644
--- a/abs/core/fbsplash/fbsplash.initcpio_hook
+++ b/abs/core/fbsplash/fbsplash.initcpio_hook
@@ -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
+ # 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
- if ! [ "$console" = tty1 -o "$SPLASH_SANITY" = insane ]; then
- err "Fbsplash requires console=tty1 in kernel line!"
- return 1
- fi
+ [ "${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
- 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
+ # Start the daemon here if possible
+ # to show animations early and gain some bootup speed
+ if [ -x "$spl_daemon" ]; 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 /run to get it moved to the new root
+ mkdir /run/.splash-cache
+ ( spl_cachedir=/run/.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 /run/
+ # Symlink for starting the daemon
+ ln -s /run/.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 /run/.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 --git a/abs/core/fbsplash/fbsplash.initcpio_install b/abs/core/fbsplash/fbsplash.initcpio_install
index 4485f91..841405b 100644
--- a/abs/core/fbsplash/fbsplash.initcpio_install
+++ b/abs/core/fbsplash/fbsplash.initcpio_install
@@ -1,104 +1,95 @@
-install() {
- (
- . /etc/conf.d/splash
+build() {
+ # 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
- 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
- fi
+ # Get in configuration, parameters and functions
+ . /etc/conf.d/splash
+ . /sbin/splash-functions.sh
- # 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
+ # Unmount any stale cache tmpfs
+ splash_cache_cleanup
- # 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,.*[ =]([^ ]*/[^ ]+).*,\1, ; t ; d
- ' | /usr/bin/sort -u
- }
+ SPLASH_PROFILE=off
- # Check if cfg file name or path
- _match_cfg() {
- [[ "$1" =~ (^|/)[0-9]+x[0-9]+\.cfg$ ]]
- }
+ 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 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
- }
+ # 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,.*[ =]([^ ]*/[^ ]+).*,\1, ; t ; d
+ ' "$@" | /usr/bin/sort -u
+ }
- # Add global non-cfg files
- _add_non_cfg_files /etc/splash
+ # Check if arg is a theme cfg file path
+ fbsplash_is_cfg() {
+ [[ $1 =~ ^/etc/splash/[^/]+/[0-9]+x[0-9]+\.cfg$ ]]
+ }
- # 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
+ # 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
- fi
- if [[ " "$dirs" " != *" "$dir" "* ]]; then
- dirs+=" "$dir
+ (( found )) || error "Theme '${theme_dir##*/}': File not found: '$file'"
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
+ error "Theme invalid or not found: '$theme'"
+ fi
+ done
SCRIPT="fbsplash"
}
@@ -106,8 +97,7 @@ install() {
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 --git a/abs/core/fbsplash/splash.conf b/abs/core/fbsplash/splash.conf
index 5360792..8eb3a44 100644
--- a/abs/core/fbsplash/splash.conf
+++ b/abs/core/fbsplash/splash.conf
@@ -2,15 +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=(
- linhes
- linhes/1024x768.cfg
- linhes/800x600.cfg
-)
+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.
@@ -23,16 +29,21 @@ SPLASH_REBOOT_MESSAGE="Rebooting '$HOSTNAME' (\$progress%)"
## * 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.
@@ -52,7 +63,7 @@ SPLASH_AUTOVERBOSE=0
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 --git a/abs/core/fbsplash/splash_start_initcpio.patch b/abs/core/fbsplash/splash_start_initcpio.patch
new file mode 100644
index 0000000..ff4ae96
--- /dev/null
+++ b/abs/core/fbsplash/splash_start_initcpio.patch
@@ -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
+ }
+