--- stun-0.96.dfsg.orig/debian/stun.prerm +++ stun-0.96.dfsg/debian/stun.prerm @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +if [ -x "/etc/init.d/stun" ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d stun stop || exit $? + else + /etc/init.d/stun stop || exit $? + fi +fi + +#DEBHELPER# --- stun-0.96.dfsg.orig/debian/dirs +++ stun-0.96.dfsg/debian/dirs @@ -0,0 +1,3 @@ +etc/default +usr/bin +usr/sbin --- stun-0.96.dfsg.orig/debian/stun.default +++ stun-0.96.dfsg/debian/stun.default @@ -0,0 +1,21 @@ +# Defaults for stun initscript +# sourced by /etc/init.d/stun +# installed at /etc/default/stun by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +#uncommment the next line to allow the init.d script to start the stun daemon +#START_DAEMON=true + +# Additional options that are passed to the Daemon. +DAEMON_OPTS="" + +PRIMARY_IP="" +SECONDARY_IP="" +PRIMARY_PORT=3478 +SECONDARY_PORT=3479 + +# whom the daemons should run as +DAEMON_USER=nobody --- stun-0.96.dfsg.orig/debian/README.Debian +++ stun-0.96.dfsg/debian/README.Debian @@ -0,0 +1,11 @@ +stund for Debian +---------------- +The stund daemon is not started by default. +To get the daemon to start edit /etc/default/stun and uncomment the +START_DAEMON=true line + + +A list of publicly available STUN test servers is available at: +http://www.voip-info.org/wiki/view/STUN + + -- Mark Purcell Tue, 6 Jun 2006 09:58:43 +0100 --- stun-0.96.dfsg.orig/debian/copyright +++ stun-0.96.dfsg/debian/copyright @@ -0,0 +1,54 @@ +This package was debianized by Kilian Krause on +Mon, 2 Jan 2006 23:51:48 +0100. + +It was downloaded from http://sourceforge.net/projects/stun/ + +Copyright Holder: Copyright (c) 2000 Vovida Networks, Inc. + +License: + +As found at http://www.vovida.org/About/license.html: + +Vovida Software License +------------------------------ + +The Vovida Software License, Version 1.0 +Copyright (c) 2000 Vovida Networks, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +3. The names "VOCAL", "Vovida Open Communication Application Library", + and "Vovida Open Communication Application Library (VOCAL)" must + not be used to endorse or promote products derived from this + software without prior written permission. For written + permission, please contact vocal@vovida.org. + +4. Products derived from this software may not be called "VOCAL", nor + may "VOCAL" appear in their name, without prior written + permission. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND +NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA +NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DAMAGES +IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + + --- stun-0.96.dfsg.orig/debian/init.d +++ stun-0.96.dfsg/debian/init.d @@ -0,0 +1,129 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: stund +# Required-Start: $network +# Required-Stop: $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: STUN server helps cliens to identify their NAT detection +### END INIT INFO +# +# +# Please read /usr/share/doc/stun/README.Debian +# +# +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . +# +# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/stund +NAME=stun +DESC=stun +START_DAEMON=false +PIDFILE=/var/run/$NAME.pid + +test -x $DAEMON || exit 0 + +# Include stun defaults if available +if [ -f /etc/default/stun ] ; then + . /etc/default/stun +fi +if [ "$START_DAEMON" != "true" ] ; then + exit 0 +fi +if [ -z $PRIMARY_IP ];then + echo "No primary IP given. Exiting." + exit 1 +fi +if [ -z $SECONDARY_IP ];then + echo "No secondary IP given. Exiting." + exit 1 +fi +if [ -z $PRIMARY_PORT ];then + echo "No primary port given. Using default." + PRIMARY_PORT=3478 +fi +if [ -z $SECONDARY_PORT ];then + echo "No secondary port given. Using default." + SECONDARY_PORT=3479 +fi +if [ -z $DAEMON_USER ];then + DAEMON_USER=nobody +fi + +DAEMON_OPTS="$DAEMON_OPTS -h $PRIMARY_IP -a $SECONDARY_IP -p $PRIMARY_PORT -o $SECONDARY_PORT" + +set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --background --make-pidfile \ + --pidfile $PIDFILE \ + --chuid $DAEMON_USER --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --chuid $DAEMON_USER --exec $DAEMON + echo "$NAME." + ;; + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # echo "Reloading $DESC configuration files." + # start-stop-daemon --stop --signal 1 --quiet --pidfile \ + # $PIDFILE --exec $DAEMON + #;; + restart|force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart". + # + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile \ + $PIDFILE --exec $DAEMON + sleep 1 + start-stop-daemon --start --quiet --pidfile \ + $PIDFILE --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + status) + echo -n "Status of $DESC: " + + if [ ! -r "$PIDFILE" ]; then + echo "$NAME is not running." + exit 3 + fi + + if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then + echo "$NAME is running." + exit 0 + else + echo "$NAME is not running but $PIDFILE exists." + exit 1 + fi + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|status|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|status|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 --- stun-0.96.dfsg.orig/debian/compat +++ stun-0.96.dfsg/debian/compat @@ -0,0 +1 @@ +5 --- stun-0.96.dfsg.orig/debian/stun.manpages +++ stun-0.96.dfsg/debian/stun.manpages @@ -0,0 +1,2 @@ +debian/manpages/stun.1 +debian/manpages/stund.8 --- stun-0.96.dfsg.orig/debian/control +++ stun-0.96.dfsg/debian/control @@ -0,0 +1,20 @@ +Source: stun +Section: net +Priority: optional +Maintainer: Debian VoIP Team +Uploaders: Kilian Krause , Jose Carlos Garcia Sogo , Mark Purcell , Santiago Garcia Mantinan , Rene Mayorga +Build-Depends: debhelper (>= 5), dpatch +Standards-Version: 3.7.2 +Homepage: http://sourceforge.net/projects/stun/ +Vcs-Svn: svn://svn.debian.org/pkg-voip/stun/trunk/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-voip/stun/?op=log + +Package: stun +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Server daemon and test client for STUN + The STUN protocol (Simple Traversal of UDP through NATs) is described in the + IETF RFC 3489, available at http://www.ietf.org/rfc/rfc3489.txt. It's used to + help clients behind NAT to tunnel incoming calls through. This server is the + counterpart to help the client identify the NAT and have it open the proper + ports for it. --- stun-0.96.dfsg.orig/debian/watch +++ stun-0.96.dfsg/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts=dversionmangle=s/\.dfsg// \ + http://sf.net/stun/stund_([\d\.]+)_...\d\d\.tgz --- stun-0.96.dfsg.orig/debian/changelog +++ stun-0.96.dfsg/debian/changelog @@ -0,0 +1,62 @@ +stun (0.96.dfsg-6build1) precise; urgency=low + + * No-change rebuild to drop spurious libsfgcc1 dependency on armhf. + + -- Adam Conrad Fri, 02 Dec 2011 21:24:47 -0700 + +stun (0.96.dfsg-6) unstable; urgency=low + + [ Kilian Krause ] + * Add Homepage field as added in dpkg-dev 1.14.6. (Closes: #620342, #615190) + * Fixed debian/watch file. + * Add status option to init file (Closes: #493970) + + [ Patrick Matthäi ] + * Fixed spelling error in debian/changelog: s/standart/standard/. + Thanks lintian. + + -- Kilian Krause Tue, 24 May 2011 13:49:32 +0200 + +stun (0.96.dfsg-5) unstable; urgency=low + + * added manpage for stun and stund (Closes: #425827) + * update init.d to complain with LSB + * Bumped Debian policy standard to 3.7.2 + + compat set to 5 + + debhelper version raised + + de-ignoring output from make distclean + * Homepage added to debian/control + * Added myself to Uploaders field + * #DEBHELPER# token set to debian/stun.prerm + + -- Rene Mayorga Sat, 6 Jan 2007 22:57:01 +0100 + +stun (0.96.dfsg-4) unstable; urgency=low + + * Fix startup again. (Closes: #388037) + + -- Kilian Krause Sat, 6 Jan 2007 22:53:52 +0100 + +stun (0.96.dfsg-3) unstable; urgency=high + + * Fix installation and don't try to forcibly start daemon + (Closes: #388037, #397074) + + -- Kilian Krause Wed, 3 Jan 2007 20:44:06 +0100 + +stun (0.96.dfsg-2) unstable; urgency=low + + [ Mark Purcell ] + * Add debian/README.Debian (Closes: Bug#369570) + + [ Kilian Krause ] + * Use correct user to start/stop daemon. (Closes: #384113) + + -- Kilian Krause Sun, 22 Oct 2006 14:48:48 +0200 + +stun (0.96.dfsg-1) unstable; urgency=low + + * Initial Release. + + -- Kilian Krause Mon, 2 Jan 2006 23:51:48 +0100 + --- stun-0.96.dfsg.orig/debian/rules +++ stun-0.96.dfsg/debian/rules @@ -0,0 +1,80 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +include /usr/share/dpatch/dpatch.make + +build: build-stamp +build-stamp: patch-stamp + dh_testdir + ([ ! -f rfc3489.txt ] || (echo This is not the DFSG source.;exit 1)) + + # Add here commands to compile the package. + $(MAKE) + #$(MAKE) tlsServer + + touch build-stamp + +clean: clean-unpatched unpatch +clean-unpatched: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + [ ! -f Makefile ] || $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/stun. + #$(MAKE) install DESTDIR=$(CURDIR)/debian/stun + install -m 755 server $(CURDIR)/debian/stun/usr/sbin/stund + #install -m 755 tlsServer $(CURDIR)/debian/stun/usr/sbin/ + install -m 755 client $(CURDIR)/debian/stun/usr/bin/stun + install -m 644 debian/stun.default $(CURDIR)/debian/stun/etc/default/stun + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_installinit + dh_installman +# dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- stun-0.96.dfsg.orig/debian/docs +++ stun-0.96.dfsg/debian/docs @@ -0,0 +1 @@ +nattestwarning.txt --- stun-0.96.dfsg.orig/debian/patches/daemon_noverbose.dpatch +++ stun-0.96.dfsg/debian/patches/daemon_noverbose.dpatch @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## daemon_noverbose.dpatch by Kilian Krause +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad stun-0.96~/server.cxx stun-0.96/server.cxx +--- stun-0.96~/server.cxx 2005-08-13 20:19:29.000000000 +0000 ++++ stun-0.96/server.cxx 2006-01-04 14:18:02.000000000 +0000 +@@ -223,7 +223,8 @@ + c++; + if ( c%1000 == 0 ) + { +- clog << "*"; ++ if ( verbose ) ++ clog << "*"; + } + } + // Notreached --- stun-0.96.dfsg.orig/debian/patches/00list +++ stun-0.96.dfsg/debian/patches/00list @@ -0,0 +1,2 @@ +fix_non_i386 +daemon_noverbose --- stun-0.96.dfsg.orig/debian/patches/fix_non_i386.dpatch +++ stun-0.96.dfsg/debian/patches/fix_non_i386.dpatch @@ -0,0 +1,27 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## fix_non_i386.dpatch by Kilian Krause +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Remove i386-only code analogous to twinkle +@DPATCH@ +diff -urNad stun-0.96~/stun.cxx stun-0.96/stun.cxx +--- stun-0.96~/stun.cxx 2005-08-14 00:39:03.000000000 +0000 ++++ stun-0.96/stun.cxx 2006-01-03 00:54:33.000000000 +0000 +@@ -669,16 +669,8 @@ + tick = hightick; + tick <<= 32; + tick |= lowtick; +-#elif defined(__GNUC__) && ( defined(__i686__) || defined(__i386__) ) +- asm("rdtsc" : "=A" (tick)); +-#elif defined (__SUNPRO_CC) || defined( __sparc__ ) +- tick = gethrtime(); +-#elif defined(__MACH__) +- int fd=open("/dev/random",O_RDONLY); +- read(fd,&tick,sizeof(tick)); +- closesocket(fd); + #else +-# error Need some way to seed the random number generator ++ tick = time(NULL); + #endif + int seed = int(tick); + #ifdef WIN32 --- stun-0.96.dfsg.orig/debian/manpages/stun.1 +++ stun-0.96.dfsg/debian/manpages/stun.1 @@ -0,0 +1,58 @@ +.TH "STUN" "1" "2007 Aug 31" "Debian Project" "" +.SH "NAME" +.LP +stun \- test client for STUN +.SH "SYNTAX" +.LP +stun <\fIServerHostName\fP> [\fItest\-Number\fP] [\fI\-v\fP] [\fI\-p\fP Source\-Port] [\fI\-i\fP interface] + +.SH "DESCRIPTION" +.LP +Test client for STUN(Simple Traversal of UDP trough NATs) Server + + +.SH "OPTIONS" +.LP +.TP +\fB [012]\fR +Define different choice for tests; there are three available tests cases +witch are defined at RFC3489. +.TP +\fB\-v\fR +Verbose output. +.TP +\fB\-p\fR +Define the Source\-Port. +.TP +\fB\-i\fR [interface] +Define a given interface +.TP +.SH "EXAMPLES" +.LP +The general and standard way is: +.LP +\fBstun stun.example.org\fI +.LP +Alternatively you can run it using options as: +.LP +\fBstun larry.gloo.net 0\fI +.br +Which runs the first test to larry.gloo.net +please reefer to RFC 3489 for more info about the tests. +.LP +\fBstun \-v \-i eth0 \-i eth1 stun.example.org\fI +.br +Multiple interfaces could be defined with \fB\-i\fR option +.SH "AUTHORS" +.LP +This manual page was written by Rene Mayorga +for the \fBDebian\fR system (but may be used by others). Permission is +granted to copy, distribute and/or modify this document under the terms +of the GNU General Public License, Version 2 any later version published +by the Free Software Foundation. + +On Debian systems, the complete text of the GNU General Public License +can be found in /usr/share/common\-licenses/GPL. +.SH "SEE ALSO" +.LP +stund(8) --- stun-0.96.dfsg.orig/debian/manpages/stund.8 +++ stun-0.96.dfsg/debian/manpages/stund.8 @@ -0,0 +1,64 @@ +.TH "STUND" "8" "2007 Aug 31" "Debian Project" "" +.SH "NAME" +.LP +stund \- STUN protocol (Simple Traversal of UDP through NATs) Server +.SH "SYNTAX" +.LP +stund [\fI\-v\fP] [\fI\-h\fP IP Address] [\fI\-a\fP Secondary IP Address ] [\fI\-p\fP port ] [\fI\-o\fP port ] [\fI\-b\fP ] [\fI\-m\fP ] +.LP +STUN servers needs two IP addresses and two ports + +.SH "DESCRIPTION" +.LP +STUN Servers are used to help clients behind NAT to tunnel incoming calls through. This server is the counterpart to help the client identify the NAT and have it open the proper ports for it + +.SH "OPTIONS" +.LP +.TP +\fB\-v\fR +Verbose output. +.TP +\fB\-h\fR +Define the Main IP Address. +.TP +\fB\-a\fR +Define the Second IP Address. +.TP +\fB\-p\fR +Set the primary port +the default port value is 3478 +.TP +\fB\-o\fR +Set the secondary port +the default port value is 3479 +\fB\-b\fR +Detach the process and makes the program run at the background +.TP +\fB\-m\fR +Sets a starting port for the STERM server +.TP +\fB\-\-help\fR +Prints useful help +.SH "EXAMPLES" +.LP +If the IP addresses of your NIC are 10.0.1.150 and 10.0.1.151 +the proper and default use would be: +.LP +\fBstund \-h 10.0.1.150 \-a 10.0.1.151\fR +.LP +add \fB\-b\fR option to detach the process +.LP +\fBstund \-h 10.0.1.150 \-a 10.0.1.151 \-b\fR +.SH "AUTHORS" +.LP +This manual page was written by Rene Mayorga +for the \fBDebian\fR system (but may be used by others). Permission is +granted to copy, distribute and/or modify this document under the terms +of the GNU General Public License, Version 2 any later version published +by the Free Software Foundation. + +On Debian systems, the complete text of the GNU General Public License +can be found in /usr/share/common\-licenses/GPL. +.SH "SEE ALSO" +.LP +stun(1)