All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-networking][PATCH 0/2] openl2tp: several fixes
@ 2017-07-28  7:20 jackie.huang
  2017-07-28  7:20 ` [meta-networking][PATCH 1/2] openl2tp: add LGPL-2.1 license jackie.huang
  2017-07-28  7:20 ` [meta-networking][PATCH 2/2] openl2tp: add init script and systemd support jackie.huang
  0 siblings, 2 replies; 3+ messages in thread
From: jackie.huang @ 2017-07-28  7:20 UTC (permalink / raw)
  To: openembedded-devel

From: Jackie Huang <jackie.huang@windriver.com>

---
The following changes since commit a8b54e300be027fefe8a774ca1861d0fb8e80d99:

  pidgin-otr: unblacklist (2017-07-24 18:58:55 +0200)

are available in the git repository at:

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

Jackie Huang (2):
  openl2tp: add LGPL-2.1 license
  openl2tp: add init script and systemd support

 .../openl2tpd-initscript-fix-sysconfig.patch       | 35 ++++++++++++++++
 .../openl2tpd-initscript-fix-warning.patch         | 32 ++++++++++++++
 .../openl2tp/openl2tpd-initscript-fix.patch        | 49 ++++++++++++++++++++++
 .../openl2tp/openl2tp/openl2tpd.service            | 17 ++++++++
 .../recipes-protocols/openl2tp/openl2tp_1.8.bb     | 40 ++++++++++++++++--
 5 files changed, 170 insertions(+), 3 deletions(-)
 create mode 100644 meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch
 create mode 100644 meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-warning.patch
 create mode 100644 meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch
 create mode 100644 meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd.service

-- 
2.11.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [meta-networking][PATCH 1/2] openl2tp: add LGPL-2.1 license
  2017-07-28  7:20 [meta-networking][PATCH 0/2] openl2tp: several fixes jackie.huang
@ 2017-07-28  7:20 ` jackie.huang
  2017-07-28  7:20 ` [meta-networking][PATCH 2/2] openl2tp: add init script and systemd support jackie.huang
  1 sibling, 0 replies; 3+ messages in thread
From: jackie.huang @ 2017-07-28  7:20 UTC (permalink / raw)
  To: openembedded-devel

From: Jackie Huang <jackie.huang@windriver.com>

cli and usl use license LGPL-2.1.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
index e1670b3ae..9be1c7956 100644
--- a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
+++ b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
@@ -7,8 +7,15 @@ different configuration. It is used by several ISPs to provide \
 L2TP services and by corporations to implement L2TP VPNs."
 HOMEPAGE = "http://www.openl2tp.org/"
 SECTION = "net"
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e9d9259cbbf00945adc25a470c1d3585"
+
+# cli and usl use license LGPL-2.1
+LICENSE = "GPL-2.0 & LGPL-2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9d9259cbbf00945adc25a470c1d3585 \
+                    file://LICENSE;md5=f8970abd5ea9be701a0deedf5afd77a5 \
+                    file://cli/LICENSE;md5=9c1387a3c5213aa40671438af3e00793 \
+                    file://usl/LICENSE;md5=9c1387a3c5213aa40671438af3e00793 \
+                    "
+
 DEPENDS = "popt flex readline"
 
 SRC_URI = "ftp://ftp.openl2tp.org/releases/${BP}/${BP}.tar.gz \
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [meta-networking][PATCH 2/2] openl2tp: add init script and systemd support
  2017-07-28  7:20 [meta-networking][PATCH 0/2] openl2tp: several fixes jackie.huang
  2017-07-28  7:20 ` [meta-networking][PATCH 1/2] openl2tp: add LGPL-2.1 license jackie.huang
@ 2017-07-28  7:20 ` jackie.huang
  1 sibling, 0 replies; 3+ messages in thread
From: jackie.huang @ 2017-07-28  7:20 UTC (permalink / raw)
  To: openembedded-devel

From: Jackie Huang <jackie.huang@windriver.com>

- Add patches to fix init script issues
- Add openl2tpd.service to add systemd support
- Add runtime dependency on ppp and ppp-l2tp

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 .../openl2tpd-initscript-fix-sysconfig.patch       | 35 ++++++++++++++++
 .../openl2tpd-initscript-fix-warning.patch         | 32 ++++++++++++++
 .../openl2tp/openl2tpd-initscript-fix.patch        | 49 ++++++++++++++++++++++
 .../openl2tp/openl2tp/openl2tpd.service            | 17 ++++++++
 .../recipes-protocols/openl2tp/openl2tp_1.8.bb     | 29 ++++++++++++-
 5 files changed, 161 insertions(+), 1 deletion(-)
 create mode 100644 meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch
 create mode 100644 meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-warning.patch
 create mode 100644 meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch
 create mode 100644 meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd.service

diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch
new file mode 100644
index 000000000..3119425e6
--- /dev/null
+++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch
@@ -0,0 +1,35 @@
+commit 6ea3125e2bec15004f312814022335d94cdf7e94
+Author: Aws Ismail <aws.ismail@windriver.com>
+Date:   Wed Sep 19 11:34:48 2012 -0400
+
+    Fix openl2tp config script location
+    
+    Correct the location of the sysconfig
+    script. Use /etc/default/ instead of
+    /etc/sysconfig/
+    
+    Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+
+    Upstream-Status: Inappropriate [configuration]
+
+    Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+diff --git a/etc/rc.d/init.d/openl2tpd b/etc/rc.d/init.d/openl2tpd
+index 7f27bb7..4194f63 100755
+--- a/etc/rc.d/init.d/openl2tpd
++++ b/etc/rc.d/init.d/openl2tpd
+@@ -8,12 +8,12 @@
+ #              can be used to implement L2TP VPNs. As a server, it can handle
+ #              hundreds of tunnels and sessions.
+ # processname: openl2tpd
+-# config: /etc/sysconfig/openl2tpd
++# config: /etc/default/openl2tpd
+ # pidfile: /var/run/openl2tpd.pid
+ 
+ # Source function library.
+ . /etc/init.d/functions
+-. /etc/sysconfig/openl2tpd
++. /etc/default/openl2tpd
+  
+ # See how we were called.
+   
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-warning.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-warning.patch
new file mode 100644
index 000000000..15a8c5b08
--- /dev/null
+++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-warning.patch
@@ -0,0 +1,32 @@
+openl2tp: eliminate warning from modprobe
+
+modprobe will emit alarming warnings if it cannot
+find a module, but we only care that it find one
+of two possible modules when we start openl2tpd.
+
+Suppress messages from modprobe.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <jslater@windriver.com>
+
+--- a/etc/rc.d/init.d/openl2tpd
++++ b/etc/rc.d/init.d/openl2tpd
+@@ -29,7 +29,7 @@ start() {
+ 		return 1
+ 	    fi
+ 	fi
+-	modprobe -s pppol2tp || modprobe -s l2tp_ppp
++	modprobe -sq pppol2tp || modprobe -sq l2tp_ppp
+ 	RETVAL=$?
+ 	if [ $RETVAL -eq 0 ]; then
+ 	    start-stop-daemon --start --exec openl2tpd $OPENL2TPDARGS
+@@ -57,7 +57,7 @@ stop() {
+ 	    return 1;
+ 	fi
+ 	killproc openl2tpd
+-	modprobe -s -r pppol2tp || modprobe -s -r l2tp_ppp
++	modprobe -srq pppol2tp || modprobe -srq l2tp_ppp
+ 	echo
+ 	rm -f /var/run/openl2tpd.pid
+         rm -f /var/lock/subsys/openl2tpd
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch
new file mode 100644
index 000000000..9ecd4b072
--- /dev/null
+++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch
@@ -0,0 +1,49 @@
+commit 7c58a1e244ea83a9e7bbd51a6d354cee25cdbd33
+Author: Aws Ismail <aws.ismail@windriver.com>
+Date:   Wed Sep 12 23:35:40 2012 -0400
+
+    Fix openl2tpd initscript
+    
+    - Correct the location of the retval statement.
+    - use start-stop-daemon instead of daemon.
+    
+    Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+
+    Upstream-Status: Inappropriate [OE specific]
+
+    Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+diff --git a/etc/rc.d/init.d/openl2tpd b/etc/rc.d/init.d/openl2tpd
+index ce21b50..7f27bb7 100755
+--- a/etc/rc.d/init.d/openl2tpd
++++ b/etc/rc.d/init.d/openl2tpd
+@@ -24,7 +24,7 @@ start() {
+         if [ -e /var/lock/subsys/openl2tpd ]; then
+ 	    if [ -e /var/run/openl2tpd.pid ] && [ -e /proc/`cat /var/run/openl2tpd.pid` ]; then
+ 		echo -n $"cannot start openl2tpd: openl2tpd is already running.";
+-		failure $"cannot start openl2tpd: openl2tpd already running.";
++		#failure $"cannot start openl2tpd: openl2tpd already running.";
+ 		echo
+ 		return 1
+ 	    fi
+@@ -32,9 +32,9 @@ start() {
+ 	modprobe -s pppol2tp || modprobe -s l2tp_ppp
+ 	RETVAL=$?
+ 	if [ $RETVAL -eq 0 ]; then
+-	    daemon openl2tpd $OPENL2TPDARGS
++	    start-stop-daemon --start --exec openl2tpd $OPENL2TPDARGS
++        RETVAL=$?
+ 	fi
+-	RETVAL=$?
+ 	echo
+ 	if [ $RETVAL -eq 0 ]; then
+ 	    touch /var/lock/subsys/openl2tpd
+@@ -52,7 +52,7 @@ stop() {
+ 	echo -n $"Stopping $prog: "
+         if [ ! -e /var/lock/subsys/openl2tpd ]; then
+ 	    echo -n $"cannot stop openl2tpd: openl2tpd is not running."
+-	    failure $"cannot stop openl2tpd: openl2tpd is not running."
++	    #failure $"cannot stop openl2tpd: openl2tpd is not running."
+ 	    echo
+ 	    return 1;
+ 	fi
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd.service b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd.service
new file mode 100644
index 000000000..7b3faf672
--- /dev/null
+++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=The open L2TP implementation
+After=network.target remote-fs.target nss-lookup.target rpcbind.target
+Requires=rpcbind.service
+
+[Service]
+Type=forking
+PIDFile=@STATEDIR@/run/openl2tpd.pid
+EnvironmentFile=@SYSCONFDIR@/default/openl2tpd
+ExecStartPre=@BASE_BINDIR@/sh -c "@BASE_SBINDIR@/modprobe -sq l2tp_ppp || @BASE_SBINDIR@/modprobe -sq pppol2tp"
+ExecStart=@SBINDIR@/openl2tpd $OPENL2TPDARGS
+ExecStartPost=@BASE_BINDIR@/sh -c 'if [ -n "$OPENL2TPD_CONFIG_FILE" ]; then sleep 1; @BINDIR@/l2tpconfig config restore file=$OPENL2TPD_CONFIG_FILE; fi'
+ExecStopPost=@BASE_BINDIR@/sh -c "@BASE_SBINDIR@/modprobe -rsq l2tp_ppp || @BASE_SBINDIR@/modprobe -rsq pppol2tp"
+SuccessExitStatus=1
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
index 9be1c7956..1e5bfe264 100644
--- a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
+++ b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
@@ -27,6 +27,10 @@ SRC_URI = "ftp://ftp.openl2tp.org/releases/${BP}/${BP}.tar.gz \
            file://0002-cli-include-fcntl.h-for-O_CREAT-define.patch \
            file://0003-cli-Define-_GNU_SOURCE-for-getting-sighandler_t.patch \
            file://0001-l2tp_api-Included-needed-headers.patch \
+           file://openl2tpd-initscript-fix.patch \
+           file://openl2tpd-initscript-fix-sysconfig.patch \
+           file://openl2tpd-initscript-fix-warning.patch \
+           file://openl2tpd.service \
            "
 
 SRC_URI_append_libc-musl = "\
@@ -36,7 +40,10 @@ SRC_URI_append_libc-musl = "\
 SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0"
 SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f"
 
-inherit autotools-brokensep pkgconfig
+inherit autotools-brokensep pkgconfig systemd
+
+SYSTEMD_SERVICE_${PN} = "openl2tpd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
 
 DEPENDS_append_libc-musl = " libtirpc"
 CPPFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
@@ -58,3 +65,23 @@ do_compile_prepend() {
         -e 's:CPPFLAGS-y:CPPFLAGS:g' \
         ${S}/Makefile
 }
+
+do_install_append () {
+    install -d ${D}${sysconfdir}/init.d
+    install -d ${D}${sysconfdir}/default
+    install -m 0755 ${S}/etc/rc.d/init.d/openl2tpd ${D}${sysconfdir}/init.d/openl2tpd
+    install -m 0755 ${S}/etc/sysconfig/openl2tpd ${D}${sysconfdir}/default/openl2tpd
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -D -m 0644 ${WORKDIR}/openl2tpd.service ${D}${systemd_system_unitdir}/openl2tpd.service
+        sed -i -e 's,@STATEDIR@,${localstatedir},g' \
+               -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+               -e 's,@SBINDIR@,${sbindir},g' \
+               -e 's,@BINDIR@,${bindir},g' \
+               -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
+               -e 's,@BASE_BINDIR@,${base_bindir},g' \
+               ${D}${systemd_system_unitdir}/openl2tpd.service
+    fi
+}
+
+RDEPENDS_${PN} = "ppp ppp-l2tp"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-28  7:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-28  7:20 [meta-networking][PATCH 0/2] openl2tp: several fixes jackie.huang
2017-07-28  7:20 ` [meta-networking][PATCH 1/2] openl2tp: add LGPL-2.1 license jackie.huang
2017-07-28  7:20 ` [meta-networking][PATCH 2/2] openl2tp: add init script and systemd support jackie.huang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.