Update vnstat to 2.6
Feedback and ok solene@, maintainer timeout
This commit is contained in:
parent
b109a015dd
commit
3e0e24e194
@ -1,18 +1,17 @@
|
||||
# $OpenBSD: Makefile,v 1.33 2019/07/12 20:48:51 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.34 2020/10/31 08:55:41 rsadowski Exp $
|
||||
|
||||
COMMENT-main = network traffic monitor
|
||||
COMMENT-vnstati = image output support for vnstat
|
||||
|
||||
V = 1.14
|
||||
V = 2.6
|
||||
EPOCH = 0
|
||||
DISTNAME = vnstat-${V}
|
||||
PKGNAME-main = ${DISTNAME}
|
||||
PKGNAME-vnstati = vnstati-${V}
|
||||
REVISION-main = 0
|
||||
PKGNAME-main = ${DISTNAME}
|
||||
PKGNAME-vnstati = vnstati-${V}
|
||||
|
||||
CATEGORIES = net sysutils
|
||||
|
||||
HOMEPAGE = http://humdi.net/vnstat/
|
||||
HOMEPAGE = https://humdi.net/vnstat/
|
||||
|
||||
MASTER_SITES = ${HOMEPAGE}
|
||||
|
||||
@ -21,24 +20,28 @@ MAINTAINER = Pierre-Emmanuel Andre <pea@openbsd.org>
|
||||
# GPLv2
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
WANTLIB = c m
|
||||
WANTLIB-vnstati = ${WANTLIB} gd pthread
|
||||
WANTLIB = c sqlite3 m
|
||||
WANTLIB-vnstati = ${WANTLIB} gd sqlite3
|
||||
|
||||
MULTI_PACKAGES = -main -vnstati
|
||||
|
||||
LIB_DEPENDS-vnstati = graphics/gd
|
||||
LIB_DEPENDS-main = databases/sqlite3
|
||||
|
||||
LIB_DEPENDS-vnstati = graphics/gd \
|
||||
databases/sqlite3
|
||||
|
||||
RUN_DEPENDS-vnstati = net/vnstat
|
||||
|
||||
USE_GMAKE = Yes
|
||||
|
||||
NO_TEST = Yes
|
||||
CONFIGURE_STYLE = gnu
|
||||
|
||||
INSTALL_TARGET = bsdinstall
|
||||
|
||||
MAKE_FLAGS = CC="${CC}" CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib"
|
||||
CONFIGURE_ENV += LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib " \
|
||||
CFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include"
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/vnstat/
|
||||
${INSTALL_DATA} ${WRKSRC}/examples/vnstat.cgi ${PREFIX}/share/examples/vnstat/
|
||||
${INSTALL_DATA} ${WRKSRC}/cfg/vnstat.conf ${PREFIX}/share/examples/vnstat/
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (vnstat-1.14.tar.gz) = +EYqR9hdCJBJPcnq6vvHJa5jGqWxA/t/ivTdsjFOg4Y=
|
||||
SIZE (vnstat-1.14.tar.gz) = 103281
|
||||
SHA256 (vnstat-2.6.tar.gz) = iSduCnKBlD7bVUuHQHgnitlH3DEpOKJFHgPrgGeff/c=
|
||||
SIZE (vnstat-2.6.tar.gz) = 275751
|
||||
|
@ -1,59 +0,0 @@
|
||||
$OpenBSD: patch-Makefile,v 1.5 2015/06/01 16:23:09 pea Exp $
|
||||
|
||||
- From 6a34745f0e84a990a8fa48e1f1f25be0f08c92a9 Mon Sep 17 00:00:00 2001
|
||||
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
|
||||
Date: Sat, 3 Jan 2015 14:30:52 +0100
|
||||
Subject: [PATCH] Allow for overriding BIN, SBIN and MAN
|
||||
|
||||
- From e4b9c2747bb044f48b35ea02294e73d7c366d9d9 Mon Sep 17 00:00:00 2001
|
||||
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
|
||||
Date: Sat, 3 Jan 2015 14:34:50 +0100
|
||||
Subject: [PATCH] make the path to vnstat.conf variable
|
||||
|
||||
- From ee354ae5e61f332d22b9242f5a2d5af07e4a5373 Mon Sep 17 00:00:00 2001
|
||||
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
|
||||
Date: Sun, 4 Jan 2015 22:04:20 +0100
|
||||
Subject: [PATCH] Adjust manpages for /var/db/ too, just like vnstat.conf
|
||||
|
||||
--- Makefile.orig Mon Jan 5 23:19:37 2015
|
||||
+++ Makefile Mon Jun 1 16:37:25 2015
|
||||
@@ -5,11 +5,12 @@ MAN ?= $(DESTDIR)/usr/share/man
|
||||
ETC ?= $(DESTDIR)/etc/
|
||||
|
||||
# bin and man dirs for *BSD
|
||||
-BIN_BSD ?= $(DESTDIR)/usr/local/bin
|
||||
-SBIN_BSD ?= $(DESTDIR)/usr/local/sbin
|
||||
-MAN_BSD ?= $(DESTDIR)/usr/local/man
|
||||
-ETC_BSD ?= $(DESTDIR)/etc
|
||||
+BIN_BSD ?= ${PREFIX}/bin
|
||||
+SBIN_BSD ?= ${PREFIX}/sbin
|
||||
+MAN_BSD ?= ${PREFIX}/man
|
||||
+ETC_BSD ?= ${PREFIX}/share/examples/vnstat
|
||||
|
||||
+
|
||||
.PHONY: vnstat tests check all clean debug install uninstall bsdinstall bsduninstall dist
|
||||
|
||||
default: vnstat
|
||||
@@ -140,7 +141,6 @@ bsdinstall:
|
||||
fi
|
||||
|
||||
# install binaries
|
||||
- install -d -m 755 $(DESTDIR)/var/db/vnstat
|
||||
install -s -m 755 src/vnstat $(BIN_BSD)
|
||||
install -s -m 755 src/vnstatd $(SBIN_BSD)
|
||||
|
||||
@@ -166,14 +166,9 @@ bsdinstall:
|
||||
install -m 644 man/vnstat.1 $(MAN_BSD)/man1
|
||||
install -m 644 man/vnstatd.1 $(MAN_BSD)/man1
|
||||
install -m 644 man/vnstat.conf.5 $(MAN_BSD)/man5
|
||||
- gzip -f9 $(MAN_BSD)/man1/vnstat.1
|
||||
- gzip -f9 $(MAN_BSD)/man1/vnstatd.1
|
||||
- gzip -f9 $(MAN_BSD)/man5/vnstat.conf.5
|
||||
@if [ -f "src/vnstati" ]; \
|
||||
then echo install -m 644 man/vnstati.1 $(MAN_BSD)/man1; \
|
||||
install -m 644 man/vnstati.1 $(MAN_BSD)/man1; \
|
||||
- echo gzip -f9 $(MAN_BSD)/man1/vnstati.1; \
|
||||
- gzip -f9 $(MAN_BSD)/man1/vnstati.1; \
|
||||
fi
|
||||
|
||||
# remove vnstat.conf.1 is such exists in the wrong place
|
@ -1,12 +1,16 @@
|
||||
$OpenBSD: patch-cfg_vnstat_conf,v 1.2 2015/01/05 09:46:42 jasper Exp $
|
||||
--- cfg/vnstat.conf.orig Thu Aug 28 22:23:58 2014
|
||||
+++ cfg/vnstat.conf Sat Jan 3 14:39:44 2015
|
||||
@@ -2,7 +2,7 @@
|
||||
$OpenBSD: patch-cfg_vnstat_conf,v 1.3 2020/10/31 08:55:41 rsadowski Exp $
|
||||
Index: cfg/vnstat.conf
|
||||
--- cfg/vnstat.conf.orig
|
||||
+++ cfg/vnstat.conf
|
||||
@@ -2,10 +2,7 @@
|
||||
##
|
||||
|
||||
# default interface
|
||||
-Interface "eth0"
|
||||
# default interface (leave empty for automatic selection)
|
||||
-Interface ""
|
||||
-
|
||||
-# location of the database directory
|
||||
-DatabaseDir "/var/lib/vnstat"
|
||||
+Interface "lo0"
|
||||
|
||||
# location of the database directory
|
||||
DatabaseDir "/var/lib/vnstat"
|
||||
# locale (LC_ALL) ("-" = use system locale)
|
||||
Locale "-"
|
||||
|
@ -1,14 +0,0 @@
|
||||
$OpenBSD: patch-src_Makefile,v 1.5 2018/04/18 10:25:06 kn Exp $
|
||||
--- src/Makefile.orig Sun Mar 29 20:56:55 2015
|
||||
+++ src/Makefile Mon Jun 1 16:28:52 2015
|
||||
@@ -1,8 +1,9 @@
|
||||
ifeq "$(origin CC)" "default"
|
||||
CC = gcc
|
||||
endif
|
||||
+CC ?= gcc
|
||||
CFLAGS ?= -O2
|
||||
-LDLIBS = -lm
|
||||
+LDLIBS ?= -lm
|
||||
OBJS = vnstat.o ifinfo.o dbxml.o dbjson.o dbshow.o dbaccess.o dbmerge.o common.o misc.o cfg.o ibw.o traffic.o
|
||||
DOBJS = vnstatd.o ifinfo.o dbaccess.o dbcache.o common.o misc.o cfg.o ibw.o daemon.o
|
||||
IOBJS = vnstati.o image.o dbaccess.o dbmerge.o common.o misc.o cfg.o
|
@ -1,11 +1,12 @@
|
||||
@comment $OpenBSD: PLIST-main,v 1.5 2018/09/04 12:46:19 espie Exp $
|
||||
@comment $OpenBSD: PLIST-main,v 1.6 2020/10/31 08:55:41 rsadowski Exp $
|
||||
@pkgpath net/vnstat
|
||||
@newgroup _vnstat:658
|
||||
@newuser _vnstat:658:_vnstat:daemon:vnstat daemon:/var/db/vnstat:/sbin/nologin
|
||||
@rcscript ${RCDIR}/vnstatd
|
||||
@bin bin/vnstat
|
||||
@man man/man1/vnstat.1
|
||||
@man man/man1/vnstatd.1
|
||||
@man man/man5/vnstat.conf.5
|
||||
@man man/man8/vnstatd.8
|
||||
@bin sbin/vnstatd
|
||||
@owner _vnstat
|
||||
@sample /var/log/vnstat/
|
||||
@ -17,4 +18,3 @@ share/doc/pkg-readmes/${PKGSTEM}
|
||||
share/examples/vnstat/
|
||||
share/examples/vnstat/vnstat.conf
|
||||
@sample ${SYSCONFDIR}/vnstat.conf
|
||||
@rcscript ${RCDIR}/vnstatd
|
||||
|
@ -1,23 +1,23 @@
|
||||
$OpenBSD: README-main,v 1.3 2018/09/04 12:46:19 espie Exp $
|
||||
$OpenBSD: README-main,v 1.4 2020/10/31 08:55:41 rsadowski Exp $
|
||||
|
||||
+-----------------------------------------------------------------------
|
||||
| Running ${PKGSTEM} on OpenBSD
|
||||
+-----------------------------------------------------------------------
|
||||
|
||||
1) Launch vnstat --iflist to see all the available interfaces.
|
||||
1) Edit ${SYSCONFDIR}/vnstat.conf if necessary.
|
||||
|
||||
2) For each interface that you want to monitor, launch this command:
|
||||
# su -m _vnstat -c "vnstat -i interface -u"
|
||||
This will create the database for the specified interface.
|
||||
2) Start the vnstatd daemon:
|
||||
# rcctl start vnstatd
|
||||
|
||||
3) Edit ${SYSCONFDIR}/vnstat.conf if necessary.
|
||||
3) Run "vnstat --iflist" to see all the available interfaces.
|
||||
|
||||
4) Finally launch the vnstatd daemon:
|
||||
# ${RCDIR}/vnstatd start
|
||||
4) For each interface that you want to monitor, launch this command:
|
||||
# su -m _vnstat -c "vnstat --add -i INTERFACE"
|
||||
This will create the database for the specified interface. Otherwise you can
|
||||
also adjust "Interface" in ${SYSCONFDIR}/vnstat.conf.
|
||||
|
||||
5) Create graphics with the command vnstati (you have to install vnstati)
|
||||
|
||||
|
||||
Random hints:
|
||||
* You can enable debug in ${SYSCONFDIR}/vnstat.conf and check
|
||||
the logs in /var/log/vnstat/vnstat.log
|
||||
|
Loading…
x
Reference in New Issue
Block a user