Skip to contentSkip to conversation

package/softether: New package

PATCH New Bernd Kuhls 2 participants 4 messages Oct 4, 2014 – Mar 8, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/softether: New package

Package description was copied from
https://launchpad.net/~dajhorn/+archive/ubuntu/softether/

---
v2: SOFTETHER_CONF_OPT -> SOFTETHER_CONF_OPTS

 package/Config.in                                  |    1 +
 package/softether/Config.in                        |   28 +
 package/softether/softether-0001-debian.patch      | 2381 ++++++++++++++++++++
 .../softether/softether-0002-cross-compile.patch   |   30 +
 package/softether/softether-0003-iconv.patch       |   27 +
 package/softether/softether.mk                     |   36 +
 6 files changed, 2503 insertions(+)
 create mode 100644 package/softether/Config.in
 create mode 100644 package/softether/softether-0001-debian.patch
 create mode 100644 package/softether/softether-0002-cross-compile.patch
 create mode 100644 package/softether/softether-0003-iconv.patch
 create mode 100644 package/softether/softether.mk
package/Config.in +1 -0
index ea94a2e..1629d5a 100644
@@ -1073,6 +1073,7 @@ endif
 	source "package/smcroute/Config.in"
 	source "package/socat/Config.in"
 	source "package/socketcand/Config.in"
+	source "package/softether/Config.in"
 	source "package/spawn-fcgi/Config.in"
 	source "package/spice/Config.in"
 	source "package/spice-protocol/Config.in"
package/softether/Config.in new file +28 -0
new file mode 100644
index 0000000..15d5834
@@ -0,0 +1,28 @@
+config BR2_PACKAGE_SOFTETHER
+	bool "softether"
+	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_READLINE
+	depends on BR2_LARGEFILE
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_MMU # fork()
+	depends on BR2_USE_WCHAR
+	help
+	  The SoftEther Server is a fully integrated implementation of the SSTP,
+	  L2TP, L2TPv3, OpenVPN, and IPSec virtual private networking protocols
+	  on Linux and several other platforms. It is generally compatible with
+	  other implementations by Apple, Cisco, Juniper, Microsoft, et al.
+
+	  Convenient Layer-2 and Layer-3 bridging capabilities can connect
+	  several branch offices into a single broadcast or routing domain, even
+	  behind a NAT or without a static IPv4 address.
+
+	  In addition to supporting most VPN protocols, the SoftEther Client can
+	  penetrate hardened firewalls and captured gateways through HTTPS, DNS,
+	  and ICMP exfiltration.
+
+	  http://www.softether.org
+
+comment "softether needs a toolchain w/ largefile, wchar, threads"
+	depends on BR2_USE_MMU
+	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS)
package/softether/softether-0001-debian.patch new file +2381 -0

2,381 lines not on this page · raw message

package/softether/softether-0002-cross-compile.patch new file +30 -0
new file mode 100644
index 0000000..0b31eca
@@ -0,0 +1,30 @@
+Host version of hamcorebuilder is needed during cross-compile
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+diff -uNr SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824.org/src/bin/hamcore/Makefile.am SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824/src/bin/hamcore/Makefile.am
+--- SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824.org/src/bin/hamcore/Makefile.am	2014-09-27 12:56:53.108725793 +0200
++++ SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824/src/bin/hamcore/Makefile.am	2014-09-27 12:57:50.280009025 +0200
+@@ -26,8 +26,8 @@
+ 
+ noinst_PROGRAMS = hamcore.se2
+ 
+-hamcore.se2$(EXEEXT): $(HAMCOREBUILDER)
+-	$(HAMCOREBUILDER) $(top_srcdir)/src/bin/hamcore $@
++hamcore.se2$(EXEEXT):
++	hamcorebuilder $(top_srcdir)/src/bin/hamcore $@
+ 
+ install-exec-local: hamcore.se2$(EXEEXT)
+ 	$(INSTALL_DATA) -D hamcore.se2$(EXEEXT) $(DESTDIR)$(localstatedir)/lib/softether/hamcore.se2
+diff -uNr SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824.org/src/Makefile.am SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824/src/Makefile.am
+--- SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824.org/src/Makefile.am	2014-09-27 12:56:53.136726809 +0200
++++ SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824/src/Makefile.am	2014-09-27 12:58:12.959723109 +0200
+@@ -20,7 +20,7 @@
+ SUBDIRS = Mayaqua Cedar
+ 
+ # This is a nodist helper.
+-SUBDIRS += hamcorebuilder
++# SUBDIRS += hamcorebuilder
+ 
+ # These are shared components.
+ SUBDIRS += libsoftether bin/hamcore
package/softether/softether-0003-iconv.patch new file +27 -0
new file mode 100644
index 0000000..5d45115
@@ -0,0 +1,27 @@
+Fix linking with libiconv
+
+Inspired by https://github.com/el1n/OpenWRT-package-softether/blob/4cb1cd9073a76edf34c512e587069626e02e2404/patches/120-fix-iconv-headers-common.patch
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+--- a/src/Mayaqua/Mayaqua.h	2014-07-11 20:00:27.000000000 +0200
++++ b/src/Mayaqua/Mayaqua.h	2014-09-27 15:30:09.633111125 +0200
+@@ -282,17 +282,7 @@
+ #include <ifaddrs.h>
+ #endif	// MAYAQUA_SUPPORTS_GETIFADDRS
+ 
+-#ifdef	UNIX_LINUX
+-typedef void *iconv_t;
+-iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);
+-size_t iconv (iconv_t __cd, char **__restrict __inbuf,
+-                     size_t *__restrict __inbytesleft,
+-                     char **__restrict __outbuf,
+-                     size_t *__restrict __outbytesleft);
+-int iconv_close (iconv_t __cd);
+-#else	// UNIX_LINUX
+-#include <iconv.h>
+-#endif	// UNIX_LINUX
++#include <iconv.h>
+ 
+ 
+ 
package/softether/softether.mk new file +36 -0
new file mode 100644
index 0000000..0f74ab4
@@ -0,0 +1,36 @@
+################################################################################
+#
+# softether
+#
+################################################################################
+
+SOFTETHER_VERSION = 16b713b98da8dba29f0f845d5a8c36d6f7c34824
+SOFTETHER_SITE = $(call github,SoftEtherVPN,SoftEtherVPN,$(SOFTETHER_VERSION))
+SOFTETHER_LICENSE = GPLv2
+SOFTETHER_LICENSE_FILES = LICENSE
+SOFTETHER_DEPENDENCIES = host-softether openssl readline
+SOFTETHER_AUTORECONF = YES
+ifeq ($(BR2_ENABLE_LOCALE),)
+SOFTETHER_DEPENDENCIES += libiconv
+SOFTETHER_CONF_ENV = LIBS="-liconv"
+endif
+SOFTETHER_CONF_OPTS = --with-openssl="$(STAGING_DIR)/usr" \
+	--with-zlib="$(STAGING_DIR)/usr"
+
+# host-libiconv does not exist, therefore we need this extra line
+HOST_SOFTETHER_DEPENDENCIES = host-pkgconf host-openssl host-readline
+
+# target build creates the file hamcore.se2 which needs the host variant of
+# hamcorebuilder, for details see http://www.vpnusers.com/viewtopic.php?p=5426
+define HOST_SOFTETHER_BUILD_CMDS
+	$(MAKE) -C $(@D)/src/Mayaqua
+	$(MAKE) -C $(@D)/src/Cedar
+	$(MAKE) -C $(@D)/src/hamcorebuilder
+endef
+
+define HOST_SOFTETHER_INSTALL_CMDS
+	$(INSTALL) -m 0755 $(@D)/src/hamcorebuilder/hamcorebuilder $(HOST_DIR)/usr/bin
+endef
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 1/1 package/softether: New package

Bernd Kuhls <[email protected]> wrote in news:1412459098-13939-1-git-send-email-bernd.kuhls at t-online.de:

Quoted 3 lines
 package/Config.in                                  |    1 +
 package/softether/Config.in                        |   28 +
 package/softether/softether-0001-debian.patch      | 2381 

++++++++++++++++++++

Quoted 3 lines
 .../softether/softether-0002-cross-compile.patch   |   30 +
 package/softether/softether-0003-iconv.patch       |   27 +
 package/softether/softether.mk                     |   36 +

Hi,

please read this note before applying the patches:
http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/94715

Regards, Bernd

#2 lore raw

PATCH v2 1/1 package/softether: New package

In reply to Bernd Kuhls

Dear Bernd Kuhls,

Quoted 4 lines · Bernd Kuhls

Package description was copied from
https://launchpad.net/~dajhorn/+archive/ubuntu/softether/

Applied, thanks. I've done some changes, the main one being that I'm pulling two patches from Github, which reduces the size of the patches to carry in package/softether.

See
http://git.buildroot.net/buildroot/commit/?id=6aa6a84de0c08da282c443c7688409ce3c1a0edf
for the result.

One question that comes to mind is licensing related: softether is GPLv2, but links against OpenSSL. I thought the GPLv2 and the OpenSSL license were incompatible. Did I miss something?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v2 1/1 package/softether: New package

Bernd,

Quoted 3 lines · Thomas Petazzoni

Applied, thanks. I've done some changes, the main one being that I'm pulling two patches from Github, which reduces the size of the patches to carry in package/softether.

There's one autobuilder failure on host-softether, see
http://autobuild.buildroot.org/results/1ea/1ea2635936c046729a70d7779eeb74490b4d0084/build-end.log.
Apparently, it forgets to pass -lrt, even though it's using clock_gettime().

Can you have a look?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com