commit: d7020024ba12df55773ebdd034a800aafe0a7124
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 13 13:34:55 2017 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Fri Oct 13 13:35:26 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7020024
net-analyzer/vnstat: Fix test, remove 26 volume elog epic.
Package-Manager: Portage-2.3.11, Repoman-2.3.3
net-analyzer/vnstat/files/vnstat-1.17-limit.patch | 11 ++++++
net-analyzer/vnstat/vnstat-1.17-r1.ebuild | 47 ++---------------------
2 files changed, 14 insertions(+), 44 deletions(-)
diff --git a/net-analyzer/vnstat/files/vnstat-1.17-limit.patch
b/net-analyzer/vnstat/files/vnstat-1.17-limit.patch
new file mode 100644
index 00000000000..e1706977e52
--- /dev/null
+++ b/net-analyzer/vnstat/files/vnstat-1.17-limit.patch
@@ -0,0 +1,11 @@
+--- a/tests/config_tests.c
++++ b/tests/config_tests.c
+@@ -99,7 +99,7 @@
+ cfg.maxbw = 10;
+ ret = ibwget("ethnone", &limit);
+ ck_assert_int_eq(ret, 1);
+- ck_assert_int_eq(limit, 8);
++ ck_assert_int_eq(limit, 10);
+ }
+ END_TEST
+
diff --git a/net-analyzer/vnstat/vnstat-1.17-r1.ebuild
b/net-analyzer/vnstat/vnstat-1.17-r1.ebuild
index 0c24c6dc601..2805e1d0d1c 100644
--- a/net-analyzer/vnstat/vnstat-1.17-r1.ebuild
+++ b/net-analyzer/vnstat/vnstat-1.17-r1.ebuild
@@ -24,6 +24,9 @@ RDEPEND="
${COMMON_DEPEND}
selinux? ( sec-policy/selinux-vnstatd )
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.17-limit.patch
+)
pkg_setup() {
enewgroup vnstat
@@ -77,47 +80,3 @@ src_install() {
newdoc INSTALL README.setup
dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi
}
-
-pkg_postinst() {
- local _v
- for _v in ${REPLACING_VERSIONS}; do
- if ! version_is_at_least 1.17-r1 ${_v}; then
- # This is an upgrade
- elog ""
- elog "Beginning with ${PN}-1.17-r1, we no longer
install and use the cron job"
- elog "per default to update vnStat databases because
you will lose some traffic"
- elog "if your interface transfers more than ~4GB in the
time between two cron"
- elog "runs".
- elog ""
- elog "Please make sure that the vnstatd service is
enabled if you want to"
- elog "continue monitoring your traffic."
-
- # Show this elog only once
- break
- fi
- done
-
- if [[ -z "${REPLACING_VERSIONS}" ]]; then
- # This is a new installation
-
- elog
- elog "Repeat the following command for every interface you"
- elog "wish to monitor (replace eth0):"
- elog " vnstat -u -i eth0"
- elog "and set correct permissions after that, e.g."
- elog " chown -R vnstat:vnstat /var/lib/vnstat"
- elog
- elog "It is highly recommended to use the included vnstatd to
update your"
- elog "vnStat databases."
- elog
- elog "If you want to use the old cron way to update your vnStat
databases,"
- elog "you have to install the cron job manually:"
- elog ""
- elog " cp /usr/share/${PN}/vnstat.cron
/etc/cron.hourly/vnstat"
- elog ""
- elog "Note: if an interface transfers more than ~4GB in"
- elog "the time between cron runs, you may miss traffic."
- elog "That's why using vnstatd instead of the cronjob is"
- elog "the recommended way to update your vnStat databases."
- fi
-}