diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-vpn/vtun |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-vpn/vtun')
-rw-r--r-- | net-vpn/vtun/Manifest | 8 | ||||
-rw-r--r-- | net-vpn/vtun/files/vtun-3.0.2-remove-config-presence-check.patch | 13 | ||||
-rw-r--r-- | net-vpn/vtun/files/vtun-3.0.3-gcc5.patch | 13 | ||||
-rw-r--r-- | net-vpn/vtun/files/vtun-3.0.3-includes.patch | 62 | ||||
-rw-r--r-- | net-vpn/vtun/files/vtun.rc | 32 | ||||
-rw-r--r-- | net-vpn/vtun/files/vtund-start.conf | 33 | ||||
-rw-r--r-- | net-vpn/vtun/metadata.xml | 11 | ||||
-rw-r--r-- | net-vpn/vtun/vtun-3.0.3.ebuild | 57 |
8 files changed, 229 insertions, 0 deletions
diff --git a/net-vpn/vtun/Manifest b/net-vpn/vtun/Manifest new file mode 100644 index 000000000000..6d340c40bb3a --- /dev/null +++ b/net-vpn/vtun/Manifest @@ -0,0 +1,8 @@ +AUX vtun-3.0.2-remove-config-presence-check.patch 513 SHA256 12c14f8b556a262e908a0285475fc8fb84b282745332aedf3bff43b9654af91d SHA512 7e2f0e220801201080bbf256588d30790344aad44603012805bef39748636c2f599796289c6872251d926cc01e96f86203ddb40414e9ec77aac95423d3b8f9f9 WHIRLPOOL ec87507bd79049c060bc53e49168ecdd8f31cd294f8efb88aa064124a395ab4a695c40f7e51909664314ef59dfa2bbe2f3d870913b8871ba3c284f6552f6dd09 +AUX vtun-3.0.3-gcc5.patch 468 SHA256 e6d3e8f2437b154bd288fa75b657cf533813391727b3b1e10c08d5ea80cca013 SHA512 f907812408ec752e3aef9837d2830b908c424628973e4fd0f9e21d12eb42ce6b700f93be6755b3c8a8d03e97d767fdf246157e5a2e0792598aa07bc00e7736b4 WHIRLPOOL 8f8e0ece22fed00cd210eeac2fb4aa82c799363141ce70aa05c60d40b63321f9779cb6d25e7a62ee393eefa34142a5a6016334e6e65b0d74d543f603a90ca907 +AUX vtun-3.0.3-includes.patch 1748 SHA256 3335d65efe586fb12d48176999b5c5d30e863a79941e4cc47db968617a158bdc SHA512 4d6e1f80a9a5ed747f1c20f3fc0b12cf3093781ca01c9b9200f59da83139fdc09a7fe972358965ad3547103e3be143f26afa92d58f6224eaf0f570d3bfa85cc6 WHIRLPOOL e67d57c28b651cb7647fb985942f5d9609d013b6fdbd8448446d4aaf2d4726b78ca742bec8153fddd95e4d12c70e25fe3124db533786bbe095be9834e4790756 +AUX vtun.rc 669 SHA256 1b6d652b1b3ecb84969968023b89475baedf0ffee9dcf02b0fb79a8d32ffc647 SHA512 d5028e1ca0b01e9f746b273a54f9c82bdf393c22c4ba099b08fadec5086055c571242d6d1c13eeced9d8c7c27bc57a7559a91f05f8e25ff92a6629827d443ee4 WHIRLPOOL 7792621ca98a596d7f031497570122ead5e16e2fed799edd0e295eea3bdde8754e6eddf9a46596bd9c15caa5b29813611ce89d6d697bf9d81213c2f96076f021 +AUX vtund-start.conf 1174 SHA256 fce23e42500ac4b2135dfd4940388e4d05c117bba12446a7e1702c5a3342ab03 SHA512 7ec2a8f64380483b8e311bbefb78675a457e27088888e654f8c5fee5f14a77a72f1319b9c7e2dd38763c86728e4f44d6eb87c286103e547e19f329f1550e6710 WHIRLPOOL 92633cbe972453fdc757cf5a1da9fff6bc2cf24ce1029d6b1d8c77b8ef862b810ee9e9bc560360d0c16ae46582107710270c5a8c541bf680fa94ad5b35703028 +DIST vtun-3.0.3.tar.gz 130051 SHA256 69dcbe4f8c5ce7d91b4150a6309e536d03b61841169746ca5788413ac7edb9cb SHA512 5fa789d08b556f97492b89515a89c2322c4b0a8fa95bd1035f5ed19061b3654a6a36a9911792096ac872ae9ae5451848cab87d0343dc0ffc064affea1f7d0d54 WHIRLPOOL 8939c132622d4833a8780003548850103c8f35cabd25b38198a254200a80747b57edba327b4ab91b6af954542d2605a5f2d9dda42a64218a5e0a586fe5705475 +EBUILD vtun-3.0.3.ebuild 1450 SHA256 f046d152e4823ec7ba26de72606f453905eeea5d38cdad98be1a297ceae9c2ce SHA512 cfee3847a8925c5d37b6273896e759fc8cbd49302c31870d6124fe51d70b91d1d9414453c99345b09c6a308b6cde9151e8426d6524358d0ebb962b45260173a1 WHIRLPOOL 7fb57541a1c0e2f9a98831402448f206bdf0450b08d7ac52d8eaae9dccee06ed02ad08f6b85afbc4bacbfb0fd1e60c442e546ce5b1ffb31ecc777b1ec5e4f693 +MISC metadata.xml 321 SHA256 3b6cea27e0e85c076441e4b4558ef4bd05ae9b45d1990cef95d3d4f070c1807a SHA512 c5983cd105c9b0534371fae20648dc22d4d73440d2f1df3fdab3c84dc76d58fc951c31421cf9ac597fdef0067a53fcb54817a4a0c40b6cbf8c4dcfae8543c731 WHIRLPOOL 0ae173e9669caddfae5de364313368ed857b215b4494900e5d944cc2d32aea0a8389fc7f8cf252825e30b3ab790505bdcfccd803cf401ec347bcb6086cac64ee diff --git a/net-vpn/vtun/files/vtun-3.0.2-remove-config-presence-check.patch b/net-vpn/vtun/files/vtun-3.0.2-remove-config-presence-check.patch new file mode 100644 index 000000000000..15b3bf273c34 --- /dev/null +++ b/net-vpn/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-vpn/vtun/files/vtun-3.0.3-gcc5.patch b/net-vpn/vtun/files/vtun-3.0.3-gcc5.patch new file mode 100644 index 000000000000..99c6531d7268 --- /dev/null +++ b/net-vpn/vtun/files/vtun-3.0.3-gcc5.patch @@ -0,0 +1,13 @@ +Index: vtun-3.0.3/cfg_file.y +=================================================================== +--- vtun-3.0.3.orig/cfg_file.y ++++ vtun-3.0.3/cfg_file.y +@@ -624,7 +624,7 @@ int clear_nat_hack_client(void *d, void + } + + /* Clear the VTUN_NAT_HACK flag which are not relevant to the current operation mode */ +-inline void clear_nat_hack_flags(int svr) ++extern inline void clear_nat_hack_flags(int svr) + { + if (svr) + llist_trav(&host_list,clear_nat_hack_server,NULL); diff --git a/net-vpn/vtun/files/vtun-3.0.3-includes.patch b/net-vpn/vtun/files/vtun-3.0.3-includes.patch new file mode 100644 index 000000000000..cd7cf6a2a2ee --- /dev/null +++ b/net-vpn/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-vpn/vtun/files/vtun.rc b/net-vpn/vtun/files/vtun.rc new file mode 100644 index 000000000000..7ef322985043 --- /dev/null +++ b/net-vpn/vtun/files/vtun.rc @@ -0,0 +1,32 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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-vpn/vtun/files/vtund-start.conf b/net-vpn/vtun/files/vtund-start.conf new file mode 100644 index 000000000000..01de38322f48 --- /dev/null +++ b/net-vpn/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-vpn/vtun/metadata.xml b/net-vpn/vtun/metadata.xml new file mode 100644 index 000000000000..6c796b6d02c5 --- /dev/null +++ b/net-vpn/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 type="person"> + <email>pinkbyte@gentoo.org</email> + <name>Sergey Popov</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">vtun</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-vpn/vtun/vtun-3.0.3.ebuild b/net-vpn/vtun/vtun-3.0.3.ebuild new file mode 100644 index 000000000000..153cff659a9f --- /dev/null +++ b/net-vpn/vtun/vtun-3.0.3.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils linux-info + +DESCRIPTION="Create tunnels over TCP/IP networks with 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:0 ) + 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 + # GCC 5 compatibility, patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778164 + epatch "${FILESDIR}"/${P}-gcc5.patch + # portage takes care about striping binaries itself + sed -i 's:$(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund::' Makefile.in || die + + epatch_user +} + +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 +} |