summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Samuelsson <ulf.samuelsson@atmel.com>2009-01-10 00:18:04 +0000
committerUlf Samuelsson <ulf.samuelsson@atmel.com>2009-01-10 00:18:04 +0000
commit89e439ed411c018e69eac10ef682210fc4310463 (patch)
tree1b7fa8478b058401c50aa9160ca0a5499b2d20b2
parent86884df4d1cb014122f4e59422bc5b5f69c66e9d (diff)
downloadbuildroot-novena-89e439ed411c018e69eac10ef682210fc4310463.tar.gz
buildroot-novena-89e439ed411c018e69eac10ef682210fc4310463.zip
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>
-rw-r--r--package/vtun/Config.in2
-rw-r--r--package/vtun/README.txt37
-rw-r--r--package/vtun/vtun-3.0.2-001-Makefile.in.patch33
-rw-r--r--package/vtun/vtun-3.0.2-003-configure.patch12
-rw-r--r--package/vtun/vtun.mk19
-rw-r--r--package/vtun/vtun.patch186
-rw-r--r--package/vtun/vtund.rc.debian-2.650
-rw-r--r--package/vtun/vtund.rc.debian-3.0.261
8 files changed, 208 insertions, 192 deletions
diff --git a/package/vtun/Config.in b/package/vtun/Config.in
index a1d285605..b40de255b 100644
--- a/package/vtun/Config.in
+++ b/package/vtun/Config.in
@@ -1,5 +1,5 @@
config BR2_PACKAGE_VTUN
- bool "vtun"
+ bool "vtun - BEWARE: read package/vtun/README.txt before use"
select BR2_PACKAGE_LZO
select BR2_PACKAGE_OPENSSL
help
diff --git a/package/vtun/README.txt b/package/vtun/README.txt
new file mode 100644
index 000000000..5ee047958
--- /dev/null
+++ b/package/vtun/README.txt
@@ -0,0 +1,37 @@
+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>
+
diff --git a/package/vtun/vtun-3.0.2-001-Makefile.in.patch b/package/vtun/vtun-3.0.2-001-Makefile.in.patch
new file mode 100644
index 000000000..063d4b3d7
--- /dev/null
+++ b/package/vtun/vtun-3.0.2-001-Makefile.in.patch
@@ -0,0 +1,33 @@
+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
+@@ -28,7 +28,7 @@
+ LEXFLAGS = -t
+
+ INSTALL = @INSTALL@
+-INSTALL_OWNER = -o root -g 0
++INSTALL_OWNER =
+
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+@@ -86,15 +86,15 @@
+
+ install_config:
+ $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(ETC_DIR)
+- if [ ! -f $(ETC_DIR)/vtund.conf ]; then \
+- $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); \
+- fi
++ $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR);
++ $(INSTALL) -m 600 $(INSTALL_OWNER) scripts/vtund-start.conf $(DESTDIR)$(ETC_DIR);
+
+ install: vtund install_config install_man
+- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(VAR_DIR)/run
+ $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(STAT_DIR)
+ $(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)
++ $(INSTALL) -m 755 $(INSTALL_OWNER) scripts/vtund.rc.debian \
++ $(DESTDIR)$(ETC_DIR)/init.d/S90vtun
+
+ # DO NOT DELETE THIS LINE -- make depend depends on it.
+
diff --git a/package/vtun/vtun-3.0.2-003-configure.patch b/package/vtun/vtun-3.0.2-003-configure.patch
new file mode 100644
index 000000000..7ddc0431a
--- /dev/null
+++ b/package/vtun/vtun-3.0.2-003-configure.patch
@@ -0,0 +1,12 @@
+--- vtun-2.6/configure.dist 2004-03-11 10:39:10.000000000 -0600
++++ vtun-2.6/configure 2004-03-11 10:45:52.000000000 -0600
+@@ -2112,7 +2112,7 @@
+ echo $ac_n "checking "for blowfish.h"""... $ac_c" 1>&6
+ echo "configure:2114: checking "for blowfish.h"" >&5
+ ac_hdr_found=no
+- for p in $BLOWFISH_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include /usr/include/crypto; do
++ for p in $BLOWFISH_HDR_DIR $SSL_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include /usr/include/crypto; do
+ if test -n "$p"; then
+ dir="$p"
+ else
+
diff --git a/package/vtun/vtun.mk b/package/vtun/vtun.mk
index 3e3397304..bd7382086 100644
--- a/package/vtun/vtun.mk
+++ b/package/vtun/vtun.mk
@@ -6,7 +6,8 @@
# to enable that within busybox
#
#############################################################
-VTUN_VERSION:=2.6
+#Old version 2.6
+VTUN_VERSION:=3.0.2
VTUN_SOURCE:=vtun-$(VTUN_VERSION).tar.gz
VTUN_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/vtun/
VTUN_DIR:=$(BUILD_DIR)/vtun-$(VTUN_VERSION)
@@ -21,11 +22,15 @@ vtun-source: $(DL_DIR)/$(VTUN_SOURCE)
$(VTUN_DIR)/.unpacked: $(DL_DIR)/$(VTUN_SOURCE)
$(VTUN_CAT) $(DL_DIR)/$(VTUN_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- mv $(BUILD_DIR)/vtun $(VTUN_DIR)
- toolchain/patch-kernel.sh $(VTUN_DIR) package/vtun/ vtun\*.patch
- touch $(VTUN_DIR)/.unpacked
+ touch $@
-$(VTUN_DIR)/.configured: $(VTUN_DIR)/.unpacked
+$(VTUN_DIR)/.patched: $(VTUN_DIR)/.unpacked
+ toolchain/patch-kernel.sh $(VTUN_DIR) package/vtun/ vtun-$(VTUN_VERSION)\*.patch
+ touch $@
+
+
+
+$(VTUN_DIR)/.configured: $(VTUN_DIR)/.patched
(cd $(VTUN_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
@@ -60,6 +65,10 @@ $(TARGET_DIR)/$(VTUN_TARGET_BINARY): $(VTUN_DIR)/$(VTUN_BINARY)
vtun: uclibc zlib lzo openssl $(TARGET_DIR)/$(VTUN_TARGET_BINARY)
+vtun-unpacked: $(VTUN_DIR)/.unpacked
+
+vtun-patched: $(VTUN_DIR)/.patched
+
vtun-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(VTUN_DIR) uninstall
-$(MAKE) -C $(VTUN_DIR) clean
diff --git a/package/vtun/vtun.patch b/package/vtun/vtun.patch
deleted file mode 100644
index 00a12454e..000000000
--- a/package/vtun/vtun.patch
+++ /dev/null
@@ -1,186 +0,0 @@
-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
-@@ -28,7 +28,7 @@
- LEXFLAGS = -t
-
- INSTALL = @INSTALL@
--INSTALL_OWNER = -o root -g 0
-+INSTALL_OWNER =
-
- prefix = @prefix@
- exec_prefix = @exec_prefix@
-@@ -86,15 +86,15 @@
-
- install_config:
- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(ETC_DIR)
-- if [ ! -f $(ETC_DIR)/vtund.conf ]; then \
-- $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); \
-- fi
-+ $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR);
-+ $(INSTALL) -m 600 $(INSTALL_OWNER) scripts/vtund-start.conf $(DESTDIR)$(ETC_DIR);
-
- install: vtund install_config install_man
-- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(VAR_DIR)/run
- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(STAT_DIR)
- $(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)
-+ $(INSTALL) -m 755 $(INSTALL_OWNER) scripts/vtund.rc.debian \
-+ $(DESTDIR)$(ETC_DIR)/init.d/S90vtun
-
- # DO NOT DELETE THIS LINE -- make depend depends on it.
-diff -urN vtun/scripts/vtund.rc.debian vtun-2.6/scripts/vtund.rc.debian
---- vtun/scripts/vtund.rc.debian 2000-03-26 10:06:37.000000000 -0700
-+++ vtun-2.6/scripts/vtund.rc.debian 2003-06-05 12:38:46.000000000 -0600
-@@ -1,92 +1,48 @@
--#! /usr/bin/perl -w
-+#! /bin/sh
-+#
-
--### vtund-start
--###
--### script to start vtund as either a server or a client, according to
--### the config file /etc/vtund-start.conf
--###
--### Copyright 1999 Craig Sanders <cas@taz.net.au>
--###
--### Written for the Debian GNU/Linux distribution. This script is free
--### software licensed under the terms of the GNU General Public License.
--
--$DAEMON="/usr/sbin/vtund" ;
--
--$do_what = shift ;
--$args="start|stop|reload|force-reload|restart" ;
--if ( $do_what !~ /^($args)$/i ) {
-- print "Usage: /etc/init.d/vtun {$args}\n" ;
-- exit 0 ;
--}
--
--$SSD="/sbin/start-stop-daemon" ;
--$SSDARGS="--verbose --exec $DAEMON" ;
--
--$sconf="/etc/vtund-start.conf" ;
--open(SCONF,"<$sconf") || die "couldn't open $sconf: $!\n" ;
--while (<SCONF>) {
-- chomp ;
-- s/#.*//;
-- s/^ +| +$//;
-- next if (/^$/) ;
--
-- @line = split ;
-- $host = shift(@line) ;
-- $server = shift(@line) ;
-- $args = "" ;
-- foreach (@line) { $args .= " $_" } ;
--
-- $host='' if ($host =~ /--server--/i ) ;
--
-- if ( $do_what eq 'start' ) {
-- &start($host,$server,$args) ;
-- } elsif ( $do_what eq 'stop' ) {
-- &stop($host,$server,$args) ;
-- } elsif ( $do_what eq 'restart' ) {
-- &stop($pidfile) ;
-- &start($host,$server,$args) ;
-- } elsif ( $do_what =~ /^(reload|force-reload)$/ ) {
-- &reload($host,$server) ;
-- }
--}
--close (SCONF);
--
--
--sub start {
-- my($host,$server,$args) = @_ ;
-- print " Starting vtun " ;
-- if ($host eq '') {
-- print "server\n" ;
-- system "$SSD --start $SSDARGS -- $args -s -P $server" ;
-- } else {
-- print "client $host to $server\n" ;
-- $pidfile="/var/run/vtun.$host.$server" ;
-- system "$SSD --start $SSDARGS --pidfile $pidfile -- $args $host $server" ;
-- }
--} ;
--
--sub stop {
-- my($host,$server,$args) = @_ ;
-- print " Stopping vtun " ;
-- if ($host eq '') {
-- print "server\n" ;
-- system "$SSD --stop $SSDARGS" ;
-- } else {
-- print "client $host to $server\n" ;
-- $pidfile="/var/run/vtun.$host.$server" ;
-- system "$SSD --stop $SSDARGS --pidfile $pidfile" ;
-- }
--} ;
--
--sub reload {
-- my($host,$server) = @_ ;
-- print " Reloading vtun " ;
-- if ($host eq '') {
-- print "server\n" ;
-- system "$SSD --stop $SSDARGS --signal 1" ;
-- } else {
-- print "client $host to $server\n" ;
-- $pidfile="/var/run/vtun.$host.$server" ;
-- system "$SSD --stop $SSDARGS --signal 1 --pidfile $pidfile" ;
-- }
--}
-+PATH=/bin:/usr/bin:/sbin:/usr/sbin
-+DAEMON=/usr/sbin/vtund
-+CONFFILE=/etc/vtund-start.conf
-+PIDPREFIX=/var/run/vtund
-+
-+test -f $DAEMON || exit 0
-+
-+case "$1" in
-+ start)
-+ # find all the defined tunnels
-+ egrep -v '^[:space:]*(#.*)?$' $CONFFILE | while true;
-+ do
-+ read i
-+ # no more lines available? done, then.
-+ if [ $? != 0 ] ; then break; fi
-+ SARGS=`echo $i|sed -ne 's/--server--\s*/-s -P /p'`;
-+ if [ -n "$SARGS" ];
-+ then
-+ echo "Starting vtund server."
-+ start-stop-daemon -S -x $DAEMON -- $SARGS;
-+ else
-+ # split args into host and rest
-+ HOST=`echo $i|cut -f 1 -d " "`;
-+ TARGET=`echo $i|cut -f 2 -d " "`;
-+ echo "Starting vtund client $HOST to $TARGET.";
-+ start-stop-daemon -S -x $DAEMON -- $i;
-+ fi
-+ done
-+ ;;
-+ stop)
-+ echo "Stopping vtund.";
-+ start-stop-daemon -K -x vtund;
-+ ;;
-+
-+ restart|reload|force-reload)
-+ $0 stop
-+ sleep 1;
-+ $0 start
-+ ;;
-+ *)
-+ echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
-+ exit 1
-+ ;;
-+esac
-+exit 0
---- vtun-2.6/configure.dist 2004-03-11 10:39:10.000000000 -0600
-+++ vtun-2.6/configure 2004-03-11 10:45:52.000000000 -0600
-@@ -2112,7 +2112,7 @@
- echo $ac_n "checking "for blowfish.h"""... $ac_c" 1>&6
- echo "configure:2114: checking "for blowfish.h"" >&5
- ac_hdr_found=no
-- for p in $BLOWFISH_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include /usr/include/crypto; do
-+ for p in $BLOWFISH_HDR_DIR $SSL_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include /usr/include/crypto; do
- if test -n "$p"; then
- dir="$p"
- else
diff --git a/package/vtun/vtund.rc.debian-2.6 b/package/vtun/vtund.rc.debian-2.6
new file mode 100644
index 000000000..eb8226e9c
--- /dev/null
+++ b/package/vtun/vtund.rc.debian-2.6
@@ -0,0 +1,50 @@
+#! /bin/sh
+#
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/usr/sbin/vtund
+CONFFILE=/etc/vtund-start.conf
+PIDPREFIX=/var/run/vtund
+
+test -f $DAEMON || exit 0
+
+case "$1" in
+ start)
+ # find all the defined tunnels
+ egrep -v '^[:space:]*(#.*)?$' $CONFFILE | while true;
+ do
+ read i
+ # no more lines available? done, then.
+ if [ $? != 0 ] ; then break; fi
+ SARGS=`echo $i|sed -ne 's/--server--\s*/-s -P /p'`;
+ if [ -n "$SARGS" ];
+ then
+ echo "Starting vtund server."
+ start-stop-daemon -S -x $DAEMON -- $SARGS;
+ else
+ # split args into host and rest
+ HOST=`echo $i|cut -f 1 -d " "`;
+ TARGET=`echo $i|cut -f 2 -d " "`;
+ echo "Starting vtund client $HOST to $TARGET.";
+ start-stop-daemon -S -x $DAEMON -- $i;
+
+ fi
+ done
+ ;;
+ stop)
+ echo "Stopping vtund.";
+ start-stop-daemon -K -x vtund;
+ ;;
+
+ restart|reload|force-reload)
+ $0 stop
+ sleep 1;
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
+ exit 1
+ ;;
+esac
+exit 0
+
diff --git a/package/vtun/vtund.rc.debian-3.0.2 b/package/vtun/vtund.rc.debian-3.0.2
new file mode 100644
index 000000000..5158663f1
--- /dev/null
+++ b/package/vtun/vtund.rc.debian-3.0.2
@@ -0,0 +1,61 @@
+#! /bin/sh
+#
+# submitted by Morgon Kanter
+#
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/usr/sbin/vtund
+CONFFILE=/etc/vtund-start.conf
+PIDPREFIX=/var/run/vtund
+
+test -f $DAEMON || exit 0
+
+case "$1" in
+ start)
+ # find all the defined tunnels
+ egrep -v '^[:space:]*(#.*)?$' $CONFFILE | while true;
+ do
+ read i
+ # no more lines available? done, then.
+ if [ $? != 0 ] ; then break; fi
+ SARGS=`echo $i|sed -ne 's/--server--\s*/-s -P /p'`;
+ if [ -n "$SARGS" ];
+ then
+ echo "Starting vtund server."
+ start-stop-daemon --start --exec $DAEMON --pidfile $PIDPREFIX.pid -- $SARGS;
+ else
+ # split args into host and rest
+ HOST=`echo $i|cut -f 1 -d " "`;
+ TARGET=`echo $i|cut -f 2 -d " "`;
+ echo "Starting vtund client $HOST to $TARGET.";
+ start-stop-daemon --start --exec $DAEMON --pidfile $PIDPREFIX.$HOST.pid -- $i;
+
+ fi
+ done
+ ;;
+ stop)
+ echo "Stopping vtund.";
+ for i in $PIDPREFIX*;
+ do
+ start-stop-daemon --stop --pidfile $i;
+ rm -f $i;
+ done
+ ;;
+ reload|force-reload)
+ echo "Reloading vtund.";
+ for i in $PIDPREFIX*;
+ do
+ start-stop-daemon --stop --signal 1 --pidfile $i;
+ done
+ ;;
+ restart)
+ $0 stop
+ sleep 1;
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
+ exit 1
+ ;;
+esac
+exit 0