aboutsummaryrefslogtreecommitdiffstats
path: root/community/6tunnel
diff options
context:
space:
mode:
authorStuart Cardall <developer@it-offshore.co.uk>2017-02-11 09:26:36 +0000
committerJakub Jirutka <jakub@jirutka.cz>2017-02-12 22:19:53 +0100
commit7bd9626a6e43b0670dfdaa70f0a8d5e1fbfc8b8a (patch)
tree131fdf413a08d5d046cd6bad99f68fbe4c4aa664 /community/6tunnel
parentd4f77493398802ac3b72c19cc4735d30592151be (diff)
downloadaports-7bd9626a6e43b0670dfdaa70f0a8d5e1fbfc8b8a.tar.bz2
aports-7bd9626a6e43b0670dfdaa70f0a8d5e1fbfc8b8a.tar.xz
testing/6tunnel: move to community, add runit example
include -u option in help for dropping privileges adds runit example script for service supervision Review notes: I split the patch to add-runit and fix-help, added comment about origin of the patches and discarded unrelated fixes of trailing spaces. ~ @jirutka
Diffstat (limited to 'community/6tunnel')
-rw-r--r--community/6tunnel/APKBUILD39
-rw-r--r--community/6tunnel/add-runit.patch26
-rw-r--r--community/6tunnel/fix-help.patch21
3 files changed, 86 insertions, 0 deletions
diff --git a/community/6tunnel/APKBUILD b/community/6tunnel/APKBUILD
new file mode 100644
index 0000000000..a46f2a0437
--- /dev/null
+++ b/community/6tunnel/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
+# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
+pkgname=6tunnel
+pkgver=0.12
+pkgrel=1
+pkgdesc="TCP proxy for non-IPv6 applications"
+url="http://toxygen.net/6tunnel"
+arch="all"
+license="GPL2"
+makedepends="automake autoconf"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/wojtekka/$pkgname/archive/$pkgver.tar.gz
+ fix-help.patch
+ add-runit.patch
+ "
+builddir="$srcdir/"$pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+ autoreconf --install
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ mkdir -p "$pkgdir"/usr/share/6tunnel
+ install -m644 contrib/* "$pkgdir"/usr/share/6tunnel || return 1
+}
+
+sha512sums="8d6148fec0d10b4eaad0c7b646a38b1e1f2dd2ca5f4c7b34e99fea67e5dde8a6b8d150a0bca777902dccb468f4ddf78d1fc6e3a73581314492de1ecccbb03e30 6tunnel-0.12.tar.gz
+20e6dbce54287fabdac12969ea63df598c4ed4e8a546b3dab71538ec0a942188ab7d0c91212e78f213f4fff953cf93f2462a1a858e01738ad0fce9d75ead088c fix-help.patch
+a4544ce649ddc1a2855733116a9320f544d185f8dd04a4b7edd0a86ebc5bc0ef3e19f44841a92bbd3752afd257bb05e6b30f9669f75f8ed0f2ace15c0f44e3da add-runit.patch"
diff --git a/community/6tunnel/add-runit.patch b/community/6tunnel/add-runit.patch
new file mode 100644
index 0000000000..9c006a4766
--- /dev/null
+++ b/community/6tunnel/add-runit.patch
@@ -0,0 +1,26 @@
+From: Stuart Cardall <developer@it-offshore.co.uk>
+Date: Fri, 10 Feb 2017 15:26:30 +0000
+Subject: [PATCH] add contrib/runit.run
+
+Adds example run script for service supervision with runit.
+
+Alpine notes:
+* This patch is ported from upstream commit:
+ https://github.com/wojtekka/6tunnel/commit/f800eb1fe5b54ad1022c1bebd2a41a650b86752d
+
+new file mode 100755
+index 0000000..d87789e
+--- /dev/null
++++ b/contrib/runit.run
+@@ -0,0 +1,11 @@
++#!/bin/sh
++#
++# example run script for service supervision with runit
++# http://smarden.org/runit/
++#
++# redirect ipv4 port 80 to internal ipv6 port 80 & drop privileges
++#
++exec 2>&1
++exec 6tunnel -u nobody -d -p /run/80.pid 80 a:dead:beef:1 80
++
++
diff --git a/community/6tunnel/fix-help.patch b/community/6tunnel/fix-help.patch
new file mode 100644
index 0000000000..f24ffc25bc
--- /dev/null
+++ b/community/6tunnel/fix-help.patch
@@ -0,0 +1,21 @@
+From: Stuart Cardall <developer@it-offshore.co.uk>
+Date: Fri, 10 Feb 2017 15:26:30 +0000
+Subject: [PATCH] fix help message
+
+Adds -u option to help message.
+
+Alpine notes:
+* This patch is ported from upstream commit:
+ https://github.com/wojtekka/6tunnel/commit/f800eb1fe5b54ad1022c1bebd2a41a650b86752d
+
+index c33865a..b8d551e 100644
+--- a/6tunnel.c
++++ b/6tunnel.c
+@@ -460,6 +460,7 @@
+ " -d don't detach\n"
+ " -f force tunneling (even if remotehost isn't resolvable)\n"
+ " -h print hex dump of packets\n"
++" -u change UID and GID after bind()\n"
+ " -i act like irc proxy and ask for password\n"
+ " -I send specified password to the irc server\n"
+ " -l bind to specified address\n"