Commit 2b36d80c authored by Yann E. MORIN's avatar Yann E. MORIN Committed by Peter Korsgaard
Browse files

package/vtun: update to 3.0.3



Against all odds, vtun had a new release sometime last year.

Still, the code needs patching:
  - the existing patch to fix installation has been refreshed
  - the existing patch to fix blowfish header location has been
    replaced (see below)
  - configure looks in hard-coded, host paths (eg. /usr/include)
    without any consideration for scross-compilation
    --> new patch
  - configure.in does not even pass an autoreconf without a
    bit of love first (it's written in an ancient dialect that
    autoreconf does no longer recognise)
    --> new patch

Remove obsolete, unused, bit-rotting scripts and warning.

Signed-off-by: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 54b2bad1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
config BR2_PACKAGE_VTUN
	bool "vtun - BEWARE: read package/vtun/README.txt before use"
	bool "vtun"
	select BR2_PACKAGE_LZO
	select BR2_PACKAGE_OPENSSL
	select BR2_PACKAGE_ZLIB

package/vtun/README.txt

deleted100644 → 0
+0 −37
Original line number Diff line number Diff line
Previous vtun was version 2.6.
This does not buld because its "configure" requires
that -llzo contains "lzolx_decompress".
"vtun" does not build, evenm if liblzo is available.

The LZO package currently used by buildroot
does not contain ANY reference to "lzolx_decompress"

"vtun" has been upgraded to 3.0.2 and now builds OK,
but is yet to be tested on a target.
The previous patch containing three diffs,
has been broken up into three files.

The second patch fails.

This patch tries to replace a perl script
($(VTUN_DIR)/scripts/vtund.rc.debian)
with a shell script with the same name.

In vtun-3.0.2, vtund.rc.debian is a shell script which is
fairly similar to the shell script provided by the patch.
For now, it has been decided not to replace this shell 
script with the script generated by the patch for 2.6

vtun will thus be built with the 3.0.2 vtund.rc.debian.
The start-stop-daemon parameters and other things
in this script may be inappropriate for something based on busybox.

I will leave the decision which script to use,
the 2-6 script or the 3.0.2 script to someone else.

Both files are kept in the directory, but should
be removed once it has been decided what to do
about this script.

Signed-Off by: Ulf Samuelsson <ulf.samuelsson@atmel.com>
+16 −5
Original line number Diff line number Diff line
diff -urN vtun/Makefile.in vtun-2.6/Makefile.in
--- vtun/Makefile.in	2002-12-20 09:55:47.000000000 -0700
+++ vtun-2.6/Makefile.in	2003-06-05 12:38:31.000000000 -0600
Makefile.in: fix installation steps

Not sure what the reason for that patch is, but originally added by Ulf
Samuelsson <ulf.samuelsson@atmel.com>, when upgrading from 2.6.x to 3.0.2.

yann.morin.1998@free.fr: the initial commit in the Buildroot tree had the
SoB by Ulf, but it was not explicitly reproduced here in the patch; so I
added it here directly in the patch.

Somewhat-signed-off-by: Ulf Samuelsson <ulf.samuelsson@atmel.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
diff -durN vtun-3.0.3.orig/Makefile.in vtun-3.0.3/Makefile.in
--- vtun-3.0.3.orig/Makefile.in	2012-07-09 06:55:38.000000000 +0200
+++ vtun-3.0.3/Makefile.in	2013-02-16 23:28:47.034036869 +0100
@@ -28,7 +28,7 @@
 LEXFLAGS = -t 
 
@@ -10,7 +21,7 @@ diff -urN vtun/Makefile.in vtun-2.6/Makefile.in
 
 prefix = @prefix@
 exec_prefix = @exec_prefix@
@@ -86,15 +86,15 @@
@@ -89,16 +89,15 @@
 
 install_config: 
 	$(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(ETC_DIR)
@@ -26,8 +37,8 @@ diff -urN vtun/Makefile.in vtun-2.6/Makefile.in
 	$(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(LOCK_DIR)
 	$(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(SBIN_DIR)
 	$(INSTALL) -m 755 $(INSTALL_OWNER) vtund $(DESTDIR)$(SBIN_DIR)
-	$(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund
+	$(INSTALL) -m 755 -D $(INSTALL_OWNER) scripts/vtund.rc.debian \
+		$(DESTDIR)$(ETC_DIR)/init.d/S90vtun
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.
+47 −0
Original line number Diff line number Diff line
configure.in: do not hard-code search patch for SSL headers

Do. Not. Do. That. It breaks cross-compilation.

Also use the SSL headers dir to look for blowfish headers.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

diff -durN vtun-3.0.3.orig/configure.in vtun-3.0.3/configure.in
--- vtun-3.0.3.orig/configure.in	2009-03-29 12:08:51.000000000 +0200
+++ vtun-3.0.3/configure.in	2013-02-16 23:44:44.004339680 +0100
@@ -166,7 +166,7 @@
    AC_MSG_RESULT()
    AC_CHECKING( for md5 Library and Header files ... )
 AC_SEARCH_HEADERS(md5.h,
-    $SSL_HDR_DIR /usr/include/openssl "" /usr/include /usr/include/ssl /usr/local/include /usr/local/ssl/include /usr/include/sys, 
+    $SSL_HDR_DIR "" , 
     ,
     AC_MSG_ERROR( SSL headers not found. )
    )
@@ -176,7 +176,7 @@
    AC_MSG_RESULT()
    AC_CHECKING( for blowfish Library and Header files ... )
    AC_SEARCH_HEADERS(blowfish.h,
-    $BLOWFISH_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include  /usr/include/crypto,
+    $BLOWFISH_HDR_DIR $SSL_HDR_DIR,
 	AC_CHECK_LIB(crypto, BF_set_key,
 	    [
 	       LIBS="$LIBS -lcrypto"
@@ -193,7 +193,7 @@
    AC_MSG_RESULT()
    AC_CHECKING( for AES Library and Header files ... )
    AC_SEARCH_HEADERS(aes.h,
-    $SSL_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include  /usr/include/crypto,
+    $SSL_HDR_DIR ,
 	AC_CHECK_LIB(crypto, AES_set_encrypt_key,
 	    [
 	       AC_DEFINE(HAVE_SSL_AES)
@@ -208,7 +208,7 @@
    AC_MSG_RESULT()
    AC_CHECKING( for EVP Library and Header files ... )
    AC_SEARCH_HEADERS(evp.h,
-    $SSL_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include  /usr/include/crypto,
+    $SSL_HDR_DIR ,
 	AC_CHECK_LIB(crypto, EVP_EncryptInit,
 	    [
 	       AC_DEFINE(HAVE_SSL_EVP)
+92 −0
Original line number Diff line number Diff line
configure.in: minimal syntax fixup for autoreconf

This is the strictly minimal syntax fixups to make autoreconf happy...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

---
Note: configure.in is still full of incorrect syntax, but fixing it is
a task for another day, and would have to be upstreamed. But upstream
looks to be moribund at best, if not dead... :-(

So, keep it for ourselves for now... Too bad, vtun is really helpfull.

--- vtun-3.0.3.orig/configure.in	2013-02-16 23:54:52.582451817 +0100
+++ vtun-3.0.3/configure.in	2013-02-17 00:03:13.640887353 +0100
@@ -110,10 +110,10 @@
 AC_SEARCH_LIBS(nanosleep, rt posix4)
 
 dnl Check for setproctitle in libutil
-AC_SEARCH_LIBS(setproctitle, util bsd, AC_DEFINE(HAVE_SETPROC_TITLE) )
+AC_SEARCH_LIBS(setproctitle, util bsd, AC_DEFINE([HAVE_SETPROC_TITLE],[],[Define to set title in /proc]) )
 
 if test "$SHAPER" = "yes"; then
-   AC_DEFINE(HAVE_SHAPER)
+   AC_DEFINE([HAVE_SHAPER],[],[Define to use shapper])
 fi
 
 if test "$ZLIB" = "yes"; then
@@ -121,7 +121,7 @@
    AC_CHECKING( for ZLIB Library and Header files ... )
    AC_CHECK_LIB(z, deflate,
 	LIBS="$LIBS -lz"
-	AC_DEFINE(HAVE_ZLIB),
+	AC_DEFINE([HAVE_ZLIB],[],[Define to use ZLIB]),
 	AC_MSG_ERROR( Zlib library not found.)
    )
 fi
@@ -148,7 +148,7 @@
 	    AC_CHECK_LIB($I, lzo1x_decompress,
 	    [
 	          LIBS="$LIBS -l"$I
-	       AC_DEFINE(HAVE_LZO)
+	       AC_DEFINE([HAVE_LZO],[],[Define to use LZO])
 	          havelzo=1
 	      ]
 	    )
@@ -180,8 +180,8 @@
 	AC_CHECK_LIB(crypto, BF_set_key,
 	    [
 	       LIBS="$LIBS -lcrypto"
-	       AC_DEFINE(HAVE_SSL)
-	       AC_DEFINE(HAVE_SSL_BLOWFISH)
+	       AC_DEFINE([HAVE_SSL],[],[Define to use SSL])
+	       AC_DEFINE([HAVE_SSL_BLOWFISH],[],[Define to use blowfish])
 	    ],
 	    AC_MSG_ERROR( SSL library not found. )
 	),
@@ -196,7 +196,7 @@
     $SSL_HDR_DIR ,
 	AC_CHECK_LIB(crypto, AES_set_encrypt_key,
 	    [
-	       AC_DEFINE(HAVE_SSL_AES)
+	       AC_DEFINE([HAVE_SSL_AES],[],[Define to use AES])
 	    ],
 	    AC_MSG_ERROR( AES library not found. )
 	),
@@ -211,7 +211,7 @@
     $SSL_HDR_DIR ,
 	AC_CHECK_LIB(crypto, EVP_EncryptInit,
 	    [
-	       AC_DEFINE(HAVE_SSL_EVP)
+	       AC_DEFINE([HAVE_SSL_EVP],[],Define to use EVP)
 	    ],
 	    AC_MSG_ERROR( EVP library not found. )
 	),
@@ -220,7 +220,7 @@
 fi
 
 if test "$NATHACK" = "yes"; then
-   AC_DEFINE(ENABLE_NAT_HACK)
+   AC_DEFINE([ENABLE_NAT_HACK],[],[Define to use NAT hack])
 fi
 
 if test "$SOCKS" = "yes"; then
@@ -274,6 +274,6 @@
 REL=`echo 'BRANCH-3_X' | tr -d '$: \-' | sed 's/^[A-Za-z]*//' | sed 's/\_/\./'`
 changequote([,])
 
-AC_DEFINE_UNQUOTED(VTUN_VER, "$REL `date '+%m/%d/%Y'`")
+AC_DEFINE_UNQUOTED([VTUN_VER], ["$REL `date '+%m/%d/%Y'`"], [vtun version])
 
 AC_OUTPUT(Makefile)
Loading