diff options
author | Jeroen Roovers <jer@gentoo.org> | 2017-10-13 15:34:55 +0200 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2017-10-13 15:35:26 +0200 |
commit | d7020024ba12df55773ebdd034a800aafe0a7124 (patch) | |
tree | 750b319862020f2cec99737fe950f679f9aa4737 /net-analyzer/vnstat | |
parent | dev-libs/libzia: Initial commit (diff) | |
download | gentoo-d7020024ba12df55773ebdd034a800aafe0a7124.tar.gz gentoo-d7020024ba12df55773ebdd034a800aafe0a7124.tar.bz2 gentoo-d7020024ba12df55773ebdd034a800aafe0a7124.zip |
net-analyzer/vnstat: Fix test, remove 26 volume elog epic.
Package-Manager: Portage-2.3.11, Repoman-2.3.3
Diffstat (limited to 'net-analyzer/vnstat')
-rw-r--r-- | net-analyzer/vnstat/files/vnstat-1.17-limit.patch | 11 | ||||
-rw-r--r-- | 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 000000000000..e1706977e525 --- /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 0c24c6dc6014..2805e1d0d1c3 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 -} |