r1295 - in trunk/oe/packages/upstart: . files

laforge at sita.openmoko.org laforge at sita.openmoko.org
Fri Mar 9 01:50:11 CET 2007


Author: laforge
Date: 2007-03-09 01:50:11 +0100 (Fri, 09 Mar 2007)
New Revision: 1295

Added:
   trunk/oe/packages/upstart/files/
   trunk/oe/packages/upstart/files/upstart-0.3.5-pwrokfail.patch
Modified:
   trunk/oe/packages/upstart/upstart_0.3.5.bb
Log:
* add patch for SIGPWR support
* add --enable-compat to configure flags


Added: trunk/oe/packages/upstart/files/upstart-0.3.5-pwrokfail.patch
===================================================================
--- trunk/oe/packages/upstart/files/upstart-0.3.5-pwrokfail.patch	2007-03-09 00:32:24 UTC (rev 1294)
+++ trunk/oe/packages/upstart/files/upstart-0.3.5-pwrokfail.patch	2007-03-09 00:50:11 UTC (rev 1295)
@@ -0,0 +1,62 @@
+Index: upstart-0.3.5/init/event.h
+===================================================================
+--- upstart-0.3.5.orig/init/event.h	2007-02-09 18:28:56.000000000 +0000
++++ upstart-0.3.5/init/event.h	2007-03-09 01:43:14.000000000 +0000
+@@ -123,6 +123,13 @@
+  **/
+ #define KBDREQUEST_EVENT "kbdrequest"
+ 
++/**
++ * POWEROKFAIL_EVENT:
++ *
++ * Name of the event that we generate when the system power failes
++ **/
++#define POWEROKFAIL_EVENT "pwrokfail"
++
+ 
+ /**
+  * JOB_STARTING_EVENT:
+Index: upstart-0.3.5/init/main.c
+===================================================================
+--- upstart-0.3.5.orig/init/main.c	2007-02-09 21:14:55.000000000 +0000
++++ upstart-0.3.5/init/main.c	2007-03-09 01:44:34.000000000 +0000
+@@ -64,6 +64,7 @@
+ static void reset_console   (void);
+ static void crash_handler   (int signum);
+ static void cad_handler     (void *data, NihSignal *signal);
++static void pof_handler     (void *data, NihSignal *signal);
+ static void kbd_handler     (void *data, NihSignal *signal);
+ static void stop_handler    (void *data, NihSignal *signal);
+ static void term_handler    (const char *prog, NihSignal *signal);
+@@ -227,6 +228,8 @@
+ 	reboot (RB_DISABLE_CAD);
+ 	NIH_MUST (nih_signal_add_handler (NULL, SIGINT, cad_handler, NULL));
+ 
++	NIH_MUST (nih_signal_add_handler (NULL, SIGPWR, pof_handler, NULL));
++
+ 	/* Ask the kernel to send us SIGWINCH when alt-uparrow is pressed;
+ 	 * generate a kbdrequest event.
+ 	 */
+@@ -396,6 +399,22 @@
+ }
+ 
+ /**
++ * pof_handler:
++ * @data: unused,
++ * @signal: signal that called this handler.
++ *
++ * Handle having recieved the SIGPWR signal, sent to us when the kernel
++ * detects a power failure. We just generate a
++ * pwrokfail event.
++ **/
++static void
++pof_handler (void      *data,
++	     NihSignal *signal)
++{
++	event_emit (POWEROKFAIL_EVENT, NULL, NULL);
++}
++
++/**
+  * kbd_handler:
+  * @data: unused,
+  * @signal: signal that called this handler.

Modified: trunk/oe/packages/upstart/upstart_0.3.5.bb
===================================================================
--- trunk/oe/packages/upstart/upstart_0.3.5.bb	2007-03-09 00:32:24 UTC (rev 1294)
+++ trunk/oe/packages/upstart/upstart_0.3.5.bb	2007-03-09 00:50:11 UTC (rev 1295)
@@ -2,17 +2,17 @@
 HOMEPAGE = "http://upstart.ubuntu.com/"
 SECTION = "base"
 LICENSE = "GPL"
-PR = "r0"
+PR = "r1"
 
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/files"
 
 SRC_URI = "http://upstart.ubuntu.com/download/upstart-0.3.5.tar.bz2 \
+	   file://upstart-0.3.5-pwrokfail.patch;patch=1 \
 	  "
+inherit autotools
 
-#S = "${WORKDIR}/uucp-${PV}"
+EXTRA_OECONF = "--enable-compat=sysv"
 
-inherit autotools
-
 do_configure() {
 	gnu-configize
 	oe_runconf





More information about the commitlog mailing list