1 |
commit: d7020024ba12df55773ebdd034a800aafe0a7124 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 13 13:34:55 2017 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 13 13:35:26 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7020024 |
7 |
|
8 |
net-analyzer/vnstat: Fix test, remove 26 volume elog epic. |
9 |
|
10 |
Package-Manager: Portage-2.3.11, Repoman-2.3.3 |
11 |
|
12 |
net-analyzer/vnstat/files/vnstat-1.17-limit.patch | 11 ++++++ |
13 |
net-analyzer/vnstat/vnstat-1.17-r1.ebuild | 47 ++--------------------- |
14 |
2 files changed, 14 insertions(+), 44 deletions(-) |
15 |
|
16 |
diff --git a/net-analyzer/vnstat/files/vnstat-1.17-limit.patch b/net-analyzer/vnstat/files/vnstat-1.17-limit.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..e1706977e52 |
19 |
--- /dev/null |
20 |
+++ b/net-analyzer/vnstat/files/vnstat-1.17-limit.patch |
21 |
@@ -0,0 +1,11 @@ |
22 |
+--- a/tests/config_tests.c |
23 |
++++ b/tests/config_tests.c |
24 |
+@@ -99,7 +99,7 @@ |
25 |
+ cfg.maxbw = 10; |
26 |
+ ret = ibwget("ethnone", &limit); |
27 |
+ ck_assert_int_eq(ret, 1); |
28 |
+- ck_assert_int_eq(limit, 8); |
29 |
++ ck_assert_int_eq(limit, 10); |
30 |
+ } |
31 |
+ END_TEST |
32 |
+ |
33 |
|
34 |
diff --git a/net-analyzer/vnstat/vnstat-1.17-r1.ebuild b/net-analyzer/vnstat/vnstat-1.17-r1.ebuild |
35 |
index 0c24c6dc601..2805e1d0d1c 100644 |
36 |
--- a/net-analyzer/vnstat/vnstat-1.17-r1.ebuild |
37 |
+++ b/net-analyzer/vnstat/vnstat-1.17-r1.ebuild |
38 |
@@ -24,6 +24,9 @@ RDEPEND=" |
39 |
${COMMON_DEPEND} |
40 |
selinux? ( sec-policy/selinux-vnstatd ) |
41 |
" |
42 |
+PATCHES=( |
43 |
+ "${FILESDIR}"/${PN}-1.17-limit.patch |
44 |
+) |
45 |
|
46 |
pkg_setup() { |
47 |
enewgroup vnstat |
48 |
@@ -77,47 +80,3 @@ src_install() { |
49 |
newdoc INSTALL README.setup |
50 |
dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi |
51 |
} |
52 |
- |
53 |
-pkg_postinst() { |
54 |
- local _v |
55 |
- for _v in ${REPLACING_VERSIONS}; do |
56 |
- if ! version_is_at_least 1.17-r1 ${_v}; then |
57 |
- # This is an upgrade |
58 |
- elog "" |
59 |
- elog "Beginning with ${PN}-1.17-r1, we no longer install and use the cron job" |
60 |
- elog "per default to update vnStat databases because you will lose some traffic" |
61 |
- elog "if your interface transfers more than ~4GB in the time between two cron" |
62 |
- elog "runs". |
63 |
- elog "" |
64 |
- elog "Please make sure that the vnstatd service is enabled if you want to" |
65 |
- elog "continue monitoring your traffic." |
66 |
- |
67 |
- # Show this elog only once |
68 |
- break |
69 |
- fi |
70 |
- done |
71 |
- |
72 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
73 |
- # This is a new installation |
74 |
- |
75 |
- elog |
76 |
- elog "Repeat the following command for every interface you" |
77 |
- elog "wish to monitor (replace eth0):" |
78 |
- elog " vnstat -u -i eth0" |
79 |
- elog "and set correct permissions after that, e.g." |
80 |
- elog " chown -R vnstat:vnstat /var/lib/vnstat" |
81 |
- elog |
82 |
- elog "It is highly recommended to use the included vnstatd to update your" |
83 |
- elog "vnStat databases." |
84 |
- elog |
85 |
- elog "If you want to use the old cron way to update your vnStat databases," |
86 |
- elog "you have to install the cron job manually:" |
87 |
- elog "" |
88 |
- elog " cp /usr/share/${PN}/vnstat.cron /etc/cron.hourly/vnstat" |
89 |
- elog "" |
90 |
- elog "Note: if an interface transfers more than ~4GB in" |
91 |
- elog "the time between cron runs, you may miss traffic." |
92 |
- elog "That's why using vnstatd instead of the cronjob is" |
93 |
- elog "the recommended way to update your vnStat databases." |
94 |
- fi |
95 |
-} |