summaryrefslogtreecommitdiff
path: root/net-vpn/aiccu
diff options
context:
space:
mode:
Diffstat (limited to 'net-vpn/aiccu')
-rw-r--r--net-vpn/aiccu/Manifest9
-rw-r--r--net-vpn/aiccu/aiccu-2007.01.15-r5.ebuild58
-rw-r--r--net-vpn/aiccu/files/aiccu-2007.01.15-Makefile.patch79
-rw-r--r--net-vpn/aiccu/files/aiccu-2007.01.15-gnutls-3.4.patch22
-rw-r--r--net-vpn/aiccu/files/aiccu-2007.01.15-r2-init.gentoo.patch33
-rw-r--r--net-vpn/aiccu/files/aiccu-2007.01.15-setupscript.patch17
-rw-r--r--net-vpn/aiccu/files/aiccu-2007.01.15-systemd.patch52
-rw-r--r--net-vpn/aiccu/files/aiccu-2007.01.15-uclibc.patch29
-rw-r--r--net-vpn/aiccu/metadata.xml8
9 files changed, 307 insertions, 0 deletions
diff --git a/net-vpn/aiccu/Manifest b/net-vpn/aiccu/Manifest
new file mode 100644
index 000000000000..76b663870737
--- /dev/null
+++ b/net-vpn/aiccu/Manifest
@@ -0,0 +1,9 @@
+AUX aiccu-2007.01.15-Makefile.patch 2128 SHA256 8e282eb8004da15927cb4811e3a3c007cbfb39fab15483b5b918f78e0cfbfcd6 SHA512 bafc7d397edcfc24138fc32137dc0ee6eb2afedd5e14656e3b769ff50790619a421b5dc3860c316e4c2150890154ded1149eaa5e23734dd0e2471464ff032544 WHIRLPOOL ec96c82ef7b2058a82fe4ec2c2a0217a5bd9447eb6b392b9b77db6d9527b393cff2b6892f34d6645728d181cc754dfb66ba27ab687843c82d9cca315e0acfa48
+AUX aiccu-2007.01.15-gnutls-3.4.patch 927 SHA256 23831ea1971f51eafe57b87590a7dfdb75c380d8dcc8103ebc6f2f82c4942a15 SHA512 43d875eab0d4d4a6133b1a37a76098f58c4601c0235614806c5a9bfae88c6f3a52a32815ea83b1ec1d55c8ae3e18c5348ff16f73567aaed6bee081944783636c WHIRLPOOL b39a22dff8f78a14af54e011f3bc553f44a399012350fa267c9c7aec527bba39f89646308935c56bc727bc94db881eb457357eb948d838de9f875a5e18eb766f
+AUX aiccu-2007.01.15-r2-init.gentoo.patch 677 SHA256 80f1503eb963484ffc8c7dd5a4ef132721439695f5fef77eed0220edc1927a47 SHA512 06ca8ca7d860fddf3c1f30eecbfcb7fb8b2e62b66ea3fbdba25af16b03fd91d47c26c54f9b5589c1e91b3a2dc7efeeb457b98db7dde85484402f6c24db0e2570 WHIRLPOOL 1a039cfdc006023ff48f6d37833c37a73bee1ca86fbbdabe079454b1c205064e3c9bd8dfccae246e7db5b161dbf93a5a1810f42b6caa889f4668f9321bd9447c
+AUX aiccu-2007.01.15-setupscript.patch 414 SHA256 f1bcc87aac41d1c9bbb667c3a26097bf8939279f983245a76c1f7224a1f5c675 SHA512 6170c9c52516d58ea68f2acd61c78379f21a1810a9c19867c57249547aa07ca35b1281ae4dea905ac4600d2b2643b3a1c7050e3adbad963efb3554688dc4ac0a WHIRLPOOL f6257d70de47c9003da2fc9afa7367d770f9b1a9793aca6c847b238acf6f353d6f18a35ec9611dd0db9fbc4eae59c340ad0d1aecd95a45bdff278e61d3eac55b
+AUX aiccu-2007.01.15-systemd.patch 1365 SHA256 d3e7b47aa9b2ebc69966a5bd70dc11f3afb84c1c67c8cb53e2b217452836a52c SHA512 3caf0282aa6e8731b0c0ad7cbb6e2975a7588a6e7df9d0346d0e602e8777d9eddeefc481ae0b9e236b780c6fdd7f434a679bd45303ea0aaa6754f2891e0d7bff WHIRLPOOL 79aab0ed7e52f67a74b00b90343670cf5c1ebcf6b69b02f1672edb056043918988e9961744dcffef1f8f525ec110f401a7b6f94995905753dc4a5c66dd8348db
+AUX aiccu-2007.01.15-uclibc.patch 790 SHA256 221f6ca988595ab183eeb09cd50ae2cec2f7c5eaf6aad9a8b1a781aabfdb092b SHA512 fe2382db103f1cda397dfdd02b97e44e1b54b256d87a81fc04e46b999ed5692a077f15a974414f7cbddf6e22c5ba975da0d0fa96e5de516c3741d9121deafca6 WHIRLPOOL cd6fb97e889cc02940146aaf55d7235b916ea63e38ed73a0fc8a1812bd46682078dac64f52452e7d95a47565736fcc6af0e4ff7b500f3fc9d3bd9da26554b27b
+DIST aiccu_20070115.tar.gz 70056 SHA256 2260f426c13471169ccff8cb4a3908dc5f79fda18ddb6a55363e7824e6c4c760 SHA512 15b2f0dab51843e58abbd8a0cc13139e492057ee348e368e1b65476bb2760119e88982cd03ffc6ec2cb563a1b7a061e1f66a98861eaad15972d486ac17b7bc78 WHIRLPOOL a5743e9c28ec3b9f6bc43f1b715553842a13872f18281239ed76d3b322e3a4c3c3e0f0c5d80b47694bbedaf831d1b3feed285af9f37174cac323b2c1814813d7
+EBUILD aiccu-2007.01.15-r5.ebuild 1285 SHA256 c590435a55c7f37382b3c4a394dd2c7c6394a9bf216e89f73468103d9ca4ca07 SHA512 8f1fb3e0eb1b21aeff4092493fadaf64ff9a54a22736e5b5a116650bc074a25b2921d940a39eec13903a92ffe74054fefa303da5a2399a74f81c3e5f9a33d73e WHIRLPOOL 20345110cb214ab714008eccc4633859baa1d7d04472638100dd9f0aa29aa379bd8259d0412d488ca6b9b83d68064ab7ad3d7061ebd3b82f4af9ca6782049834
+MISC metadata.xml 237 SHA256 ffb571839c57797d282263369646d2bba2662601a45f7bb3251bb97f716554a6 SHA512 ae2360aa6b1b00c67e0acea4935c02b64585b9a15e126fec9d5d99637021c542c0a495e5116205f3da287def46fa5b19cb1a7f3042c12c5f7a78d66d92fcb03f WHIRLPOOL 60d6da846c983457e038ea5ba3c0bf48f939c9586610985a14cac9772fd1d45d781a643abc16482f232f3028e44fe99fe1a382deaebf6589602fc244a4460e3f
diff --git a/net-vpn/aiccu/aiccu-2007.01.15-r5.ebuild b/net-vpn/aiccu/aiccu-2007.01.15-r5.ebuild
new file mode 100644
index 000000000000..2887d7a02020
--- /dev/null
+++ b/net-vpn/aiccu/aiccu-2007.01.15-r5.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils linux-info systemd toolchain-funcs
+
+DESCRIPTION="AICCU Client to configure an IPv6 tunnel to SixXS"
+HOMEPAGE="https://www.sixxs.net/tools/aiccu"
+SRC_URI="https://www.sixxs.net/archive/sixxs/aiccu/unix/aiccu_${PV//\./}.tar.gz"
+
+LICENSE="SixXS"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc sparc x86"
+IUSE="systemd"
+
+RDEPEND="
+ net-libs/gnutls
+ sys-apps/iproute2
+ systemd? ( sys-apps/systemd )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+S=${WORKDIR}/${PN}
+
+CONFIG_CHECK="~TUN"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-r2-init.gentoo.patch \
+ "${FILESDIR}"/${P}-Makefile.patch \
+ "${FILESDIR}"/${P}-setupscript.patch \
+ "${FILESDIR}"/${P}-uclibc.patch \
+ "${FILESDIR}"/${P}-systemd.patch \
+ "${FILESDIR}"/${P}-gnutls-3.4.patch
+}
+
+src_compile() {
+ # Don't use main Makefile since it requires additional
+ # dependencies which are useless for us.
+ emake CC=$(tc-getCC) STRIP= -C unix-console \
+ HAVE_SYSTEMD=$(usex systemd 1 0)
+}
+
+src_install() {
+ dosbin unix-console/${PN}
+
+ insopts -m 600
+ insinto /etc
+ doins doc/${PN}.conf
+ newinitd doc/${PN}.init.gentoo ${PN}
+
+ use systemd && systemd_dounit doc/${PN}.service
+
+ dodoc doc/{HOWTO,README,changelog}
+}
diff --git a/net-vpn/aiccu/files/aiccu-2007.01.15-Makefile.patch b/net-vpn/aiccu/files/aiccu-2007.01.15-Makefile.patch
new file mode 100644
index 000000000000..c0eabbefd906
--- /dev/null
+++ b/net-vpn/aiccu/files/aiccu-2007.01.15-Makefile.patch
@@ -0,0 +1,79 @@
+--- unix-console/Makefile.old 2010-06-28 21:56:32.287782600 +0200
++++ unix-console/Makefile 2010-06-28 22:15:56.232637681 +0200
+@@ -25,14 +25,11 @@ CWARNS += -W -Wall -Wshadow -Wpointer-ar
+ # CWARNS += -Wpacked
+
+ #CFLAGS += $(CWARNS) -D_GNU_SOURCE -D_DEBUG -g3 -O0
+-CFLAGS += $(CWARNS) -D_GNU_SOURCE
++CFLAGS ?= $(CWARNS) -O3
++CFLAGS += -D_GNU_SOURCE
+ CC = @gcc
+ RM = rm
+-
+-# Add -O3 when nothing is specified yet
+-ifeq ($(shell echo $(CFLAGS) | grep -c "\-O"),0)
+-CFLAGS += -O3
+-endif
++STRIP = strip
+
+ # This is a console client
+ CFLAGS += -D AICCU_CONSOLE
+@@ -42,7 +39,7 @@ CFLAGS += -D AICCU_CONSOLE
+ # Currently defaultly builds only on Linux, but other platforms might easily also support it
+ ifeq ($(shell uname | grep -c "Linux"),1)
+ CFLAGS += -D AICCU_GNUTLS
+-LDFLAGS += -lgnutls
++LIBS += -lgnutls
+ endif
+
+ # Linux
+@@ -50,7 +47,7 @@ ifeq ($(shell uname | grep -c "Linux"),1
+ CFLAGS += -D_LINUX -D HAS_IFHEAD -D AICCU_TYPE="\"linux\""
+ SRCS += ../common/aiccu_linux.c
+ OBJS += ../common/aiccu_linux.o
+-LDFLAGS += -lpthread -lresolv
++LIBS += -lpthread -lresolv
+ endif
+
+ # FreeBSD
+@@ -118,7 +115,7 @@ ifeq ($(shell uname | grep -c "Darwin"),
+ CFLAGS += -D_DARWIN -D NEED_IFHEAD -D AICCU_TYPE="\"darwin\""
+ SRCS += ../common/aiccu_darwin.c
+ OBJS += ../common/aiccu_darwin.o
+-LDFLAGS += -lresolv
++LIBS += -lresolv
+ endif
+
+ # SunOS / Solaris
+@@ -126,7 +123,7 @@ ifeq ($(shell uname | grep -c "SunOS"),1
+ CFLAGS += -D_SUNOS -D AICCU_TYPE="\"sunos\""
+ SRCS += ../common/aiccu_sunos.c
+ OBJS += ../common/aiccu_sunos.o
+-LDFLAGS += -lsocket -lnsl -lresolv
++LIBS += -lsocket -lnsl -lresolv
+ endif
+
+ # AIX
+@@ -137,17 +134,19 @@ CFLAGS += -D AICCU_CONSOLE
+ CFLAGS += -D_AIX -D AICCU_TYPE="\"aix\""
+ SRCS += ../common/aiccu_aix.c
+ OBJS += ../common/aiccu_aix.o
+-LDFLAGS += -lpthread
++LIBS += -lpthread
+ endif
+
+
+ all: aiccu
+
+ aiccu: $(OBJS) ${SRCS} ${INCS}
+- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+ ifeq ($(shell echo $(CFLAGS) | grep -c "DEBUG"),0)
+ ifeq ($(shell echo "$(RPM_OPT_FLAGS)" | wc -c),1)
+- strip $@
++ifdef STRIP
++ $(STRIP) $@
++endif
+ endif
+ endif
+
diff --git a/net-vpn/aiccu/files/aiccu-2007.01.15-gnutls-3.4.patch b/net-vpn/aiccu/files/aiccu-2007.01.15-gnutls-3.4.patch
new file mode 100644
index 000000000000..ee637a761029
--- /dev/null
+++ b/net-vpn/aiccu/files/aiccu-2007.01.15-gnutls-3.4.patch
@@ -0,0 +1,22 @@
+from http://git.alpinelinux.org/cgit/aports/tree/main/aiccu
+
+--- aiccu/common/common.c 2015-04-17 23:08:32.543680010 +0200
++++ aiccu/common/common.c.new 2015-04-17 23:14:02.152457972 +0200
+@@ -272,7 +272,6 @@
+ {
+ #ifdef AICCU_GNUTLS
+ /* Allow connections to servers that have OpenPGP keys as well */
+- const int cert_type_priority[3] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 };
+ int ret;
+ #endif /* AICCU_GNUTLS*/
+
+@@ -300,8 +299,7 @@
+ gnutls_set_default_priority(sock->session);
+ /* XXX: Return value is not documented in GNUTLS documentation! */
+
+- gnutls_certificate_type_set_priority(sock->session, cert_type_priority);
+- /* XXX: Return value is not documented in GNUTLS documentation! */
++ gnutls_priority_set_direct(sock->session, "NORMAL:+CTYPE-OPENPGP", NULL);
+
+ /* Configure the x509 credentials for the current session */
+ gnutls_credentials_set(sock->session, GNUTLS_CRD_CERTIFICATE, g_aiccu->tls_cred);
diff --git a/net-vpn/aiccu/files/aiccu-2007.01.15-r2-init.gentoo.patch b/net-vpn/aiccu/files/aiccu-2007.01.15-r2-init.gentoo.patch
new file mode 100644
index 000000000000..35ca2b8a6719
--- /dev/null
+++ b/net-vpn/aiccu/files/aiccu-2007.01.15-r2-init.gentoo.patch
@@ -0,0 +1,33 @@
+--- aiccu/doc/aiccu.init.gentoo
++++ aiccu/doc/aiccu.init.gentoo
+@@ -2,7 +2,7 @@
+
+ depend() {
+ need net
+- after ntp-client
++ after ntp-client ntpd
+ }
+
+ checkconfig() {
+@@ -23,14 +23,19 @@
+ start() {
+ checkconfig || return 1
+ ebegin "Starting aiccu"
+- start-stop-daemon --start --oknodo --quiet --exec /usr/sbin/aiccu -- start
++ start-stop-daemon --start --quiet --exec /usr/sbin/aiccu -- start
+ eend $?
+ }
+
+
+ stop() {
+ ebegin "Stopping aiccu"
+- start-stop-daemon --stop --oknodo --quiet --exec /usr/sbin/aiccu -- stop
++ start-stop-daemon --stop --pidfile /var/run/aiccu.pid --quiet --exec /usr/sbin/aiccu -- stop
+ eend $?
+ }
+
++restart() {
++ stop
++ sleep 3
++ start
++}
diff --git a/net-vpn/aiccu/files/aiccu-2007.01.15-setupscript.patch b/net-vpn/aiccu/files/aiccu-2007.01.15-setupscript.patch
new file mode 100644
index 000000000000..8981530435f3
--- /dev/null
+++ b/net-vpn/aiccu/files/aiccu-2007.01.15-setupscript.patch
@@ -0,0 +1,17 @@
+--- aiccu/unix-console/main.c
++++ aiccu/unix-console/main.c
+@@ -471,6 +471,14 @@
+ */
+ if (aiccu_setup(hTunnel, true))
+ {
++
++ /* Running setup script */
++ if (g_aiccu->setupscript)
++ {
++ aiccu_exec("%s", g_aiccu->setupscript);
++ }
++
++
+ /* We need to stay running when doing Heartbeat or AYIYA */
+ if ( strcasecmp(hTunnel->sType, "6in4-heartbeat") == 0 ||
+ strcasecmp(hTunnel->sType, "ayiya") == 0)
diff --git a/net-vpn/aiccu/files/aiccu-2007.01.15-systemd.patch b/net-vpn/aiccu/files/aiccu-2007.01.15-systemd.patch
new file mode 100644
index 000000000000..e8616d04b3fc
--- /dev/null
+++ b/net-vpn/aiccu/files/aiccu-2007.01.15-systemd.patch
@@ -0,0 +1,52 @@
+--- /dev/null
++++ aiccu-2007.01.15/doc/aiccu.service
+@@ -0,0 +1,13 @@
++[Unit]
++Description=Automatic IPv6 Connectivity Client Utility
++After=time-sync.target network.target
++ConditionPathExists=/etc/aiccu.conf
++
++
++[Service]
++Type=notify
++ExecStart=/usr/sbin/aiccu start
++ExecStop=/usr/sbin/aiccu stop
++
++[Install]
++WantedBy=multi-user.target
+--- aiccu-2007.01.15/unix-console/Makefile
++++ aiccu-2007.01.15/unix-console/Makefile
+@@ -48,6 +48,10 @@ ifeq ($(shell uname | grep -c "Linux"),1)
+ SRCS += ../common/aiccu_linux.c
+ OBJS += ../common/aiccu_linux.o
+ LIBS += -lpthread -lresolv
++ifeq (1,$(HAVE_SYSTEMD))
++LIBS += $(shell pkg-config --libs libsystemd 2>/dev/null || pkg-config --libs libsystemd-daemon)
++CFLAGS += -DHAVE_SYSTEMD
++endif
+ endif
+
+ # FreeBSD
+--- aiccu-2007.01.15/unix-console/main.c
++++ aiccu-2007.01.15/unix-console/main.c
+@@ -12,6 +12,9 @@
+
+ #include "../common/aiccu.h"
+ #include "../common/tun.h"
++#ifdef HAVE_SYSTEMD
++#include <systemd/sd-daemon.h>
++#endif
+
+ #ifndef _WIN32
+ /* Enable/Disable heartbeating */
+@@ -478,6 +481,10 @@ int main(int argc, char *argv[])
+ aiccu_exec("%s", g_aiccu->setupscript);
+ }
+
++#ifdef HAVE_SYSTEMD
++ /* Tell systemd we are operational. */
++ sd_notify(0, "READY=1");
++#endif
+
+ /* We need to stay running when doing Heartbeat or AYIYA */
+ if ( strcasecmp(hTunnel->sType, "6in4-heartbeat") == 0 ||
diff --git a/net-vpn/aiccu/files/aiccu-2007.01.15-uclibc.patch b/net-vpn/aiccu/files/aiccu-2007.01.15-uclibc.patch
new file mode 100644
index 000000000000..56341dea72f4
--- /dev/null
+++ b/net-vpn/aiccu/files/aiccu-2007.01.15-uclibc.patch
@@ -0,0 +1,29 @@
+--- aiccu/common/resolver.c
++++ aiccu/common/resolver.c
+@@ -26,7 +26,7 @@
+
+ int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int type, const char *record))
+ {
+-#ifdef _LINUX
++#if defined(_LINUX) && ! defined(__UCLIBC__)
+ struct __res_state res;
+ #endif
+ unsigned char answer[8192];
+@@ -38,7 +38,7 @@
+ uint16_t type = 0, class = 0;
+ uint32_t ttl = 0;
+
+-#ifdef _LINUX
++#if defined(_LINUX) && ! defined(__UCLIBC__)
+ memset(&res, 0, sizeof(res));
+ res.options = RES_DEBUG;
+ res_ninit(&res);
+@@ -47,7 +47,7 @@
+ #endif
+
+ memset(answer, 0, sizeof(answer));
+-#ifdef _LINUX
++#if defined(_LINUX) && ! defined(__UCLIBC__)
+ ret = res_nquery(&res, label, C_IN, rrtype, answer, sizeof(answer));
+ #else
+ ret = res_query(label, C_IN, rrtype, answer, sizeof(answer));
diff --git a/net-vpn/aiccu/metadata.xml b/net-vpn/aiccu/metadata.xml
new file mode 100644
index 000000000000..a535b8852829
--- /dev/null
+++ b/net-vpn/aiccu/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>