[arch-commits] Commit in aiccu/trunk (7 files)

Sébastien Luttringer seblu at nymeria.archlinux.org
Sun Feb 10 18:32:33 UTC 2013


    Date: Sunday, February 10, 2013 @ 19:32:32
  Author: seblu
Revision: 84113

upgpkg: aiccu 20070115-2

- Add a selection of debian patches

Added:
  aiccu/trunk/01-no-init-script.patch
  aiccu/trunk/02-allow-tunnels.patch
  aiccu/trunk/03-no-quiet-gcc.patch
  aiccu/trunk/04-skip-strip.patch
  aiccu/trunk/05-spelling-error.patch
  aiccu/trunk/06-setup-script.patch
Modified:
  aiccu/trunk/PKGBUILD

-------------------------+
 01-no-init-script.patch |   17 ++++++++++++
 02-allow-tunnels.patch  |   61 ++++++++++++++++++++++++++++++++++++++++++++++
 03-no-quiet-gcc.patch   |   16 ++++++++++++
 04-skip-strip.patch     |   16 ++++++++++++
 05-spelling-error.patch |   46 ++++++++++++++++++++++++++++++++++
 06-setup-script.patch   |   40 ++++++++++++++++++++++++++++++
 PKGBUILD                |   22 +++++++++++++---
 7 files changed, 214 insertions(+), 4 deletions(-)

Added: 01-no-init-script.patch
===================================================================
--- 01-no-init-script.patch	                        (rev 0)
+++ 01-no-init-script.patch	2013-02-10 18:32:32 UTC (rev 84113)
@@ -0,0 +1,17 @@
+Index: aiccu-20070115/Makefile
+===================================================================
+--- aiccu-20070115.orig/Makefile	2009-10-25 22:25:45.000000000 +0100
++++ aiccu-20070115/Makefile	2009-10-25 22:25:58.000000000 +0100
+@@ -84,9 +84,9 @@
+ 	@cp doc/README ${DESTDIR}${dirdoc}
+ 	@cp doc/LICENSE ${DESTDIR}${dirdoc}
+ 	@cp doc/HOWTO  ${DESTDIR}${dirdoc}
+-	@echo "Installing Debian-style init.d"
+-	@mkdir -p ${DESTDIR}${diretc}init.d
+-	@cp doc/${PROJECT}.init.debian ${DESTDIR}${diretc}init.d/${PROJECT}
++#	@echo "Installing Debian-style init.d"
++#	@mkdir -p ${DESTDIR}${diretc}init.d
++#	@cp doc/${PROJECT}.init.debian ${DESTDIR}${diretc}init.d/${PROJECT}
+ else
+ 	@echo "Installing Redhat-style init.d"
+ 	@mkdir -p ${DESTDIR}${diretc}init.d

Added: 02-allow-tunnels.patch
===================================================================
--- 02-allow-tunnels.patch	                        (rev 0)
+++ 02-allow-tunnels.patch	2013-02-10 18:32:32 UTC (rev 84113)
@@ -0,0 +1,61 @@
+commit d7c4f7c0d34b80c188fa45228ca282fd8771a41d
+Author: Norman Rasmussen <norman at 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();
+ 	

Added: 03-no-quiet-gcc.patch
===================================================================
--- 03-no-quiet-gcc.patch	                        (rev 0)
+++ 03-no-quiet-gcc.patch	2013-02-10 18:32:32 UTC (rev 84113)
@@ -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

Added: 04-skip-strip.patch
===================================================================
--- 04-skip-strip.patch	                        (rev 0)
+++ 04-skip-strip.patch	2013-02-10 18:32:32 UTC (rev 84113)
@@ -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

Added: 05-spelling-error.patch
===================================================================
--- 05-spelling-error.patch	                        (rev 0)
+++ 05-spelling-error.patch	2013-02-10 18:32:32 UTC (rev 84113)
@@ -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;
+ 	}
+ 

Added: 06-setup-script.patch
===================================================================
--- 06-setup-script.patch	                        (rev 0)
+++ 06-setup-script.patch	2013-02-10 18:32:32 UTC (rev 84113)
@@ -0,0 +1,40 @@
+Author: Norman Rasmussen <norman at 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)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-02-10 14:57:09 UTC (rev 84112)
+++ PKGBUILD	2013-02-10 18:32:32 UTC (rev 84113)
@@ -3,7 +3,7 @@
 
 pkgname=aiccu
 pkgver=20070115
-pkgrel=1
+pkgrel=2
 pkgdesc='SixXS Automatic IPv6 Connectivity Client Utility'
 arch=('i686' 'x86_64')
 url='http://www.sixxs.net/tools/aiccu/'
@@ -11,12 +11,27 @@
 depends=('gnutls' 'iproute2')
 backup=('etc/aiccu.conf')
 source=("http://www.sixxs.net/archive/sixxs/aiccu/unix/${pkgname}_${pkgver}.tar.gz"
-        'aiccu.service')
+        'aiccu.service'
+        '01-no-init-script.patch'
+        '02-allow-tunnels.patch'
+        '03-no-quiet-gcc.patch'
+        '04-skip-strip.patch'
+        '05-spelling-error.patch'
+        '06-setup-script.patch')
 md5sums=('c9bcc83644ed788e22a7c3f3d4021350'
-         'e038c9d7882e6e603d87962bac7a0f2a')
+         'e038c9d7882e6e603d87962bac7a0f2a'
+         '6de05338752bfb01772dee37b1dc0454'
+         'b9b2c0e7186f3f96366caaa39252dccc'
+         'b38db1d95760cd9687330b7db5f4ea1d'
+         '6dfa2df27bb4859c7511bfea91337925'
+         '21a37c376ebfcf787c0e7ee8552053ac'
+         '98e73756609f4e09c45c4e5139fd5aed')
 
 build() {
   cd $pkgname
+  for _p in "$srcdir"/*.patch; do
+    patch -p1 -i "$_p"
+  done
   [[ $LDFLAGS ]] && LDFLAGS="$LDFLAGS,--no-as-needed"
   make
 }
@@ -34,7 +49,6 @@
   install -Dm644 doc/$pkgname.1 "$pkgdir/usr/share/man/man1/$pkgname.1"
   # systemd
   install -Dm644 "$srcdir/aiccu.service" "$pkgdir/usr/lib/systemd/system/aiccu.service"
-  rm -r "$pkgdir/etc/init.d"
 }
 
 # vim:set ts=2 sw=2 et:




More information about the arch-commits mailing list