summaryrefslogtreecommitdiff
path: root/net-misc/vtun
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/vtun
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/vtun')
-rw-r--r--net-misc/vtun/Manifest2
-rw-r--r--net-misc/vtun/files/vtun-3.0.2-build-racing-condition-fix.patch17
-rw-r--r--net-misc/vtun/files/vtun-3.0.2-includes.patch72
-rw-r--r--net-misc/vtun/files/vtun-3.0.2-remove-config-presence-check.patch13
-rw-r--r--net-misc/vtun/files/vtun-3.0.3-includes.patch62
-rw-r--r--net-misc/vtun/files/vtun.rc33
-rw-r--r--net-misc/vtun/files/vtund-start.conf33
-rw-r--r--net-misc/vtun/metadata.xml11
-rw-r--r--net-misc/vtun/vtun-3.0.2-r2.ebuild54
-rw-r--r--net-misc/vtun/vtun-3.0.3.ebuild54
10 files changed, 351 insertions, 0 deletions
diff --git a/net-misc/vtun/Manifest b/net-misc/vtun/Manifest
new file mode 100644
index 00000000000..5e436786825
--- /dev/null
+++ b/net-misc/vtun/Manifest
@@ -0,0 +1,2 @@
+DIST vtun-3.0.2.tar.gz 125777 SHA256 db26d4dbc35a2b3d65519f68b8ae55c80d7ec4e6569aeec7a432aa82f24c56d6 SHA512 1cf15ca7856c74318f921d9a6c4b47b10fd1aa69e12a223d41c6c41e570333beb825d37d3aea4217d305bb37f53c5beff70081079516d809068f8024dc8a039f WHIRLPOOL ee72023902f2e4688ac84c0e1d9c5a3ad6982fb847dcf162ecd2f12efac0abeaeb11344b0a34322a4ad6f0adabcd986dff9546f98174a7f201c9b87e5ccb5c72
+DIST vtun-3.0.3.tar.gz 130051 SHA256 69dcbe4f8c5ce7d91b4150a6309e536d03b61841169746ca5788413ac7edb9cb SHA512 5fa789d08b556f97492b89515a89c2322c4b0a8fa95bd1035f5ed19061b3654a6a36a9911792096ac872ae9ae5451848cab87d0343dc0ffc064affea1f7d0d54 WHIRLPOOL 8939c132622d4833a8780003548850103c8f35cabd25b38198a254200a80747b57edba327b4ab91b6af954542d2605a5f2d9dda42a64218a5e0a586fe5705475
diff --git a/net-misc/vtun/files/vtun-3.0.2-build-racing-condition-fix.patch b/net-misc/vtun/files/vtun-3.0.2-build-racing-condition-fix.patch
new file mode 100644
index 00000000000..6fa765282ec
--- /dev/null
+++ b/net-misc/vtun/files/vtun-3.0.2-build-racing-condition-fix.patch
@@ -0,0 +1,17 @@
+--- Makefile.in.orig 2012-06-12 00:20:24.359206241 +0400
++++ Makefile.in 2012-06-12 00:22:46.735301510 +0400
+@@ -60,10 +60,12 @@
+ vtund: $(OBJS)
+ $(CC) $(CFLAGS) -o vtund $(OBJS) $(LFD_OBJS) $(LDFLAGS)
+
+-cfg_file.tab.c: cfg_file.y cfg_kwords.h config.h
++cfg_file.tab.h:
+ $(YACC) $(YACCFLAGS) -b cfg_file cfg_file.y
+
+-cfg_file.lex.c: cfg_file.l cfg_kwords.h config.h
++cfg_file.tab.c: cfg_file.y cfg_kwords.h config.h cfg_file.tab.h
++
++cfg_file.lex.c: cfg_file.l cfg_kwords.h config.h cfg_file.tab.h
+ $(LEX) $(LEXFLAGS) cfg_file.l > cfg_file.lex.c
+
+ depend:
diff --git a/net-misc/vtun/files/vtun-3.0.2-includes.patch b/net-misc/vtun/files/vtun-3.0.2-includes.patch
new file mode 100644
index 00000000000..8634a659ca2
--- /dev/null
+++ b/net-misc/vtun/files/vtun-3.0.2-includes.patch
@@ -0,0 +1,72 @@
+--- a/lfd_encrypt.c 2008-01-07 23:35:32.000000000 +0100
++++ b/lfd_encrypt.c 2010-09-18 04:53:31.000000000 +0200
+@@ -44,6 +44,7 @@
+ #include <strings.h>
+ #include <string.h>
+ #include <time.h>
++#include <arpa/inet.h> /* htonl() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
+--- a/lib.c 2008-01-07 23:35:40.000000000 +0100
++++ b/lib.c 2010-09-18 04:52:51.000000000 +0200
+@@ -34,6 +34,7 @@
+ #include <sys/wait.h>
+ #include <syslog.h>
+ #include <errno.h>
++#include <time.h> /* nanosleep() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
+--- a/lib.h 2008-01-07 23:35:41.000000000 +0100
++++ b/lib.h 2010-09-18 04:56:50.000000000 +0200
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <signal.h>
+ #include <errno.h>
++#include <unistd.h> /* read(), write() */
+
+ #ifdef HAVE_LIBUTIL_H
+ #include <libutil.h>
+--- a/vtun.h 2008-01-07 23:36:07.000000000 +0100
++++ b/vtun.h 2010-09-18 04:56:08.000000000 +0200
+@@ -219,5 +219,9 @@
+ int tunnel(struct vtun_host *host);
+ int read_config(char *file);
+ struct vtun_host * find_host(char *host);
++int send_msg(int len, char *in, char **out);
++int send_ib_mesg(int *len, char **in);
++int recv_msg(int len, char *in, char **out);
++int recv_ib_mesg(int *len, char **in);
+
+ #endif
+--- a/lock.c 2008-01-07 23:35:50.000000000 +0100
++++ b/lock.c 2010-09-18 05:01:21.000000000 +0200
+@@ -32,6 +32,7 @@
+ #include <sys/types.h>
+ #include <signal.h>
+ #include <errno.h>
++#include <time.h> /* nanosleep() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
+--- a/server 2008-01-07 23:36:01.000000000 +0100
++++ b/server.c 2010-09-18 05:02:45.000000000 +0200
+@@ -49,6 +49,7 @@
+ #include "auth.h"
+
+ #include "compat.h"
++#include "netlib.h" /* generic_addr() */
+
+ static volatile sig_atomic_t server_term;
+ static void sig_term(int sig)
+--- a/lfd_shaper.c 2008-01-07 23:35:36.000000000 +0100
++++ b/lfd_shaper.c 2010-09-18 05:07:12.000000000 +0200
+@@ -27,6 +27,7 @@
+ #include <stdlib.h>
+ #include <sys/time.h>
+ #include <syslog.h>
++#include <time.h> /* nanosleep() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
diff --git a/net-misc/vtun/files/vtun-3.0.2-remove-config-presence-check.patch b/net-misc/vtun/files/vtun-3.0.2-remove-config-presence-check.patch
new file mode 100644
index 00000000000..15b3bf273c3
--- /dev/null
+++ b/net-misc/vtun/files/vtun-3.0.2-remove-config-presence-check.patch
@@ -0,0 +1,13 @@
+--- Makefile.in.orig 2012-06-11 23:31:11.416075337 +0400
++++ Makefile.in 2012-06-11 23:31:21.247324839 +0400
+@@ -86,9 +86,7 @@
+
+ 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: vtund install_config install_man
+ $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(VAR_DIR)/run
diff --git a/net-misc/vtun/files/vtun-3.0.3-includes.patch b/net-misc/vtun/files/vtun-3.0.3-includes.patch
new file mode 100644
index 00000000000..cd7cf6a2a2e
--- /dev/null
+++ b/net-misc/vtun/files/vtun-3.0.3-includes.patch
@@ -0,0 +1,62 @@
+--- a/lfd_encrypt.c 2008-01-07 23:35:32.000000000 +0100
++++ b/lfd_encrypt.c 2010-09-18 04:53:31.000000000 +0200
+@@ -44,6 +44,7 @@
+ #include <strings.h>
+ #include <string.h>
+ #include <time.h>
++#include <arpa/inet.h> /* htonl() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
+--- a/lib.c 2008-01-07 23:35:40.000000000 +0100
++++ b/lib.c 2010-09-18 04:52:51.000000000 +0200
+@@ -34,6 +34,7 @@
+ #include <sys/wait.h>
+ #include <syslog.h>
+ #include <errno.h>
++#include <time.h> /* nanosleep() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
+--- a/lib.h 2008-01-07 23:35:41.000000000 +0100
++++ b/lib.h 2010-09-18 04:56:50.000000000 +0200
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <signal.h>
+ #include <errno.h>
++#include <unistd.h> /* read(), write() */
+
+ #ifdef HAVE_LIBUTIL_H
+ #include <libutil.h>
+--- a/vtun.h 2008-01-07 23:36:07.000000000 +0100
++++ b/vtun.h 2010-09-18 04:56:08.000000000 +0200
+@@ -232,5 +232,9 @@
+ int read_config(char *file);
+ struct vtun_host * find_host(char *host);
+ inline void clear_nat_hack_flags(int svr);
++int send_msg(int len, char *in, char **out);
++int send_ib_mesg(int *len, char **in);
++int recv_msg(int len, char *in, char **out);
++int recv_ib_mesg(int *len, char **in);
+
+ #endif
+--- a/lock.c 2008-01-07 23:35:50.000000000 +0100
++++ b/lock.c 2010-09-18 05:01:21.000000000 +0200
+@@ -32,6 +32,7 @@
+ #include <sys/types.h>
+ #include <signal.h>
+ #include <errno.h>
++#include <time.h> /* nanosleep() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
+--- a/lfd_shaper.c 2008-01-07 23:35:36.000000000 +0100
++++ b/lfd_shaper.c 2010-09-18 05:07:12.000000000 +0200
+@@ -27,6 +27,7 @@
+ #include <stdlib.h>
+ #include <sys/time.h>
+ #include <syslog.h>
++#include <time.h> /* nanosleep() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
diff --git a/net-misc/vtun/files/vtun.rc b/net-misc/vtun/files/vtun.rc
new file mode 100644
index 00000000000..df5450fd0af
--- /dev/null
+++ b/net-misc/vtun/files/vtun.rc
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ IFS=$'\n'
+ for line in `grep -v '^[[:space:]]*#' /etc/vtund-start.conf | grep -v '^[[:space:]]*$'`
+ do
+ echo $line |
+ (IFS=" "
+ read host server args
+ if [ "$host" = "--server--" ]; then
+ ebegin "Starting vtund server"
+ /usr/sbin/vtund -s -P $server $args
+ eend $?
+ else
+ ebegin "Starting vtund client $host to $server"
+ /usr/sbin/vtund $args -- $host $server
+ eend $?
+ fi)
+ done
+}
+
+stop() {
+ ebegin "Stopping all vtund servers and clients"
+ killall vtund
+ eend $?
+}
diff --git a/net-misc/vtun/files/vtund-start.conf b/net-misc/vtun/files/vtund-start.conf
new file mode 100644
index 00000000000..01de38322f4
--- /dev/null
+++ b/net-misc/vtun/files/vtund-start.conf
@@ -0,0 +1,33 @@
+### this file defines whether vtund is run as a client or a server
+###
+### format is "[host] [server] <args>" or "--server-- [portnumber] <args>".
+###
+### [host] is the hostname to use as a client
+###
+### [server] is the server to connect to
+###
+### [args] is optional for both server and client and contains any additional
+### command line args for that instance of vtund. not needed by most people.
+###
+### --server-- is the literal string '--server--'. nothing more, nothing less.
+###
+### [portnumber] is the port number to run the server on.
+###
+###
+### you can have more than one client "host server" line if required,
+### and in theory, it should be possible to run as both a client and a
+### server simultaneously, but i haven't tested that.
+
+
+### examples:
+
+### to run as a client using hostname 'viper'.
+#viper vtun-server.somewhere.com.au
+
+### to run a persistent client connection using hostname 'viper'
+### connecting to a server on port 6000 and using /etc/vtun.viper.conf
+### as the config file.
+#viper vtun-server.somewhere.com.au -f /etc/vtun.viper.conf -s -P 6000
+
+### to run vtund as a server on port 5000, uncomment the following line:
+#--server-- 5000
diff --git a/net-misc/vtun/metadata.xml b/net-misc/vtun/metadata.xml
new file mode 100644
index 00000000000..433c591e0a0
--- /dev/null
+++ b/net-misc/vtun/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">vtun</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/vtun/vtun-3.0.2-r2.ebuild b/net-misc/vtun/vtun-3.0.2-r2.ebuild
new file mode 100644
index 00000000000..b9f147296ef
--- /dev/null
+++ b/net-misc/vtun/vtun-3.0.2-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils linux-info
+
+DESCRIPTION="Create virtual tunnels over TCP/IP networks with traffic shaping, encryption, and compression"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://vtun.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc ~sparc x86"
+IUSE="lzo socks5 ssl zlib"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ lzo? ( dev-libs/lzo:2 )
+ zlib? ( sys-libs/zlib )
+ socks5? ( net-proxy/dante )"
+DEPEND="${RDEPEND}
+ sys-devel/bison"
+
+DOCS="ChangeLog Credits FAQ README README.Setup README.Shaper TODO"
+
+CONFIG_CHECK="~TUN"
+
+src_prepare() {
+ sed -i Makefile.in \
+ -e '/^LDFLAGS/s|=|+=|g' \
+ || die "sed Makefile"
+ epatch "${FILESDIR}"/${P}-includes.patch
+ # remove unneeded checking for /etc/vtund.conf
+ epatch "${FILESDIR}"/${P}-remove-config-presence-check.patch
+ # fix build racing condition with bison and lex files, wrt bug #364923
+ epatch "${FILESDIR}"/${P}-build-racing-condition-fix.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable ssl) \
+ $(use_enable zlib) \
+ $(use_enable lzo) \
+ $(use_enable socks5 socks) \
+ --enable-shaper
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/vtun.rc vtun
+ insinto etc
+ doins "${FILESDIR}"/vtund-start.conf
+}
diff --git a/net-misc/vtun/vtun-3.0.3.ebuild b/net-misc/vtun/vtun-3.0.3.ebuild
new file mode 100644
index 00000000000..67921500af5
--- /dev/null
+++ b/net-misc/vtun/vtun-3.0.3.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils linux-info
+
+DESCRIPTION="Create virtual tunnels over TCP/IP networks with traffic shaping, encryption, and compression"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://vtun.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc ~sparc x86"
+IUSE="lzo socks5 ssl zlib"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ lzo? ( dev-libs/lzo:2 )
+ zlib? ( sys-libs/zlib )
+ socks5? ( net-proxy/dante )"
+DEPEND="${RDEPEND}
+ sys-devel/bison"
+
+DOCS="ChangeLog Credits FAQ README README.Setup README.Shaper TODO"
+
+CONFIG_CHECK="~TUN"
+
+src_prepare() {
+ sed -i Makefile.in \
+ -e '/^LDFLAGS/s|=|+=|g' \
+ || die "sed Makefile"
+ epatch "${FILESDIR}"/${P}-includes.patch
+ # remove unneeded checking for /etc/vtund.conf
+ epatch "${FILESDIR}"/${PN}-3.0.2-remove-config-presence-check.patch
+ # portage takes care about striping binaries itself
+ sed -i 's:$(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund::' Makefile.in
+}
+
+src_configure() {
+ econf \
+ $(use_enable ssl) \
+ $(use_enable zlib) \
+ $(use_enable lzo) \
+ $(use_enable socks5 socks) \
+ --enable-shaper
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/vtun.rc vtun
+ insinto etc
+ doins "${FILESDIR}"/vtund-start.conf
+}