debian/0000775000000000000000000000000012630664236007200 5ustar debian/vnstat.postinst0000664000000000000000000000061412624364646012332 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/vnstat.init0000664000000000000000000000306412624364646011414 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/compat0000664000000000000000000000000212624364646010403 0ustar 9 debian/rules0000775000000000000000000000023012624364646010260 0ustar #!/usr/bin/make -f %: dh $@ --parallel --with systemd override_dh_auto_build: dh_auto_build -- all override_dh_install: dh_install --fail-missing debian/changelog0000664000000000000000000001720712630664236011061 0ustar vnstat (1.14-1ubuntu2) xenial; urgency=medium * Revert removal of patch from series, now that we have a sufficient version of check. This package can be synced when there's a new version in Debian. -- Logan Rosen Sat, 05 Dec 2015 17:43:09 -0500 vnstat (1.14-1ubuntu1) xenial; urgency=medium * Merge from Debian unstable. Remaining changes: - Remove link_subunit.diff from series, as it won't be necessary until we have check (>= 0.10.0-1). -- Logan Rosen Sun, 22 Nov 2015 17:40:53 -0500 vnstat (1.14-1) unstable; urgency=medium * New upstream release. - Auto-detects max. bandwidth of interfaces. (Closes: #804868) * Drop patches that have been applied upstream: - fix_manpages.diff - tests_root_group.diff * Refrsh debian_build_system.diff. * Link against subunit to fix building of the tests. - Add link_subunit.diff -- Felix Geyer Sun, 22 Nov 2015 11:28:51 +0100 vnstat (1.12-2.1ubuntu1) xenial; urgency=medium * Remove subunit.patch from series, as it won't be necessary until we have check (>= 0.10.0-1). -- Logan Rosen Sun, 15 Nov 2015 20:12:55 -0500 vnstat (1.12-2.1) unstable; urgency=medium * Non-maintainer upload. * Fix "FTBFS: undefined reference to `subunit_test_error'": add patch from Mathieu Malaterre: link against subunit. (Closes: #799822) -- gregor herrmann Sat, 17 Oct 2015 20:45:11 +0200 vnstat (1.12-2) unstable; urgency=medium * Fix test failures on non-linux architectures. - Add tests_root_group.diff -- Felix Geyer Sat, 06 Sep 2014 11:15:07 +0200 vnstat (1.12-1) unstable; urgency=low * New upstream release. - Fix: Live traffic meter occasionally showing higher minimum than average in end statistics. (Closes: #687812) - Fix: Setting locale when none is specified in config. (Closes: #606397) * Refresh patches. * Build-depend on check for the new test suite. * Install the upstream systemd service file. (Closes: #635751) - Add systemd_user.diff to run vnstatd as user vnstat like the init script does. -- Felix Geyer Wed, 03 Sep 2014 22:55:57 +0200 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/copyright0000664000000000000000000000277312624364646011151 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/patches/0000775000000000000000000000000012630664174010630 5ustar debian/patches/debian_build_system.diff0000664000000000000000000000327712624364646015504 0ustar --- a/Makefile +++ b/Makefile @@ -35,30 +35,12 @@ debug: 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 "$(ETC)/vnstat.conf" ]; \ then echo "Installing config to $(ETC)/vnstat.conf"; \ @@ -84,23 +66,6 @@ install: 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 service file or startup script has been installed. See the" @echo "INSTALL document for instructions on how to enable vnStat." debian/patches/link_subunit.diff0000664000000000000000000000072512624314004014157 0ustar --- a/tests/Makefile +++ b/tests/Makefile @@ -3,7 +3,7 @@ CC = gcc endif CFLAGS ?= -Wall -Wextra -g CFLAGS += -DPROCNETDEV=\"testdir/proc/dev\" -DSYSCLASSNET=\"testdir/sysclassnet\" -LDLIBS = -lm -lcheck -lrt -lpthread +LDLIBS = -lm -lcheck -lrt -lpthread -lsubunit OBJS = vnstat_tests.o common_tests.o database_tests.o config_tests.o ifinfo_tests.o misc_tests.o daemon_tests.o OBJS += common.o ifinfo.o dbshow.o dbaccess.o dbcache.o cfg.o ibw.o misc.o daemon.o debian/patches/series0000664000000000000000000000011712630664174012044 0ustar debian_build_system.diff pidfile_path.diff systemd_user.diff link_subunit.diff debian/patches/systemd_user.diff0000664000000000000000000000051012624364646014210 0ustar Description: Run vnstatd as user vnstat. Author: Felix Geyer --- a/examples/systemd/vnstat.service +++ b/examples/systemd/vnstat.service @@ -6,6 +6,7 @@ After=network.target [Service] ExecStart=/usr/sbin/vnstatd -n ExecReload=/bin/kill -HUP $MAINPID +User=vnstat [Install] WantedBy=multi-user.target debian/patches/pidfile_path.diff0000664000000000000000000000055312624364646014121 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 @@ -105,7 +105,7 @@ UseLogging 2 LogFile "/var/log/vnstat/vnstat.log" # file used as daemon pid / lock file -PidFile "/var/run/vnstat/vnstat.pid" +PidFile "/run/vnstat/vnstat.pid" # vnstati debian/vnstati.examples0000664000000000000000000000002412624364646012431 0ustar examples/vnstat.cgi debian/control0000664000000000000000000000237712624364646010621 0ustar Source: vnstat Section: net Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Felix Geyer Build-Depends: debhelper (>= 9), libgd-dev, check, dh-systemd (>= 1.4) Standards-Version: 3.9.5 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.dirs0000664000000000000000000000001712624364646011405 0ustar var/lib/vnstat debian/watch0000664000000000000000000000006712624364646010241 0ustar version=3 http://humdi.net/vnstat/vnstat-(.*)\.tar\.gz debian/vnstat.docs0000664000000000000000000000001312624364646011370 0ustar FAQ README debian/source/0000775000000000000000000000000012624364646010505 5ustar debian/source/format0000664000000000000000000000001412624364646011713 0ustar 3.0 (quilt) debian/vnstati.install0000664000000000000000000000005512624364646012265 0ustar usr/bin/vnstati usr/share/man/man1/vnstati.1 debian/vnstat.install0000664000000000000000000000027612624364646012121 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 examples/systemd/vnstat.service lib/systemd/system/