1
0
mirror of https://github.com/dguglielmi/sunny-overlay.git synced 2025-12-06 16:02:39 +01:00

- splashutils: Remove uneended patches and unused ebuild

This commit is contained in:
2014-08-03 12:15:07 +02:00
parent a8b93a603f
commit 1a1b286733
17 changed files with 0 additions and 2243 deletions

View File

@@ -1,11 +0,0 @@
--- initrd.splash 2008-11-13 23:49:00.000000000 +0100
+++ initrd.splash.new 2010-07-27 21:35:24.647912782 +0200
@@ -26,7 +26,7 @@
init)
if [ -n "$2" ]; then
export BOOT_MSG="$2"
- elif [ "${CDROOT}" -eq '1' ]; then
+ elif [ "${CDROOT}" = '1' ]; then
export BOOT_MSG="Preparing the LiveCD environment... Press Alt+F1 for verbose mode."
else
export BOOT_MSG="Preparing the system for boot... Press Alt+F1 for verbose mode."

View File

@@ -1,110 +0,0 @@
diff --git a/core/src/daemon.c b/core/src/daemon.c
index e3463fc..eae23ec 100644
--- a/core/src/daemon.c
+++ b/core/src/daemon.c
@@ -306,6 +306,35 @@ void handler_alarm(int unused)
return;
}
+int process_switch_sig(int sig)
+{
+ /* Switch from silent to verbose. */
+ if (sig == SIGUSR1) {
+ pthread_mutex_lock(&mtx_paint);
+ pthread_mutex_lock(&mtx_tty);
+ ioctl(fd_tty[config.tty_s], VT_RELDISP, 1);
+ pthread_mutex_unlock(&mtx_tty);
+
+ ctty = CTTY_VERBOSE;
+ pthread_mutex_unlock(&mtx_paint);
+ return 1;
+ /* Switch back to silent. */
+ } else if (sig == SIGUSR2) {
+ pthread_mutex_lock(&mtx_paint);
+ pthread_mutex_lock(&mtx_tty);
+ ioctl(fd_tty[config.tty_s], VT_RELDISP, 2);
+ pthread_mutex_unlock(&mtx_tty);
+
+ ctty = CTTY_SILENT;
+ pthread_mutex_unlock(&mtx_paint);
+
+ switch_silent();
+ return 2;
+ }
+
+ return 0;
+}
+
/*
* Signal handler.
*
@@ -315,7 +344,7 @@ void handler_alarm(int unused)
*/
void* thf_sighandler(void *unusued)
{
- sigset_t sigset;
+ sigset_t sigset, sigset_switch;
int sig;
/* We don't handle SIGALRM. */
@@ -329,31 +358,39 @@ void* thf_sighandler(void *unusued)
sigaddset(&sigset, SIGTERM);
sigaddset(&sigset, SIGINT);
+ sigemptyset(&sigset_switch);
+ sigaddset(&sigset_switch, SIGUSR1);
+ sigaddset(&sigset_switch, SIGUSR2);
+
while (1) {
sigwait(&sigset, &sig);
- /* Switch from silent to verbose. */
- if (sig == SIGUSR1) {
- pthread_mutex_lock(&mtx_paint);
- pthread_mutex_lock(&mtx_tty);
- ioctl(fd_tty[config.tty_s], VT_RELDISP, 1);
- pthread_mutex_unlock(&mtx_tty);
-
- ctty = CTTY_VERBOSE;
- pthread_mutex_unlock(&mtx_paint);
- /* Switch back to silent. */
- } else if (sig == SIGUSR2) {
- pthread_mutex_lock(&mtx_paint);
- pthread_mutex_lock(&mtx_tty);
- ioctl(fd_tty[config.tty_s], VT_RELDISP, 2);
- pthread_mutex_unlock(&mtx_tty);
-
- ctty = CTTY_SILENT;
- pthread_mutex_unlock(&mtx_paint);
+ process_switch_sig(sig);
+
+ /* Internally generated terminate signal */
+ if (sig == SIGINT) {
+ struct timespec timeout;
+ timeout.tv_sec = 0;
+ timeout.tv_nsec = 0;
+ bool pending = true;
+
+ /*
+ * Process any remaining signals. There are no guarantees as to the
+ * order in which the signals are delivered, so we have to make sure
+ * all pending signals are processed before exiting.
+ */
+ while (pending) {
+ sig = sigtimedwait(&sigset_switch, NULL, &timeout);
+
+ if (sig == -1) {
+ /* No more pending signals. */
+ if (errno == EAGAIN)
+ pending = false;
+ } else {
+ process_switch_sig(sig);
+ }
+ }
- switch_silent();
- } else if (sig == SIGINT) {
- /* internally generated terminate signal */
do_cleanup();
pthread_exit(NULL);
} else if (sig == SIGTERM) {

View File

@@ -1,55 +0,0 @@
diff --git a/gentoo/splash.c b/gentoo/splash.c
index b6fa774..726315f 100644
--- a/gentoo/splash.c
+++ b/gentoo/splash.c
@@ -134,6 +134,19 @@ static void get_list(RC_STRINGLIST *list, const char *file)
}
}
+static void fix_rc_variable(char *s)
+{
+ do {
+ char *t = strstr(s, "\\$");
+
+ if (t) {
+ memmove(t, t+1, strlen(t));
+ } else {
+ break;
+ }
+ } while(1);
+}
+
/*
* Get splash settings from /etc/conf.d/splash
*/
@@ -189,21 +202,27 @@ static int splash_config_gentoo(fbspl_cfg_t *cfg, fbspl_type_t type)
switch(type) {
case fbspl_reboot:
t = rc_config_value(confd, "SPLASH_REBOOT_MESSAGE");
- if (t)
+ if (t) {
+ fix_rc_variable(t);
fbsplash_acc_message_set(t);
+ }
break;
case fbspl_shutdown:
t = rc_config_value(confd, "SPLASH_SHUTDOWN_MESSAGE");
- if (t)
+ if (t) {
+ fix_rc_variable(t);
fbsplash_acc_message_set(t);
+ }
break;
case fbspl_bootup:
default:
t = rc_config_value(confd, "SPLASH_BOOT_MESSAGE");
- if (t)
+ if (t) {
+ fix_rc_variable(t);
fbsplash_acc_message_set(t);
+ }
break;
}

View File

@@ -1,36 +0,0 @@
diff --git a/core/libs/Makefile.am b/core/libs/Makefile.am
index d070b29..c0a9258 100644
--- a/core/libs/Makefile.am
+++ b/core/libs/Makefile.am
@@ -53,7 +53,7 @@ libfreetype.a: klibc_compat.h
if ! $(MAKE) --question $(AM_MAKEFLAGS) CFLAGS="$(K_CFLAGS)" library ; then \
$(call infmsg,MAKE,libfreetype.a) ; \
fi ; \
- $(MAKE) $(AM_MAKEFLAGS) CFLAGS="-c $(K_CFLAGS)" CCexe="$(BUILD_CC)" library $(OUTPUT)
+ $(MAKE) $(AM_MAKEFLAGS) CFLAGS="-c $(K_CFLAGS)" CCexe="$(BUILD_CC)" ANSIFLAGS="" library $(OUTPUT)
$(Q)$(MKDIR_P) $(@D)
$(Q)cp -f libfreetype/.libs/libfreetype.a $@
@@ -62,18 +62,18 @@ libjpeg.a:
$(Q)cd libjpeg ; \
if test ! -e ./Makefile ; then \
$(call infmsg,CONF,libjpeg.a) ; \
- CC=$(KLCC) CFLAGS="$(K_CFLAGS) -I$(abs_top_builddir)/libs/libjpeg" $(LIBJPEG_SOURCE)/configure \
+ CC=$(KLCC) CFLAGS="$(K_CFLAGS) -I$(abs_top_builddir)/libs/libjpeg -include $(abs_top_srcdir)/libs/klibc_compat.h" $(LIBJPEG_SOURCE)/configure \
--host=$(host) --build=$(build_triplet) $(OUTPUT) ; \
echo "#define NO_GETENV 1" >> jconfig.h ; \
$(SED) -i "s#CFLAGS=.*#CFLAGS=$(K_CFLAGS) -I$(abs_top_builddir)/libs/libjpeg#" Makefile ; \
$(SED) -i "s:#define JMESSAGE.*::" $(LIBJPEG_SOURCE)/jerror.c ; \
fi ; \
- if ! $(MAKE) --question $(AM_MAKEFLAGS) CC="$(KLCC)" libjpeg.a ; then \
+ if ! $(MAKE) --question $(AM_MAKEFLAGS) CC="$(KLCC)" libjpeg.la ; then \
$(call infmsg,MAKE,libjpeg.a) ; \
fi ; \
- $(MAKE) $(AM_MAKEFLAGS) CC="$(KLCC)" libjpeg.a $(OUTPUT)
+ $(MAKE) $(AM_MAKEFLAGS) CC="$(KLCC)" libjpeg.la $(OUTPUT)
$(Q)$(MKDIR_P) $(@D)
- $(Q)cp -f libjpeg/libjpeg.a $@
+ $(Q)cp -f libjpeg/.libs/libjpeg.a $@
libpng.a: libz.a
$(Q)cd $(LIBPNG_SOURCE) ; \

View File

@@ -1,96 +0,0 @@
commit 1b760b583f1faa0d3114440a6746cbefa36dd797
Author: AlphatPC <AlphatPC@gmail.com>
Date: Sun May 8 17:18:03 2011 +0200
Use libpng accessor functions (for libpng-1.5 compat).
diff --git a/core/src/image.c b/core/src/image.c
index 6973575..4fb21a9 100644
--- a/core/src/image.c
+++ b/core/src/image.c
@@ -61,27 +61,27 @@ static int load_png(stheme_t *theme, char *filename, u8 **data, struct fb_cmap *
png_init_io(png_ptr, fp);
png_read_info(png_ptr, info_ptr);
- if (cmap && info_ptr->color_type != PNG_COLOR_TYPE_PALETTE)
+ if (cmap && png_get_color_type(png_ptr, info_ptr) != PNG_COLOR_TYPE_PALETTE)
return -2;
- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
- info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY ||
+ png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA)
png_set_gray_to_rgb(png_ptr);
- if (info_ptr->bit_depth == 16)
+ if (png_get_bit_depth(png_ptr, info_ptr) == 16)
png_set_strip_16(png_ptr);
- if (!want_alpha && info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
+ if (!want_alpha && png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA)
png_set_strip_alpha(png_ptr);
#ifndef TARGET_KERNEL
- if (!(info_ptr->color_type & PNG_COLOR_MASK_ALPHA) & want_alpha) {
+ if (!(png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA) & want_alpha) {
png_set_add_alpha(png_ptr, 0xff, PNG_FILLER_AFTER);
}
#endif
png_read_update_info(png_ptr, info_ptr);
- if (!cmap && info_ptr->color_type != PNG_COLOR_TYPE_RGB && info_ptr->color_type != PNG_COLOR_TYPE_RGBA)
+ if (!cmap && png_get_color_type(png_ptr, info_ptr) != PNG_COLOR_TYPE_RGB && png_get_color_type(png_ptr, info_ptr) != PNG_COLOR_TYPE_RGBA)
return -3;
if (cmap) {
@@ -93,12 +93,12 @@ static int load_png(stheme_t *theme, char *filename, u8 **data, struct fb_cmap *
rowbytes = png_get_rowbytes(png_ptr, info_ptr);
- if ((width && *width && info_ptr->width != *width) || (height && *height && info_ptr->height != *height)) {
+ if ((width && *width && png_get_image_width(png_ptr, info_ptr) != *width) || (height && *height && png_get_image_height(png_ptr, info_ptr) != *height)) {
iprint(MSG_ERROR, "Image size mismatch: %s.\n", filename);
return -2;
} else {
- *width = info_ptr->width;
- *height = info_ptr->height;
+ *width = png_get_image_width(png_ptr, info_ptr);
+ *height = png_get_image_height(png_ptr, info_ptr);
}
*data = malloc(theme->xres * theme->yres * fbd.bytespp);
@@ -114,11 +114,11 @@ static int load_png(stheme_t *theme, char *filename, u8 **data, struct fb_cmap *
return -4;
}
- for (i = 0; i < info_ptr->height; i++) {
+ for (i = 0; i < png_get_image_height(png_ptr, info_ptr); i++) {
if (cmap) {
- row_pointer = *data + info_ptr->width * i;
+ row_pointer = *data + png_get_image_width(png_ptr, info_ptr) * i;
} else if (want_alpha) {
- row_pointer = *data + info_ptr->width * i * 4;
+ row_pointer = *data + png_get_image_width(png_ptr, info_ptr) * i * 4;
} else {
row_pointer = buf;
}
@@ -127,7 +127,7 @@ static int load_png(stheme_t *theme, char *filename, u8 **data, struct fb_cmap *
if (cmap) {
int h = 256 - cmap->len;
- t = *data + info_ptr->width * i;
+ t = *data + png_get_image_width(png_ptr, info_ptr) * i;
if (h) {
/* Move the colors up by 'h' offset. This is used because fbcon
@@ -139,8 +139,8 @@ static int load_png(stheme_t *theme, char *filename, u8 **data, struct fb_cmap *
/* We only need to convert the image if the alpha channel is not required */
} else if (!want_alpha) {
- u8 *tmp = *data + info_ptr->width * bytespp * i;
- rgba2fb((rgbacolor*)buf, tmp, tmp, info_ptr->width, i, 0, 0xff);
+ u8 *tmp = *data + png_get_image_width(png_ptr, info_ptr) * bytespp * i;
+ rgba2fb((rgbacolor*)buf, tmp, tmp, png_get_image_width(png_ptr, info_ptr), i, 0, 0xff);
}
}

View File

@@ -1,27 +0,0 @@
diff --git a/core/src/Makefile.am b/core/src/Makefile.am
index 20cb03e..fa6919d 100644
--- a/core/src/Makefile.am
+++ b/core/src/Makefile.am
@@ -119,7 +119,7 @@ libfbsplashrender_la_SOURCES = \
fbsplash.h
libfbsplashrender_la_CFLAGS = $(AM_CFLAGS)
libfbsplashrender_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(libfbsplashrender_version)
-libfbsplashrender_la_LIBADD = -lfbsplash
+libfbsplashrender_la_LIBADD = libfbsplash.la
libfbsplashrender_la_CFLAGS += $(JPEG_CFLAGS)
libfbsplashrender_la_LIBADD += $(JPEG_LIBS)
@@ -258,10 +258,10 @@ fbcondecor_helper_LDFLAGS += -static
endif
# Override automake's generation of target rules for building fbcondecor_helper.
-fbcondecor_helper: $(fbcondecor_helper_LDADD) $(fbcondecor_helper_OBJECTS)
+fbcondecor_helper: $(fbcondecor_helper_LDADD) $(fbcondecor_helper_OBJECTS) $(lib_LTLIBRARIES)
@$(call infmsg,LD,$@)
$(Q)$(MKDIR_P) $(@D)
- $(Q)$(KLCC) $(fbcondecor_helper_CFLAGS) $(fbcondecor_helper_LDFLAGS) $+ $(fbcondecor_helper_LDADD) -o $@
+ $(Q)$(KLCC) $(fbcondecor_helper_CFLAGS) $(fbcondecor_helper_LDFLAGS) $(fbcondecor_helper_OBJECTS) $(fbcondecor_helper_LDADD) -o $@
$(Q)$(STRIP) $@
# Override automake's generation of target rules for building fbcondecor_helper object files.

View File

@@ -1,24 +0,0 @@
commit 6f9aa3a3bc11e539613facf3caba5dcdb43c0117
Author: Michał Januszewski <spock@gentoo.org>
Date: Sun Nov 22 20:56:47 2009 +0100
gentoo: make sure the splash daemon works when boot goes through a named runlevel other than default
diff --git a/gentoo/splash.c b/gentoo/splash.c
index d831d0c..4b9a5b9 100644
--- a/gentoo/splash.c
+++ b/gentoo/splash.c
@@ -777,10 +777,12 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
hook != RC_HOOK_RUNLEVEL_START_OUT)
goto exit;
} else {
+ int pid;
+
/* We're starting/stopping a runlevel. Check whether we're
* actually booting/rebooting. */
if (rc_runlevel_starting() && strcmp(runlev, bootlevel) &&
- strcmp(runlev, defaultlevel) && strcmp(runlev, RC_LEVEL_SYSINIT))
+ strcmp(runlev, RC_LEVEL_SYSINIT) && fbsplash_check_daemon(&pid))
goto exit;
if (rc_runlevel_stopping() && strcmp(runlev, bootlevel) &&

View File

@@ -1,55 +0,0 @@
commit 7cf5fd02bbc6422ddbc9af7185cc47657148deb0
Author: Michał Januszewski <spock@gentoo.org>
Date: Sun Apr 4 16:19:40 2010 +0200
gentoo: only enable the effects that are actually selected.
diff --git a/gentoo/splash.c b/gentoo/splash.c
index 4b9a5b9..5220571 100644
--- a/gentoo/splash.c
+++ b/gentoo/splash.c
@@ -660,7 +660,7 @@ static int splash_start(const char *runlevel)
(config->type == fbspl_reboot) ? "reboot" : ((config->type == fbspl_shutdown) ? "shutdown" : "bootup"),
(config->kdmode == KD_GRAPHICS) ? "--kdgraphics" : "",
(config->textbox_visible) ? "--textbox" : "",
- (config->effects & (FBSPL_EFF_FADEOUT | FBSPL_EFF_FADEIN)) ? "--effects=fadeout,fadein" :
+ ((config->effects & (FBSPL_EFF_FADEOUT | FBSPL_EFF_FADEIN)) == (FBSPL_EFF_FADEOUT | FBSPL_EFF_FADEIN)) ? "--effects=fadeout,fadein" :
((config->effects & FBSPL_EFF_FADEOUT) ? "--effects=fadeout" :
((config->effects & FBSPL_EFF_FADEIN) ? "--effects=fadein" : "")));
@@ -716,11 +716,7 @@ static int splash_stop(const char *runlevel)
/* If we don't get a runlevel argument, then we're being executed
* because of a rc-abort event and we don't save any data. */
- if (runlevel == NULL) {
- return fbsplash_cache_cleanup(NULL);
- } else {
- return fbsplash_cache_cleanup(save);
- }
+ return fbsplash_cache_cleanup(save);
}
int rc_plugin_hook(RC_HOOK hook, const char *name)
commit d711147fc835cf408a9a4e7432fc565a6b952183
Author: Michał Januszewski <spock@gentoo.org>
Date: Sun Apr 4 16:57:23 2010 +0200
gentoo: add some comments in splash.conf
diff --git a/gentoo/splash.conf b/gentoo/splash.conf
index 4cf0a32..f056382 100644
--- a/gentoo/splash.conf
+++ b/gentoo/splash.conf
@@ -21,7 +21,10 @@ SPLASH_TEXTBOX="no"
SPLASH_AUTOVERBOSE="0"
# Name of the boot service starting X. Useful in cases when X is started
-# by a custom initscript, other than the usual 'xdm'.
+# by a custom initscript, other than the usual 'xdm'. If you are using a
+# custom X initscript and do not set this variable correctly, do not be
+# surprised if you end up at tty1 at the end of the boot process (instead of
+# in an X session).
# SPLASH_XSERVICE="xdm"
#########################################################################

View File

@@ -1,29 +0,0 @@
commit ae4b5cc9c2d904e18db51876d9bd292504714600
Author: Michał Januszewski <spock@gentoo.org>
Date: Mon Apr 6 20:59:48 2009 +0200
Prevent umounting of theme directories.
Some themes dynamically modify themselves during boot. In order to be
able to do that, they mount a tmpfs in their main directory. Prevent
openrc from umounting this directory when rebooting.
diff --git a/gentoo/splash.c b/gentoo/splash.c
index 048e0ec..d831d0c 100644
--- a/gentoo/splash.c
+++ b/gentoo/splash.c
@@ -968,10 +968,10 @@ do_start:
if (name && !strcmp(name, "localmount")) {
char *umounts = getenv("RC_NO_UMOUNTS");
- if (umounts)
- fprintf(rc_environ_fd, "RC_NO_UMOUNTS=%s:%s", umounts, FBSPLASH_CACHEDIR);
- else
- fprintf(rc_environ_fd, "RC_NO_UMOUNTS=%s", FBSPLASH_CACHEDIR);
+ if (umounts)
+ fprintf(rc_environ_fd, "RC_NO_UMOUNTS=%s:" FBSPLASH_CACHEDIR ":/etc/splash/%s", umounts, config->theme);
+ else
+ fprintf(rc_environ_fd, "RC_NO_UMOUNTS=" FBSPLASH_CACHEDIR ":/etc/splash/%s", config->theme);
}
i = splash_svc_handle(name, "svc_stop", false);
break;

View File

@@ -1,21 +0,0 @@
commit 7077483874a842c607d6e877696891ba4d5f1dd7
Author: Michał Januszewski <spock@gentoo.org>
Date: Sat Oct 9 21:07:37 2010 +0200
Fix a bug in splash-functions.sh.
This problem was reported in Gentoo bug #339767.
diff --git a/core/scripts/splash-functions.sh.in b/core/scripts/splash-functions.sh.in
index 1a89486..2c39c6a 100644
--- a/core/scripts/splash-functions.sh.in
+++ b/core/scripts/splash-functions.sh.in
@@ -341,7 +341,7 @@ splash_comm_send() {
# Returns the current splash mode.
splash_get_mode() {
- local ctty="${spl_bindir}/fgconsole"
+ local ctty="$({spl_bindir}/fgconsole)"
local mode="$(${spl_util})"
if [ "${mode}" = "silent" ]; then

View File

@@ -1,13 +0,0 @@
diff --git a/core/scripts/splash_geninitramfs.in b/core/scripts/splash_geninitramfs.in
index 9d75d21..ff9b75b 100644
--- a/core/scripts/splash_geninitramfs.in
+++ b/core/scripts/splash_geninitramfs.in
@@ -149,7 +149,7 @@ if [ "$mode" == "a" ]; then
fi
printv "o Creating directory structure.."
-mkdir -p ${imgdir}/{dev,dev/fb,dev/misc,dev/vc,$themedir,lib/splash/proc,root,sbin,lib/splash/sys}
+mkdir -p ${imgdir}/{dev,dev/fb,dev/misc,dev/vc,$themedir,@libdir@/splash/proc,root,sbin,@libdir@/splash/sys}
if [ $EUID == 0 ]; then
[[ ! -e "${imgdir}/dev/null" ]] && mknod "${imgdir}/dev/null" c 1 3

View File

@@ -1,24 +0,0 @@
diff -Naurp splashutils-1.5.4.3-orig//scripts/splash-functions.sh.in splashutils-1.5.4.3/scripts/splash-functions.sh.in
--- splashutils-1.5.4.3-orig//scripts/splash-functions.sh.in 2010-10-09 21:44:39.127691474 +0200
+++ splashutils-1.5.4.3/scripts/splash-functions.sh.in 2010-10-09 21:44:54.678690080 +0200
@@ -26,7 +26,7 @@ export spl_cachedir="@libdir@/splash/cac
export spl_tmpdir="@libdir@/splash/tmp"
export spl_fifo="${spl_cachedir}/.splash"
export spl_pidfile="${spl_cachedir}/daemon.pid"
-export spl_util="@bindir@/splash_util.static"
+export spl_util="@sbindir@/splash_util.static"
export spl_daemon="@sbindir@/fbsplashd.static"
export spl_decor="@sbindir@/fbcondecor_ctl.static"
export spl_bindir="@libdir@/splash/bin"
diff -Naurp splashutils-1.5.4.3-orig//src/Makefile.am splashutils-1.5.4.3/src/Makefile.am
--- splashutils-1.5.4.3-orig//src/Makefile.am 2010-10-09 21:44:39.121691920 +0200
+++ splashutils-1.5.4.3/src/Makefile.am 2010-10-09 21:45:10.934689775 +0200
@@ -166,7 +166,7 @@ if CONFIG_FBCON_DECOR
sbin_PROGRAMS += fbcondecor_ctl
endif
sbin_PROGRAMS += fbsplashd
-bin_PROGRAMS += splash_util
+sbin_PROGRAMS += fbsplashd 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

View File

@@ -1,74 +0,0 @@
commit a58099249acdce1fbdab19f5dfea0704c4c545f2
Author: Michał Januszewski <spock@gentoo.org>
Date: Sun Dec 28 13:32:16 2008 +0100
gentoo: make the splash plugin work with OpenRC 0.4.*
diff --git a/gentoo/splash.c b/gentoo/splash.c
index 26d0fa4..b6fa774 100644
--- a/gentoo/splash.c
+++ b/gentoo/splash.c
@@ -593,7 +593,7 @@ static int splash_start(const char *runlevel)
/* Get a list of services that we'll have to handle. */
/* We're rebooting/shutting down. */
- if (!strcmp(runlevel, RC_LEVEL_SHUTDOWN) || !strcmp(runlevel, RC_LEVEL_REBOOT)) {
+ if (!strcmp(runlevel, RC_LEVEL_SHUTDOWN)) {
if ((err = fbsplash_cache_prep()))
return err;
splash_svcs_stop(runlevel);
@@ -690,10 +690,14 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
int retval = 0;
runlev = rc_runlevel_get();
- if (!strcmp(runlev, RC_LEVEL_REBOOT))
- type = fbspl_reboot;
- else if (!strcmp(runlev, RC_LEVEL_SHUTDOWN))
- type = fbspl_shutdown;
+ if (!strcmp(runlev, RC_LEVEL_SHUTDOWN)) {
+ char *t = getenv("RUNLEVEL");
+ if (t && !strcmp(t, "6")) {
+ type = fbspl_reboot;
+ } else {
+ type = fbspl_shutdown;
+ }
+ }
/* Get boot and default levels from env variables exported by RC.
* If unavailable, use the default ones. */
@@ -716,7 +720,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
list = rc_stringlist_new();
get_list_fp(list, fp);
TAILQ_FOREACH(s, list, entries)
- rc_service_mark(s->value, RC_SERVICE_COLDPLUGGED);
+ rc_service_mark(s->value, RC_SERVICE_HOTPLUGGED);
pclose(fp);
rc_stringlist_free(list);
}
@@ -739,7 +743,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
goto exit;
if (rc_runlevel_stopping() && strcmp(runlev, bootlevel) &&
- strcmp(runlev, RC_LEVEL_REBOOT) && strcmp(runlev, RC_LEVEL_SHUTDOWN))
+ strcmp(runlev, RC_LEVEL_SHUTDOWN))
goto exit;
}
@@ -763,7 +767,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
case RC_HOOK_RUNLEVEL_STOP_IN:
/* Start the splash daemon on reboot. The theme hook is called
* from splash_start(). */
- if (strcmp(name, RC_LEVEL_REBOOT) == 0 || strcmp(name, RC_LEVEL_SHUTDOWN) == 0) {
+ if (strcmp(name, RC_LEVEL_SHUTDOWN) == 0) {
if ((i = splash_start(name))) {
fbsplash_set_verbose(0);
retval= i;
@@ -788,7 +792,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
case RC_HOOK_RUNLEVEL_STOP_OUT:
/* Make sure the progress indicator reaches 100%, even if
* something went wrong along the way. */
- if (strcmp(name, RC_LEVEL_REBOOT) == 0 || strcmp(name, RC_LEVEL_SHUTDOWN) == 0) {
+ if (strcmp(name, RC_LEVEL_SHUTDOWN) == 0) {
config->verbosity = FBSPL_VERB_QUIET;
i = fbsplash_check_daemon(&pid_daemon);
config->verbosity = FBSPL_VERB_NORMAL;

View File

@@ -1,99 +0,0 @@
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;