debian/0000755000000000000000000000000012152717137007174 5ustar debian/rules0000755000000000000000000000021112151145403010234 0ustar #!/usr/bin/make -f %: dh $@ --parallel override_dh_auto_build: dh_auto_build -- all override_dh_install: dh_install --fail-missing debian/source/0000755000000000000000000000000012151143700010460 5ustar debian/source/format0000644000000000000000000000001412151143700011666 0ustar 3.0 (quilt) debian/vnstati.examples0000644000000000000000000000002412151143700012404 0ustar examples/vnstat.cgi debian/vnstat.install0000644000000000000000000000021212151143700012062 0ustar usr/bin/vnstat usr/sbin/vnstatd etc/vnstat.conf usr/share/man/man1/vnstat.1 usr/share/man/man1/vnstatd.1 usr/share/man/man5/vnstat.conf.5 debian/compat0000644000000000000000000000000212151144616010365 0ustar 9 debian/changelog0000644000000000000000000001267312152717137011057 0ustar vnstat (1.11-2) unstable; urgency=low * Adopt the package. (Closes: #632840) * Make sure all build flags are passed to the compiler. - Switch to debhelper compat level 9. - Update debian_build_system.diff * Drop unnecessary changes to Makefile in debian_build_system.diff. * Enable parallel building. * Pass --fail-missing to dh_install. * Add Vcs control fields. * Bump Standards-Version to 3.9.4, no changes needed. * Drop vnstat.preinst as upgrades from version 1.6 aren't supported anymore. * Run the vnstat daemon as its own user. - Create the new user and chown the database in postinst. - Add pidfile_path.diff to update the pid file path in the config file. * Build-depend on libgd-dev instead of libgd2-xpm-dev. -- Felix Geyer Sun, 02 Jun 2013 21:34:53 +0200 vnstat (1.11-1) unstable; urgency=low * QA upload. * Upload to unstable. * New upstream release. * debian/patches/adapt_to_kfreebsd.diff: - Removed, applied upstream. * debian/patches/debian_build_system.diff, debian/patches/fix_manpages.diff: - Refresh patches for new upstream release. * debian/control: - Set Maintainer to Debian QA group. - Remove DMUA field. - Remove Vcs-* fields. - Bump Standards-Version to 3.9.2; no changes required. -- Luca Falavigna Sat, 23 Jul 2011 17:02:51 +0200 vnstat (1.10-2) experimental; urgency=low * Update debian/copyright. * debian/control: add Vcs-* fields. * Enable functionality for GNU/kFreeBSD. Thanks to Mats Erik Andersson for the patch. Closes: #608963 * Bump Standards-Version to 3.9.1; no changes required. -- Iulian Udrea Wed, 05 Jan 2011 12:48:43 +0000 vnstat (1.10-1) unstable; urgency=low * New maintainer. * Ack non-maintainer uploads. * debian/control: - Bump Standards-Version to 3.8.4; no changes required. * Update debian/copyright to machine-readable format (http://dep.debian.net/deps/dep5/). * Rewrite debian/rules. * Switch to 3.0 (quilt) source format. -- Iulian Udrea Tue, 20 Apr 2010 16:52:54 +0100 vnstat (1.10-0.1) unstable; urgency=low * Non-maintainer upload. * New upstream release. (Closes: #561297) + Fix manpages - present options and elements in alphabetical order. (Closes: #561304) * debian/patches: + refreshed fix_manpages.diff * debian/README.source: + add it because policy requires it. * debian/control: + Add ${misc:Depends} to Depends to remove lintian warning. * Update copyright information. -- Ilya Pravdivtsev Tue, 19 Jan 2010 00:06:14 +0300 vnstat (1.9-0.2) unstable; urgency=low * Non-maintainer upload. * New upstream release. + Fix vnstat collects data from the wrong interface. (Closes: #512566) + Cron entry is no longer used. (Closes: #338818) * debian/patches: + updated to new version. + added fix_manpages.diff to remove lintian warnings "manpage-has-bad-whatis-entry". * debian/control: + remove Vcs-* fields. + added libgd2-xpm-dev to build-depends. * Standards-Version was bumped to 3.8.3 * Upgrading package to debhelper 7. * Add package for vnstati. * Cron script replaced by init script. * Remove /etc/network/if-*.d/vnstat and /etc/ppp/ip-*.d/vnstat in preinst. These scripts aren't needed when the daemon is used. -- Ilya Pravdivtsev Mon, 28 Sep 2009 07:24:51 +0400 vnstat (1.6-1) unstable; urgency=low * New upstream release. (Closes: #456407) + Fix vnstat does not show any traffic. (Closes: #372943) + Fix 64-bit kernel produces "not enough data yet". (Closes: #300671) + Fix rx value not parsed if interface name is longer than 6 characters. (Closes: #443168) + Fix impossibly large spikes of traffic. (Closes: #317350) * Switch from dpatch to quilt. + Create debian_build_system.diff by refreshing old 01_debian_build_system.dpatch. + Remove no longer needed 02_fix_manpage.dpatch. * Bump Standards-Version to 3.7.3. * Add the Homepage field and remove it from the long description. * Add the Vcs-Git/Vcs-Browser fields. * Add the DM-Upload-Allowed field. * Fix lintian warning "debian-rules-ignores-make-clean-error line 33". -- Aurélien GÉRÔME Tue, 05 Feb 2008 13:55:32 +0100 vnstat (1.4-4) unstable; urgency=low * New maintainer. (Closes: #394800) * Conform to policy by using "-Wall -g -O2" as CFLAGS. * Add dpatch support. * Add debian/watch file. -- Aurélien GÉRÔME Mon, 23 Oct 2006 15:05:16 +0200 vnstat (1.4-3) unstable; urgency=low * QA Upload. * ACK NMU (Closes: #336168). * Set maintainer to Debian QA Group. * Set debhelper compatibility to 5. * Set Standards-Version to 3.7.2. -- Anibal Monsalve Salazar Mon, 23 Oct 2006 18:29:53 +1000 vnstat (1.4-2.1) unstable; urgency=high * Non-maintainer upload. * Build on any architecture (Closes: #336168). -- Luk Claes Sun, 29 Jan 2006 10:11:49 +0100 vnstat (1.4-2) unstable; urgency=low * Minor script enhancements (Closes: #240341) -- Teemu Toivola Wed, 9 Jun 2004 12:29:28 +0300 vnstat (1.4-1) unstable; urgency=low * New upstream release. -- Teemu Toivola Fri, 26 Mar 2004 22:29:11 +0200 vnstat (1.3-1) unstable; urgency=low * Initial Release. -- Teemu Toivola Tue, 16 Mar 2004 00:10:54 +0200 debian/vnstat.init0000644000000000000000000000306412151203565011375 0ustar #! /bin/sh ### BEGIN INIT INFO # Provides: vnstat # Required-Start: $local_fs $remote_fs $network # Required-Stop: $local_fs $remote_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: lightweight network traffic monitor ### END INIT INFO PATH=/usr/sbin:/usr/bin:/sbin:/bin DESC="vnStat daemon" NAME=vnstatd PIDFILE=/run/vnstat/vnstat.pid DAEMON=/usr/sbin/$NAME DAEMON_ARGS="-d --pidfile $PIDFILE" SCRIPTNAME=/etc/init.d/vnstat USER=vnstat . /lib/lsb/init-functions # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" if [ ! -d /run/vnstat ]; then mkdir /run/vnstat fi chown $USER:$USER /run/vnstat start-stop-daemon --start --quiet --oknodo --chuid $USER \ --exec $DAEMON -- $DAEMON_ARGS log_end_msg $? ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" start-stop-daemon --stop --quiet --oknodo --retry=TERM/15/KILL/5 --pidfile $PIDFILE \ --name $NAME status=$? rm -f $PIDFILE log_end_msg $? ;; status) pidofproc -p $PIDFILE $DAEMON >/dev/null status=$? if [ $status -eq 0 ]; then log_success_msg "$DESC is running" else log_failure_msg "$DESC is not running" fi exit $status ;; reload|force-reload) log_daemon_msg "Reloading $DESC configuration..." start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME log_end_msg $? ;; restart) $0 stop sleep 1 $0 start ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" exit 1 ;; esac debian/control0000644000000000000000000000221712152716106010574 0ustar Source: vnstat Section: net Priority: optional Maintainer: Felix Geyer Build-Depends: debhelper (>= 9), libgd-dev Standards-Version: 3.9.4 Homepage: http://humdi.net/vnstat/ Vcs-Git: git://anonscm.debian.org/collab-maint/vnstat.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/vnstat.git Package: vnstat Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, adduser Suggests: vnstati Description: console-based network traffic monitor vnStat is a network traffic monitor for Linux. It keeps a log of daily network traffic for the selected interface(s). vnStat is not a packet sniffer. The traffic information is analyzed from the /proc filesystem, so vnStat can be used without root permissions. Package: vnstati Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, vnstat (= ${binary:Version}) Description: image output support for vnStat vnStati provides image output support for statistics collected using vnStat. The image file format is limited to png. All basic outputs of vnStat are supported excluding live traffic features. The image can be outputted either to a file or to standard output. debian/vnstat.dirs0000644000000000000000000000001712151143700011360 0ustar var/lib/vnstat debian/watch0000644000000000000000000000006712151143700010214 0ustar version=3 http://humdi.net/vnstat/vnstat-(.*)\.tar\.gz debian/copyright0000644000000000000000000000277312151143700011124 0ustar Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat Upstream-Name: vnstat Upstream-Maintainer: Teemu Toivola Upstream-Source: http://humdi.net/vnstat/ Files: * Copyright: Copyright (c) 2002-10 Teemu Toivola License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. On Debian systems, the complete text of the GNU General Public 28 License can be found in the file `/usr/share/common-licenses/GPL-2'. Files: examples/vnstat.cgi Copyright: copyright (c) 2008-2009 Teemu Toivola copyright (c) 2000-2007 ETH Zurich copyright (c) 2000-2007 David Schweikert License: GPL-any Unspecified GPL license. Files: debian/* Copyright: Copyright (C) 2004 Teemu Toivola Copyright (C) 2006-2010 Aurélien GÉRÔME Copyright (C) 2010 Iulian Udrea License: GPL-2 See above. debian/vnstati.install0000644000000000000000000000005512151143700012240 0ustar usr/bin/vnstati usr/share/man/man1/vnstati.1 debian/vnstat.docs0000644000000000000000000000001312151143700011343 0ustar FAQ README debian/vnstat.postinst0000644000000000000000000000061412151201260012301 0ustar #!/bin/sh set -e if [ "$1" = "configure" ]; then # run on upgrade and new package installation if dpkg --compare-versions "$2" lt "1.11-2~"; then if ! getent passwd vnstat >/dev/null; then adduser --system --group --quiet --no-create-home --home /var/lib/vnstat vnstat fi chown root:vnstat /etc/vnstat.conf chown -R vnstat:vnstat /var/lib/vnstat fi fi #DEBHELPER# debian/patches/0000755000000000000000000000000012151177654010626 5ustar debian/patches/fix_manpages.diff0000644000000000000000000000373712151143700014114 0ustar Index: vnstat-1.10/man/vnstat.conf.5 =================================================================== --- vnstat-1.10.orig/man/vnstat.conf.5 2010-01-19 00:44:29.000000000 +0300 +++ vnstat-1.10/man/vnstat.conf.5 2010-01-19 00:52:02.000000000 +0300 @@ -15,8 +15,8 @@ .BR vnstatd (1) all use the same configuration file for storing configuration data. Some of the settings are common for all three programs. The file -contains keyword-argument pairs, one per line. Lines starting with -'#' and empty lines are interpreted as comments and not processed. +contains keyword-argument pairs, one per line. Lines starting with '#' +and empty lines are interpreted as comments and not processed. Arguments may optionally be enclosed in double quotes (") in order to represent arguments containing spaces. Arguments can be padded with spaces or tabulator characters. A hardcoded default value @@ -108,7 +108,7 @@ .TP .BI Sampletime -Defines how many seconds the -tr option will sample traffic. (vnstat only) +Defines how many seconds the \-tr option will sample traffic. (vnstat only) .TP .BI TrafficlessDays Index: vnstat-1.10/man/vnstatd.1 =================================================================== --- vnstat-1.10.orig/man/vnstatd.1 2010-01-19 00:52:57.000000000 +0300 +++ vnstat-1.10/man/vnstatd.1 2010-01-19 00:53:07.000000000 +0300 @@ -1,7 +1,7 @@ .TH VNSTATD 1 "JUNE 2011" "version 1.11" "User Manuals" .SH NAME -vnStat daemon \- the alternative for cron based updating +vnStatd \- the alternative for cron based updating .SH SYNOPSIS Index: vnstat-1.10/man/vnstati.1 =================================================================== --- vnstat-1.10.orig/man/vnstati.1 2010-01-19 00:53:13.000000000 +0300 +++ vnstat-1.10/man/vnstati.1 2010-01-19 00:53:59.000000000 +0300 @@ -1,7 +1,7 @@ .TH VNSTATI 1 "JUNE 2011" "version 1.11" "User Manuals" .SH NAME -vnStat image output \- png image output support for vnStat +vnStati \- png image output support for vnStat .SH SYNOPSIS debian/patches/debian_build_system.diff0000644000000000000000000000367512151145131015461 0ustar --- a/Makefile +++ b/Makefile @@ -22,30 +18,12 @@ install: @echo "Installing vnStat..." -# check that system is really Linux - @if [ `uname` != "Linux" ]; \ - then echo "This isn't a Linux system. Maybe 'make bsdinstall' is what you need?"; \ - false; \ - fi - # check that there's something to install @if [ ! -f "src/vnstat" ] || [ ! -f "src/vnstatd" ]; \ then echo "Nothing to install, run make first."; \ false; \ fi -# move some really old version database(s) if found - @if [ -d "$(DESTDIR)/var/spool/vnstat" ]; \ - then echo "Moving old database(s) to new location..."; \ - mv -f $(DESTDIR)/var/spool/vnstat $(DESTDIR)/var/lib/; \ - fi - -# remove some really old version binary if found - @if [ -x "$(DESTDIR)/usr/local/bin/vnstat" ]; \ - then echo "Removing old binary..."; \ - rm -f $(DESTDIR)/usr/local/bin/vnstat; \ - fi - # install default config if such doesn't exist @if [ ! -f "$(DESTDIR)/etc/vnstat.conf" ]; \ then echo "Installing config to $(DESTDIR)/etc/vnstat.conf"; \ @@ -69,23 +47,6 @@ then echo install -m 644 man/vnstati.1 $(MAN)/man1; \ install -m 644 man/vnstati.1 $(MAN)/man1; \ fi - - @if [ -f $(MAN)/man1/vnstat.1.gz ]; \ - then gzip -f9 $(MAN)/man1/vnstat.1; \ - gzip -f9 $(MAN)/man1/vnstatd.1; \ - gzip -f9 $(MAN)/man5/vnstat.conf.5; \ - if [ -f "src/vnstati" ]; \ - then gzip -f9 $(MAN)/man1/vnstati.1; \ - fi; \ - fi - -# remove vnstat.conf.1 is such exists in the wrong place - @if [ -f $(MAN)/man1/vnstat.conf.1.gz ]; \ - then rm -f $(MAN)/man1/vnstat.conf.1.gz; \ - fi - @if [ -f $(MAN)/man1/vnstat.conf.1 ]; \ - then rm -f $(MAN)/man1/vnstat.conf.1; \ - fi @echo " " @echo "No startup script or cron entry has been installed. See the" --- a/src/Makefile +++ b/src/Makefile @@ -0,5 +0,5 @@ CC = gcc -CFLAGS = -O2 +CFLAGS ?= -O2 LDLIBS = -lm OBJS = vnstat.o ifinfo.o dbxml.o dbshow.o dbaccess.o dbmerge.o common.o misc.o cfg.o traffic.o DOBJS = vnstatd.o ifinfo.o dbaccess.o dbcache.o common.o misc.o cfg.o debian/patches/pidfile_path.diff0000644000000000000000000000053312151177654014111 0ustar Description: Adjust PidFile path to the new location. Author: Felix Geyer --- vnstat-1.11.orig/cfg/vnstat.conf +++ vnstat-1.11/cfg/vnstat.conf @@ -93,7 +93,7 @@ UseLogging 2 LogFile "/var/log/vnstat.log" # file used as daemon pid / lock file -PidFile "/var/run/vnstat.pid" +PidFile "/run/vnstat/vnstat.pid" # vnstati debian/patches/series0000644000000000000000000000007512151174012012026 0ustar debian_build_system.diff fix_manpages.diff pidfile_path.diff