diff options
author | Michael Januszewski <spock@gentoo.org> | 2009-03-25 21:43:41 +0000 |
---|---|---|
committer | Michael Januszewski <spock@gentoo.org> | 2009-03-25 21:43:41 +0000 |
commit | 8ad192f54cd924294312ee391bdff2d3764f0c64 (patch) | |
tree | b503459c9696e013502292f1b985b0639c3a655c /media-gfx | |
parent | eautoreconf after applying patches that modifies autotools, bug #263476. (diff) | |
download | gentoo-2-8ad192f54cd924294312ee391bdff2d3764f0c64.tar.gz gentoo-2-8ad192f54cd924294312ee391bdff2d3764f0c64.tar.bz2 gentoo-2-8ad192f54cd924294312ee391bdff2d3764f0c64.zip |
Fix bug #261617 (icons not showing up during boot).
(Portage version: 2.1.6.10/cvs/Linux x86_64, RepoMan options: --force)
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/splashutils/ChangeLog | 7 | ||||
-rw-r--r-- | media-gfx/splashutils/files/splashutils-openrc-0.4.3-runlevel-fix.patch | 99 | ||||
-rw-r--r-- | media-gfx/splashutils/splashutils-1.5.4.3.ebuild | 5 |
3 files changed, 109 insertions, 2 deletions
diff --git a/media-gfx/splashutils/ChangeLog b/media-gfx/splashutils/ChangeLog index 4f0f4a146de2..e3d5134d7d14 100644 --- a/media-gfx/splashutils/ChangeLog +++ b/media-gfx/splashutils/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for media-gfx/splashutils # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/splashutils/ChangeLog,v 1.154 2009/02/10 00:53:51 spock Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/splashutils/ChangeLog,v 1.155 2009/03/25 21:43:41 spock Exp $ + + 25 Mar 2009; Michał Januszewski <spock@gentoo.org> + +files/splashutils-openrc-0.4.3-runlevel-fix.patch, + splashutils-1.5.4.3.ebuild: + Fix bug #261617 (icons not showing up during boot). 10 Feb 2009; Michał Januszewski <spock@gentoo.org> splashutils-1.5.4.2.ebuild, splashutils-1.5.4.3.ebuild: diff --git a/media-gfx/splashutils/files/splashutils-openrc-0.4.3-runlevel-fix.patch b/media-gfx/splashutils/files/splashutils-openrc-0.4.3-runlevel-fix.patch new file mode 100644 index 000000000000..36d4ef02d697 --- /dev/null +++ b/media-gfx/splashutils/files/splashutils-openrc-0.4.3-runlevel-fix.patch @@ -0,0 +1,99 @@ +commit 4bb63f7fb23b11591e2984ce87d4f36d80e29d65 +Author: Michał Januszewski <spock@gentoo.org> +Date: Wed Mar 25 22:26:04 2009 +0100 + + gentoo: export the sysvinit RUNLEVEL variable for compatibility reasons + + OpenRC 0.4.3+ no longer exports some sysvinit variables, including + RUNLEVEL. In order to avoid breaking themes and scripts which still + rely on this variable being present, we compute a suitable RUNLEVEL + value using the data available in OpenRC and then export it in + splash_call(). + +diff --git a/gentoo/splash.c b/gentoo/splash.c +index 726315f..048e0ec 100644 +--- a/gentoo/splash.c ++++ b/gentoo/splash.c +@@ -41,7 +41,7 @@ + #define SPLASH_CMD "export SPLASH_XRES='%d'; export SPLASH_YRES='%d';" \ + "export SOFTLEVEL='%s'; export BOOTLEVEL='%s';" \ + "export DEFAULTLEVEL='%s'; export svcdir=${RC_SVCDIR};" \ +- ". /sbin/splash-functions.sh; %s %s %s" ++ "export RUNLEVEL='%s'; . /sbin/splash-functions.sh; %s %s %s" + + static char *bootlevel = NULL; + static char *defaultlevel = NULL; +@@ -260,11 +260,32 @@ static int splash_config_gentoo(fbspl_cfg_t *cfg, fbspl_type_t type) + return 0; + } + ++static const char *splash_sysvinit_runlevel(const char *runlevel) ++{ ++ const char *runlev = runlevel ? runlevel : rc_runlevel_get(); ++ ++ if (!strcmp(runlev, RC_LEVEL_SHUTDOWN)) { ++ char *t = getenv("RC_REBOOT"); ++ if (t && !strcmp(t, "YES")) { ++ return "6"; ++ } else { ++ return "0"; ++ } ++ } else if (!strcmp(runlev, RC_LEVEL_SYSINIT)) { ++ return "S"; ++ } else if (!strcmp(runlev, RC_LEVEL_SINGLE)) { ++ return "1"; ++ } else { ++ return "3"; ++ } ++} ++ ++ + /* + * Call a function from /sbin/splash-functions.sh. + * This is rather slow, so use it only when really necessary. + */ +-static int splash_call(const char *cmd, const char *arg1, const char *arg2) ++static int splash_call(const char *cmd, const char *arg1, const char *arg2, const char *runlevel) + { + char *c; + int l; +@@ -285,7 +306,8 @@ static int splash_call(const char *cmd, const char *arg1, const char *arg2) + + snprintf(c, l, SPLASH_CMD, xres, yres, + arg1 ? (strcmp(arg1, RC_LEVEL_SYSINIT) == 0 ? bootlevel : soft) : soft, +- bootlevel, defaultlevel, cmd, arg1 ? arg1 : "", arg2 ? arg2 : ""); ++ bootlevel, defaultlevel, runlevel, ++ cmd, arg1 ? arg1 : "", arg2 ? arg2 : ""); + l = system(c); + free(c); + return l; +@@ -316,15 +338,16 @@ static int splash_theme_hook(const char *name, const char *type, const char *arg + } + + if (!strcmp(name, "rc_init") || !strcmp(name, "rc_exit")) { +- l = splash_call(buf, arg1, getenv("RUNLEVEL")); ++ const char *t = splash_sysvinit_runlevel(arg1); ++ l = splash_call(buf, arg1, t, t); + } else if (!strcmp(name, "svc_started") || !strcmp(name, "svc_stopped")) { + /* + * Set the 2nd parameter to 0 so that we don't break themes using the + * legacy interface in which these events contained an error code. + */ +- l = splash_call(buf, arg1, "0"); ++ l = splash_call(buf, arg1, "0", splash_sysvinit_runlevel(NULL)); + } else { +- l = splash_call(buf, arg1, NULL); ++ l = splash_call(buf, arg1, NULL, splash_sysvinit_runlevel(NULL)); + } + free(buf); + return l; +@@ -710,8 +733,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name) + + runlev = rc_runlevel_get(); + if (!strcmp(runlev, RC_LEVEL_SHUTDOWN)) { +- char *t = getenv("RUNLEVEL"); +- if (t && !strcmp(t, "6")) { ++ if (!strcmp(splash_sysvinit_runlevel(NULL), "6")) { + type = fbspl_reboot; + } else { + type = fbspl_shutdown; diff --git a/media-gfx/splashutils/splashutils-1.5.4.3.ebuild b/media-gfx/splashutils/splashutils-1.5.4.3.ebuild index 8fe587340914..635d3b39142e 100644 --- a/media-gfx/splashutils/splashutils-1.5.4.3.ebuild +++ b/media-gfx/splashutils/splashutils-1.5.4.3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/splashutils/splashutils-1.5.4.3.ebuild,v 1.7 2009/02/10 00:53:51 spock Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/splashutils/splashutils-1.5.4.3.ebuild,v 1.8 2009/03/25 21:43:41 spock Exp $ EAPI="1" @@ -89,6 +89,9 @@ src_unpack() { cd "${SG}" if has_version ">=sys-apps/openrc-0.4.0"; then epatch "${FILESDIR}"/splashutils-openrc-0.4-fix.patch + if has_version ">=sys-apps/openrc-0.4.3"; then + epatch "${FILESDIR}"/splashutils-openrc-0.4.3-runlevel-fix.patch + fi fi epatch "${FILESDIR}"/splashutils-1.5.4.3-fix_rc_var.patch cd "${S}" |