Skip to contentSkip to conversation

umip: several fixes

PATCH New [email protected] 1 participant 4 messages Jun 2, 2017

lore
Share & tools
lore
#0 lore raw

cover umip: several fixes

From: Jackie Huang <[email protected]>

--
The following changes since commit b063789560bfb9c60a7a15277b5b3a9839b5ba74:

libgpiod: add new recipe (2017-05-23 15:59:31 +0200)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib.git jhuang0/r_up_umip_170602_0
http://git.pokylinux.org/cgit.cgi//log/?h=jhuang0/r_up_umip_170602_0

Jackie Huang (3):
umip: fix for parallel compilation
umip: add systemd and sysvinit support
umip: fix EXTRA_OECONF and add RRECOMMENDS

 ...ependency-to-support-parallel-compilation.patch |  23 +++++
 meta-oe/recipes-connectivity/umip/files/mip6d      | 112 +++++++++++++++++++++
 .../recipes-connectivity/umip/files/mip6d.service  |  10 ++
 meta-oe/recipes-connectivity/umip/umip_1.0.bb      |  27 ++++-
 4 files changed, 168 insertions(+), 4 deletions(-)
 create mode 100644 meta-oe/recipes-connectivity/umip/files/add-dependency-to-support-parallel-compilation.patch
 create mode 100755 meta-oe/recipes-connectivity/umip/files/mip6d
 create mode 100644 meta-oe/recipes-connectivity/umip/files/mip6d.service
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/3 umip: fix for parallel compilation

From: Jackie Huang <[email protected]>

Add missing dependency in Makefile to fix the parallel compile issue and re-enable PARALLEL_MAKE

---
 ...ependency-to-support-parallel-compilation.patch | 23 ++++++++++++++++++++++
 meta-oe/recipes-connectivity/umip/umip_1.0.bb      |  6 +++---
 2 files changed, 26 insertions(+), 3 deletions(-)
 create mode 100644 meta-oe/recipes-connectivity/umip/files/add-dependency-to-support-parallel-compilation.patch
meta-oe/recipes-connectivity/umip/files/add-dependency-to-support-parallel-compilation.patch new file +23 -0
new file mode 100644
index 000000000..dbf008264
@@ -0,0 +1,23 @@
+When "make -j10", the compilation will fail,
+because scan.c has included gram.h, but gram.h was produced
+after scan.c was compiled
+
+So add this dependency to ensure that gram.h is produced
+before scan.c is produced.
+
+Upstream-Status: Inappropriate [upstream is not active]
+
+Signed-off-by: Roy.Li <[email protected]>
+Signed-off-by: Jackie Huang <[email protected]>
+---
+ src/Makefile.am |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -81,3 +81,5 @@ CLEANFILES = gram.c gram.h \
+ 
+ DISTCLEANFILES = $(BUILT_SOURCES)
+ MAINTAINERCLEANFILES = Makefile.in
++
++scan.c: gram.h
meta-oe/recipes-connectivity/umip/umip_1.0.bb +3 -3
index e80c1b130..e97dd48f6 100644
@@ -9,12 +9,12 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=073dc31ccb2ebed70db54f1e8aeb4c33"
 DEPENDS = "rpm indent-native"
 
-SRC_URI = "git://git.umip.org/umip.git"
+SRC_URI = "git://git.umip.org/umip.git \
+    file://add-dependency-to-support-parallel-compilation.patch \
+"
 SRCREV = "428974c2d0d8e75a2750a3ab0488708c5dfdd8e3"
 
 S = "${WORKDIR}/git"
 EXTRA_OE_CONF = "--enable-vt"
 
 inherit autotools-brokensep
-
-PARALLEL_MAKE = ""
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/3 umip: add systemd and sysvinit support

In reply to [email protected]

From: Jackie Huang <[email protected]>

Add systemd service and and sysvinit script
so it's easy to manage the mip6d daemon.

---
 meta-oe/recipes-connectivity/umip/files/mip6d      | 112 +++++++++++++++++++++
 .../recipes-connectivity/umip/files/mip6d.service  |  10 ++
 meta-oe/recipes-connectivity/umip/umip_1.0.bb      |  18 +++-
 3 files changed, 139 insertions(+), 1 deletion(-)
 create mode 100755 meta-oe/recipes-connectivity/umip/files/mip6d
 create mode 100644 meta-oe/recipes-connectivity/umip/files/mip6d.service
meta-oe/recipes-connectivity/umip/files/mip6d new file +112 -0
new file mode 100755
index 000000000..ebd70a6cc
@@ -0,0 +1,112 @@
+#!/bin/sh
+#
+# mip6d		Start script for the Mobile IPv6 daemon
+#
+# chkconfig:	- 55 25
+# description:	The mobile IPv6 daemon allows nodes to remain \
+#		reachable while moving around in the IPv6 Internet.
+# processname:	mip6d
+# config:	/etc/mip6d.conf
+# config:	/etc/sysconfig/mip6d
+#
+### BEGIN INIT INFO
+# Provides: mipv6-daemon
+# Required-Start: $local_fs $remote_fs $network $named
+# Required-Stop: $local_fs $remote_fs $network
+# Should-Start: $syslog
+# Should-Stop: $network $syslog
+# Default-Start:
+# Default-Stop: 0 1 6
+# Short-Description: Start and stop Mobile IPV6 daemon
+# Description:	The mobile IPv6 daemon allows nodes to remain
+#		reachable while moving around in the IPv6 Internet.
+### END INIT INFO
+
+# Source function library.
+. /etc/init.d/functions
+
+if [ -f /etc/sysconfig/mip6d ]; then
+	. /etc/sysconfig/mip6d
+fi
+
+mip6d=/usr/sbin/mip6d
+prog="mip6d"
+lockfile=/var/lock/subsys/$prog
+
+start() {
+	[ -x $mip6d ] || exit 5
+	echo -n $"Starting $prog: "
+	start-stop-daemon -S -x ${mip6d} && success || failure
+	retval=$?
+	echo
+	[ $retval -eq 0 ] && touch ${lockfile}
+	return $retval
+}
+
+stop() {
+	echo -n $"Stopping $prog: "
+	start-stop-daemon -K -x $mip6d
+	retval=$?
+	echo
+	[ $retval -eq 0 ] && rm -f ${lockfile}
+	return $retval
+}
+
+restart() {
+	stop
+	start
+}
+
+reload()
+{
+	echo -n $"Reloading $prog configuration: "
+	killproc $mip6d -HUP
+	retval=$?
+	echo
+	return $retval
+}
+
+force_reload() {
+	restart
+}
+
+rh_status() {
+	status $prog
+}
+
+rh_status_q() {
+	rh_status > /dev/null 2>&1
+}
+
+case "$1" in
+  start)
+	rh_status_q && exit 0
+	$1
+	;;
+  stop)
+	rh_status_q || exit 0
+	$1
+	;;
+  restart)
+	$1
+	;;
+  reload)
+	rh_status_q || exit 7
+	$1
+	;;
+  force-reload)
+	force_reload
+	;;
+  status)
+	rh_status
+	;;
+  condrestart|try-restart)
+	rh_status_q || exit 0
+	restart
+	;;
+  *)
+	echo $"Usage: $prog {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+	exit 2
+esac
+
+exit $?
meta-oe/recipes-connectivity/umip/files/mip6d.service new file +10 -0
new file mode 100644
index 000000000..2b5a5b9f1
@@ -0,0 +1,10 @@
+[Unit]
+Description=MIPL Mobile IPv6
+After=network.target
+
+[Service]
+EnvironmentFile=-@SYSCONFDIR@/sysconfig/mip6d
+ExecStart=@SBINDIR@/mip6d $ARGS
+
+[Install]
+WantedBy=multi-user.target
meta-oe/recipes-connectivity/umip/umip_1.0.bb +17 -1
index e97dd48f6..b8b90eb81 100644
@@ -11,10 +11,26 @@ DEPENDS = "rpm indent-native"
 
 SRC_URI = "git://git.umip.org/umip.git \
     file://add-dependency-to-support-parallel-compilation.patch \
+    file://mip6d \
+    file://mip6d.service \
 "
 SRCREV = "428974c2d0d8e75a2750a3ab0488708c5dfdd8e3"
 
 S = "${WORKDIR}/git"
 EXTRA_OE_CONF = "--enable-vt"
 
-inherit autotools-brokensep
+inherit autotools-brokensep systemd update-rc.d
+
+INITSCRIPT_NAME = "mip6d"
+INITSCRIPT_PARAMS = "start 64 . stop 36 0 1 2 3 4 5 6 ."
+
+SYSTEMD_SERVICE_${PN} = "mip6d.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+do_install_append() {
+	install -D -m 0755 ${WORKDIR}/mip6d ${D}${sysconfdir}/init.d/mip6d
+	install -D -m 0644 ${WORKDIR}/mip6d.service ${D}${systemd_system_unitdir}/mip6d.service
+	sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+	    -e 's,@SBINDIR@,${sbindir},g' \
+	    ${D}${systemd_system_unitdir}/mip6d.service
+}
Signature · 1 line
2.11.0
#3 lore raw

PATCH 3/3 umip: fix EXTRA_OECONF and add RRECOMMENDS

In reply to [email protected]

From: Jackie Huang <[email protected]>

* fix EXTRA_OE_CONF -> EXTRA_OECONF
* add RRECOMMENDS on kernel modules

---
 meta-oe/recipes-connectivity/umip/umip_1.0.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-oe/recipes-connectivity/umip/umip_1.0.bb +4 -1
index b8b90eb81..a25056645 100644
@@ -17,7 +17,8 @@ SRC_URI = "git://git.umip.org/umip.git \
 SRCREV = "428974c2d0d8e75a2750a3ab0488708c5dfdd8e3"
 
 S = "${WORKDIR}/git"
-EXTRA_OE_CONF = "--enable-vt"
+
+EXTRA_OECONF = "--enable-vt"
 
 inherit autotools-brokensep systemd update-rc.d
 
@@ -34,3 +35,5 @@ do_install_append() {
 	    -e 's,@SBINDIR@,${sbindir},g' \
 	    ${D}${systemd_system_unitdir}/mip6d.service
 }
+
+RRECOMMENDS_${PN} = "kernel-module-mip6 kernel-module-ipv6"
Signature · 1 line
2.11.0