diff options
author | root <root@rshg054.dnsready.net> | 2013-07-19 01:10:32 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-07-19 01:10:32 -0700 |
commit | 8fbc0076a4827ddc6af92e0b9daa4c4c31450808 (patch) | |
tree | 03fd0e2921ebd53228d9a93e32ed3976b636cbea /community/aiccu | |
parent | e445a313723389ba9ee1fded025c567dae5b21ea (diff) |
Fri Jul 19 01:09:18 PDT 2013
Diffstat (limited to 'community/aiccu')
-rw-r--r-- | community/aiccu/02-allow-tunnels.patch | 61 | ||||
-rw-r--r-- | community/aiccu/03-no-quiet-gcc.patch | 16 | ||||
-rw-r--r-- | community/aiccu/04-skip-strip.patch | 16 | ||||
-rw-r--r-- | community/aiccu/05-spelling-error.patch | 46 | ||||
-rw-r--r-- | community/aiccu/06-setup-script.patch | 40 | ||||
-rw-r--r-- | community/aiccu/PKGBUILD | 52 | ||||
-rw-r--r-- | community/aiccu/aiccu.service | 12 |
7 files changed, 243 insertions, 0 deletions
diff --git a/community/aiccu/02-allow-tunnels.patch b/community/aiccu/02-allow-tunnels.patch new file mode 100644 index 000000000..ec1c1dade --- /dev/null +++ b/community/aiccu/02-allow-tunnels.patch @@ -0,0 +1,61 @@ +commit d7c4f7c0d34b80c188fa45228ca282fd8771a41d +Author: Norman Rasmussen <norman@rasmussen.co.za> +Date: Sun Jan 10 21:45:55 2010 +0000 + + Allow 'tunnels' mode when there's an already running instance. + +diff --git a/unix-console/main.c b/unix-console/main.c +index 8a4d9a9..388d988 100755 +--- a/unix-console/main.c ++++ b/unix-console/main.c +@@ -50,7 +50,7 @@ int sigrunning(int sig) + /* Close the file again */ + fclose(f); + +- /* If we can HUP it, it still runs */ ++ /* If we can signal it, it still runs */ + return (pid > 0 && kill(pid, sig) == 0 ? 1 : 0); + } + +@@ -302,20 +302,6 @@ int main(int argc, char *argv[]) + return -1; + } + +-#ifndef _WIN32 +- /* start or stop? */ +- if ( mode != A_TEST && +- mode != A_AUTOTEST) +- { +- /* Already running? */ +- if (sigrunning(mode == A_STOP ? SIGTERM : 0) == 1) +- { +- dolog(LOG_ERR, "Already running instance HUP'ed, exiting\n"); +- return 0; +- } +- } +-#endif +- + /* Verify required parameters */ + if (!g_aiccu->username || !g_aiccu->password) + { +@@ -331,6 +317,20 @@ int main(int argc, char *argv[]) + return ret == 0 ? -1 : 0; + } + ++#ifndef _WIN32 ++ /* start or stop? */ ++ if ( mode != A_TEST && ++ mode != A_AUTOTEST) ++ { ++ /* Already running? */ ++ if (sigrunning(mode == A_STOP ? SIGTERM : 0) == 1) ++ { ++ dolog(LOG_ERR, "Already running instance signaled, exiting\n"); ++ return 0; ++ } ++ } ++#endif ++ + /* Get our tunnel */ + hTunnel = get_tunnel(); + diff --git a/community/aiccu/03-no-quiet-gcc.patch b/community/aiccu/03-no-quiet-gcc.patch new file mode 100644 index 000000000..27d14addf --- /dev/null +++ b/community/aiccu/03-no-quiet-gcc.patch @@ -0,0 +1,16 @@ +It's better for us to see gcc output in the build log to ease debugging. +Quiet builds make that much harder. + +Index: aiccu-20070115/unix-console/Makefile +=================================================================== +--- aiccu-20070115.orig/unix-console/Makefile 2009-10-25 22:33:06.000000000 +0100 ++++ aiccu-20070115/unix-console/Makefile 2009-10-25 22:33:12.000000000 +0100 +@@ -26,7 +26,7 @@ + + #CFLAGS += $(CWARNS) -D_GNU_SOURCE -D_DEBUG -g3 -O0 + CFLAGS += $(CWARNS) -D_GNU_SOURCE +-CC = @gcc ++CC = gcc + RM = rm + + # Add -O3 when nothing is specified yet diff --git a/community/aiccu/04-skip-strip.patch b/community/aiccu/04-skip-strip.patch new file mode 100644 index 000000000..6249a0fe5 --- /dev/null +++ b/community/aiccu/04-skip-strip.patch @@ -0,0 +1,16 @@ +Index: aiccu-20070115/unix-console/Makefile +=================================================================== +--- aiccu-20070115.orig/unix-console/Makefile 2009-10-25 22:31:57.000000000 +0100 ++++ aiccu-20070115/unix-console/Makefile 2009-10-25 22:32:04.000000000 +0100 +@@ -145,11 +145,6 @@ + + aiccu: $(OBJS) ${SRCS} ${INCS} + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) +-ifeq ($(shell echo $(CFLAGS) | grep -c "DEBUG"),0) +-ifeq ($(shell echo "$(RPM_OPT_FLAGS)" | wc -c),1) +- strip $@ +-endif +-endif + + clean: + $(RM) -f $(OBJS) aiccu diff --git a/community/aiccu/05-spelling-error.patch b/community/aiccu/05-spelling-error.patch new file mode 100644 index 000000000..832dbf9ce --- /dev/null +++ b/community/aiccu/05-spelling-error.patch @@ -0,0 +1,46 @@ +Fix some spelling errors to satisfy lintian + +--- aiccu.orig/common/aiccu_test.c ++++ aiccu/common/aiccu_test.c +@@ -133,7 +133,7 @@ + printf("### This confirms the reachability of the other side of the tunnel\n"); + printf("### If it doesn't reply then check your interface and routing tables\n"); + printf("### Don't forget to check your firewall of course\n"); +- printf("### If the previous test was succesful then this could be both\n"); ++ printf("### If the previous test was successful then this could be both\n"); + printf("### a firewalling and a routing/interface problem\n"); + printf("\n"); + system_arg(PING6, PINGCOUNT, hTunnel->sIPv6_POP); +--- aiccu.orig/common/common.c ++++ aiccu/common/common.c +@@ -484,7 +484,7 @@ + return false; + } + +- dolog(LOG_DEBUG, "TLS Handshake completed succesfully\n"); ++ dolog(LOG_DEBUG, "TLS Handshake completed successfully\n"); + + sock->tls_active = true; + return true; +--- aiccu.orig/common/tic.c ++++ aiccu/common/tic.c +@@ -517,8 +517,8 @@ + struct in6_addr ipv6_ll, ipv6_local; + char ll[100]; + +- /* Log that the fetch was succesful */ +- dolog(LOG_INFO, "Succesfully retrieved tunnel information for %s\n", sId); ++ /* Log that the fetch was successful */ ++ dolog(LOG_INFO, "Successfully retrieved tunnel information for %s\n", sId); + + /* + * Some TUN/TAP devices don't have any +@@ -652,7 +652,7 @@ + /* All went okay? */ + if (buf[0] == '2' && buf[1] == '0' && buf[2] == '2') + { +- dolog(LOG_INFO, "Succesfully retrieved POP information for %s\n", sId); ++ dolog(LOG_INFO, "Successfully retrieved POP information for %s\n", sId); + return pop; + } + diff --git a/community/aiccu/06-setup-script.patch b/community/aiccu/06-setup-script.patch new file mode 100644 index 000000000..26010f809 --- /dev/null +++ b/community/aiccu/06-setup-script.patch @@ -0,0 +1,40 @@ +Author: Norman Rasmussen <norman@rasmussen.co.za> + + Make setupscript work and add teardownscript setting. + +--- aiccu.orig/common/aiccu.c ++++ aiccu/common/aiccu.c +@@ -212,9 +212,6 @@ + fprintf(f, "# Try to automatically login and setup the tunnel?\n"); + fprintf(f, "automatic %s\n", g_aiccu->automatic ? "true" : "false"); + fprintf(f, "\n"); +- fprintf(f, "# Script to run after setting up the interfaces (default: none)\n"); +- fprintf(f, "%ssetupscript %s\n", g_aiccu->setupscript ? "" : "#", g_aiccu->setupscript ? g_aiccu->setupscript : "<path>"); +- fprintf(f, "\n"); + fprintf(f, "# TLS Required?\n"); + fprintf(f, "requiretls %s\n", g_aiccu->requiretls ? "true" : "false"); + fprintf(f, "\n"); +@@ -231,6 +228,9 @@ + fprintf(f, "# PID File\n"); + fprintf(f, "pidfile %s\n", g_aiccu->pidfile); + fprintf(f, "\n"); ++ fprintf(f, "# Script to run after setting up the interfaces (default: none)\n"); ++ fprintf(f, "%ssetupscript %s\n", g_aiccu->setupscript ? "" : "#", g_aiccu->setupscript ? g_aiccu->setupscript : "<path>"); ++ fprintf(f, "\n"); + fprintf(f, "# Make heartbeats (default true)\n"); + fprintf(f, "# In general you don't want to turn this off\n"); + fprintf(f, "# Of course only applies to AYIYA and heartbeat tunnels not to static ones\n"); +--- aiccu.orig/unix-console/main.c ++++ aiccu/unix-console/main.c +@@ -471,6 +471,11 @@ + */ + if (aiccu_setup(hTunnel, true)) + { ++ 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/community/aiccu/PKGBUILD b/community/aiccu/PKGBUILD new file mode 100644 index 000000000..989bd574f --- /dev/null +++ b/community/aiccu/PKGBUILD @@ -0,0 +1,52 @@ +# $Id: PKGBUILD 92564 2013-06-08 18:07:25Z seblu $ +# Maintainer: Sébastien Luttringer + +pkgname=aiccu +pkgver=20070115 +pkgrel=4 +pkgdesc='SixXS Automatic IPv6 Connectivity Client Utility' +arch=('i686' 'x86_64') +url='http://www.sixxs.net/tools/aiccu/' +license=('custom') +depends=('gnutls' 'iproute2') +backup=('etc/aiccu.conf') +source=("http://www.sixxs.net/archive/sixxs/aiccu/unix/${pkgname}_${pkgver}.tar.gz" + 'aiccu.service' + '02-allow-tunnels.patch' + '03-no-quiet-gcc.patch' + '04-skip-strip.patch' + '05-spelling-error.patch' + '06-setup-script.patch') +md5sums=('c9bcc83644ed788e22a7c3f3d4021350' + '891b0fa527c1b847ce803dac047cf80d' + 'b9b2c0e7186f3f96366caaa39252dccc' + 'b38db1d95760cd9687330b7db5f4ea1d' + '6dfa2df27bb4859c7511bfea91337925' + '21a37c376ebfcf787c0e7ee8552053ac' + '98e73756609f4e09c45c4e5139fd5aed') + +prepare() { + cd $pkgname + for _p in "$srcdir"/*.patch; do + patch -p1 -i "$_p" + done +} + +build() { + cd $pkgname + [[ $LDFLAGS ]] && LDFLAGS="$LDFLAGS,--no-as-needed" + make +} + +package() { + install -Dm644 aiccu.service "$pkgdir/usr/lib/systemd/system/aiccu.service" + cd $pkgname + install -Dm755 unix-console/aiccu "$pkgdir/usr/bin/aiccu" + install -Dm640 doc/aiccu.conf "$pkgdir/etc/aiccu.conf" + install -Dm644 doc/aiccu.1 "$pkgdir/usr/share/man/man1/aiccu.1" + install -Dm644 doc/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -dm755 "$pkgdir/usr/share/doc/$pkgname" + install -m644 doc/{README,HOWTO,changelog} "$pkgdir/usr/share/doc/$pkgname" +} + +# vim:set ts=2 sw=2 et: diff --git a/community/aiccu/aiccu.service b/community/aiccu/aiccu.service new file mode 100644 index 000000000..23f562ea0 --- /dev/null +++ b/community/aiccu/aiccu.service @@ -0,0 +1,12 @@ +[Unit] +Description=SixXS Automatic IPv6 Connectivity Configuration Utility +After=network.target + +[Service] +Type=forking +PIDFile=/var/run/aiccu.pid +ExecStart=/usr/bin/aiccu start +ExecStop=/usr/bin/aiccu stop + +[Install] +WantedBy=multi-user.target |