Skip to contentSkip to conversation

remove upstart_0.3.8.bb

PATCH New Anatoly Shipitsin 1 participant 4 messages Aug 30, 2010

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/4 remove upstart_0.3.8.bb

* remove recipe upstart_0.3.8.bb it's not buildable. I'm got error:

wire.c: In function 'upstart_pop_int':
wire.c:120: error: 'INT_MIN' undeclared (first use in this function) wire.c:120: error: (Each undeclared identifier is reported only once wire.c:120: error: for each function it appears in.) wire.c:120: error: 'INT_MAX' undeclared (first use in this function) wire.c: In function 'upstart_pop_unsigned':
wire.c:196: error: 'UINT_MAX' undeclared (first use in this function) make[2]: *** [wire.lo] Error 1

Not found any recipe depends on it.

---
 recipes/upstart/upstart_0.3.8.bb |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)
 delete mode 100644 recipes/upstart/upstart_0.3.8.bb
recipes/upstart/upstart_0.3.8.bb deleted +0 -10
deleted file mode 100644
index 1b2cfb5..0000000
@@ -1,10 +0,0 @@
-require upstart.inc
-
-SRC_URI = "http://upstart.ubuntu.com/download/0.3/upstart-${PV}.tar.bz2 \
-file://autoconf_version.patch"
-
-PR = "r1"
-
-
-SRC_URI[md5sum] = "5cdd2dc3a3f02089c9450edf4e8f4941"
-SRC_URI[sha256sum] = "9a2a37455ad4e9dd2856b5a0f15adb1a3f84439f60d0f63b041584a2666e9835"
Signature · 1 line
1.6.0.6
#1 lore raw

PATCH v3 2/4 Add rc init files for upstart sysvcompat

* Add rc, rcS and rcS-default from sysvinit recipe directory, for upstart-sysvcompat

---
 recipes/upstart/files/init/rc          |  102 ++++++++++++++++++++++++++++
 recipes/upstart/files/init/rcS         |  113 ++++++++++++++++++++++++++++++++
 recipes/upstart/files/init/rcS-default |   25 +++++++
 3 files changed, 240 insertions(+), 0 deletions(-)
 create mode 100755 recipes/upstart/files/init/rc
 create mode 100755 recipes/upstart/files/init/rcS
 create mode 100644 recipes/upstart/files/init/rcS-default
recipes/upstart/files/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/files/init/rcS new file +113 -0

113 lines not on this page · raw message

recipes/upstart/files/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
Signature · 1 line
1.6.0.6
#2 lore raw

PATCH v3 3/4 update upstart.inc for fix upstart-sysvcompat

* change upstart-sysvtools to upstart-sysvcompat for right package build
* move all sysvcompat tools to upstart-sysvcompat
* add to upstart-sysvinit need for sysvcompat services from example-jobs
* add inherit update-alternatives for right set and switch between inits
* move base directory from /usr to /. This need for update-alternatives work right, see sysvinit recipe
* add generation native tty services, similary as in sysvinit recipe
* add update alternatives in upstart-sysvcompat and upstart packages

---
 recipes/upstart/upstart.inc |  111 +++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 107 insertions(+), 4 deletions(-)
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}
+}
Signature · 1 line
1.6.0.6
#3 lore raw

PATCH v3 4/4 change upstart-0.3.11.bb to compatible with new upstart.inc

* bump PR
* add to SRC_URI example-jobs for upstart-sysvcompat and rc init scripts
* add USE_VT and SYSVINIT_ENABLED_GETTYS with default value, similary as in sysvinit recipe
* add checksum for example-jobs

---
 recipes/upstart/upstart_0.3.11.bb |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
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"
Signature · 1 line
1.6.0.6