Skip to contentSkip to conversation

ippool: add new recipe

PATCH New Yi Zhao 1 participant 1 message Jun 7, 2017

lore
Share & tools
lore

Yi Zhao

author
#0 lore raw

PATCH 1/1 ippool: add new recipe

IpPool is a userspace daemon for managing one or more pools of IP addresses. It was developed as part of the OpenL2TP project but has since been repackaged so that it may be used independently of OpenL2TP.

---
 .../ippool/ippool/always_syslog.patch              |  22 +++++
 .../recipes-daemons/ippool/ippool/ippool.service   |  19 ++++
 .../ippool/ippool/ippool_init.d.patch              |  65 +++++++++++++
 .../ippool/ippool_parallel_make_and_pic.patch      |  89 +++++++++++++++++
 .../ippool/ippool/ippool_usl_timer.patch           |  49 ++++++++++
 .../ippool/ippool/makefile-add-ldflags.patch       |  21 +++++
 .../recipes-daemons/ippool/ippool/runtest.sh       |  26 +++++
 .../recipes-daemons/ippool/ippool_1.3.bb           | 105 +++++++++++++++++++++
 8 files changed, 396 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/ippool/ippool/always_syslog.patch
 create mode 100644 meta-networking/recipes-daemons/ippool/ippool/ippool.service
 create mode 100644 meta-networking/recipes-daemons/ippool/ippool/ippool_init.d.patch
 create mode 100644 meta-networking/recipes-daemons/ippool/ippool/ippool_parallel_make_and_pic.patch
 create mode 100644 meta-networking/recipes-daemons/ippool/ippool/ippool_usl_timer.patch
 create mode 100644 meta-networking/recipes-daemons/ippool/ippool/makefile-add-ldflags.patch
 create mode 100644 meta-networking/recipes-daemons/ippool/ippool/runtest.sh
 create mode 100644 meta-networking/recipes-daemons/ippool/ippool_1.3.bb
meta-networking/recipes-daemons/ippool/ippool/always_syslog.patch new file +22 -0
new file mode 100644
index 0000000..e475276
@@ -0,0 +1,22 @@
+ippool: always log to syslog
+
+Even when running in the foreground, send log messages to syslog.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Joe Slater <[email protected]>
+
+
+--- a/ippool_main.c
++++ b/ippool_main.c
+@@ -251,9 +251,8 @@ void ippool_vlog(int level, const char *
+ 	if (ippool_opt_nodaemon) {
+ 		vprintf(fmt, ap);
+ 		printf("\n");
+-	} else {
+-		vsyslog(level, fmt, ap);
+ 	}
++	vsyslog(level, fmt, ap);
+ 	DMALLOC_VMESSAGE(fmt, ap);
+ }
+ 
meta-networking/recipes-daemons/ippool/ippool/ippool.service new file +19 -0
new file mode 100644
index 0000000..e5917fc
@@ -0,0 +1,19 @@
+[Unit]
+Description=ip address pool allocator
+Requires=rpcbind.service
+After=rpcbind.service
+
+[Service]
+Type=simple
+# Start ippoold in the foreground!
+ExecStart=@SBINDIR@/ippoold -f
+# Normal output will go to syslog, so suppress stdout.
+StandardOutput=null
+StandardError=syslog
+# ExecStop is not needed. systemd will send SIGTERM
+# and ippoold will exit status 1.
+SuccessExitStatus=1
+
+[Install]
+WantedBy=multi-user.target
+
meta-networking/recipes-daemons/ippool/ippool/ippool_init.d.patch new file +65 -0

65 lines not on this page · raw message

meta-networking/recipes-daemons/ippool/ippool/ippool_parallel_make_and_pic.patch new file +89 -0

89 lines not on this page · raw message

meta-networking/recipes-daemons/ippool/ippool/ippool_usl_timer.patch new file +49 -0

49 lines not on this page · raw message

meta-networking/recipes-daemons/ippool/ippool/makefile-add-ldflags.patch new file +21 -0
new file mode 100644
index 0000000..7d5b715
@@ -0,0 +1,21 @@
+Add LDFLAGS variable to Makefile so that extra linker flags can be sent via this variable.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <[email protected]>
+
+diff --git a/Makefile b/Makefile
+index 4f7af1d..a05a000 100644
+--- a/Makefile
++++ b/Makefile
+@@ -83,8 +83,8 @@ endif
+ 
+ CPPFLAGS=		$(CPPFLAGS.ippooltest)
+ CFLAGS=			-I. -Iusl -Icli -MMD -Wall -g $(CPPFLAGS) $(CPPFLAGS.dmalloc)
+-LDFLAGS.ippoold=	-Wl,-E -L. -Lusl -lusl -lnsl -ldl $(LIBS.dmalloc) -lc
+-LDFLAGS.ippoolconfig=	-Lcli -lcli -lreadline -lcurses -lnsl $(LIBS.dmalloc) -lc
++LDFLAGS.ippoold=	$(LDFLAGS) -Wl,-E -L. -Lusl -lusl -lnsl -ldl $(LIBS.dmalloc) -lc
++LDFLAGS.ippoolconfig=	$(LDFLAGS) -Lcli -lcli -lreadline -lcurses -lnsl $(LIBS.dmalloc) -lc
+ 
+ OPT_CFLAGS?=		-O
+ 
meta-networking/recipes-daemons/ippool/ippool/runtest.sh new file +26 -0
new file mode 100644
index 0000000..f91f582
@@ -0,0 +1,26 @@
+#!/bin/sh
+BANNER="----------------------------------------------------------------------------"
+TCLSH="tclsh all.tcl -preservecore 3 -verbose bps -tmpdir ./results -outfile test-ippool.result"
+
+test_setup() {
+        if [ -d ./results ]; then rm -fr ./results; fi
+        mkdir ./results
+}
+
+test_ippool() {
+        echo "${BANNER}"
+        eval $TCLSH -constraints "ipPool"
+}
+test_postprocess() {
+        echo "${BANNER}"
+        (failed=`grep FAILED results/*.result | wc -l`; \
+        let failed2=failed/2 ;\
+        passed=`grep PASSED results/*.result | wc -l`; \
+        echo "TEST SUMMARY: $passed tests PASSED, $failed2 tests FAILED" ;\
+        exit $failed2)
+}
+
+test_setup
+test_ippool
+test_postprocess
+
meta-networking/recipes-daemons/ippool/ippool_1.3.bb new file +105 -0

105 lines not on this page · raw message

Signature · 1 line
2.7.4