Skip to contentSkip to conversation

upstart: fix sysvinit compat

PATCH In review Anatoly Shipitsin 2 participants 6 messages Aug 25, 2010 – Aug 26, 2010

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 upstart: fix sysvinit compat

* change PR = "r2"
* add example-jobs for sysvinit compat
* add update-alternatives for proper switch
* add native tty service generate
* add rc rcS scripts for run sysvinit scripts
* change reboot halt poweroff shutdown for compatible with update-alternatives
* move runlevel to upstart-sysvinit
* change upstart-sysvtools-doc to upstart-sysvcompat-doc

---
 recipes/upstart/upstart.inc              |  111 ++++++++++++++++++++++++++++-
 recipes/upstart/upstart/init/rc          |  102 +++++++++++++++++++++++++++
 recipes/upstart/upstart/init/rcS         |  113 ++++++++++++++++++++++++++++++
 recipes/upstart/upstart/init/rcS-default |   25 +++++++
 recipes/upstart/upstart_0.3.11.bb        |   15 +++-
 recipes/upstart/upstart_0.3.8.bb         |   14 +++--
 6 files changed, 367 insertions(+), 13 deletions(-)
 create mode 100755 recipes/upstart/upstart/init/rc
 create mode 100755 recipes/upstart/upstart/init/rcS
 create mode 100644 recipes/upstart/upstart/init/rcS-default
recipes/upstart/upstart.inc +107 -4
index e67774a..7512133 100644
@@ -4,7 +4,7 @@ DEPENDS = ""
 DESCRIPTION = "Event driven system init"
 LICENSE = "GPL"
 
-inherit autotools pkgconfig 
+inherit autotools pkgconfig update-alternatives
 
 # --enable-compat builds halt, reboot, shutdown tools
 EXTRA_OECONF += "--enable-compat"
@@ -17,6 +17,109 @@ FILES_libupstart-dev += "${libdir}/libupstart.* ${includedir}/upstart/"
 
 # upstart-sysvcompat provides Sys V Init compatible tools: halt, reboot,
 # shutdown, telinit. These might be needed by other scripts.
-PACKAGES =+ "upstart-sysvcompat upstart-sysvtools-doc"
-FILES_upstart-sysvcompat += "${sbindir}/reboot ${sbindir}/halt ${sbindir}/shutdown ${sbindir}/telinit"
-FILES_upstart-sysvcompat-doc += "${mandir}/*/reboot.* ${mandir}/*/halt.* ${mandir}/*/shutdown.* ${mandir}/*/telinit.*"
+PACKAGES =+ "upstart-sysvcompat upstart-sysvcompat-doc"
+FILES_upstart-sysvcompat += " \
+    ${base_sbindir}/reboot.* ${base_sbindir}/halt.* ${base_sbindir}/poweroff.* \
+    ${base_sbindir}/shutdown.* ${base_sbindir}/telinit ${base_sbindir}/runlevel \
+    ${sysconfdir}/event.d/control-alt-delete \
+    ${sysconfdir}/event.d/rc* \
+    ${sysconfdir}/event.d/sulogin \
+    ${sysconfdir}/init.d \
+    ${sysconfdir}/default/rcS \
+"
+FILES_upstart-sysvcompat-doc += " \
+    ${mandir}/*/reboot.* ${mandir}/*/halt.* ${mandir}/*/poweroff.* \
+     ${mandir}/*/shutdown.* ${mandir}/*/telinit.* ${mandir}/*/runlevel.* \
+"
+
+ALTERNATIVE_NAME = "init"
+ALTERNATIVE_LINK = "${base_sbindir}/init"
+ALTERNATIVE_PATH = "${base_sbindir}/init.${PN}"
+ALTERNATIVE_PRIORITY = "60"
+
+EXTRA_OEMAKE += "'bindir=${base_bindir}' \
+		 'sbindir=${base_sbindir}' \
+		 'usrbindir=${bindir}' \
+		 'usrsbindir=${sbindir}' \
+		 'includedir=${includedir}' \
+		 'mandir=${mandir}'"
+
+do_install () {
+	oe_runmake 'DESTDIR=${D}' install
+	install -d ${D}${sysconfdir}
+	install -d ${D}${sysconfdir}/default
+	install -d ${D}${sysconfdir}/init.d
+
+	install -m 0644	${WORKDIR}/init/rcS-default	${D}${sysconfdir}/default/rcS
+	install -m 0755 ${WORKDIR}/init/rc		${D}${sysconfdir}/init.d
+	install -m 0755 ${WORKDIR}/init/rcS		${D}${sysconfdir}/init.d
+	install -m 0644 ${WORKDIR}/rc*			${D}${sysconfdir}/event.d
+	install -m 0644 ${WORKDIR}/control-alt-delete	${D}${sysconfdir}/event.d
+	install -m 0644 ${WORKDIR}/sulogin		${D}${sysconfdir}/event.d
+
+	if [ ! -z "${SERIAL_CONSOLE}" ]; then
+	     cat <<EOF >> ${D}${sysconfdir}/event.d/tty-serial
+# tty-serial - getty
+#
+# This service maintains a getty on tty-serial from the point the system is
+# started until it is shut down again.
+
+start on runlevel 2
+start on runlevel 3
+start on runlevel 4
+start on runlevel 5
+
+stop on runlevel 0
+stop on runlevel 1
+stop on runlevel 6
+
+respawn
+exec ${base_sbindir}/getty ${SERIAL_CONSOLE}
+EOF
+	fi
+	if [ "${USE_VT}" = "1" ]; then
+	    for n in ${SYSVINIT_ENABLED_GETTYS}
+	    do
+	     cat <<EOF >> ${D}${sysconfdir}/event.d/tty$n
+# tty$n - getty
+#
+# This service maintains a getty on tty$n from the point the system is
+# started until it is shut down again.
+
+start on runlevel 2
+start on runlevel 3
+start on runlevel 4
+start on runlevel 5
+
+stop on runlevel 0
+stop on runlevel 1
+stop on runlevel 6
+
+respawn
+exec ${base_sbindir}/getty 38400 tty$n
+EOF
+	    done
+	fi
+
+	mv ${D}${base_sbindir}/init	${D}${base_sbindir}/init.${PN}
+        mv ${D}${base_sbindir}/halt ${D}${base_sbindir}/halt.${PN}
+	mv ${D}${base_sbindir}/reboot ${D}${base_sbindir}/reboot.${PN}
+        mv ${D}${base_sbindir}/shutdown ${D}${base_sbindir}/shutdown.${PN}
+	mv ${D}${base_sbindir}/poweroff ${D}${base_sbindir}/poweroff.${PN}
+}
+
+pkg_postinst_${PN}-sysvcompat () {
+#!/bin/sh
+update-alternatives --install ${base_sbindir}/reboot reboot reboot.${PN} 200
+update-alternatives --install ${base_sbindir}/halt halt halt.${PN} 200
+update-alternatives --install ${base_sbindir}/poweroff poweroff poweroff.${PN} 200
+update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${PN} 200
+}
+
+pkg_prerm_${PN}-sysvcompat () {
+#!/bin/sh
+update-alternatives --remove reboot reboot.${PN}
+update-alternatives --remove halt halt.${PN}
+update-alternatives --remove poweroff reboot.${PN}
+update-alternatives --remove shutdown shutdown.${PN}
+}
recipes/upstart/upstart/init/rc new file +102 -0

102 lines not on this page · raw message

recipes/upstart/upstart/init/rcS new file +113 -0

113 lines not on this page · raw message

recipes/upstart/upstart/init/rcS-default new file +25 -0
new file mode 100644
index 0000000..7ad3c7b
@@ -0,0 +1,25 @@
+#
+#	Defaults for the boot scripts in /etc/rcS.d
+#
+
+# Time files in /tmp are kept in days.
+TMPTIME=0
+# Set to yes if you want sulogin to be spawned on bootup
+SULOGIN=no
+# Set to no if you want to be able to login over telnet/rlogin
+# before system startup is complete (as soon as inetd is started)
+DELAYLOGIN=no
+# Set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not.
+# UTC=yes
+# Set VERBOSE to "no" if you would like a more quiet bootup.
+VERBOSE=no
+# Set EDITMOTD to "no" if you don't want /etc/motd to be editted automatically
+EDITMOTD=no
+# Whether to fsck root on boot
+ENABLE_ROOTFS_FSCK=no
+# Set FSCKFIX to "yes" if you want to add "-y" to the fsck at startup.
+FSCKFIX=yes
+# Set TICKADJ to the correct tick value for this specific machine
+#TICKADJ=10000
+# Enable caching in populate-volatile.sh
+VOLATILE_ENABLE_CACHE=yes
recipes/upstart/upstart_0.3.11.bb +11 -4
index c4db01b..a0bd17e 100644
@@ -1,11 +1,18 @@
 require upstart.inc
 
-SRC_URI = "http://upstart.ubuntu.com/download/0.3/upstart-${PV}.tar.bz2 \
+SRC_URI = "http://upstart.ubuntu.com/download/0.3/upstart-${PV}.tar.bz2;name=upstart \
+    http://upstart.ubuntu.com/download/example-jobs/0.3/example-jobs-${PV}.tar.gz;name=compat \
+    file://init/rcS-default file://init/rc file://init/rcS \
 "
 
 RRECOMMENDS_${PN} = "libupstart upstart-sysvcompat"
 
-PR = "r1"
+PR = "r2"
 
-SRC_URI[md5sum] = "a9e475e1458c876add0441d9d4cfe9c0"
-SRC_URI[sha256sum] = "d4f7fff9112049eab318518719735d0ac66ff558ed91c2d7c7c41124de2832b6"
+USE_VT ?= "1"
+SYSVINIT_ENABLED_GETTYS ?= "1"
+
+SRC_URI[upstart.md5sum] = "a9e475e1458c876add0441d9d4cfe9c0" 
+SRC_URI[upstart.sha256sum] = "d4f7fff9112049eab318518719735d0ac66ff558ed91c2d7c7c41124de2832b6"
+SRC_URI[compat.md5sum] = "22d66ef8bc9d167eb822bbfecb584107"
+SRC_URI[compat.sha256sum] = "f53fae7258fcf67cb29d344e53e1548171e4781af11ff4ba92b8b81caab3c315"
recipes/upstart/upstart_0.3.8.bb +9 -5
index 1b2cfb5..baf00d2 100644
@@ -1,10 +1,14 @@
 require upstart.inc
 
-SRC_URI = "http://upstart.ubuntu.com/download/0.3/upstart-${PV}.tar.bz2 \
-file://autoconf_version.patch"
+SRC_URI = "http://upstart.ubuntu.com/download/0.3/upstart-${PV}.tar.bz2;name=upstart \
+    http://upstart.ubuntu.com/download/example-jobs/0.3/example-jobs-${PV}.tar.gz;name=compat \
+    file://init/rcS-default file://init/rc file://init/rcS \
+    file://autoconf_version.patch \
+"
 
 PR = "r1"
 
-
-SRC_URI[md5sum] = "5cdd2dc3a3f02089c9450edf4e8f4941"
-SRC_URI[sha256sum] = "9a2a37455ad4e9dd2856b5a0f15adb1a3f84439f60d0f63b041584a2666e9835"
+SRC_URI[upstart.md5sum] = "5cdd2dc3a3f02089c9450edf4e8f4941"
+SRC_URI[upstart.sha256sum] = "9a2a37455ad4e9dd2856b5a0f15adb1a3f84439f60d0f63b041584a2666e9835"
+SRC_URI[compat.md5sum] = "22d66ef8bc9d167eb822bbfecb584107"
+SRC_URI[compat.sha256sum] = "f53fae7258fcf67cb29d344e53e1548171e4781af11ff4ba92b8b81caab3c315"
Signature · 1 line
1.6.0.6
#1 lore raw

Am Mittwoch, den 25.08.2010, 22:49 +0600 schrieb Anatoly Shipitsin:

As written in my other message, what was the problem in the first place is missing.

Quoted 5 lines

* change PR = "r2"
* add example-jobs for sysvinit compat
* add update-alternatives for proper switch
* add native tty service generate
* add rc rcS scripts for run sysvinit scripts

Where did you take those from?

Quoted 3 lines

* change reboot halt poweroff shutdown for compatible with update-alternatives
* move runlevel to upstart-sysvinit
* change upstart-sysvtools-doc to upstart-sysvcompat-doc

Small commits – like changing the package name – make it easier to review.

Quoted 49 lines
---
 recipes/upstart/upstart.inc              |  111 ++++++++++++++++++++++++++++-
 recipes/upstart/upstart/init/rc          |  102 +++++++++++++++++++++++++++
 recipes/upstart/upstart/init/rcS         |  113 ++++++++++++++++++++++++++++++
 recipes/upstart/upstart/init/rcS-default |   25 +++++++
 recipes/upstart/upstart_0.3.11.bb        |   15 +++-
 recipes/upstart/upstart_0.3.8.bb         |   14 +++--
 6 files changed, 367 insertions(+), 13 deletions(-)
 create mode 100755 recipes/upstart/upstart/init/rc
 create mode 100755 recipes/upstart/upstart/init/rcS
 create mode 100644 recipes/upstart/upstart/init/rcS-default
recipes/upstart/upstart.inc +17 -4
index e67774a..7512133 100644
@@ -4,7 +4,7 @@ DEPENDS = ""
 DESCRIPTION = "Event driven system init"
 LICENSE = "GPL"
 
-inherit autotools pkgconfig 
+inherit autotools pkgconfig update-alternatives
 
 # --enable-compat builds halt, reboot, shutdown tools
 EXTRA_OECONF += "--enable-compat"
@@ -17,6 +17,109 @@ FILES_libupstart-dev += "${libdir}/libupstart.* ${includedir}/upstart/"
 
 # upstart-sysvcompat provides Sys V Init compatible tools: halt, reboot,
 # shutdown, telinit. These might be needed by other scripts.
-PACKAGES =+ "upstart-sysvcompat upstart-sysvtools-doc"
-FILES_upstart-sysvcompat += "${sbindir}/reboot ${sbindir}/halt ${sbindir}/shutdown ${sbindir}/telinit"
-FILES_upstart-sysvcompat-doc += "${mandir}/*/reboot.* ${mandir}/*/halt.* ${mandir}/*/shutdown.* ${mandir}/*/telinit.*"
+PACKAGES =+ "upstart-sysvcompat upstart-sysvcompat-doc"
+FILES_upstart-sysvcompat += " \
+    ${base_sbindir}/reboot.* ${base_sbindir}/halt.* ${base_sbindir}/poweroff.* \
+    ${base_sbindir}/shutdown.* ${base_sbindir}/telinit ${base_sbindir}/runlevel \
+    ${sysconfdir}/event.d/control-alt-delete \
+    ${sysconfdir}/event.d/rc* \
+    ${sysconfdir}/event.d/sulogin \
+    ${sysconfdir}/init.d \
+    ${sysconfdir}/default/rcS \
+"
+FILES_upstart-sysvcompat-doc += " \
+    ${mandir}/*/reboot.* ${mandir}/*/halt.* ${mandir}/*/poweroff.* \
+     ${mandir}/*/shutdown.* ${mandir}/*/telinit.* ${mandir}/*/runlevel.* \
+"
+
+ALTERNATIVE_NAME = "init"

recipes/upstart/upstart.inc FILES_libupstart-dev += "${libdir}/libupstart.* ${includedir}/upstart/" · line 45

Quoted 10 lines
recipes/upstart/upstart.inc +10 -0
+ALTERNATIVE_LINK = "${base_sbindir}/init"
+ALTERNATIVE_PATH = "${base_sbindir}/init.${PN}"
+ALTERNATIVE_PRIORITY = "60"
+
+EXTRA_OEMAKE += "'bindir=${base_bindir}' \
+		 'sbindir=${base_sbindir}' \
+		 'usrbindir=${bindir}' \
+		 'usrsbindir=${sbindir}' \
+		 'includedir=${includedir}' \
+		 'mandir=${mandir}'"

Is not that picked up automatically?

Quoted 349 lines
recipes/upstart/upstart.inc +79 -0
+do_install () {
+	oe_runmake 'DESTDIR=${D}' install
+	install -d ${D}${sysconfdir}
+	install -d ${D}${sysconfdir}/default
+	install -d ${D}${sysconfdir}/init.d
+
+	install -m 0644	${WORKDIR}/init/rcS-default	${D}${sysconfdir}/default/rcS
+	install -m 0755 ${WORKDIR}/init/rc		${D}${sysconfdir}/init.d
+	install -m 0755 ${WORKDIR}/init/rcS		${D}${sysconfdir}/init.d
+	install -m 0644 ${WORKDIR}/rc*			${D}${sysconfdir}/event.d
+	install -m 0644 ${WORKDIR}/control-alt-delete	${D}${sysconfdir}/event.d
+	install -m 0644 ${WORKDIR}/sulogin		${D}${sysconfdir}/event.d
+
+	if [ ! -z "${SERIAL_CONSOLE}" ]; then
+	     cat <<EOF >> ${D}${sysconfdir}/event.d/tty-serial
+# tty-serial - getty
+#
+# This service maintains a getty on tty-serial from the point the system is
+# started until it is shut down again.
+
+start on runlevel 2
+start on runlevel 3
+start on runlevel 4
+start on runlevel 5
+
+stop on runlevel 0
+stop on runlevel 1
+stop on runlevel 6
+
+respawn
+exec ${base_sbindir}/getty ${SERIAL_CONSOLE}
+EOF
+	fi
+	if [ "${USE_VT}" = "1" ]; then
+	    for n in ${SYSVINIT_ENABLED_GETTYS}
+	    do
+	     cat <<EOF >> ${D}${sysconfdir}/event.d/tty$n
+# tty$n - getty
+#
+# This service maintains a getty on tty$n from the point the system is
+# started until it is shut down again.
+
+start on runlevel 2
+start on runlevel 3
+start on runlevel 4
+start on runlevel 5
+
+stop on runlevel 0
+stop on runlevel 1
+stop on runlevel 6
+
+respawn
+exec ${base_sbindir}/getty 38400 tty$n
+EOF
+	    done
+	fi
+
+	mv ${D}${base_sbindir}/init	${D}${base_sbindir}/init.${PN}
+        mv ${D}${base_sbindir}/halt ${D}${base_sbindir}/halt.${PN}
+	mv ${D}${base_sbindir}/reboot ${D}${base_sbindir}/reboot.${PN}
+        mv ${D}${base_sbindir}/shutdown ${D}${base_sbindir}/shutdown.${PN}
+	mv ${D}${base_sbindir}/poweroff ${D}${base_sbindir}/poweroff.${PN}
+}
+
+pkg_postinst_${PN}-sysvcompat () {
+#!/bin/sh
+update-alternatives --install ${base_sbindir}/reboot reboot reboot.${PN} 200
+update-alternatives --install ${base_sbindir}/halt halt halt.${PN} 200
+update-alternatives --install ${base_sbindir}/poweroff poweroff poweroff.${PN} 200
+update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${PN} 200
+}
+
+pkg_prerm_${PN}-sysvcompat () {
+#!/bin/sh
+update-alternatives --remove reboot reboot.${PN}
+update-alternatives --remove halt halt.${PN}
+update-alternatives --remove poweroff reboot.${PN}
+update-alternatives --remove shutdown shutdown.${PN}
+}
recipes/upstart/upstart/init/rc new file +102 -0
new file mode 100755
index 0000000..fdb0fce
@@ -0,0 +1,102 @@
+#!/bin/sh
+#
+# rc		This file is responsible for starting/stopping
+#		services when the runlevel changes.
+#
+#		Optimization feature:
+#		A startup script is _not_ run when the service was
+#		running in the previous runlevel and it wasn't stopped
+#		in the runlevel transition (most Debian services don't
+#		have K?? links in rc{1,2,3,4,5} )
+#
+# Author:	Miquel van Smoorenburg <[email protected]>
+#		Bruce Perens <[email protected]>
+#
+# Version:	@(#)rc  2.78  07-Nov-1999  [email protected]
+#
+
+. /etc/default/rcS
+export VERBOSE
+
+#
+# Start script or program.
+#
+startup() {
+  case "$1" in
+	*.sh)
+		sh "$@"
+		;;
+	*)
+		"$@"
+		;;
+  esac
+}
+
+  # Ignore CTRL-C only in this shell, so we can interrupt subprocesses.
+  trap ":" INT QUIT TSTP
+
+  # Set onlcr to avoid staircase effect.
+  stty onlcr 0>&1
+
+  # Now find out what the current and what the previous runlevel are.
+
+  runlevel=$RUNLEVEL
+  # Get first argument. Set new runlevel to this argument.
+  [ "$1" != "" ] && runlevel=$1
+  if [ "$runlevel" = "" ]
+  then
+	echo "Usage: $0 <runlevel>" >&2
+	exit 1
+  fi
+  previous=$PREVLEVEL
+  [ "$previous" = "" ] && previous=N
+
+  export runlevel previous
+
+  # Is there an rc directory for this new runlevel?
+  if [ -d /etc/rc$runlevel.d ]
+  then
+	# First, run the KILL scripts.
+	if [ $previous != N ]
+	then
+		for i in /etc/rc$runlevel.d/K[0-9][0-9]*
+		do
+			# Check if the script is there.
+			[ ! -f $i ] && continue
+
+			# Stop the service.
+			startup $i stop
+		done
+	fi
+	# Now run the START scripts for this runlevel.
+	for i in /etc/rc$runlevel.d/S*
+	do
+		[ ! -f $i ] && continue
+
+		if [ $previous != N ] && [ $previous != S ]
+		then
+			#
+			# Find start script in previous runlevel and
+			# stop script in this runlevel.
+			#
+			suffix=${i#/etc/rc$runlevel.d/S[0-9][0-9]}
+			stop=/etc/rc$runlevel.d/K[0-9][0-9]$suffix
+			previous_start=/etc/rc$previous.d/S[0-9][0-9]$suffix
+			#
+			# If there is a start script in the previous level
+			# and _no_ stop script in this level, we don't
+			# have to re-start the service.
+			#
+			[ -f $previous_start ] && [ ! -f $stop ] && continue
+		fi
+		case "$runlevel" in
+			0|6)
+				startup $i stop
+				;;
+			*)
+				startup $i start
+				;;
+		esac
+	done
+  fi
+# eof /etc/init.d/rc
recipes/upstart/upstart/init/rcS new file +113 -0
new file mode 100755
index 0000000..15b90f7
@@ -0,0 +1,113 @@
+#!/bin/sh
+#
+# rcS		Call all S??* scripts in /etc/rcS.d in
+#		numerical/alphabetical order.
+#
+# Version:	@(#)/etc/init.d/rcS  2.76  19-Apr-1999  [email protected]
+#
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+runlevel=S
+prevlevel=N
+umask 022
+export PATH runlevel prevlevel
+
+#	Make sure proc is mounted
+#
+[ -d "/proc/1" ] || mount proc /proc -t proc
+
+#	Make sure sys is mounted
+[ -d "/sys/kernel" ] || mount sysfs /sys -t sysfs
+
+#
+#	See if system needs to be setup. This is ONLY meant to
+#	be used for the initial setup after a fresh installation!
+#
+if [ -x /sbin/unconfigured.sh ]
+then
+  /sbin/unconfigured.sh
+fi
+
+#
+#	Source defaults.
+#
+. /etc/default/rcS
+
+#
+#	Trap CTRL-C &c only in this shell so we can interrupt subprocesses.
+#
+trap ":" INT QUIT TSTP
+
+#
+#       Do we have /proc/progress and set VERBOSE to "no" ?
+#       If so, calculate the number of scripts and the incremental step
+#
+if [ "$VERBOSE" = no ]; then
+    if [ -e /proc/progress ]; then
+        set `ls -1 /etc/rc$runlevel.d/S* | wc`
+        numscripts=$1
+        PROGRESS_incstep=`expr 90 / $1`
+        PROGRESS_value=10
+        PROGRESS=yes
+        export PROGRESS_value PROGRESS_incstep
+    fi
+fi
+export VERBOSE PROGRESS
+
+#
+#	Call all parts in order.
+#
+for i in /etc/rcS.d/S??*
+do
+	# Ignore dangling symlinks for now.
+	[ ! -f "$i" ] && continue
+
+	# Handle verbosity
+	[ "$VERBOSE" = very ] && echo "INIT: Running $i..."
+	if [ "$PROGRESS" = yes ]; then
+		export PROGRESS_value=`expr $PROGRESS_value + $PROGRESS_incstep`
+		echo "$PROGRESS_value Starting $i..." >/proc/progress
+	fi
+
+	case "$i" in
+		*.sh)
+			# Source shell script for speed.
+			(
+				trap - INT QUIT TSTP
+				set start
+				. $i
+			)
+			;;
+		*)
+			# No sh extension, so fork subprocess.
+			$i start
+			;;
+	esac
+
+        #
+        # Report status based on result code
+        #
+        result=$?
+        if [ "$PROGRESS" = yes ]; then
+                if [ "$result" = 0 ]; then
+                    echo "=s" >/proc/progress
+                else
+                    echo "=f" >/proc/progress
+                fi
+        fi
+done
+
+#
+#	For compatibility, run the files in /etc/rc.boot too.
+#
+[ -d /etc/rc.boot ] && run-parts /etc/rc.boot
+
+#
+#	Finish setup if needed. The comment above about
+#	/sbin/unconfigured.sh applies here as well!
+#
+if [ -x /sbin/setup.sh ]
+then
+  /sbin/setup.sh
+fi
+
recipes/upstart/upstart/init/rcS-default new file +25 -0
new file mode 100644
index 0000000..7ad3c7b
@@ -0,0 +1,25 @@
+#
+#	Defaults for the boot scripts in /etc/rcS.d
+#
+
+# Time files in /tmp are kept in days.
+TMPTIME=0
+# Set to yes if you want sulogin to be spawned on bootup
+SULOGIN=no
+# Set to no if you want to be able to login over telnet/rlogin
+# before system startup is complete (as soon as inetd is started)
+DELAYLOGIN=no
+# Set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not.
+# UTC=yes
+# Set VERBOSE to "no" if you would like a more quiet bootup.
+VERBOSE=no
+# Set EDITMOTD to "no" if you don't want /etc/motd to be editted automatically
+EDITMOTD=no
+# Whether to fsck root on boot
+ENABLE_ROOTFS_FSCK=no
+# Set FSCKFIX to "yes" if you want to add "-y" to the fsck at startup.
+FSCKFIX=yes
+# Set TICKADJ to the correct tick value for this specific machine
+#TICKADJ=10000
+# Enable caching in populate-volatile.sh
+VOLATILE_ENABLE_CACHE=yes
recipes/upstart/upstart_0.3.11.bb +3 -1
index c4db01b..a0bd17e 100644
@@ -1,11 +1,18 @@
 require upstart.inc
 
-SRC_URI = "http://upstart.ubuntu.com/download/0.3/upstart-${PV}.tar.bz2 \
+SRC_URI = "http://upstart.ubuntu.com/download/0.3/upstart-${PV}.tar.bz2;name=upstart \
+    http://upstart.ubuntu.com/download/example-jobs/0.3/example-jobs-${PV}.tar.gz;name=compat \
+    file://init/rcS-default file://init/rc file://init/rcS \
 "

recipes/upstart/upstart_0.3.11.bb line 13

Quoted 10 lines
recipes/upstart/upstart_0.3.11.bb +3 -3
 
 RRECOMMENDS_${PN} = "libupstart upstart-sysvcompat"
 
-PR = "r1"
+PR = "r2"
 
-SRC_URI[md5sum] = "a9e475e1458c876add0441d9d4cfe9c0"
-SRC_URI[sha256sum] = "d4f7fff9112049eab318518719735d0ac66ff558ed91c2d7c7c41124de2832b6"
+USE_VT ?= "1"
+SYSVINIT_ENABLED_GETTYS ?= "1"

Why are those two lines needed in this, but not in the 0.3.8 recipe?

Quoted 18 lines
recipes/upstart/upstart_0.3.11.bb +4 -0
+SRC_URI[upstart.md5sum] = "a9e475e1458c876add0441d9d4cfe9c0" 
+SRC_URI[upstart.sha256sum] = "d4f7fff9112049eab318518719735d0ac66ff558ed91c2d7c7c41124de2832b6"
+SRC_URI[compat.md5sum] = "22d66ef8bc9d167eb822bbfecb584107"
+SRC_URI[compat.sha256sum] = "f53fae7258fcf67cb29d344e53e1548171e4781af11ff4ba92b8b81caab3c315"
recipes/upstart/upstart_0.3.8.bb +5 -2
index 1b2cfb5..baf00d2 100644
@@ -1,10 +1,14 @@
 require upstart.inc
 
-SRC_URI = "http://upstart.ubuntu.com/download/0.3/upstart-${PV}.tar.bz2 \
-file://autoconf_version.patch"
+SRC_URI = "http://upstart.ubuntu.com/download/0.3/upstart-${PV}.tar.bz2;name=upstart \
+    http://upstart.ubuntu.com/download/example-jobs/0.3/example-jobs-${PV}.tar.gz;name=compat \
+    file://init/rcS-default file://init/rc file://init/rcS \
+    file://autoconf_version.patch \
+"

recipes/upstart/upstart_0.3.8.bb line 14

Quoted 10 lines
recipes/upstart/upstart_0.3.8.bb +4 -3
 
 PR = "r1"
 
-
-SRC_URI[md5sum] = "5cdd2dc3a3f02089c9450edf4e8f4941"
-SRC_URI[sha256sum] = "9a2a37455ad4e9dd2856b5a0f15adb1a3f84439f60d0f63b041584a2666e9835"
+SRC_URI[upstart.md5sum] = "5cdd2dc3a3f02089c9450edf4e8f4941"
+SRC_URI[upstart.sha256sum] = "9a2a37455ad4e9dd2856b5a0f15adb1a3f84439f60d0f63b041584a2666e9835"
+SRC_URI[compat.md5sum] = "22d66ef8bc9d167eb822bbfecb584107"
+SRC_URI[compat.sha256sum] = "f53fae7258fcf67cb29d344e53e1548171e4781af11ff4ba92b8b81caab3c315"

Thanks,

Paul

#2 lore raw
Quoted 3 lines · Paul Menzel

Am Mittwoch, den 25.08.2010, 22:49 +0600 schrieb Anatoly Shipitsin:

Where did you take those from?

Need more info?

Quoted 3 lines

Small commits – like changing the package name – make it easier to review.

Okey. May be i'm split patch to 5 small patches?

Quoted 1 line

Is not that picked up automatically?

No. Automatically upstart installed in /usr but for simple and right switching with update-alternatives
it's move to root. I'm got this additional parameters from sysvinit.

#3 lore raw

Am Donnerstag, den 26.08.2010, 09:14 +0600 schrieb Anatoly Shipitsin:

Quoted 6 lines
Quoted 3 lines · Paul Menzel

Am Mittwoch, den 25.08.2010, 22:49 +0600 schrieb Anatoly Shipitsin:

Where did you take those from?

Need more info?

I mean, did you write the those rc, rcS and rcS-default scripts yourself? (Probably not judging from the copyright in the header.) So where did you those from? From another distribution? Are they included somewhere?

Quoted 3 lines
Quoted 2 lines

Small commits – like changing the package name – make it easier to review.

Okey. May be i'm split patch to 5 small patches?

If it is possible, yes!

Quoted 2 lines
Quoted 1 line

Is not that picked up automatically?

No.

Please do not cut the lines out I referred to, because I already forget it ;-) and other would not have to look up the old message too but just the latest one.

Just to be clear that a meant the following line.

Quoted 10 lines
recipes/upstart/upstart.inc +6 -0
+EXTRA_OEMAKE += "'bindir=${base_bindir}' \
+              'sbindir=${base_sbindir}' \
+              'usrbindir=${bindir}' \
+              'usrsbindir=${sbindir}' \
+              'includedir=${includedir}' \
+              'mandir=${mandir}'"

Automatically upstart installed in /usr but for simple and right switching with update-alternatives
it's move to root.

Sorry, I do not understand. What is »root«? If it is »/« I do not see in which line it is used.

Quoted 1 line

I'm got this additional parameters from sysvinit.

Are you referring to those two?

recipes/upstart/upstart_0.3.11.bb line 13

Quoted 2 lines
recipes/upstart/upstart_0.3.11.bb +2 -0
+USE_VT ?= "1"
+SYSVINIT_ENABLED_GETTYS ?= "1"

But why don’t you add them to recipes/upstart/upstart_0.3.8.bb. You could add them to the inc file then.

Thanks,

Paul

#4 lore raw
Quoted 38 lines · Paul Menzel

I mean, did you write the those rc, rcS and rcS-default scripts yourself? (Probably not judging from the copyright in the header.) So where did you those from? From another distribution? Are they included somewhere?

I'm get it from sysvinit recipe

If it is possible, yes!

Okey

Just to be clear that a meant the following line.

Quoted 10 lines
recipes/upstart/upstart.inc +6 -0
+EXTRA_OEMAKE += "'bindir=${base_bindir}' \
+              'sbindir=${base_sbindir}' \
+              'usrbindir=${bindir}' \
+              'usrsbindir=${sbindir}' \
+              'includedir=${includedir}' \
+              'mandir=${mandir}'"

Automatically upstart installed in /usr but for simple and right switching with update-alternatives
it's move to root.

Sorry, I do not understand. What is »root«? If it is »/« I do not see in which line it is used.

yes to /

Quoted 1 line

I'm got this additional parameters from sysvinit.

Are you referring to those two?

Quoted 7 lines

recipes/upstart/upstart_0.3.11.bb line 13

Quoted 2 lines
recipes/upstart/upstart_0.3.11.bb +2 -0
+USE_VT ?= "1"
+SYSVINIT_ENABLED_GETTYS ?= "1"

But why don’t you add them to recipes/upstart/upstart_0.3.8.bb. You could add them to the inc file then.

I'm forgot about this. But now i'm try build upstart_0.3.8.bb and this not

buildable.

#5 lore raw

[Please do not include »>« in front of your *latest* answers.]

Am Donnerstag, den 26.08.2010, 16:07 +0600 schrieb Anatoly Shipitsin:

Quoted 8 lines · Paul Menzel
Quoted 7 lines

I mean, did you write the those rc, rcS and rcS-default scripts yourself? (Probably not judging from the copyright in the header.) So where did you those from? From another distribution? Are they included somewhere?

I'm get it from sysvinit recipe

Maybe add a note to the commit message then.

[…]

Quoted 9 lines
Quoted 9 lines

Just to be clear that a meant the following line.

Quoted 6 lines
recipes/upstart/upstart.inc +6 -0
+EXTRA_OEMAKE += "'bindir=${base_bindir}' \
+              'sbindir=${base_sbindir}' \
+              'usrbindir=${bindir}' \
+              'usrsbindir=${sbindir}' \
+              'includedir=${includedir}' \
+              'mandir=${mandir}'"
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

Automatically upstart installed in /usr but for simple and right switching with update-alternatives
it's move to root.

Sorry, I do not understand. What is »root«? If it is »/« I do not see in which line it is used.

yes to /

Can you give me the line where it is installed to /. Is not always a subdirectory of / used?

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

I'm got this additional parameters from sysvinit.

Are you referring to those two?

Quoted 8 lines
Quoted 5 lines

recipes/upstart/upstart_0.3.11.bb line 13

Quoted 2 lines
recipes/upstart/upstart_0.3.11.bb +2 -0
+USE_VT ?= "1"
+SYSVINIT_ENABLED_GETTYS ?= "1"

But why don’t you add them to recipes/upstart/upstart_0.3.8.bb. You could add them to the inc file then.

I'm forgot about this. But now i'm try build upstart_0.3.8.bb and this not buildable.

Can you find out if this version is pinned by any distribution in OE?

    $ git grep "0\.3\.8"

did not return anything for me regarding Upstart as far as I could see.

Maybe send a patch removing 0.3.8 first with »upstart: remove 0.3.8 b/c not buildable« as the commit summary and the failure in the commit message. That would be great.

Thanks,

Paul