summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-10-11 21:34:24 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-10-11 21:34:24 +0000
commit1746164a2463e24ad2da5718c45d1537370e8cf3 (patch)
treeef4b5a64103d25a38c1cf18689a0b6f7e7aca417 /net-misc
parentAdd a symlink and a warning for backward compatibility. (diff)
downloadhistorical-1746164a2463e24ad2da5718c45d1537370e8cf3.tar.gz
historical-1746164a2463e24ad2da5718c45d1537370e8cf3.tar.bz2
historical-1746164a2463e24ad2da5718c45d1537370e8cf3.zip
Initial import of gogoc, the new name and codebase replacing net-misc/gogoc.
Package-Manager: portage-2.2_rc91/cvs/Linux x86_64
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/gogoc/ChangeLog11
-rw-r--r--net-misc/gogoc/Manifest16
-rw-r--r--net-misc/gogoc/files/gogoc-1.2-overflow.patch35
-rw-r--r--net-misc/gogoc/files/gogoc.rc47
-rw-r--r--net-misc/gogoc/gogoc-1.2.ebuild79
-rw-r--r--net-misc/gogoc/metadata.xml19
6 files changed, 207 insertions, 0 deletions
diff --git a/net-misc/gogoc/ChangeLog b/net-misc/gogoc/ChangeLog
new file mode 100644
index 000000000000..c05b8174e391
--- /dev/null
+++ b/net-misc/gogoc/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for net-misc/gogoc
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/gogoc/ChangeLog,v 1.1 2010/10/11 21:34:24 flameeyes Exp $
+
+*gogoc-1.2 (11 Oct 2010)
+
+ 11 Oct 2010; Diego E. Pettenò <flameeyes@gentoo.org> +gogoc-1.2.ebuild,
+ +files/gogoc-1.2-overflow.patch, +files/gogoc.rc, +metadata.xml:
+ Initial import of gogoc, the new name and codebase replacing
+ net-misc/gogoc.
+
diff --git a/net-misc/gogoc/Manifest b/net-misc/gogoc/Manifest
new file mode 100644
index 000000000000..244bd9a5819e
--- /dev/null
+++ b/net-misc/gogoc/Manifest
@@ -0,0 +1,16 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX gogoc-1.2-overflow.patch 1299 RMD160 550763713be30aa0482526588d9875293757308a SHA1 5ead36a88e84adc36aebb12dee4be7901ca924da SHA256 5a803ac4a930ac4e16b4fad931546bded68164a3910c554f34705beb8fbc71d1
+AUX gogoc.rc 1103 RMD160 a44ea264294961b5c74d8504ff6c25db54aa4939 SHA1 7df2fc5bc1ea508716527856046f61bd7e39e287 SHA256 d98a0e268ae1a95c0657aa8885e0c765e6578abeaf0d5494950b60e6f72f35db
+DIST gogoc-1_2-RELEASE.tar.gz 249286 RMD160 1af2fe3d4c0d23b1550983dcf72b692946b8c699 SHA1 a9f694b9ce404b1f4fd8cecbefbcb3005d6d6e54 SHA256 a0ef45c0bd1fc9964dc8ac059b7d78c12674bf67ef641740554e166fa99a2f49
+EBUILD gogoc-1.2.ebuild 2072 RMD160 fabcac5df4efa1f46167148dffc1fb3ceca9ea1c SHA1 4ef3415ec367ae35750f0ef20764dbce0258844e SHA256 3b9dc74e911bafeb331d320d3e0133e741842517cf5b441bbce4bd5dc38c30dd
+MISC ChangeLog 454 RMD160 8b65622ccfbff41a8939586f0895f03da42bc3e6 SHA1 7886e385a05983ef630872116a691e010c5b2c99 SHA256 346727430f899420453dffed67ef74797ddb23db5b61a627094bfa92b88afe37
+MISC metadata.xml 749 RMD160 7859b3220055accdcc2b62674d8de7fcd74bfbc3 SHA1 8bcbea505643d6a4794815ff1afd28a1db7ab1f8 SHA256 0299694180894d00712fa887c9cc5f75f552027ad9cac462e8a1661468f16dff
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.16 (GNU/Linux)
+
+iEYEARECAAYFAkyzgsAACgkQAiZjviIA2XjhHgCgrztfONCUDyUUy7IOOI5jp0oa
+KfgAoORIxRh0gT0gj2+rGAhFw3MB+YIX
+=CjSJ
+-----END PGP SIGNATURE-----
diff --git a/net-misc/gogoc/files/gogoc-1.2-overflow.patch b/net-misc/gogoc/files/gogoc-1.2-overflow.patch
new file mode 100644
index 000000000000..ddc414ce0e70
--- /dev/null
+++ b/net-misc/gogoc/files/gogoc-1.2-overflow.patch
@@ -0,0 +1,35 @@
+Index: gogoc-1_2-RELEASE/gogoc-config/src/gogocvalidation.cc
+===================================================================
+--- gogoc-1_2-RELEASE.orig/gogoc-config/src/gogocvalidation.cc
++++ gogoc-1_2-RELEASE/gogoc-config/src/gogocvalidation.cc
+@@ -512,7 +512,7 @@ bool Validate_ClientV4( const string& sC
+ if( sClientV4 != STR_AUTO )
+ {
+ struct in_addr address;
+- unsigned long net;
++ in_addr_t net;
+
+ net = inet_addr( sClientV4.c_str() );
+ memcpy(&address, &net, sizeof(net));
+@@ -535,7 +535,7 @@ bool Validate_DSLite( const string& sDSL
+
+ {
+ struct in_addr address;
+- unsigned long net;
++ in_addr_t net;
+
+ net = inet_addr( sDSLite.c_str() );
+ memcpy(&address, &net, sizeof(net));
+Index: gogoc-1_2-RELEASE/gogoc-config/src/haccessdevicemappingconfig.cc
+===================================================================
+--- gogoc-1_2-RELEASE.orig/gogoc-config/src/haccessdevicemappingconfig.cc
++++ gogoc-1_2-RELEASE/gogoc-config/src/haccessdevicemappingconfig.cc
+@@ -265,7 +265,7 @@ bool HACCESSDeviceMappingConfig::Validat
+ // Check if IPv4 or IPv6 address
+ struct in6_addr addressv6;
+ struct in_addr addressv4;
+- unsigned long net;
++ in_addr_t net;
+
+ net = inet_addr( aIPAddress.c_str() );
+ memcpy(&addressv4, &net, sizeof(net));
diff --git a/net-misc/gogoc/files/gogoc.rc b/net-misc/gogoc/files/gogoc.rc
new file mode 100644
index 000000000000..83eb3c79176e
--- /dev/null
+++ b/net-misc/gogoc/files/gogoc.rc
@@ -0,0 +1,47 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/gogoc/files/gogoc.rc,v 1.1 2010/10/11 21:34:24 flameeyes Exp $
+
+depend() {
+ need net localmount
+ after bootmisc
+ use dns logger
+}
+
+checktun() {
+ [ $(uname -s) = "Linux" ] || return 0
+ [ -e /dev/net/tun ] && return 0
+ modprobe tun && return 0
+
+ eerror "TUN/TAP support is not available in the running kernel"
+ return 1
+}
+
+checkconfig() {
+ if ! [ -f /etc/gogoc.conf ]; then
+ eerror "Unable to find configuration file /etc/gogoc.conf"
+ return 1
+ fi
+
+ if [ `stat -c '%a' /etc/fstab | cut -c 2-` != '00' ]; then
+ eerror "Configuration file /etc/gogoc.conf should not be user-readable"
+ return 1
+ fi
+}
+
+start() {
+ checktun || return 1
+ checkconfig || return 1
+
+ ebegin "Starting gogoCLIENT"
+ start-stop-daemon --start --exec /usr/sbin/gogoc \
+ --chdir /var/lib/gogoc -- -f /etc/gogoc.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping gogoCLIENT"
+ start-stop-daemon --stop --exec /usr/sbin/gogoc
+ eend $?
+}
diff --git a/net-misc/gogoc/gogoc-1.2.ebuild b/net-misc/gogoc/gogoc-1.2.ebuild
new file mode 100644
index 000000000000..cc952a5e7d80
--- /dev/null
+++ b/net-misc/gogoc/gogoc-1.2.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/gogoc/gogoc-1.2.ebuild,v 1.1 2010/10/11 21:34:24 flameeyes Exp $
+
+EAPI=2
+
+inherit eutils versionator toolchain-funcs
+
+MY_P=${PN}-$(replace_all_version_separators "_")
+if [[ ${MY_P/_beta/} != ${MY_P} ]]; then
+ MY_P=${MY_P/_beta/-BETA}
+else
+ MY_P=${MY_P}-RELEASE
+fi
+
+DESCRIPTION="Client to connect to a tunnel broker using the TSP protocol (freenet6 for example)"
+HOMEPAGE="http://gogonet.gogo6.com/page/download-1"
+SRC_URI="http://gogo6.com/downloads/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug"
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}
+ sys-apps/iproute2"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-overflow.patch
+
+ # Make the makefile handle linking correctly
+ find . -name Makefile -exec sed -i \
+ -e 's:LDFLAGS:LDLIBS:g' \
+ -e '/\$(LDLIBS)/s:-o:$(LDFLAGS) -o:' \
+ {} + || die "multised failed"
+}
+
+src_configure() { :; }
+
+src_compile() {
+ # parallel make fails as inter-directory dependecies are missing.
+ emake -j1 \
+ AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getCXX)" \
+ EXTRA_CFLAGS="${CFLAGS}" EXTRA_CXXFLAGS="${CXXFLAGS}" \
+ $(use debug && echo DEBUG=1) \
+ all target=linux || die "Build Failed"
+
+ emake -C gogoc-tsp/conf \
+ PLATFORM=linux PLATFORM_DIR=../platform BIN_DIR=../bin \
+ gogoc.conf.sample || die
+}
+
+src_install() {
+ cd "${S}"/gogoc-tsp
+ dosbin bin/gogoc || die
+
+ dodoc bin/gogoc.conf.sample || die
+
+ exeinto /etc/gateway6/template
+ doexe template/linux.sh || die
+
+ newinitd "${FILESDIR}"/gogoc.rc gogoc || die
+
+ doman man/{man5/gogoc.conf.5,man8/gogoc.8} || die
+ keepdir /var/lib/gogoc || die
+}
+
+pkg_postinst() {
+ elog "You should create an /etc/gogoc.conf file starting from"
+ elog "the sample configuration in /usr/share/doc/${PF}/gogo.conf.sample.*"
+ elog ""
+ elog "To add support for a TSP IPv6 connection at startup,"
+ elog "remember to run:"
+ elog "# rc-update add gogoc default"
+}
diff --git a/net-misc/gogoc/metadata.xml b/net-misc/gogoc/metadata.xml
new file mode 100644
index 000000000000..a4a5e37f025d
--- /dev/null
+++ b/net-misc/gogoc/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ <name>Diego Elio Pettenò</name>
+ </maintainer>
+ <longdescription>
+ TSP is a control protocol used to establish and maintain static tunnels. gogoCLIENT is
+ used on the host computer to connect to a tunnel broker using the TSP protocol and to get the
+ information for its tunnel. When it receives the information for the tunnel, gogoCLIENT
+ creates the static tunnel on its operating system
+</longdescription>
+</pkgmetadata>