diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-10-11 21:34:24 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-10-11 21:34:24 +0000 |
commit | 82758b6f261a8120d758948d3510e997202997b0 (patch) | |
tree | d5240931c32e45661c2b6cc958c9160947be7c38 /net-misc | |
parent | Add a symlink and a warning for backward compatibility. (diff) | |
download | gentoo-2-82758b6f261a8120d758948d3510e997202997b0.tar.gz gentoo-2-82758b6f261a8120d758948d3510e997202997b0.tar.bz2 gentoo-2-82758b6f261a8120d758948d3510e997202997b0.zip |
Initial import of gogoc, the new name and codebase replacing net-misc/gogoc.
(Portage version: 2.2_rc91/cvs/Linux x86_64)
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/gogoc/ChangeLog | 11 | ||||
-rw-r--r-- | net-misc/gogoc/files/gogoc-1.2-overflow.patch | 35 | ||||
-rw-r--r-- | net-misc/gogoc/files/gogoc.rc | 47 | ||||
-rw-r--r-- | net-misc/gogoc/gogoc-1.2.ebuild | 79 | ||||
-rw-r--r-- | net-misc/gogoc/metadata.xml | 19 |
5 files changed, 191 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/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> |