aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2017-05-06 17:51:11 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2017-05-06 17:51:17 +0200
commit6f01709adb0e849c4f4d55786e5e471cbe3878e8 (patch)
tree6344be7c90ed55349cccea9a52090bcfc86c6152 /testing
parent49751a9a67e7bf6df04a474f6734989441148949 (diff)
downloadaports-6f01709adb0e849c4f4d55786e5e471cbe3878e8.tar.bz2
aports-6f01709adb0e849c4f4d55786e5e471cbe3878e8.tar.xz
community/tinc-pre: fix init and move to community
Diffstat (limited to 'testing')
-rw-r--r--testing/tinc-pre/APKBUILD72
-rw-r--r--testing/tinc-pre/tinc-1.1-fix-paths.patch44
-rw-r--r--testing/tinc-pre/tinc-pre.confd20
-rw-r--r--testing/tinc-pre/tinc-pre.initd78
-rw-r--r--testing/tinc-pre/tinc-pre.networks13
5 files changed, 0 insertions, 227 deletions
diff --git a/testing/tinc-pre/APKBUILD b/testing/tinc-pre/APKBUILD
deleted file mode 100644
index 9cc6796d28..0000000000
--- a/testing/tinc-pre/APKBUILD
+++ /dev/null
@@ -1,72 +0,0 @@
-# Contributor: Carlo Landmeter <clandmeter@gmail.com>
-# Maintainer:
-pkgname=tinc-pre
-_realver="1.1pre14"
-pkgver=${_realver/pre/.}
-pkgrel=0
-pkgdesc="Virtual Private Network (VPN) daemon (pre-release)"
-url="http://tinc-vpn.org/"
-arch="all"
-license="GPLv2"
-depends=""
-options="!check"
-makedepends="automake autoconf libtool linux-headers ncurses-dev readline-dev
- zlib-dev lzo-dev libressl-dev texinfo"
-install=""
-subpackages="$pkgname-doc $pkgname-gui::noarch"
-source="$pkgname-$pkgver.tar.gz::https://github.com/gsliepen/tinc/archive/release-$_realver.tar.gz
- tinc-1.1-fix-paths.patch
- $pkgname.initd
- $pkgname.confd
- $pkgname.networks
- "
-builddir="$srcdir/tinc-release-$_realver"
-
-prepare() {
- default_prepare
- autoreconf -vif
-}
-
-build() {
- cd "$builddir"
- ./configure \
- --build=$CBUILD \
- --host=$CHOST \
- --prefix=/usr \
- --sysconfdir=/etc \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info \
- --localstatedir=/var \
- --enable-jumbograms \
- --enable-lzo \
- --enable-zlib \
- --without-systemd \
- --enable-legacy-protocol
- make
-}
-
-package() {
- cd "$builddir"
- make DESTDIR="$pkgdir" install
- install -Dm755 "$srcdir"/$pkgname.initd \
- "$pkgdir"/etc/init.d/tincd
- install -Dm644 "$srcdir"/$pkgname.confd \
- "$pkgdir"/etc/conf.d/tincd
- install -Dm644 "$srcdir"/$pkgname.networks \
- "$pkgdir"/etc/conf.d/tinc-networks
-}
-
-gui() {
- # needs wxpython
- pkgdesc="$pkgdesc (Python GUI)"
- depends="python3"
- mkdir -p "$subpkgdir"/usr/bin
- mv "$pkgdir"/usr/bin/tinc-gui \
- "$subpkgdir"/usr/bin/
-}
-
-sha512sums="c2b95f0a09db08722751601d11a18fd10b970100bf225b8c5afb1dda7a0b4bebb99b4b5372979ce30bce3bebd836587978bf2d86c576f82a447d907c467f0acd tinc-pre-1.1.14.tar.gz
-55bd0e61a1d10a89d879d5113082f0cdb5ff6bf1d1fb3f618c459eb2658836bf602f72fe27ac03ec78746e300a3a5178db053eef6f08d3cb34b11410dbeb05de tinc-1.1-fix-paths.patch
-59811c3e5241d08ebdfbd539556b7cee0dfaab89727ad503512c98f1a696fae143ecdf2682a652c5d71d077ed254ffe2e1c442b1c305c7e7ea94d9af9a1d385e tinc-pre.initd
-f8d9354af5ebc07420ced98059262751bffef434b61c6333964338f327e2ac01ae676e375954efa794a1bccf8b939c78387b9fb7261f675f1237b0d946b529c9 tinc-pre.confd
-f7cb459c170898e51176bd92c642335386db90b7bca2abb3f6eb2514546efbd74e5fd2c8845060111dd48a0dd2cc1890717a03315c9b86185047c259cdc27135 tinc-pre.networks"
diff --git a/testing/tinc-pre/tinc-1.1-fix-paths.patch b/testing/tinc-pre/tinc-1.1-fix-paths.patch
deleted file mode 100644
index 519677dd50..0000000000
--- a/testing/tinc-pre/tinc-1.1-fix-paths.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -Naur tinc-1.1pre14.orig/src/names.c tinc-1.1pre14/src/names.c
---- tinc-1.1pre14.orig/src/names.c 2016-04-17 12:08:41.000000000 -0400
-+++ tinc-1.1pre14/src/names.c 2016-10-15 07:37:51.147064396 -0400
-@@ -86,36 +86,11 @@
- if(!pidfilename)
- xasprintf(&pidfilename, "%s" SLASH "pid", confbase);
- #else
-- bool fallback = false;
-- if(daemon) {
-- if(access(LOCALSTATEDIR, R_OK | W_OK | X_OK))
-- fallback = true;
-- } else {
-- char fname[PATH_MAX];
-- snprintf(fname, sizeof fname, LOCALSTATEDIR SLASH "run" SLASH "%s.pid", identname);
-- if(access(fname, R_OK)) {
-- snprintf(fname, sizeof fname, "%s" SLASH "pid", confbase);
-- if(!access(fname, R_OK))
-- fallback = true;
-- }
-- }
-+ if(!logfilename)
-+ xasprintf(&logfilename, "/var/log" SLASH "%s.log", identname);
-
-- if(!fallback) {
-- if(!logfilename)
-- xasprintf(&logfilename, LOCALSTATEDIR SLASH "log" SLASH "%s.log", identname);
--
-- if(!pidfilename)
-- xasprintf(&pidfilename, LOCALSTATEDIR SLASH "run" SLASH "%s.pid", identname);
-- } else {
-- if(!logfilename)
-- xasprintf(&logfilename, "%s" SLASH "log", confbase);
--
-- if(!pidfilename) {
-- if(daemon)
-- logger(DEBUG_ALWAYS, LOG_WARNING, "Could not access " LOCALSTATEDIR SLASH " (%s), storing pid and socket files in %s" SLASH, strerror(errno), confbase);
-- xasprintf(&pidfilename, "%s" SLASH "pid", confbase);
-- }
-- }
-+ if(!pidfilename)
-+ xasprintf(&pidfilename, "/run" SLASH "%s.pid", identname);
- #endif
-
- if(!unixsocketname) {
diff --git a/testing/tinc-pre/tinc-pre.confd b/testing/tinc-pre/tinc-pre.confd
deleted file mode 100644
index cedca60c42..0000000000
--- a/testing/tinc-pre/tinc-pre.confd
+++ /dev/null
@@ -1,20 +0,0 @@
-#rc_need="net.net"
-
-#If you want tincd to log to syslog, then set this to "yes"
-#Anything else and tincd will log to /var/log/tinc.NETNAME.log.
-SYSLOG="yes"
-
-#Set debug level, useful for error probe
-# 0 Quiet mode, only show starting/stopping of the daemon
-# 1 Show (dis)connects of other tinc daemons via TCP
-# 2 Show error messages received from other hosts
-# 2 Show status messages received from other hosts
-# 3 Show the requests that are sent/received
-# 4 Show contents of every request that is sent/received
-# 5 Show network traffic information
-# 6 Show contents of each packet that is being sent/received
-# 10 You have been warned
-DEBUG_LEVEL="0"
-
-#Extra Options, if you want addtional customization
-EXTRA_OPTS=""
diff --git a/testing/tinc-pre/tinc-pre.initd b/testing/tinc-pre/tinc-pre.initd
deleted file mode 100644
index 55728bec2c..0000000000
--- a/testing/tinc-pre/tinc-pre.initd
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_started_commands="reload"
-
-NETS="/etc/conf.d/tinc.networks"
-DAEMON="/usr/sbin/tincd"
-
-depend() {
- use logger dns
- need net
-}
-
-checkconfig() {
- if [ "${RC_SVCNAME}" = "tincd" ] ; then
- ALL_NETNAME="$(awk '/^ *NETWORK:/ { print $2 }' "${NETS}")"
- else
- ALL_NETNAME="${RC_SVCNAME#*.}"
- fi
- # warn this if still not found
- if [ -z "${ALL_NETNAME}" ] ; then
- eerror "No VPN networks configured in ${NETS}"
- return 1
- fi
- return 0
-}
-
-start() {
- ebegin "Starting tinc VPN networks"
- checkconfig || return 1
- for NETNAME in ${ALL_NETNAME}
- do
- CONFIG="/etc/tinc/${NETNAME}/tinc.conf"
- PIDFILE="/run/tinc.${NETNAME}.pid"
- if [ ! -f "${CONFIG}" ]; then
- eerror "Cannot start network ${NETNAME}."
- eerror "Please set up ${CONFIG} !"
- else
- ebegin "Starting tinc network ${NETNAME}"
- if [ "${SYSLOG}" = "yes" ]; then
- LOG=""
- else
- LOG="--logfile=/var/log/tinc.${NETNAME}.log"
- fi
- start-stop-daemon --start --exec "${DAEMON}" --pidfile "${PIDFILE}" -- --net="${NETNAME}" ${LOG} --pidfile "${PIDFILE}" --debug="${DEBUG_LEVEL}" ${EXTRA_OPTS}
- eend $?
- fi
- done
-}
-
-stop() {
- ebegin "Stopping tinc VPN networks"
- checkconfig || return 1
- for NETNAME in ${ALL_NETNAME}
- do
- PIDFILE="/run/tinc.${NETNAME}.pid"
- if [ -f "${PIDFILE}" ]; then
- ebegin "Stopping tinc network ${NETNAME}"
- start-stop-daemon --stop --pidfile "${PIDFILE}"
- eend $?
- fi
- done
-}
-
-reload() {
- ebegin "Reloading configuration for tinc VPN networks"
- checkconfig || return 1
- for NETNAME in ${ALL_NETNAME}
- do
- PIDFILE="/run/tinc.${NETNAME}.pid"
- if [ -f "${PIDFILE}" ]; then
- ebegin "Reloading tinc network ${NETNAME}"
- start-stop-daemon --signal HUP --pidfile ${PIDFILE}
- eend $?
- fi
- done
-}
diff --git a/testing/tinc-pre/tinc-pre.networks b/testing/tinc-pre/tinc-pre.networks
deleted file mode 100644
index e1844ce2ba..0000000000
--- a/testing/tinc-pre/tinc-pre.networks
+++ /dev/null
@@ -1,13 +0,0 @@
-# file: /etc/conf.d/tinc.networks for /etc/init.d/tincd
-
-# In this file you define the tinc networks you want to connect to
-
-# USAGE:
-# you add a network to the init script by defining:
-# NETWORK: your_network_name
-#
-# if you want to connect to multiple VPN's just set them behind each other. e.g.
-# NETWORK: foo
-# NETWORK: bar
-#
-# this would join the network foo and the network bar.