diff -Nru batmand-0.3.2/debian/batmand-default batmand-0.3.2/debian/batmand-default --- batmand-0.3.2/debian/batmand-default 2011-05-20 19:06:23.000000000 +0000 +++ batmand-0.3.2/debian/batmand-default 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -# Defaults for batmand initscript -# sourced by /etc/init.d/batmand -# installed at /etc/default/batmand by the maintainer scripts - -# -# This is a POSIX shell fragment -# - -# -# uncomment the next line run batmand automatically at startup -# -#START_BATMAND="YES" - -# -# debuglevel from 1 to 5. see man batmand(8) for more information about levels. -# for running from init.d 0 is recommended -# -DEBUGLEVEL=0 - -# Set your interface(s) here. -# If you have more interfaces, then you just add them behind the first. -# -#INTERFACES="eth1 eth2" -# -# "command-line options" -# -DAEMON_OPTS="-d $DEBUGLEVEL $INTERFACES" - diff -Nru batmand-0.3.2/debian/batmand.default batmand-0.3.2/debian/batmand.default --- batmand-0.3.2/debian/batmand.default 1970-01-01 00:00:00.000000000 +0000 +++ batmand-0.3.2/debian/batmand.default 2011-12-11 13:10:01.000000000 +0000 @@ -0,0 +1,28 @@ +# Defaults for batmand initscript +# sourced by /etc/init.d/batmand +# installed at /etc/default/batmand by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# +# uncomment the next line run batmand automatically at startup +# +#START_BATMAND="YES" + +# +# debuglevel from 1 to 5. see man batmand(8) for more information about levels. +# for running from init.d 0 is recommended +# +DEBUGLEVEL=0 + +# Set your interface(s) here. +# If you have more interfaces, then you just add them behind the first. +# +#INTERFACES="eth1 eth2" +# +# "command-line options" +# +DAEMON_OPTS="-d $DEBUGLEVEL $INTERFACES" + diff -Nru batmand-0.3.2/debian/batmand.install batmand-0.3.2/debian/batmand.install --- batmand-0.3.2/debian/batmand.install 2011-05-20 19:06:23.000000000 +0000 +++ batmand-0.3.2/debian/batmand.install 2011-12-11 13:10:01.000000000 +0000 @@ -1 +1,2 @@ usr/sbin/batmand +usr/share/man/man8/batmand.8 diff -Nru batmand-0.3.2/debian/changelog batmand-0.3.2/debian/changelog --- batmand-0.3.2/debian/changelog 2011-05-20 19:06:23.000000000 +0000 +++ batmand-0.3.2/debian/changelog 2011-12-11 13:10:01.000000000 +0000 @@ -1,3 +1,23 @@ +batmand (0.3.2-11) unstable; urgency=low + + * Update Vcs-* fields to new anonscm.debian.org URLs in debian/control + * Mark all targets in debian/rules as phony + * Remove hardening-includes which are now integrated in dpkg- + buildflags + * Use debian packaging manual URL as format identifier in + debian/copyright + * Let dh_installinit handle the installation of /etc/default/batmand + * debian/patches: + - Add non_parallel_build.patch, Don't start parallel build for + environments disallowing it + - Add build_rules.patch, Use make like build rules to support all + flags provided through dpkg-buildflags + - Add install_manpage.patch, Directly install manpage by build script + - Add version_info.patch, Allow to add debian revision to the version + string + + -- Sven Eckelmann Sun, 11 Dec 2011 14:09:48 +0100 + batmand (0.3.2-10) unstable; urgency=low * debian/patches: diff -Nru batmand-0.3.2/debian/control batmand-0.3.2/debian/control --- batmand-0.3.2/debian/control 2011-05-20 19:06:23.000000000 +0000 +++ batmand-0.3.2/debian/control 2011-12-11 13:10:01.000000000 +0000 @@ -6,11 +6,10 @@ Dm-Upload-Allowed: yes Standards-Version: 3.9.2 Homepage: http://www.open-mesh.org/ -Vcs-Git: git://git.debian.org/git/collab-maint/batmand.git -Vcs-Browser: http://git.debian.org/?p=collab-maint/batmand.git +Vcs-Git: git://anonscm.debian.org/collab-maint/batmand.git +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/batmand.git Build-Depends: debhelper (>= 8.0.0), - hardening-includes, Package: batmand Architecture: linux-any diff -Nru batmand-0.3.2/debian/copyright batmand-0.3.2/debian/copyright --- batmand-0.3.2/debian/copyright 2011-05-20 19:06:23.000000000 +0000 +++ batmand-0.3.2/debian/copyright 2011-12-11 13:10:01.000000000 +0000 @@ -1,4 +1,4 @@ -Format: http://dep.debian.net/deps/dep5/ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: B.A.T.M.A.N. Source: http://www.open-mesh.org/ diff -Nru batmand-0.3.2/debian/get-orig-source.sh batmand-0.3.2/debian/get-orig-source.sh --- batmand-0.3.2/debian/get-orig-source.sh 1970-01-01 00:00:00.000000000 +0000 +++ batmand-0.3.2/debian/get-orig-source.sh 2011-12-11 13:10:01.000000000 +0000 @@ -0,0 +1,23 @@ +#! /bin/sh +set -e + +REV="`dpkg-parsechangelog|grep '^Version: '|sed 's/^Version:\s*\([0-9]*:\)\?\(.*\)-[0-9]*/\2/'`" +GITREV="`echo v${REV}|grep "[~+]g"|sed 's/[~+]/-/g'`" +DIR="`dpkg-parsechangelog|grep '^Source: '|sed 's/^Source:\s*//'`" +TARNAME="${DIR}_${REV}.orig.tar.gz" +SNAPSHOT="http://git.open-mesh.org/?p=${DIR}.git;a=snapshot;h=${GITREV};sf=tgz" + +# try to download source package +if [ ! -s "${TARNAME}" ]; then + if [ -z "${GITREV}" ]; then + uscan --verbose --force-download --download-version "${REV}" --destdir .. + else + TMPGZ="`mktemp -t`" + TMPTAR="`mktemp -t`" + wget -q "${SNAPSHOT}" -O "${TMPGZ}" + zcat "${TMPGZ}" > "${TMPTAR}" + rm -f "${TMPGZ}" + gzip -n -m -f -c "${TMPTAR}" > "../${TARNAME}" + rm -f "${TMPTAR}" + fi +fi diff -Nru batmand-0.3.2/debian/manpages batmand-0.3.2/debian/manpages --- batmand-0.3.2/debian/manpages 2011-05-20 19:06:23.000000000 +0000 +++ batmand-0.3.2/debian/manpages 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -man/batmand.8 diff -Nru batmand-0.3.2/debian/patches/build_rules.patch batmand-0.3.2/debian/patches/build_rules.patch --- batmand-0.3.2/debian/patches/build_rules.patch 1970-01-01 00:00:00.000000000 +0000 +++ batmand-0.3.2/debian/patches/build_rules.patch 2011-12-11 13:10:01.000000000 +0000 @@ -0,0 +1,174 @@ +Description: Use standard-like build rules + User expect a specific naming inside makefile rules which they can + modify by changing environment variables or providing them explicitely + as parameters of the make call. The naming was extracted from the gnu + make standard rules database. +Author: Sven Eckelmann + +--- +diff --git a/Makefile b/Makefile +index 437a339a6b695baee8f15918f62f9aa2066e8447..46a91881f1854a955c9a7fb289a4cd2b62c4c1e1 100644 +--- a/Makefile ++++ b/Makefile +@@ -16,6 +16,46 @@ + # 02110-1301, USA + # + ++# batmand build ++BINARY_NAME = batmand ++ ++UNAME = $(shell uname) ++POSIX_OBJ = posix/init.o posix/posix.o posix/tunnel.o posix/unix_socket.o ++BSD_OBJ = bsd/route.o bsd/tun.o bsd/kernel.o bsd/compat.o ++LINUX_OBJ = linux/route.o linux/tun.o linux/kernel.o ++ ++ifeq ($(UNAME),Linux) ++OS_OBJ = $(LINUX_OBJ) $(POSIX_OBJ) ++endif ++ ++ifeq ($(UNAME),Darwin) ++OS_OBJ = $(BSD_OBJ) $(POSIX_OBJ) ++endif ++ ++ifeq ($(UNAME),GNU/kFreeBSD) ++OS_OBJ = $(BSD_OBJ) $(POSIX_OBJ) ++LDLIBS += -lfreebsd -lbsd ++endif ++ ++ifeq ($(UNAME),FreeBSD) ++OS_OBJ = $(BSD_OBJ) $(POSIX_OBJ) ++endif ++ ++ifeq ($(UNAME),OpenBSD) ++OS_OBJ = $(BSD_OBJ) $(POSIX_OBJ) ++endif ++ ++OBJ = batman.o originator.o schedule.o list-batman.o allocate.o bitarray.o hash.o profile.o ring_buffer.o hna.o $(OS_OBJ) ++ ++# activate this variable to deactivate policy routing for backward compatibility ++#NO_POLICY_ROUTING = -DNO_POLICY_ROUTING ++ ++# batmand flags and options ++CFLAGS += -pedantic -Wall -W -std=gnu99 -MD ++CPPFLAGS += -DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA $(NO_POLICY_ROUTING) -DREVISION_VERSION=$(REVISION_VERSION) ++LDLIBS += -lpthread ++ ++# disable verbose output + ifneq ($(findstring $(MAKEFLAGS),s),s) + ifndef V + Q_CC = @echo ' ' CC $@; +@@ -25,89 +65,42 @@ ifndef V + endif + endif + +-# activate this variable to deactivate policy routing for backward compatibility +-#NO_POLICY_ROUTING = -DNO_POLICY_ROUTING ++# standard build tools ++CC ?= gcc ++RM ?= rm -f ++INSTALL ?= install ++MKDIR ?= mkdir -p ++COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c ++LINK.o = $(Q_LD)$(CC) $(LDFLAGS) $(TARGET_ARCH) + +-CC = gcc +-CFLAGS += -pedantic -Wall -W -O1 -g3 -std=gnu99 +-EXTRA_CFLAGS = -DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA $(NO_POLICY_ROUTING) -DREVISION_VERSION=$(REVISION_VERSION) +-LDFLAGS += -lpthread +- +-SBINDIR = $(INSTALL_PREFIX)/usr/sbin +- +-UNAME= $(shell uname) +-POSIX_C= posix/init.c posix/posix.c posix/tunnel.c posix/unix_socket.c +-BSD_C= bsd/route.c bsd/tun.c bsd/kernel.c bsd/compat.c +- +-ifeq ($(UNAME),Linux) +-OS_C= linux/route.c linux/tun.c linux/kernel.c $(POSIX_C) +-endif +- +-ifeq ($(UNAME),Darwin) +-OS_C= $(BSD_C) $(POSIX_C) +-endif +- +-ifeq ($(UNAME),GNU/kFreeBSD) +-OS_C= $(BSD_C) $(POSIX_C) +-LDFLAGS+= -lfreebsd -lbsd +-endif +- +-ifeq ($(UNAME),FreeBSD) +-OS_C= $(BSD_C) $(POSIX_C) +-endif +- +-ifeq ($(UNAME),OpenBSD) +-OS_C= $(BSD_C) $(POSIX_C) +-endif +- +-LOG_BRANCH= trunk/batman +- +-SRC_FILES= "\(\.c\)\|\(\.h\)\|\(Makefile\)\|\(INSTALL\)\|\(LIESMICH\)\|\(README\)\|\(THANKS\)\|\(TRASH\)\|\(Doxyfile\)\|\(./posix\)\|\(./linux\)\|\(./bsd\)\|\(./man\)\|\(./doc\)" +- +-SRC_C= batman.c originator.c schedule.c list-batman.c allocate.c bitarray.c hash.c profile.c ring_buffer.c hna.c $(OS_C) +-SRC_H= batman.h originator.h schedule.h list-batman.h os.h allocate.h bitarray.h hash.h profile.h vis-types.h ring_buffer.h hna.h +-SRC_O= $(SRC_C:.c=.o) +- +-PACKAGE_NAME= batmand +-BINARY_NAME= batmand +-SOURCE_VERSION_HEADER= batman.h ++# standard install paths ++PREFIX = /usr/local ++SBINDIR = $(PREFIX)/sbin + ++# try to generate revision + REVISION:= $(shell if [ -d .svn ]; then svn info | grep "Rev:" | sed -e '1p' -n | awk '{print $$4}'; else if [ -d ~/.svk ]; then echo $$(svk info | grep "Mirrored From" | awk '{print $$5}'); fi; fi) + REVISION_VERSION=\"\ rv$(REVISION)\" + +-BAT_VERSION= $(shell grep "^\#define SOURCE_VERSION " $(SOURCE_VERSION_HEADER) | sed -e '1p' -n | awk -F '"' '{print $$2}' | awk '{print $$1}') +-FILE_NAME= $(PACKAGE_NAME)_$(BAT_VERSION)-rv$(REVISION)_$@ +- ++# default target + all: $(BINARY_NAME) + +-$(BINARY_NAME): $(SRC_O) $(SRC_H) Makefile +- $(Q_LD)$(CC) -o $@ $(SRC_O) $(LDFLAGS) +- ++# standard build rules ++.SUFFIXES: .o .c + .c.o: +- $(Q_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MD -c $< -o $@ +--include $(SRC_C:.c=.d) ++ $(COMPILE.c) -o $@ $< + +-sources: +- mkdir -p $(FILE_NAME) +- +- for i in $$( find . | grep $(SRC_FILES) | grep -v "\.svn" ); do [ -d $$i ] && mkdir -p $(FILE_NAME)/$$i ; [ -f $$i ] && cp -Lvp $$i $(FILE_NAME)/$$i ;done +- +- wget -O changelog.html http://www.open-mesh.net/log/$(LOG_BRANCH)/ +- html2text -o changelog.txt -nobs -ascii changelog.html +- awk '/View revision/,/10\/01\/06 20:23:03/' changelog.txt > $(FILE_NAME)/CHANGELOG +- +- for i in $$( find man | grep -v "\.svn" ); do [ -f $$i ] && groff -man -Thtml $$i > $(FILE_NAME)/$$i.html ;done +- +- tar czvf $(FILE_NAME).tgz $(FILE_NAME) ++$(BINARY_NAME): $(OBJ) ++ $(LINK.o) $^ $(LDLIBS) -o $@ + + clean: +- rm -f $(BINARY_NAME) *.o posix/*.o linux/*.o bsd/*.o +- rm -f *.d posix/*.d linux/*.d bsd/*.d ++ $(RM) $(BINARY_NAME) $(OBJ) $(DEP) + ++install: $(BINARY_NAME) ++ $(MKDIR) $(DESTDIR)$(SBINDIR) ++ $(INSTALL) -m 0755 $(BINARY_NAME) $(DESTDIR)$(SBINDIR) + +-clean-long: +- rm -rf $(PACKAGE_NAME)_* ++# load dependencies ++DEP = $(OBJ:.o=.d) ++-include $(DEP) + +-install: +- mkdir -p $(SBINDIR) +- install -m 0755 $(BINARY_NAME) $(SBINDIR) ++.PHONY: all clean install diff -Nru batmand-0.3.2/debian/patches/install_manpage.patch batmand-0.3.2/debian/patches/install_manpage.patch --- batmand-0.3.2/debian/patches/install_manpage.patch 1970-01-01 00:00:00.000000000 +0000 +++ batmand-0.3.2/debian/patches/install_manpage.patch 2011-12-11 13:10:01.000000000 +0000 @@ -0,0 +1,34 @@ +Description: Install manpage +Author: Sven Eckelmann + +--- +diff --git a/Makefile b/Makefile +index 46a91881f1854a955c9a7fb289a4cd2b62c4c1e1..06cbfe6e67a7be376d28303b1e33a40a5fc2f0fc 100644 +--- a/Makefile ++++ b/Makefile +@@ -46,6 +46,7 @@ OS_OBJ = $(BSD_OBJ) $(POSIX_OBJ) + endif + + OBJ = batman.o originator.o schedule.o list-batman.o allocate.o bitarray.o hash.o profile.o ring_buffer.o hna.o $(OS_OBJ) ++MANPAGE = man/batmand.8 + + # activate this variable to deactivate policy routing for backward compatibility + #NO_POLICY_ROUTING = -DNO_POLICY_ROUTING +@@ -76,6 +77,7 @@ LINK.o = $(Q_LD)$(CC) $(LDFLAGS) $(TARGET_ARCH) + # standard install paths + PREFIX = /usr/local + SBINDIR = $(PREFIX)/sbin ++MANDIR = $(PREFIX)/share/man + + # try to generate revision + REVISION:= $(shell if [ -d .svn ]; then svn info | grep "Rev:" | sed -e '1p' -n | awk '{print $$4}'; else if [ -d ~/.svk ]; then echo $$(svk info | grep "Mirrored From" | awk '{print $$5}'); fi; fi) +@@ -97,7 +99,9 @@ clean: + + install: $(BINARY_NAME) + $(MKDIR) $(DESTDIR)$(SBINDIR) ++ $(MKDIR) $(DESTDIR)$(MANDIR)/man8 + $(INSTALL) -m 0755 $(BINARY_NAME) $(DESTDIR)$(SBINDIR) ++ $(INSTALL) -m 0644 $(MANPAGE) $(DESTDIR)$(MANDIR)/man8 + + # load dependencies + DEP = $(OBJ:.o=.d) diff -Nru batmand-0.3.2/debian/patches/non_parallel_build.patch batmand-0.3.2/debian/patches/non_parallel_build.patch --- batmand-0.3.2/debian/patches/non_parallel_build.patch 1970-01-01 00:00:00.000000000 +0000 +++ batmand-0.3.2/debian/patches/non_parallel_build.patch 2011-12-11 13:10:01.000000000 +0000 @@ -0,0 +1,24 @@ +Description: Don't automatically build in parallel + Distributions like Gentoo and Debian have policies which make it + necessary to use some kind of environmental variable to control the + parallel build. +Author: Sven Eckelmann + +--- +diff --git a/Makefile b/Makefile +index 1a98d602abefcb0ee371ac097e9830782b446b9a..437a339a6b695baee8f15918f62f9aa2066e8447 100644 +--- a/Makefile ++++ b/Makefile +@@ -77,11 +77,8 @@ REVISION_VERSION=\"\ rv$(REVISION)\" + + BAT_VERSION= $(shell grep "^\#define SOURCE_VERSION " $(SOURCE_VERSION_HEADER) | sed -e '1p' -n | awk -F '"' '{print $$2}' | awk '{print $$1}') + FILE_NAME= $(PACKAGE_NAME)_$(BAT_VERSION)-rv$(REVISION)_$@ +-NUM_CPUS = $(shell NUM_CPUS=`cat /proc/cpuinfo | grep -v 'model name' | grep processor | tail -1 | awk -F' ' '{print $$3}'`;echo `expr $$NUM_CPUS + 1`) + +- +-all: +- $(MAKE) -j $(NUM_CPUS) $(BINARY_NAME) ++all: $(BINARY_NAME) + + $(BINARY_NAME): $(SRC_O) $(SRC_H) Makefile + $(Q_LD)$(CC) -o $@ $(SRC_O) $(LDFLAGS) diff -Nru batmand-0.3.2/debian/patches/series batmand-0.3.2/debian/patches/series --- batmand-0.3.2/debian/patches/series 2011-05-20 19:06:23.000000000 +0000 +++ batmand-0.3.2/debian/patches/series 2011-12-11 13:10:01.000000000 +0000 @@ -1,2 +1,6 @@ ftbfs_secondbuild.patch man_spelling_errors.patch +non_parallel_build.patch +build_rules.patch +install_manpage.patch +version_info.patch diff -Nru batmand-0.3.2/debian/patches/version_info.patch batmand-0.3.2/debian/patches/version_info.patch --- batmand-0.3.2/debian/patches/version_info.patch 1970-01-01 00:00:00.000000000 +0000 +++ batmand-0.3.2/debian/patches/version_info.patch 2011-12-11 13:10:01.000000000 +0000 @@ -0,0 +1,126 @@ +Description: Replace version info instead of appending them + The version number of batmand can get revision numbers added. This is useful to + give hints about the revision of a distribution package and the used patchset + or the commit which was used to build it. The prepended source number or branch + name doesn't add any additional information which would help to identify + problems and can therefore be omitted. +Author: Sven Eckelmann + +--- +diff --git a/Makefile b/Makefile +index 06cbfe6e67a7be376d28303b1e33a40a5fc2f0fc..4647503c31d66cd5c14af387bac52f98f790f62d 100644 +--- a/Makefile ++++ b/Makefile +@@ -53,7 +53,7 @@ MANPAGE = man/batmand.8 + + # batmand flags and options + CFLAGS += -pedantic -Wall -W -std=gnu99 -MD +-CPPFLAGS += -DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA $(NO_POLICY_ROUTING) -DREVISION_VERSION=$(REVISION_VERSION) ++CPPFLAGS += -DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA $(NO_POLICY_ROUTING) + LDLIBS += -lpthread + + # disable verbose output +@@ -80,8 +80,12 @@ SBINDIR = $(PREFIX)/sbin + MANDIR = $(PREFIX)/share/man + + # try to generate revision +-REVISION:= $(shell if [ -d .svn ]; then svn info | grep "Rev:" | sed -e '1p' -n | awk '{print $$4}'; else if [ -d ~/.svk ]; then echo $$(svk info | grep "Mirrored From" | awk '{print $$5}'); fi; fi) +-REVISION_VERSION=\"\ rv$(REVISION)\" ++REVISION= $(shell if [ -d .git ]; then \ ++ echo $$(git describe --always --dirty --match "v*" |sed 's/^v//' 2> /dev/null || echo "[unknown]"); \ ++ fi) ++ifneq ($(REVISION),) ++CPPFLAGS += -DSOURCE_VERSION=\"$(REVISION)\" ++endif + + # default target + all: $(BINARY_NAME) +diff --git a/batman.h b/batman.h +index 3e529e3535c5b853249762b4d101df93941a869e..e384922071ed7bc501b0bb83e20b304fe410a99b 100644 +--- a/batman.h ++++ b/batman.h +@@ -43,7 +43,9 @@ + + + +-#define SOURCE_VERSION "0.3.2" /* put exactly one distinct word inside the string like "0.3-pre-alpha" or "0.3-rc1" or "0.3" */ ++#ifndef SOURCE_VERSION ++#define SOURCE_VERSION "0.3.2" ++#endif + #define COMPAT_VERSION 5 + #define PORT 4305 + #define GW_PORT 4306 +@@ -66,11 +68,6 @@ + ***/ + + +-#ifndef REVISION_VERSION +-#define REVISION_VERSION "0" +-#endif +- +- + + /* + * No configuration files or fancy command line switches yet +diff --git a/originator.c b/originator.c +index d79584bb60f3f13b7374537c744d3740452b655b..0f53bbcf8b80755699ff583ac4107577322de2de 100644 +--- a/originator.c ++++ b/originator.c +@@ -449,7 +449,7 @@ void debug_orig(void) { + uptime_sec = (uint64_t)(get_time_msec64() / 1000); + + debug_output(2, "BOD\n"); +- debug_output(2, "%''12s (%s/%i) %''15s [%10s], gw_class ... [B.A.T.M.A.N. %s%s, MainIF/IP: %s/%s, UT: %id%2ih%2im] \n", "Gateway", "#", TQ_MAX_VALUE, "Nexthop", "outgoingIF", SOURCE_VERSION, (strlen(REVISION_VERSION) > 3 ? REVISION_VERSION : ""), ((struct batman_if *)if_list.next)->dev, orig_str, (uint32_t)(uptime_sec/86400), (uint32_t)((uptime_sec%86400)/3600), (uint32_t)((uptime_sec%3600)/60)); ++ debug_output(2, "%''12s (%s/%i) %''15s [%10s], gw_class ... [B.A.T.M.A.N. %s, MainIF/IP: %s/%s, UT: %id%2ih%2im] \n", "Gateway", "#", TQ_MAX_VALUE, "Nexthop", "outgoingIF", SOURCE_VERSION, ((struct batman_if *)if_list.next)->dev, orig_str, (uint32_t)(uptime_sec/86400), (uint32_t)((uptime_sec%86400)/3600), (uint32_t)((uptime_sec%3600)/60)); + + if ( list_empty( &gw_list ) ) { + +@@ -493,7 +493,7 @@ void debug_orig(void) { + uptime_sec = (uint64_t)(get_time_msec64() / 1000); + + debug_output(1, "BOD \n"); +- debug_output(1, " %-11s (%s/%i) %''15s [%10s]: %''20s ... [B.A.T.M.A.N. %s%s, MainIF/IP: %s/%s, UT: %id%2ih%2im] \n", "Originator", "#", TQ_MAX_VALUE, "Nexthop", "outgoingIF", "Potential nexthops", SOURCE_VERSION, (strlen(REVISION_VERSION) > 3 ? REVISION_VERSION : ""), ((struct batman_if *)if_list.next)->dev, orig_str, (uint32_t)(uptime_sec/86400), (uint32_t)((uptime_sec%86400)/3600), (uint32_t)((uptime_sec%3600)/60)); ++ debug_output(1, " %-11s (%s/%i) %''15s [%10s]: %''20s ... [B.A.T.M.A.N. %s, MainIF/IP: %s/%s, UT: %id%2ih%2im] \n", "Originator", "#", TQ_MAX_VALUE, "Nexthop", "outgoingIF", "Potential nexthops", SOURCE_VERSION, ((struct batman_if *)if_list.next)->dev, orig_str, (uint32_t)(uptime_sec/86400), (uint32_t)((uptime_sec%86400)/3600), (uint32_t)((uptime_sec%3600)/60)); + + if ( debug_clients.clients_num[3] > 0 ) { + +diff --git a/posix/init.c b/posix/init.c +index 4fe2324c06c45ba80010e837ee7e2df551ff954e..afd409fd3303d885021d4edb319a55b50e88cfa7 100644 +--- a/posix/init.c ++++ b/posix/init.c +@@ -166,9 +166,6 @@ void apply_init_args( int argc, char *argv[] ) { + stop = 0; + prog_name = argv[0]; + +- if ( strstr( SOURCE_VERSION, "-" ) != NULL ) +- printf( "WARNING: You are using the unstable batman branch. If you are interested in *using* batman get the latest stable release !\n" ); +- + while ( ( optchar = getopt_long( argc, argv, "a:A:bcd:hHio:g:p:r:s:vV", long_options, &option_index ) ) != -1 ) { + + switch ( optchar ) { +@@ -359,14 +356,14 @@ void apply_init_args( int argc, char *argv[] ) { + + case 'v': + +- printf("B.A.T.M.A.N. %s%s (compatibility version %i)\n", SOURCE_VERSION, (strlen(REVISION_VERSION) > 3 ? REVISION_VERSION : ""), COMPAT_VERSION); ++ printf("B.A.T.M.A.N. %s (compatibility version %i)\n", SOURCE_VERSION, COMPAT_VERSION); + exit(EXIT_SUCCESS); + + case 'V': + + print_animation(); + +- printf("\x1B[0;0HB.A.T.M.A.N. %s%s (compatibility version %i)\n", SOURCE_VERSION, (strlen(REVISION_VERSION) > 3 ? REVISION_VERSION : ""), COMPAT_VERSION); ++ printf("\x1B[0;0HB.A.T.M.A.N. %s (compatibility version %i)\n", SOURCE_VERSION, COMPAT_VERSION); + printf("\x1B[9;0H \t May the bat guide your path ...\n\n\n"); + + exit(EXIT_SUCCESS); +@@ -551,7 +548,7 @@ void apply_init_args( int argc, char *argv[] ) { + + } else { + +- printf("B.A.T.M.A.N. %s%s (compatibility version %i)\n", SOURCE_VERSION, (strlen(REVISION_VERSION) > 3 ? REVISION_VERSION : ""), COMPAT_VERSION); ++ printf("B.A.T.M.A.N. %s (compatibility version %i)\n", SOURCE_VERSION, COMPAT_VERSION); + + debug_clients.clients_num[ debug_level - 1 ]++; + debug_level_info = debugMalloc( sizeof(struct debug_level_info), 205 ); diff -Nru batmand-0.3.2/debian/rules batmand-0.3.2/debian/rules --- batmand-0.3.2/debian/rules 2011-05-20 19:06:23.000000000 +0000 +++ batmand-0.3.2/debian/rules 2011-12-11 13:10:01.000000000 +0000 @@ -1,29 +1,30 @@ #!/usr/bin/make -f # -*- makefile -*- +export DEB_BUILD_MAINT_OPTIONS=hardening=+pie export CFLAGS=$(shell dpkg-buildflags --get CFLAGS) export CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS) export CXXFLAGS=$(shell dpkg-buildflags --get CXXFLAGS) export LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS) -include /usr/share/hardening-includes/hardening.make -CFLAGS += $(HARDENING_CFLAGS) -CXXFLAGS += $(HARDENING_CFLAGS) -LDFLAGS += $(HARDENING_LDFLAGS) - REVISION=$(shell dpkg-parsechangelog|grep '^Version: '|sed 's/^Version:\s*//') -MAKEOPTIONS = V="1" REVISION_VERSION="\\\"\ debian-$(REVISION)\\\"" +MAKEOPTIONS = V="1" REVISION="debian-$(REVISION)" PREFIX="/usr" INSTALL=/usr/bin/install -%: +binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep: dh $@ --parallel --list-missing +get-orig-source: + $(CURDIR)/debian/get-orig-source.sh + override_dh_auto_build: - dh_auto_build -- all $(MAKEOPTIONS) + dh_auto_build -- $(MAKEOPTIONS) override_dh_auto_install: - dh_auto_install -- INSTALL_PREFIX="$(CURDIR)/debian/tmp" - $(INSTALL) -m 0644 -D $(CURDIR)/debian/batmand-default $(CURDIR)/debian/batmand/etc/default/batmand + dh_auto_install -- $(MAKEOPTIONS) override_dh_strip: dh_strip -a --dbg-package=batmand-dbg + +.PHONY: binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep \ + get-orig-source override_dh_auto_build override_dh_auto_install override_dh_strip