Commit 183732ae authored by Romain Courteaud's avatar Romain Courteaud Committed by Rafael Monnerat

Add 6tunnel support.

Based on work by Romain Courteaud <romain@nexedi.com>.
parent aeba28a0
# 6tunnel - Tunnelling for application that don't speak IPv6
# http://toxygen.net/6tunnel/
[buildout]
parts = 6tunnel
extends =
../autoconf/buildout.cfg
../automake/buildout.cfg
[6tunnel]
recipe = hexagonit.recipe.cmmi
url = http://toxygen.net/6tunnel/6tunnel-0.11rc2.tar.gz
md5sum = 74e02d4f0704b3083a01feda66033449
configure-command =
aclocal
autoheader
automake --foreign
autoconf
./configure
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
environment =
PATH=${autoconf:location}/bin:${automake:location}/bin:%(PATH)s
......@@ -68,6 +68,8 @@ setup(name=name,
'generic.cloudooo = slapos.recipe.generic_cloudooo:Recipe',
'cloudooo.test = slapos.recipe.cloudooo_test:Recipe',
'firefox = slapos.recipe.firefox:Recipe',
'ipv6toipv4 = slapos.recipe.6tunnel:SixToFour',
'ipv4toipv6 = slapos.recipe.6tunnel:FourToSix',
'fontconfig = slapos.recipe.fontconfig:Recipe',
'java = slapos.recipe.java:Recipe',
'kumofs = slapos.recipe.kumofs:Recipe',
......
##############################################################################
#
# Copyright (c) 2012 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
"""
ipv4toipv6 tunnel configuration.
"""
# Override in subclasses
template_name = None
def install(self):
return [
self.createExecutable(
self.options['runner-path'],
self.substituteTemplate(
self.getTemplateFilename(self.template_name),
{
'ipv6': self.options['ipv6'],
'ipv6_port': self.options['ipv6-port'],
'ipv4': self.options['ipv4'],
'ipv4_port': self.options['ipv4-port'],
'shell_path': self.options['shell-path'],
'6tunnel_path': self.options['tunnel6-path'],
},
),
)
]
class SixToFour(Recipe):
template_name = '6to4.in'
class FourToSix(Recipe):
template_name = '4to6.in'
#!%(shell_path)s
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
exec %(6tunnel_path)s -d -l %(ipv4)s %(ipv4_port)s %(ipv6)s %(ipv6_port)s
#!%(shell_path)s
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
exec %(6tunnel_path)s -6 -4 -d -l %(ipv6)s %(ipv6_port)s %(ipv4)s %(ipv4_port)s
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment