From 9094cfdb27dda0585389ef3e2cbdbb9d42d5e5d5 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 14 Dec 2009 04:16:52 +0100 Subject: [PATCH 01/16] Adjust path of example files in README file on the fly --- debian/rules | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/rules b/debian/rules index a259e2e..6212bf6 100755 --- a/debian/rules +++ b/debian/rules @@ -49,6 +49,7 @@ install: build cd src && $(MAKE) DESTDIR=$(CURDIR)/debian/uanytun install && cd .. # Fix unusual path: mv debian/uanytun/usr/share/uanytun/examples/uanytun debian/uanytun/usr/share/uanytun/examples/config + echo "example configurations can be found at /usr/share/uanytun/examples/config" > debian/uanytun/etc/uanytun/README # Build architecture-independent files here. binary-indep: install -- 2.1.4 From 4798faf0f2aa4d9710df772fa923462bed88a6ab Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 14 Dec 2009 17:18:00 +0100 Subject: [PATCH 02/16] Fix broken upstream init script, drop chroot stuff from default config. --- debian/rules | 2 +- debian/uanytun.default | 5 ----- etc/init.d/uanytun | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/debian/rules b/debian/rules index 6212bf6..1cfd3ad 100755 --- a/debian/rules +++ b/debian/rules @@ -67,7 +67,7 @@ binary-arch: install dh_link dh_strip dh_compress - mkdir -p debian/uanytun/usr/share/lintian/overrides/ + mkdir -p debian/uanytun/usr/share/lintian/overrides/ cp -av debian/overrides debian/uanytun/usr/share/lintian/overrides/uanytun dh_fixperms find debian/uanytun -type f -name config -exec chmod 600 {} \; diff --git a/debian/uanytun.default b/debian/uanytun.default index 5e05210..d9d62c4 100644 --- a/debian/uanytun.default +++ b/debian/uanytun.default @@ -1,10 +1,5 @@ # Defaults for uanytun initscript # sourced by /etc/init.d/uanytun -# Note: chroot is tricky and not reliable yet. Use it only -# if you know what you're doing. -#CHROOTDIR='/var/run/uanytun' -#DAEMONOPTS="--chroot $CHROOTDIR --username nobody" - # Additional options that are passed to the Daemon. DAEMONOPTS="--username uanytun" diff --git a/etc/init.d/uanytun b/etc/init.d/uanytun index 781e809..07cb448 100755 --- a/etc/init.d/uanytun +++ b/etc/init.d/uanytun @@ -31,7 +31,7 @@ start_vpn () { test -d $CHROOTDIR || mkdir -p $CHROOTDIR fi DAEMONARG=`sed 's/#.*//' < $CONFIG_DIR/$NAME/config | grep -e '\w' | sed 's/^/--/' | tr '\n' ' '` - $DAEMON --write-pid /var/run/uanytun.$NAME.pid $POSTUP $DAEMONARG || STATUS="FAILED" + $DAEMON --write-pid /var/run/uanytun.$NAME.pid $POSTUP $DAEMONOPTS $DAEMONARG || STATUS="FAILED" else STATUS="no config found" fi -- 2.1.4 From 5deb67854450a43e4809b287b1eaace73dca46bb Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 14 Dec 2009 17:25:20 +0100 Subject: [PATCH 03/16] Add debian/prerm --- debian/postinst | 2 -- debian/postrm | 2 -- debian/prerm | 12 ++++++++++++ 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100755 debian/prerm diff --git a/debian/postinst b/debian/postinst index 8b783fe..b72feed 100755 --- a/debian/postinst +++ b/debian/postinst @@ -10,5 +10,3 @@ fi if [ "$1" = "configure" ]; then adduser --quiet --system --group --no-create-home --home /var/run/uanytun uanytun fi - -#DEBHELPER# diff --git a/debian/postrm b/debian/postrm index 345ff3c..9088e15 100755 --- a/debian/postrm +++ b/debian/postrm @@ -13,5 +13,3 @@ if [ "$1" = "purge" ] ; then echo "Not removing uanytun user and group: adduser package not found." >&2 fi fi - -#DEBHELPER# diff --git a/debian/prerm b/debian/prerm new file mode 100755 index 0000000..01b209c --- /dev/null +++ b/debian/prerm @@ -0,0 +1,12 @@ +#!/bin/sh +# prerm script for uanytun + +set -e + +if [ -x "/etc/init.d/uanytun" ] && [ "$1" = remove ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d uanytun stop || true + else + /etc/init.d/uanytun stop || true + fi +fi -- 2.1.4 From 1a22a6c452036d88e5ff792d7a0924cdfd841c10 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 14 Dec 2009 17:43:35 +0100 Subject: [PATCH 04/16] Update changelog for initial upload. --- debian/changelog | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index e8cd3c2..623053a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,12 +1,6 @@ uanytun (0.3.2-1) unstable; urgency=low - * New Upstream Version - - -- Michael Prokop Mon, 14 Dec 2009 02:45:47 +0100 - -uanytun (0.3-1) unstable; urgency=low - * Initial release (Closes: #531082) - -- Michael Prokop Fri, 29 May 2009 22:19:50 +0200 + -- Michael Prokop Mon, 14 Dec 2009 17:43:13 +0100 -- 2.1.4 From 069ec4b2800bc68766b47184a36e494a99c02820 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 23 Dec 2009 03:47:48 +0100 Subject: [PATCH 05/16] Drop asciidoc and related packages from build-depends and ship manpages statically instead. --- debian/control | 2 +- debian/rules | 11 +- debian/uanytun.8 | 408 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 411 insertions(+), 10 deletions(-) create mode 100644 debian/uanytun.8 diff --git a/debian/control b/debian/control index f7e8cd3..6058d3a 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: uanytun Section: net Priority: extra Maintainer: Michael Prokop -Build-Depends: debhelper (>= 5), asciidoc, docbook-xsl, libgcrypt11-dev, xsltproc +Build-Depends: debhelper (>= 5), libgcrypt11-dev Standards-Version: 3.8.3 Homepage: http://www.anytun.org/ Vcs-git: git://git.grml.org/uanytun.git diff --git a/debian/rules b/debian/rules index 1cfd3ad..b6b42b9 100755 --- a/debian/rules +++ b/debian/rules @@ -12,7 +12,7 @@ configure: configure-stamp configure-stamp: dh_testdir - cd src && ./configure --prefix=/usr --sysconfdir=/etc --examplesdir=/usr/share/uanytun/examples && cd .. + cd src && ./configure --no-manpage --prefix=/usr --sysconfdir=/etc --examplesdir=/usr/share/uanytun/examples && cd .. touch configure-stamp build: build-stamp @@ -21,7 +21,6 @@ build-stamp: configure-stamp dh_testdir cd src && $(MAKE) && cd .. - cd doc && $(MAKE) && cd .. touch $@ @@ -30,12 +29,6 @@ clean: dh_testroot rm -f build-stamp configure-stamp - cd src && $(MAKE) distclean && cd .. - cd doc && $(MAKE) clean && cd .. - - # drop leftover file: - rm -f src/tun.c - # Add here commands to clean up after the build process. $(MAKE) --directory=$(CURDIR)/src distclean dh_clean @@ -63,7 +56,7 @@ binary-arch: install dh_installdocs dh_installexamples dh_installinit - dh_installman doc/uanytun.8 + dh_installman debian/uanytun.8 dh_link dh_strip dh_compress diff --git a/debian/uanytun.8 b/debian/uanytun.8 new file mode 100644 index 0000000..5b51ce1 --- /dev/null +++ b/debian/uanytun.8 @@ -0,0 +1,408 @@ +'\" t +.\" Title: uanytun +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/14/2009 +.\" Manual: uanytun user manual +.\" Source: uanytun 0.3.2 +.\" Language: English +.\" +.TH "UANYTUN" "8" "12/14/2009" "uanytun 0.3.2" "uanytun user manual" +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +uanytun \- micro anycast tunneling daemon +.SH "SYNOPSIS" +.sp +.nf +\fBuanytun\fR + [ \fB\-h|\-\-help\fR ] + [ \fB\-D|\-\-nodaemonize\fR ] + [ \fB\-u|\-\-username\fR ] + [ \fB\-g|\-\-groupname\fR ] + [ \fB\-C|\-\-chroot\fR ] + [ \fB\-P|\-\-write\-pid\fR ] + [ \fB\-L|\-\-log\fR :[,[,[\&.\&.]]] ] + [ \fB\-i|\-\-interface\fR ] + [ \fB\-p|\-\-port\fR ] + [ \fB\-r|\-\-remote\-host\fR ] + [ \fB\-o|\-\-remote\-port\fR ] + [ \fB\-4|\-\-ipv4\-only\fR ] + [ \fB\-6|\-\-ipv6\-only\fR ] + [ \fB\-d|\-\-dev\fR ] + [ \fB\-t|\-\-type\fR ] + [ \fB\-n|\-\-ifconfig\fR / ] + [ \fB\-x|\-\-post\-up\-script\fR